Basic Customization > User Interface Customization > MVC Components > MVC Components Overview > MVC > MVC Builders > TypeBased
  
TypeBased
To build certain components, you may need the Windchill Type of the context object playing a role in finding the appropriate builder. For example you have an info page and you want to populate the content based on the Windchill Type. For these scenarios, we have introduced an annotation “TypeBased” that can be used in the builder, to attach the builder to a specific Windchill Type. This works with ComponentBuilder.
@ComponentBuilder("compIdA")
@TypeBased(value="{WTPart, WTDocument}")
public class OOTBBuilder1 extends ……{
}
@ComponentBuilder("compIdA")
@TypeBased(“myPart”)
public class OOTBBuilder2 extends ……{
}
If the context object’s Windchill Type is WTPart and the componentId = “compIdA”, the best match builder for that component is OOTBBuilder1
If the context object’s Windchill Type is a sub-type of WTPart(myPart) and the componentId = “compIdA”, the best match builder for that component is OOTBBuilder2
If the context object’s Windchill Type is a sub-type of WTDocument(myDoc) and the componentId = “compIdA”, the best match builder for that component is OOTBBuilder1
While resolving to find the suitable builder, the context object’s Windchill type hierarchy is respected. The attribute value can take
Internal Name of the Windchill Type
If the representation has domain name of the exchange container involved, then can use ${internet_domain_name} for its representation. e.g ${internet_domain_name}.DynamicDocument