[JAVASERVERFACES_SPEC_PUBLIC-742] f:param support for f:ajax Created: 09/Feb/10  Updated: 12/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: Ajax/JavaScript
Affects Version/s: 2.1
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Ryan Lubke Assignee: Unassigned
Resolution: Unresolved Votes: 11
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Issue Links:
Duplicate
is duplicated by JAVASERVERFACES-1532 f:viewParam with required="true" prob... Closed
Related
is related to JAVASERVERFACES-1532 f:viewParam with required="true" prob... Closed
Issuezilla Id: 742
Status Whiteboard:

cat2 javadoc size_medium importance_large


 Description   

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.



 Comments   
Comment by Ed Burns [ 04/Mar/10 ]

cat2

Comment by Ed Burns [ 22/Mar/10 ]

javadoc

Comment by Ed Burns [ 15/May/10 ]

These are targeted at 2.1.

Comment by rogerk [ 17/Jun/10 ]

triage

Comment by Ed Burns [ 22/Jun/10 ]

rogerk

Comment by rogerk [ 29/Jun/10 ]

target

Comment by rogerk [ 01/Jul/10 ]

re-target

Comment by rogerk [ 16/Nov/10 ]

triage

Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Generated at Sat Mar 25 12:12:20 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.