开发者

Modify the background of the button of a combobox in richfaces

开发者 https://www.devze.com 2023-03-05 20:34 出处:网络
When I create a combobox using richfaces it generates to folowing html for the button (the rest of the combobox html is irrelevant)

When I create a combobox using richfaces it generates to folowing html for the button (the rest of the combobox html is irrelevant)

<input class="rich-combobox-font-inactive rich-combobox-button-background-inactive rich-combobox-button-inactive" id="mainForm:j_id98:0:j_id113comboBoxButtonBG" readonly="readonly" tabindex="-1" type="text">
<input class="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive filterComboboxButton" id="mainForm:j_id98:0:j_id113comboboxButton" readonly="readonly" style="; background-image: ;" tabindex="-1" type="text">

As you can see I've defined a css class "filterComboboxButton" using buttonClass, buttonDisabledClass and buttonInactiveClass. But I can't specify a style class for the first input, witch seems to define the border for the button.

<rich:comboBox buttonClass="filter开发者_如何学运维ComboboxButton" buttonDisabledClass="filterComboboxButton" buttonInactiveClass="filterComboboxButton"  />

Oh yes, I can define it by overriding the rich-combox-button-background-inactive etc. in my css, but then I define it for my entire page and I only want to to this for a few comboboxes on my page.

Btw I'm still using richfaces 3.3.3


If you assign an id to your combobox:

<rich:comboBox 
    id="someName"    
    buttonClass="filterComboboxButton" 
    buttonDisabledClass="filterComboboxButton" 
    buttonInactiveClass="filterComboboxButton"  />

Then you can use a CSS selector like:

#mainForm\3A someName input {
    /* your styles here */
}
0

精彩评论

暂无评论...
验证码 换一张
取 消