protected void openVisibleField(XhtmlBuffer xb){
  xb.openElement("div");
  String cssClass="form-group";
  if (mode.isView(insertable,updatable)) {
    cssClass+=" readonly";
  }
 else {
    cssClass+=" readwrite";
  }
  if (errors.size() > 0) {
    cssClass+=" has-error";
  }
  if (hasRequiredFields()) {
    cssClass+=" required";
  }
  xb.addAttribute("class",cssClass);
  labelToXhtml(xb);
  xb.openElement("div");
  xb.addAttribute("class",INPUT_CONTAINER_CSS_CLASS + " " + fieldCssClass);
}

protected void openVisibleField ( XhtmlBuffer xb ) { xb . openElement ( "div" ) ; String cssClass = "form-group" ; if ( mode . isView ( insertable , updatable ) ) { cssClass += " readonly" ; } else { cssClass += " readwrite" ; } if ( errors . size ( ) > 0 ) { cssClass += " has-error" ; } if ( hasRequiredFields ( ) ) { cssClass += " required" ; } xb . addAttribute ( "class" , cssClass ) ; labelToXhtml ( xb ) ; xb . openElement ( "div" ) ; xb . addAttribute ( "class" , INPUT_CONTAINER_CSS_CLASS + " " + fieldCssClass ) ; }
writes the html before a visible input field . the html includes the label and any necessary layout tags .
