DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.autoform.mde
Class MdeComplexType

java.lang.Object
  extended by org.dlese.dpc.schemedit.autoform.mde.MdeNode
      extended by org.dlese.dpc.schemedit.autoform.mde.MdeComplexType
Direct Known Subclasses:
MdeChoice, MdeDerivedContentModel, MdeDerivedTextOnlyModel, MdeModelGroup, MdeSequence

public class MdeComplexType
extends MdeNode

Renders JSP for metadata editing but is "Simple" in the sense that it provides no control for adding new elements or deleting optional elements. Used as a superClass for other JSP-based renderers, such as DleseEditorRenderer.

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
MdeComplexType(RendererImpl renderer)
          Constructor for the MdeComplexType object
 
Method Summary
protected  Element getChoiceDeleteController(String itemPath, String elementName)
          Create a controller for deleting a repeating item.
protected  Element getComplexTypeBox()
          Creates a "box" (a decorated Div element) containing this element's id and display state.
protected  Element getRepeatComplexSingletonControl()
          Produces "new item" controller that is attached to the field label of a repeating element, and appears only when there are NO children.
protected  String getRepeatingComplexSingletonChildPath()
          Finds the xpath to a repeating child element if the current node contains one.
 Element getRequiredMultiSelectControl()
          Create "choose" controller for the case where an empty requiredMultiSelect node is closed.
protected  boolean hasRepeatingComplexSingletonChild()
          Returns true if the current node contains a single repeating child element that is not an enumeration.
protected  List orderSubElements(List children)
          Order a list of elements so that the attributes are first.
protected  void prtln(String s)
          NOT YET DOCUMENTED
 void render()
          Render this complex type element
 void renderSubElements()
          Render the subitems of the current ComplexType element by walking the children elements of the type definition.
 void renderSubElements(GlobalDef proxyTypeDef)
          Render the subelements of specified proxyTypeDef, used to render derived models.
 void renderSubElements(List subElements)
          Render the given subElements (or those of the current ComplexType if no subElements are provided).
static void setDebug(boolean bool)
          Sets the debug attribute of the MdeComplexType class
 
Methods 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MdeComplexType

public MdeComplexType(RendererImpl renderer)
Constructor for the MdeComplexType object

Parameters:
renderer - NOT YET DOCUMENTED
Method Detail

render

public void render()
Render this complex type element

Specified by:
render in class MdeNode

renderSubElements

public void renderSubElements()
Render the subitems of the current ComplexType element by walking the children elements of the type definition.

This method called by renderComplexTypeConcrete.


renderSubElements

public void renderSubElements(GlobalDef proxyTypeDef)
Render the subelements of specified proxyTypeDef, used to render derived models.

Parameters:
proxyTypeDef - NOT YET DOCUMENTED

renderSubElements

public void renderSubElements(List subElements)
Render the given subElements (or those of the current ComplexType if no subElements are provided). This method called by renderComplexTypeConcrete.

Parameters:
subElements - A list of elements to be rendered.

orderSubElements

protected List orderSubElements(List children)
Order a list of elements so that the attributes are first. This is used by renderSubElements so that the attributes are shown first (before subelements) in the form

Parameters:
children - a list of elements, some of which may be attributes
Returns:
list re-ordered to put attributes at top of list

getRequiredMultiSelectControl

public Element getRequiredMultiSelectControl()
Create "choose" controller for the case where an empty requiredMultiSelect node is closed. Called from renderComplexTypeConcrete, this controller provides a prompt for user when the required multiselect boxes are empty and not visible

Returns:
The requiredMultiSelectControl value

getChoiceDeleteController

protected Element getChoiceDeleteController(String itemPath,
                                            String elementName)
Create a controller for deleting a repeating item.

Parameters:
itemPath - Description of the Parameter
elementName - Description of the Parameter
Returns:
The repeatingItemController value

getRepeatComplexSingletonControl

protected Element getRepeatComplexSingletonControl()
Produces "new item" controller that is attached to the field label of a repeating element, and appears only when there are NO children. When there ARE children, then the "new item" controller is presented at the bottom of the repeating children.

Returns:
The firstItemControl value

hasRepeatingComplexSingletonChild

protected boolean hasRepeatingComplexSingletonChild()
Returns true if the current node contains a single repeating child element that is not an enumeration.

Returns:
Description of the Return Value

getRepeatingComplexSingletonChildPath

protected String getRepeatingComplexSingletonChildPath()
Finds the xpath to a repeating child element if the current node contains one. If not, return an empty string.

Returns:
The repeatingComplexSingletonChildPath value

getComplexTypeBox

protected Element getComplexTypeBox()
Creates a "box" (a decorated Div element) containing this element's id and display state.

Returns:
The complexTypeBox value

setDebug

public static void setDebug(boolean bool)
Sets the debug attribute of the MdeComplexType class

Parameters:
bool - The new debug value

prtln

protected void prtln(String s)
NOT YET DOCUMENTED

Overrides:
prtln in class MdeNode
Parameters:
s - NOT YET DOCUMENTED

DLESE Tools
v1.6.0