File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with submit()

 
Ian Dunsirn
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • 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">
<hutputText 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">
<hutputText value="Action"/>
</f:facet>
<hutputText 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">
<hutputText value="Field Value"/>
</f:facet>
<hutputText 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">
<hutputText value="Display Order"/>
</f:facet>
<h:inputText id="displayOrder" value="#{fieldList.displayOrder}" size="2"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="Created By"/>
</f:facet>
<hutputText value="#{fieldList.createdBy}"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="Created On"/>
</f:facet>
<hutputText value="#{fieldList.createdTime}"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="Updated By"/>
</f:facet>
<hutputText value="#{fieldList.updatedBy}"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="Updated On"/>
</f:facet>
<hutputText 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I forgot to add that the method specified in the ValueChagneListener is not getting invoked.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic