You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org> on 2010/05/18 17:17:52 UTC

[jira] Commented: (MYFACES-2720) Validation error removes all url parameters

    [ https://issues.apache.org/jira/browse/MYFACES-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868677#action_12868677 ] 

Jakob Korherr commented on MYFACES-2720:
----------------------------------------

If you are using the URL parameters as view parameters like that

<f:metadata>
    <f:viewParam name="input" value="#{myBean.input}" />
</f:metadata>

you can use the parameters in your bean although they are not present on the POST request. So this takes care of this "P.S. Also this issue has another side effect. When handling some action the url parameters are unavailable."

However I do understand that the bookmarkability is a problem. There are two options to solve this: 1) add the current url parameters as GET parameters in the POST request (not sure if this will work out with every servlet container) or 2) do a GET redirect if a validation error occurs just like a NavigationCase with redirect=true.

The problem here is that the JSF 2.0 spec does not tell us to do so, so we cannot do anything at the moment about this. Thus I will close this issue as won't fix. However I recommend that you create an issue against the JSF 2.0 specification about this problem at https://javaserverfaces-spec-public.dev.java.net/

Regards,
Jakob

> Validation error removes all url parameters
> -------------------------------------------
>
>                 Key: MYFACES-2720
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2720
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0
>            Reporter: Alexander Ilyin
>
> When page has some url parameter(s) after server-side validation error or by
> default navigation JSF navigates to the page with the same viewId but without
> url parameters.
> IMHO the problem is the POST method submits the form to viewId's url only
> instead of using url with the parameters as original url has.
> This issue makes problems with bookmarking such views with params after handling
> some action(minor problem) and generating proper response after action handling
> based on this parameters(major problem) .
> P.S. Also this issue has another side effect. When handling some action the url
> parameters are unavailable.
> P.P.S. The issue existed in Mojarra. The same Mojarra's issue can be found here https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1653
> And jsf forum discussion here:  http://forums.sun.com/thread.jspa?threadID=5438231

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.