@Test public void lookupFieldMacroRendered(@Mocked ModelFormField modelFormField, @Mocked ModelFormField.LookupField lookupField) throws IOException { new Expectations() { { httpSession.getAttribute("delegatorName"); result = "delegator"; lookupField.getModelFormField(); result = modelFormField; modelFormField.getEntry(withNotNull(), withNull()); result = "VALUE"; modelFormField.getParameterName(withNotNull()); result = "FIELDNAME"; modelFormField.getCurrentContainerId(withNotNull()); result = "CONTAINERID"; modelFormField.getTooltip(withNotNull()); result = ""; } }; ImmutableMap<String, Object> context = ImmutableMap.of("session", httpSession); macroFormRenderer.renderLookupField(appendable, context, lookupField); assertAndGetMacroString("renderLookupField", ImmutableMap.of( "name", "FIELDNAME", "value", "VALUE", "id", "CONTAINERID")); }
@Override public void renderLookupField(Appendable writer, Map<String, Object> context, LookupField lookupField) throws IOException { ModelFormField modelFormField = lookupField.getModelFormField(); String lookupFieldFormName = lookupField.getFormName(context); String conditionGroup = modelFormField.getConditionGroup(); String className = ""; String alert = "false"; if (UtilValidate.isNotEmpty(modelFormField.getWidgetStyle())) { className = modelFormField.getWidgetStyle(); if (modelFormField.shouldBeRed(context)) { alert = "true"; } } if ("single".equals(modelFormField.getModelForm().getType()) && modelFormField.getRequiredField()) { String requiredStyle = modelFormField.getRequiredFieldStyle(); if (UtilValidate.isEmpty(requiredStyle)) { requiredStyle = "required"; } if (UtilValidate.isEmpty(className)) { className = requiredStyle; } else { className = requiredStyle + " " + className; } } String name = modelFormField.getParameterName(context); String value = modelFormField.getEntry(context, lookupField.getDefaultValue(context)); if (value == null) { value = ""; } String size = Integer.toString(lookupField.getSize()); Integer maxlength = lookupField.getMaxlength(); String id = modelFormField.getCurrentContainerId(context); List<ModelForm.UpdateArea> updateAreas = modelFormField.getOnChangeUpdateAreas(); if (UtilValidate.isEmpty(updateAreas) && UtilValidate.isNotEmpty(lookupFieldFormName)) { String autoCompleterTarget = null; if (lookupFieldFormName.indexOf('?') == -1) { autoCompleterTarget = lookupFieldFormName + "?"; } else { autoCompleterTarget = lookupFieldFormName + "&amp;amp;"; } autoCompleterTarget = autoCompleterTarget + "ajaxLookup=Y"; updateAreas = new LinkedList<>(); updateAreas.add(new ModelForm.UpdateArea("change", id, autoCompleterTarget)); } boolean ajaxEnabled = UtilValidate.isNotEmpty(updateAreas) && this.javaScriptEnabled; String autocomplete = ""; if (!lookupField.getClientAutocompleteField() || !ajaxEnabled) { autocomplete = "off"; } String event = modelFormField.getEvent(); String action = modelFormField.getAction(context); boolean readonly = lookupField.getReadonly(); String descriptionFieldName = lookupField.getDescriptionFieldName(); ModelForm modelForm = modelFormField.getModelForm(); String formName = modelFormField.getParentFormName(); if (UtilValidate.isEmpty(formName)) { formName = FormRenderer.getCurrentFormName(modelForm, context); } StringBuilder targetParameterIter = new StringBuilder(); StringBuilder imgSrc = new StringBuilder(); List<String> targetParameterList = lookupField.getTargetParameterList(context); targetParameterIter.append("["); for (String targetParameter : targetParameterList) { if (targetParameterIter.length() > 1) { targetParameterIter.append(","); } targetParameterIter.append("'"); targetParameterIter.append(targetParameter); targetParameterIter.append("'"); } targetParameterIter.append("]"); this.appendContentUrl(imgSrc, "/images/fieldlookup.gif"); String ajaxUrl = ""; if (ajaxEnabled) { ajaxUrl = createAjaxParamsFromUpdateAreas(updateAreas, "", context); } String lookupPresentation = lookupField.getLookupPresentation(); if (UtilValidate.isEmpty(lookupPresentation)) { lookupPresentation = ""; } String lookupHeight = lookupField.getLookupHeight(); String lookupWidth = lookupField.getLookupWidth(); String lookupPosition = lookupField.getLookupPosition(); String fadeBackground = lookupField.getFadeBackground(); if (UtilValidate.isEmpty(fadeBackground)) { fadeBackground = "false"; } Boolean isInitiallyCollapsed = lookupField.getInitiallyCollapsed(); String clearText = ""; Map<String, Object> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap != null) { clearText = (String) uiLabelMap.get("CommonClear"); } else { Debug.logWarning("Could not find uiLabelMap in context", MODULE); } Boolean showDescription = lookupField.getShowDescription(); if (showDescription == null) { showDescription = "Y".equals(visualTheme.getModelTheme().getLookupShowDescription()); } String lastViewName = request.getParameter("_LAST_VIEW_NAME_"); if (UtilValidate.isEmpty(lastViewName)) { lastViewName = (String) request.getSession().getAttribute("_LAST_VIEW_NAME_"); } if (UtilValidate.isEmpty(lastViewName)) { lastViewName = ""; } lastViewName = UtilHttp.getEncodedParameter(lastViewName); String tabindex = modelFormField.getTabindex(); StringWriter sr = new StringWriter(); sr.append("<@renderLookupField "); sr.append(" className=\""); sr.append(className); sr.append("\" alert=\""); sr.append(alert); sr.append("\" name=\""); sr.append(name); sr.append("\" value=\""); sr.append(value); sr.append("\" size=\""); sr.append(size); sr.append("\" maxlength=\""); sr.append((maxlength != null ? Integer.toString(maxlength) : "")); sr.append("\" id=\""); sr.append(id); sr.append("\" event=\""); if (event != null) { sr.append(event); } sr.append("\" action=\""); if (action != null) { sr.append(action); } sr.append("\" readonly="); sr.append(Boolean.toString(readonly)); sr.append(" autocomplete=\""); sr.append(autocomplete); sr.append("\" descriptionFieldName=\""); sr.append(descriptionFieldName); sr.append("\" formName=\""); sr.append(formName); sr.append("\" fieldFormName=\""); sr.append(lookupFieldFormName); sr.append("\" targetParameterIter="); sr.append(targetParameterIter.toString()); sr.append(" imgSrc=\""); sr.append(imgSrc.toString()); sr.append("\" ajaxUrl=\""); sr.append(ajaxUrl); sr.append("\" ajaxEnabled="); sr.append(Boolean.toString(ajaxEnabled)); sr.append(" presentation=\""); sr.append(lookupPresentation); if (UtilValidate.isNotEmpty(lookupHeight)) { sr.append("\" height=\""); sr.append(lookupHeight); } if (UtilValidate.isNotEmpty(lookupWidth)) { sr.append("\" width=\""); sr.append(lookupWidth); } if (UtilValidate.isNotEmpty(lookupPosition)) { sr.append("\" position=\""); sr.append(lookupPosition); } sr.append("\" fadeBackground=\""); sr.append(fadeBackground); sr.append("\" clearText=\""); sr.append(clearText); sr.append("\" showDescription=\""); sr.append(Boolean.toString(showDescription)); sr.append("\" initiallyCollapsed=\""); sr.append(Boolean.toString(isInitiallyCollapsed)); sr.append("\" lastViewName=\""); sr.append(lastViewName); sr.append("\" conditionGroup=\""); sr.append(conditionGroup); sr.append("\" tabindex=\""); sr.append(tabindex); sr.append("\" delegatorName=\""); sr.append(((HttpSession) context.get("session")).getAttribute("delegatorName").toString()); sr.append("\" />"); executeMacro(writer, sr.toString()); this.addAsterisks(writer, context, modelFormField); this.makeHyperlinkString(writer, lookupField.getSubHyperlink(), context); this.appendTooltip(writer, context, modelFormField); }
MacroFormRenderer implements FormStringRenderer { @Override public void renderLookupField(Appendable writer, Map<String, Object> context, LookupField lookupField) throws IOException { ModelFormField modelFormField = lookupField.getModelFormField(); String lookupFieldFormName = lookupField.getFormName(context); String conditionGroup = modelFormField.getConditionGroup(); String className = ""; String alert = "false"; if (UtilValidate.isNotEmpty(modelFormField.getWidgetStyle())) { className = modelFormField.getWidgetStyle(); if (modelFormField.shouldBeRed(context)) { alert = "true"; } } if ("single".equals(modelFormField.getModelForm().getType()) && modelFormField.getRequiredField()) { String requiredStyle = modelFormField.getRequiredFieldStyle(); if (UtilValidate.isEmpty(requiredStyle)) { requiredStyle = "required"; } if (UtilValidate.isEmpty(className)) { className = requiredStyle; } else { className = requiredStyle + " " + className; } } String name = modelFormField.getParameterName(context); String value = modelFormField.getEntry(context, lookupField.getDefaultValue(context)); if (value == null) { value = ""; } String size = Integer.toString(lookupField.getSize()); Integer maxlength = lookupField.getMaxlength(); String id = modelFormField.getCurrentContainerId(context); List<ModelForm.UpdateArea> updateAreas = modelFormField.getOnChangeUpdateAreas(); if (UtilValidate.isEmpty(updateAreas) && UtilValidate.isNotEmpty(lookupFieldFormName)) { String autoCompleterTarget = null; if (lookupFieldFormName.indexOf('?') == -1) { autoCompleterTarget = lookupFieldFormName + "?"; } else { autoCompleterTarget = lookupFieldFormName + "&amp;amp;"; } autoCompleterTarget = autoCompleterTarget + "ajaxLookup=Y"; updateAreas = new LinkedList<>(); updateAreas.add(new ModelForm.UpdateArea("change", id, autoCompleterTarget)); } boolean ajaxEnabled = UtilValidate.isNotEmpty(updateAreas) && this.javaScriptEnabled; String autocomplete = ""; if (!lookupField.getClientAutocompleteField() || !ajaxEnabled) { autocomplete = "off"; } String event = modelFormField.getEvent(); String action = modelFormField.getAction(context); boolean readonly = lookupField.getReadonly(); String descriptionFieldName = lookupField.getDescriptionFieldName(); ModelForm modelForm = modelFormField.getModelForm(); String formName = modelFormField.getParentFormName(); if (UtilValidate.isEmpty(formName)) { formName = FormRenderer.getCurrentFormName(modelForm, context); } StringBuilder targetParameterIter = new StringBuilder(); StringBuilder imgSrc = new StringBuilder(); List<String> targetParameterList = lookupField.getTargetParameterList(context); targetParameterIter.append("["); for (String targetParameter : targetParameterList) { if (targetParameterIter.length() > 1) { targetParameterIter.append(","); } targetParameterIter.append("'"); targetParameterIter.append(targetParameter); targetParameterIter.append("'"); } targetParameterIter.append("]"); this.appendContentUrl(imgSrc, "/images/fieldlookup.gif"); String ajaxUrl = ""; if (ajaxEnabled) { ajaxUrl = createAjaxParamsFromUpdateAreas(updateAreas, "", context); } String lookupPresentation = lookupField.getLookupPresentation(); if (UtilValidate.isEmpty(lookupPresentation)) { lookupPresentation = ""; } String lookupHeight = lookupField.getLookupHeight(); String lookupWidth = lookupField.getLookupWidth(); String lookupPosition = lookupField.getLookupPosition(); String fadeBackground = lookupField.getFadeBackground(); if (UtilValidate.isEmpty(fadeBackground)) { fadeBackground = "false"; } Boolean isInitiallyCollapsed = lookupField.getInitiallyCollapsed(); String clearText = ""; Map<String, Object> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap != null) { clearText = (String) uiLabelMap.get("CommonClear"); } else { Debug.logWarning("Could not find uiLabelMap in context", MODULE); } Boolean showDescription = lookupField.getShowDescription(); if (showDescription == null) { showDescription = "Y".equals(visualTheme.getModelTheme().getLookupShowDescription()); } String lastViewName = request.getParameter("_LAST_VIEW_NAME_"); if (UtilValidate.isEmpty(lastViewName)) { lastViewName = (String) request.getSession().getAttribute("_LAST_VIEW_NAME_"); } if (UtilValidate.isEmpty(lastViewName)) { lastViewName = ""; } lastViewName = UtilHttp.getEncodedParameter(lastViewName); String tabindex = modelFormField.getTabindex(); StringWriter sr = new StringWriter(); sr.append("<@renderLookupField "); sr.append(" className=\""); sr.append(className); sr.append("\" alert=\""); sr.append(alert); sr.append("\" name=\""); sr.append(name); sr.append("\" value=\""); sr.append(value); sr.append("\" size=\""); sr.append(size); sr.append("\" maxlength=\""); sr.append((maxlength != null ? Integer.toString(maxlength) : "")); sr.append("\" id=\""); sr.append(id); sr.append("\" event=\""); if (event != null) { sr.append(event); } sr.append("\" action=\""); if (action != null) { sr.append(action); } sr.append("\" readonly="); sr.append(Boolean.toString(readonly)); sr.append(" autocomplete=\""); sr.append(autocomplete); sr.append("\" descriptionFieldName=\""); sr.append(descriptionFieldName); sr.append("\" formName=\""); sr.append(formName); sr.append("\" fieldFormName=\""); sr.append(lookupFieldFormName); sr.append("\" targetParameterIter="); sr.append(targetParameterIter.toString()); sr.append(" imgSrc=\""); sr.append(imgSrc.toString()); sr.append("\" ajaxUrl=\""); sr.append(ajaxUrl); sr.append("\" ajaxEnabled="); sr.append(Boolean.toString(ajaxEnabled)); sr.append(" presentation=\""); sr.append(lookupPresentation); if (UtilValidate.isNotEmpty(lookupHeight)) { sr.append("\" height=\""); sr.append(lookupHeight); } if (UtilValidate.isNotEmpty(lookupWidth)) { sr.append("\" width=\""); sr.append(lookupWidth); } if (UtilValidate.isNotEmpty(lookupPosition)) { sr.append("\" position=\""); sr.append(lookupPosition); } sr.append("\" fadeBackground=\""); sr.append(fadeBackground); sr.append("\" clearText=\""); sr.append(clearText); sr.append("\" showDescription=\""); sr.append(Boolean.toString(showDescription)); sr.append("\" initiallyCollapsed=\""); sr.append(Boolean.toString(isInitiallyCollapsed)); sr.append("\" lastViewName=\""); sr.append(lastViewName); sr.append("\" conditionGroup=\""); sr.append(conditionGroup); sr.append("\" tabindex=\""); sr.append(tabindex); sr.append("\" delegatorName=\""); sr.append(((HttpSession) context.get("session")).getAttribute("delegatorName").toString()); sr.append("\" />"); executeMacro(writer, sr.toString()); this.addAsterisks(writer, context, modelFormField); this.makeHyperlinkString(writer, lookupField.getSubHyperlink(), context); this.appendTooltip(writer, context, modelFormField); } }
MacroFormRenderer implements FormStringRenderer { @Override public void renderLookupField(Appendable writer, Map<String, Object> context, LookupField lookupField) throws IOException { ModelFormField modelFormField = lookupField.getModelFormField(); String lookupFieldFormName = lookupField.getFormName(context); String conditionGroup = modelFormField.getConditionGroup(); String className = ""; String alert = "false"; if (UtilValidate.isNotEmpty(modelFormField.getWidgetStyle())) { className = modelFormField.getWidgetStyle(); if (modelFormField.shouldBeRed(context)) { alert = "true"; } } if ("single".equals(modelFormField.getModelForm().getType()) && modelFormField.getRequiredField()) { String requiredStyle = modelFormField.getRequiredFieldStyle(); if (UtilValidate.isEmpty(requiredStyle)) { requiredStyle = "required"; } if (UtilValidate.isEmpty(className)) { className = requiredStyle; } else { className = requiredStyle + " " + className; } } String name = modelFormField.getParameterName(context); String value = modelFormField.getEntry(context, lookupField.getDefaultValue(context)); if (value == null) { value = ""; } String size = Integer.toString(lookupField.getSize()); Integer maxlength = lookupField.getMaxlength(); String id = modelFormField.getCurrentContainerId(context); List<ModelForm.UpdateArea> updateAreas = modelFormField.getOnChangeUpdateAreas(); if (UtilValidate.isEmpty(updateAreas) && UtilValidate.isNotEmpty(lookupFieldFormName)) { String autoCompleterTarget = null; if (lookupFieldFormName.indexOf('?') == -1) { autoCompleterTarget = lookupFieldFormName + "?"; } else { autoCompleterTarget = lookupFieldFormName + "&amp;amp;"; } autoCompleterTarget = autoCompleterTarget + "ajaxLookup=Y"; updateAreas = new LinkedList<>(); updateAreas.add(new ModelForm.UpdateArea("change", id, autoCompleterTarget)); } boolean ajaxEnabled = UtilValidate.isNotEmpty(updateAreas) && this.javaScriptEnabled; String autocomplete = ""; if (!lookupField.getClientAutocompleteField() || !ajaxEnabled) { autocomplete = "off"; } String event = modelFormField.getEvent(); String action = modelFormField.getAction(context); boolean readonly = lookupField.getReadonly(); String descriptionFieldName = lookupField.getDescriptionFieldName(); ModelForm modelForm = modelFormField.getModelForm(); String formName = modelFormField.getParentFormName(); if (UtilValidate.isEmpty(formName)) { formName = FormRenderer.getCurrentFormName(modelForm, context); } StringBuilder targetParameterIter = new StringBuilder(); StringBuilder imgSrc = new StringBuilder(); List<String> targetParameterList = lookupField.getTargetParameterList(context); targetParameterIter.append("["); for (String targetParameter : targetParameterList) { if (targetParameterIter.length() > 1) { targetParameterIter.append(","); } targetParameterIter.append("'"); targetParameterIter.append(targetParameter); targetParameterIter.append("'"); } targetParameterIter.append("]"); this.appendContentUrl(imgSrc, "/images/fieldlookup.gif"); String ajaxUrl = ""; if (ajaxEnabled) { ajaxUrl = createAjaxParamsFromUpdateAreas(updateAreas, "", context); } String lookupPresentation = lookupField.getLookupPresentation(); if (UtilValidate.isEmpty(lookupPresentation)) { lookupPresentation = ""; } String lookupHeight = lookupField.getLookupHeight(); String lookupWidth = lookupField.getLookupWidth(); String lookupPosition = lookupField.getLookupPosition(); String fadeBackground = lookupField.getFadeBackground(); if (UtilValidate.isEmpty(fadeBackground)) { fadeBackground = "false"; } Boolean isInitiallyCollapsed = lookupField.getInitiallyCollapsed(); String clearText = ""; Map<String, Object> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap != null) { clearText = (String) uiLabelMap.get("CommonClear"); } else { Debug.logWarning("Could not find uiLabelMap in context", MODULE); } Boolean showDescription = lookupField.getShowDescription(); if (showDescription == null) { showDescription = "Y".equals(visualTheme.getModelTheme().getLookupShowDescription()); } String lastViewName = request.getParameter("_LAST_VIEW_NAME_"); if (UtilValidate.isEmpty(lastViewName)) { lastViewName = (String) request.getSession().getAttribute("_LAST_VIEW_NAME_"); } if (UtilValidate.isEmpty(lastViewName)) { lastViewName = ""; } lastViewName = UtilHttp.getEncodedParameter(lastViewName); String tabindex = modelFormField.getTabindex(); StringWriter sr = new StringWriter(); sr.append("<@renderLookupField "); sr.append(" className=\""); sr.append(className); sr.append("\" alert=\""); sr.append(alert); sr.append("\" name=\""); sr.append(name); sr.append("\" value=\""); sr.append(value); sr.append("\" size=\""); sr.append(size); sr.append("\" maxlength=\""); sr.append((maxlength != null ? Integer.toString(maxlength) : "")); sr.append("\" id=\""); sr.append(id); sr.append("\" event=\""); if (event != null) { sr.append(event); } sr.append("\" action=\""); if (action != null) { sr.append(action); } sr.append("\" readonly="); sr.append(Boolean.toString(readonly)); sr.append(" autocomplete=\""); sr.append(autocomplete); sr.append("\" descriptionFieldName=\""); sr.append(descriptionFieldName); sr.append("\" formName=\""); sr.append(formName); sr.append("\" fieldFormName=\""); sr.append(lookupFieldFormName); sr.append("\" targetParameterIter="); sr.append(targetParameterIter.toString()); sr.append(" imgSrc=\""); sr.append(imgSrc.toString()); sr.append("\" ajaxUrl=\""); sr.append(ajaxUrl); sr.append("\" ajaxEnabled="); sr.append(Boolean.toString(ajaxEnabled)); sr.append(" presentation=\""); sr.append(lookupPresentation); if (UtilValidate.isNotEmpty(lookupHeight)) { sr.append("\" height=\""); sr.append(lookupHeight); } if (UtilValidate.isNotEmpty(lookupWidth)) { sr.append("\" width=\""); sr.append(lookupWidth); } if (UtilValidate.isNotEmpty(lookupPosition)) { sr.append("\" position=\""); sr.append(lookupPosition); } sr.append("\" fadeBackground=\""); sr.append(fadeBackground); sr.append("\" clearText=\""); sr.append(clearText); sr.append("\" showDescription=\""); sr.append(Boolean.toString(showDescription)); sr.append("\" initiallyCollapsed=\""); sr.append(Boolean.toString(isInitiallyCollapsed)); sr.append("\" lastViewName=\""); sr.append(lastViewName); sr.append("\" conditionGroup=\""); sr.append(conditionGroup); sr.append("\" tabindex=\""); sr.append(tabindex); sr.append("\" delegatorName=\""); sr.append(((HttpSession) context.get("session")).getAttribute("delegatorName").toString()); sr.append("\" />"); executeMacro(writer, sr.toString()); this.addAsterisks(writer, context, modelFormField); this.makeHyperlinkString(writer, lookupField.getSubHyperlink(), context); this.appendTooltip(writer, context, modelFormField); } MacroFormRenderer(String macroLibraryPath, HttpServletRequest request, HttpServletResponse response);  MacroFormRenderer(String macroLibraryPath, HttpServletRequest request, HttpServletResponse response,
                             FtlWriter ftlWriter); @Deprecated  MacroFormRenderer(String macroLibraryPath, Appendable writer, HttpServletRequest request, HttpServletResponse response); }
