This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread 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 Murach's Java Servlets and JSP this week in the Servlets 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: 15951
    
  19

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.
 
jQuery in Action, 2nd edition
 
subject: Use binding and value fields at same time.
 
Similar Threads
WA #1.....word association
Is there a way to have "calculated field"
Chapter 6 - HF study group
EJB3 webservice required param annotation?
why do i get TreeSet RuntimeException with my code?