myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-2137) JSF 2.0 Component Tree Visiting
Date Thu, 24 Sep 2009 03:30:05 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-2137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758990#action_12758990
] 

Leonardo Uribe commented on MYFACES-2137:
-----------------------------------------

I have some comments about the patch:

- We need to traverse facets and facets inside child components only once. Take a look at
UIData.invokeOnComponent, you will see that facets are traverse only once with rowIndex=-1
(no row selected)
- Spec says: "Let rowsToProcess be the return from getRows().", but a result of 0 from getRows()
means all rows. In that case should rowsToProcess be getRowCount()? No.  The difference is
that getRows() means the max rows to be displayed. That is because it is not necessary to
traverse all rows when we only expect to traverse the rows we are going to display. note that
we call isRowAvailable() to check if the row exists or not.
- Spec says: "Let rowIndex be the return from getFirst() - 1.", but then you would start the
iteration with a rowIndex of -1 (if getFirst() returns 0) and you would end one row to early.
For example you have 3 rows 0, 1 and 2, so visitTree would visit the rows -1, 0 and 1. So
why should we start at getFirst() - 1? The intention is traverse all rows that exists. Maybe
this is a detail on the algorithm used by ri, so we can ignore this part while we maintain
the intention of the algorithm (but see comment below).
- Note that UIColum instances should be traverse only once (with rowIndex=-1), because traverse
them per row just does not have sense. Also in my opinion, does not have sense how the algorithm
works with facets of children component. Maybe it is a good idea to send a mail to jsr-314-comments
at jcp.org saying this javadoc is not very clear (specially the last two points).



> JSF 2.0 Component Tree Visiting
> -------------------------------
>
>                 Key: MYFACES-2137
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2137
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: JSR-314
>    Affects Versions: 2.0.0-alpha
>            Reporter: Matthias We├čendorf
>         Attachments: uidata_visit_tree.patch
>
>
> The Tree Visiting, part of jsf2.0, was already added to Trinidad 1.2.x to improve things.

> We just need to add the api/impl from that patch, to this project.
> see TRINIDAD-1368 for more.

-- 
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