There is a problem having the mapping variable for an input text box as part of the Value object which is part of the backing bean. The page does not get submitted on clicking the submit button. Instead the same page gets refreshed.
The jsf code for the input text box is as follows
<t:inputText id=”confirm” value = “#{backing bean.valueobject.inputtext}”></t:inputText>
But when I have the mapping variable ‘inputtext ’ as part of the backing bean it works fine.
The question is - Can’t we have the mapping variable for an input field as a part of the value object which is a part of the backing bean.
Remko Strating
Ranch Hand
Joined: Dec 28, 2006
Posts: 893
posted
0
it could work if you have a method in your backingbean like
getValueobject() which returns the Valueobject
Within the valueobject you need to have a method like
Shasi Mitra wrote:Instead the same page gets refreshed.
Have you read the appserver logs? The answer should be in there. In case of JSF 1.1 or older, add a <h:messages> to the page to get notified of any uncaught validation and conversion errors.
My cents on that your bean is request scoped and that you didn't preinstantiate the reference behind the 'valueobject' property.