Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » transformation » [javadoc | source]
org.apache.cocoon.transformation
public class: SimpleFormTransformer [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.xml.AbstractXMLProducer
         org.apache.cocoon.xml.AbstractXMLPipe
            org.apache.cocoon.transformation.AbstractTransformer
               org.apache.cocoon.transformation.AbstractSAXTransformer
                  org.apache.cocoon.transformation.SimpleFormTransformer

All Implemented Interfaces:
    org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, Transformer, XMLPipe, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer

Nested Class Summary:
protected static class  SimpleFormTransformer.RepeaterStatus  Keep track of repeater status. 
protected static class  SimpleFormTransformer.ValueList  Keep track of multiple values. 
Field Summary
protected static final  String INPUT_MODULE_ROLE     
protected static final  String INPUT_MODULE_SELECTOR     
protected  Object[] values    current element's request parameter values 
protected  Map validationResults    current request's validation results (all validated elements) 
protected  boolean skipChildrenOnly    Skip element's content only. Otherwise skip also surrounding element. 
protected  int recordingCount    Count nested repeat elements. 
protected  List repeater    List of RepeaterStatus elements keeping track of nested repeat blocks. 
protected  Map formValues    Map of ValueList to track multiple parameters. 
Fields inherited from org.apache.cocoon.transformation.AbstractSAXTransformer:
EMPTY_ATTRIBUTES,  ignoreWhitespaces,  ignoreEmptyCharacters,  ignoreEventsCount,  ignoreHooksCount,  namespaceURI,  defaultNamespaceURI,  stack,  recorderStack,  request,  response,  context,  objectModel,  parameters,  source,  manager,  resolver,  emptyAttributes
Fields inherited from org.apache.cocoon.xml.AbstractXMLProducer:
EMPTY_CONTENT_HANDLER,  xmlConsumer,  contentHandler,  lexicalHandler
Constructor:
 public SimpleFormTransformer() 
Method from org.apache.cocoon.transformation.SimpleFormTransformer Summary:
configure,   endRepeatElement,   endTransformingElement,   printAttributes,   recycle,   relayEndElement,   relayStartElement,   relayStartElement,   setup,   startCheckableElement,   startErrorElement,   startFormElement,   startInputElement,   startNonCheckableElement,   startOptionElement,   startRepeatElement,   startSelectElement,   startTextareaElement,   startTransformingElement
Methods from org.apache.cocoon.transformation.AbstractSAXTransformer:
addRecorder,   characters,   comment,   configure,   dispose,   endCDATA,   endDTD,   endDocument,   endElement,   endEntity,   endParametersRecording,   endParametersRecording,   endPrefixMapping,   endRecording,   endSAXRecording,   endSerializedXMLRecording,   endTextRecording,   endTransformingElement,   findPrefixMapping,   getMutableAttributes,   ignorableWhitespace,   processingInstruction,   recycle,   removeRecorder,   sendEndElementEvent,   sendEndElementEventNS,   sendEndPrefixMapping,   sendEvents,   sendParametersEvents,   sendStartElementEvent,   sendStartElementEvent,   sendStartElementEventNS,   sendStartElementEventNS,   sendStartPrefixMapping,   sendTextEvent,   service,   setDocumentLocator,   setup,   setupTransforming,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startEntity,   startParametersRecording,   startPrefixMapping,   startRecording,   startSAXRecording,   startSerializedXMLRecording,   startTextRecording,   startTransformingElement
Methods from org.apache.cocoon.xml.AbstractXMLPipe:
characters,   comment,   endCDATA,   endDTD,   endDocument,   endElement,   endEntity,   endPrefixMapping,   ignorableWhitespace,   processingInstruction,   setDocumentLocator,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startEntity,   startPrefixMapping
Methods from org.apache.cocoon.xml.AbstractXMLProducer:
recycle,   setConsumer,   setContentHandler,   setLexicalHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.transformation.SimpleFormTransformer Detail:
 public  void configure(Configuration config) throws ConfigurationException 
    Avalon Configurable Interface
 protected  void endRepeatElement(String uri,
    String name,
    String raw) throws SAXException 
    Stop recording repeat contents and replay required number of times. Stop only if outmost repeat element is ending.
 public  void endTransformingElement(String uri,
    String name,
    String raw) throws SAXException 
    Start processing elements of our namespace. This hook is invoked for each sax event with our namespace.
 protected String printAttributes(Attributes attr) 
    Generate string representation of attributes. For debug only.
 public  void recycle() 
    Recycle this component.
 protected  void relayEndElement(String uri,
    String name,
    String raw) throws SAXException 
    Calls the super's method endTransformingElement and decrements the ignoreEventsCount if larger than zero.
 protected  void relayStartElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Calls the super's method startTransformingElement.
 protected  void relayStartElement(boolean skip,
    boolean skipChildrenOnly,
    String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Calls the super's method startTransformingElement and increments the ignoreEventsCount if skip is true. Increment can be done either before invoking super's method, so that the element itself is skipped, or afterwards, so that only the children are skipped.
 public  void setup(SourceResolver resolver,
    Map objectModel,
    String src,
    Parameters par) throws IOException, SAXException, ProcessingException 
    Setup the next round. The instance variables are initialised.
 protected  void startCheckableElement(String aName,
    String uri,
    String name,
    String raw,
    AttributesImpl attributes) throws SAXException 
    Handle input elements that may have a "checked" attributes, i.e. checkbox and radio.
 protected  void startErrorElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Handle error elements. If validation results are available, compares validation result for parameter with the same name as the "name" attribute with the result names is "when" and "when-ge". Drops element and all nested events when error condition is not met.
 protected  void startFormElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Start processing a form element. Sets protection indicator if attribute "fixed" is present and either "true" or "yes". Removes attribute "fixed" if present.
 protected  void startInputElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Handle input elements. Calls startCheckableElement or startNonCheckableElement.
 protected  void startNonCheckableElement(String aName,
    String uri,
    String name,
    String raw,
    AttributesImpl attributes) throws SAXException 
    Handle input elements that may don't have a "checked" attributes, e.g. text, password, button.
 protected  void startOptionElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Handle option elements. Uses instance variables set up by startSelectElement. Relies on option having a "value" attribute, i.e. does not check following characters if "value" is not present.
 protected  void startRepeatElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Start recording repeat element contents and push repeat expression and variable to repeater stack. Only start recording, if no other recorder is currently running.
 protected  void startSelectElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Handle select elements. Sets up some instance variables for following option elements.
 protected  void startTextareaElement(String uri,
    String name,
    String raw,
    Attributes attributes) throws SAXException 
    Handles textarea elements. Skips nested events if request parameter with same name exists.
 public  void startTransformingElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Start processing elements of our namespace. This hook is invoked for each sax event with our namespace.