Basic Customization > User Interface Customization > Customizing HTML Clients Using the Windchill JSP Framework > Attribute Panels > Solutions > Solution - Create a Simple Panel Using JSP Tags > Procedure – Creating the Attribute Panel
  
Procedure – Creating the Attribute Panel
Create the JSP page in which you want to display your panel. This could have other components in addition to your attribute panel. Include the following taglib directive in your JSP page:
<%@ taglib uri="http://www.ptc.com/windchill/taglib/components" prefix="jca"%>
Describe the Attribute Panel
To describe the property panel use the describePropertyPanel and describeProperty tags:
<jca:describePropertyPanel var="<name of the descriptor>">>
<jca:describeProperty id="<attribute name>" />
<jca:describeProperty id="<attribute name>" />
<jca:describeProperty id="<attribute name>" />
</jca:describePropertyPanel>
The name of the descriptor can be any name that identifies your panel. It will be used as the name of the variable in the JSP context that holds the panel descriptor object.
Both of these tags have optional attributes that can be used to configure how the GUI components for attributes are created and/or displayed. See the javadoc for the tags for more information.
Acquire the Data Model for the Attribute Panel
The getModel tag will acquire a datum object for the panel by calling a service method you specify. It will then call the data utilities to produce the GUI components for the attributes using the datum object. For example:
<jca:getModel var="<name of the data model>"
descriptor="${<name of the descriptor>}"
serviceName="wt.fc.StandardPersistenceManager"
methodName="refresh">
<jca:addServiceArgument value="${commandBean.primaryOid.oid}"
type="wt.fc.ObjectIdentifier" />
</jca:getModel>
The value for <name of the data model> can be any name you wish to assign to your model. It will be used as the name of a scoped variable in the JSP context that will hold the created data model.
The value for <name of the descriptor> should be that used in your describePropertyPanel tag.
The serviceName and methodName parameters specify a service method that should be called to acquire the datum object for the model. The addServiceArgument subtag can be used to pass parameters to the service method. Typically, the StandardPersistenceManager.refresh() method is used to acquire a Persistable for the daum object of view-only panels. For example:
<jca:getModel var="propertyModel" descriptor="${propertyPanelDesc}
"serviceName="wt.fc.StandardPersistenceManager" methodName="refresh">
<jca:addServiceArgument value="${commandBean.primaryOid.oid}
" type="wt.fc.ObjectIdentifier" />
</jca:getModel>
Alternatively, a query command or service method can be called to retrieve the datum object.
The datum object for a wizard panel should typically be a TypeInstance. The CreateAndEditModelGetter.getItemAttributes() method can be used to acquire a TypeInstance datum object for wizards that include an initializeItem tag. For example:
<jca:getModel var="attributesTableModel" descriptor="${meetingPanelModel}"
serviceName="com.ptc.core.components.forms.CreateAndEditModelGetter"
methodName="getItemAttributes">
<jca:addServiceArgument value="${ meetingPanelDescriptor }"
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>
See the getModel tag javadoc for more information.
Render the Property Panel
To render the property panel use the renderPropertyPanel tag. For example:
<jca:renderPropertyPanel model="${<name of the data model>}"/>
The value for <name of the data model> should be that used in your getModel tag.