[richfaces-issues] [JBoss JIRA] Created: (RF-11083) collapsibleSubTable nesting bug

Val Blant (JIRA) jira-events at lists.jboss.org
Fri Jun 24 16:47:23 EDT 2011


collapsibleSubTable nesting bug
-------------------------------

                 Key: RF-11083
                 URL: https://issues.jboss.org/browse/RF-11083
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: component-tables
    Affects Versions: 4.0.0.Final
            Reporter: Val Blant


When I attempt to nest _<rich:collapsibleSubTable />_ s, I get an error at the top of my page that says:

{quote}
This page contains the following errors:
error on line 202 at column 74: Opening and ending tag mismatch: tbody line 0 and tr
Below is a rendering of the page up to the first error.
{quote}

The page is rendered up to the nested _<rich:collapsibleSubTable />_.

I think I found the problem in the code. 

The reason the first level of nesting works, is b/c the rendering is done by _DataTableRenderer_, which has the following code:

{code:java}
                    boolean isSubtable = (child instanceof AbstractCollapsibleSubTable);
                    // new row -> close </tr>
                    if (rowHolder.getProcessCell() != 0) {
                        encodeRowEnd(writer);
 
                        if (isSubtable) {
                            encodeTableBodyEnd(writer);
                            tbodyStart = false;
 
                            if (partialUpdate) {
                                partialEnd(facesContext);
                            }
                        }
                    }

{code}

Now, the 2nd level of nesting will be handled by _CollapsibleSubTableRenderer_, which must do similar processing:
{code:java}
                else if (component instanceof AbstractCollapsibleSubTable) {
                    if(component.isRendered()) {
                        encodeRowEnd(writer);
                    }
                    
                    component.encodeAll(facesContext);
                    rowHolder.setRowStart(true);
                }
{code}

Note that the 2nd snippet neglects to close the _<tbody>_ tag, so the error :
{quote}error on line 202 at column 74: Opening and ending tag mismatch: tbody line 0 and tr{quote}

makes sense now.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list