Fórum
Liferay <portlet:actionURL>
Seeya S Kudtarker, modificado 11 Anos atrás.
Liferay <portlet:actionURL>
Regular Member Postagens: 187 Data de Entrada: 16/01/13 Postagens Recentes
In my jsp I have the following code:
<portlet:actionURL name="addDetails" var="addDetailsURL" />
<aui:form name="addDetails" action="<%=addDetailsURL.toString() %>" method="post" >
<aui:input type="text" label="name:" name="name" value="" />
<aui:input type="text" label="surname:" name="surname" value="" />
<aui:input type="text" label="age:" name="age" value="" />
<aui:button type="submit" value="addDetails" />
</aui:form>
I want to submit this data which will be processed in a java class. my java class has few functions. how should I specify in the above jsp that it should access the particular function in java after submitting the form?
Sounds silly but I am confused..
One more question: how does actionURL resolve the namepsace. I mean how does it know which function in java class it should go to..
<portlet:actionURL name="addDetails" var="addDetailsURL" />
<aui:form name="addDetails" action="<%=addDetailsURL.toString() %>" method="post" >
<aui:input type="text" label="name:" name="name" value="" />
<aui:input type="text" label="surname:" name="surname" value="" />
<aui:input type="text" label="age:" name="age" value="" />
<aui:button type="submit" value="addDetails" />
</aui:form>
I want to submit this data which will be processed in a java class. my java class has few functions. how should I specify in the above jsp that it should access the particular function in java after submitting the form?
Sounds silly but I am confused..
One more question: how does actionURL resolve the namepsace. I mean how does it know which function in java class it should go to..
Gnaniyar Zubair, modificado 11 Anos atrás.
RE: Liferay <portlet:actionURL>
Liferay Master Postagens: 722 Data de Entrada: 19/12/07 Postagens Recentes
You have to go through the ACTION / RENDER URL behaviors in Portlet life cycle
Action URL calls processAction of your portlet
Render URL calls render / View Method
When you submit the Action URL, it will go and check the processAction method of your portlet class which you have defined in portlet.xml
Action URL calls processAction of your portlet
Render URL calls render / View Method
When you submit the Action URL, it will go and check the processAction method of your portlet class which you have defined in portlet.xml
<portlet-class>
com.my.package.CustomPortlet
</portlet-class>
vinod kumar, modificado 11 Anos atrás.
RE: Liferay <portlet:actionURL>
Junior Member Postagens: 64 Data de Entrada: 04/10/12 Postagens Recentes
hi seeya
by default when u call the <portlet:actionURL/>in your jsp it will hit to the processaction() function in your java class
now you r using
<portlet:actionURL name="addDetails" var="addDetailsURL" />.
when you r using name="addDetails" attribute in u'r actionurl it will hit to the addDetails() function
so you are suppose to create addDetails() in your java class
Regards,
vinod
by default when u call the <portlet:actionURL/>in your jsp it will hit to the processaction() function in your java class
now you r using
<portlet:actionURL name="addDetails" var="addDetailsURL" />.
when you r using name="addDetails" attribute in u'r actionurl it will hit to the addDetails() function
so you are suppose to create addDetails() in your java class
Regards,
vinod
Seeya S Kudtarker, modificado 11 Anos atrás.
RE: Liferay <portlet:actionURL>
Regular Member Postagens: 187 Data de Entrada: 16/01/13 Postagens Recentes
Thanks Vinod!!
That was great help!! It cleared my doubts!!
That was great help!! It cleared my doubts!!
Hisham Zoghbi, modificado 6 Anos atrás.
RE: Liferay <portlet:actionURL>
Junior Member Postagens: 32 Data de Entrada: 28/03/17 Postagens Recentes
hello guys!
im trying to add my Methods from my Action Class to my View.jsp and i've got this:
/view.jsp(21,20) PWC6031: Unterminated <portlet:actionURL tag
javax.portlet.PortletException: org.apache.jasper.JasperException: /view.jsp(21,20) PWC6031: Unterminated <portlet:actionURL tag
at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:267)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:102)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:594)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:610)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:160)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:303)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:497)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:262)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:317)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
<portlet:actionURL = name="actionMethod1" var="patientSubmitURL"
windowState="normal"></portlet:actionURL>
<form action=${patientSubmitURL} method="post">
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><span
class="glyphicon glyphicon-open-file"></span></span> <input
type="nummer" class="form-control"
placeholder="Patient/in Akten-Nr" size="70"
name="<portlet:namespace/>aktenNr" />
</div>
</div>
</form>
I might be wrong with the implementation.
For Help i'll be Thankful
im trying to add my Methods from my Action Class to my View.jsp and i've got this:
/view.jsp(21,20) PWC6031: Unterminated <portlet:actionURL tag
javax.portlet.PortletException: org.apache.jasper.JasperException: /view.jsp(21,20) PWC6031: Unterminated <portlet:actionURL tag
at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:267)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:102)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:594)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:610)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:160)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:303)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:497)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:262)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:317)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
<portlet:actionURL = name="actionMethod1" var="patientSubmitURL"
windowState="normal"></portlet:actionURL>
<form action=${patientSubmitURL} method="post">
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><span
class="glyphicon glyphicon-open-file"></span></span> <input
type="nummer" class="form-control"
placeholder="Patient/in Akten-Nr" size="70"
name="<portlet:namespace/>aktenNr" />
</div>
</div>
</form>
I might be wrong with the implementation.
For Help i'll be Thankful
Olaf Kock, modificado 6 Anos atrás.
RE: Liferay <portlet:actionURL>
Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens RecentesHisham Zoghbi:
<portlet:actionURL = name="actionMethod1" var="patientSubmitURL"
This line has an equals sign that doesn't belong there (the first one in the line). That might be what upsets the XML parser.
Hisham Zoghbi, modificado 6 Anos atrás.
RE: Liferay <portlet:actionURL>
Junior Member Postagens: 32 Data de Entrada: 28/03/17 Postagens Recentes
i just fixed it thanx. but when i press the Button i get nothing No response?
Olaf Kock, modificado 6 Anos atrás.
RE: Liferay <portlet:actionURL>
Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens RecentesHisham Zoghbi:
i just fixed it thanx. but when i press the Button i get nothing No response?
well, with that much ("zero") information, you won't get any response here as well... Now it's a matter of what your code does - seems it doesn't do what you expect it to do.
Hisham Zoghbi, modificado 6 Anos atrás.
RE: Liferay <portlet:actionURL>
Junior Member Postagens: 32 Data de Entrada: 28/03/17 Postagens Recentes
fair enough!!
by changing the Mistake that you've just saw "=" and run my Portlet again. I just got the same Exception as the first one.
<portlet:actionURL name="actionMethod1"" var="patientSubmitURL" />
<form action=${patientSubmitURL} method="post">
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><span
class="glyphicon glyphicon-open-file"></span></span> <input
type="nummer" class="form-control"
placeholder="Patient/in Akten-Nr" size="70"
name="<portlet:namespace/>aktenNr" />
</div></div>
<button type="submit" value="Send SMS"></button>
</form>
this is how my View.jsp looks like. With the actionMethode @ProcessAction(name = "actionMethode1")
I have create actionURL by portlet:actionURL tag. name attribute of this tag is same as name attribute of @ProcessAction annotation of portlet action method. So this actionURL is used to calls portlet action method
by changing the Mistake that you've just saw "=" and run my Portlet again. I just got the same Exception as the first one.
<portlet:actionURL name="actionMethod1"" var="patientSubmitURL" />
<form action=${patientSubmitURL} method="post">
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><span
class="glyphicon glyphicon-open-file"></span></span> <input
type="nummer" class="form-control"
placeholder="Patient/in Akten-Nr" size="70"
name="<portlet:namespace/>aktenNr" />
</div></div>
<button type="submit" value="Send SMS"></button>
</form>
this is how my View.jsp looks like. With the actionMethode @ProcessAction(name = "actionMethode1")
I have create actionURL by portlet:actionURL tag. name attribute of this tag is same as name attribute of @ProcessAction annotation of portlet action method. So this actionURL is used to calls portlet action method
Hisham Zoghbi, modificado 6 Anos atrás.
RE: Liferay <portlet:actionURL>
Junior Member Postagens: 32 Data de Entrada: 28/03/17 Postagens Recentes
i think that was more than a zero information
Olaf Kock, modificado 6 Anos atrás.
RE: Liferay <portlet:actionURL>
Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens RecentesHisham Zoghbi:
fair enough!!
by changing the Mistake that you've just saw "=" and run my Portlet again. I just got the same Exception as the first one.
<portlet:actionURL name="actionMethod1"" var="patientSubmitURL" />
<form action=${patientSubmitURL} method="post">
...
this is how my View.jsp looks like. With the actionMethode @ProcessAction(name = "actionMethode1")
I have create actionURL by portlet:actionURL tag. name attribute of this tag is same as name attribute of @ProcessAction annotation of portlet action method. So this actionURL is used to calls portlet action method
I've emphasized a few places that look weird. Check if they're due to anonymization of this post or actual things in your code. In order of appearance:
- actionMethod1 vs (later) actionMethode1
- superfluous quote
- missing quotes
- see above, already mentioned.
I'm just getting rid of the obvious first.
Next thing to check: Did you override processAction as well? Because the default implementation will do the Annotation lookup. If you've already implemented this method, you might have omitted the default handler.
Hisham Zoghbi, modificado 6 Anos atrás.
RE: Liferay <portlet:actionURL>
Junior Member Postagens: 32 Data de Entrada: 28/03/17 Postagens Recentes
thankx alot it works now