myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Reeder <>
Subject How can I get component from tree and set the bound values
Date Fri, 21 Oct 2005 17:36:12 GMT
I am working on some ajax form components and I am trying to do the

1. Request with the componentId, viewId, value.
2. Get that particular component from the specified viewId
3. Get the bound value of the component and set it's value to "value".

But I cannot seem to get the component, when I try this:

FacesContext context = FacesContext.getCurrentInstance();
ViewHandler viewHandler = context.getApplication().getViewHandler();
UIViewRoot viewRoot = viewHandler.restoreView(context, viewId);
if(viewRoot == null){
viewRoot = viewHandler.createView(context, viewId);

viewRoot always seems to be null on restoreView and on createView, it has no

Any ideas? Am I going about this the wrong way??

View raw message