[TRINIDAD]Tree table does not show correct bindings.
----------------------------------------------------

                 Key: TRINIDAD-1165
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1165
             Project: MyFaces Trinidad
          Issue Type: Improvement
          Components: Components
    Affects Versions:  1.2.8-core
         Environment: Apache Trinidad 1.2.8, Jboss 4.2.1-GA
            Reporter: Dushyant Agarwal
             Fix For:  1.2.8-core


Hi,
I have a JSF page,that contains a tree table that shows data arriving from 
database via EJB.

The number columns of the tree table is dynamic. They get created at the time 
the page is just about to be rendered at the  After render response  phase 
event.

Now the <nodeStamp >facet of the tree table contains a column containing 
inputText whose readInly has been st as true in the jsp. Rest of the columns 
get created dynamically. These other columns contain  editable  inputTexts. 
Their programmatically provided value binding using the setValueExpression() 
method of CoreInputText class.

Now there is a radio button in the page whose auto submit is set to true. The 
valueChange Listener method attached to it does the following:
1.Delete all the columns of tree table: using the following code
            for(int i=0i<treeTable.getChildren.size();i++){
              i=-1;
             treeTable.getChildren.remove(treeTable.getChildren.size()-1;
}
2. Calls a method on the EJB to get a list of objects from the Database. Based 
on this new columns are instantiated,new inputTexts are created,Their 
valueBindings are provided and added to the columns. Then the columns are added 
to the table.

Now on changing the value of the radio buttons I talked about earlier, the 
value of the tree tables columns does get changed. But the value of the column 
in the nodeStamp facet also changes. On debugging I found that the value 
binding of that column's inputTexts had become equal to the last column's  
inputTexts'binding that appeared in the previous view.i.e.the view that had 
appeared before clicking on the radio button.

I tried removing the jsp code of node stamp and then creating it afresh from 
the backing bean.This included removing the children of the node stamp column 
every time.
But I just could not get the valueBinding right.

Now is there any explanation as to how the columns should be removed so that 
the value bindings also get removed safely. Where can I make changes to secure 
the error?

Thanks,
Dushyant

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to