MacroFormRenderer implements FormStringRenderer { @Override public void renderLookupField(Appendable writer, Map<String, Object> context, LookupField lookupField) throws IOException { ModelFormField modelFormField = lookupField.getModelFormField(); String lookupFieldFormName = lookupField.getFormName(context); String conditionGroup = modelFormField.getConditionGroup(); String className = ""; String alert = "false"; if (UtilValidate.isNotEmpty(modelFormField.getWidgetStyle())) { className = modelFormField.getWidgetStyle(); if (modelFormField.shouldBeRed(context)) { alert = "true"; } } if ("single".equals(modelFormField.getModelForm().getType()) && modelFormField.getRequiredField()) { String requiredStyle = modelFormField.getRequiredFieldStyle(); if (UtilValidate.isEmpty(requiredStyle)) { requiredStyle = "required"; } if (UtilValidate.isEmpty(className)) { className = requiredStyle; } else { className = requiredStyle + " " + className; } } String name = modelFormField.getParameterName(context); String value = modelFormField.getEntry(context, lookupField.getDefaultValue(context)); if (value == null) { value = ""; } String size = Integer.toString(lookupField.getSize()); Integer maxlength = lookupField.getMaxlength(); String id = modelFormField.getCurrentContainerId(context); List<ModelForm.UpdateArea> updateAreas = modelFormField.getOnChangeUpdateAreas(); if (UtilValidate.isEmpty(updateAreas) && UtilValidate.isNotEmpty(lookupFieldFormName)) { String autoCompleterTarget = null; if (lookupFieldFormName.indexOf('?') == -1) { autoCompleterTarget = lookupFieldFormName + "?"; } else { autoCompleterTarget = lookupFieldFormName + "&amp;amp;"; } autoCompleterTarget = autoCompleterTarget + "ajaxLookup=Y"; updateAreas = new LinkedList<>(); updateAreas.add(new ModelForm.UpdateArea("change", id, autoCompleterTarget)); } boolean ajaxEnabled = UtilValidate.isNotEmpty(updateAreas) && this.javaScriptEnabled; String autocomplete = ""; if (!lookupField.getClientAutocompleteField() || !ajaxEnabled) { autocomplete = "off"; } String event = modelFormField.getEvent(); String action = modelFormField.getAction(context); boolean readonly = lookupField.getReadonly(); String descriptionFieldName = lookupField.getDescriptionFieldName(); ModelForm modelForm = modelFormField.getModelForm(); String formName = modelFormField.getParentFormName(); if (UtilValidate.isEmpty(formName)) { formName = FormRenderer.getCurrentFormName(modelForm, context); } StringBuilder targetParameterIter = new StringBuilder(); StringBuilder imgSrc = new StringBuilder(); List<String> targetParameterList = lookupField.getTargetParameterList(context); targetParameterIter.append("["); for (String targetParameter : targetParameterList) { if (targetParameterIter.length() > 1) { targetParameterIter.append(","); } targetParameterIter.append("'"); targetParameterIter.append(targetParameter); targetParameterIter.append("'"); } targetParameterIter.append("]"); this.appendContentUrl(imgSrc, "/images/fieldlookup.gif"); String ajaxUrl = ""; if (ajaxEnabled) { ajaxUrl = createAjaxParamsFromUpdateAreas(updateAreas, "", context); } String lookupPresentation = lookupField.getLookupPresentation(); if (UtilValidate.isEmpty(lookupPresentation)) { lookupPresentation = ""; } String lookupHeight = lookupField.getLookupHeight(); String lookupWidth = lookupField.getLookupWidth(); String lookupPosition = lookupField.getLookupPosition(); String fadeBackground = lookupField.getFadeBackground(); if (UtilValidate.isEmpty(fadeBackground)) { fadeBackground = "false"; } Boolean isInitiallyCollapsed = lookupField.getInitiallyCollapsed(); String clearText = ""; Map<String, Object> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap != null) { clearText = (String) uiLabelMap.get("CommonClear"); } else { Debug.logWarning("Could not find uiLabelMap in context", MODULE); } Boolean showDescription = lookupField.getShowDescription(); if (showDescription == null) { showDescription = "Y".equals(visualTheme.getModelTheme().getLookupShowDescription()); } String lastViewName = request.getParameter("_LAST_VIEW_NAME_"); if (UtilValidate.isEmpty(lastViewName)) { lastViewName = (String) request.getSession().getAttribute("_LAST_VIEW_NAME_"); } if (UtilValidate.isEmpty(lastViewName)) { lastViewName = ""; } lastViewName = UtilHttp.getEncodedParameter(lastViewName); String tabindex = modelFormField.getTabindex(); StringWriter sr = new StringWriter(); sr.append("<@renderLookupField "); sr.append(" className=\""); sr.append(className); sr.append("\" alert=\""); sr.append(alert); sr.append("\" name=\""); sr.append(name); sr.append("\" value=\""); sr.append(value); sr.append("\" size=\""); sr.append(size); sr.append("\" maxlength=\""); sr.append((maxlength != null ? Integer.toString(maxlength) : "")); sr.append("\" id=\""); sr.append(id); sr.append("\" event=\""); if (event != null) { sr.append(event); } sr.append("\" action=\""); if (action != null) { sr.append(action); } sr.append("\" readonly="); sr.append(Boolean.toString(readonly)); sr.append(" autocomplete=\""); sr.append(autocomplete); sr.append("\" descriptionFieldName=\""); sr.append(descriptionFieldName); sr.append("\" formName=\""); sr.append(formName); sr.append("\" fieldFormName=\""); sr.append(lookupFieldFormName); sr.append("\" targetParameterIter="); sr.append(targetParameterIter.toString()); sr.append(" imgSrc=\""); sr.append(imgSrc.toString()); sr.append("\" ajaxUrl=\""); sr.append(ajaxUrl); sr.append("\" ajaxEnabled="); sr.append(Boolean.toString(ajaxEnabled)); sr.append(" presentation=\""); sr.append(lookupPresentation); if (UtilValidate.isNotEmpty(lookupHeight)) { sr.append("\" height=\""); sr.append(lookupHeight); } if (UtilValidate.isNotEmpty(lookupWidth)) { sr.append("\" width=\""); sr.append(lookupWidth); } if (UtilValidate.isNotEmpty(lookupPosition)) { sr.append("\" position=\""); sr.append(lookupPosition); } sr.append("\" fadeBackground=\""); sr.append(fadeBackground); sr.append("\" clearText=\""); sr.append(clearText); sr.append("\" showDescription=\""); sr.append(Boolean.toString(showDescription)); sr.append("\" initiallyCollapsed=\""); sr.append(Boolean.toString(isInitiallyCollapsed)); sr.append("\" lastViewName=\""); sr.append(lastViewName); sr.append("\" conditionGroup=\""); sr.append(conditionGroup); sr.append("\" tabindex=\""); sr.append(tabindex); sr.append("\" delegatorName=\""); sr.append(((HttpSession) context.get("session")).getAttribute("delegatorName").toString()); sr.append("\" />"); executeMacro(writer, sr.toString()); this.addAsterisks(writer, context, modelFormField); this.makeHyperlinkString(writer, lookupField.getSubHyperlink(), context); this.appendTooltip(writer, context, modelFormField); } MacroFormRenderer(String macroLibraryPath, HttpServletRequest request, HttpServletResponse response);  MacroFormRenderer(String macroLibraryPath, HttpServletRequest request, HttpServletResponse response,
                             FtlWriter ftlWriter); @Deprecated  MacroFormRenderer(String macroLibraryPath, Appendable writer, HttpServletRequest request, HttpServletResponse response); static String getAjaxParamsFromTarget(String target); boolean getRenderPagination(); void setRenderPagination(boolean renderPagination); void renderLabel(Appendable writer, Map<String, Object> context, ModelScreenWidget.Label label); @Override void renderDisplayField(Appendable writer, Map<String, Object> context, DisplayField displayField); @Override void renderHyperlinkField(Appendable writer, Map<String, Object> context, HyperlinkField hyperlinkField); @Override void renderMenuField(Appendable writer, Map<String, Object> context, MenuField menuField); @Override void renderTextField(Appendable writer, Map<String, Object> context, TextField textField); @Override void renderTextareaField(Appendable writer, Map<String, Object> context, TextareaField textareaField); @Override void renderDateTimeField(Appendable writer, Map<String, Object> context, DateTimeField dateTimeField); @Override void renderDropDownField(Appendable writer, Map<String, Object> context, DropDownField dropDownField); @Override void renderCheckField(Appendable writer, Map<String, Object> context, CheckField checkField); @Override void renderRadioField(Appendable writer, Map<String, Object> context, RadioField radioField); @Override void renderSubmitField(Appendable writer, Map<String, Object> context, SubmitField submitField); @Override void renderResetField(Appendable writer, Map<String, Object> context, ResetField resetField); @Override void renderHiddenField(Appendable writer, Map<String, Object> context, HiddenField hiddenField); @Override void renderHiddenField(Appendable writer, Map<String, Object> context, ModelFormField modelFormField, String value); @Override void renderIgnoredField(Appendable writer, Map<String, Object> context, IgnoredField ignoredField); @Override void renderFieldTitle(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderSingleFormFieldTitle(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderFormOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderMultiFormClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatListWrapperOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderEmptyFormDataMessage(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatListWrapperClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowCellOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField,
                                              int positionSpan); @Override void renderFormatHeaderRowCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField); @Override void renderFormatHeaderRowFormCellOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowFormCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowFormCellTitleSeparator(Appendable writer, Map<String, Object> context, ModelForm modelForm,
                                                            ModelFormField modelFormField, boolean isLast); @Override void renderFormatItemRowOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatItemRowClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatItemRowCellOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField,
                                            int positionSpan); @Override void renderFormatItemRowCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField); @Override void renderFormatItemRowFormCellOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatItemRowFormCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatSingleWrapperOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatSingleWrapperClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatFieldRowOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatFieldRowClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatFieldRowTitleCellOpen(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderFormatFieldRowTitleCellClose(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderFormatFieldRowSpacerCell(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderFormatFieldRowWidgetCellOpen(Appendable writer, Map<String, Object> context, ModelFormField modelFormField, int positions,
                                                   int positionSpan, Integer nextPositionInRow); @Override void renderFormatFieldRowWidgetCellClose(Appendable writer, Map<String, Object> context, ModelFormField modelFormField, int positions,
                                                    int positionSpan, Integer nextPositionInRow); @Override void renderFormatEmptySpace(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderTextFindField(Appendable writer, Map<String, Object> context, TextFindField textFindField); @Override void renderRangeFindField(Appendable writer, Map<String, Object> context, RangeFindField rangeFindField); @Override void renderDateFindField(Appendable writer, Map<String, Object> context, DateFindField dateFindField); @Override void renderLookupField(Appendable writer, Map<String, Object> context, LookupField lookupField); void renderNextPrev(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFileField(Appendable writer, Map<String, Object> context, FileField textField); @Override void renderPasswordField(Appendable writer, Map<String, Object> context, PasswordField passwordField); @Override void renderImageField(Appendable writer, Map<String, Object> context, ImageField imageField); @Override void renderFieldGroupOpen(Appendable writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup); @Override void renderFieldGroupClose(Appendable writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup); @Override void renderBanner(Appendable writer, Map<String, Object> context, ModelForm.Banner banner); void renderBeginningBoundaryComment(Appendable writer, String widgetType, ModelWidget modelWidget); void renderEndingBoundaryComment(Appendable writer, String widgetType, ModelWidget modelWidget); void renderSortField(Appendable writer, Map<String, Object> context, ModelFormField modelFormField, String titleText); String createAjaxParamsFromUpdateAreas(List<ModelForm.UpdateArea> updateAreas, String extraParams, Map<String, ? extends Object> context); void appendTooltip(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); void makeHyperlinkString(Appendable writer, ModelFormField.SubHyperlink subHyperlink, Map<String, Object> context); void addAsterisks(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); void appendContentUrl(Appendable writer, String location); void makeHyperlinkByType(Appendable writer, String linkType, String linkStyle, String targetType, String target, Map<String,
            String> parameterMap, String description, String targetWindow, String confirmation, ModelFormField modelFormField,
            HttpServletRequest request, HttpServletResponse response, Map<String, Object> context); void makeHyperlinkString(Appendable writer, String linkStyle, String targetType, String target, Map<String, String> parameterMap,
                                    String description, String confirmation, ModelFormField modelFormField, HttpServletRequest request,
                                    HttpServletResponse response, Map<String, Object> context, String targetWindow); void makeHiddenFormLinkAnchor(Appendable writer, String linkStyle, String description, String confirmation, ModelFormField modelFormField,
                                         HttpServletRequest request, HttpServletResponse response, Map<String, Object> context); @Override void renderContainerFindField(Appendable writer, Map<String, Object> context, ContainerField containerField); }
MacroFormRenderer implements FormStringRenderer { @Override public void renderLookupField(Appendable writer, Map<String, Object> context, LookupField lookupField) throws IOException { ModelFormField modelFormField = lookupField.getModelFormField(); String lookupFieldFormName = lookupField.getFormName(context); String conditionGroup = modelFormField.getConditionGroup(); String className = ""; String alert = "false"; if (UtilValidate.isNotEmpty(modelFormField.getWidgetStyle())) { className = modelFormField.getWidgetStyle(); if (modelFormField.shouldBeRed(context)) { alert = "true"; } } if ("single".equals(modelFormField.getModelForm().getType()) && modelFormField.getRequiredField()) { String requiredStyle = modelFormField.getRequiredFieldStyle(); if (UtilValidate.isEmpty(requiredStyle)) { requiredStyle = "required"; } if (UtilValidate.isEmpty(className)) { className = requiredStyle; } else { className = requiredStyle + " " + className; } } String name = modelFormField.getParameterName(context); String value = modelFormField.getEntry(context, lookupField.getDefaultValue(context)); if (value == null) { value = ""; } String size = Integer.toString(lookupField.getSize()); Integer maxlength = lookupField.getMaxlength(); String id = modelFormField.getCurrentContainerId(context); List<ModelForm.UpdateArea> updateAreas = modelFormField.getOnChangeUpdateAreas(); if (UtilValidate.isEmpty(updateAreas) && UtilValidate.isNotEmpty(lookupFieldFormName)) { String autoCompleterTarget = null; if (lookupFieldFormName.indexOf('?') == -1) { autoCompleterTarget = lookupFieldFormName + "?"; } else { autoCompleterTarget = lookupFieldFormName + "&amp;amp;"; } autoCompleterTarget = autoCompleterTarget + "ajaxLookup=Y"; updateAreas = new LinkedList<>(); updateAreas.add(new ModelForm.UpdateArea("change", id, autoCompleterTarget)); } boolean ajaxEnabled = UtilValidate.isNotEmpty(updateAreas) && this.javaScriptEnabled; String autocomplete = ""; if (!lookupField.getClientAutocompleteField() || !ajaxEnabled) { autocomplete = "off"; } String event = modelFormField.getEvent(); String action = modelFormField.getAction(context); boolean readonly = lookupField.getReadonly(); String descriptionFieldName = lookupField.getDescriptionFieldName(); ModelForm modelForm = modelFormField.getModelForm(); String formName = modelFormField.getParentFormName(); if (UtilValidate.isEmpty(formName)) { formName = FormRenderer.getCurrentFormName(modelForm, context); } StringBuilder targetParameterIter = new StringBuilder(); StringBuilder imgSrc = new StringBuilder(); List<String> targetParameterList = lookupField.getTargetParameterList(context); targetParameterIter.append("["); for (String targetParameter : targetParameterList) { if (targetParameterIter.length() > 1) { targetParameterIter.append(","); } targetParameterIter.append("'"); targetParameterIter.append(targetParameter); targetParameterIter.append("'"); } targetParameterIter.append("]"); this.appendContentUrl(imgSrc, "/images/fieldlookup.gif"); String ajaxUrl = ""; if (ajaxEnabled) { ajaxUrl = createAjaxParamsFromUpdateAreas(updateAreas, "", context); } String lookupPresentation = lookupField.getLookupPresentation(); if (UtilValidate.isEmpty(lookupPresentation)) { lookupPresentation = ""; } String lookupHeight = lookupField.getLookupHeight(); String lookupWidth = lookupField.getLookupWidth(); String lookupPosition = lookupField.getLookupPosition(); String fadeBackground = lookupField.getFadeBackground(); if (UtilValidate.isEmpty(fadeBackground)) { fadeBackground = "false"; } Boolean isInitiallyCollapsed = lookupField.getInitiallyCollapsed(); String clearText = ""; Map<String, Object> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap != null) { clearText = (String) uiLabelMap.get("CommonClear"); } else { Debug.logWarning("Could not find uiLabelMap in context", MODULE); } Boolean showDescription = lookupField.getShowDescription(); if (showDescription == null) { showDescription = "Y".equals(visualTheme.getModelTheme().getLookupShowDescription()); } String lastViewName = request.getParameter("_LAST_VIEW_NAME_"); if (UtilValidate.isEmpty(lastViewName)) { lastViewName = (String) request.getSession().getAttribute("_LAST_VIEW_NAME_"); } if (UtilValidate.isEmpty(lastViewName)) { lastViewName = ""; } lastViewName = UtilHttp.getEncodedParameter(lastViewName); String tabindex = modelFormField.getTabindex(); StringWriter sr = new StringWriter(); sr.append("<@renderLookupField "); sr.append(" className=\""); sr.append(className); sr.append("\" alert=\""); sr.append(alert); sr.append("\" name=\""); sr.append(name); sr.append("\" value=\""); sr.append(value); sr.append("\" size=\""); sr.append(size); sr.append("\" maxlength=\""); sr.append((maxlength != null ? Integer.toString(maxlength) : "")); sr.append("\" id=\""); sr.append(id); sr.append("\" event=\""); if (event != null) { sr.append(event); } sr.append("\" action=\""); if (action != null) { sr.append(action); } sr.append("\" readonly="); sr.append(Boolean.toString(readonly)); sr.append(" autocomplete=\""); sr.append(autocomplete); sr.append("\" descriptionFieldName=\""); sr.append(descriptionFieldName); sr.append("\" formName=\""); sr.append(formName); sr.append("\" fieldFormName=\""); sr.append(lookupFieldFormName); sr.append("\" targetParameterIter="); sr.append(targetParameterIter.toString()); sr.append(" imgSrc=\""); sr.append(imgSrc.toString()); sr.append("\" ajaxUrl=\""); sr.append(ajaxUrl); sr.append("\" ajaxEnabled="); sr.append(Boolean.toString(ajaxEnabled)); sr.append(" presentation=\""); sr.append(lookupPresentation); if (UtilValidate.isNotEmpty(lookupHeight)) { sr.append("\" height=\""); sr.append(lookupHeight); } if (UtilValidate.isNotEmpty(lookupWidth)) { sr.append("\" width=\""); sr.append(lookupWidth); } if (UtilValidate.isNotEmpty(lookupPosition)) { sr.append("\" position=\""); sr.append(lookupPosition); } sr.append("\" fadeBackground=\""); sr.append(fadeBackground); sr.append("\" clearText=\""); sr.append(clearText); sr.append("\" showDescription=\""); sr.append(Boolean.toString(showDescription)); sr.append("\" initiallyCollapsed=\""); sr.append(Boolean.toString(isInitiallyCollapsed)); sr.append("\" lastViewName=\""); sr.append(lastViewName); sr.append("\" conditionGroup=\""); sr.append(conditionGroup); sr.append("\" tabindex=\""); sr.append(tabindex); sr.append("\" delegatorName=\""); sr.append(((HttpSession) context.get("session")).getAttribute("delegatorName").toString()); sr.append("\" />"); executeMacro(writer, sr.toString()); this.addAsterisks(writer, context, modelFormField); this.makeHyperlinkString(writer, lookupField.getSubHyperlink(), context); this.appendTooltip(writer, context, modelFormField); } MacroFormRenderer(String macroLibraryPath, HttpServletRequest request, HttpServletResponse response);  MacroFormRenderer(String macroLibraryPath, HttpServletRequest request, HttpServletResponse response,
                             FtlWriter ftlWriter); @Deprecated  MacroFormRenderer(String macroLibraryPath, Appendable writer, HttpServletRequest request, HttpServletResponse response); static String getAjaxParamsFromTarget(String target); boolean getRenderPagination(); void setRenderPagination(boolean renderPagination); void renderLabel(Appendable writer, Map<String, Object> context, ModelScreenWidget.Label label); @Override void renderDisplayField(Appendable writer, Map<String, Object> context, DisplayField displayField); @Override void renderHyperlinkField(Appendable writer, Map<String, Object> context, HyperlinkField hyperlinkField); @Override void renderMenuField(Appendable writer, Map<String, Object> context, MenuField menuField); @Override void renderTextField(Appendable writer, Map<String, Object> context, TextField textField); @Override void renderTextareaField(Appendable writer, Map<String, Object> context, TextareaField textareaField); @Override void renderDateTimeField(Appendable writer, Map<String, Object> context, DateTimeField dateTimeField); @Override void renderDropDownField(Appendable writer, Map<String, Object> context, DropDownField dropDownField); @Override void renderCheckField(Appendable writer, Map<String, Object> context, CheckField checkField); @Override void renderRadioField(Appendable writer, Map<String, Object> context, RadioField radioField); @Override void renderSubmitField(Appendable writer, Map<String, Object> context, SubmitField submitField); @Override void renderResetField(Appendable writer, Map<String, Object> context, ResetField resetField); @Override void renderHiddenField(Appendable writer, Map<String, Object> context, HiddenField hiddenField); @Override void renderHiddenField(Appendable writer, Map<String, Object> context, ModelFormField modelFormField, String value); @Override void renderIgnoredField(Appendable writer, Map<String, Object> context, IgnoredField ignoredField); @Override void renderFieldTitle(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderSingleFormFieldTitle(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderFormOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderMultiFormClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatListWrapperOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderEmptyFormDataMessage(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatListWrapperClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowCellOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField,
                                              int positionSpan); @Override void renderFormatHeaderRowCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField); @Override void renderFormatHeaderRowFormCellOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowFormCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatHeaderRowFormCellTitleSeparator(Appendable writer, Map<String, Object> context, ModelForm modelForm,
                                                            ModelFormField modelFormField, boolean isLast); @Override void renderFormatItemRowOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatItemRowClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatItemRowCellOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField,
                                            int positionSpan); @Override void renderFormatItemRowCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField); @Override void renderFormatItemRowFormCellOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatItemRowFormCellClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatSingleWrapperOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatSingleWrapperClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatFieldRowOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatFieldRowClose(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFormatFieldRowTitleCellOpen(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderFormatFieldRowTitleCellClose(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderFormatFieldRowSpacerCell(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); @Override void renderFormatFieldRowWidgetCellOpen(Appendable writer, Map<String, Object> context, ModelFormField modelFormField, int positions,
                                                   int positionSpan, Integer nextPositionInRow); @Override void renderFormatFieldRowWidgetCellClose(Appendable writer, Map<String, Object> context, ModelFormField modelFormField, int positions,
                                                    int positionSpan, Integer nextPositionInRow); @Override void renderFormatEmptySpace(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderTextFindField(Appendable writer, Map<String, Object> context, TextFindField textFindField); @Override void renderRangeFindField(Appendable writer, Map<String, Object> context, RangeFindField rangeFindField); @Override void renderDateFindField(Appendable writer, Map<String, Object> context, DateFindField dateFindField); @Override void renderLookupField(Appendable writer, Map<String, Object> context, LookupField lookupField); void renderNextPrev(Appendable writer, Map<String, Object> context, ModelForm modelForm); @Override void renderFileField(Appendable writer, Map<String, Object> context, FileField textField); @Override void renderPasswordField(Appendable writer, Map<String, Object> context, PasswordField passwordField); @Override void renderImageField(Appendable writer, Map<String, Object> context, ImageField imageField); @Override void renderFieldGroupOpen(Appendable writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup); @Override void renderFieldGroupClose(Appendable writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup); @Override void renderBanner(Appendable writer, Map<String, Object> context, ModelForm.Banner banner); void renderBeginningBoundaryComment(Appendable writer, String widgetType, ModelWidget modelWidget); void renderEndingBoundaryComment(Appendable writer, String widgetType, ModelWidget modelWidget); void renderSortField(Appendable writer, Map<String, Object> context, ModelFormField modelFormField, String titleText); String createAjaxParamsFromUpdateAreas(List<ModelForm.UpdateArea> updateAreas, String extraParams, Map<String, ? extends Object> context); void appendTooltip(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); void makeHyperlinkString(Appendable writer, ModelFormField.SubHyperlink subHyperlink, Map<String, Object> context); void addAsterisks(Appendable writer, Map<String, Object> context, ModelFormField modelFormField); void appendContentUrl(Appendable writer, String location); void makeHyperlinkByType(Appendable writer, String linkType, String linkStyle, String targetType, String target, Map<String,
            String> parameterMap, String description, String targetWindow, String confirmation, ModelFormField modelFormField,
            HttpServletRequest request, HttpServletResponse response, Map<String, Object> context); void makeHyperlinkString(Appendable writer, String linkStyle, String targetType, String target, Map<String, String> parameterMap,
                                    String description, String confirmation, ModelFormField modelFormField, HttpServletRequest request,
                                    HttpServletResponse response, Map<String, Object> context, String targetWindow); void makeHiddenFormLinkAnchor(Appendable writer, String linkStyle, String description, String confirmation, ModelFormField modelFormField,
                                         HttpServletRequest request, HttpServletResponse response, Map<String, Object> context); @Override void renderContainerFindField(Appendable writer, Map<String, Object> context, ContainerField containerField);  }