File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Problem with submit() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with submit()" Watch "Problem with submit()" New topic
Author

Problem with submit()

Ian Dunsirn
Ranch Hand

Joined: May 25, 2006
Posts: 36
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

Joined: May 25, 2006
Posts: 36
I forgot to add that the method specified in the ValueChagneListener is not getting invoked.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with submit()