You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Guy Bashan (JIRA)" <de...@myfaces.apache.org> on 2006/02/20 17:09:24 UTC

[jira] Created: (MYFACES-1146) Impossible to hide footer in dataTable

Impossible to hide footer in dataTable
--------------------------------------

         Key: MYFACES-1146
         URL: http://issues.apache.org/jira/browse/MYFACES-1146
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: 1.1.1    
    Reporter: Guy Bashan
    Priority: Trivial


It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
          <t:dataTable id="results" value="#{analyze.rows}" var="row"
                       width="100%" 
                       cellpadding="0" 
                       cellspacing="0" 
                       border="0"
                       styleClass="reportTable" 
                       headerClass="reportTitle"
                       footerClass="reportTableTotal"
                       rowClasses="reportRowLight,reportRowDark"
                       rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
                       rowOnMouseOut="this.className = selectedRow">
            <t:columns value="#{analyze.columnHeaders}" var="column"
                       styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
              <f:facet name="header">
                <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
              </f:facet>
              <h:outputText value="#{analyze.columnValue}" escape="false" />
              
              <f:facet name="footer">
                  <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
                  <t:htmlTag value="b">
                    <h:outputText value="#{analyze.colFooter.total}"/>
                  </t:htmlTag>
              </f:facet>            
            </t:columns>
          </t:dataTable>

I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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-1146) Impossible to hide footer in dataTable

Posted by "Guy Bashan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1146?page=comments#action_12367160 ] 

Guy Bashan commented on MYFACES-1146:
-------------------------------------

I have alreay done this workaround, but it seems to me not a neat solution. I can leave with this solution, but I think that in the long term it is preferable solving this problem with a property as you suggested.

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: MYFACES-1146
>          URL: http://issues.apache.org/jira/browse/MYFACES-1146
>      Project: MyFaces Core
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>     Reporter: Guy Bashan
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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] Resolved: (TOMAHAWK-62) Impossible to hide footer in dataTable

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-62?page=all ]
     
Mario Ivankovits resolved TOMAHAWK-62:
--------------------------------------

    Resolution: Fixed

now if all facet within the header (or footer) have rendered="false" (also throug binding) the header (or footer) wont be rendered any more

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: TOMAHAWK-62
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-62
>      Project: MyFaces Tomahawk
>         Type: Bug
>     Reporter: Guy Bashan
>     Assignee: Mario Ivankovits
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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-1146) Impossible to hide footer in dataTable

Posted by "Guy Bashan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1146?page=comments#action_12367158 ] 

Guy Bashan commented on MYFACES-1146:
-------------------------------------

This is exactly what I did (well . . .   in one of my tryings . . . .).

MyFaces still creates an empty row (footer row). This row has no values, so it is not shown in explorer, but fire fox treats empty rows differently and still shows the empty row.

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: MYFACES-1146
>          URL: http://issues.apache.org/jira/browse/MYFACES-1146
>      Project: MyFaces Core
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>     Reporter: Guy Bashan
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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-1146) Impossible to hide footer in dataTable

Posted by "Guy Bashan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1146?page=comments#action_12367162 ] 

Guy Bashan commented on MYFACES-1146:
-------------------------------------

leave -->  live   ;-)

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: MYFACES-1146
>          URL: http://issues.apache.org/jira/browse/MYFACES-1146
>      Project: MyFaces Core
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>     Reporter: Guy Bashan
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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] Closed: (MYFACES-1146) Impossible to hide footer in dataTable

Posted by "Volker Weber (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1146?page=all ]
     
Volker Weber closed MYFACES-1146:
---------------------------------

    Resolution: Invalid

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: MYFACES-1146
>          URL: http://issues.apache.org/jira/browse/MYFACES-1146
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>     Reporter: Guy Bashan
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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] Reopened: (MYFACES-1146) Impossible to hide footer in dataTable

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1146?page=all ]
     
Mario Ivankovits reopened MYFACES-1146:
---------------------------------------


Add the attributes renderHeader and renderFooter

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: MYFACES-1146
>          URL: http://issues.apache.org/jira/browse/MYFACES-1146
>      Project: MyFaces Core
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>     Reporter: Guy Bashan
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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] Closed: (TOMAHAWK-62) Impossible to hide footer in dataTable

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-62?page=all ]
     
