Reputation: 1481
is there any way to send extra parameters with p:ajax?
I got this:
<p:selectOneMenu id="crit">
<f:selectItem itemLabel="Select one..." itemValue="0" />
<f:selectItems itemLabel="#{cat.desc}" itemValue="#{cat.id}" value="#{CatBean.cats}" var="cat" />
<p:ajax event="change" listener="#{ConsBean.proccesCatSelection}" process="crit" update=":list,:crits" />
</p:selectOneMenu>
I need to send an ID with the event "change" but it seems to send only an AjaxBehaviorEvent.
Thanks a lot for the attention.
Upvotes: 1
Views: 4873
Reputation: 4406
put the ID in an InputHidden
and then use this :
<p:ajax event="change" listener="#{ConsBean.proccesCatSelection}"
process="crit inputHiddenId" update=":list,:crits" />
Then p:ajax
will send the InputHidden content to server too.
Upvotes: 4