use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractPageWithTable method execPopulateTable.
/**
* Populates this page's table.
* <p>
* It is good practice to populate table using {@code ITable.replaceRows} instead of {@code ITable.removeAllRows();
* ITable.addRows} because in the former case the outline tree structure below the changing rows is not discarded but
* only marked as dirty. The subtree is lazily reloaded when the user clicks next time on a child node.
* <p>
* Subclasses can override this method. In most cases it is sufficient to override
* {@link #interceptLoadData(SearchFilter)} or {@link #interceptLoadTableData(SearchFilter)} instead.<br/>
* This default implementation does the following: It queries methods {@link #isSearchActive()} and
* {@link #isSearchRequired()} and then calls {@link #interceptLoadData(SearchFilter)} if appropriate.
*/
@ConfigOperation
@Order(100)
protected void execPopulateTable() {
if (isSearchActive()) {
SearchFilter filter = getSearchFilter();
if (filter.isCompleted() || !isSearchRequired()) {
// create a copy of the filter, just in case the subprocess is modifying
// or extending the filter
filter = filter.copy();
interceptLoadData(filter);
}
} else {
// searchFilter should never be null
interceptLoadData(new SearchFilter());
}
// update table data status
if (isSearchActive() && getSearchFilter() != null && (!getSearchFilter().isCompleted()) && isSearchRequired()) {
setTableStatus(new Status(TEXTS.get("TooManyRows"), IStatus.WARNING));
} else {
setTableStatus(null);
}
T table = getTable();
if (isLimitedResult() && table != null) {
String maxOutlineWarningKey = "MaxOutlineRowWarning";
if (UserAgentUtility.isTouchDevice()) {
maxOutlineWarningKey = "MaxOutlineRowWarningMobile";
}
setTableStatus(new Status(TEXTS.get(maxOutlineWarningKey, "" + table.getRowCount()), IStatus.WARNING));
}
}
use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractBookmarkMenu method execInitAction.
@Override
@ConfigOperation
@Order(10)
protected void execInitAction() {
BEANS.get(IBookmarkService.class).addBookmarkServiceListener(new BookmarkServiceListener() {
@Override
public void bookmarksChanged(BookmarkServiceEvent e) {
handleBookmarksChanged();
}
});
handleBookmarksChanged();
}
use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractComposerField method execCreateAdditionalOrNode.
/**
* Override this method to decorate or enhance new nodes whenever they are created
*
* @return the new node or null to ignore the add of a new node of this type
* <p>
* Normally overrides call super.{@link #interceptCreateAdditionalOrNode(ITreeNode, boolean)}
*/
@ConfigOperation
@Order(140)
protected EitherOrNode execCreateAdditionalOrNode(ITreeNode eitherOrNode, boolean negated) {
EitherOrNode node = new EitherOrNode(this, false);
node.setNegative(negated);
node.setStatus(ITreeNode.STATUS_INSERTED);
return node;
}
use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractComposerField method execCreateEitherNode.
/**
* Override this method to decorate or enhance new nodes whenever they are created
*
* @return the new node or null to ignore the add of a new node of this type
* <p>
* Normally overrides call super.{@link #interceptCreateEitherNode(ITreeNode, boolean)}
*/
@ConfigOperation
@Order(130)
protected EitherOrNode execCreateEitherNode(ITreeNode parentNode, boolean negated) {
EitherOrNode node = new EitherOrNode(this, true);
node.setNegative(negated);
node.setStatus(ITreeNode.STATUS_INSERTED);
return node;
}
use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractComposerField method execResolveRootPathForTopLevelAttribute.
/**
* see {@link #interceptResolveAttributePath(AttributeNode)}
*/
@ConfigOperation
@Order(98)
protected void execResolveRootPathForTopLevelAttribute(IDataModelAttribute a, List<IDataModelEntity> lifeList) {
IDataModelEntity tmp = (a != null ? a.getParentEntity() : null);
while (tmp != null) {
lifeList.add(0, tmp);
tmp = tmp.getParentEntity();
}
}
Aggregations