Primefaces 2.2 RC2, Glassfish 3.1
Considering a scenario where you have at least two Tabs in a TabView component that has dynamic=true, when the first Tab ( tab1 ) has all its data in it and is valid on its own, when you switch to another Tab ( tab2 ) and make changes on tab2, when saving the JSF ProcessValidator failes ( ValidationFailed=true ) indicating two h:selectOneMenu are null on tab1. When changing dynamic=false on TabView, everything works as expected. Also, even when dynamic=true and you save from tab1 instead of tab2, everything works. Somehow the component buffer gets confused and expects values on components that are not visible on the page.
So far the scenario that fails ( dynamic=true ) only indicates nulls on h:selectOneMenu components, but not on normal inputs, somehow.
I apologize that I cannot post a test case/code due to the complexity of the setup, but I wonder if the PrimeFaces team can have a look on determining the eventual cause of this when dynamic=true. Thanks.
validation issues when tabView dynamic=true
- bumble.bee
- Posts: 723
- Joined: 29 Sep 2010, 21:39
- Location: United States
Sounds like you are expecting that only the visible tab is saved. It also sounds like you have a single form enclosing the entire tab view and your submit button doesn't use the process attribute to limit what is processed.
To correct you should put a separate form inside each tab (each with own submit). Alternatively if you must have one form and one submit button then use the process attribute to limit what is processed (this would have to change dynamically based on what tab is displayed).
To correct you should put a separate form inside each tab (each with own submit). Alternatively if you must have one form and one submit button then use the process attribute to limit what is processed (this would have to change dynamically based on what tab is displayed).
-
- Information
-
Who is online
Users browsing this forum: No registered users and 46 guests