Skip to main content

f:viewParam with required="true" problem when using field with f:ajax

4 replies [Last post]
movemountfuji
Offline
Joined: 2009-12-26

I have a page welcome.xhtml with

and then in home.xhtml

I use the links from welcome.jsf and access home.jsf page as I expected with the entryType param in the URL.
http:///jsf2lab1/home.jsf?entryType=manager

I enter the data in one of the fields in home.jsf page . This field has the f:ajax behaviour .

The page does one normal run through the lifecycle .

The second run through the lifecycle (entering more data) shows the requiredMessage from the f:viewParam although the param in the URL is still there .

[ My welcome bean is @RequestScoped. Tried with @SessionScope and still same issue.]

Also while I action the form from home.jsf with

how can I maintain my URL param that was originally posted from welcome.jsf ?

welcome.hello action goes to another third page readback.html .

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
movemountfuji
Offline
Joined: 2009-12-26

Done , posted the issue and uploaded the maven project for tests.

https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1532

movemountfuji
Offline
Joined: 2009-12-26

More details to help with problem investigation .
Removing the required attribute on f:viewParam and ending up with something like




where the listener looks like this :

public void preValidateViewParam(ComponentSystemEvent e) {
UIViewParameter viewParam = (UIViewParameter) e.getComponent();
System.out.println("preValidateViewParam"
+ viewParam.getName() + " ... " + viewParam.getSubmittedValue());
}

I noticed that for first ajax request the value is maintained , but for the second ajax request the submitted value is null . The request header is still carying my URL param but JSF is loosing it somewhere along the way.

Ryan Lubke

Hello,

Please log an issue [1] with a small deployable test case and we'll
investigate.

Thanks,
-rl

[1] https://javaserverfaces.dev.java.net

On 1/28/10 2:09 PM, webtier@javadesktop.org wrote:
> More details to help with problem investigation .
> Removing the required attribute on f:viewParam and ending up with something like
>
>
>
>

>

>
> where the listener looks like this :
>
> public void preValidateViewParam(ComponentSystemEvent e) {
> UIViewParameter viewParam = (UIViewParameter) e.getComponent();
> System.out.println("preValidateViewParam"
> + viewParam.getName() + " ... " + viewParam.getSubmittedValue());
> }
>
> I noticed that for first ajax request the value is maintained , but for the second ajax request the submitted value is null . The request header is still carying my URL param but JSF is loosing it somewhere along the way.
> [Message sent by forum member 'movemountfuji' (movemountfuji@gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=383585
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

movemountfuji
Offline
Joined: 2009-12-26

Can I upload files on https://javaserverfaces.dev.java.net when posting an issue ?
I can't seem to find a way to upload the code for the "deployable" test case.