Announcement Announcement Module
Collapse
No announcement yet.
Missing request Parameter in SimpleFormController Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Missing request Parameter in SimpleFormController

    Environment:
    Weblogic
    Liferay 5.1
    Spring portlet-mvc

    Here's the problem:

    I have a SimpleFormController that is navigated to from the following code fragment:

    Code:
    <portlet:renderURL var="actionUrl">
    	<portlet:param name="action" value="addGroup"/>
    	<portlet:param name="groupId" value="${linkGroup.key}"/>
    </portlet:renderURL>
    The SimpleFormController then adds the groupId to the model in the referenceData method like so:

    Code:
    Map<String, String> refData = new HashMap<String, String>();
    		refData.put("groupId", request.getParameter("groupId"));
    This works fine, and is then available to me in page.

    I then submit the from, but have a validator for it, the validator picks up the errors in the form, and then recalls the referenceData method before it reloads the page, but this time the groupId variable is not available!

    If the form submits successfully then the group parameter is available in the onSubmitAction which is where I need it!

    I know I could make the groupId part of the form, and this would then overcome my problem, but this parameter, doesn't really belong in my bean...

    Maybe I am missing something to do with the lifecycle of the SimpleFormController, if anyone knows of a lifecycle diagram, documentation:stat transition diagram that explains this that might be useful...

    I really appreciate any help that can be offered on this

    mARK
    Last edited by ma_crice; Feb 14th, 2009, 11:02 AM. Reason: forgot important framework info
Working...
X