org.kuali.kfs.sys.document.web.renderers
Class GroupTitleLineRenderer

java.lang.Object
  extended by org.kuali.kfs.sys.document.web.renderers.GroupTitleLineRenderer
All Implemented Interfaces:
CellCountCurious, Renderer

public class GroupTitleLineRenderer
extends Object
implements Renderer, CellCountCurious

Renders the standard group header/import line


Constructor Summary
GroupTitleLineRenderer()
          Constructs a ImportLineRenderer, setting defaults on the tags that will always exist
 
Method Summary
protected  String buildGroupActionsBeginning()
          Builds a tag for the row beginning
protected  String buildGroupActionsColumnEnding()
          Builds the tag for the row beginning
protected  String buildGroupAnchor()
          Builds the unique anchor for this group
protected  String buildRowBeginning()
          Builds a tag for the row beginning
protected  String buildRowEnding()
          Builds the tag for the row beginning
protected  String buildTitleCell()
          Builds the tags for the title cell of the import line
protected  boolean canUpload()
          Determines if an upload can proceed for the accounting line group
 void clear()
          If this object is held in a pool, this method is called before the object is returned to the pool, so that the object can be cleaned up for the next use.
 AccountingDocument getAccountingDocument()
          Gets the accountingDocument attribute.
 AccountingLineGroupDefinition getAccountingLineGroupDefinition()
          Gets the accountingLineGroupDefinition attribute.
 int getCellCount()
          Gets the cellCount attribute.
protected  String getGroupInfix()
          A dumb way to get the group infix that tries to figure out if it's dealing with a source or target line
protected  String getHideImportName()
           
 String getLineCollectionProperty()
          Gets the lineCollectionProperty attribute.
protected  String getShowImportName()
           
protected  String getShowLinkName()
           
 int getTitleCellSpan()
          Gets the titleCellSpan attribute.
protected  String getUploadDivName()
           
protected  String getVariableFriendlyLineCollectionProperty()
           
 boolean isGroupActionsRendered()
          Gets the groupActionsRendered attribute.
 void overrideCanUpload(boolean allowUpload)
          Allows overriding of whether something can be uploaded - though this serves only to turn uploading more off, never more on
 void render(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag)
          Asks this renderer to render
protected  void renderGroupActions(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag)
           
protected  void renderGroupLevelActions(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag)
           
protected  void renderUploadCell(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag)
          Oy, the big one...this one actually renders instead of returning the HTML in a String.
 void setAccountingDocument(AccountingDocument accountingDocument)
          Sets the accountingDocument attribute value.
 void setAccountingLineGroupDefinition(AccountingLineGroupDefinition accountingLineGroupDefinition)
          Sets the accountingLineGroupDefinition attribute value.
 void setCanEdit(boolean canEdit)
          Sets the canEdit attribute value.
 void setCellCount(int cellCount)
          Sets the cellCount attribute value.
 void setGroupActionsRendered(boolean groupActionsRenderred)
          Sets the groupActionsRendered attribute value.
 void setLineCollectionProperty(String lineCollectionProperty)
          Sets the lineCollectionProperty attribute value.
 void setTitleCellSpan(int titleCellSpan)
          Sets the titleCellSpan attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupTitleLineRenderer

public GroupTitleLineRenderer()
Constructs a ImportLineRenderer, setting defaults on the tags that will always exist

Method Detail

clear

public void clear()
Description copied from interface: Renderer
If this object is held in a pool, this method is called before the object is returned to the pool, so that the object can be cleaned up for the next use.

Specified by:
clear in interface Renderer
See Also:
Renderer.clear()

render

public void render(javax.servlet.jsp.PageContext pageContext,
                   javax.servlet.jsp.tagext.Tag parentTag)
            throws javax.servlet.jsp.JspException
Description copied from interface: Renderer
Asks this renderer to render

Specified by:
render in interface Renderer
Parameters:
pageContext - the JSP page context to render to
parentTag - the tag that is the "parent" of this rendering
Throws:
javax.servlet.jsp.JspException
See Also:
org.kuali.kfs.sys.document.web.renderers.Renderer#render(javax.servlet.jsp.PageContext, javax.servlet.jsp.tagext.Tag, org.kuali.core.bo.BusinessObject)

buildRowBeginning

protected String buildRowBeginning()
Builds a tag for the row beginning


buildRowEnding

protected String buildRowEnding()
Builds the tag for the row beginning


renderGroupLevelActions

protected void renderGroupLevelActions(javax.servlet.jsp.PageContext pageContext,
                                       javax.servlet.jsp.tagext.Tag parentTag)
                                throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException

