You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Kuhn (JIRA)" <de...@myfaces.apache.org> on 2006/09/21 08:42:22 UTC

[jira] Created: (MYFACES-1417) Error of css styling of h:dataTable -> h:column when rendered attribute is used and the number of columns rendered depends on logical criteria

Error of css styling of h:dataTable ->  h:column when rendered attribute is used and the number of columns rendered depends on logical criteria
-----------------------------------------------------------------------------------------------------------------------------------------------

                 Key: MYFACES-1417
                 URL: http://issues.apache.org/jira/browse/MYFACES-1417
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.1.4
         Environment: I used MyFaces Core 1.1.4 and the Tomahawk Snapshot 1.1.5 (20th September 2006)
            Reporter: Martin Kuhn


I've table with 9 colums. When a special condition is true I want to display only 8 columns. (the 4th column should be hidden). This "magic" is realized with <t:column rendered="{#backingBean.condition}" ..>

For the style of the columns I use the columnClasses attribute of the  datatable. Because of the variable number of the column's I serve the columnClasses attribute with a backing bean <h:dataTable  columnClasses="#{backingBean.columnClasses}" .../>

When the number of the columns is equal to the maximum numbers the styling  is o.k. (every column got the right class attribute value).
When the number of columns is less than the maximum numbers the styling of  the columns is wrong. (The column style attribute is wrong )

I checked the return value of the backing bean for the columnClasses attribute and the value is o.k.

I got this values for the columnClasses Attributte  when I have to render 9 columns:
 tableSelectionColumn,tarifBezeichnung,date,standardTableColumnCentered,standardTableColumnCentered,standardTableColumnCentered,tarifKurzBez,praemie,standardTableColumnCentered

when I have to render 8 columns:
 tableSelectionColumn,tarifBezeichnung,date,standardTableColumnCentered,standardTableColumnCentered,tarifKurzBez,praemie,standardTableColumnCentered


I the case when only 8 columns should be rendered for example the 6th column
 is rendered with the class praemie. But this class is on 7th position in the columnClasses value.

And the same code worked with version 1.1.1 correct. 


I've a little example which shows this bug

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MYFACES-1417) Error of css styling of h:dataTable -> h:column when rendered attribute is used and the number of columns rendered depends on logical criteria

Posted by "Stanislas RENAN (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529045 ] 

Stanislas RENAN commented on MYFACES-1417:
------------------------------------------

workaround : use JSTL tags

			<c:choose>
				<c:when test="${myCondition}">
					<c:set var="columnClassesForDataTable" value=",,chiffres,chiffres,chiffres,chiffres,chiffres,,,,,,," />
				</c:when>
				<c:otherwise>
					<c:set var="columnClassesForDataTable" value=",,chiffres,chiffres,,,,,," />
				</c:otherwise>
			</c:choose>

and use it in your dataTable :

columnClasses="#{columnClassesForDataTable}"


> Error of css styling of h:dataTable ->  h:column when rendered attribute is used and the number of columns rendered depends on logical criteria
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1417
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1417
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.4
>         Environment: I used MyFaces Core 1.1.4 and the Tomahawk Snapshot 1.1.5 (20th September 2006)
>            Reporter: Martin Kuhn
>         Attachments: JSFErrorTest.zip
>
>
> I've table with 9 colums. When a special condition is true I want to display only 8 columns. (the 4th column should be hidden). This "magic" is realized with <t:column rendered="{#backingBean.condition}" ..>
> For the style of the columns I use the columnClasses attribute of the  datatable. Because of the variable number of the column's I serve the columnClasses attribute with a backing bean <h:dataTable  columnClasses="#{backingBean.columnClasses}" .../>
> When the number of the columns is equal to the maximum numbers the styling  is o.k. (every column got the right class attribute value).
> When the number of columns is less than the maximum numbers the styling of  the columns is wrong. (The column style attribute is wrong )
> I checked the return value of the backing bean for the columnClasses attribute and the value is o.k.
> I got this values for the columnClasses Attributte  when I have to render 9 columns:
>  tableSelectionColumn,tarifBezeichnung,date,standardTableColumnCentered,standardTableColumnCentered,standardTableColumnCentered,tarifKurzBez,praemie,standardTableColumnCentered
> when I have to render 8 columns:
>  tableSelectionColumn,tarifBezeichnung,date,standardTableColumnCentered,standardTableColumnCentered,tarifKurzBez,praemie,standardTableColumnCentered
> I the case when only 8 columns should be rendered for example the 6th column
>  is rendered with the class praemie. But this class is on 7th position in the columnClasses value.
> And the same code worked with version 1.1.1 correct. 
> I've a little example which shows this bug

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