Package com.ptc.jca.mvc.components
Class AbstractAttributesComponentBuilder
java.lang.Object
com.ptc.mvc.components.AbstractComponentConfigBuilder
com.ptc.mvc.components.AbstractComponentBuilder
com.ptc.jca.mvc.components.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:
Supported API: true
Extendable: true
- 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 Summary
Modifier and TypeMethodDescriptionprotected abstract CustomizableViewConfigBuilds the ComponentConfig for the component
Supported API: trueprotected final ComponentModegetComponentMode(ComponentParams params) Get the ComponentMode for this panel
Supported API: trueprotected ComponentTypegetComponentType(ComponentParams params, ComponentMode mode) Get the ComponentType for this panel
Supported API: trueMethods inherited from class com.ptc.mvc.components.AbstractComponentConfigBuilder
getComponentConfigFactory, getMessageSource
-
Method Details
-
getComponentMode
Get the ComponentMode for this panel
Supported API: true- Parameters:
params-- Returns:
- component mode
-
getComponentType
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
-