public class ValidateBean extends 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>
nextHandler, tag, tagId
Constructor and Description |
---|
ValidateBean(TagConfig config)
The tag constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(FaceletContext context,
UIComponent parent) |
getAttribute, getRequiredAttribute, toString
public ValidateBean(TagConfig config)
config
- The tag config.public void apply(FaceletContext context, UIComponent parent) throws IOException
IOException