Mmm, would you prefer that I remove the reference to HTML in widget-form.xsd? I see other HTML references and a lot of references to CSS also, should we remove them also, etc.?

Jacques

Le 06/04/2015 11:58, Adrian Crum a écrit :
We should not refer to HTML in the schema - since widgets are rendering format 
agnostic.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 4/6/2015 10:34 AM, jler...@apache.org wrote:
Author: jleroux
Date: Mon Apr  6 09:34:54 2015
New Revision: 1671500

URL: http://svn.apache.org/r1671500
Log:
Adds HTML tabindex into widget form fields. It allows to set the tab order of elements (when the "tab" button is used for navigating). For instance by column when columns are used with the position attribute.
Normally all concerned fields are concerned.

Modified:
     ofbiz/trunk/framework/widget/dtd/c
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormFieldBuilder.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl

Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=1671500&r1=1671499&r2=1671500&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Mon Apr  6 09:34:54 2015
@@ -920,6 +920,17 @@ under the License.
                      </xs:documentation>
                  </xs:annotation>
              </xs:attribute>
+            <xs:attribute type="xs:string" name="tabindex">
+                <xs:annotation>
+                    <xs:documentation>
+                        The HTML tabindex specifies the tab order of an element (when 
the "tab" button is used for navigating).
+                        In HTML 4.01, the tabindex attribute can be used with 
a, area, button, input, object, select, and textarea.
+                        In HTML5, the tabindex attribute can be used on any 
HTML element, however, it is not necessarily useful.
+                        To exclude an element from the tab order, set the 
value of tabindex to 0
+                        In that case the element is skipped when the user tabs 
around the form.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
          </xs:complexType>
      </xs:element>


