Class MdeRepeatingNode
java.lang.Object
org.dlese.dpc.schemedit.autoform.mde.MdeNode
org.dlese.dpc.schemedit.autoform.mde.MdeRepeatingNode
- Direct Known Subclasses:
MdeRepeatingAnyType,MdeRepeatingComplexType,MdeRepeatingDerivedContentModel,MdeRepeatingDerivedTextOnlyModel,MdeRepeatingSimpleType,MdeRepeatingSubstitutionGroup
Abstract base class for renderning MetadataEditor fields for a repeating
node. Principle contribution is getRepeatingContentBox method, which builds
a box (a "div" element) into which each repetition of the repeating nodes is
placed (by concrete classes).
- Author:
- ostwald
-
Field Summary
Fields inherited from class org.dlese.dpc.schemedit.autoform.mde.MdeNode
df, formBeanName, inputHelperFile, normalizedXPath, parent, renderer, rhelper, schemaNode, sh, typeDef, xpath -
Constructor Summary
ConstructorsConstructorDescriptionMdeRepeatingNode(RendererImpl renderer) Constructor for the MdeRepeatingNode object -
Method Summary
Modifier and TypeMethodDescriptionprotected org.dom4j.ElementRender jsp element for adding a new repeating element that will be shown when there are no existing values for this field in the instance document.protected org.dom4j.ElementgetIteration(String itemPath, String siblingPath, String indexId) Creates a repeatIteration element and attaches it to the parent.protected org.dom4j.ElementgetRepeatingContentBox(String itemPath) Create a "box" for the contents of each repitition of this node, which is filled by the subclasses which build upon this method.protected voidinsertRepeatingDisplaySetup(org.dom4j.Element baseDiv) Creates JSP to set the *id* for a particular node, and then to determine the display_state of that node from the collapseBean and assign it to a javascript variable.org.dom4j.ElementCreate new item controller that goes at the bottom of a repeating node to allow user to create a new element (sibling).protected voidNOT YET DOCUMENTEDabstract voidrender()Render method is supplied by concrete classesstatic voidsetDebug(boolean bool) Sets the debug attribute of the MdeRepeatingNode classMethods inherited from class org.dlese.dpc.schemedit.autoform.mde.MdeNode
addHtmlComment, attachElementDebugInfo, attachElementDebugInfo, attachElementId, attachLabelDebugInfo, attachLabelDebugInfo, attachLabelDebugInfo, bestPracticesLink, embedDebugInfo, getDiv, getDiv, getInputElement, getInputHelperFile, getInstanceSchemaNamespace, getMode, getQualifiedAttributeName, getQualifiedElementName, getRenderedField, getRenderedNoInputField, getRenderedNoInputField, getRenderedNoInputField, getToolHelp, insertDisplaySetup, insertHtmlComment, isDisplayMode, isEditMode, newRenderer, newRenderer
-
Constructor Details
-
MdeRepeatingNode
Constructor for the MdeRepeatingNode object- Parameters:
renderer- the Renderer instance for this node
-
-
Method Details
-
render
public abstract void render()Render method is supplied by concrete classes -
getRepeatingContentBox
Create a "box" for the contents of each repitition of this node, which is filled by the subclasses which build upon this method.- Parameters:
itemPath- xpath with indexing to support iteration- Returns:
- The repeatingContentBox value
-
getIteration
Creates a repeatIteration element and attaches it to the parent. The iteration element takes care of assigning an indexed path (i.e., *itemPath*) to the repeating items. The iteration construct is used as a framework to render the repeating elements (siblings) and their contents.jsp example:
invalid input: '<'logic:iterate indexId="index" id="item" name="sef" property="repeatingMembersOf(/itemRecord/general/keywords/keyword)"> invalid input: '<'c:set var="itemPath" scope="page" value="/itemRecord/general/keywords/keyword_${keword+1}" />- Parameters:
itemPath- path to individual nodes (including indexing)siblingPath- The path shared by each of the repeating nodesindexId- The symbol used to create the index in jsp that differentiates the repeating nodes- Returns:
- A jsp iteration construct in which the repeating nodes are rendered.
-
insertRepeatingDisplaySetup
protected void insertRepeatingDisplaySetup(org.dom4j.Element baseDiv) Creates JSP to set the *id* for a particular node, and then to determine the display_state of that node from the collapseBean and assign it to a javascript variable. These elements all attached to provided baseDiv.- Parameters:
baseDiv- Element to which created elements are attached.
-
newSiblingController
public org.dom4j.Element newSiblingController()Create new item controller that goes at the bottom of a repeating node to allow user to create a new element (sibling).This controller is not displayed in the case when the parent element is empty. In that case, the new item control is displayed with the parent element.
- Returns:
- Control element to add a new sibling to this repeating node.
-
emptyRepeatingElement
protected org.dom4j.Element emptyRepeatingElement()Render jsp element for adding a new repeating element that will be shown when there are no existing values for this field in the instance document.- Returns:
- NOT YET DOCUMENTED
-
setDebug
public static void setDebug(boolean bool) Sets the debug attribute of the MdeRepeatingNode class- Parameters:
bool- The new debug value
-
prtln
NOT YET DOCUMENTED
-