com.ptc.core.components.forms
Class CreateAndEditModelGetter

java.lang.Object
  extended by com.ptc.core.components.forms.CreateAndEditModelGetter
All Implemented Interfaces:
RemoteAccess

public class CreateAndEditModelGetter
extends Object
implements RemoteAccess

This class contains methods for creating the data models needed for attribute tables and panels in create and edit wizards

Supported API: true

Extendable: false


Method Summary
static ArrayList getItemAttributes(com.ptc.core.components.descriptor.ComponentDescriptor compDescriptor, NmCommandBean cb, NmContext nmcontext)
          Gets a TypeInstance for a wizard table or property panel displaying the attributes of an object being created or edited.
static ArrayList<TypeInstance> getItemClassificationAttributes(com.ptc.core.components.descriptor.ComponentDescriptor compDescriptor, NmCommandBean cb, NmContext nmcontext)
          Gets a TypeInstance for a wizard table displaying the classification attributes of a part being created or edited.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getItemAttributes

public static ArrayList getItemAttributes(com.ptc.core.components.descriptor.ComponentDescriptor compDescriptor,
                                          NmCommandBean cb,
                                          NmContext nmcontext)
                                   throws WTException
Gets a TypeInstance for a wizard table or property panel displaying the attributes of an object being created or edited. The table can be view-only or editable. View-only tables can be used to display attribute values entered by the user on previous wizard steps or attribute values derived from the launch context.

The returned TypeInstance is used by the data utilities to provide localized attribute labels; default and pregenerated values for create operations; existing attribute values for edit operations; and information as to the visibility of and constraints on an attribute.

This method is typically invoked from a jsp page using the getModel tag. For example:

    <jca:getModel var="tableModel" descriptor="${attributesTableDescriptor}"
       serviceName="com.ptc.core.components.util.CreateAndEditModelGetter"
       methodName="getItemAttributes">
          <jca:addServiceArgument value="${attributesTableDescriptor}" type="com.ptc.core.components.descriptor.ComponentDescriptor"/>
          <jca:addServiceArgument value="${commandBean}" type="com.ptc.netmarkets.util.beans.NmCommandBean"/>
          <jca:addServiceArgument value="${nmcontext.context}" type="com.ptc.netmarkets.util.misc.NmContext"/>
    </jca:getModel>

Parameters:
compDescriptor - - Descriptor for the table to be displayed. This contains descriptors for each attribute to be displayed. Required. Input.
cb - - Bean holding the identity of the object being displayed and its form data. Required. Input.
nmcontext - - The NmContext for the current jsp page. Required. Input
Returns:
a List containing one TypeInstance


Supported API: true
Throws:
WTException

getItemClassificationAttributes

public static ArrayList<TypeInstance> getItemClassificationAttributes(com.ptc.core.components.descriptor.ComponentDescriptor compDescriptor,
                                                                      NmCommandBean cb,
                                                                      NmContext nmcontext)
                                                               throws WTException,
                                                                      WTPropertyVetoException
Gets a TypeInstance for a wizard table displaying the classification attributes of a part being created or edited. This method is typically invoked from a jsp page using the getModel tag.

Parameters:
compDescriptor - - Descriptor for the table to be displayed. This contains descriptors for each attribute to be displayed. Required. Input.
cb - - Bean holding the identity of the object being displayed and its form data. Required. Input.
nmcontext - - The NmContext for the current jsp page. Required. Input
Returns:
a List containing one TypeInstance


Supported API: true
Throws:
WTException
WTPropertyVetoException