Skip to Content

Clock in webdynpro java

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 07:20 AM

    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:

    How to set Current Time

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 07:32 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2009 at 08:33 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2009 at 09:02 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.