beautypg.com

Creating the configuration file – HP Integrity NonStop H-Series User Manual

Page 274

background image

public String getColorSupportLabel() {
if (isColorSupported) {
return("Disable Color Customization");
} else {
return("Enable Colors Customization");
}
}

public boolean isUsingColorNames() {
return(isUsingColorNames);
}

public void setUsingColorNames(boolean isUsingColorNames) {
this.isUsingColorNames = isUsingColorNames;
}

public void changeColorMode(ValueChangeEvent event) {
boolean flag =
((Boolean)event.getNewValue()).booleanValue();
setUsingColorNames(!flag);
}

public String showPreview() {
if (isColorSupported && fgColor.equals(bgColor)) {
return("same-color");
} else {
return("success");
}
}
}

Creating the Configuration File

Create the

faces-config.xml

file, containing the navigation rules and a reference to the

managed beans, in the

SkinSelector/WebContent/WEB-INF

directory.

To write the configuration file, complete the following steps:

1.

Create a new XML file.

1.

On the Project Explorer frame, right-click SkinSelector project, and select New > File.

The New File dialog box appears.

2.

In the File name field, enter

faces-config.xml

and select

SkinSelector/WebContent/WEB-INF as the parent folder.

Figure 13-17

shows the New File dialog box.

274

Getting Started with MyFaces

This manual is related to the following products: