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

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

public class AccountingLineViewOverrideField
extends Object
implements RenderableElement

An override field to be displayed for a field


Constructor Summary
AccountingLineViewOverrideField(AccountingLineViewField field, AccountingLineViewOverrideFieldDefinition definition, Class<? extends AccountingLine> accountingLineClass)
          Constructs a AccountingLineViewOverrideField
 
Method Summary
 void appendFields(List<org.kuali.rice.kns.web.ui.Field> fields)
          Adds our override field (though not our override needed field - we'll let Struts handle the value population on that
protected  String getOverrideNeededValue(AccountingLine accountingLine)
          Retrieves the value of the override needed value associated with the override field
 boolean isActionBlock()
          This is not an action block
 boolean isEmpty()
          Empty if our parent AccountingLineViewField is empty
 boolean isHidden()
          Hidden if our parent AccountingLineViewField is hidden
 void populateWithTabIndexIfRequested(int reallyHighIndex)
          Allows the arbitrarily high tab index to be set for controls
 void renderElement(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag, AccountingLineRenderingContext renderingContext)
          Renders this element
 void setAccountingLineProperty(String propertyPrefix)
          Sets the accounting Line Property
 void transformField(AccountingLineFieldRenderingTransformation fieldTransformation, AccountingLine accountingLine, Map unconvertedValues)
          Runs a field transformation against all the overrides encapsulated within this field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountingLineViewOverrideField

public AccountingLineViewOverrideField(AccountingLineViewField field,
                                       AccountingLineViewOverrideFieldDefinition definition,
                                       Class<? extends AccountingLine> accountingLineClass)
Constructs a AccountingLineViewOverrideField

Parameters:
field - the owning accounting line view field
accountingLineClass - the class of the accounting line we're rendering
Method Detail

appendFields

public void appendFields(List<org.kuali.rice.kns.web.ui.Field> fields)
Adds our override field (though not our override needed field - we'll let Struts handle the value population on that

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()
Empty if our parent AccountingLineViewField is 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()
Hidden if our parent AccountingLineViewField is hidden

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

populateWithTabIndexIfRequested

public void populateWithTabIndexIfRequested(int reallyHighIndex)
Description copied from interface: RenderableElement
Allows the arbitrarily high tab index to be set for controls

Specified by:
populateWithTabIndexIfRequested in interface RenderableElement
Parameters:
reallyHighIndex - a really high index for elements who should not be tabbed to
See Also:
org.kuali.kfs.sys.document.web.RenderableElement#populateWithTabIndexIfRequested(int[], int)

renderElement

public void renderElement(javax.servlet.jsp.PageContext pageContext,
                          javax.servlet.jsp.tagext.Tag parentTag,
                          AccountingLineRenderingContext renderingContext)
                   throws javax.servlet.jsp.JspException
Description copied from interface: RenderableElement
Renders 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)

getOverrideNeededValue

protected String getOverrideNeededValue(AccountingLine accountingLine)
Retrieves the value of the override needed value associated with the override field

Parameters:
accountingLine - the accounting line to get the override needed value from
Returns:
a "Yes" if the override needed value is true, "No" if it is false

transformField

public void transformField(AccountingLineFieldRenderingTransformation fieldTransformation,
                           AccountingLine accountingLine,
                           Map unconvertedValues)
Runs a field transformation against all the overrides encapsulated within this field

Parameters:
fieldTransformation - the field transformation which will utterly change our fields
accountingLine - the accounting line being rendered
unconvertedValues - a Map of unconvertedValues

setAccountingLineProperty

public void setAccountingLineProperty(String propertyPrefix)
Sets the accounting Line Property

Parameters:
propertyPrefix - the accounting line property


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