[
https://issues.apache.org/jira/browse/MYFACES-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755871#action_12755871
]
Leonardo Uribe commented on MYFACES-2282:
-----------------------------------------
I have checked the patch and it looks good, but we need to address several
points first before commit it:
- Use a HashSet<Integer> is expensive. The code that render components needs to
be executed many times, and create a HashSet<Integer> with many slots per
request is not a good idea. Also, it is not really necessary, because we can
expect few elements, so we can iterate directly. I think we can use an
alternative, like StringUtils.trim(StringUtils.splitShortString(bodyRows,
',')). See how rowClasses and columnClasses works.
- In HtmlTableRendererBase, the body is rendered with an id using this:
writer.writeAttribute(HTML.ID_ATTR,
component.getClientId(facesContext)+":tbody_element", null);
but on encodeInnerHtml, it is added an number related to the current bodyrow.
We should prevent changes on ids, because client javascript code that relies on
this id will cause problems to users. The solution is render the first one as
original (including when there are no rows) and then add an number like it was
proposed.
- Fortunately, this code will not cause problems with tomahawk t:dataTable
renderer, because for render <tbody> sections it relies on parent renderer, but
it is a good practice to keep an eye on side effects caused by changes in
shared. Tomahawk for 2.0 branch has not started yet, but I suppose (an I want
to) it will be created in the future, so we just have to keep an eye on it.
> h:dataTable and h:panelGrid should implement bodyrows behavior (tbody
> encapsulation)
> ------------------------------------------------------------------------------------
>
> Key: MYFACES-2282
> URL: https://issues.apache.org/jira/browse/MYFACES-2282
> Project: MyFaces Core
> Issue Type: Task
> Components: JSR-314
> Reporter: Leonardo Uribe
> Attachments: bodyrows.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.