|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.controller.ControllerElement
com.jcorporate.expresso.core.controller.Block
A Block is a logical grouping of Expresso Controller Elements used for nesting.
The following types are recognized by the expresso framework and automatically rendered: You may add your own types or ignore them if you are doing your own page rendering.
header-row: Renders each subobject in it's own cell with the appropriate jc-header class Make the cells pipe-delimited strings
row: Renders all subobjects in one row
borderWidth: Renders the table width a paricular border.
default behavior: Render as a table/nested table.
| Constructor Summary | |
Block()
Instantiation Constructor. |
|
Block(String newName)
Convenience constructor - to make a new Block object with a specific name. |
|
| Method Summary | |
void |
add(ControllerElement element)
Add an element to this Block |
Object |
clone()
Generate a copy of this current Block |
static ControllerElement |
fromXML(org.w3c.dom.Node n)
Return a controller element based upon the xml fragment |
Block |
getBlock(String blockName)
Retrieve a newsted Block by name. |
Vector |
getBlocks()
Retrieve a list of blocks contained within this Block |
String |
getFormEncoding()
Retrieve the form encoding attribute of this block |
String |
getFormMethod()
Get the form method whether GET or POST |
Transition |
getFormTransition()
Get the Form Transition |
Input |
getInput(String inputName)
Retrieve a nested input by name. |
Vector |
getInputs()
Get the nested Inputs |
Map |
getNamedBlocks()
Retrieve the Blocks as a map so that JSTL can cope with navigating the ControllerResponse through a named fashion |
Map |
getNamedInputs()
Retrieve the inputs as a map so that JSTL can cope with navigating the ControllerResponse through a named fashion |
Map |
getNamedOutputs()
Retrieve the outputs as a map so that JSTL can cope with navigating the ControllerResponse through a named fashion |
Map |
getNamedTransitions()
Retrieve the transitions as a map so that JSTL can cope with navigating the ControllerResponse through a named fashion |
int |
getNumContents()
Get the number of elements contained within the nested block |
Output |
getOutput(String outputName)
Retrieve a nested output by name. |
Vector |
getOutputs()
Retrieve a list of Outputs nested wtihin this block |
Transition |
getTransition(String transitionName)
Retrieve a nested transition by name. |
Vector |
getTransitions()
Retrieve a list of Transitions nested wtihin this block |
boolean |
isForm()
Return true if the form attribute for this block has been set |
void |
removeNested(ControllerElement elementToRemove)
Remove an element from the nested elements for this item |
void |
setForm(String isForm)
Set whether this form is true or not. |
void |
setFormEncoding(String encoding)
Set the encoding attribute for the block form |
void |
setFormMethod(String method)
Set the form method. |
void |
setFormTransition(Transition a)
Sets the form transition |
protected FastStringBuffer |
toNestedXML(FastStringBuffer stream,
String blockLabel,
Vector elements)
|
FastStringBuffer |
toXML(FastStringBuffer stream)
Concert the object to an xml fragment. |
| Methods inherited from class com.jcorporate.expresso.core.controller.ControllerElement |
addNested, allNested, fromXML, getAttribute, getAttributes, getAttributesOrNull, getContent, getContents, getControllerResponse, getDescription, getDisplayLength, getLabel, getLines, getName, getNested, getNested, getNestedCount, getNestedIterator, getNestedMap, getNestedOrNull, getParent, getTitle, getType, remove, setAttribute, setControllerResponse, setDescription, setDisplayLength, setLabel, setLines, setName, setParent, setType |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Block()
public Block(String newName)
newName - The new name of the block| Method Detail |
public void add(ControllerElement element)
element - an element to be addedpublic Map getNamedTransitions()
public Map getNamedOutputs()
public Map getNamedInputs()
public Map getNamedBlocks()
public void removeNested(ControllerElement elementToRemove)
throws ControllerException
removeNested in class ControllerElementelementToRemove - The element to be removed from the list of
nested items.
ControllerException - if there is no such item nested in this item
public Object clone()
throws CloneNotSupportedException
clone in class ControllerElementCloneNotSupportedException - as per the API spec.
public static ControllerElement fromXML(org.w3c.dom.Node n)
throws ControllerException
n - a DOM Node that we extract the internal elements
ControllerException - if unable to build itself from the DOM nodepublic Vector getBlocks()
public Block getBlock(String blockName)
blockName - the name of the block to retrieve
public Input getInput(String inputName)
inputName - the name of the block to retrieve
public Output getOutput(String outputName)
outputName - the name of the block to retrieve
public Transition getTransition(String transitionName)
transitionName - the name of the block to retrieve
public String getFormEncoding()
public String getFormMethod()
public Transition getFormTransition()
public Vector getInputs()
public int getNumContents()
public Vector getOutputs()
public Vector getTransitions()
public boolean isForm()
public void setForm(String isForm)
throws ControllerException
isForm - either 'true' or 'false' (lower case)
ControllerException - if the methods are invalid
public void setFormEncoding(String encoding)
throws ControllerException
encoding - java.lang.String
ControllerException - if the attribute is unable to be thrown
public void setFormMethod(String method)
throws ControllerException
method - The string get or post (lower case)
ControllerException - upon invalid argument
public void setFormTransition(Transition a)
throws ControllerException
a - a Transition that is the equiv of the 'submit' button on the
form.
ControllerException - if the transition is nullpublic FastStringBuffer toXML(FastStringBuffer stream)
toXML in class ControllerElementstream - an instantiated FastStringBuffer to which we are supposed
to append to.
protected FastStringBuffer toNestedXML(FastStringBuffer stream,
String blockLabel,
Vector elements)
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||