carry "get" parameters from request to form attribute "action
-------------------------------------------------------------

                 Key: TOMAHAWK-771
                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-771
             Project: MyFaces Tomahawk
          Issue Type: New Feature
            Reporter: Alexey Inkin


In JSF view state does not include parameters that are passed in query string. 
Say, if I have a page to display user profile and it accepts user_id "get" 
parameter, JSF form generated on it would not include that parameter in it's 
action attribute. But spoken parameter is essential for page and it cannot work 
without it.

I suggest to add new feature to sandbox form tag so that it could append 
certain parameters to form action taking them directly from request. An example 
code would be:

<s:form carriedParameters="#{backingBean.getCarriedParameters}">

That method would return a list of parameter names. Form implementation will 
iterate through it and search for parameter with that name in request. If 
found, the parameter and it's value would be appended to form action.

I think this would be the most usable way to solve the problem above. 
Parameters should not be hardcoded in JSP since in some projects form tag is 
inserted within another tag and possible parameter list cannot be determined at 
point of inserting the tag. Nor can parameters be fixed for each page because 
some of them may not be passed and be defaulted, so they should be inserted 
only if already present in request.

Note that parameter order in that list should be preserved since it can be 
important when using URL rewriting filters like this one: 
http://tuckey.org/urlrewrite/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to