I'm not sure what you mean by "the varStatus's index". You currently use var="bobjectList". This would be better named: var="bobject" as the var is set to each element of the table's "value" list in turn, ie refers to an element from the bobjectList, not the entire list. However the var does seem to be used ok.
The fact that this is a session-scoped bean does remove a lot of potential failures here (although session-scoped vars have lots of problems of their own). Is the bobjectList a normal ArrayList or LinkedList, or is it something special? Are you sure that it is failing on the zeroth element during postback? Maybe element zero is ok, but some other later element is failing. Adding some logging statements would again be useful here.. To be honest, if I were a gambler, I would give odds of 20:1 that this *is* a problem in your code. Though it isn't an obvious one... Regards, Simon Butash, Bob schrieb: > > Simon, > > Thanks for the quick response however, the object is a session scoped > managed bean. So it would still be available. > > When I changed the code to > manageAdminAobject.bobjectList[0].eobject.value the code worked, however > when I tried to set up the varStatus's index to replace the hard coded 0 > it failed. > > Thanks, > > Bob > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 22, 2008 11:28 AM > To: MyFaces Discussion > Subject: Re: Referencing Complex Objects inside a table > > My guess would be that you have everything set up correctly for render. > But that on postback your bobject list contains uninitialised objects. > Primitive values on it will be reassigned from the posted data so maybe > you didn't notice. > > Is your manageAdminAobject in request scope? > > I have not heard of any EL bug that correctly resolves expressions > during render phase, but fails during postback phase. > > Regards, > Simon > > Butash, Bob schrieb: > >> Hello, >> >> I'm in need of some assistance. I have a complex object hierarchy >> that I'm trying to create a JSF view for. I have simplified it to the >> > > >> point where I still get the error. Here is the setup: >> >> Aobject that contains a list of Bobjects. Bobject contains an Eobject >> > > >> and then Eobject has a value attribute. >> >> Here is what I was trying to do in the jspx, note I am using Trinidad >> with facelets: >> >> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" >> xmlns:ui="http://java.sun.com/jsf/facelets" >> xmlns:h="http://java.sun.com/jsf/html" >> xmlns:f="http://java.sun.com/jsf/core" >> xmlns:tr="http://myfaces.apache.org/trinidad"> >> <ui:composition template="/view/template.jspx"> >> <ui:define name="content"> >> <h:form> >> <tr:panelHeader >> >> >> > text="#{messages['com.eds.employeetracker.entity.admin.Aobject.search.he > ader']}" > >> messageType="none" /> >> <tr:panelHorizontalLayout >> > halign="left"> > >> <tr:panelFormLayout> >> <tr:panelBox >> background="transparent" inlineStyle="width: 100%;"> >> >> <tr:panelHeader >> >> >> > text="#{messages['com.eds.employeetracker.entity.admin.Aobject.label']}" > >> /> >> >> <tr:inputText >> >> >> > label="#{messages['com.eds.employeetracker.entity.admin.Zobject.zvalue.l > abel']}" > >> >> value="#{manageAdminAobject.zvalue}" /> >> <tr:inputText >> >> >> > label="#{messages['com.eds.employeetracker.entity.admin.Aobject.avalue.l > abel']}" > >> >> value="#{manageAdminAobject.avalue}" /> >> <tr:table >> id="bobjectListTable" >> >> value="#{manageAdminAobject.bobjectList}" var="bobjectList"> >> >> >> <tr:column >> >> >> headerText="#{messages['com.eds.employeetracker.entity.admin.Eobject.e >> value.label']}"> >> >> >> <tr:inputText >> >> >> >> > label="#{messages['com.eds.employeetracker.entity.admin.Eobject.evalue.l > abel']}" > >> >> value="#{bobjectList.eobject.evalue}" /> >> >> >> </tr:column> >> </tr:table> >> >> <tr:panelButtonBar> >> >> <tr:commandButton text="#{messages['command.label.add']}" >> >> >> action="#{view$admin$aobjectManage.addAction}" /> >> >> >> </tr:panelButtonBar> >> </tr:panelBox> >> </tr:panelFormLayout> >> </tr:panelHorizontalLayout> >> </h:form> >> </ui:define> >> </ui:composition> >> </jsp:root> >> >> The page renders properly, however when I try to submit the page I get >> > > >> the following error: >> >> WARNING: executePhase(RENDER_RESPONSE >> 6,org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$ >> [EMAIL PROTECTED]) >> threw exception >> >> _javax.el.ELException_: /view/admin/aobjectManage.jspx @29,51 >> value="#{bobjectList.eobject.evalue}": Target Unreachable, 'eobject' >> returned null >> >> at >> org.apache.myfaces.trinidad.bean.ValueBindingValueExpression.isReadOnl >> y(_ValueBindingValueExpression.java:83_) >> >> at >> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.EditableValue >> Renderer.getReadOnly(_EditableValueRenderer.java:244_) >> >> at >> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRe >> nderer.renderAsElement(_FormElementRenderer.java:217_) >> >> at >> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAnd >> MessageRenderer.getLabelFor(_InputLabelAndMessageRenderer.java:78_) >> >> at >> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessa >> geRenderer$Label.getForId(_LabelAndMessageRenderer.java:617_) >> >> at >> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputLabelRe >> nderer.encodeAll(_OutputLabelRenderer.java:89_) >> >> at >> org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(_Core >> Renderer.java:330_) >> >> at >> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessa >> geRenderer.encodeAll(_LabelAndMessageRenderer.java:193_) >> >> at >> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAnd >> MessageRenderer.encodeAll(_InputLabelAndMessageRenderer.java:120_) >> >> As stated the page does render fine as well as I do have the Aobject's >> > > >> list of Bobjects initilized, as well as the Bobject's Eobject is >> initialized >> >> * if* (manageAdminAobject.getId() ==* null*) >> { >> manageAdminAobject.getBobjectList().add( >> * new* >> com.eds.employeetracker.entity.admin.Bobject()); >> manageAdminAobject.getBobjectList().get(0).setEobject( >> * new* >> com.eds.employeetracker.entity.admin.Eobject()); >> setManagedBean("manageAdminAobject", >> > manageAdminAobject); > >> } >> >> It seems that it doesn't handle a complex nested objects, as there are >> > > >> no issues with any non-complex value that is directly on the Bobject. >> Has anyone else seen this behavior and is there a way around it?? >> >> Any help would be greatly appreciated as, like most people, I'm under >> a huge time crunch to get the working. >> >> Thanks, >> >> Bob >> >> > > >

