So please if anyone has a solution to my problem, I am very interested ( if I need to clarify something please ask as well).
Micke
On 08/06/06, Mikael Andersson <[EMAIL PROTECTED]> wrote:
Hi,
I am quite new to JSF and don't quite know how to sort out the following.
I have a page with quite a lot of forms (unholy mix of input and select fields), the backing bean has a Spring managed object containing a all the data that populates the form fields. I have several different beans defined for that Spring managed object depending on which predefiend form field values to display.
What I am trying to do is having a selectOneMeny to choose between predefined values for the form fields, and by selecting one have a ValueChangeEvent created which sets the Spring managed object to the specified one. My problem is that the even though the object populating the form fields change the form values doesn't change. ( submitting the form the moment a selection is done, )
I know that the proper object is being set, printing its toString().
I guess this is related to the lifecylcle and the fact that apply request values phase isn't executed?
Code for ValueChangeEvent :
public void loadCannedQuery(ValueChangeEvent e) throws AbortProcessingException {
log.info("In ValueChanged handler: loadCannedQuery");
UIComponent comp = e.getComponent( );
cannedQuery = (String)e.getNewValue();
loadCannedQuery();
//Skipp validations...
ctx.renderResponse();
}
Is there some other way of by passing the validations besides calling renderResponse() ?
Read about the valueChangeNotifier in the sandbox, but I am using Facelets and that tag doesn't seem to work with Faclets currently.
Hope the above makes sense :)
Thanks
- Micke

