-
Apr 9th, 2012, 09:29 AM
#1
transfer request object from one controller to another controller in same portlet
List of Files -
createAccount.jsp
CreateAccountController.java
accountDetails.jsp
AccountDetailsController.java
addAttachment.jsp
accountList.jsp
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
<portlet:actionURL>
<portlet
aram name="action" value="accountDetails" />
</portlet:actionURL>
Also I added code in CreateAccountController, but not getting parameter values send by addAttachment.
-
Apr 9th, 2012, 02:26 PM
#2
Hello
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
HTH
- Manuel Jordan
Kill Your Pride, Share Your Knowledge With All
The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7
Blog
Technical Reviewer of Apress
- Pro SpringSource dm Server
- Spring Enterprise Recipes: A Problem-Solution Approach
- Spring Recipes: A Problem-Solution Approach, 2nd Edition
- Pro Spring Integration
- Pro Spring Batch
- Pro Spring 3
- Pro Spring MVC: With Web Flow
- Pro Spring Security
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules