Basic Customization > User Interface Customization > Customizing HTML Clients Using the Windchill JSP Framework > Attribute Panels > Sample Code > Example of Usage in Windchill Code > Obtaining a TypeInstance Datum Object
  
Obtaining a TypeInstance Datum Object
For a panel in an object creation or edit wizard, you should typically return a TypeInstance datum object so the data utilities will have access to constraints that may have been defined for attributes. This code shows how to use the CreateAndEditModelGetter.getItemAttributes() method to obtain a TypeInstance in your builder’s buildComponentData() method. This method requires that the panel is displayed within the context of a wizard with an initializeItem tag.
JcaComponentParams jcaParams = (JcaComponentParams) params;
ComponentDescriptor cdesc = jcaParams.getDescriptor();
NmCommandBean commandBean =
jcaParams.getHelperBean().getNmCommandBean();
NmContext nmContext =
jcaParams.getHelperBean().getNmContextBean().getContext();
ArrayList typeInstances =
CreateAndEditModelGetter.getItemAttributes
(cdesc, commandBean, nmContext);