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>
codenewbie
  • 61
  • 7
  • 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. – UncaughtTypeError Mar 31 '17 at 08:53
  • 1
    which one is the duplicate https://stackoverflow.com/questions/20923843/primefaces-styling-component-class-with-css or https://stackoverflow.com/questions/6304652/primefaces-components-css-customization (see the 'related' links to the right) – Kukeltje Mar 31 '17 at 09:09

0 Answers0