myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Engle" <Todd.En...@trisyngroup.com>
Subject RE: [Trinidad] TreeTable Skinning Options?
Date Mon, 15 Oct 2007 20:12:24 GMT
Chris, 

I found this posting and was able to conditionally set the visibility
for the checkboxes -- it was a great help and only took about 10 minutes
to implement:

http://mail-archives.apache.org/mod_mbox/incubator-adffaces-user/200612.
mbox/%3C885AADC3D2318E45807C702ABC2637DD133B40@MOES0037.tcc.local%3E

HTH,
Todd

-----Original Message-----
From: Chris Hane [mailto:chrishane@gmail.com] 
Sent: Friday, October 12, 2007 2:30 AM
To: MyFaces Discussion
Subject: Re: [Trinidad] TreeTable Skinning Options?

Cristi - thanks for the info on setting the "children" property to null
and not just empty.  That did the trick for my question #3.

1) Can the "Select All | Select None" be turned off and not show in
    the table header?

 > 1. it's probably related to using rowSelection="multiple"
 > if you don't specify that, the links will not be rendererd

However, I want some of the selection boxes to appear.  Some defined by
my question #2.  So turning of "rowSelection" isn't an option.  Or maybe
there is another way to have selection boxes appear?

2) Is it possible to have a "select" checkbox appear for only SOME rows?
    I have a list of libraries and each library has a list of dvds.  I
    want only the DVDs to be selectable.


Thanks again - the #3 question really helps the GUI, Chris....


Cristi Toth wrote:
> Hi Chris,
> 
> 1. it's probably related to using rowSelection="multiple"
> if you don't specify that, the links will not be rendererd
> 
> 3. the model it's a tree, so the leafs don't have the expand/collapse 
> icon rendered BUT for a node to be a leaf it has to have the 
> 'children' property set to null (not an empty list)
> 
> On 10/11/07, *Chris Hane* < chrishane@gmail.com 
> <mailto:chrishane@gmail.com>> wrote:
> 
>     Is it possible to do any of the following with the TreeTable
component.
> 
>     1) Can the "Select All | Select None" be turned off and not show
in
>         the table header?
> 
>     2) Is it possible to have a "select" checkbox appear for only SOME
rows?
>         I have a list of libraries and each library has a list of
dvds.  I
>         want only the DVDs to be selectable.
> 
>     3) Is it possible to turn off the expand arrow on specific rows?
>         For example, the DVDs do not have anything below them and
>         do not need expand arrows
> 
>     I am creating the TreeModel using
> 
>         new ChildPropertyTreeModel(root, "children");
> 
>     Should I use something else to get any of the above?  A pointer in
the
>     right direction would be much appreciated.
> 
>     Where root is:
> 
>        root = new TransferObject();
> 
>     public class TransferObject{
>       public String name;
>       public List<TransferObject> children;
>       ...and getters/setters
>     }
> 
>     The facelet code to display the tree is:
> 
> 
>     <tr:treeTable var="foo"
>                    value="#{learn.admin.contact.course.lister.tree}"
>                    rowSelection="multiple"
>                    rowsByDepth="100"
>                    expandAllEnabled="false">
>         <f:facet name="nodeStamp">
>            <tr:column>
>               <f:facet name="header">
>                 <tr:outputText value="Library/DVD"/>
>               </f:facet>
>               <tr:outputFormatted
>                     value="#{foo.name <http://foo.name>} : #{foo.type}
:
>     #{foo.id <http://foo.id>}"/>
>            </tr:column>
>         </f:facet>
>     </tr:treeTable>
> 
>     Thanks,
>     Chris....
> 
> 
> 
> 
> --
> Cristi Toth
> 
> -------------
> Codebeat
> www.codebeat.ro <http://www.codebeat.ro>

Mime
View raw message