voyent
Wrong event occurs in the selectBooleanCheckbox  XML
Forum Index -> Portals & Portlets
Author Message
yurbar2

Joined: 05/Jun/2007 00:00:00
Messages: 16
Offline


I am using dataTable component to show table with tasks depending on user in
the selectOneMenu component.

Each row of the table include checkbox, which can be used to change completed field in the
task DB table.

The problem is in the valueChangeListener. This event occurs not only when
I clicked on the checkbox, but in the other case too.

Steps to reproduce:

1. Choose some user from selectOneMenu component
2. ?lick checkbox
3. valueChange event is occured and completeTask method of the back end TaskBean class
is invoked.
3. Check that completed value was changed in DB.
4. Navigate to another page of the portal and then return back to this page.
5. Table shows the tasks belonged to the first user.
6. Select the user, where I changed the checkbox
7. ValueChange event occurs and completeTask method of the TaskBean class was invoked with
inverse value.


I though that maybe incorrect event occurs because all checkboxes have the same id, but
when I tried to set different ids to all checkbox problem didn't disappeared.

Summary: Wrong event occurs.

Evironment: JBoss Portal 2.6, ICEFaces 1.6, IE


Code fragment:
Code:
             <ice:selectOneMenu
                     value="#{tasksBean.userIdFilter}"
                     valueChangeListener="#{tasksBean.userChanged}"
                     partialSubmit="true">
                 <f:selectItems value="#{tasksBean.usersSelectItems}" />
                 <f:converter converterId="javax.faces.Long"/>
 
             </ice:selectOneMenu>
 
             <ice:dataTable rows="10" id="tasksBean" value="#{tasksBean.tasks}" var="item" >
 
                 <ice:column >
                     <f:facet name="header">
                         <ice:outputText value="ID"/>
                     </f:facet>
                     <ice:selectBooleanCheckbox id="#{taskBean.uniqueId}" partialSubmit="true" valueChangeListener="#{tasksBean.completeTask}" value="#{item.completed}"/>
                     <ice:outputText value="#{item.taskID}" visible="true" />
                 </ice:column>
 .
 .
 .
 .
 



ICE developers, could you please describe me, what happens?
Thanks in advance.
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team