Class AbstractAttributesComponentBuilder

All Implemented Interfaces:
ComponentConfigBuilder, com.ptc.mvc.components.ComponentConfigFactoryAware, ComponentDataBuilder
Direct Known Subclasses:
InsertPartAttributesBuilder, TypedAttributesPanelBuilder

@ComponentBuilder("attributesTable") public abstract class AbstractAttributesComponentBuilder extends AbstractComponentBuilder
A base builder for a component that display attributes. Though the component builder id is "attributesTable," it is recommended that subclasses return AttributePanelConfigs. It is possible to return AttributeTableConfigs, but that class is deprecated.

The panels produced by subclasses of this builder have the following properties:
  • Component Mode
    • ComponentMode.CREATE will be used if the panel is included in a wizard whose InitializeItemTag specifies the operation CreateAndEditWizBean.CREATE
    • ComponentMode.EDIT will be used if the panel is included in a wizard whose InitializeItemTag specifies the operation CreateAndEditWizBean.EDIT
    • Otherwise, ComponentMode.VIEW will be used
  • Component Type
    • ComponentType is set to INFO_ATTRIBUTES_TABLE if ComponentMode is VIEW
    • Otherwise, ComponentType is set to ComponentType.TABLE
  • Datum Object
    • If the component mode is VIEW, a Persistable for the context object will be returned by the getComponentData() method
    • If the component mode is CREATE, a TypeInstance for a new object of the selected type will be returned. The selected type is indicated by the TypeInstanceIdentifer stored in the request data by the initializeItem tag of the wizard. This identifier has the key CreateAndEditWizBean.ITEM_TIID_PARAMETER_NAME.
    • If the component mode is edit, a TypeInstance for the object being edited (working copy if Workable) will be returned. A reference to the object being edited is stored in the request data with the key CreateAndEditWizBean.WORKING_COPY_REF_PARAMETER_NAME if the object is a Workable or CreateAndEditWizBean. EDIT_OBJ_REF_PARAMETER_NAME if not.
  • View JSP
    • codebase/WEB-INF/jsp/components/attributePanel.jsp



Supported API: true

Extendable: true
  • Method Details

    • getComponentMode

      protected final ComponentMode getComponentMode(ComponentParams params)
      Get the ComponentMode for this panel

      Supported API: true
      Parameters:
      params -
      Returns:
      component mode
    • getComponentType

      protected ComponentType getComponentType(ComponentParams params, ComponentMode mode)
      Get the ComponentType for this panel

      Supported API: true
      Parameters:
      params -
      Returns:
      component mode
    • buildAttributesComponentConfig

      protected abstract CustomizableViewConfig buildAttributesComponentConfig(ComponentParams params) throws WTException
      Builds the ComponentConfig for the component

      Supported API: true
      Parameters:
      params -
      Returns:
      Throws:
      WTException