1
votes

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.

1

1 Answers

4
votes

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.