Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEAMFACES-238 : Theme handling (from Seam 2) #69

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gonzalad
Copy link
Contributor

Showcase included in viewconfig webapp.

Sample usage

Theme initialization :

@Singleton
@Startup
public class MyAppStartupConfig {

    @Inject
    private ThemeConfig themeConfig;

    @PostConstruct
    public void onLoad() {
        themeConfig.setAvailableThemes(new String[]{"blue", "red", "black"});
    }
}

Theme usage :

#{theme.borderColor}

Theme selection :

<h:selectOneMenu value="#{themeSelector.theme}">
    <f:selectItems value="#{themeSelector.themes}"/>
</h:selectOneMenu>
<h:commandButton action="#{themeSelector.select}" id="themeSelector" value="OK"/>

Showcase included in viewconfig webapp.

 * initializing themes : create a startup Singleton bean, inject ThemeConfig and set availableThemes field.
  * theme key / values : property files (same name as the availableThemes properties).
   * to use a theme in a JSF file, just use {theme.key}

 see http://docs.jboss.org/seam/2.2.2.Final/reference/en-US/html/i18n.html#d0e14307
@lincolnthree
Copy link
Member

Hey, all these pull requests you submitted look pretty deep/big features. Do you have some test cases for this stuff that you could add?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants