0

i want to override the style attribute .ui-state-disabled of the primefaces component SelectCheckboxMenu. The overriding is easy if i define a new style for .ui-state-disabled but the problem is that all other primefaces components with this style class will be overridden too, which i don't want. How can a specify that the class .ui-state-disabled will be overridden for a specific primefaces component ? (in my case a SelectCheckboxMenu)

Style:

 .ui-state-disabled
    {
            visibility: hidden!important;
    } 

Component which should be overridden:

<p:selectCheckboxMenu id="overview" style="width: 130px; margin-right: 10px;"
            value="#{overviewModel.filterCompilation.selectedCareUnits}"
            filter="true" filterMatchMode="startsWith" panelStyle="width:250px"
            label="checkbox">
            <f:selectItems value="#{overviewModel.items}" />
        </p:selectCheckboxMenu>
2
  • I'm not seeing that class in the example above. But essentially, you'll need to find a way to leverage specificity of that rule to apply only to the case in question, perhaps by using adjoining classes - it's not possible to give you a precise solution without knowing how these elements are generally structured or placed in relation to other instances on site or application. This will essentially determine how your selectors should be declared, e.g: if you can establish that there is some sort of unique selector on this page only, you could then use that selector as a hook for your styles. Commented Mar 31, 2017 at 8:53
  • 1
    which one is the duplicate stackoverflow.com/questions/20923843/… or stackoverflow.com/questions/6304652/… (see the 'related' links to the right) Commented Mar 31, 2017 at 9:09

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.