Reputation: 706
I have the following code:
<h:panelGrid columns="2" styleClass="labelValueContainer" columnClasses="one,two">
<p:outputLabel value="Value" />
<p:inputText id="englishValue" styleClass="englishValue" value="#{labelsManager.addLabelsBean.engValue}" />
</h:panelGrid>
<p:commandButton value="COPY" styleClass="copyButton" process="englishValue" partialSubmit="true" actionListener="#{labelsManager.setValueForCopy}">
What I'm trying to do is to submit only one inputText and trigger an actionLister (or an action) with ajax. If I remove partialSubmit="true"
the method "setValueForCopy" is trigger but when I add again actionListener is not triggered anymore and I don't know way.
If anyone have a better solution for submiting an input and trigger a method I'm ready to listen.
Thanks!
Upvotes: 3
Views: 5257
Reputation: 1108782
When using partialSubmit="true"
, only things in process="..."
will be submitted (and processed). This is missing the <p:commandButton>
itself.
Add it via @this
:
<p:commandButton ... process="@this englishValue" partialSubmit="true" ... />
Upvotes: 7