Skip to Content
avatar image
Former Member

[onAction] Retrieve the attribute value from ID

Hi,

I have many input field for dates in my view.

I would like to have only 1 onEnter event handler.

For this, I pass the ID of the UI element and I would like to retrieve the actual bound attribute from the context.

Could you please tell me how to go all the way from the ID to the bound attribute ?

Thanks in advance.

Best regards,

Guillaume

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 09, 2008 at 05:23 PM

    The onEnter event has two parameters that can be exposed (just hit the Parameters for UI action button inside the method editor). They are CONTEXT_ELEMENT and ID. The context element will give you the exact source element. You need only to call the GET_ATTRIBUTE method and pass in the ID to the name parameter.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Alejandro Bindi

      Hi,

      Waouh... what a detailed answer guys!

      Thanks a LOT for this !! 😊

      Now, I have many options to sort this out.

      Just one thought from a WDA beginner, what about naming the UI element with the exact same name as the context attribute... this way, we would be able to use the ID from the UI element to get the corresponding attribute.

      -> this is prone to errors but a cheap solution nonetheless

      Thank again for your time.

      Best regards,

      Guillaume

  • avatar image
    Former Member
    Feb 02, 2010 at 02:59 PM

    Thomas,

    I see this posting was over a year old. I search the support portal for a correction to this problem, but was unable to find a solution. Could you shed some light on the situation?

    Best Regards,

    Greg Bush

    Add comment
    10|10000 characters needed characters exceeded