Modified: 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java?rev=1671500&r1=1671499&r2=1671500&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java 
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java 
Mon Apr  6 09:34:54 2015
@@ -138,6 +138,7 @@ public class ModelFormField {
      private final String widgetAreaStyle;
      private final String widgetStyle;
      private final String parentFormName;
+    private final String tabindex;

      private ModelFormField(ModelFormFieldBuilder builder) {
          this.action = builder.getAction();
@@ -189,6 +190,7 @@ public class ModelFormField {
          this.widgetAreaStyle = builder.getWidgetAreaStyle();
          this.widgetStyle = builder.getWidgetStyle();
          this.parentFormName = builder.getParentFormName();
+        this.tabindex = builder.getTabindex();
      }

      public FlexibleStringExpander getAction() {
@@ -406,7 +408,11 @@ public class ModelFormField {
          } else {
             return this.modelForm.getName() + "_" + this.getFieldName();
          }
-     }
+    }
+
+    public String getTabindex() {
+        return tabindex;
+    }

      public Map<String, ? extends Object> getMap(Map<String, ? extends Object> 
context) {
          if (UtilValidate.isEmpty(this.mapAcsr))

Modified: 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormFieldBuilder.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormFieldBuilder.java?rev=1671500&r1=1671499&r2=1671500&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormFieldBuilder.java
 (original)
+++ 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormFieldBuilder.java
 Mon Apr  6 09:34:54 2015
@@ -105,6 +105,7 @@ public class ModelFormFieldBuilder {
      private String widgetAreaStyle = "";
      private String widgetStyle = "";
      private String parentFormName = "";
+    private String tabindex = "";

      public ModelFormFieldBuilder() {
      }
@@ -154,6 +155,7 @@ public class ModelFormFieldBuilder {
          this.widgetAreaStyle = fieldElement.getAttribute("widget-area-style");
          this.widgetStyle = fieldElement.getAttribute("widget-style");
          this.parentFormName = fieldElement.getAttribute("form-name");
+        this.tabindex = fieldElement.getAttribute("tabindex");
          Element childElement = null;
          List<? extends Element> subElements = 
UtilXml.childElementList(fieldElement);
          for (Element subElement : subElements) {
@@ -258,6 +260,7 @@ public class ModelFormFieldBuilder {
          this.widgetAreaStyle = modelFormField.getWidgetAreaStyle();
          this.widgetStyle = modelFormField.getWidgetStyle();
          this.parentFormName = modelFormField.getParentFormName();
+        this.tabindex = modelFormField.getTabindex();
      }

      public ModelFormFieldBuilder(ModelFormFieldBuilder builder) {
@@ -298,6 +301,7 @@ public class ModelFormFieldBuilder {
          this.widgetAreaStyle = builder.getWidgetAreaStyle();
          this.widgetStyle = builder.getWidgetStyle();
          this.parentFormName = builder.getParentFormName();
+        this.tabindex = builder.getTabindex();
      }

      public ModelFormFieldBuilder addOnChangeUpdateArea(UpdateArea 
onChangeUpdateArea) {
@@ -466,6 +470,10 @@ public class ModelFormFieldBuilder {
          return this.parentFormName;
      }

+    public String getTabindex() {
+        return tabindex;
+    }
+
      private boolean induceFieldInfo(ModelForm modelForm, String 
defaultFieldType, ModelReader entityModelReader, DispatchContext 
dispatchContext) {
          if (induceFieldInfoFromEntityField(defaultFieldType, 
entityModelReader))
              return true;
@@ -746,6 +754,8 @@ public class ModelFormFieldBuilder {
this.onChangeUpdateAreas.addAll(builder.getOnChangeUpdateAreas());
          if (UtilValidate.isNotEmpty(builder.getOnClickUpdateAreas()))
this.onClickUpdateAreas.addAll(builder.getOnClickUpdateAreas());
+        if (UtilValidate.isNotEmpty(builder.getTabindex()))
+            this.tabindex = builder.getTabindex();
          this.encodeOutput = builder.getEncodeOutput();
          this.position = builder.getPosition();
          this.requiredField = builder.getRequiredField();
@@ -932,4 +942,8 @@ public class ModelFormFieldBuilder {
          this.parentFormName = parentFormName;
          return this;
      }
+    public ModelFormFieldBuilder setTabindex(String tabindex) {
+        this.tabindex = tabindex;
+        return this;
+    }
  }

Modified: 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1671500&r1=1671499&r2=1671500&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
 (original)
+++ 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
 Mon Apr  6 09:34:54 2015
@@ -361,6 +361,7 @@ public final class MacroFormRenderer imp
          }
          String ajaxUrl = createAjaxParamsFromUpdateAreas(updateAreas, "", 
context);
          boolean disabled = textField.getDisabled();
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderTextField ");
          sr.append("name=\"");
@@ -397,6 +398,8 @@ public final class MacroFormRenderer imp
          sr.append(mask);
          sr.append("\" placeholder=\"");
          sr.append(placeholder);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          ModelFormField.SubHyperlink subHyperlink = 
textField.getSubHyperlink();
@@ -449,6 +452,7 @@ public final class MacroFormRenderer imp
          if (userLogin != null) {
              language = UtilValidate.isEmpty((String) userLogin.get("lastLocale")) ? 
"en" : (String) userLogin.get("lastLocale");
          }
+        String tabindex = modelFormField.getTabindex();
          String value = modelFormField.getEntry(context, 
textareaField.getDefaultValue(context));
          StringWriter sr = new StringWriter();
          sr.append("<@renderTextareaField ");
@@ -474,6 +478,8 @@ public final class MacroFormRenderer imp
          sr.append(language);
          sr.append("\" buttons=\"");
          sr.append(buttons);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.addAsterisks(writer, context, modelFormField);
@@ -504,7 +510,7 @@ public final class MacroFormRenderer imp
              try {
                  step = Integer.valueOf(stepString).intValue();
              } catch (IllegalArgumentException e) {
- Debug.logWarning("Inavalid value for step property for field[" + paramName + "] with input-method=\"time-dropdown\" " + " Found Value [" + stepString + "] " + e.getMessage(), module); + Debug.logWarning("Invalid value for step property for field[" + paramName + "] with input-method=\"time-dropdown\" " + " Found Value [" + stepString + "] " + e.getMessage(), module);
              }
              timeValues.append("[");
              for (int i = 0; i <= 59;) {
@@ -650,6 +656,7 @@ public final class MacroFormRenderer imp
                  formattedMask = "9999-99-99 99:99:99";
              }
          }
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderDateTimeField ");
          sr.append("name=\"");
@@ -714,6 +721,8 @@ public final class MacroFormRenderer imp
          sr.append(formName);
          sr.append("\" mask=\"");
          sr.append(formattedMask);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.addAsterisks(writer, context, modelFormField);
@@ -879,6 +888,7 @@ public final class MacroFormRenderer imp
              ignoreCase = autoComplete.getIgnoreCase();
              fullSearch = autoComplete.getFullSearch();
          }
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderDropDownField ");
          sr.append("name=\"");
@@ -947,6 +957,8 @@ public final class MacroFormRenderer imp
          sr.append(ignoreCase);
          sr.append("\" fullSearch=\"");
          sr.append(fullSearch);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          ModelFormField.SubHyperlink subHyperlink = 
dropDownField.getSubHyperlink();
@@ -974,6 +986,7 @@ public final class MacroFormRenderer imp
                  alert = "true";
              }
          }
+        String tabindex = modelFormField.getTabindex();
          List<ModelFormField.OptionValue> allOptionValues = 
checkField.getAllOptionValues(context, WidgetWorker.getDelegator(context));
          items.append("[");
          for (ModelFormField.OptionValue optionValue : allOptionValues) {
@@ -1010,6 +1023,8 @@ public final class MacroFormRenderer imp
          if (action != null) {
              sr.append(action);
          }
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.appendTooltip(writer, context, modelFormField);
@@ -1033,6 +1048,7 @@ public final class MacroFormRenderer imp
              }
          }
          String noCurrentSelectedKey = 
radioField.getNoCurrentSelectedKey(context);
+        String tabindex = modelFormField.getTabindex();
          items.append("[");
          for (ModelFormField.OptionValue optionValue : allOptionValues) {
              if (items.length() > 1) {
@@ -1066,6 +1082,8 @@ public final class MacroFormRenderer imp
          if (action != null) {
              sr.append(action);
          }
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.appendTooltip(writer, context, modelFormField);
@@ -1106,6 +1124,7 @@ public final class MacroFormRenderer imp
          if (ajaxEnabled) {
              ajaxUrl = createAjaxParamsFromUpdateAreas(updateAreas, "", 
context);
          }
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderSubmitField ");
          sr.append("buttonType=\"");
@@ -1140,6 +1159,8 @@ public final class MacroFormRenderer imp
          if (ajaxEnabled) {
              sr.append(ajaxUrl);
          }
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.appendTooltip(writer, context, modelFormField);
@@ -1754,6 +1775,7 @@ public final class MacroFormRenderer imp
          String ignoreCase = UtilProperties.getMessage("conditional", 
"ignore_case", locale);
          boolean ignCase = textFindField.getIgnoreCase();
          boolean hideIgnoreCase = textFindField.getHideIgnoreCase();
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderTextFindField ");
          sr.append(" name=\"");
@@ -1790,6 +1812,8 @@ public final class MacroFormRenderer imp
          sr.append(Boolean.toString(ignCase));
          sr.append(" ignoreCase=\"");
          sr.append(ignoreCase);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.appendTooltip(writer, context, modelFormField);
@@ -1835,6 +1859,7 @@ public final class MacroFormRenderer imp
              value2 = "";
          }
          String defaultOptionThru = rangeFindField.getDefaultOptionThru();
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderRangeFindField ");
          sr.append(" className=\"");
@@ -1871,6 +1896,8 @@ public final class MacroFormRenderer imp
          sr.append(value2);
          sr.append("\" defaultOptionThru=\"");
          sr.append(defaultOptionThru);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.appendTooltip(writer, context, modelFormField);
@@ -1958,6 +1985,7 @@ public final class MacroFormRenderer imp
          if (UtilValidate.isNotEmpty(modelFormField.getTitleStyle())) {
              titleStyle = modelFormField.getTitleStyle();
          }
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderDateFindField ");
          sr.append(" className=\"");
@@ -2010,6 +2038,8 @@ public final class MacroFormRenderer imp
          sr.append(opUpThruDay);
          sr.append("\" opIsEmpty=\"");
          sr.append(opIsEmpty);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.appendTooltip(writer, context, modelFormField);
@@ -2071,7 +2101,7 @@ public final class MacroFormRenderer imp
          String formName = modelFormField.getParentFormName();
          if (UtilValidate.isEmpty(formName)) {
              formName = FormRenderer.getCurrentFormName(modelForm, context);
-        }
+        }
          StringBuilder targetParameterIter = new StringBuilder();
          StringBuilder imgSrc = new StringBuilder();
          // FIXME: refactor using the StringUtils methods
@@ -2131,6 +2161,7 @@ public final class MacroFormRenderer imp
          if (UtilValidate.isEmpty(lastViewName)) {
              lastViewName = "";
          }
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderLookupField ");
          sr.append(" className=\"");
@@ -2191,6 +2222,8 @@ public final class MacroFormRenderer imp
          sr.append(Boolean.toString(isInitiallyCollapsed));
          sr.append("\" lastViewName=\"");
          sr.append(lastViewName);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.addAsterisks(writer, context, modelFormField);
@@ -2466,6 +2499,7 @@ public final class MacroFormRenderer imp
          if (!textField.getClientAutocompleteField()) {
              autocomplete = "off";
          }
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderFileField ");
          sr.append(" className=\"");
@@ -2482,6 +2516,8 @@ public final class MacroFormRenderer imp
          sr.append(maxlength);
          sr.append("\" autocomplete=\"");
          sr.append(autocomplete);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.makeHyperlinkString(writer, textField.getSubHyperlink(), 
context);
@@ -2516,6 +2552,7 @@ public final class MacroFormRenderer imp
          if (!passwordField.getClientAutocompleteField()) {
              autocomplete = "off";
          }
+        String tabindex = modelFormField.getTabindex();
          StringWriter sr = new StringWriter();
          sr.append("<@renderPasswordField ");
          sr.append(" className=\"");
@@ -2534,6 +2571,8 @@ public final class MacroFormRenderer imp
          sr.append(id);
          sr.append("\" autocomplete=\"");
          sr.append(autocomplete);
+        sr.append("\" tabindex=\"");
+        sr.append(tabindex);
          sr.append("\" />");
          executeMacro(writer, sr.toString());
          this.addAsterisks(writer, context, modelFormField);

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1671500&r1=1671499&r2=1671500&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Mon Apr  6 
09:34:54 2015
@@ -48,7 +48,7 @@ under the License.
  </#macro>
  <#macro renderHyperlinkField></#macro>

-<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask placeholder=""> +<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex placeholder="">
    <#if mask?has_content>
      <script type="text/javascript">
        jQuery(function($){jQuery("#${id}").mask("${mask}");});
@@ -64,6 +64,7 @@ under the License.
      <#if event?has_content && action?has_content> 
${event}="${action}"</#if><#rt/>
      <#if clientAutocomplete?has_content && clientAutocomplete=="false"> 
autocomplete="off"</#if><#rt/>
      <#if placeholder?has_content> placeholder="${placeholder}"</#if><#rt/>
+    <#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
    /><#t/>
    <#if ajaxEnabled?has_content && ajaxEnabled>
<#assign defaultMinLength = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultMinLength")>
@@ -72,7 +73,7 @@ under the License.
    </#if>
  </#macro>

-<#macro renderTextareaField name className alert cols rows id readonly value 
visualEditorEnable buttons language="">
+<#macro renderTextareaField name className alert cols rows id readonly value 
visualEditorEnable buttons tabindex language="">
    <textarea name="${name}"<#t/>
      <@renderClass className alert />
      <#if cols?has_content> cols="${cols}"</#if><#rt/>
@@ -80,6 +81,7 @@ under the License.
      <#if id?has_content> id="${id}"</#if><#rt/>
      <#if readonly?has_content && readonly=='readonly'> 
readonly="readonly"</#if><#rt/>
      <#if maxlength?has_content> maxlength="${maxlength}"</#if><#rt/>
+    <#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
      ><#t/>
      <#if value?has_content>${value}</#if><#t/>
    </textarea><#lt/>
@@ -102,10 +104,10 @@ under the License.
    </#if>
  </#macro>

-<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName mask="" event="" action="" step="" timeValues=""> +<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName tabindex mask="" event="" action="" step="" timeValues="">
    <span class="view-calendar">
      <#if dateType!="time" >
-      <input type="text" name="${name}_i18n" <@renderClass className alert 
/><#rt/>
+      <input type="text" <#if tabindex?has_content> tabindex="${tabindex}"</#if> 
name="${name}_i18n" <@renderClass className alert /><#rt/>
          <#if title?has_content> title="${title}"</#if>
          <#if value?has_content> value="${value}"</#if>
          <#if size?has_content> size="${size}"</#if><#rt/>
@@ -113,7 +115,7 @@ under the License.
          <#if id?has_content> id="${id}_i18n"</#if>/><#rt/>
      </#if>
      <#-- the style attribute is a little bit messy but when using disply:none 
the timepicker is shown on a wrong place -->
- <input type="text" name="${name}" style="height:1px;width:1px;border:none;background-color:transparent" <#if event?has_content && action?has_content> ${event}="${action}"</#if> <@renderClass className alert /><#rt/> + <input type="text" <#if tabindex?has_content> tabindex="${tabindex}"</#if> name="${name}" style="height:1px;width:1px;border:none;background-color:transparent" <#if event?has_content && action?has_content> ${event}="${action}"</#if> <@renderClass className alert /><#rt/>
        <#if title?has_content> title="${title}"</#if>
        <#if value?has_content> value="${value}"</#if>
        <#if size?has_content> size="${size}"</#if><#rt/>
@@ -224,9 +226,9 @@ under the License.
    </span>
  </#macro>

-<#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch> +<#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch tabindex>
    <span class="ui-widget">
- <select name="${name?default("")}<#rt/>" <@renderClass className alert /><#if id?has_content> id="${id}"</#if><#if multiple?has_content> multiple="multiple"</#if><#if otherFieldSize gt 0> onchange="process_choice(this,document.${formName}.${otherFieldName})"</#if><#if event?has_content> ${event}="${action}"</#if><#if size?has_content> size="${size}"</#if>> + <select name="${name?default("")}<#rt/>" <@renderClass className alert /><#if id?has_content> id="${id}"</#if><#if multiple?has_content> multiple="multiple"</#if><#if otherFieldSize gt 0> onchange="process_choice(this,document.${formName}.${otherFieldName})"</#if><#if event?has_content> ${event}="${action}"</#if><#if size?has_content> size="${size}"</#if><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>>
        <#if firstInList?has_content && currentValue?has_content && 
!multiple?has_content>
          <option selected="selected" 
value="${currentValue}">${explicitDescription}</option><#rt/>
          <option value="${currentValue}">---</option><#rt/>
@@ -265,10 +267,10 @@ under the License.
    </#if>
  </#macro>

-<#macro renderCheckField items className alert id allChecked currentValue name 
event action>
+<#macro renderCheckField items className alert id allChecked currentValue name 
event action tabindex>
    <#list items as item>
      <span <@renderClass className alert />><#rt/>
-      <input type="checkbox"<#if (item_index == 0)> id="${id}"</#if><#rt/>
+      <input type="checkbox"<#if (item_index == 0)> id="${id}"</#if><#rt/><#if tabindex?has_content> 
tabindex="${tabindex}"</#if><#rt/>
          <#if allChecked?has_content && allChecked> checked="checked" <#elseif 
allChecked?has_content && !allChecked>
            <#elseif currentValue?has_content && currentValue==item.value> 
checked="checked"</#if>
            name="${name?default("")?html}" value="${item.value?default("")?html}"<#if 
event?has_content> ${event}="${action}"</#if>/><#rt/>
@@ -277,18 +279,18 @@ under the License.
    </#list>
  </#macro>

-<#macro renderRadioField items className alert currentValue noCurrentSelectedKey 
name event action>
+<#macro renderRadioField items className alert currentValue noCurrentSelectedKey 
name event action tabindex>
    <#list items as item>
      <span <@renderClass className alert />><#rt/>
-      <input type="radio"<#if currentValue?has_content><#if currentValue==item.key> 
checked="checked"</#if>
-        <#elseif noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> 
checked="checked"</#if>
+ <input type="radio"<#if currentValue?has_content><#if currentValue==item.key> checked="checked"</#if><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
+        <#elseif noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> 
checked="checked"</#if>
          name="${name?default("")?html}" value="${item.key?default("")?html}"<#if event?has_content> 
${event}="${action}"</#if>/><#rt/>
        ${item.description}
      </span>
    </#list>
  </#macro>

-<#macro renderSubmitField buttonType className alert formName title name event 
action imgSrc confirmation containerId ajaxUrl>
+<#macro renderSubmitField buttonType className alert formName title name event 
action imgSrc confirmation containerId ajaxUrl tabindex>
    <#if buttonType=="text-link">
<a <@renderClass className alert /> href="javascript:document.${formName}.submit()" <#if confirmation?has_content>onclick="return confirm('${confirmation?js_string}');"</#if>><#if title?has_content>${title}</#if> </a>
    <#elseif buttonType=="image">
@@ -300,6 +302,7 @@ under the License.
      <#if name??> name="${name}"</#if><#if title?has_content> value="${title}"</#if><#if 
event?has_content> ${event}="${action}"</#if>
<#if containerId?has_content> onclick="<#if confirmation?has_content>if (confirm('${confirmation?js_string}')) </#if>ajaxSubmitFormUpdateAreas('${containerId}', '${ajaxUrl}')"
        <#else><#if confirmation?has_content> onclick="return 
confirm('${confirmation?js_string}');"</#if>
+    <#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
      </#if>/>
    </#if>
  </#macro>
@@ -457,7 +460,7 @@ under the License.

  <#macro renderFormatEmptySpace>&nbsp;</#macro>

-<#macro renderTextFindField name value defaultOption opEquals opBeginsWith opContains opIsEmpty opNotEqual className alert size maxlength autocomplete titleStyle hideIgnoreCase ignCase ignoreCase> +<#macro renderTextFindField name value defaultOption opEquals opBeginsWith opContains opIsEmpty opNotEqual className alert size maxlength autocomplete titleStyle hideIgnoreCase ignCase ignoreCase tabindex>
    <#if opEquals?has_content>
      <select <#if name?has_content>name="${name}_op"</#if> 
class="selectBox"><#rt/>
        <option value="equals"<#if defaultOption=="equals"> 
selected="selected"</#if>>${opEquals}</option><#rt/>
@@ -469,7 +472,7 @@ under the License.
    <#else>
      <input type="hidden" name=<#if name?has_content> "${name}_op"</#if> 
value="${defaultOption}"/><#rt/>
    </#if>
- <input type="text" <@renderClass className alert /> name="${name}"<#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/> + <input type="text" <@renderClass className alert /> name="${name}"<#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
      <#if titleStyle?has_content><span class="${titleStyle}" ><#rt/></#if>
      <#if hideIgnoreCase>
        <input type="hidden" name="${name}_ic" value=<#if ignCase>"Y"<#else> 
""</#if>/><#rt/>
@@ -480,9 +483,9 @@ under the License.
    </#if>
  </#macro>

-<#macro renderDateFindField className alert name localizedInputTitle value value2 size maxlength dateType formName defaultDateTimeString imgSrc localizedIconTitle titleStyle defaultOptionFrom defaultOptionThru opEquals opSameDay opGreaterThanFromDayStart opGreaterThan opGreaterThan opLessThan opUpToDay opUpThruDay opIsEmpty> +<#macro renderDateFindField className alert name localizedInputTitle value value2 size maxlength dateType formName defaultDateTimeString imgSrc localizedIconTitle titleStyle defaultOptionFrom defaultOptionThru opEquals opSameDay opGreaterThanFromDayStart opGreaterThan opGreaterThan opLessThan opUpToDay opUpThruDay opIsEmpty tabindex>
    <span class="view-calendar">
- <input id="${name?html}_fld0_value" type="text" <@renderClass className alert /><#if name?has_content> name="${name?html}_fld0_value"</#if><#if localizedInputTitle?has_content> title="${localizedInputTitle}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if>/><#rt/> + <input id="${name?html}_fld0_value" type="text" <@renderClass className alert /><#if name?has_content> name="${name?html}_fld0_value"</#if><#if localizedInputTitle?has_content> title="${localizedInputTitle}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if>/><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
      <#if dateType != "time">
        <script type="text/javascript">
          <#if dateType == "date">
@@ -556,8 +559,8 @@ under the License.
    </span>
  </#macro>

-<#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru> - <input type="text" <@renderClass className alert /> <#if name?has_content>name="${name}_fld0_value"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/> +<#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru tabindex> + <input type="text" <@renderClass className alert /> <#if name?has_content>name="${name}_fld0_value"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
    <#if titleStyle?has_content>
      <span class="${titleStyle}" ><#rt/>
    </#if>
@@ -616,7 +619,7 @@ Parameter: showDescription, String, opti
  Parameter: initiallyCollapsed, Not used.
  Parameter: lastViewName, String, optional - If the ajaxEnabled parameter is 
true, the contents of lastViewName will be appended to the Ajax URL.
  -->
-<#macro renderLookupField name formName fieldFormName className="" alert="false" value="" size="" maxlength="" id="" event="" action="" readonly=false autocomplete="" descriptionFieldName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled=javaScriptEnabled presentation="layer" width="" height="" position="" fadeBackground="true" clearText="" showDescription="" initiallyCollapsed="" lastViewName="main" > +<#macro renderLookupField name formName fieldFormName tabindex className="" alert="false" value="" size="" maxlength="" id="" event="" action="" readonly=false autocomplete="" descriptionFieldName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled=javaScriptEnabled presentation="layer" width="" height="" position="" fadeBackground="true" clearText="" showDescription="" initiallyCollapsed="" lastViewName="main" >
    <#if 
Static["org.ofbiz.widget.model.ModelWidget"].widgetBoundaryCommentsEnabled(context)>
    <!-- @renderLookupField -->
    </#if>
@@ -643,9 +646,9 @@ Parameter: lastViewName, String, optiona
    </#if>
    <span class="field-lookup">
      <#if size?has_content && size=="0">
-      <input type="hidden" <#if name?has_content> name="${name}"/></#if>
+      <input type="hidden" <#if name?has_content> name="${name}"/></#if><#if tabindex?has_content> 
tabindex="${tabindex}"</#if><#rt/>
      <#else>
-      <input type="text" <@renderClass className alert /><#if name?has_content> 
name="${name}"</#if><#if value?has_content> value="${value}"</#if>
+ <input type="text" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/> <#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#rt/> <#if readonly?has_content && readonly> readonly="readonly"</#if><#rt/><#if event?has_content && action?has_content> ${event}="${action}"</#if><#rt/>
          <#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/></#if>
@@ -765,8 +768,8 @@ Parameter: lastViewName, String, optiona
    </#if>
  </#macro>

-<#macro renderFileField className alert name value size maxlength autocomplete>
- <input type="file" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/>
+<#macro renderFileField className alert name value size maxlength autocomplete 
tabindex>
+ <input type="file" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
  </#macro>
  <#macro renderPasswordField className alert name value size maxlength id 
autocomplete>
<input type="password" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/>



Reply via email to