Hi Group,


I have a below issue with Data Binding. Consider we have below code



//Model Class

Public Class User {

                Private *Date* dateOfBirth;

// Setter and Getter

}



// Action Class

Public Class MyActionClass{

Private *User* user ;

// Setter and Getter

}



In My HTML I use a Date Picker component as  below ….



[...@sj.datepicker name="*user. dateOfBirth* " label="Date Of Birth" /]



Everything works fine !!!  and I see *dateOfBirth populated with
java.util.Date*



But …. In some cases , My Action Class is  generic .. so I have to use a
HashMap to store the values ..



// Action Class

Public Class MyProblematicActionClass{

Private *HashMap<String,Object>* userAsMap ;

// Setter and Getter

}



And HTML as,



[...@sj.datepicker name=" *userAsMap. dateOfBirth* " label="Date Of Birth" /]



But this time, userAsMap. *dateOfBirth is populated as String value rather
than Date* value …..



Is this problem solvable ? if yes, how do we do that ?



Any help here will be  great …..



Thanks & Regards,

Sathish Kumar T

Reply via email to