This content has been marked as final.
Show 3 replies
-
1. Re: variable resolver not working?
norman.richards Dec 13, 2006 11:39 AM (in response to supert24)A component is not a variable, so the variable resolver won't work. You are on the right track with findComponent, but your component id is actually not "datMod". If there is a surrounding naming component (like h:form) your name will be prefixed with that. So, if your form is "id="myform" then you need to look up "myform:datMod". If you have any other naming components, you can take those into consideration too.
-
2. Re: variable resolver not working?
norman.richards Dec 13, 2006 11:40 AM (in response to supert24)Oh, I should add that if you aren't sure of the name, a quick solution is to take a look at the generated HTML. Search for "datMod" and see how it is being used.
-
3. Re: variable resolver not working?
supert24 Dec 13, 2006 12:54 PM (in response to supert24)"norman.richards@jboss.com" wrote:
Oh, I should add that if you aren't sure of the name, a quick solution is to take a look at the generated HTML. Search for "datMod" and see how it is being used.
Well ok I see my "formId:datMod" and the "formId" itself.
My general problem now is, that findComponent() always return null.
Is it really normal, thatjavax.faces.context.FacesContext .getCurrentInstance().getViewRoot().getChildCount()
returns 0 ?
By the way, javax.faces.context.FacesContext is not found by using standard Seam libs, so I added lib/myfaces-api-1.1.4.jar from the Seam install dir to my class path, hope this not caused the ill functioning.
Thanks