Basic Customization > User Interface Customization > Constructing Wizards > Customizing Reusable Wizard Steps > Sample Code > JSP for the Defining the Define Item Panel for WTPart
  
JSP for the Defining the Define Item Panel for WTPart
Filename: <Windchill>/codebase/ netmarkets/jsp/part/defineItem.jspf
This example illustrates how to override the read-only context panel and to reconfigure the type picker.
<%@ page import="com.ptc.windchill.enterprise.part.PartConstants" %>
<%@ page import="com.ptc.core.ui.componentRB" %>

<%@ taglib uri="http://www.ptc.com/windchill/taglib/components"
prefix="jca"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/picker" prefix="p"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/partcomponents"
prefix="partcomp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/fmt" prefix="fmt"%>

<jca:describePropertyPanel var="defineItemStepContextPanelDescriptor"
id="defineItemStepContextPanelDescriptor"
scope="request" mode="VIEW" type="wt.part.WTPart">

<jca:describeProperty id="containerName"
label="${createBean.containerLabel}"/>
</jca:describePropertyPanel>

<%-- Get the part types to filter from type picker selection list --%>
<partcomp:PartCreateHelper var="partTypesToFilter"
method="getPartTypesToFilter"/>

<c:choose>
<c:when test='${param.invokedfrom == "tabular_input"}' >

<!-- If New Part client is invoked from Edit Structure, association
constraints need to be enforced. (Please see the Javadoc for
DefaultAssociationConstraintIT for more details). The list of
creatable types needs to be filtered out to inlcude only the
types allowed by association constrains. This is achieved by
finding the list of valid (allowable) types using the
getSeedPartTypes below and then setting the type picker's
'type' parameter to 'ROOT_TYPES' -->

<!-- Get the seed part types. Usually, it is wt.part.WTPart but
it can be a bunch of types if association contraints
are in place -->
<partcomp:PartCreateHelper var="seedPartTypes" method="getSeedPartTypes"/>

<jca:configureTypePicker>
<%--
Type Picker picks up the default from Preferences.
It does not have be set here.
--%>
<c:forEach var="item" items="${seedPartTypes}">
<p:pickerParam name="seedType" value="${item}"/>
</c:forEach>
<c:forEach var="item" items="${partTypesToFilter}">
<p:pickerParam name="filterType" value="${item}"/>
</c:forEach>
<p:pickerParam name="type" value="ROOT_TYPES"/>
</jca:configureTypePicker>

</c:when>

<c:when test='${param.invokedfrom == "config_link_table"}' >
<!-- The part types in the type picker must come from the
association constraints on the configurable link. -->

<clui:getRoleBTypesForNewAction var="roleBObjectTypes"
roleBBaseType="wt.part.WTPart"/>

<jca:configureTypePicker>

<c:forEach var="item" items="${roleBObjectTypes}">
<p:pickerParam name="seedType" value="${item}"/>
</c:forEach>

<c:forEach var="item" items="${partTypesToFilter}">
<p:pickerParam name="filterType" value="${item}"/>
</c:forEach>

<p:pickerParam name="type" value="ROOT_TYPES"/>
</jca:configureTypePicker>
</c:when>

<c:otherwise>

<jca:configureTypePicker>

<%--
Type Picker picks up the default from Preferences.
It does not have be set here.
--%>

<c:forEach var="item" items="${partTypesToFilter}">
<p:pickerParam name="filterType" value="${item}"/>
</c:forEach>

</jca:configureTypePicker>

</c:otherwise>
</c:choose>

<%@ include file="/netmarkets/jsp/components/defineItem.jspf"%>