public class ViewerRenderer extends RendererImpl
Shows only elements that are either required or that have values. Element labels have "editMe" links that open a metadata editor to the selected element for editing.
DISPLAY_MODE, EDIT_MODE
df, formBeanName, normalizedXPath, parent, repeatingComplexSingletonChildPath, rhelper, root, schemaNode, sh, typeDef, typeName, xpath
Constructor and Description |
---|
ViewerRenderer() |
Modifier and Type | Method and Description |
---|---|
ComplexTypeLabel |
getComplexTypeLabel(java.lang.String xpath,
java.lang.String siblingPath,
java.lang.String indexId)
Gets the complexTypeLabel attribute of the ViewerRenderer object
|
org.dom4j.Element |
getDeleteController(java.lang.String itemPath,
java.lang.String elementName)
Gets the deleteController attribute of the ViewerRenderer object
|
protected org.dom4j.Element |
getEditMeTag(java.lang.String xpath)
Gets the editMeTag attribute of the ViewerRenderer object
|
protected org.dom4j.Element |
getEditMeTag(java.lang.String xpath,
java.lang.String siblingPath,
java.lang.String indexId)
creates a jsp tag (st:dcsViewEditMeLabel) that renders a label as a link
that will open the metadata editor to this field.
|
org.dom4j.Element |
getInputElement(java.lang.String xpath,
SchemaNode schemaNode,
GlobalDef typeDef)
Gets the inputElement attribute of the ViewerRenderer object
|
org.dom4j.Element |
getMultiSelectInput(java.lang.String xpath)
Renders a multiSelect input (a set of of checkboxes) as an Element.
|
org.dom4j.Element |
getOptionalItemControl(java.lang.String xpath)
View pages do not have conrols!
|
org.dom4j.Element |
getRenderedField_1(java.lang.String xpath,
Label label,
org.dom4j.Element inputField)
Formats the label and value for the current node.
|
org.dom4j.Element |
getRenderedField_2(java.lang.String xpath,
Label label,
org.dom4j.Element inputField)
Gets the labelledInputField_2 attribute of the ViewerRenderer object
|
org.dom4j.Element |
getRenderedField(java.lang.String xpath,
Label label,
org.dom4j.Element inputField)
Gets the labelledInputField attribute of the ViewerRenderer object
|
SimpleTypeLabel |
getSimpleTypeLabel(java.lang.String xpath,
java.lang.String siblingPath,
java.lang.String indexId)
Gets the simpleTypeLabel attribute of the ViewerRenderer object
|
protected org.dom4j.Element |
getStaticSimpleValue(java.lang.String xpath)
Displays the value of the element at specified xpath
|
org.dom4j.Element |
hasValueTest(java.lang.String xpath)
test for whether a node has a value
|
org.dom4j.Element |
missingValueTest(java.lang.String xpath)
test for whether a node has a value
|
void |
renderAttribute()
Render an attribute
|
void |
renderChoice(org.dom4j.Element choiceElement)
Render a choice Compositor
|
void |
renderComplexTypeConcrete()
A complexType is displayed iff: it is required or it satisfies the viewNode
predicate.
|
void |
renderRepeatingElement()
Render a repeating element
|
void |
renderSequence(org.dom4j.Element sequence)
Render a Sequence Compositor
|
void |
renderSimpleTypeConcrete()
Concrete render method for SimpleType elements
|
void |
renderSubElements()
Render the subElements of the current typeDefinition
|
void |
renderSubElements(java.util.List subElements)
Render the provided list of subelements
|
static void |
setDebug(boolean verbose)
Sets the debug attribute of the ViewerRenderer class
|
bestPracticesLink, doInit, getBooleanInput, getComboUnionInput, getComplexTypeLabel, getInputHelperElement, getLabelText, getLanguageInput, getMultiBoxInput, getMultiBoxLabel, getReadOnlyElement, getRenderedField, getRenderMode, getSelectInput, getShowNSPrefixInLabels, getSimpleTypeLabel, getTextAreaInput, getTextAreaInput, getTextInput, getToolHelp, getXpath, isDisplayMode, isEditMode, renderDerivedContentModel, renderDerivedTextOnlyModel, renderInputElement, renderModelGroup, renderRepeatingSubstitutionGroup, renderSubElements, report, setRenderMode, setShowNSPrefixInLabels, showXsdStringElement
doInit, getDiv, getDiv, getLevel, getSchemaNamespace, getSchemaNSPrefix, getXmlFormat, init, jspQuotedString, renderComplexType, renderNode, renderSimpleType
public void renderAttribute()
renderAttribute
in class RendererImpl
public void renderSimpleTypeConcrete()
renderSimpleTypeConcrete
in class RendererImpl
public void renderChoice(org.dom4j.Element choiceElement)
renderChoice
in class RendererImpl
choiceElement
- NOT YET DOCUMENTEDpublic void renderComplexTypeConcrete()
approach:
renderComplexTypeConcrete
in class RendererImpl
public void renderSequence(org.dom4j.Element sequence)
renderSequence
in class RendererImpl
sequence
- The Sequence elementpublic void renderRepeatingElement()
renderRepeatingElement
in class RendererImpl
public void renderSubElements(java.util.List subElements)
renderSubElements
in class RendererImpl
subElements
- list of subElements to renderpublic void renderSubElements()
renderSubElements
in class RendererImpl
public org.dom4j.Element getInputElement(java.lang.String xpath, SchemaNode schemaNode, GlobalDef typeDef)
getInputElement
in class RendererImpl
xpath
- xpath of inputElementschemaNode
- schemaNode of elementtypeDef
- typeDef of elementprotected org.dom4j.Element getStaticSimpleValue(java.lang.String xpath)
xpath
- xpath of element for which we render the valuepublic org.dom4j.Element getMultiSelectInput(java.lang.String xpath)
getMultiSelectInput
in class RendererImpl
xpath
- xpath of element for which we render an inputpublic org.dom4j.Element getOptionalItemControl(java.lang.String xpath)
getOptionalItemControl
in class RendererImpl
xpath
- NOT YET DOCUMENTEDpublic org.dom4j.Element getDeleteController(java.lang.String itemPath, java.lang.String elementName)
getDeleteController
in class RendererImpl
itemPath
- NOT YET DOCUMENTEDelementName
- NOT YET DOCUMENTEDpublic SimpleTypeLabel getSimpleTypeLabel(java.lang.String xpath, java.lang.String siblingPath, java.lang.String indexId)
getSimpleTypeLabel
in class RendererImpl
xpath
- NOT YET DOCUMENTEDsiblingPath
- NOT YET DOCUMENTEDindexId
- NOT YET DOCUMENTEDpublic ComplexTypeLabel getComplexTypeLabel(java.lang.String xpath, java.lang.String siblingPath, java.lang.String indexId)
getComplexTypeLabel
in class RendererImpl
xpath
- normalized xpath to the field for this labelsiblingPath
- xpath to reach all siblingsindexId
- jsp variable used to generate indicies for repeating
fieldsprotected org.dom4j.Element getEditMeTag(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDprotected org.dom4j.Element getEditMeTag(java.lang.String xpath, java.lang.String siblingPath, java.lang.String indexId)
If provided, siblingPath parameter includes indexing (e.g., /record/general_${index+1}_) to make the proper link to an indexed field.
xpath
- NOT YET DOCUMENTEDsiblingPath
- NOT YET DOCUMENTEDindexId
- NOT YET DOCUMENTEDpublic org.dom4j.Element getRenderedField(java.lang.String xpath, Label label, org.dom4j.Element inputField)
getRenderedField
in class RendererImpl
xpath
- NOT YET DOCUMENTEDlabel
- NOT YET DOCUMENTEDinputField
- NOT YET DOCUMENTEDpublic org.dom4j.Element getRenderedField_2(java.lang.String xpath, Label label, org.dom4j.Element inputField)
xpath
- NOT YET DOCUMENTEDlabel
- NOT YET DOCUMENTEDinputField
- NOT YET DOCUMENTEDpublic org.dom4j.Element getRenderedField_1(java.lang.String xpath, Label label, org.dom4j.Element inputField)
NOTE: this probably shouldn't be here, since it is misnamed (it does not have anything to do with "input"). To fix this problem we have to change super classes to differentiate between renders that create edit inputs and those that simply display values.
xpath
- NOT YET DOCUMENTEDlabel
- NOT YET DOCUMENTEDinputField
- NOT YET DOCUMENTEDpublic org.dom4j.Element missingValueTest(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic org.dom4j.Element hasValueTest(java.lang.String xpath)
xpath
- NOT YET DOCUMENTEDpublic static void setDebug(boolean verbose)
verbose
- The new debug value