Re submission of form on press of refresh button is an old issue is Liferay. The reason behind this issue is the parameters and action which are available in URL after the form submission. Earlier some developers used to open some other JSP after completion of Action.
But its solution is a very easy, provided by liferay itself. We have to set the following value in a tag inside liferay-portlet.xml which is set false by default.
But its solution is a very easy, provided by liferay itself. We have to set the following value in a tag inside liferay-portlet.xml which is set false by default.
I have same issue in my liferay MVC portlet. I could not rectify this problem yet. My portlet get hanged when i add
ReplyDelete<action-url-redirect > true </action-url-redirect > to liferay-portlet.xml
It works fine for me.
Deletehi when i used action-url-redirect property true then it work,but side effect here
ReplyDeletein jsp
if(request.getAttribute("search")!=null){
List sm=(List)request.getAttribute("search");
}
it generate nullpointer exception ,but if i remove action-url-redirect property then it work ,what i should do then both are work fine...
I Set the action-url-redirect value to true liferay-portlet.xml for prevent submission while refreshing the page. Thats work fine, but while retrieve data from request.getAttribute(""); method, its displaying null value. If I removed the action-url-redirect value to true liferay-portlet.xml that displaying value correctly, but it's not working properly while using the action-url-redirect value to true liferay-portlet.xml. I want to use that both, can you please help me on this.
DeleteAlso it shows the error like "No Bean Found For this Scope"
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi Apoorva,
ReplyDeleteThanks for the post..
Please edit the post with the sequence order of the block of code you have shared so that it will be easy for beginner.
we will have to add the above code just before
header-portlet-css tag
Thanks...
Keep Sharing Apoorva..
Sequences can easily be managed in LDS easily. If you are working in overview view, it manages the sequences automatically, and if you are making entry in XML, it will show you error.
DeleteThis comment has been removed by the author.
ReplyDelete