cancel
Showing results for 
Search instead for 
Did you mean: 

Clock in webdynpro java

Former Member
0 Kudos

I need to embed clock using webdynpro java. I am using SAP Netweaver Composite Environment EHP1 7.1 version. As of this version IFrame is deprecated. So, I cannot use javascript and embed in IFrame. TimedTrigger is not a choice as it makes server trip which causes flicker. Is there any other way

to achieve this in SAP NW CE ehp1 7.1?

Any help?

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Anu,

You can create a clock using the Dynamic UI creation procedure. Proceeed as follows,

Add the following code in the wdModifyView(),


IWDClock analogClock = (IWDClock) view.createElement(IWDClock.class, null);
analogClock.bindClockTime(<yourContextAttributeOfTypeDate>);
IWDUIElementContainer root = (IWDUIElementContainer) view.getRootElement();
root.addChild(analogClock);

Hope this helps!

Regards

Kishan

Former Member
0 Kudos
Former Member
0 Kudos

Hi Anu,

As you said your problem gets solved if u use IFrame then why don't you use it ,i.e., create a JSP page and then using IFrame insert it into the application.

May be IFrame is deprecated but it still works the only thing is that there won't be any further support for that class. So use it if requirement is not that specific that you can not use a deprecated class.

Regards.

Rajat

Former Member
0 Kudos

Hi,

One workaround can be you set an attribute to the current system time and then start your own timer giving your logic for the clock. It may work.

For setting the current time you can have a look at the following thread:

which says:

wdContext.currentContextElement().setmydate(new Date (System.currentTimeMillis())); //--This will give you current date.

Calendar cal = Calendar.getInstance();

cal.getTime() ; //---- This will give you time.

Regards.

Rajat