Greetings,
I have made a custom component using myfaces 1.0.9. Everything worked fine to start with, and i was able to bind values of the component to the back end managed bean. At least there was no problem in retrieving values from the bean. The trouble occurs when the vlaue changes from the front. According to the binding principles the value should be set at the back end bean. but the setter is never called.
Should the value setting take place in the decode method ?
My decode method is as follows :
public void decode( FacesContext context )
{
Map requestMap = context.getExternalContext().getRequestParameterMap();
String clientId = getClientId( context );
{
Map requestMap = context.getExternalContext().getRequestParameterMap();
String clientId = getClientId( context );
try
{
String dateFrom = requestMap.get( clientId + DATE_FROM ).toString() ;
setSubmittedValue( dateFrom );
{
String dateFrom = requestMap.get( clientId + DATE_FROM ).toString() ;
setSubmittedValue( dateFrom );
setValid( true );
}
catch( NumberFormatException ex )
{
ex.printStackTrace();
setSubmittedValue( (String)requestMap.get(clientId + DATE_FROM) );
}
}
catch( NumberFormatException ex )
{
ex.printStackTrace();
setSubmittedValue( (String)requestMap.get(clientId + DATE_FROM) );
}
}
What is the specific function of the setSubmittedVal
ue ? as
in if i have more than 1 inputs in my encode method which ones value would be set when decode is called ?
I can get the new values from the front using getSubmittedValue but the value is never propagated to the bean.
Any help would be much appreciated.
regards,
a newbie to jsf
Yahoo! DSL Something to write home about. Just $16.99/mo. or less

