|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.uif.container.CollectionGroupBuilder
public class CollectionGroupBuilder
Builds out the Field
instances for a collection group with a
series of steps that interact with the configured
CollectionLayoutManager
to assemble the fields as necessary for
the layout
Constructor Summary | |
---|---|
CollectionGroupBuilder()
|
Method Summary | |
---|---|
void |
build(View view,
Object model,
CollectionGroup collectionGroup)
Creates the Field instances that make up the table |
protected void |
buildAddLine(View view,
Object model,
CollectionGroup collectionGroup)
Builds the fields for holding the collection add line and if necessary makes call to setup the new line instance |
protected void |
buildLine(View view,
Object model,
CollectionGroup collectionGroup,
String bindingPath,
List<ActionField> actions,
boolean bindToForm,
Object currentLine,
int lineIndex)
Builds the field instances for the collection line. |
protected boolean |
checkSubCollectionRender(View view,
Object model,
CollectionGroup collectionGroup,
CollectionGroup subCollectionGroup)
Checks whether the given sub-collection should be rendered, any conditional render string is evaluated |
protected List<ActionField> |
getAddLineActions(View view,
Object model,
CollectionGroup collectionGroup)
Creates new ActionField instances for the add line |
protected ExpressionEvaluatorService |
getExpressionEvaluatorService()
|
protected List<ActionField> |
getLineActions(View view,
Object model,
CollectionGroup collectionGroup,
Object collectionLine,
int lineIndex)
Creates new ActionField instances for the line |
void |
initializeNewCollectionLine(View view,
Object model,
CollectionGroup collectionGroup,
boolean clearExistingLine)
Initializes a new instance of the collection class |
protected List<Field> |
removeNonRenderLineFields(View view,
Object model,
CollectionGroup collectionGroup,
List<Field> lineFields,
Object currentLine,
int lineIndex)
Evaluates the render property for the given list of Field
instances for the line and removes any fields from the returned list that
have render false. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollectionGroupBuilder()
Method Detail |
---|
public void build(View view, Object model, CollectionGroup collectionGroup)
Field
instances that make up the table
The corresponding collection is retrieved from the model and iterated
over to create the necessary fields. The binding path for fields that
implement DataBinding
is adjusted to point to the collection
line it is apart of. For example, field 'number' of collection 'accounts'
for line 1 will be set to 'accounts[0].number', and for line 2
'accounts[1].number'. Finally parameters are set on the line's action
fields to indicate what collection and line they apply to.
view
- - View instance the collection belongs tomodel
- - Top level object containing the datacollectionGroup
- - CollectionGroup component for the collectionprotected void buildAddLine(View view, Object model, CollectionGroup collectionGroup)
view
- - view instance the collection belongs tocollectionGroup
- - collection group the layout manager applies tomodel
- - Object containing the view data, should extend UifFormBase
if using framework managed new linesprotected void buildLine(View view, Object model, CollectionGroup collectionGroup, String bindingPath, List<ActionField> actions, boolean bindToForm, Object currentLine, int lineIndex)
CollectionGroup
is made and adjusted
for the line (id and binding). Then a call is made to the
CollectionLayoutManager
to assemble the line as necessary
for the layout
view
- - view instance the collection belongs tomodel
- - top level object containing the datacollectionGroup
- - collection group component for the collectionbindingPath
- - binding path for the line fields (if DataBinding)actions
- - List of actions to set in the lines action columnbindLineToForm
- - whether the bindToForm property on the items bindingInfo
should be set to true (needed for add line)currentLine
- - object instance for the current line, or null if add linelineIndex
- - index of the line in the collection, or -1 if we are
building the add lineprotected List<Field> removeNonRenderLineFields(View view, Object model, CollectionGroup collectionGroup, List<Field> lineFields, Object currentLine, int lineIndex)
Field
instances for the line and removes any fields from the returned list that
have render false. The conditional render string is also taken into
account. This needs to be done here as opposed to during the normal
condition evaluation so the the fields are not used while building the
collection lines
view
- - view instance the collection group belongs tomodel
- - object containing the view datacollectionGroup
- - collection group for the line fieldslineFields
- - list of fields configured for the linecurrentLine
- - object containing the line datalineIndex
- - index of the line in the collection
protected boolean checkSubCollectionRender(View view, Object model, CollectionGroup collectionGroup, CollectionGroup subCollectionGroup)
view
- - view instance the sub collection belongs tomodel
- - object containing the view datacollectionGroup
- - collection group the sub collection belongs tosubCollectionGroup
- - sub collection group to check render status for
protected List<ActionField> getLineActions(View view, Object model, CollectionGroup collectionGroup, Object collectionLine, int lineIndex)
ActionField
instances for the line
Adds context to the action fields for the given line so that the line the action was performed on can be determined when that action is selected
view
- - view instance the collection belongs tomodel
- - top level object containing the datacollectionGroup
- - collection group component for the collectioncollectionLine
- - object instance for the current linelineIndex
- - index of the line the actions should apply toprotected List<ActionField> getAddLineActions(View view, Object model, CollectionGroup collectionGroup)
ActionField
instances for the add line
Adds context to the action fields for the add line so that the collection the action was performed on can be determined
view
- - view instance the collection belongs tomodel
- - top level object containing the datacollectionGroup
- - collection group component for the collectionpublic void initializeNewCollectionLine(View view, Object model, CollectionGroup collectionGroup, boolean clearExistingLine)
If the add line property was not specified for the collection group the
new lines will be added to the generic map on the
UifFormBase
, else it will be added to the property given by
the addLineBindingInfo
New line will only be created if the current line property is null or clearExistingLine is true. In the case of a new line default values are also applied
initializeNewCollectionLine(View, Object, CollectionGroup, boolean)
protected ExpressionEvaluatorService getExpressionEvaluatorService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |