public class RendererHelper
extends java.lang.Object
See Renderer
and it's concrete
subclasses.
Modifier and Type | Field and Description |
---|---|
int |
counter
Keeps track of number of Renderer instantiations to guard against infinite
loops
|
static int |
DEFAULT_TEXT_INPUT_SIZE |
boolean |
showElementDebugInfo
Causes debugging information about each element to be shown in editor
|
boolean |
showLabelDebugInfo
Causes debugging information about the element labels to be shown in editor
|
Constructor and Description |
---|
RendererHelper(org.dom4j.Element root,
MetaDataFramework framework,
java.lang.String formBeanName)
Constructor for the RendererHelper object
|
RendererHelper(org.dom4j.Element root,
MetaDataFramework framework,
java.lang.String formBeanName,
java.lang.String renderer)
Constructor for the RendererHelper object with renderer class name
explicitly specified.
|
Modifier and Type | Method and Description |
---|---|
org.dom4j.Element |
acceptsNewChioceTest(java.lang.String path)
NOT YET DOCUMENTED
|
org.dom4j.Element |
acceptsNewSiblingTest(java.lang.String path)
NOT YET DOCUMENTED
|
void |
attachElementDebugInfo(org.dom4j.Element target,
java.lang.String displayText,
java.lang.String borderColor)
NOT YET DOCUMENTED
|
void |
attachMessages(org.dom4j.Element container,
java.lang.String xpath)
Description of the Method
|
void |
attachToolHelp(org.dom4j.Element e,
java.lang.String helpMsg)
Attach a pop-up tool help message to an element
|
void |
destroy()
NOT YET DOCUMENTED
|
void |
embedDebugInfo(org.dom4j.Element e,
java.lang.String s)
NOT YET DOCUMENTED
|
static java.lang.String |
encodeIndexId(java.lang.String xpath)
Given a "siblingPath" (xpath with no indexing on leaf node), create a
javascript variable to use for indexed elements.
|
int |
getBaseLevel()
Gets the baseLevel attribute of the RendererHelper object.
|
FieldInfoReader |
getFieldInfo(java.lang.String xpath)
returns the FieldInfoReader for the given xpath, or null if one does not
exist
|
java.lang.String |
getFormBeanName()
Gets the formBeanName attribute of the RendererHelper object
|
MetaDataFramework |
getFramework()
Gets the framework attribute of the RendererHelper object
|
java.lang.String |
getInputHelperFile(java.lang.String xpath)
Returns the configured inputHelper value for the provided xpath
(inputHelper value is relative to the /editor/input_helper directory in the
deployed app
|
int |
getMaxLen(java.lang.String xpath)
Gets the maxLen attribute of the RendererHelper object
|
RendererImpl |
getRenderer(java.lang.String xpath,
org.dom4j.Element parent)
Renderer factory returns a Renderer instance for the schemaNode at xpath.
|
RendererImpl |
getRenderer(java.lang.String xpath,
org.dom4j.Element parent,
GlobalDef typeDef)
Renderer factory returns a Renderer instance for the schemaNode at xpath,
possibly with a "proxy dataType" (if provided) that will override the
dataType associated with the schemaNode.
|
java.lang.String |
getRendererClassName()
Gets the rendererClassName attribute of the RendererHelper object
|
org.dom4j.Element |
getRoot()
Gets the root attribute of the RendererHelper object
|
SchemaHelper |
getSchemaHelper()
Gets the schemaHelper attribute of the RendererHelper object
|
java.lang.String |
getToolHelp(java.lang.String s)
Attempts to return a metadata vocab field definition for the input string
assuming it is an xpath.
|
boolean |
hasFieldInfo(java.lang.String xpath)
Description of the Method
|
boolean |
hasInputHelper(java.lang.String xpath)
Returns true if the provided path is configured with an inputHelper
|
boolean |
hasMuiGroupInfo(java.lang.String xpath)
Return if there is Mui Grouping Information available for this field.
|
boolean |
hasVocabLayout(java.lang.String xpath)
NOT YET DOCUMENTED
|
static org.dom4j.Element |
jspInclude(java.lang.String page)
NOT YET DOCUMENTED
|
static java.lang.String |
jspQuotedString(java.lang.String s)
returns the input string surrounded by a string that is replaced with a
quotation mark when the rendered Element is writen to disk.
|
org.dom4j.Element |
nodeExistsTest(java.lang.String path)
Creates a test for the existence of a node in the instance document at the
given path
|
org.dom4j.Element |
nodeHasChildrenTest(java.lang.String path)
NOT YET DOCUMENTED
|
org.dom4j.Element |
nodeHasMembersTest(java.lang.String path)
NOT YET DOCUMENTED
|
org.dom4j.Element |
nodeHasNoMembersTest(java.lang.String path)
NOT YET DOCUMENTED
|
org.dom4j.Element |
nodeNotExistsTest(java.lang.String path)
Creates an element that tests for the NON-existence of an instance document
node at the given path
|
static java.lang.String |
normalizeXPath(java.lang.String encodedXPpath)
Removes any and all indexing information from an XPath.
|
org.dom4j.Element |
parentNodeExistsTest(java.lang.String xpath)
Creates a test for the existance of the parentNode of the node being
rendered
|
org.dom4j.Element |
parentNodeNotExistsTest(java.lang.String xpath)
NOT YET DOCUMENTED
|
static void |
setDebug(boolean bool)
Sets the debug attribute of the RendererHelper class
|
void |
setFormBeanName(java.lang.String beanName)
Sets the formBeanName attribute of the RendererHelper object
|
static void |
setLogging(boolean verbose)
Sets the logging attribute of the RendererHelper class
|
org.dom4j.Element |
viewNodeTest(java.lang.String xpath)
Used by the viewing classes (not the editing classes) to test that a node
exists and has content.
|
public static final int DEFAULT_TEXT_INPUT_SIZE
public boolean showElementDebugInfo
public boolean showLabelDebugInfo
public int counter
public RendererHelper(org.dom4j.Element root, MetaDataFramework framework, java.lang.String formBeanName, java.lang.String renderer)
EditorViewerRenderer
,
for which the renderer cannot be obtained from the MetaDataFramework.root
- Description of the Parameterframework
- Description of the ParameterformBeanName
- Description of the Parameterrenderer
- Description of the Parameterpublic RendererHelper(org.dom4j.Element root, MetaDataFramework framework, java.lang.String formBeanName)
root
- root Element
to be renderedframework
- MetaDataFramework representing the XML Schema to be
usedformBeanName
- Description of the Parameterpublic void attachElementDebugInfo(org.dom4j.Element target, java.lang.String displayText, java.lang.String borderColor)
target
- NOT YET DOCUMENTEDdisplayText
- NOT YET DOCUMENTEDborderColor
- NOT YET DOCUMENTEDpublic void embedDebugInfo(org.dom4j.Element e, java.lang.String s)
e
- NOT YET DOCUMENTEDs
- NOT YET DOCUMENTEDpublic final RendererImpl getRenderer(java.lang.String xpath, org.dom4j.Element parent)
xpath
- xpath for node to be renderedparent
- parent element to which to attach rendered nodepublic final RendererImpl getRenderer(java.lang.String xpath, org.dom4j.Element parent, GlobalDef typeDef)
xpath
- xpath for node to be renderedparent
- parent element to which to attach rendered nodetypeDef
- NOT YET DOCUMENTEDpublic static java.lang.String normalizeXPath(java.lang.String encodedXPpath)
encodedXPpath
- Description of the Parameterpublic java.lang.String getRendererClassName()
public int getMaxLen(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic java.lang.String getFormBeanName()
public void setFormBeanName(java.lang.String beanName)
beanName
- The new formBeanName valuepublic SchemaHelper getSchemaHelper()
public MetaDataFramework getFramework()
public org.dom4j.Element getRoot()
public boolean hasMuiGroupInfo(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic boolean hasVocabLayout(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic boolean hasFieldInfo(java.lang.String xpath)
xpath
- Description of the Parameterpublic FieldInfoReader getFieldInfo(java.lang.String xpath)
xpath
- Description of the Parameterpublic boolean hasInputHelper(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic java.lang.String getInputHelperFile(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic int getBaseLevel()
public static final java.lang.String encodeIndexId(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic static final java.lang.String jspQuotedString(java.lang.String s)
s
- Description of the Parameterpublic static org.dom4j.Element jspInclude(java.lang.String page)
page
- NOT YET DOCUMENTEDpublic org.dom4j.Element parentNodeExistsTest(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic org.dom4j.Element parentNodeNotExistsTest(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic org.dom4j.Element nodeExistsTest(java.lang.String path)
path
- Description of the Parameterpublic org.dom4j.Element nodeHasChildrenTest(java.lang.String path)
path
- NOT YET DOCUMENTEDpublic org.dom4j.Element nodeHasMembersTest(java.lang.String path)
path
- NOT YET DOCUMENTEDpublic org.dom4j.Element nodeHasNoMembersTest(java.lang.String path)
path
- NOT YET DOCUMENTEDpublic org.dom4j.Element acceptsNewSiblingTest(java.lang.String path)
path
- NOT YET DOCUMENTEDpublic org.dom4j.Element acceptsNewChioceTest(java.lang.String path)
path
- NOT YET DOCUMENTEDpublic org.dom4j.Element nodeNotExistsTest(java.lang.String path)
path
- Description of the Parameterpublic org.dom4j.Element viewNodeTest(java.lang.String xpath)
NOTE: should this method be ABSTRACT here, and only instantiated in DcsView utils?? (it must be at least declared here, since it is referenced from the renderer, which has obtained utils as RenderUtils.
xpath
- NOT YET DOCUMENTEDpublic void attachMessages(org.dom4j.Element container, java.lang.String xpath)
container
- Description of the Parameterxpath
- NOT YET DOCUMENTEDpublic void attachToolHelp(org.dom4j.Element e, java.lang.String helpMsg)
e
- The element to recieve the tool helphelpMsg
- Description of the Parameterpublic java.lang.String getToolHelp(java.lang.String s)
FieldInfoReader
for the xpath. If a FieldInfoReader cannot be found,
return the input string (encoded so whether an xpath or a regular string,
there won't be a javascript error)..s
- A string that may or may not corrrespond to a field that has
metadata-vocab definition informationpublic static void setLogging(boolean verbose)
verbose
- The new logging valuepublic void destroy()
public static void setDebug(boolean bool)
bool
- The new debug value