Issue Details (XML | Word | Printable)

Key: SPR-3162
Type: Task Task
Status: Open Open
Priority: Major Major
Assignee: John Lewis
Reporter: Jonathan van Alteren
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Spring Framework

Document the use of ParameterMappingInterceptor for typical Portlet MVC setup

Created: 14/Feb/07 08:22 AM   Updated: 19/Nov/09 05:50 AM
Component/s: SpringWEB
Affects Version/s: 2.0.2
Fix Version/s: 3.1 RC1

Time Tracking:
Not Specified

File Attachments: 1. XML File applicationContext.xml (0.9 kB)
2. XML File selfcare-portlet.xml (2 kB)

Environment: Windows XP Professional on a Dell workstation with 2Gb memory.

Virtual Machine: IBM JVM - 1.4.2
Platform: IBM WebSphere - 5.1


 Description  « Hide

I'm evaluating Portlet MVC for use in WebSphere Portal 5.1 JSR-168 portlets.

I have created a simple form controller that processes a very simple command class. I have configured it to use a validator and I have set the 'formView' and 'successView' properties. Furthermore, I have configured an internal resource view resolver in a separate applicationContext.xml file.

I am able to navigate the portlet to get to the form, so I guess the formView works for that part. If I enter faulty data in my form I can see in the logs that validation errors occur. However, I am returned to the 'home' view (which is where I started from) instead of going back the formView. I need to be able to show the errors to the user and allow him to resubmit the form (as you would expect).

Am I doing something wrong here? I looked at the code in SimpleFormController (in the ...web.portlet.mvc package) and unlike the non-portlet variety, it does not call showForm(..) (see below).

I can't find anything about this in the docs. Please help!

----------- excerpt from org.springframework.web.portlet.mvc.SimpleFormController.java:
...
protected void processFormSubmission(
ActionRequest request, ActionResponse response, Object command, BindException errors)
throws Exception {

if (errors.hasErrors()) {
if (logger.isDebugEnabled()) { logger.debug("Data binding errors: " + errors.getErrorCount()); }
if (isRedirectAction()) { setFormSubmit(response); }
passRenderParameters(request, response);
}
else if (isFormChangeRequest(request)) {
...
----------



Juergen Hoeller made changes - 14/Feb/07 12:47 PM
Field Original Value New Value
Priority Blocker [ 1 ] Major [ 3 ]
Assignee Juergen Hoeller [ juergen.hoeller ]
Jonathan van Alteren made changes - 15/Feb/07 06:13 AM
Attachment selfcare-portlet.xml [ 12388 ]
Jonathan van Alteren made changes - 15/Feb/07 06:14 AM
Attachment applicationContext.xml [ 12389 ]
Jonathan van Alteren made changes - 15/Feb/07 06:30 AM
Attachment selfcare-portlet.xml [ 12390 ]
Juergen Hoeller made changes - 15/Feb/07 11:20 AM
Attachment selfcare-portlet.xml [ 12388 ]
Juergen Hoeller made changes - 28/Sep/07 08:40 AM
Fix Version/s 2.5 final [ 10551 ]
Issue Type Bug [ 1 ] Task [ 3 ]
Summary Portlet SimpleFormController does not go back to configured formView in case of validation errors Document the use of ParameterMappingInterceptor for typical Portlet MVC setup
Juergen Hoeller made changes - 10/Nov/07 05:52 PM
Fix Version/s 2.5 final [ 10551 ]
Fix Version/s 2.5.2 [ 10681 ]
Juergen Hoeller made changes - 30/Nov/07 07:38 AM
Fix Version/s 2.5.3 [ 10722 ]
Fix Version/s 2.5.2 [ 10681 ]
John Lewis made changes - 14/Dec/07 03:45 PM
Assignee Juergen Hoeller [ juergen.hoeller ] John Lewis [ johnalewis ]
Juergen Hoeller made changes - 18/Jan/08 10:52 AM
Fix Version/s 2.5.4 [ 10723 ]
Fix Version/s 2.5.3 [ 10722 ]
Juergen Hoeller made changes - 15/Apr/08 11:46 AM
Fix Version/s 3.0 RC1 [ 10956 ]
Fix Version/s 2.5.4 [ 10723 ]
Juergen Hoeller made changes - 28/Apr/08 04:50 PM
Fix Version/s 3.0 RC1 [ 10956 ]
Fix Version/s 2.5.6 [ 10968 ]
Juergen Hoeller made changes - 02/Jul/08 01:24 AM
Fix Version/s 3.0 RC1 [ 10956 ]
Fix Version/s 2.5.6 [ 10968 ]
Juergen Hoeller made changes - 18/Feb/09 09:19 AM
Fix Version/s 3.0 final [ 11180 ]
Fix Version/s 3.0 RC1 [ 10956 ]
Juergen Hoeller made changes - 19/Nov/09 05:50 AM
Fix Version/s 3.0 final [ 11180 ]
Fix Version/s 3.1 RC1 [ 11107 ]