Hi guys!
I've a question, suppose I've this code:
<p:outputPanel id="panelId" layout="block">
<p:inputText id="inputId" value="#{bean.property}"/>
<p:inputText value="#{bean.property}"/>
</p:outputPanel>
<p:commandButton value="Submit" action="#{bean.save}" process="panelId"/>
The question is, when I press on submit button, it process all outputPanel with panelId Id. But I want to process all components from panelId,
except component with inputId Id. Can do so somewhat?
Thanks in advance!
process all components except one
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
It's not possible.
I would so something like this:
Or list all sub components which should be processed.
I would so something like this:
Code: Select all
<p:outputPanel id="panelId" layout="block">
<p:inputText id="inputId" value="#{bean.property}"/>
<p:outputPanel id="containerToProcess">
<p:inputText value="#{bean.property}"/>
</p:outputPanel>
</p:outputPanel>
<p:commandButton value="Submit" action="#{bean.save}" process="containerToProcess"/>
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
zoigl, thank you for answer...
Example that I gave is simple, but in my case I have something more complicated, for example:
<p:outputPanel id="panelId" layout="block">
<p:inputText id="oneId" value="#{bean.property}"/>
<p:inputText id="twoId" value="#{bean.property}"/>
<p:inputText id="threeId" value="#{bean.property}"/>
<p:inputText id="fourId" value="#{bean.property}"/>
<p:inputText id="fiveId" value="#{bean.property}"/>
<p:inputText id="sixId" value="#{bean.property}"/>
</p:outputPanel>
And suppose I don't have to process component - twoId and fiveId:
One of the possibilities can be next: to write all ids for components that I want to process <p:commandButton value="submit" process="oneId threeId fourId sixId">
But I thought it was a possibility to write something like this: <p:commandButton value="submit" process="@all !twoId !fiveId">
It could be quite ok...
Good luck;
Example that I gave is simple, but in my case I have something more complicated, for example:
<p:outputPanel id="panelId" layout="block">
<p:inputText id="oneId" value="#{bean.property}"/>
<p:inputText id="twoId" value="#{bean.property}"/>
<p:inputText id="threeId" value="#{bean.property}"/>
<p:inputText id="fourId" value="#{bean.property}"/>
<p:inputText id="fiveId" value="#{bean.property}"/>
<p:inputText id="sixId" value="#{bean.property}"/>
</p:outputPanel>
And suppose I don't have to process component - twoId and fiveId:
One of the possibilities can be next: to write all ids for components that I want to process <p:commandButton value="submit" process="oneId threeId fourId sixId">
But I thought it was a possibility to write something like this: <p:commandButton value="submit" process="@all !twoId !fiveId">
It could be quite ok...
Good luck;
-
- Information
-
Who is online
Users browsing this forum: No registered users and 26 guests