Controller for Table
The TableController is a controller which wraps Table control.
It extends a TabularController.
Usage:
Code
<table id="entitiesTable" entityURI="adi://org.adichatz.jpa/jpa/EntityMM" layoutData="height 0:n:n, w 0:n:n">
<contentProvider xsi:type="nativeContentProviderType" fieldName="entities"/>
<tableColumn sorted="true" id="entityIdTC" text="#MSG(editorOutline, entity)">
<columnText>return row.getEntityMM().getEntityId();</columnText>
<columnImage>import org.adichatz.common.ejb.util.IEntityConstants
if (#BEAN(editorOutline).hasError(row))
return #IMG(IMG_ERROR_ENTITY.png);
switch (row.getStatus()) {
case IEntityConstants.MERGE:
return #IMG(IMG_UPDATE_ENTITY.png);
case IEntityConstants.REMOVE:
return #IMG(IMG_DELETE_ENTITY.png);
case IEntityConstants.PERSIST:
return #IMG(IMG_CREATE_ENTITY.png);
}
return #IMG(IMG_ENTITY.png);
</columnImage>
</tableColumn>
<tableColumn sorted="true" id="identifierTC" text="#MSG(editorOutline, identifier)">
<columnText>return String.valueOf(row.getBeanId());</columnText>
</tableColumn>
</table>
Overview
Explanations
| entityURI="adi://org.adichatz.studio/model/RcpPartMM" | Gives the type of the entity (EntityMetaModel). |
| entity=“entity=”#ENTITY(#BEAN().getRcpPart())“ | Injects and entity in the composite: bean of the new entity is the property rcpPart of the entity injected in the parent controller. |
| valid=“false” | The controller is not build, the life of cycle ignores the controller and its children. The controller org.adichatz.studio.xjc.controller.RcpCheckBoxController manages the validity of the composite. |
| layoutData=“gap left 20” | Add a margin of 20 pixels. |
| <layout columnConstraints=”[grow,fill]“ …/> | Composite layout has one column and components in the composite take all place and grow with composite. |
