[richfaces-issues] [JBoss JIRA] Commented: (RF-11133) breakRowBefore should be processed even on columns that are not rendered

Val Blant (JIRA) jira-events at lists.jboss.org
Fri Jul 15 08:44:24 EDT 2011


    [ https://issues.jboss.org/browse/RF-11133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614406#comment-12614406 ] 

Val Blant commented on RF-11133:
--------------------------------

Here is the workaround/patch:

{code}
public class FixedColumnGroupRenderer extends ColumnGroupRenderer {

	@Override
	public void encodeRow(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
        RowHolder rowHolder = (RowHolder) holder;

        AbstractColumnGroup row = (AbstractColumnGroup)rowHolder.getRow();
        rowHolder.setRowStart(true);
        
        Iterator<UIComponent> components = row.columns();
        int columnNumber = 0;
        boolean breakRowPending = false;
        while(components.hasNext()){
            UIColumn column = (UIColumn)components.next();
            if(column.isRendered()) {
                column.getAttributes().put(COLUMN_CLASS, getColumnClass(rowHolder, columnNumber));
                
                // Check if we need to carry forward a row break from a
                // previous unreandered column
                //
                if ( breakRowPending ) {
                	breakRowPending = false;
                    column.getAttributes().put(BREAK_ROW_BEFORE, Boolean.TRUE);
                }
                encodeColumn(facesContext,  writer, column, rowHolder);
                columnNumber++;
            }
            else {
                if (Boolean.TRUE.equals(column.getAttributes().get(BREAK_ROW_BEFORE)) && rowHolder.getProcessCell() != 0) {
                    breakRowPending = true;
                }
            }
        }
    }  
}
{code}

> breakRowBefore should be processed even on columns that are not rendered
> ------------------------------------------------------------------------
>
>                 Key: RF-11133
>                 URL: https://issues.jboss.org/browse/RF-11133
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tables
>    Affects Versions: 4.0.0.Final
>            Reporter: Val Blant
>              Labels: dataTable
>
> _<rich:column breakRowBefore />_ should start a new table row even if the column is not rendered, since it has an effect on all following columns.
> This is how it worked in RF3.

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