posted 17 years ago
I am trying to solve a problem I am having with a page. This page has a dataTable and a selectOneListbox and I want to be able to populate the dataTable base d on the selection in the listbox. When I first enter the page, everything works fine, but when I change the listbox value, I get the error "Error getting property 'inUse' from bean of type edu.msu.ais.e9000.web.bean.prjmgmt.UISelectionFieldList"
The code is:
<h:panelGrid columns="2">
<h:outputText value="Field Name: "/>
<h:selectOneListbox id="uiSelectionField" size="1" value="#{passData.passName}"
valueChangeListener="#{projectListener.listuiSelections}" onchange="this.form.submit()" immediate="true">
<f:selectItem itemValue="IssueStatus" itemLabel="Status"/>
<f:selectItem itemValue="IssueEnvironment" itemLabel="Environment"/>
<f:selectItem itemValue="IssuePriority" itemLabel="Priority"/>
<f:selectItem itemValue="IssueRelease" itemLabel="Release"/>
<f:selectItem itemValue="IssueType" itemLabel="Issue Type"/>
<f:selectItem itemValue="IssueFunction" itemLabel="Function"/>
<f:selectItem itemValue="IssueModule" itemLabel="Module"/>
</h:selectOneListbox>
</h:panelGrid>
<h:dataTable value="#{uiSelFieldList}" headerClass="tableHeader" var="fieldList">
<h:column>
<f:facet name="header">
<h:outputText value="Action"/>
</f:facet>
<h:outputText value="In Use" rendered="#{fieldList.inUse == true}"/>
<h:commandButton image="images/DeleteButton.gif"
rendered="#{fieldList.systemDefined == false && fieldList.inUse == false}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Field Value"/>
</f:facet>
<h:outputText value="#{fieldList.issueStatus}"
rendered="#{fieldList.systemDefined == true && uiSelType.uiSelectionType.uiSelectionClass == 'IssueStatus'}"/>
<h:inputText value="#{fieldList.issueStatus}"
rendered="#{fieldList.systemDefined == false && uiSelType.uiSelectionType.uiSelectionClass == 'IssueStatus'}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Display Order"/>
</f:facet>
<h:inputText id="displayOrder" value="#{fieldList.displayOrder}" size="2"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Created By"/>
</f:facet>
<h:outputText value="#{fieldList.createdBy}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Created On"/>
</f:facet>
<h:outputText value="#{fieldList.createdTime}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Updated By"/>
</f:facet>
<h:outputText value="#{fieldList.updatedBy}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Updated On"/>
</f:facet>
<h:outputText value="#{fieldList.updatedTime}"/>
</h:column>
</h:dataTable>
What has me really stumped is that if I replace
<h:dataTable value="#{uiSelFieldList}" headerClass="tableHeader" var="fieldList">
with
<h:dataTable value="#{uiSelFieldList}" headerClass="tableHeader" var="fieldList" rendered="#{uiSelType.uiSelectionType.uiSelectionClass == 'IssueStatus'}">
The page works and I don't get the error. Can anyone suggeest why this should be?