Liferay portal portlet tutorial
Liferay portlet development trianing
Iván Rodríguez Bautista | : | Hi everybody, |
|
|
|
|
| I´m developing a config portlet through "Config" button. |
|
|
|
|
|
|
|
| This portlet is in Plugins-SDK, and I get to my config.jsp right. I insert this tag "<configuration-action-class>" in "liferay-portlet.xml", and this class extends "BaseConfigurationAction". |
|
|
|
|
|
|
|
| In config.jsp I have somethig like this: |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
| The problem is that the text I see in the browser is this: |
|
|
|
|
| ..... |
|
|
|
|
| " class="uni-form" method="post" name="_86_fm" id="_86_fm"> |
|
|
|
|
| ..... |
|
|
|
|
|
|
|
| When I submit the form, Liferay gives me an error. |
|
|
|
|
|
|
|
| In all the manuals and forums I see the form definition like I write. |
|
|
|
|
|
|
|
| Somebody can help me? |
|
|
|
|
|
|
|
| Thak you very much, greetings!! |
|
|
|
|
|
|
Faris Abdulla | : | Hi Ivan, |
|
|
|
|
|
|
|
| Can you please check the syntax written in your .jsp. |
|
|
|
|
|
|
|
| The error seems like Syntax error. |
|
|
|
|
|
|
|
| Just try the complete statement in single line. |
|
|
|
|
|
|
|
| <form form action="<liferay-portlet:actionURL portletConfiguration="true" />" class="u.." > |
|
|
|
|
|
|
Iván Rodríguez Bautista |
| Hi Faris, |
|
|
|
|
| Thak you for answer me, I´ve done that you say, but it doesn´t work |
|
|
|
|
|
|
|
| Is like the form finish when I close the liferay-portlet:actionURL tab. |
|
|
|
|
|
|
Faris Abdulla | : | Hi Ivan, |
|
|
|
|
|
|
|
| Are you using any javascript functions over it? |
|
|
|
|
|
|
|
| I'll give you my code how I used the <form> in config.jsp and its working.. |
|
|
|
|
|
|
|
| I'm not using the form name.. |
|
|
|
|
|
|
|
| Dont know whether this will help you. Just try.. |
|
|
|
|
|
|
Mazhar Anwar | : | Hi, |
|
|
|
|
|
|
|
| You can try in this way? |
|
|
|
|
|
|
|
| <form action='<liferay-portlet:actionURL portletConfiguration="true" />' method="post" name="<portlet:namespace />fm"> |
|
|
|
|
|
|
|
| Use single quetes rather than double quotes, HTH.. |
|
|
|
|
|
|
|
|
Regards,
Mazhar |
|
|
|
|
|
|
Iván Rodríguez Bautista |
| Thank you very much for answer. |
|
|
|
|
|
|
|
| If I put all in the same line without name or id, like Farid said the problem persist |
|
|
|
|
|
|
|
| if I put it like Mazhar write, the form appears a well formed , but when I clic the submit button I can see this exception: |
|
|
|
|
|
|
|
| With debug I can see that the excpetion jumps before the code get to the Configuration class. |
|
|
|
|
|
|
|
| The steps that i follow are the next: |
|
|
|
|
|
|
|
| 1. Define in portlet.xml, in the main portlet, the tag: |
|
|
|
|
| |
|
|
|
|
|
|
|
| 2. Define in liferay-portlet.xml, in the main portlet, the tag: |
|
|
|
|
| |
|
|
|
|
| 3. Create PortlelConfigure like this: |
|
|
|
|
| |
|
|
|
|
|
|
|
| I get to the "configuration.jsp" correctly, but when in it I clic the submit button, becames the exception. |
|
|
|
|
|
|
|
| Any idea to resolve the problem?? |
|
|
|
|
|
|
|
| Again, thank you very much.
Greetings!!! |
|
|
|
|
|
|
Mazhar Anwar | : | Hi, |
|
|
|
|
|
|
|
| Add the following taglibs in your jsp. |
|
|
|
|
|
|
|
| And verify the configuration.jsp path in your render method. HTH, |
|
|
|
|
|
|
Iván Rodríguez Bautista |
| Ooooooh yeah!! |
|
|
|
|
|
|
|
| Thank you so much Mazhar! I didn´t write the declaration of liferay-portlet tag. I had not realized because Eclipse didn´t give me errors , but now I can get to the processAction method of my configure class. |
|
|
|
|
|
|
|
| Thanks again!! |
No comments:
Post a Comment