voyent
Table not Updating  XML
Forum Index -> Portals & Portlets
Author Message
Tracker09

Joined: 12/May/2008 00:00:00
Messages: 14
Offline


I'm not sure if this is because the application is in a portlet or not but I'm posting here because it is. I have selectOneMenu item defined as follows on my page.

<ice:selectOneMenu immediate="true" value="#{SessionBean1.currentCodeType}" id="codeTypeDDList" style="width: 144px" partialSubmit="true" valueChangeListener="#{CodeLists.codeTypeDDList_processValueChange}">
<f:selectItems id="codeTypeDDListItems" value="#{SessionBean1.options}"/>
</ice:selectOneMenu>

When the event is fired, the underlying data in the following table is changed. However, when I run the app. The data is not updated on the table. When I make a subsequent selection on the dropdown, the data that should have been displayed is shown. So it is then one state behind where it should be. Doing a browser refresh on the page also gets it into the the right state. How can I get the table to update when it should?

<ice:dataTable augmentTitle="false"
id="table2"
rows="20"
style="width: 933px" title="#{SessionBean1.tableTitle}" width="933"
value="#{SessionBean1.codeDataProvider.tableDisplayList}"
var="item"
partialSubmit="true" >

<ice:column>
<ice:selectBooleanCheckbox rendered="#{SessionBean1.CBVisible}" value="#{item.selected}"/>
</ice:column>

<ice:column headerText="Code" id="column2" width="48">
<f:facet name="header">
<ice:outputText value="Code"/>
</f:facet>
<ice:outputText id="outputText1" style="#{CodeLists.nameStyle}" value="#{item.code}"/>
</ice:column>
<ice:column headerText="Type" id="column14">
<f:facet name="header">
<ice:outputText value="Type"/>
</f:facet>
<ice:outputText id="outputText13" style="#{CodeLists.nameStyle}" value="#{item.type}"/>
</ice:column>
</ice:dataTable>
Tracker09

Joined: 12/May/2008 00:00:00
Messages: 14
Offline


Figured this out for anyone with the same issue. As it turns out, when a dropdown box value is changed, and the value of it is bound to a session bean variable, this value is not updated until after the listener has completed. Therefore, you are better off using the event and getting the new value as opposed to using that value binding if you are wishing to utilize the selected value as I was. This is a departure from the Woodstock way of doing it but does make sense.
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team