Announcement Announcement Module
No announcement yet.
transfer request object from one controller to another controller in same portlet Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • transfer request object from one controller to another controller in same portlet

    List of Files -


    I have an application where I need to update/add some info to existing account.

    1) On accountList.jsp we show all account nos. When user clicks on any account no, it call render method of AccountDetailsController and display details of account on accountDetails.jsp. There is a button to add attachment. when you click on add attachment button a popup i.e. addAttachment.jsp opens with some text fields and browse option. When user submit attachment form it calls action method of AccountDetailsController and save attachment in DB and again show details on accountDetails.jsp. This works fine.
    2) We have a form to create new account i.e. createAccount.jsp. When we open this form, it call render methos of CreateAccountController. User enter all required fields in this form and submit the form, it call action method of CreateAccountController. On success it call render method and return new ModelAndView(accountDetails, modelMap). It opens details page accountDetails.jsp. And then if user click on addAttachment and submit the form, it is calling action method of CreateAccountController.
    code for addAttachment for submission is
    <portletaram name="action" value="accountDetails" />

    Also I added code in CreateAccountController, but not getting parameter values send by addAttachment.

  • #2

    Next time use code tags.

    I dont know about Portlets, but in general, if you need use or share some objects between different controllers, I would suggest consider work with Spring Web Flow.

    This section would be useful
    Chapter 14. Portlet Integration