private static Element buildTableFieldUIControlNode(Element node,Element bodyNode){
  Element controlNode=bodyNode.createElement(NAMESPACE_XFORMS,null);
  String name=node.getName();
  if (name.equalsIgnoreCase(NODE_ENCOUNTER_LOCATION_ID) || name.equalsIgnoreCase(NODE_ENCOUNTER_PROVIDER_ID)) {
    if (useAutoCompleteForNode(name))     controlNode.setName(CONTROL_INPUT);
 else     controlNode.setName(CONTROL_SELECT1);
  }
 else {
    controlNode.setName(CONTROL_INPUT);
  }
  controlNode.setAttribute(null,ATTRIBUTE_BIND,name);
  Element labelNode=bodyNode.createElement(NAMESPACE_XFORMS,null);
  labelNode.setName(NODE_LABEL);
  labelNode.addChild(Element.TEXT,getDisplayText(name) + "     ");
  controlNode.addChild(Element.ELEMENT,labelNode);
  addControl(bodyNode,controlNode);
  return controlNode;
}

private static Element buildTableFieldUIControlNode ( Element node , Element bodyNode ) { Element controlNode = bodyNode . createElement ( NAMESPACE_XFORMS , null ) ; String name = node . getName ( ) ; if ( name . equalsIgnoreCase ( NODE_ENCOUNTER_LOCATION_ID ) || name . equalsIgnoreCase ( NODE_ENCOUNTER_PROVIDER_ID ) ) { if ( useAutoCompleteForNode ( name ) ) controlNode . setName ( CONTROL_INPUT ) ; else controlNode . setName ( CONTROL_SELECT1 ) ; } else { controlNode . setName ( CONTROL_INPUT ) ; } controlNode . setAttribute ( null , ATTRIBUTE_BIND , name ) ; Element labelNode = bodyNode . createElement ( NAMESPACE_XFORMS , null ) ; labelNode . setName ( NODE_LABEL ) ; labelNode . addChild ( Element . TEXT , getDisplayText ( name ) + "     " ) ; controlNode . addChild ( Element . ELEMENT , labelNode ) ; addControl ( bodyNode , controlNode ) ; return controlNode ; }
builds a ui control node for a table field .
