Fórum
Problem submit in Multiple Portlet Instances in the same page
Roberto Javier, modificado 12 Anos atrás.
Problem submit in Multiple Portlet Instances in the same page
New Member Postagens: 5 Data de Entrada: 01/03/12 Postagens Recentes
Hello everybody,
I developed a portlet in order to test how Liferay (5.2) handles multiple instances of the same portlet in the same page.
I noticed that every status change of a portlet instance caused the reload of the content of the other portlets (obviousliy according to their current mode).
I have 2 instances of the same portlet, I do something like this in the VIEW.JSP:
<c:set var="portletNameSpace"><portlet:namespace/></c:set>
<portlet:renderURL var="formAction">
<portlet:param name="action" value="uploadFileForm"/>
</portlet:renderURL>
<form:form id="${portletNameSpace}Form" name="${portletNameSpace}Form" action="${formAction}" commandName="uploadForm" method="post" enctype="multipart/form-data">
<form:input style="width:100%;" type="file" path="file" />
<input type="submit" value="SELECT FILE" ><br>
</form:form>
when I submit to the portlet instance 1, runs good, but later, when I submit to the instance 2, to arrive Controller preferences instance 1, and return 1 also refreshes the body. As seen in the jsp, everything is associated with the instance name, so it should work.
Do not know what else can be done.
By example:
Submit form of instance 1 --> instance arrives at 1
Submit form of instance 2 --> instance arrives at 1 (and therefore their preferences)
There was a similar query in another forum (http://www.liferay.com/es/community/forums/-/message_boards/message/13021794), but there were no further comments.
Any suggestion is appreciated.
Regards,
Roberto
I developed a portlet in order to test how Liferay (5.2) handles multiple instances of the same portlet in the same page.
I noticed that every status change of a portlet instance caused the reload of the content of the other portlets (obviousliy according to their current mode).
I have 2 instances of the same portlet, I do something like this in the VIEW.JSP:
<c:set var="portletNameSpace"><portlet:namespace/></c:set>
<portlet:renderURL var="formAction">
<portlet:param name="action" value="uploadFileForm"/>
</portlet:renderURL>
<form:form id="${portletNameSpace}Form" name="${portletNameSpace}Form" action="${formAction}" commandName="uploadForm" method="post" enctype="multipart/form-data">
<form:input style="width:100%;" type="file" path="file" />
<input type="submit" value="SELECT FILE" ><br>
</form:form>
when I submit to the portlet instance 1, runs good, but later, when I submit to the instance 2, to arrive Controller preferences instance 1, and return 1 also refreshes the body. As seen in the jsp, everything is associated with the instance name, so it should work.
Do not know what else can be done.
By example:
Submit form of instance 1 --> instance arrives at 1
Submit form of instance 2 --> instance arrives at 1 (and therefore their preferences)
There was a similar query in another forum (http://www.liferay.com/es/community/forums/-/message_boards/message/13021794), but there were no further comments.
Any suggestion is appreciated.
Regards,
Roberto