Skip to Content

Dynamic Button text from MultiPane

Here is the situation: I created a MultiPane with the items from a context node and for the MultiPane content I have a button with an unique name(attribute from node binded to its text) and they all have the same action assigned to them. I only managed to retrieve the action name through wd_event but not the button name in which the user presses on...Can anyone help me on this? Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jun 12, 2018 at 09:06 AM

    Good idea to post this as a separate question, so suggest accepting/closing the other one if it is resolved.

    As I suggested there, it should behave as any table-type UI Element and thus automatically retrieve the selected context element via the lead selection, so all you need to do is query the button text's attribute from your node.

    Add comment
    10|10000 characters needed characters exceeded

    • I tried reads the first element on both get_lead_selection and get_element. My MultiPane has this structure: Panel(MultiPane)->Items[Content](TransparentContainer)->BTN_ALL(Button).

  • Jun 13, 2018 at 12:00 AM

    Hmm, I thought MultiPane would fall into the table-type element category but I guess not if Lead Selection doesn't work.

    But the element is passed in to any action method so you should have an ID and Context Element importing parameter in your onAction button action method. I don't have a system in front of me, but you should be able to use these to either retrieve the values you need directly using context_element->get_attribute, or use the button ID provided in the importing parameter. Or else there's a GET_INDEX method which should provide the element index, similar to what I thought the lead selection would do.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 13, 2018 at 11:36 AM


    Include in the button's action handler method the standard parameter...


    Then you'll get the element which triggered the action and can read its button text attribute.


    Add comment
    10|10000 characters needed characters exceeded