Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF + Tomahawk + subform

Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

The problem:
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...


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic