
sections.utils.switch.xhtml Maven / Gradle / Ivy
The newest version!
Sometimes you need to display different outputs or components depending on a value. Usually you can achieve this by using the ui:fragment tag.
With the pe:switch util tag you won't have to declare ui:fragment tags, with different checks like ui:fragment rendered="#{'#'}{!empty someController.value}", anymore.
${showcase:getFileContent('/sections/utils/example-switch.xhtml')}
@ManagedBean
@RequestScoped
public class SwitchController {
private String value;
public String getValue() {
return value;
}
public void setValue(final String value) {
this.value = value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy