use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractComposerField method execResolveRootPathForTopLevelEntity.
/**
* see {@link #interceptResolveEntityPath(EntityNode)}
*/
@ConfigOperation
@Order(98)
protected void execResolveRootPathForTopLevelEntity(IDataModelEntity e, List<IDataModelEntity> lifeList) {
IDataModelEntity tmp = (e != null ? e.getParentEntity() : null);
while (tmp != null) {
lifeList.add(0, tmp);
tmp = tmp.getParentEntity();
}
}
use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractComposerField method execResolveAttributePath.
/**
* see {@link #execResolveEntityPathForEntityExport(EntityNode)}, {@link AttributePath} for more details
* <p>
* The path in the composer tree is prefixed with
* {@link #interceptResolveRootPathForTopLevelAttribute(IDataModelAttribute, List)}
*/
@ConfigOperation
@Order(99)
protected AttributePath execResolveAttributePath(AttributeNode node) {
LinkedList<IDataModelEntity> list = new LinkedList<IDataModelEntity>();
if (node == null) {
return null;
}
EntityNode tmp = node.getAncestorNode(EntityNode.class);
while (tmp != null) {
if (tmp.getEntity() != null) {
list.add(0, tmp.getEntity());
}
// next
tmp = tmp.getAncestorNode(EntityNode.class);
}
if (list.size() > 0) {
interceptResolveRootPathForTopLevelEntity(list.get(0), list);
} else {
interceptResolveRootPathForTopLevelAttribute(node.getAttribute(), list);
}
return new AttributePath(list, node.getAttribute());
}
use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractClipboardField method execDropRequest.
@ConfigOperation
@Order(80)
protected void execDropRequest(TransferObject transferObject) {
if (transferObject instanceof ResourceListTransferObject) {
ResourceListTransferObject resourceListTransferObject = (ResourceListTransferObject) transferObject;
setValue(resourceListTransferObject.getResources());
}
}
use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractListBox method execLoadTableData.
@ConfigOperation
@Order(230)
protected List<? extends ILookupRow<KEY>> execLoadTableData() {
List<? extends ILookupRow<KEY>> data;
// (1) get data by service
if (getLookupCall() != null) {
ILookupCall<KEY> call = BEANS.get(ILookupCallProvisioningService.class).newClonedInstance(getLookupCall(), new FormFieldProvisioningContext(AbstractListBox.this));
prepareLookupCall(call);
data = call.getDataByAll();
data = filterLookupResult(call, data);
} else // (b) get data direct
{
data = filterLookupResult(null, null);
}
return data;
}
use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class TreeProposalChooser method execGetSingleMatch.
/**
* Override this method to change that behaviour of what is a single match. By default a single match is when there is
* a single enabled LEAF node in the tree
*/
@ConfigOperation
@Order(40)
@Override
protected ILookupRow<LOOKUP_KEY> execGetSingleMatch() {
final List<ILookupRow<LOOKUP_KEY>> foundLeafs = new ArrayList<>();
ITreeVisitor v = new ITreeVisitor() {
@Override
public boolean visit(ITreeNode node) {
if (node.isEnabled() && node.isLeaf()) {
@SuppressWarnings("unchecked") ILookupRow<LOOKUP_KEY> row = (ILookupRow<LOOKUP_KEY>) node.getCell().getValue();
if (row != null && row.isEnabled()) {
foundLeafs.add(row);
}
}
return foundLeafs.size() <= 2;
}
};
m_model.visitVisibleTree(v);
if (foundLeafs.size() == 1) {
return foundLeafs.get(0);
} else {
return null;
}
}
Aggregations