Simple Attribute Panel using a Java Builder
This example, which uses the SimpleAttributesPanelBuilder, is similar to the Advanced Attribute Panel example except it configures the panel as a simple list of name:value pairs.
The builder makes this a simple attribute panel by doing the following three things:
1. It creates only one GroupConfig. In this example, the GroupConfig is created implicitly by the AttributePanelConfig the first time an AttributeConfig is added to it.
2. It does not specify rowPos, colPos, or colSpan properties on the AttributeConfigs.
3. It explicitly sets the view for the panel config to "/components/simpleAttributePanel.jsp.”
The buildComponentData() method of the builder for this panel illustrates how you can you something other than a Persistable object as the panel datum object. Although panel objects will typically be Windchill business objects, that does not have to be the case. Any object from which it is possible to access the attribute values via a bean-style getter method or a Map-style get() method can be used. In this case, the row data is a HashMap. See Windchill Client Architecture Common Objects Overview for more information.
See Solution – Create a Simple or Advanced Attribute Panel Using a Configuration Created in a Java Builder Class for more information on creating simple attribute panels using Java builders.
Location of Example
To navigate to this example in the produce go to Customization > Component Catalog > Attribute Panel > Simple Attribute Panel Using a Java Builder.
Action Models Used in This Example
None
Actions Used in This Example
None
Files Used in This Example
Source File
Description
com/ptc/mvc/builders/carambola/attributePanel/SimpleAttributesPanelBuilder.java
Builder that creates the configuration and datum object for the panel
com/ptc/carambola/property/PropertyUtils.java
Contains the method getExamplePropertyPanelData(), which constructs the HashMap that is the datum for this panel.
¿Fue esto útil?