• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Problem with submit()

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ian Dunsirn
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot to add that the method specified in the ValueChagneListener is not getting invoked.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my use of the exact same thing I use

"submit()" instead of "this.form.submit()"

Not sure if it makes any difference.

Also can you post you code that is supposed to be called?

Thanks

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic