cancel
Showing results for 
Search instead for 
Did you mean: 

how to get contant current value from running timer in webdynpro

Former Member
0 Kudos

i got running timer in hh:mm:ss format

i want to extract value at particular instant

i.e current time from timer

if i extact that context var it will be running timer

how to achieve that

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vani,

Create one attributes named time and mapping from component controller to view and write the following code in the init method..

SimpleDateFormat fSDateFormat = null;

fSDateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");

Date now = new Date();

String date_out = fSDateFormat.format(now);

IPrivateCreditExposureView.IContextElement date_obj =

wdContext.createContextElement();

date_obj.setTime(date_out);

if u satisfied this reward points.....

Thanks,

P.Manivannan.

Former Member
0 Kudos

Hai ,

Can you explain your question clearly,

If you want to get the current time from a context value,

create a Context attribute of type string, make calculated is true, it will create getter and setter methods for attribute,

in getter method simply write this code

{

SimpleDateFormat fmtIn = new SimpleDateFormat("hh:mm:ss");

return fmtOut.format(new Date());

}

Regards,

Naga