Mario Ivankovits closed TOMAHAWK-62:
------------------------------------


> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: TOMAHAWK-62
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-62
>      Project: MyFaces Tomahawk
>         Type: Bug
>     Reporter: Guy Bashan
>     Assignee: Mario Ivankovits
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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-1146) Impossible to hide footer in dataTable

Posted by "Volker Weber (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1146?page=comments#action_12367069 ] 

Volker Weber commented on MYFACES-1146:
---------------------------------------

First: please ask such questions on users mailing list, this is not a bug.

A facet can contain only one child, so your code is not legal.

try this:

<f:facet name="footer">
    <h:panelGroup rendered="#{bean.renderFooter}"> 
        <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
        <t:htmlTag value="b">
            <h:outputText value="#{analyze.colFooter.total}"/>
        </t:htmlTag>
    </h:panelGroup> 
 </f:facet>

and use the rendered attribute of panelgroup for hiding/showing

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: MYFACES-1146
>          URL: http://issues.apache.org/jira/browse/MYFACES-1146
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>     Reporter: Guy Bashan
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

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


Re: [jira] Commented: (MYFACES-1146) Impossible to hide footer in dataTable

Posted by Martin Marinschek <ma...@gmail.com>.
Of course, this leads to additional evaluations of the rendered attribute.

Well, sounds good.

regards,

Martin

On 2/21/06, Mario Ivankovits <ma...@ops.co.at> wrote:
> Hi!
> > why not render a empty panelGroup, if so declared in the jsf source?
> > IMO it is intuitive that there *is* a empty panel rendered in your example.
> >
> So I'll check the rendered attribute of the facet child and if none of
> the facets are going to be rendered I'll suppress the footer (header) at
> all.
>
> ---
> Mario
>
> >> This might be complicated, if not impossible to do.
> >> I have to check all children of all footer facets to see if the row
> >> should be renderer or not.
> >> Think of the following (for sure untypical, just to get the point):
> >>
> >> <f:facet name="footer">
> >>     <h:panelGroup>
> >>        <h:outputLabel for="input">
> >>           <h:outputText value="abc" rendered="false"/>
> >>       </h:outputLabel>
> >>       <h:inputText id="input" rendered="false"/>
> >>     </h:panelGroup>
> >> </f:facet>
> >>
> >> We can say we take the rendered state of the first/root child of the
> >> facet tag, but this is not very intuitive, is it?
> >>
>
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: [jira] Commented: (MYFACES-1146) Impossible to hide footer in dataTable

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> why not render a empty panelGroup, if so declared in the jsf source?
> IMO it is intuitive that there *is* a empty panel rendered in your example.
>   
So I'll check the rendered attribute of the facet child and if none of
the facets are going to be rendered I'll suppress the footer (header) at
all.

---
Mario

>> This might be complicated, if not impossible to do.
>> I have to check all children of all footer facets to see if the row
>> should be renderer or not.
>> Think of the following (for sure untypical, just to get the point):
>>
>> <f:facet name="footer">
>>     <h:panelGroup>
>>        <h:outputLabel for="input">
>>           <h:outputText value="abc" rendered="false"/>
>>       </h:outputLabel>
>>       <h:inputText id="input" rendered="false"/>
>>     </h:panelGroup>
>> </f:facet>
>>
>> We can say we take the rendered state of the first/root child of the
>> facet tag, but this is not very intuitive, is it?
>>     


Re: [jira] Commented: (MYFACES-1146) Impossible to hide footer in dataTable

Posted by Volker Weber <us...@weber-oldenburg.de>.
Hi Mario,

why not render a empty panelGroup, if so declared in the jsf source?

IMO it is intuitive that there *is* a empty panel rendered in your example.


Regards,
  Volker


