You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Aby Herwendo (JIRA)" <ji...@apache.org> on 2008/10/29 02:56:37 UTC

[jira] Created: (WW-2855) datetimepicker post invalid date value because of dropdowndatepicker's 'inputName' attribute

datetimepicker post invalid date value because of dropdowndatepicker's 'inputName' attribute
--------------------------------------------------------------------------------------------

                 Key: WW-2855
                 URL: https://issues.apache.org/struts/browse/WW-2855
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Dojo Tags
    Affects Versions: 2.0.11.1
         Environment: firefox 3.0.3, ie 7
            Reporter: Aby Herwendo
            Priority: Minor


datetimepicker.ftl using this code to render dojo's dropdowndatepicker widget:

  <#if parameters.name?if_exists != "">
    name="dojo.${parameters.name?html}"<#rt/>
    inputName="${parameters.name?html}"<#rt/>
  </#if>

You can see the differences between dojo's dropdowndatepicker using this simple GET form:

<form>
simple use of dojo's dropdowndatepicker:
<input dojotype="dropdowndatepicker" name="dateOne"  displayFormat="dd-MMM-yyyy" saveFormat="rfc" ><br>
this is what datetimepicker render:
<input dojotype="dropdowndatepicker" name="dojo.dateTwo" inputName="dateTwo" displayFormat="dd-MMM-yyyy" saveFormat="rfc" ><br>
<input type="submit">
</form>

You will see in your submitted url that dateOne submitted correctly with it's saveFormat.
Meanwhile the second input (dateTwo), as rendered by struts's datetimepicker, passes  value from displayFormat instead of saveFormat.

I guess dojo 0.4.0 dropdowndatepicker has bug which will render contrary between 'name' and 'inputName' attribute.
I don't know why it does not happen in 'time' type (StrutsTimePicker).

I think it would be better to strip down 'inputName' attribute in datetimepicker.ftl and use only 'name' attribute.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.