ICEfaces
  1. ICEfaces
  2. ICE-7051

Add capability to style the different rows of options displayed for the selectInputText component

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: EE-2.0.0.GA, 2.0.2, EE-1.8.2.GA_P03
    • Fix Version/s: None
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Feature Request: It would be nice to be able to style the rows displayed for the selectInputText options in a similar way to the rows in a dataTable with alternating even/odd style.

      Currently there is only the ability to only style each row the same and have the selected row style differently.

        Activity

        Hide
        Adnan Durrani added a comment -

        Yes, it can be done at app level when using facet.

        In order to achieve this, an index should be added to the bean, and that index has to be used in a styleClass of root element.

        For example:

        <style>
        .evenClass

        { background-color:red; }

        </style>

        <ice:selectInputText
        listVar="city"
        listValue="#

        {selectInputText.cityMatchPossibilities}

        ">

        <f:facet name="selectInputText">
        <ice:panelGrid columns="3" styleClass="#

        {(city.index % 2 == 0) ? evenClass : oddClass }

        "
        columnClasses="#

        {city.city},stateCol,zipCol">
        <ice:outputText id="AutoCmpCty" value="#{city.city}

        "/>
        <ice:outputText id="AutoCmpSt" value="#

        {city.state}

        "/>
        <ice:outputText id="AutoCmpZip" value="#

        {city.zip}

        "/>
        </ice:panelGrid>
        </f:facet>

        </ice:selectInputText>

        Show
        Adnan Durrani added a comment - Yes, it can be done at app level when using facet. In order to achieve this, an index should be added to the bean, and that index has to be used in a styleClass of root element. For example: <style> .evenClass { background-color:red; } </style> <ice:selectInputText listVar="city" listValue="# {selectInputText.cityMatchPossibilities} "> <f:facet name="selectInputText"> <ice:panelGrid columns="3" styleClass="# {(city.index % 2 == 0) ? evenClass : oddClass } " columnClasses="# {city.city},stateCol,zipCol"> <ice:outputText id="AutoCmpCty" value="#{city.city} "/> <ice:outputText id="AutoCmpSt" value="# {city.state} "/> <ice:outputText id="AutoCmpZip" value="# {city.zip} "/> </ice:panelGrid> </f:facet> </ice:selectInputText>

          People

          • Assignee:
            Unassigned
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: