You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Srikanth Madarapu <sr...@senior-systems.com> on 2005/03/07 20:35:37 UTC

rendered attribute

There is a problem when I am using the dataTable variable for the rendered attribute. I am getting the following error.

Mar 7, 2005 2:26:59 PM net.sourceforge.myfaces.el.VariableResolverImpl resolveVariable
SEVERE: Variable 'address' could not be resolved.

The var "address" is being used in the rendered attribute.  The array otherPhones is guaranteed to have non-null entries. The attribute phoneType could be null. But irrespective of whether it is null or not I am getting the above error. Functionally every thing works fine, I just want to get rid of these error messages.

My dataTable looks like below

				<h:dataTable id="tblAddresses"
				                   value="#{manageProfileFace.addressHelper.addressesModel}"
				                   var="address">
                            <h:column>
                                <h:panelGrid columns="2" id="addrColumn">
                                    <h:outputText value="Telephone #:" />
                                    <seniorfaces:outputText value="#{address.phoneNumber}" />
                                    <h:outputText value="Fax #:" />
                                    <seniorfaces:outputText value="#{address.faxNumber}" />
                                    <h:outputText value="#{address.otherPhones[0].phoneType}:" rendered="#{!empty address.otherPhones[0].phoneType}"/>
                                    <seniorfaces:outputText value="#{address.otherPhones[0].phoneNumber}" rendered="#{!empty address.otherPhones[0].phoneType}" />
                                    <h:outputText value="#{address.otherPhones[1].phoneType}:" rendered="#{!empty address.otherPhones[1].phoneType}" />
                                    <seniorfaces:outputText value="#{address.otherPhones[1].phoneNumber}" rendered="#{!empty address.otherPhones[1].phoneType}" />
                                    <h:outputText value="#{address.otherPhones[2].phoneType}:" rendered="#{!empty address.otherPhones[2].phoneType}" />
                                    <seniorfaces:outputText value="#{address.otherPhones[2].phoneNumber}" rendered="#{!empty address.otherPhones[2].phoneType}" />
                                    <h:outputText value="#{address.otherPhones[3].phoneType}:" rendered="#{!empty address.otherPhones[3].phoneType}" />
                                    <seniorfaces:outputText value="#{address.otherPhones[3].phoneNumber}" rendered="#{!empty address.otherPhones[3].phoneType}" />
                                    <h:outputText value="Email 1:" rendered="#{!empty address.emails[0]}" />
                                    <seniorfaces:outputText value="#{address.emails[0]}" rendered="#{!empty address.emails[0]}"/>
                                    <h:outputText value="Email 2:" rendered="#{!empty address.emails[1]}"/>
                                    <seniorfaces:outputText value="#{address.emails[1]}" rendered="#{!empty address.emails[1]}"/>
                                </h:panelGrid>
                            </h:column>
                        </h:dataTable>

TIA
-Srikanth Madarapu