|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
org.apache.shale.validator.faces.ValidatorScript
public class ValidatorScript
A JSF component that encodes JavaScript for
all client-side validations specified in the same
JSP page (with s:commonsValidator.
$Id: ValidatorScript.java 464373 2006-10-16 04:21:54Z rahul $
| Constructor Summary | |
|---|---|
ValidatorScript()
|
|
| Method Summary | |
|---|---|
void |
encodeBegin(javax.faces.context.FacesContext context)
Begin encoding for this component. |
String |
findForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Traverses up the tree looking for the owning form. |
String |
getFamily()
Returns the component's family. |
String |
getFunctionName()
Return the value of the functionName property. |
String |
getRendererType()
The component renders itself; therefore, this method returns null. |
void |
restoreState(javax.faces.context.FacesContext context,
Object state)
Restore the state of this component. |
Object |
saveState(javax.faces.context.FacesContext context)
Save the state of this component. |
void |
setFunctionName(String functionName)
Set the value of the functionName property. |
void |
writeJavaScriptParams(javax.faces.context.ResponseWriter writer,
javax.faces.context.FacesContext context,
String id,
CommonsValidator v)
Writes the JavaScript parameters for the client-side validation code. |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addFacesListener, broadcast, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValidatorScript()
| Method Detail |
|---|
public String getRendererType()
The component renders itself; therefore, this method returns null.
getRendererType in class javax.faces.component.UIComponentBasenull component handles rendereringpublic String getFamily()
Returns the component's family. In this case, the component is not associated with a family, so this method returns null.
getFamily in class javax.faces.component.UIComponentpublic String getFunctionName()
Return the value of the functionName property.
public void setFunctionName(String functionName)
Set the value of the functionName property.
functionName - The new function name
public void restoreState(javax.faces.context.FacesContext context,
Object state)
Restore the state of this component.
restoreState in interface javax.faces.component.StateHolderrestoreState in class javax.faces.component.UIComponentBasecontext - FacesContext for the current requeststate - State to be restoredpublic Object saveState(javax.faces.context.FacesContext context)
Save the state of this component.
saveState in interface javax.faces.component.StateHoldersaveState in class javax.faces.component.UIComponentBasecontext - FacesContext for the current request
public void writeJavaScriptParams(javax.faces.context.ResponseWriter writer,
javax.faces.context.FacesContext context,
String id,
CommonsValidator v)
throws IOException
Writes the JavaScript parameters for the client-side validation code.
writer - A response writercontext - The FacesContext for this requestid - The clientId of the owning componentv - The Commons validator
IOException - if an input/output error occurs
public String findForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Traverses up the tree looking for the owning form.
Returns the parent UIForm or empty string
if one is not found.
context - FacesContext for the current requestcomponent - UIForm parent of the component.
public void encodeBegin(javax.faces.context.FacesContext context)
throws IOException
Begin encoding for this component. This method finds all Commons validators attached to components in the current component hierarchy and writes out JavaScript code to invoke those validators, in turn.
encodeBegin in class javax.faces.component.UIComponentBasecontext - The FacesContext for this request
IOException - if an input/output error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||