I am working on some ajax form components and I am trying to do the following:
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 children.
Any ideas? Am I going about this the wrong way??
Travis
- How can I get component from tree and set the bound values Travis Reeder
