org.kuali.kfs.sys.document.web
Class HideShowBlock

java.lang.Object
  extended by org.kuali.kfs.sys.document.web.HideShowBlock
All Implemented Interfaces:
RenderableElement

public class HideShowBlock
extends Object
implements RenderableElement

A renderable element that renders child elements within a div that can be hidden or displayed


Constructor Summary
HideShowBlock()
           
 
Method Summary
 void appendFields(List<org.kuali.rice.kns.web.ui.Field> fields)
          Has child table rows add any fields they know about to the List
 List<AccountingLineTableRow> getContentRows()
          Gets the contentRows attribute.
 String getFullLabel()
           
 String getLabel()
           
 String getTabKey()
           
 String getTabState()
           
 boolean isActionBlock()
          This is not an action block
 boolean isEmpty()
          Checks if all of the child rows are empty or not; if one isn't empty, then this isn't empty
 boolean isHidden()
          Checks if all the child rows are hidden; if so, then no point in showing this...
 boolean isShowing()
          Determines if this tab should currently be showing or not
 void populateWithTabIndexIfRequested(int reallyHighIndex)
          Has child rows populate with the tab index
 void renderChildRows(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag)
          Forces all children rows to render themselves
 void renderElement(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag, AccountingLineRenderingContext renderingContext)
          Uses a HideShowBlockRenderer to render this element
 void setContentRows(List<AccountingLineTableRow> contentRows)
          Sets the contentRows attribute value.
 void setDefinition(AccountingLineViewHideShowLinesDefinition definition)
          Sets the definition attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HideShowBlock

public HideShowBlock()
Method Detail

appendFields

public void appendFields(List<org.kuali.rice.kns.web.ui.Field> fields)
Has child table rows add any fields they know about to the List

Specified by:
appendFields in interface RenderableElement
See Also:
RenderableElement.appendFields(java.util.List)

isActionBlock

public boolean isActionBlock()
This is not an action block

Specified by:
isActionBlock in interface RenderableElement
Returns:
true if this is an action block, false otherwise
See Also:
RenderableElement.isActionBlock()

isEmpty

public boolean isEmpty()
Checks if all of the child rows are empty or not; if one isn't empty, then this isn't empty

Specified by:
isEmpty in interface RenderableElement
Returns:
true if it should not be rendered, false otherwise
See Also:
RenderableElement.isEmpty()

isHidden

public boolean isHidden()
Checks if all the child rows are hidden; if so, then no point in showing this...

Specified by:
isHidden in interface RenderableElement
Returns:
true if hidden, false otherwise
See Also:
RenderableElement.isHidden()

populateWithTabIndexIfRequested

public void populateWithTabIndexIfRequested(int reallyHighIndex)
Has child rows populate with the tab index

Specified by:
populateWithTabIndexIfRequested in interface RenderableElement
Parameters:
reallyHighIndex - a really high index for elements who should not be tabbed to
See Also:
RenderableElement.populateWithTabIndexIfRequested(int)

renderElement

public void renderElement(javax.servlet.jsp.PageContext pageContext,
                          javax.servlet.jsp.tagext.Tag parentTag,
                          AccountingLineRenderingContext renderingContext)
                   throws javax.servlet.jsp.JspException
Uses a HideShowBlockRenderer to render this element

Specified by:
renderElement in interface RenderableElement
Parameters:
pageContext - the context to render to
parentTag - the parent tag that is requesting this rendering
renderingContext - the context about the accounting line that this element would end up rendering
Throws:
javax.servlet.jsp.JspException
See Also:
RenderableElement.renderElement(javax.servlet.jsp.PageContext, javax.servlet.jsp.tagext.Tag, org.kuali.kfs.sys.document.web.AccountingLineRenderingContext)

renderChildRows

public void renderChildRows(javax.servlet.jsp.PageContext pageContext,
                            javax.servlet.jsp.tagext.Tag parentTag)
                     throws javax.servlet.jsp.JspException
Forces all children rows to render themselves

Parameters:
pageContext - the pageContext to render to
parentTag - the tag requesting all this rendering
Throws:
javax.servlet.jsp.JspException - thrown if something goes wrong

getContentRows

public List<AccountingLineTableRow> getContentRows()
Gets the contentRows attribute.

Returns:
Returns the contentRows.

setContentRows

public void setContentRows(List<AccountingLineTableRow> contentRows)
Sets the contentRows attribute value.

Parameters:
contentRows - The contentRows to set.

setDefinition

public void setDefinition(AccountingLineViewHideShowLinesDefinition definition)
Sets the definition attribute value.

Parameters:
definition - The definition to set.

getTabKey

public String getTabKey()
Returns:
the tab key for this hide/show block

getTabState

public String getTabState()
Returns:
the current tab state

isShowing

public boolean isShowing()
Determines if this tab should currently be showing or not

Returns:
true if the tab shows its contents; false otherwise

getLabel

public String getLabel()
Returns:
the label for this hide/show block

getFullLabel

public String getFullLabel()
Returns:
the concatenation of the group label and this block's label


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.