File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes JSF + Tomahawk + subform Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF + Tomahawk + subform" Watch "JSF + Tomahawk + subform" New topic

JSF + Tomahawk + subform

Adolfo Eloy
Ranch Hand

Joined: Mar 21, 2009
Posts: 146


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...


Adolfo Eloy
Software Developer
I agree. Here's the link:
subject: JSF + Tomahawk + subform
It's not a secret anymore!