buildGroupActionsBeginning

protected String buildGroupActionsBeginning()
Builds a tag for the row beginning


buildGroupActionsColumnEnding

protected String buildGroupActionsColumnEnding()
Builds the tag for the row beginning


buildTitleCell

protected String buildTitleCell()
Builds the tags for the title cell of the import line

Returns:
the String with the HTML for the title cell

buildGroupAnchor

protected String buildGroupAnchor()
Builds the unique anchor for this group

Returns:
the unique anchor for this group

renderGroupActions

protected void renderGroupActions(javax.servlet.jsp.PageContext pageContext,
                                  javax.servlet.jsp.tagext.Tag parentTag)
                           throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException

getGroupInfix

protected String getGroupInfix()
A dumb way to get the group infix that tries to figure out if it's dealing with a source or target line

Returns:
the String "source" or "target" to populate the buildGroupAnchor

renderUploadCell

protected void renderUploadCell(javax.servlet.jsp.PageContext pageContext,
                                javax.servlet.jsp.tagext.Tag parentTag)
                         throws javax.servlet.jsp.JspException
Oy, the big one...this one actually renders instead of returning the HTML in a String. This is because it's kind of complex (and a likely target for future refactoring)

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

getVariableFriendlyLineCollectionProperty

protected String getVariableFriendlyLineCollectionProperty()
Returns:
the name of the line collection property, but in a form that is okay for javascript variable/function naming

getHideImportName

protected String getHideImportName()
Returns:
the name of the hide import function

getShowImportName

protected String getShowImportName()
Returns:
the name of the show import function

getShowLinkName

protected String getShowLinkName()
Returns:
the name of the show link element

getUploadDivName

protected String getUploadDivName()
Returns:
the name of the upload div

canUpload

protected boolean canUpload()
Determines if an upload can proceed for the accounting line group

Returns:
true if upload is possible, false otherwise

overrideCanUpload

public void overrideCanUpload(boolean allowUpload)
Allows overriding of whether something can be uploaded - though this serves only to turn uploading more off, never more on

Parameters:
allowUpload - should we be allowed to upload?

getCellCount

public int getCellCount()
Gets the cellCount attribute.

Returns:
Returns the cellCount.

setCellCount

public void setCellCount(int cellCount)
Sets the cellCount attribute value.

Specified by:
setCellCount in interface CellCountCurious
Parameters:
cellCount - The cellCount to set.

getAccountingDocument

public AccountingDocument getAccountingDocument()
Gets the accountingDocument attribute.

Returns:
Returns the accountingDocument.

setAccountingDocument

public void setAccountingDocument(AccountingDocument accountingDocument)
Sets the accountingDocument attribute value.

Parameters:
accountingDocument - The accountingDocument to set.

getAccountingLineGroupDefinition

public AccountingLineGroupDefinition getAccountingLineGroupDefinition()
Gets the accountingLineGroupDefinition attribute.

Returns:
Returns the accountingLineGroupDefinition.

setAccountingLineGroupDefinition

public void setAccountingLineGroupDefinition(AccountingLineGroupDefinition accountingLineGroupDefinition)
Sets the accountingLineGroupDefinition attribute value.

Parameters:
accountingLineGroupDefinition - The accountingLineGroupDefinition to set.

getTitleCellSpan

public int getTitleCellSpan()
Gets the titleCellSpan attribute.

Returns:
Returns the titleCellSpan.

setTitleCellSpan

public void setTitleCellSpan(int titleCellSpan)
Sets the titleCellSpan attribute value.

Parameters:
titleCellSpan - The titleCellSpan to set.

getLineCollectionProperty

public String getLineCollectionProperty()
Gets the lineCollectionProperty attribute.

Returns:
Returns the lineCollectionProperty.

setLineCollectionProperty

public void setLineCollectionProperty(String lineCollectionProperty)
Sets the lineCollectionProperty attribute value.

Parameters:
lineCollectionProperty - The lineCollectionProperty to set.

isGroupActionsRendered

public boolean isGroupActionsRendered()
Gets the groupActionsRendered attribute.

Returns:
Returns the groupActionsRendered.

setGroupActionsRendered

public void setGroupActionsRendered(boolean groupActionsRenderred)
Sets the groupActionsRendered attribute value.

Parameters:
groupActionsRendered - The groupActionsRendered to set.

setCanEdit

public void setCanEdit(boolean canEdit)
Sets the canEdit attribute value.

Parameters:
canEdit - The canEdit to set.


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