Adding a Status Glyph
Users want a visual way to quickly see the state of an object. This section describes the different out of the box status glyphs and how to display them for a given object.
Terminology
The following specialized terms are used in this section:
Component Builder : A Java class used to “build” a UI component, i.e. a UI widget. These builders define properties of your component to tell the infrastructure how to display them.
Status Family ID : A string used to reference a status glyph.
Solution
Developers can include status glyphs in their tables and information pages directly from a ComponentBuilder class.
Prerequisite Knowledge
To achieve this goal, you need to have an understanding of the following:
Java Programming
General understanding of MVC builders
Default Icon
Glyph Name
Status Family ID
Known Usages
General
statusFamily_General
Locked
Checked out by you
Checked out by you in another workspace
Checked-out by you in this workspace
New
Checked out by other
Checked-out to a project
Out of date
Share
statusFamily_Share
Shared to a project
Shared from PDM
Checked-out from PDM
Message
statusFamily_Message
System Excluded Message exists
Error Messages exists
Warning Messages exists
Info message exists
Task
statusFamily_Task
Reassigned
Change
statusFamily_Change
Pending Change
Hanging Change
New Hanging Change
AML/AVL
statusFamily_AML_AVL
No AML
Preferred
Do not use
Approved
Security
statusFamily_Security
Restricted
The OOTB glyphs can easily be included in an info page or table by using its corresponding Status family id. The naming convention for these glyphs is: statusFamily_<family name>
Adding a Status Glyph to an Information Page
The following snippet shows how you can add a status glyph to the information page for a particular business object type. In the builder for that business object type, override the buildInfoConfig() method to add the glyph component to the info page component. For example:
public static InfoConfig buildInfoConfig(InfoComponentConfigFactory factory)
throws WTException {
InfoConfig infoConfig = factory.newInfoConfig();
...
PropertyConfig statusFamilySecurity = factory.newPropertyConfig ("statusFamily_Security"); statusFamilySecurity.setStatusGlyph(true);
infoConfig.addComponent(statusFamilySecurity);
...
return infoConfig;
}
Adding a Status Glyph to a Table
The following snippet shows how you can add a status glyph to a table for a particular business object type. In the builder for that table, override the buildComponentConfig () method to add the glyph component to the table component. For example:
public ComponentConfig buildComponentConfig(ComponentParams params) throws WTException {
ComponentConfigFactory factory = getComponentConfigFactory();
TableConfig tableConfig = factory.newTableConfig();
...
ColumnConfig col1 = factory.newColumnConfig("statusFamily_Share", false);
tableConfig.addComponent(col1);
...
return tableConfig;
}
Additional Resources
War dies hilfreich?