|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.print.BaseDocumentTag org.ujac.print.tag.BaseElementTag org.ujac.print.tag.BaseLoopTag
public abstract class BaseLoopTag
Name: BaseLoopTag
Description: A base class for loop tags like the <foreach> and <print-table> tag.
Field Summary | |
---|---|
protected boolean |
insertItems
Flag which rules, whether the nested items should be added to the document or not. |
protected SequenceIndex |
iterationIdx
The iteration index. |
protected Object |
sequenceHolder
The sequence holder. |
protected Iterator |
sequenceIterator
The sequence iterator. |
Constructor Summary | |
---|---|
BaseLoopTag(String name)
Constructs a BaseLoopTag instance with specific attributes. |
Method Summary | |
---|---|
void |
closeItem()
Closes the item. |
Object |
getCurrentValue()
Gets the the current value. |
String |
getLoopIdxVariable()
Gets the the loop index variable. |
String |
getLoopVariable()
Gets the the loop variable. |
Object |
getSequenceHolder()
Gets the the sequence holder. |
boolean |
hasNext()
Tells whether or not the sequence iteration has more elements. |
void |
initialize()
Initializes the item. |
boolean |
isFirstLoop()
Tells, whether this is the first iteration loop or not. |
boolean |
isTrue()
Checks whether the condition is true or not. |
void |
openItem()
Opens the item. |
protected void |
postLoopChildItems()
Method called, after the child items are printed. |
protected void |
postRepeatChildItems()
Post-processes the child items of the foreach item. |
protected void |
preLoopChildItems()
Method called, before the child items are printed. |
protected boolean |
preRepeatChildItems()
Pre-processes the child items of the foreach item. |
void |
recordEvent(DocumentEvent event)
Records the given document event. |
protected void |
repeatChildItems()
Repeating the child items of the foreach item. |
void |
setCurrentValue(Object currentValue)
Sets the the current value. |
protected void |
setLoopVariable(String loopVariable)
Sets the the loop variable. |
protected void |
setSequenceHolder(Object sequenceHolder)
Sets the the sequence holder. |
Methods inherited from class org.ujac.print.tag.BaseElementTag |
---|
buildSupportedAttributes, getElementContainer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean insertItems
protected Object sequenceHolder
protected Iterator sequenceIterator
protected SequenceIndex iterationIdx
Constructor Detail |
---|
public BaseLoopTag(String name)
name
- The tag name.Method Detail |
---|
public Object getSequenceHolder()
protected void setSequenceHolder(Object sequenceHolder)
sequenceHolder
- The sequence holder instance to set.public Object getCurrentValue()
public void setCurrentValue(Object currentValue)
currentValue
- The value instance to set.public String getLoopVariable()
protected void setLoopVariable(String loopVariable)
loopVariable
- The loop variable name to set.public String getLoopIdxVariable()
public boolean hasNext()
public void initialize() throws DocumentHandlerException
initialize
in class BaseElementTag
DocumentHandlerException
- If something went badly wrong.public void openItem() throws DocumentHandlerException
openItem
in class BaseElementTag
DocumentHandlerException
- Thrown in case something went wrong while opening the foreach item.public void closeItem() throws DocumentHandlerException
closeItem
in class BaseDocumentTag
DocumentHandlerException
- Thrown in case something went wrong while closing the foreach item.protected void preLoopChildItems() throws DocumentHandlerException
DocumentHandlerException
- Thrown in case something went wrong.protected void postLoopChildItems() throws DocumentHandlerException
DocumentHandlerException
- Thrown in case something went wrong.public boolean isTrue()
public boolean isFirstLoop()
protected boolean preRepeatChildItems() throws DocumentHandlerException
DocumentHandlerException
- Thrown in case something went wrong.protected void postRepeatChildItems() throws DocumentHandlerException
DocumentHandlerException
- Thrown in case something went wrong.protected void repeatChildItems() throws DocumentHandlerException
DocumentHandlerException
- Thrown in case something went wrong while opening ot closing a child item.public void recordEvent(DocumentEvent event)
DocumentEventRecorder
recordEvent
in interface DocumentEventRecorder
event
- The document event to record.DocumentEventRecorder.recordEvent(org.ujac.print.DocumentEvent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |