Стандартная настройка > User Interface Customization > Customizing HTML Clients Using the Windchill JSP Framework > Attribute Panels > Solutions > Solution – Create an Advanced Attribute Panel Using the Create, Edit, or More Attributes Screen Type Layout
Solution – Create an Advanced Attribute Panel Using the Create, Edit, or More Attributes Screen Type Layout
The system provides the builder TypedAttributesPanelBuilder:
Information Page – More Attributes (ScreenDefinitionName.MORE_ATTRIBUTES)
Create New (ScreenDefinitionName.CREATE)
Edit (ScreenDefinitionName.UPDATE)
* 
For a few objects the system has defined subclasses of PrimaryAttributesBuilder for the default builder.
This builder has the component builder id “attributesTable” (ComponentId.ATTRIBUTES_ID) and is used for the following actions defined for object type “object”:
attributes
The action typically used to display the component typically labeled “More Attributes” on object information pages
defineItemAttributesWizStep
Action which uses this builder indirectly to create the “Attributes” panel in object creation wizards. See Customizing Reusable Wizard Steps for more information.
editAttributesWizStep
Action which uses this builder indirectly to create the “Attributes” panel in object edit wizards. See Customizing Reusable Wizard Steps for more information.
See the javadoc for TypedAttributesPanelBuilder for more information on the ComponentMode, ComponentType, view JSP, and datum object used for these panels. Note that the wizard panels have a ComponentType of ComponentType.WIZARD_ATTRIBUTES_TABLE so that the editable fields will be given HTML names such that the wizard processing framework can identify the attributes that it should automatically set on the object being created or edited. See Building Wizards to Create a Single Object for more information.
To include the “More Attributes” panel in your page you only need to specify the component builder id in the panel action or URL See How to Find an Attribute Name/Id for more information on how to include panels in a JSP page. To include the wizard panels in a wizard, use the common wizard step actions shown above.
If you have created a new Windchill type for which you would like to display one of these panels, you will typically only need to define a layout for the appropriate screen type in the Type and Attribute Management utility. In the rare cases where you need to modify some aspect of the panel, such as the view JSP, you should create a custom builder extending the TypedAttributesPanelBuilder. See Customizing Information Page Components for more information.
To modify the attributes displayed in these panels and their display properties you can modify the layout in the Type and Attribute Management utility. If it is necessary to modify a configuration property or the view JSP for a special use case, you can extend TypedAttributesPanelBuilder and override the buildAttributesComponentConfig() method (see Solution – Create an Advanced Attribute Panel Using Any Layout Defined in the Type and Attribute Management Utility ). However, this should be avoided if at all possible as it will make the product less consistent.
The following configuration properties are not overridable:
ComponentMode of the panel
ComponentType of the panel
Datum object
If you want to modify any of these elements, you should write a custom builder extending AbstractComponentBuilder. See Solution – Create an Advanced Attribute Panel Using Any Layout Defined in the Type and Attribute Management Utility for more information.
Было ли это полезно?