« Return to Thread: Component like panelGrid with ul and li

Re: shared - impl or tomahawk [was: Re: Component like panelGrid with ul

by John Ruffin :: Rate this Message:

Reply to Author | View in Thread

I want to create a horizontal list and have each surrounded by a commandLink.  I thought I could do something like this:

---  Piece from java class
public SimpleNavItems(String displayValue, String goToText){
                this.displayValue = displayValue;
                this.goToText = goToText;
        }

--- piece from backing bean - SearchForm
        public List getNavItems() {
                ArrayList l = new ArrayList();
                l.add(new SimpleNavItems("Home", "toHomePage"));
                l.add(new SimpleNavItems("Create new customer", "toCreateNewCustomer"));
                l.add(new SimpleNavItems("Find existing customer", "toFindCustomer"));
                return l;
        }

--- piece from .faces
<t:dataList
                value="#{searchForm.navItems}"
                var="navItem"
                id="horzNav" layout="grid">
       
        <t:commandLink
                        immediate="true"
                        action="#{navItem.goToText}">
                <h:outputText value="#{navItem.displayValue}"/>
        <t:commandLink>
       
</t:dataList>
</t:div>

The list shows like I want but the commandLink doesn't work inside a table.  Is Matt's solution a workaround for this?  Tomahawk1.1.4.

 « Return to Thread: Component like panelGrid with ul and li