Author: jacopoc
Date: Fri Aug 11 01:01:43 2006 New Revision: 430717 URL: http://svn.apache.org/viewvc?rev=430717&view=rev Log: Implemented first version of xml export feature for form widgets. Added: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.xml.ftl (with props) incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java (with props) incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java (with props) Modified: incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml incubator/ofbiz/trunk/applications/accounting/widget/AccountingScreens.xml incubator/ofbiz/trunk/framework/common/config/CommonUiLabels.properties incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml Modified: incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=430717&r1=430716&r2=430717&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Fri Aug 11 01:01:43 2006 @@ -34,6 +34,7 @@ <handler name="jsp" type="view" class="org.ofbiz.webapp.view.JspViewHandler"/> <handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/> <handler name="screenfop" type="view" class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/> + <handler name="screenxml" type="view" class="org.ofbiz.widget.screen.ScreenXmlViewHandler"/> <handler name="http" type="view" class="org.ofbiz.webapp.view.HttpViewHandler"/> <preprocessor> @@ -433,6 +434,10 @@ <security https="true" auth="true"/> <response name="success" type="view" value="ListGlAccountsReport"/> </request-map> + <request-map uri="ListGlAccountsExport"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ListGlAccountsExport"/> + </request-map> <request-map uri="AddGlAccount"> <security https="true" auth="true"/> <response name="success" type="view" value="AddGlAccount"/> @@ -1222,6 +1227,7 @@ <view-map name="FindGlobalGlAccount" type="screen" page="component://accounting/widget/AccountingScreens.xml#ListGlAccounts"/> <view-map name="ListGlobalGlAccounts" type="screen" page="component://accounting/widget/AccountingScreens.xml#ListGlAccounts"/> <view-map name="ListGlAccountsReport" type="screenfop" page="component://accounting/widget/AccountingScreens.xml#ListGlAccountsReport" content-type="application/pdf" encoding="none"/> + <view-map name="ListGlAccountsExport" type="screenxml" page="component://accounting/widget/AccountingScreens.xml#ListGlAccountsExport" content-type="text/xml"/> <view-map name="ListGlAccountOrganization" type="screen" page="component://accounting/widget/AccountingScreens.xml#ListGlAccountOrganization"/> <view-map name="GlAccountNavigate" type="screen" page="component://accounting/widget/AccountingScreens.xml#GlAccountNavigate"/> <view-map name="AssignGlAccount" type="screen" page="component://accounting/widget/AccountingScreens.xml#AssignGlAccount"/> Modified: incubator/ofbiz/trunk/applications/accounting/widget/AccountingScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/widget/AccountingScreens.xml?rev=430717&r1=430716&r2=430717&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/widget/AccountingScreens.xml (original) +++ incubator/ofbiz/trunk/applications/accounting/widget/AccountingScreens.xml Fri Aug 11 01:01:43 2006 @@ -277,6 +277,7 @@ <decorator-section name="body"> <container> <link target="ListGlAccountsReport" text="${uiLabelMap.CommonPrint}" style="buttontext"/> + <link target="ListGlAccountsExport" text="${uiLabelMap.CommonExport}" style="buttontext"/> </container> <include-form name="ListGlAccount" location="component://accounting/webapp/accounting/chartofaccounts/GlAccountForms.xml"/> </decorator-section> @@ -295,6 +296,21 @@ </actions> <widgets> <decorator-screen name="FoDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="body"> + <include-form name="ListGlAccount" location="component://accounting/webapp/accounting/chartofaccounts/GlAccountForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="ListGlAccountsExport"> + <section> + <actions> + <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/> + <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="1000"/> + </actions> + <widgets> + <decorator-screen name="XmlDecorator" location="component://common/widget/CommonScreens.xml"> <decorator-section name="body"> <include-form name="ListGlAccount" location="component://accounting/webapp/accounting/chartofaccounts/GlAccountForms.xml"/> </decorator-section> Modified: incubator/ofbiz/trunk/framework/common/config/CommonUiLabels.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/config/CommonUiLabels.properties?rev=430717&r1=430716&r2=430717&view=diff ============================================================================== --- incubator/ofbiz/trunk/framework/common/config/CommonUiLabels.properties (original) +++ incubator/ofbiz/trunk/framework/common/config/CommonUiLabels.properties Fri Aug 11 01:01:43 2006 @@ -139,6 +139,7 @@ CommonExpireAll=Expire All CommonExpireDate=Expire Date CommonExpires=Expires +CommonExport=Export CommonExt=ext CommonFebruary=February CommonFemale=Female Added: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.xml.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.xml.ftl?rev=430717&view=auto ============================================================================== --- incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.xml.ftl (added) +++ incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.xml.ftl Fri Aug 11 01:01:43 2006 @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<#-- + +Copyright 2001-2006 The Apache Software Foundation + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy of +the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. +--> + +${sections.render("body")} Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.xml.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.xml.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.xml.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=430717&r1=430716&r2=430717&view=diff ============================================================================== --- incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) +++ incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml Fri Aug 11 01:01:43 2006 @@ -175,4 +175,15 @@ </section> </screen> + <!-- Simple xml decorator for widget export. --> + <screen name="XmlDecorator"> + <section> + <actions> + </actions> + <widgets> + <platform-specific><html><html-template location="component://common/webcommon/includes/simple.xml.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> + </screens> Added: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java?rev=430717&view=auto ============================================================================== --- incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java (added) +++ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java Fri Aug 11 01:01:43 2006 @@ -0,0 +1,74 @@ +/* + * Copyright 2001-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.ofbiz.widget.screen; + +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.Writer; + +import javax.servlet.ServletContext; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.xml.parsers.ParserConfigurationException; + +import org.ofbiz.base.util.GeneralException; +import org.ofbiz.base.util.UtilJ2eeCompat; +import org.ofbiz.webapp.view.ViewHandler; +import org.ofbiz.webapp.view.ViewHandlerException; +import org.ofbiz.widget.html.HtmlScreenRenderer; +import org.ofbiz.widget.html.HtmlFormRenderer; +import org.xml.sax.SAXException; + +import org.ofbiz.webapp.view.ViewHandlerException; +import org.ofbiz.widget.screen.ScreenWidgetViewHandler; +import org.ofbiz.widget.xml.XmlFormRenderer; + +public class ScreenXmlViewHandler extends ScreenWidgetViewHandler { + + public static final String module = ScreenXmlViewHandler.class.getName(); + + public void render(String name, String page, String info, String contentType, String encoding, HttpServletRequest request, HttpServletResponse response) throws ViewHandlerException { + Writer writer = null; + try { + // use UtilJ2eeCompat to get this setup properly + boolean useOutputStreamNotWriter = false; + if (this.servletContext != null) { + useOutputStreamNotWriter = UtilJ2eeCompat.useOutputStreamNotWriter(this.servletContext); + } + if (useOutputStreamNotWriter) { + ServletOutputStream ros = response.getOutputStream(); + writer = new OutputStreamWriter(ros, "UTF-8"); + } else { + writer = response.getWriter(); + } + + ScreenRenderer screens = new ScreenRenderer(writer, null, htmlScreenRenderer); + screens.populateContextForRequest(request, response, servletContext); + // this is the object used to render forms from their definitions + screens.getContext().put("formStringRenderer", new XmlFormRenderer(request, response)); + screens.render(page); + } catch (IOException e) { + throw new ViewHandlerException("Error in the response writer/output stream: " + e.toString(), e); + } catch (SAXException e) { + throw new ViewHandlerException("XML Error rendering page: " + e.toString(), e); + } catch (ParserConfigurationException e) { + throw new ViewHandlerException("XML Error rendering page: " + e.toString(), e); + } catch (GeneralException e) { + throw new ViewHandlerException("Lower level error rendering page: " + e.toString(), e); + } + } +} Propchange: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java?rev=430717&view=auto ============================================================================== --- incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java (added) +++ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java Fri Aug 11 01:01:43 2006 @@ -0,0 +1,344 @@ +/* + * Copyright 2001-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.ofbiz.widget.xml; + +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.HashSet; +import java.util.Calendar; +import java.sql.Timestamp; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.UtilHttp; +import org.ofbiz.base.util.UtilProperties; +import org.ofbiz.base.util.UtilValidate; +import org.ofbiz.base.util.string.FlexibleStringExpander; +import org.ofbiz.webapp.control.RequestHandler; +import org.ofbiz.webapp.taglib.ContentUrlTag; +import org.ofbiz.widget.WidgetWorker; +import org.ofbiz.widget.form.FormStringRenderer; +import org.ofbiz.widget.form.ModelForm; +import org.ofbiz.widget.form.ModelFormField; +import org.ofbiz.widget.form.ModelFormField.CheckField; +import org.ofbiz.widget.form.ModelFormField.DateFindField; +import org.ofbiz.widget.form.ModelFormField.DateTimeField; +import org.ofbiz.widget.form.ModelFormField.DisplayEntityField; +import org.ofbiz.widget.form.ModelFormField.DisplayField; +import org.ofbiz.widget.form.ModelFormField.DropDownField; +import org.ofbiz.widget.form.ModelFormField.FileField; +import org.ofbiz.widget.form.ModelFormField.HiddenField; +import org.ofbiz.widget.form.ModelFormField.HyperlinkField; +import org.ofbiz.widget.form.ModelFormField.IgnoredField; +import org.ofbiz.widget.form.ModelFormField.ImageField; +import org.ofbiz.widget.form.ModelFormField.LookupField; +import org.ofbiz.widget.form.ModelFormField.PasswordField; +import org.ofbiz.widget.form.ModelFormField.RadioField; +import org.ofbiz.widget.form.ModelFormField.RangeFindField; +import org.ofbiz.widget.form.ModelFormField.ResetField; +import org.ofbiz.widget.form.ModelFormField.SubmitField; +import org.ofbiz.widget.form.ModelFormField.TextField; +import org.ofbiz.widget.form.ModelFormField.TextFindField; +import org.ofbiz.widget.form.ModelFormField.TextareaField; + + +/** + * Widget Library - Xml Form Renderer implementation + * + */ +public class XmlFormRenderer implements FormStringRenderer { + + public static final String module = XmlFormRenderer.class.getName(); + + HttpServletRequest request; + HttpServletResponse response; + + protected XmlFormRenderer() {} + + public XmlFormRenderer(HttpServletRequest request, HttpServletResponse response) { + this.request = request; + this.response = response; + } + + public void appendWhitespace(StringBuffer buffer) { + // appending line ends for now, but this could be replaced with a simple space or something + buffer.append("\r\n"); + //buffer.append(' '); + } + + private void makeTextString(StringBuffer buffer, String widgetStyle, String text) { + // TODO: escape characters here + buffer.append(text); + } + + public void renderDisplayField(StringBuffer buffer, Map context, DisplayField displayField) { + ModelFormField modelFormField = displayField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), displayField.getDescription(context)); + this.appendWhitespace(buffer); + } + + public void renderHyperlinkField(StringBuffer buffer, Map context, HyperlinkField hyperlinkField) { + ModelFormField modelFormField = hyperlinkField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), hyperlinkField.getDescription(context)); + this.appendWhitespace(buffer); + } + + public void renderTextField(StringBuffer buffer, Map context, TextField textField) { + ModelFormField modelFormField = textField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textField.getDefaultValue(context))); + this.appendWhitespace(buffer); + } + + public void renderTextareaField(StringBuffer buffer, Map context, TextareaField textareaField) { + ModelFormField modelFormField = textareaField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textareaField.getDefaultValue(context))); + this.appendWhitespace(buffer); + } + + public void renderDateTimeField(StringBuffer buffer, Map context, DateTimeField dateTimeField) { + ModelFormField modelFormField = dateTimeField.getModelFormField(); + String paramName = modelFormField.getParameterName(context); + String defaultDateTimeString = dateTimeField.getDefaultDateTimeString(context); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, dateTimeField.getDefaultValue(context))); + this.appendWhitespace(buffer); + } + + public void renderDropDownField(StringBuffer buffer, Map context, DropDownField dropDownField) { + ModelFormField modelFormField = dropDownField.getModelFormField(); + ModelForm modelForm = modelFormField.getModelForm(); + String currentValue = modelFormField.getEntry(context); + List allOptionValues = dropDownField.getAllOptionValues(context, modelForm.getDelegator()); + // if the current value should go first, display it + if (UtilValidate.isNotEmpty(currentValue) && "first-in-list".equals(dropDownField.getCurrent())) { + String explicitDescription = dropDownField.getCurrentDescription(context); + if (UtilValidate.isNotEmpty(explicitDescription)) { + this.makeTextString(buffer, modelFormField.getWidgetStyle(), explicitDescription); + } else { + this.makeTextString(buffer, modelFormField.getWidgetStyle(), ModelFormField.FieldInfoWithOptions.getDescriptionForOptionKey(currentValue, allOptionValues)); + } + } else { + Iterator optionValueIter = allOptionValues.iterator(); + while (optionValueIter.hasNext()) { + ModelFormField.OptionValue optionValue = (ModelFormField.OptionValue) optionValueIter.next(); + String noCurrentSelectedKey = dropDownField.getNoCurrentSelectedKey(context); + if ((UtilValidate.isNotEmpty(currentValue) && currentValue.equals(optionValue.getKey()) && "selected".equals(dropDownField.getCurrent())) || + (UtilValidate.isEmpty(currentValue) && noCurrentSelectedKey != null && noCurrentSelectedKey.equals(optionValue.getKey()))) { + this.makeTextString(buffer, modelFormField.getWidgetStyle(), optionValue.getDescription()); + break; + } + } + } + this.appendWhitespace(buffer); + } + + public void renderCheckField(StringBuffer buffer, Map context, CheckField checkField) { + } + + public void renderRadioField(StringBuffer buffer, Map context, RadioField radioField) { + } + + public void renderSubmitField(StringBuffer buffer, Map context, SubmitField submitField) { + } + + public void renderResetField(StringBuffer buffer, Map context, ResetField resetField) { + } + + public void renderHiddenField(StringBuffer buffer, Map context, HiddenField hiddenField) { + } + + public void renderHiddenField(StringBuffer buffer, Map context, ModelFormField modelFormField, String value) { + } + + public void renderIgnoredField(StringBuffer buffer, Map context, IgnoredField ignoredField) { + } + + public void renderFieldTitle(StringBuffer buffer, Map context, ModelFormField modelFormField) { + } + + public void renderSingleFormFieldTitle(StringBuffer buffer, Map context, ModelFormField modelFormField) { + renderFieldTitle(buffer, context, modelFormField); + } + + public void renderFormOpen(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormClose(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderMultiFormClose(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatListWrapperOpen(StringBuffer buffer, Map context, ModelForm modelForm) { + buffer.append("<"); + buffer.append(modelForm.getName()); + buffer.append("Export>"); + this.appendWhitespace(buffer); + } + + public void renderFormatListWrapperClose(StringBuffer buffer, Map context, ModelForm modelForm) { + buffer.append("</"); + buffer.append(modelForm.getName()); + buffer.append("Export>"); + this.appendWhitespace(buffer); + } + + public void renderFormatHeaderRowOpen(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatHeaderRowClose(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatHeaderRowCellOpen(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField) { + } + + public void renderFormatHeaderRowCellClose(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField) { + } + + public void renderFormatHeaderRowFormCellOpen(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatHeaderRowFormCellClose(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatHeaderRowFormCellTitleSeparator(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField, boolean isLast) { + } + + public void renderFormatItemRowOpen(StringBuffer buffer, Map context, ModelForm modelForm) { + buffer.append("<"); + buffer.append(modelForm.getName()); + buffer.append(">"); + this.appendWhitespace(buffer); + } + + public void renderFormatItemRowClose(StringBuffer buffer, Map context, ModelForm modelForm) { + buffer.append("</"); + buffer.append(modelForm.getName()); + buffer.append(">"); + this.appendWhitespace(buffer); + } + + public void renderFormatItemRowCellOpen(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField) { + buffer.append("<"); + buffer.append(modelFormField.getName()); + buffer.append(">"); + this.appendWhitespace(buffer); + } + + public void renderFormatItemRowCellClose(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField) { + buffer.append("</"); + buffer.append(modelFormField.getName()); + buffer.append(">"); + this.appendWhitespace(buffer); + } + + public void renderFormatItemRowFormCellOpen(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatItemRowFormCellClose(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatSingleWrapperOpen(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatSingleWrapperClose(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatFieldRowOpen(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFormatFieldRowClose(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + + public void renderFormatFieldRowTitleCellOpen(StringBuffer buffer, Map context, ModelFormField modelFormField) { + } + + public void renderFormatFieldRowTitleCellClose(StringBuffer buffer, Map context, ModelFormField modelFormField) { + } + + public void renderFormatFieldRowSpacerCell(StringBuffer buffer, Map context, ModelFormField modelFormField) { + } + + public void renderFormatFieldRowWidgetCellOpen(StringBuffer buffer, Map context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow) { + } + + public void renderFormatFieldRowWidgetCellClose(StringBuffer buffer, Map context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow) { + } + + public void renderFormatEmptySpace(StringBuffer buffer, Map context, ModelForm modelForm) { + // TODO + } + + public void renderTextFindField(StringBuffer buffer, Map context, TextFindField textFindField) { + ModelFormField modelFormField = textFindField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textFindField.getDefaultValue(context))); + this.appendWhitespace(buffer); + } + + public void renderRangeFindField(StringBuffer buffer, Map context, RangeFindField rangeFindField) { + ModelFormField modelFormField = rangeFindField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, rangeFindField.getDefaultValue(context))); + this.appendWhitespace(buffer); + } + + public void renderDateFindField(StringBuffer buffer, Map context, DateFindField dateFindField) { + ModelFormField modelFormField = dateFindField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, dateFindField.getDefaultValue(context))); + this.appendWhitespace(buffer); + } + + public void renderLookupField(StringBuffer buffer, Map context, LookupField lookupField) { + ModelFormField modelFormField = lookupField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, lookupField.getDefaultValue(context))); + this.appendWhitespace(buffer); + } + + public void renderNextPrev(StringBuffer buffer, Map context, ModelForm modelForm) { + } + + public void renderFileField(StringBuffer buffer, Map context, FileField textField) { + ModelFormField modelFormField = textField.getModelFormField(); + this.makeTextString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textField.getDefaultValue(context))); + this.appendWhitespace(buffer); + } + + public void renderPasswordField(StringBuffer buffer, Map context, PasswordField passwordField) { + } + + public void renderImageField(StringBuffer buffer, Map context, ImageField imageField) { + // TODO + } + + public void renderFieldGroupOpen(StringBuffer buffer, Map context, ModelForm.FieldGroup fieldGroup) { + // TODO + } + + public void renderFieldGroupClose(StringBuffer buffer, Map context, ModelForm.FieldGroup fieldGroup) { + // TODO + } + + public void renderBanner(StringBuffer buffer, Map context, ModelForm.Banner banner) { + // TODO + } + + public void renderHyperlinkTitle(StringBuffer buffer, Map context, ModelFormField modelFormField, String titleText) { + } +} Propchange: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java ------------------------------------------------------------------------------ svn:mime-type = text/plain |
Free forum by Nabble | Edit this page |