org.apache.shale.renderer
Class TokenRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.apache.shale.renderer.TokenRenderer

public class TokenRenderer
extends javax.faces.render.Renderer

Renderer for a Token component, dealing with a transaction token used to catch duplicate form submits.

$Id: TokenRenderer.java 464373 2006-10-16 04:21:54Z rahul $


Constructor Summary
TokenRenderer()
           
 
Method Summary
 void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Save the submitted value if this component was actually rendered.
 void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Render the start of a hidden input element containing the transaction token value for this component.
 void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Render the end of a hidden input element containing the transaction token value for this component.
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, encodeChildren, getConvertedValue, getRendersChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenRenderer

public TokenRenderer()
Method Detail

decode

public void decode(javax.faces.context.FacesContext context,
                   javax.faces.component.UIComponent component)

Save the submitted value if this component was actually rendered.

Overrides:
decode in class javax.faces.render.Renderer
Parameters:
context - FacesContext for the current request
component - UIComponent to be decoded

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context,
                        javax.faces.component.UIComponent component)
                 throws IOException

Render the start of a hidden input element containing the transaction token value for this component.

Overrides:
encodeBegin in class javax.faces.render.Renderer
Parameters:
context - FacesContext for the current request
component - UIComponent to be decoded
Throws:
IOException - if an input/output error occurs

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context,
                      javax.faces.component.UIComponent component)
               throws IOException

Render the end of a hidden input element containing the transaction token value for this component.

Overrides:
encodeEnd in class javax.faces.render.Renderer
Parameters:
context - FacesContext for the current request
component - UIComponent to be decoded
Throws:
IOException - if an input/output error occurs


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.