Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.lenya.cms.cocoon.acting
Class HTMLFormSaveAction  view HTMLFormSaveAction download HTMLFormSaveAction.java

java.lang.Object
  extended byAbstractLoggable
      extended byorg.apache.cocoon.acting.AbstractAction
          extended byorg.apache.cocoon.acting.AbstractConfigurableAction
              extended byorg.apache.lenya.cms.cocoon.acting.HTMLFormSaveAction
All Implemented Interfaces:
org.apache.cocoon.acting.Action

public class HTMLFormSaveAction
extends org.apache.cocoon.acting.AbstractConfigurableAction

FIXME: org.apache.xpath.compiler.XPathParser seems to have problems when namespaces are not declared within the root element. Unfortunately the XSLTs (during Cocoon transformation) are moving the namespaces to the elements which use them! One hack might be to parse the tree for namespaces (Node.getNamespaceURI), collect them and add them to the document root element, before sending it through the org.apache.xpath.compiler.XPathParser (called by XPathAPI) FIXME: There seems to be another problem with default namespaces WARNING: Internet Explorer sends X and Y coordinates for image buttons. These have to be treated differently. Mozilla does not send these coordinates.


Nested Class Summary
(package private)  class HTMLFormSaveAction.XUpdateAttributes
           
 
Field Summary
 
Fields inherited from class org.apache.cocoon.acting.AbstractConfigurableAction
settings
 
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
 
Fields inherited from interface org.apache.cocoon.acting.Action
ROLE
 
Constructor Summary
HTMLFormSaveAction()
           
 
Method Summary
 java.util.Map act(org.apache.cocoon.environment.Redirector redirector, org.apache.cocoon.environment.SourceResolver resolver, java.util.Map objectModel, java.lang.String source, Parameters parameters)
          Save data to temporary file
private  java.lang.String addHiddenNamespaces(java.lang.String namespaces, java.lang.String xupdateModifications)
          Add namespaces to xupdate
private  java.lang.String append(java.lang.String pname)
          xupdate:append
private  HTMLFormSaveAction.XUpdateAttributes getAttributes(org.w3c.dom.Node node)
          Get attributes from original node
private  HTMLFormSaveAction.XUpdateAttributes getAttributes(java.lang.String update, java.lang.String tagID)
          Get attributes from actual update
private  java.lang.String insertAfter(java.lang.String pname)
          xupdate:insert-after
private  java.lang.String insertBefore(java.lang.String pname)
          xupdate:insert-before
private  java.lang.String remove(java.lang.String pname)
          xupdate:remove
private  java.lang.String removeParent(java.lang.String xmlSnippet)
          Remove parent element
private  org.w3c.dom.Document renumberDocument(org.w3c.dom.Document doc, java.io.File unnumberTagsXSL, java.io.File numberTagsXSL)
          Renumber document
private  java.lang.String update(org.apache.cocoon.environment.Request request, java.lang.String pname, java.lang.String select, org.w3c.dom.NodeList selectionNodeList, boolean parent)
          xupdate:update
private  java.lang.String updateCDATA(org.apache.cocoon.environment.Request request, java.lang.String pname, boolean parent)
          xupdate:update CDATA
private  java.lang.String validateDocument(java.io.File schema, java.io.File file, java.io.File unnumberTagsXSL)
          Validate document
 
Methods inherited from class org.apache.cocoon.acting.AbstractConfigurableAction
configure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLFormSaveAction

public HTMLFormSaveAction()
Method Detail

act

public java.util.Map act(org.apache.cocoon.environment.Redirector redirector,
                         org.apache.cocoon.environment.SourceResolver resolver,
                         java.util.Map objectModel,
                         java.lang.String source,
                         Parameters parameters)
                  throws java.lang.Exception
Save data to temporary file


getAttributes

private HTMLFormSaveAction.XUpdateAttributes getAttributes(org.w3c.dom.Node node)
Get attributes from original node


getAttributes

private HTMLFormSaveAction.XUpdateAttributes getAttributes(java.lang.String update,
                                                           java.lang.String tagID)
Get attributes from actual update


update

private java.lang.String update(org.apache.cocoon.environment.Request request,
                                java.lang.String pname,
                                java.lang.String select,
                                org.w3c.dom.NodeList selectionNodeList,
                                boolean parent)
xupdate:update


updateCDATA

private java.lang.String updateCDATA(org.apache.cocoon.environment.Request request,
                                     java.lang.String pname,
                                     boolean parent)
xupdate:update CDATA


append

private java.lang.String append(java.lang.String pname)
xupdate:append


insertBefore

private java.lang.String insertBefore(java.lang.String pname)
xupdate:insert-before


insertAfter

private java.lang.String insertAfter(java.lang.String pname)
xupdate:insert-after


remove

private java.lang.String remove(java.lang.String pname)
xupdate:remove


validateDocument

private java.lang.String validateDocument(java.io.File schema,
                                          java.io.File file,
                                          java.io.File unnumberTagsXSL)
Validate document


renumberDocument

private org.w3c.dom.Document renumberDocument(org.w3c.dom.Document doc,
                                              java.io.File unnumberTagsXSL,
                                              java.io.File numberTagsXSL)
Renumber document


removeParent

private java.lang.String removeParent(java.lang.String xmlSnippet)
Remove parent element


addHiddenNamespaces

private java.lang.String addHiddenNamespaces(java.lang.String namespaces,
                                             java.lang.String xupdateModifications)
Add namespaces to xupdate