Skip to Content
author's profile photo Former Member
Former Member

IWDDateNavigator: event onDaySelect

Hi,

at the moment I'm using developer studio SP4 with WAS 6.40 sneak preview.

I have implemented the UI element IWDDateNavigator. Of course, if user selects a day in the DateNavigator, I want to handle this event. So, I need to get the selected day. The event onDaySelect should be the right choice. The method I define should have a parameter day of type java.sql.Date (parameter mapping is considered). But if I implement it like this I got an error during execution because of wrong data type. It only works if I define the parameter day of type String. Then I get the date as String: "16.11.2004".

Is this an error of SP4? Or is it my error?

regards

Frank

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2004 at 01:36 PM

    Hi Frank,

    Probably this is error of <b>SP4</b>.

    I performed the following steps on <b>SP9</b> and everything works fine:

    1. Add IWDDateNavigator to view

    2. Create Action handler with parameter "day" of type java.sql.Date (actually, I've selected DDIC type rather then Java type)

    3. Assing onDaySelect event to forementioned action

    4. In wdDoModifyView I place the following code:

    if (firstTime)
    {
      final IWDDateNavigator dn = (IWDDateNavigator)view.getElement("MyDateNavigator");
      dn.mappingOfOnDaySelect().addSourceMapping("day", "day");
    }

    5. In action handler enter primitive code to debug value selected:

    wdComponentAPI.getMessageManager().reportSuccess
    (
      "Date: " + day
    );
    

    Everything works as expected.

    Regards,

    VS

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Addition to Valery's correct answer:

      You can find the names and types of event parameters for UI elements in the Javadoc of method "mappingOf<Event>" and in the KW doc.

      You can reach the KW doc from the NetWeaver developer studio by right clicking a UI element in the palette of the view designer. Or: If the element is already in the UI tree, right-click on the node in the outline view and select "Show Help".

      The name of the event parameter is used as the first argument of method mappingOf..., the second parameter is the name of the corresponding action event handler parameter.

      Armin

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2004 at 07:16 AM

    Yes, it is a bug in Developer Studio SP4. When I deploy to WAS 6.40 SP6 it works with day of type java.sql.Date.

    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.