svn commit: r429909 - in /incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormField.java html/HtmlFormRenderer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r429909 - in /incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget: form/ModelFormField.java html/HtmlFormRenderer.java

sichen
Author: sichen
Date: Tue Aug  8 18:09:54 2006
New Revision: 429909

URL: http://svn.apache.org/viewvc?rev=429909&view=rev
Log:
Change defaults of ModelFormField to be same as XSD and moved the dropdown box to before the entry field  OFBIZ-64

Modified:
    incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
    incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

Modified: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=429909&r1=429908&r2=429909&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original)
+++ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Tue Aug  8 18:09:54 2006
@@ -2715,8 +2715,8 @@
     }
 
     public static class TextFindField extends TextField {
-        protected boolean ignoreCase = false;
-        protected String defaultOption = "equals";
+        protected boolean ignoreCase = true;
+        protected String defaultOption = "like";
 
         public TextFindField(Element element, ModelFormField modelFormField) {
             super(element, modelFormField);

Modified: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=429909&r1=429908&r2=429909&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Tue Aug  8 18:09:54 2006
@@ -1411,6 +1411,15 @@
         String defaultOption = textFindField.getDefaultOption();
         boolean ignCase = textFindField.getIgnoreCase();
 
+        buffer.append(" <select name=\"");
+        buffer.append(modelFormField.getParameterName(context));
+        buffer.append("_op\" class=\"selectBox\">");
+        buffer.append("<option value=\"equals\"" + ("equals".equals(defaultOption)? " selected": "") + ">" + opEquals + "</option>");
+        buffer.append("<option value=\"like\"" + ("like".equals(defaultOption)? " selected": "") + ">" + opBeginsWith + "</option>");
+        buffer.append("<option value=\"contains\"" + ("contains".equals(defaultOption)? " selected": "") + ">" + opContains + "</option>");
+        buffer.append("<option value=\"empty\"" + ("empty".equals(defaultOption)? " selected": "") + ">" + opIsEmpty + "</option>");
+        buffer.append("</select>");
+        
         buffer.append("<input type=\"text\"");
 
         String className = modelFormField.getWidgetStyle();
@@ -1456,15 +1465,6 @@
             buffer.append('"');
         }
         buffer.append('>');
-
-        buffer.append(" <select name=\"");
-        buffer.append(modelFormField.getParameterName(context));
-        buffer.append("_op\" class=\"selectBox\">");
-        buffer.append("<option value=\"equals\"" + ("equals".equals(defaultOption)? " selected": "") + ">" + opEquals + "</option>");
-        buffer.append("<option value=\"like\"" + ("like".equals(defaultOption)? " selected": "") + ">" + opBeginsWith + "</option>");
-        buffer.append("<option value=\"contains\"" + ("contains".equals(defaultOption)? " selected": "") + ">" + opContains + "</option>");
-        buffer.append("<option value=\"empty\"" + ("empty".equals(defaultOption)? " selected": "") + ">" + opIsEmpty + "</option>");
-        buffer.append("</select>");
 
         buffer.append(" <input type=\"checkbox\" name=\"");
         buffer.append(modelFormField.getParameterName(context));