{
// id must be set
initMap.put("id", id); //$NON-NLS-1$
}
final ComponentTypeInfo typeInfo = tagElement.getComponent();
// if we have a well-established base type, try that first
// sub-classes must occur before superclasses to ensure most accurate
// detection.
if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIINPUT))
{
bestComponent = ComponentFactory.createUIInputInfo(parent,
typeInfo, initMap);
}
else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIOUTPUT))
{
bestComponent = ComponentFactory.createUIOutputInfo(parent,
typeInfo, initMap);
}
else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UICOMMAND))
{
bestComponent = ComponentFactory.createUICommandInfo(parent,
typeInfo, initMap);
}
else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIDATA))
{
bestComponent = ComponentFactory.createUIDataInfo(parent, typeInfo,
initMap);
}
else if (typeInfo.isInstanceOf(ComponentFactory.BASE_CLASS_UIFORM))
{
// TODO: how handle prepend ids?
bestComponent = ComponentFactory.createUIFormInfo(parent, typeInfo,
initMap);
}