View Source

h2. Overview
_Since 3.3_

The themeSelect component can be used to dynamically change the currently used ACE ThemeRoller theme in the application. It overrides the initial/default theme set by a context param as detailed in [], which also describes the location and naming of the theme stylesheet files.

{tip}See the ICEfaces Showcase [Live Demo|] of this component, complete with source code.{tip}

h2. Getting Started
{code:xml|borderStyle=dashed}<ace:themeSelect value="#{navigationModel.theme}">

The list will be automatically populated with the supported Themeroller themes found in the application's classpath.

h2. Attributes

{tip:title=TagLib Documentation}This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|].{tip}
*value*: the name of the theme as described in the link in the Overview above. Note: the value "none" will have no effect and "sam" will be used.
h2. Event Listeners

| valueChangeListener | Listener method that will be notified when a new value has been set for this input component. |

h2. Client Behavior Events

| valueChange | Fired whenever the value of the component changes (default event). |

h2. JavaScript API

h4. ICEfaces 3.x

The client side component object is exposed through the global variable name specified in the *widgetVar* attribute.

h4. ICEfaces 4+

The "widgetVar" attribute on the ACE components has been removed in ICEfaces 4 and in its place a new "ice.ace.instance()" client JavaScript object lookup API has been introduced. The reason for this change is to enable lazy-initialization of the ACE component JavaScript objects to improve runtime performance and reduce browser memory use.

{code}var widget = ice.ace.instance('frm:componentId);{code}

{tip}The _ice.ace.instance_ function requires the _full_ client id of the component to be specified, such as "j_idt77:componentId" instead of just "componentId". To reduce the complexity of working with complete IDs with this function it may be preferable in some cases to use {{prependId="false"}} in the enclosing form (e.g. _<h:form prependId="false">_).{tip}

{info}This component doesn't have a client-side API made specifically to be used by application developers. However, the component's internal methods and variables can be accessed in this way, including the underlying jQuery object and objects from underlying Javascript libraries (if applicable), and can be used for whatever purpose a developer might have in mind.

h2. Keyboard and ARIA Support

The following ARIA roles are supported: listbox.

h2. CSS Classes

The following markup represents the basic HTML structure of the component and the CSS classes it uses.

<span class="ui-select-theme [user defined classes]">
<select class="ui-widget ui-state-default ui-state-optional" style="[user defined styles]">
<!-- option elements go here... -->

h2. Default Theme

The theme specified in the {{org.icefaces.ace.theme}} context parameter will be used as the theme for the current user, whenever the value of this component is null. If the value of this context parameter is null as well, then the {{sam}} theme will be used by default. If the value of this parameter is {{none}}, then no theme will be used at all.

h2. Known Issues


h2. Additional Resources