|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatwire.cs.ui.view.renderer.attribute.BaseRenderer
com.fatwire.cs.ui.view.renderer.attribute.BasicDataRenderer
public abstract class BasicDataRenderer
A convenience base class for renderer implementations. Extending classes, in
most cases, needs to provide an implementation for
this.renderEdit(AttributeData,
com.fatwire.cs.ui.view.renderer.AttributeDataBinding , AttributeDef ,
String )
Field Summary | |
---|---|
static java.lang.String |
_20_PERCENT
|
static java.lang.String |
_80_PERCENT
|
protected static java.lang.String |
CENTER
|
static java.lang.String |
CSTEXT_ALIGN_RIGHT
|
Constructor Summary | |
---|---|
BasicDataRenderer()
|
Method Summary | |
---|---|
void |
addNewField(ActionEvent event)
|
protected HtmlRowLayout |
createAddNew(AttributeDef def,
java.lang.String methodBinding,
Asset.AttributeType attributeType)
Creates a UIComponent bound to the 'Add New' functionality of multi valued attributes. |
protected HtmlRowLayout |
createAddSelectedItems(AttributeDef def,
AttributeDataBinding binding,
Asset.AttributeType attributeType)
Creates a UIComponent bound to the 'Add New' functionality of multi valued attributes. |
protected java.util.List<UIComponent> |
createAttributeButtons(AttributeDef def,
AttributeDataBinding binding,
int numOfItems,
int curIndex,
Asset.AttributeType attributeType)
Creates multi valued attribute buttons (Add New, Move up, Move down and Remove) |
protected CoreCommandLink |
createCreateNew(AttributeDef def,
java.lang.String methodBinding,
Asset.AttributeType attributeType)
Create the button used to create new asset |
protected UIComponent |
createDownButton(AttributeDef def,
java.lang.String methodBinding,
int curIndex,
Asset.AttributeType attributeType)
Creates a UIComponent bound to ordering ('move down') for multi valued attributes. |
protected UIComponent |
createRemoveButton(AttributeDef def,
java.lang.String methodBinding,
int curIndex,
Asset.AttributeType attributeType)
Creates a UIComponent bound to remove for multi valued attributes. |
protected UIComponent |
createUpButton(AttributeDef def,
java.lang.String methodBinding,
int curIndex,
Asset.AttributeType attributeType)
Creates a UIComponent bound to ordering ('move up') for multi valued attributes. |
protected java.lang.String |
getLabelText(java.lang.Object value,
AttributeDef def)
|
protected CoreOutputText |
getNoValueText()
|
protected boolean |
isAddNewButtonEnabled(AttributeDef def)
Custom Attribute Renderer can override this to disable the add new button in lieu of there own implementation |
protected boolean |
isAddSelectedEnabled(AttributeDef def,
AttributeEditor editor)
Custom Attribute Renderer can override this to disable the show assets , link asset & link parent new button in lieu of there own implementation |
protected boolean |
isCreateNewEnabled(AttributeDef def,
AttributeEditor editor)
Custom Attribute Renderer can override this to disable the create new button in lieu of there own implementation |
protected boolean |
isEmpty(java.lang.String input)
|
protected boolean |
isRemoveButtonEnabled(AttributeDef def,
int currentIndex,
int totalItems)
Custom Attribute Renderer can override this to disable the delete button in lieu of there own implementation |
protected boolean |
isUpDownButtonEnabled(AttributeDef def)
Custom Attribute Renderer can override this to disable the up button in lieu of there own implementation |
void |
moveDown(ActionEvent event)
|
void |
moveUp(ActionEvent event)
|
protected void |
placeControlsAndLabel(RenderedComponents renderedComponents)
Places the controls and label in two columns.If the renderers need a different layout they can overwrite it. |
void |
removeItem(ActionEvent event)
|
UIComponent |
render(RenderDataContext renderContext)
Renders an attribute's data. |
protected java.util.List<UIComponent> |
renderData(RenderDataContext renderContext)
Generates components that are to be displayed in Edit mode. |
Methods inherited from class com.fatwire.cs.ui.view.renderer.attribute.BaseRenderer |
---|
createLabel, createList, createText, createText, formatId, generateID, generateLabelID, getContext, isMultiValued, isMultiValueOrdered, isSingleValued, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CSTEXT_ALIGN_RIGHT
public static final java.lang.String _80_PERCENT
public static final java.lang.String _20_PERCENT
protected static final java.lang.String CENTER
Constructor Detail |
---|
public BasicDataRenderer()
Method Detail |
---|
public UIComponent render(RenderDataContext renderContext) throws UIException
AttributeDataRenderer
render
in interface AttributeDataRenderer
UIException
protected java.util.List<UIComponent> renderData(RenderDataContext renderContext) throws UIException
RenderDataContext
- renderContext information for this attribute
UIException
protected void placeControlsAndLabel(RenderedComponents renderedComponents)
cotLabel
- controls
- componentRow
- protected HtmlRowLayout createAddNew(AttributeDef def, java.lang.String methodBinding, Asset.AttributeType attributeType)
methodBinding
- method to bind to upon 'Add New'
protected CoreCommandLink createCreateNew(AttributeDef def, java.lang.String methodBinding, Asset.AttributeType attributeType)
def
- methodBinding
-
protected UIComponent createUpButton(AttributeDef def, java.lang.String methodBinding, int curIndex, Asset.AttributeType attributeType)
def
- definition of the attribute to be painted.methodBinding
- method to bind to upon 'move up'curIndex
- current index of the multi valued attribute's item.
protected UIComponent createDownButton(AttributeDef def, java.lang.String methodBinding, int curIndex, Asset.AttributeType attributeType)
def
- definition of the attribute to be painted.methodBinding
- method to bind to upon 'move down'curIndex
- current index of the multi valued attribute's item.
protected UIComponent createRemoveButton(AttributeDef def, java.lang.String methodBinding, int curIndex, Asset.AttributeType attributeType)
def
- definition of the attribute to be painted.methodBinding
- method to bind to upon 'remove item'curIndex
- current index of the multi valued attribute's item.
protected java.util.List<UIComponent> createAttributeButtons(AttributeDef def, AttributeDataBinding binding, int numOfItems, int curIndex, Asset.AttributeType attributeType)
def
- definition of the attribute to be painted.binding
- dynamic binding informationnumOfItems
- Number of items in the attribute datacurIndex
- Current index of the attribute item.
protected boolean isAddNewButtonEnabled(AttributeDef def)
protected boolean isAddSelectedEnabled(AttributeDef def, AttributeEditor editor)
protected boolean isCreateNewEnabled(AttributeDef def, AttributeEditor editor)
protected boolean isUpDownButtonEnabled(AttributeDef def)
protected boolean isRemoveButtonEnabled(AttributeDef def, int currentIndex, int totalItems)
currentIndex
- is 0 based
protected HtmlRowLayout createAddSelectedItems(AttributeDef def, AttributeDataBinding binding, Asset.AttributeType attributeType)
def
- definition of the attribute to be painted.methodBinding
- method to bind to upon 'Add New'
public void addNewField(ActionEvent event)
addNewField
in interface AdvancedAttributeRenderer
public void moveUp(ActionEvent event)
moveUp
in interface AdvancedAttributeRenderer
public void moveDown(ActionEvent event)
moveDown
in interface AdvancedAttributeRenderer
public void removeItem(ActionEvent event)
removeItem
in interface AdvancedAttributeRenderer
protected java.lang.String getLabelText(java.lang.Object value, AttributeDef def)
protected boolean isEmpty(java.lang.String input)
protected CoreOutputText getNoValueText()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |