Skip to Content
avatar image
Former Member

wdDoModifyView

Hi,

I have 4 buttons on my view, and am trying to get the id of the button clicked in the wdDoModifyView(). Based on the click I intend to change values.

Is this possible.

NAC

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 23, 2005 at 06:32 AM

    Hello SAP Partner,

    [skipped]

    ...

    [/skipped]

    Best regards, Maksim Rashchynski.

    Use approach mentioned be Armin and Santhosh.

    Message was edited by: Maksim Rashchynski

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Maksim Rashchynski

      OK, then the answer is: transfer the ID into the action handler using event parameter mapping, store it in a view context attribute and get it from this attribute in wdDoModifyView().

      But I doubt that the original poster really wants to do these changes in wdDoModifyView().

      We should not propagate using non-API methods in this forum.

      Armin

  • avatar image
    Former Member
    Sep 23, 2005 at 01:00 AM

    Any thoughts on this.

    ~NAC

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 23, 2005 at 01:27 AM

    Hi,

    1. create an action with string (id of the button) as argument.

    2. In the action handler, based on id of the button you can change the values you want to change.

    3. In the "wdDoInit()", write the following code

    if(firsttime){
       IWDButton button1 = (IWDButton)view.getElement("<<Button id1>>");
       button1.mappingOfAction().addParameter("id",button1.getID());
       IWDButton button2 = (IWDButton)view.getElement("<<Button id2>>");
       button2.mappingOfAction().addParameter("id",button2.getID());
    }

    4. When the button is clicked, you will be able to get the "id" of the button in the action handler. Based on the id change the value. (The values you want to change modify it thr context attributes).

    Regards,

    Santhosh.C

    Add comment
    10|10000 characters needed characters exceeded