public class ValidateBean
extends javax.faces.view.facelets.TagHandler
<o:validateBean> allows the developer to control bean validation on a per-UICommand
or UIInput component basis. The standard <f:validateBean> only allows that on a per-form
or a per-request basis (by using multiple tags and conditional EL expressions in its attributes) which may end up in
boilerplate code.
Usage examples:
<h:commandButton value="submit" action="#{bean.submit}">
<o:validateBean validationGroups="javax.validation.groups.Default,com.example.MyGroup"/>
</h:commandButton>
<h:selectOneMenu value="#{bean.selectedItem}">
<f:selectItems value="#{bean.availableItems}"
<o:validateBean disabled="true" />
<f:ajax execute="@form" listener="#{bean.itemChanged}" render="@form" />
</h:commandButton>
| Constructor and Description |
|---|
ValidateBean(javax.faces.view.facelets.TagConfig config)
The tag constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(javax.faces.view.facelets.FaceletContext context,
javax.faces.component.UIComponent parent) |
public ValidateBean(javax.faces.view.facelets.TagConfig config)
config - The tag config.public void apply(javax.faces.view.facelets.FaceletContext context,
javax.faces.component.UIComponent parent)
throws IOException
IOExceptionCopyright © 2012–2014 OmniFaces. All rights reserved.