This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes Use binding and value fields at same time. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Use binding and value fields at same time." Watch "Use binding and value fields at same time." New topic
Author

Use binding and value fields at same time.

Luciano Assis
Greenhorn

Joined: Apr 30, 2008
Posts: 16
Hi there,

When I am using these fields together my form is posted in blank or something like that. None of my fields are passing throught the validation phase.

Any explanations?

Thank's


EDIT:

Please guys disconsider this topic.

I was getting an "offuscated exception".

It's totally normal use those two parameters together.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

It is perfectly OK to specify both binding and value at the same time. Value defines a reference to a backing bean data value property. Binding supplies a link to a backing bean UIComponent property. Two different things.

However, you almost never need to use binding. Its primary benefit is in cases where you want to dynamically alter the UIComponent tree, and that's something that should not be done for trivial reasons. Not only does it sacrifice simplicity and portability, it implies that the resulting view may be subject to radical changes in appearance, and that can confuse the users. Who generally have enough trouble even if the form looks the same all the time.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Use binding and value fields at same time.