org.omnifaces.taghandler
Class ValidateBean
java.lang.Object
javax.faces.view.facelets.TagHandler
org.omnifaces.taghandler.ValidateBean
- All Implemented Interfaces:
- javax.faces.view.facelets.FaceletHandler
public class ValidateBean
- extends javax.faces.view.facelets.TagHandler
The <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>
- Author:
- Bauke Scholtz
Fields inherited from class javax.faces.view.facelets.TagHandler |
nextHandler, tag, tagId |
Constructor Summary |
ValidateBean(javax.faces.view.facelets.TagConfig config)
The tag constructor. |
Method Summary |
void |
apply(javax.faces.view.facelets.FaceletContext context,
javax.faces.component.UIComponent parent)
|
Methods inherited from class javax.faces.view.facelets.TagHandler |
getAttribute, getRequiredAttribute, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ValidateBean
public ValidateBean(javax.faces.view.facelets.TagConfig config)
- The tag constructor.
- Parameters:
config
- The tag config.
apply
public void apply(javax.faces.view.facelets.FaceletContext context,
javax.faces.component.UIComponent parent)
throws java.io.IOException
- Throws:
java.io.IOException