Mario Ivankovits wrote:
> Hi Volker!
> 
>>    [ http://issues.apache.org/jira/browse/MYFACES-1146?page=comments#action_12367167 ] 
>>
>>Volker Weber commented on MYFACES-1146:
>>---------------------------------------
>>
>>I prefer to check the rendered attribute of footer/header component over adding extra attributes to datatable.
>>  
> 
> 
> This might be complicated, if not impossible to do.
> I have to check all children of all footer facets to see if the row
> should be renderer or not.
> Think of the following (for sure untypical, just to get the point):
> 
> <f:facet name="footer">
>     <h:panelGroup>
>        <h:outputLabel for="input">
>           <h:outputText value="abc" rendered="false"/>
>       </h:outputLabel>
>       <h:inputText id="input" rendered="false"/>
>     </h:panelGroup>
> </f:facet>
> 
> We can say we take the rendered state of the first/root child of the
> facet tag, but this is not very intuitive, is it?
> 
> Ciao,
> Mario
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Re: [jira] Commented: (MYFACES-1146) Impossible to hide footer in dataTable

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Volker!
>     [ http://issues.apache.org/jira/browse/MYFACES-1146?page=comments#action_12367167 ] 
>
> Volker Weber commented on MYFACES-1146:
> ---------------------------------------
>
> I prefer to check the rendered attribute of footer/header component over adding extra attributes to datatable.
>   

This might be complicated, if not impossible to do.
I have to check all children of all footer facets to see if the row
should be renderer or not.
Think of the following (for sure untypical, just to get the point):

<f:facet name="footer">
    <h:panelGroup>
       <h:outputLabel for="input">
          <h:outputText value="abc" rendered="false"/>
      </h:outputLabel>
      <h:inputText id="input" rendered="false"/>
    </h:panelGroup>
</f:facet>

We can say we take the rendered state of the first/root child of the
facet tag, but this is not very intuitive, is it?

Ciao,
Mario


[jira] Commented: (MYFACES-1146) Impossible to hide footer in dataTable

Posted by "Volker Weber (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1146?page=comments#action_12367167 ] 

Volker Weber commented on MYFACES-1146:
---------------------------------------

I prefer to check the rendered attribute of footer/header component over adding extra attributes to datatable.

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: MYFACES-1146
>          URL: http://issues.apache.org/jira/browse/MYFACES-1146
>      Project: MyFaces Core
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>     Reporter: Guy Bashan
>     Assignee: Mario Ivankovits
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

-- 
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-1146) Impossible to hide footer in dataTable

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1146?page=comments#action_12367159 ] 

Mario Ivankovits commented on MYFACES-1146:
-------------------------------------------

You could also try to do:
footerClass="#{analyze.footerClass}" 

where you return the footer class or a class which will display:hide it.

But ok, this is only a workaround.

The question is still valid, should we add a
renderFooter=true|false
renderHeader=true|false

attribute?

> Impossible to hide footer in dataTable
> --------------------------------------
>
>          Key: MYFACES-1146
>          URL: http://issues.apache.org/jira/browse/MYFACES-1146
>      Project: MyFaces Core
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>     Reporter: Guy Bashan
>     Priority: Trivial

>
> It is impossible to hide the footer in a dataTable. There are cases in which the same table should sometimes show the footer and in other cases do not show it. For example:
>           <t:dataTable id="results" value="#{analyze.rows}" var="row"
>                        width="100%" 
>                        cellpadding="0" 
>                        cellspacing="0" 
>                        border="0"
>                        styleClass="reportTable" 
>                        headerClass="reportTitle"
>                        footerClass="reportTableTotal"
>                        rowClasses="reportRowLight,reportRowDark"
>                        rowOnMouseOver="selectedRow = this.className; this.className='reportRowOver'"
>                        rowOnMouseOut="this.className = selectedRow">
>             <t:columns value="#{analyze.columnHeaders}" var="column"
>                        styleClass="#{analyze.styleClass}" style="text-align:#{column.alignment}">
>               <f:facet name="header">
>                 <t:htmlTag value="nobr"><h:outputText value="#{column.title}" escape="false"/></t:htmlTag>
>               </f:facet>
>               <h:outputText value="#{analyze.columnValue}" escape="false" />
>               
>               <f:facet name="footer">
>                   <h:outputText value="#{analyze.colFooter.title}" escape="false"/>
>                   <t:htmlTag value="b">
>                     <h:outputText value="#{analyze.colFooter.total}"/>
>                   </t:htmlTag>
>               </f:facet>            
>             </t:columns>
>           </t:dataTable>
> I tried hiding the footer with: f:subview wrapping the footer and as a footer child, but both seems to be not working.

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