Issue Details (XML | Word | Printable)

Key: JAVASERVERFACES_SPEC_PUBLIC-742
Type: Improvement Improvement
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Ryan Lubke
Votes: 10
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
javaserverfaces-spec-public

f:param support for f:ajax

Created: 09/Feb/10 12:30 PM   Updated: 08/Nov/13 09:15 PM
Component/s: Ajax/JavaScript
Affects Version/s: 2.1
Fix Version/s: 2.3

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: Macintosh

Issue Links:
Related
 

Issuezilla Id: 742
Status Whiteboard:

cat2 javadoc size_medium importance_large

Tags:
Participants: Ed Burns, rogerk and Ryan Lubke


 Description  « Hide

Consider:
--------------------------------------

<f:view>
<f:metadata>
<f:viewParam id="country" name="country"
value="#{welcome.country}" required="true"
requiredMessage="The 'country' parameter is missing.
Invalid access for this page ...">
</f:viewParam>
</f:metadata>
</f:view>
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Hello JSF 2! </title>
</h:head>
<h:body>

<h:messages id="messages" style="color: red;"
layout="table"/>

<h:form id="form">

<fieldset>
<p>
<h:outputLabel id="vip__Label" for="vip" value="Vip Lounge
Access">
</h:outputLabel>
<h:selectOneRadio id="vip" layout="pageDirection"
label="Vip Lounge Access"
required="true" immediate="true"
value="#{welcome.vip}">
<f:selectItem itemLabel="Yes" itemValue="true" />
<f:selectItem itemLabel="No" itemValue="false" />
<f:ajax execute="@this" render="@form :messages">
</f:ajax>
</h:selectOneRadio>

</p>
<p>
<h:outputLabel id="name__Label" for="name" value="Name" >
</h:outputLabel>

<h:inputText id="name" value="#{welcome.name}" label="Name">
<f:ajax execute="@this" render="name__Label :messages">
</f:ajax>
</h:inputText>
</p>
<div >
<h:commandButton value="Hello"
action="readback?faces-redirect=true&includeViewParams=true">
<f:param name="country" value="#{param['country']}" />
</h:commandButton>
<h:commandButton value="Goodbye" immediate="true"
action="#{welcome.goodbye}" />
</div>
</fieldset>

</h:form>
</h:body>
...

--------------------------------------

Note the
<f:param name="country" value="#{param['country']}" />
indented in <h:commandButton> to hold the country viewParam .

Note the f:viewParam 'country' is required for this view.

Note the f:ajax usage with the radio. When the radio is activated,
the country request parameter is not included and causes an error.

See https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1532 for further
details.



Ed Burns added a comment - 04/Mar/10 11:48 AM

cat2


Ed Burns added a comment - 22/Mar/10 11:38 AM

javadoc


Ed Burns added a comment - 15/May/10 07:54 AM

These are targeted at 2.1.


rogerk added a comment - 17/Jun/10 09:44 PM

triage


Ed Burns added a comment - 22/Jun/10 09:04 PM

rogerk


rogerk added a comment - 29/Jun/10 12:24 PM

target


rogerk added a comment - 01/Jul/10 11:57 AM

re-target


rogerk added a comment - 16/Nov/10 12:48 PM

triage