myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Herb (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (TOMAHAWK-1105) t:columns and findComponent
Date Wed, 05 Sep 2007 05:44:32 GMT
t:columns and findComponent
---------------------------

                 Key: TOMAHAWK-1105
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1105
             Project: MyFaces Tomahawk
          Issue Type: Bug
    Affects Versions: 1.1.6
            Reporter: Daniel Herb


Hi,
i've written a phaseListener to replace the validation-errors with custom-errors. To do this
I've used "viewRoot.findComponent" to get the right component for a clientId. It all worked
fine till I've used it on a page with the t:columns-tag. After some debugging I found out
the following:

Assume that the id which we are searching looks like this:
mainBody:mainForm:mainTable:0:columns:0_0:componentId

The findComponent-method is called recursive:
mainBody:mainForm:mainTable:0:columns:0_0:componentId
- Search for Id "mainBody" => found

mainForm:mainTable:0:columns:0_0:componentId
- Search for Id "mainForm" => found

mainTable:0:columns:0_0:componentId
- Search for Id "mainTable" => found
- The following "0" is the rowindex of the component so the findComponent-Method was overwritten
by the HtmlDataTable to remove this also from the id and use it as index.
- Returned is an object from the type "UIComponentPerspective" which points at the correct
row and delegate all methods to the child-component

columns:0_0:componentId
- Search for Id "columns" => found
- The following "0_0" is the row and column information which should be replaced by an overwritten
version of findComponent from HtmlColumns but there is' no overwritten method.

0_0:componentId
- Search for Id "0_0" => not found!
- Because the columns-tag didn't removed the row and column information the next recursive
call is to find an id "0_0" which can't exists.



I think the findComponent-Method of HtmlColumns should work like that one from dataTable and
return an UIComponentPerspective-object

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


Mime
View raw message