Hello Dave Newton, I confirm that i define the testDate in my applicationContext.xml file. And if you use <s:form/> tag. the magic thing is still happen . Null date become today in map.
Best regards, ======= At 2007-04-24, 21:27:41 you wrote: ======= >--- Martin Gainty <[EMAIL PROTECTED]> wrote: >> please supply the applicationContext.xml definition >> for 'testDate' > >Huh? > >I'd be more likely to think it has something to do >with not using the <s:form.../> tag, but I've never >been entirely sure what the relationship between it >and the input tags really is. > >d. > >> >> e.g. web..xml >> <action name="springExample" class="springAction"> >> <result name="success"> >> /WEB-INF/view/springExample.jsp >> </result> >> </action> >> >> <beans default-autowire="autodetect"> >> <bean id="thingManager" >> >> >class="org.apache.struts2.portlet.example.spring.ThingManager"> >> </bean> >> <bean id="springAction" >> >> >class="org.apache.struts2.portlet.example.spring.SpringAction" >> >> singleton="false"> >> <property name="thingManager"> >> <ref bean="thingManager" /> >> </property> >> </bean> >> </beans> >> >> M- >> This email message and any files transmitted with it >> contain confidential >> information intended only for the person(s) to whom >> this email message is >> addressed. If you have received this email message >> in error, please notify >> the sender immediately by telephone or email and >> destroy the original >> message without making a copy. Thank you. >> >> ----- Original Message ----- >> From: "longhao" <[EMAIL PROTECTED]> >> To: "Struts Users Mailing List" >> <user@struts.apache.org> >> Sent: Tuesday, April 24, 2007 7:19 AM >> Subject: Null date become today in map when use >> textfield tag >> >> >> > TestDateAction.java >> > public class TestDateAction extends ActionSupport >> { >> > >> > private Date singleDate; >> > private Map mapDate; >> > private List listDate; >> > >> > @Override >> > public String execute() throws Exception { >> > >> > return super.execute(); >> > >> > } >> > >> > ....set get methods >> > } >> > >> > >> > index.jsp >> > >> > ....jsp tag input >> > <form action="testDate.action"> >> > <s:textfield name="mapDate['today']"/> >> > <s:textfield name="singleDate"/> >> > <s:textfield name="listDate[0]"/> >> > <input type="submit"/> >> > <form> >> > >> > struts.xml >> > <package name="default" extends="struts-default"> >> > <action name="testDate" class="testDate"> >> > <result name="success">index.jsp</result> >> > </action> >> > </package> >> > >> > I input nothing in all three textfield then >> submit. >> > In TestDateAction three parameters are all null in >> valuestack. >> > But after come back to index.jsp, mapDate['today'] >> 's value become today. >> > so magic. >> > The Null date value become today in Textfield tag. >> Perhaps this is a bug >> > of ognl when use textfield. >> > >> > >> > >> > >> > >> >--------------------------------------------------------------------- >> > To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> > For additional commands, e-mail: >> [EMAIL PROTECTED] >> > >> > >> >> >> >--------------------------------------------------------------------- >> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> > > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > = = = = = = = = = = = = = = = = = = = = longhao [EMAIL PROTECTED] 2007-04-25 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]