2
votes

I'm using JSF 2.0.4 There is a component under a form in which there is an f:ajax

<h:form id="formid"....>
......
<h:outputText id="textid" ........../>
.........
<h:commandLink id=".." value="...">
   <f:ajax event="click" render="formid" execute="input" listener="#{bean.action}"/>
<h:commandLink/>
<h:form/>

Is there any expression for render attribute to exclude textid from formid so that the form is rendered but not the outputText after the ajax is fired?

1
you want "rendered" as the attribute. It takes a boolean value true/false and you can bind it. - Daniel B. Chapman
rendered for outputText? I don't want the outputText to be rendered only after the ajax is fired. - user1072193
Your question is a bit unclear - you mean "rendered" as "shown" or "rerendered" as in updated with new content? Give more details please. - mrembisz

1 Answers

3
votes

I'm not aware of a way to specify "everything in the form except this", but instead of using the form id as the render keyword, you could just list off the child ids under the form you want rendered and not include the id of the outputText, i.e. something like

<f:ajax event="click" render="id1 id2 id3" execute="input" listener="#{bean.action"/>

I'm not sure why you want this though - if you don't want the output text to be updated when that ajax event fires, I would think all you would have to do is simply not update it in the listener?