on 03-11-2008 12:11 PM
Hi,
I want to capture the date selected by user from date navigator and set it to a variable of type date. Can anybody suggest me doing that.
Regards,
Prasanthi O.
hi first create a context value,set the property of that context value as date.And create a inputfiels and select this context for the value property of that inputfield.
To set this value to a Date variable use the following java code
Date d=wdcontext.currentContextElement().get<the contextname>();
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");//this is to format the datetype as u want
FormattedDate=sdf.format(d);
if u face any pble while trying this code let me know
Warm Regards
Shanto Aloor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer
http://help.sap.com/saphelp_nw04s/helpdata/en/81/ab884118aa1709e10000000a155106/content.htm
Regards,
P.Manivannan
Hi Prasanthi,
you can capture the date using the following code
wdContext.currentContextElement().get<your attribute name>;
Regards,
P.Manivannan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Use this Code
Date setDate = new Date(System.currentTimeMillis());
setDate = wdContext.currentVnDateElement().getVauserDate();
wdComponentAPI.getMessageManager().reportSuccess(""+setDate);
Regards
Chandran S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use the following method getLastSelectedDate()
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a context attribute myDate of type Date.Bind it to a UI Element of type Inputfield.
Now you can get the selected date by
wdContext.currentContextElement().getMyDate();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai prashanthi,
just place a inputfield in view.bind this input field to a context attribute of type date.
after user selects the value in on enter or in wdmodify you try printing the context attribute.
Any issues let me know
Thanks n Regards
Sharanya.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.