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]

Reply via email to