public Object handle(Object parent, DomNode element, String id)
{
String className = element.getAttribute("class");
String handlerName = element.getAttribute("handler");
UIHandler handler = (UIHandler) getHandlerByName(handlerName);
if (handler == null)
{
handler = _defaultHandler;
log(LOG_TERSE, "Unable to handle " + className);
}
Object com = null;
try
{
if (id != null)
{
if (getComponent(id) != null)
{
com = handler.updateComponent(getComponent(id), element);
} else
{
com = handler.createComponent(parent, element);
addComponent(id, com);
}
} else
{//for table cells
com = handler.createComponent(parent, element);
}
return com;
} catch (Exception e)
{
e.printStackTrace();