Monday, 25 May 2015

Avoiding Multiple Submits(Refresh page) in Liferay

We often see after submitting the form and refresh the page you will see the same result will be adding in the DB.

So how to get rid of this?

Here we have 2 options to eliminate this behaviour.

1. By Declaring the tag in the liferay-portlet.xml after <icon> tag

          <action-url-redirect> true </action-url-redirect>

2.After doing our logic we can redirect to specified URL by using actionResponse.

   actionResponse.sendRedirect(PortalUtil.getLayoutURL(themeDisplay.getLayout(),themeDisplay));

6 comments:

  1. I have perused all news and articles from here. I feel each post is wealth with the enough data and substance like the custom essay writing service item. I will propose this administration for others to allude.

    ReplyDelete
  2. Thanks for the tips, and one nice tip for you this service can do my homework for me and they are fast like light!

    ReplyDelete
  3. Excellent I like this blog post its very attractive and it’s useful to others they are very attractive your post is amazing .Thank you so much. Keep posting such articles.
    Custom Essay Writing Service

    ReplyDelete
  4. Nice and effective blog post. The content is too short but effective. I love the information you share here. It’s a well written blog post by you. Nowadays I can't see any new posts in your blog, make your blog more active. college essay writing tips

    ReplyDelete

  5. I really enjoyed reading your article. I found this as an informative and interesting post, so I think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.
    Academic Writing Style

    ReplyDelete
  6. I read this article. I think You put a lot of effort to create this article. I appreciate your work.
    thesis Writing Service

    ReplyDelete