Hello,

It seems as though using a Dojo element is not invoking the setter in my
action, and I am not certain why.  I hope I am simply missing something?

Struts 2.1.8, Tomcat 6.x, Firefox 3.5.x

I have included the following jars in WEB-INF/lib, and have the following
inside the <head> tag of the action's JSP:
        <sx:head debug="true" cache="false" compressed="false"
parseContent="false"/>

Jars:
freemarker-2.3.15.jar
struts2-dojo-plugin-2.1.8.jar
struts2-json-plugin-2.1.8.jar
json-lib-2.1.jar


Using s:textfield tag invokes the setter as expected; however, using
sx:datetimepicker and <sx:head> tag does not invoke setter.

<s:textfield name="addMeasurementDate"
                                 size="10"
                                 maxLength="10"
                                 value="2009-01-01"/>
<%--<sx:datetimepicker name="addMeasurementDate"
                       displayFormat="yyyy-MM-dd">
</sx:datetimepicker>--%>


HTML produced when using <sx:head> and <sx:datetimepicker>:

<td class="dateRowOdd" nowrap="nowrap" align="left">
    <div
     dojoType="struts:StrutsDatePicker"    id="widget_631437215"
name="addMeasurementDate"    inputName="dojo.addMeasurementDate"
displayFormat="yyyy-MM-dd"  saveFormat="rfc"></div>
        <script language="JavaScript"
type="text/javascript">djConfig.searchIds.push("widget_631437215");</script>
</td>

JavaScript entries are present in head tag, and in Firefox's View Page
Source I can click on them and access the JavaScript source.

Action contains:

public void setAddMeasurementDate(String addMeasurementDate) {
        System.out.println("----- Date: `" + addMeasurementDate + "\"");
        this.addMeasurementDate = addMeasurementDate;
}

I tried nesting the s:textfield inside the sx:datetimepicker tag as well,
but setter is still not invoked.

I can't seem to find any useful information about this issue. I have tried
<s:submit> and <sx:submit id="..."/>, with the same result (setter not being
invoked) (and sx:submit does not refresh the page, but does invoke
execute()).

Any help is greatly appreciated.

Thanks,
Lee



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to