Hi,
at the moment I'm using developer studio SP4 with WAS 6.40 sneak preview.
I have implemented the UI element IWDDateNavigator. Of course, if user selects a day in the DateNavigator, I want to handle this event. So, I need to get the selected day. The event onDaySelect should be the right choice. The method I define should have a parameter day of type java.sql.Date (parameter mapping is considered). But if I implement it like this I got an error during execution because of wrong data type. It only works if I define the parameter day of type String. Then I get the date as String: "16.11.2004".
Is this an error of SP4? Or is it my error?
regards
Frank
Hi Frank,
Probably this is error of <b>SP4</b>.
I performed the following steps on <b>SP9</b> and everything works fine:
1. Add IWDDateNavigator to view
2. Create Action handler with parameter "day" of type java.sql.Date (actually, I've selected DDIC type rather then Java type)
3. Assing onDaySelect event to forementioned action
4. In wdDoModifyView I place the following code:
if (firstTime) { final IWDDateNavigator dn = (IWDDateNavigator)view.getElement("MyDateNavigator"); dn.mappingOfOnDaySelect().addSourceMapping("day", "day"); }
5. In action handler enter primitive code to debug value selected:
wdComponentAPI.getMessageManager().reportSuccess ( "Date: " + day );
Everything works as expected.
Regards,
VS
Add a comment