cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt on DateNavigator

Former Member
0 Kudos

Hi SDns,

My doubt is i have used a date navigator in my UI elemnys.

My Requirement is i have to gate date and month from the date navigator.

For that i know we have action methods for this both

i.e.,onDaySelect.

onMonthselect.

Please tell me the code to write in this actions.

To retrieve the date and insert it in the database,

Thanks & Rgards,

Ratna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Here is what exactly you can do to solve the problem.

When you define an action for onDaySelect() for DateNavigator, include a parameter

say "day" of type java.sql.Date and the following line of code to this action method.

wdComponentAPI.getMessageManager().reportSuccess("DATE: "+day);

// Just to print the date, you can add any of your code

In wdModifyView(), add the following:

if(firstTime){

IWDDateNavigator dn = (IWDDateNavigator) viewObj.getElement("DateNavigator");

dn.mappingOfOnDaySelect().addSourceMapping(IWDDateNavigator.IWDOnDaySelect.DAY,"day");

}

// Here "day" is the same parameter that is added to the action as well.

Hope this will solve your problem.

thanks & regards,

Manoj

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please refer the following link:

http://help.sap.com/saphelp_nw70/helpdata/en/fb/e56e42802e9c60e10000000a1550b0/frameset.htm

Both the methods takes parameter through which you can do your required operation.

thanks & regards,

Manoj