on 04-05-2006 10:45 AM
Hi, i have a problem with dateNavigator, i need to get the date selected when clicked in a day in the control.
in the properties of the control i bind the onDaySelect to a function, when i clicked in a day in the control, the function execute it, but i don't know how can i get the date selected, the function i create is this:
public void onActiononDaySelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.sql.Date Day )
{
//@@begin onActiononDaySelect(ServerEvent)
wdThis.wdGetExc_NavigationController().wdGetContext().currentContextElement().setTextoCabecera("Actualidad " + Day.toString());
//@@end
}
but the date is passed is null, so something is wrong, can you tell me how to get the date selected.
thanks a lot
Jose,
Why not just bind firstSelectedDate / lastSelectedDate to context attributes and then use them in action handler?
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for the help, i solved the problem binding atribute context to a lastSelectedDate.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jose,
You can use this code in wdDoModifyView.Here DateNavigator1 is the id of DateNavigator UI element.
if(!firstTime)
{
IWDDateNavigator date = (IWDDateNavigator)view.getElement("DateNavigator1");
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Date Selected" + date.getFirstSelectedDate());
}
date.getFirstSelectedDate() will get you the selected date.
Regards,
Rajeev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To pass the event parameter value to the action handler parameter, you have to define a parameter mapping.
IWDDateNavigator dn = (IWDDateNavigator) view.getElement("ID-of-DateNavigator");
dn.mappingOfOnDaySelect().addSourceMapping
(
"day", /* name of event parameter */
"Day", /* name of action parameter */
);
Armin
P.S: Valery's proposal is probably better
Message was edited by: Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.