You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Brandon Goodin <br...@gmail.com> on 2005/04/17 00:04:33 UTC

Displaying a list horizontally

I have a list of objects. I want to dislpay their contents in a
breadcrumb format. How would i display the list horizontally?

Ex.
List of Category objects [CategoryA,CategoryB,CategoryC]

I want to display them as commandLinks in the following manner:

CategoryA > CategoryB > CategoryC


Thanks,
Brandon

Re: Displaying a list horizontally

Posted by Brandon Goodin <br...@gmail.com>.
Thanks Rob!

On 4/16/05, Rob Decker <ro...@objectsource.org> wrote:
> You might want to look at the Dynamic Lists example in the simple examples.
> This is the first example which is pretty much what you want (except you'd
> use commandLink for the first outputText and a > in the second):
> <x:dataList id="data1"
>         styleClass="standardList"
>         var="country"
>         value="#{countryList.countries}"
>         layout="simple"
>         rowCountVar="rowCount"
>         rowIndexVar="rowIndex" >
>         <h:outputText value="#{country.name}" />
>         <h:outputText value=", " rendered="#{rowIndex + 1 < rowCount}" />
> </x:dataList>
> 
> ----- Original Message -----
> From: "Brandon Goodin" <br...@gmail.com>
> To: "MyFaces Discussion" <us...@myfaces.apache.org>
> Sent: Saturday, April 16, 2005 8:12 PM
> Subject: Re: Displaying a list horizontally
> 
> So, maybe i just don't know some secret that you know. ;-)
> 
> Let me be more clear. I have a list of objects of type Category.
> 
> class Category {
> 
> private Integer categoryId;
> private String title;
> 
> ... getters/setters
> 
> }
> 
> If i have three different Category objects in my list and i want to
> iterate over the list contents and display the titles as commandLinks
> horizontally in a breadcrumb format. How would i do that? What would
> the code look like in my JSF to accomplish this?
> 
> Please post a sample of how you would write this. I'm sorry if i'm
> being a complete idiot here.
> 
> Brandon
> 
> On 4/16/05, Rob Decker <ro...@objectsource.org> wrote:
> > Isn't that pretty much how they'd lay out by default?
> >
> >
> > ----- Original Message -----
> > From: "Brandon Goodin" <br...@gmail.com>
> > To: "MyFaces Discussion" <my...@incubator.apache.org>
> > Sent: Saturday, April 16, 2005 6:04 PM
> > Subject: Displaying a list horizontally
> >
> > I have a list of objects. I want to dislpay their contents in a
> > breadcrumb format. How would i display the list horizontally?
> >
> > Ex.
> > List of Category objects [CategoryA,CategoryB,CategoryC]
> >
> > I want to display them as commandLinks in the following manner:
> >
> > CategoryA > CategoryB > CategoryC
> >
> > Thanks,
> > Brandon
> >
> 
>

Re: Displaying a list horizontally

Posted by Rob Decker <ro...@objectsource.org>.
You might want to look at the Dynamic Lists example in the simple examples.
This is the first example which is pretty much what you want (except you'd
use commandLink for the first outputText and a > in the second):
<x:dataList id="data1"
        styleClass="standardList"
        var="country"
        value="#{countryList.countries}"
        layout="simple"
        rowCountVar="rowCount"
        rowIndexVar="rowIndex" >
        <h:outputText value="#{country.name}" />
        <h:outputText value=", " rendered="#{rowIndex + 1 < rowCount}" />
</x:dataList>

----- Original Message ----- 
From: "Brandon Goodin" <br...@gmail.com>
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Sent: Saturday, April 16, 2005 8:12 PM
Subject: Re: Displaying a list horizontally


So, maybe i just don't know some secret that you know. ;-)

Let me be more clear. I have a list of objects of type Category.

class Category {

private Integer categoryId;
private String title;

... getters/setters

}

If i have three different Category objects in my list and i want to
iterate over the list contents and display the titles as commandLinks
horizontally in a breadcrumb format. How would i do that? What would
the code look like in my JSF to accomplish this?

Please post a sample of how you would write this. I'm sorry if i'm
being a complete idiot here.

Brandon

On 4/16/05, Rob Decker <ro...@objectsource.org> wrote:
> Isn't that pretty much how they'd lay out by default?
>
>
> ----- Original Message -----
> From: "Brandon Goodin" <br...@gmail.com>
> To: "MyFaces Discussion" <my...@incubator.apache.org>
> Sent: Saturday, April 16, 2005 6:04 PM
> Subject: Displaying a list horizontally
>
> I have a list of objects. I want to dislpay their contents in a
> breadcrumb format. How would i display the list horizontally?
>
> Ex.
> List of Category objects [CategoryA,CategoryB,CategoryC]
>
> I want to display them as commandLinks in the following manner:
>
> CategoryA > CategoryB > CategoryC
>
> Thanks,
> Brandon
>


Re: Displaying a list horizontally

Posted by Brandon Goodin <br...@gmail.com>.
So, maybe i just don't know some secret that you know. ;-) 

Let me be more clear. I have a list of objects of type Category.

class Category {

private Integer categoryId;
private String title;

... getters/setters

}

If i have three different Category objects in my list and i want to
iterate over the list contents and display the titles as commandLinks
horizontally in a breadcrumb format. How would i do that? What would
the code look like in my JSF to accomplish this?

Please post a sample of how you would write this. I'm sorry if i'm
being a complete idiot here.

Brandon

On 4/16/05, Rob Decker <ro...@objectsource.org> wrote:
> Isn't that pretty much how they'd lay out by default?
> 
> 
> ----- Original Message -----
> From: "Brandon Goodin" <br...@gmail.com>
> To: "MyFaces Discussion" <my...@incubator.apache.org>
> Sent: Saturday, April 16, 2005 6:04 PM
> Subject: Displaying a list horizontally
> 
> I have a list of objects. I want to dislpay their contents in a
> breadcrumb format. How would i display the list horizontally?
> 
> Ex.
> List of Category objects [CategoryA,CategoryB,CategoryC]
> 
> I want to display them as commandLinks in the following manner:
> 
> CategoryA > CategoryB > CategoryC
> 
> Thanks,
> Brandon
>

Re: Displaying a list horizontally

Posted by Rob Decker <ro...@objectsource.org>.
Isn't that pretty much how they'd lay out by default?


----- Original Message ----- 
From: "Brandon Goodin" <br...@gmail.com>
To: "MyFaces Discussion" <my...@incubator.apache.org>
Sent: Saturday, April 16, 2005 6:04 PM
Subject: Displaying a list horizontally


I have a list of objects. I want to dislpay their contents in a
breadcrumb format. How would i display the list horizontally?

Ex.
List of Category objects [CategoryA,CategoryB,CategoryC]

I want to display them as commandLinks in the following manner:

CategoryA > CategoryB > CategoryC


Thanks,
Brandon