This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I've read a magazine that proposes as the best solution for avoiding using immediate attribute from JSF by using t:subform tag from Tomahawk.
So, to dive into this concept I've started some test that follows in code below.
I have a selectOneMenu that has a valueChangeListener that when submitted, it prepares a list so this can be used by another selectOneMenu ( dependent selects ).
But I have some fields in my form that are required. So the first solution was to set immediate=true for my selectOneMenu ( the state selectOneMenu ).
Even though this could work fine, I have another component that has a valueChangeListener to disable or enable other UIComponents into the main form.
I can't use these 2 components with immediate=true, because the State selectOneMenu is required too and it will be validated on ApplyRequest Values.
According to the magazine I read, the best solution is: using subform tag.
My doubt here is: looking at the code that follows, could someone help me to identify if is this a good way to work?
I'm asking it because I think it's becoming a bit strange and complicated and I'd like to keep things as simple as possible...