|
||||||||||
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.CollectionGroupLineBuilder
public class CollectionGroupLineBuilder
Process configuration from the collection group to prepare components for a new line and invokes the associated layout manager to add the line.
Constructor Summary | |
---|---|
CollectionGroupLineBuilder(LineBuilderContext lineBuilderContext)
|
Method Summary | |
---|---|
protected void |
addUnauthorizedBindingInfo()
Adds a BindingInfo instance for the given binding
path to the collection groups unauthorized list. |
protected void |
adjustFieldBindingAndId(List<Field> lineFields)
Adjusts the binding path for the given fields to match the collections path, and updates the field ids to contain a suffix for the line. |
protected void |
applyLineFieldAuthorizationAndPresentationLogic(boolean readOnlyLine,
List<Field> lineFields,
List<? extends Component> actionList)
Iterates through the line fields and checks the view field authorization using the view's configured authorizer and presentation controller. |
protected void |
applyOnChangeForSave(List<Field> lineFields)
If CollectionGroup.isRenderSaveLineActions() is true and the line has been added by the user, on change
script is added to any controls in the line to enable the save action. |
void |
buildLine()
Invoked to build a line in the collection. |
protected void |
buildSubCollectionFieldGroups()
For each configured sub collection of the collection group, creates a field group by copying CollectionLayoutManager.getSubCollectionFieldGroupPrototype() and adds
to a list which is stored in the line context. |
protected boolean |
checkEditLineAuthorization()
Determines whether the user is authorized to the edit the line. |
protected boolean |
checkEditLineAuthorizationAndPresentationLogic()
Invokes the view's configured authorizer and presentation controller to determine if the user has permission to edit the line (if a permission has been established). |
protected boolean |
checkSubCollectionRender(CollectionGroup subCollectionGroup)
Checks whether the given sub-collection should be rendered, any conditional render string is evaluated. |
protected boolean |
checkViewLineAuthorization()
Determines whether the user is authorized to the view the line. |
protected boolean |
checkViewLineAuthorizationAndPresentationLogic()
Invokes the view's configured authorizer and presentation controller to determine if the user has permission to view the line (if a permission has been established). |
protected Map<String,Object> |
getContextForField(View view,
CollectionGroup collectionGroup,
Field field)
Helper method to build the context for a field (needed because the apply model phase for line fields has not been applied yet and their full context not set) |
protected List<? extends Component> |
initializeLineItems()
Copies either the collections groups items or add line items to a list of components that will be used for the collection line. |
void |
preprocessLine()
Performs various preprocessing of the line components and configuration. |
List<Field> |
processAnyRemoteFieldsHolder(CollectionGroup group,
List<? extends Component> items)
Iterates through the given items checking for RemotableFieldsHolder , if found
the holder is invoked to retrieved the remotable fields and translate to attribute fields. |
protected List<Field> |
removeNonRenderLineFields(List<Field> lineFields)
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. |
protected void |
setFocusOnIdForActions(List<Action> actions,
List<Field> lineFields)
For any actions with focus id UifConstants.Order.LINE_FIRST , the focus id
is replaced to match to id of the first control in the line. |
protected void |
setupAddLineControlValidation(List<Field> lineFields)
Add additional information to the group and fields in the add line to allow for correct add control selection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollectionGroupLineBuilder(LineBuilderContext lineBuilderContext)
Method Detail |
---|
public void buildLine()
First the context for the line is preprocessed in preprocessLine()
.
After preprocessing the configured layout manager is invoked to place the line into the layout.
public void preprocessLine()
Preprocessing includes:
protected List<? extends Component> initializeLineItems()
public List<Field> processAnyRemoteFieldsHolder(CollectionGroup group, List<? extends Component> items)
RemotableFieldsHolder
, if found
the holder is invoked to retrieved the remotable fields and translate to attribute fields.
The translated list is then inserted into the returned list at the position of the holder
group
- collection group instance to check for any remotable fields holderitems
- list of items to processprotected void adjustFieldBindingAndId(List<Field> lineFields)
lineFields
- list of fields to updateprotected void setFocusOnIdForActions(List<Action> actions, List<Field> lineFields)
UifConstants.Order.LINE_FIRST
, the focus id
is replaced to match to id of the first control in the line.
actions
- list of actions to potientially updatelineFields
- list of line fields, the control for the first field in the list
will be used for the focus idprotected void applyOnChangeForSave(List<Field> lineFields)
CollectionGroup.isRenderSaveLineActions()
is true and the line has been added by the user, on change
script is added to any controls in the line to enable the save action.
lineFields
- list of line fieldsprotected List<Field> removeNonRenderLineFields(List<Field> lineFields)
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
lineFields
- list of fields configured for the line
protected boolean checkViewLineAuthorization()
protected boolean checkViewLineAuthorizationAndPresentationLogic()
protected boolean checkEditLineAuthorization()
protected boolean checkEditLineAuthorizationAndPresentationLogic()
protected void addUnauthorizedBindingInfo()
BindingInfo
instance for the given binding
path to the collection groups unauthorized list.
protected void applyLineFieldAuthorizationAndPresentationLogic(boolean readOnlyLine, List<Field> lineFields, List<? extends Component> actionList)
If the field is viewable, then sets the edit field authorization. Finally iterates through the line actions invoking the authorizer and presentation controller to authorizer the action
readOnlyLine
- flag indicating whether the line has been marked as read only (which will force the fields
to be read only)lineFields
- list of fields instances for the lineactionList
- list of action field instances for the lineprotected void buildSubCollectionFieldGroups()
CollectionLayoutManager.getSubCollectionFieldGroupPrototype()
and adds
to a list which is stored in the line context.
protected boolean checkSubCollectionRender(CollectionGroup subCollectionGroup)
subCollectionGroup
- sub collection group to check render status for
protected void setupAddLineControlValidation(List<Field> lineFields)
protected Map<String,Object> getContextForField(View view, CollectionGroup collectionGroup, Field field)
view
- view instance the field belongs tocollectionGroup
- collection group instance the field belongs tofield
- field instance to build context for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |