Identifier is nulll, sometimes, when used with s:button
pdpantages Aug 31, 2009 8:19 PMHello Forum,
I am using:
jboss_version=5.0.1.GA
seam_version=2.1.2.GA
richfaces_version=3.3.1.GA
I have an s:button I want to use in a facelet included with a ui:include statement.
I had prototyped some code in a single (big) file and everything is working as expected.
I moved some of the code to an includable file (facelet), which I pull in with ui:include, and assign a few parameters.
No changes to any of the server side beans (java code) were made when this was done.
What I find is that my s:button no longer works. The tablebean (see below) is NULL in the action parameter. But it is NOT NULL when used in the value or the poller (see below).
My question is: why? I don't get how an expression can evaluate to null when the same expession two lines earlier was OK....
I tried switching the s:button for s:link, a4j:commandButton a4j:commandLink; no change in behaviour.
Does anyone have any ideas ? Anything will be appreciated......
The facelet is included like so. The "endPointPm" assigned to param tablebean is an SFSB in seam conversation scope.
<a4j:repeat value="#{pmd.pmParms}" var="pmp" rowKeyVar="rkv1"> <ui:include src="/view/utils/pm/pmlive.xhtml"> <ui:param name="panelId" value="PL_#{rkv0}_#{rkv1}"/> <ui:param name="rkprefix" value="L_"/> <ui:param name="tablebean" value="#{endPointPm}"/> <ui:param name="pmp" value="#{pmp}"/> <ui:param name="rkv0" value="#{rkv0}"/> <ui:param name="rkv1" value="#{rkv1}"/> <ui:param name="interval" value="4000"/> </ui:include> </a4j:repeat>
Inside the included file, I use an s:button like so:
<s:button value="Full #{tablebean.profile}" title="Full" action="#{tablebean.showFsLive}"> <f:param name="id" value="#{pmp.id}"/> <a4j:support event="onclick" reRender="mainPanel,livePanel,histPanel,singlePanel" eventsQueue="ajaxQueue"/> </s:button>
Note the #{tablebean.profile} in the value. I just did this to verify that the tablebean is not null (the complaint in the exception).
When I press the button I get this:
javax.el.PropertyNotFoundException: Target Unreachable, identifier 'tablebean' resolved to null at org.jboss.el.parser.AstValue.getTarget(AstValue.java:38) at org.jboss.el.parser.AstValue.invoke(AstValue.java:95) at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:175) at org.jboss.seam.navigation.Pages.callAction(Pages.java:692) at org.jboss.seam.navigation.Pages.preRender(Pages.java:330) at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:561) at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:472) at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:148) at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118) at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
This poller references tablebean w/o problems:
<a4j:region renderRegionOnly="false"> <a4j:poll interval="#{interval}" enabled="true" status="pollingStatus" data="#{tablebean.liveNewvalJSON}" oncomplete="#{rkprefix}#{rkv0}_#{rkv1}_UpdateJSON(data)" eventsQueue="ajaxQueue"> <f:param name="id" value="#{pmp.id}"/> </a4j:poll> </a4j:region>