Custom parameter to menupopup

asked 2021-02-25 00:55:29 +0800

aUser gravatar image aUser
121 4


is there a way to pass a custom attribute to a menupopup item?

From this question i could get the reference of the object that fired the open Event but i'd like to pass to the menupopup an index.. Suppose i have this case:

<div children="@load(vm.images) @template('model')">
    <template name="model">
        <image content="@load(each.content)" context="editPopup"></image>

<menupopup id="editPopup" onOpen="@command('openPopup', comp=event.reference)">
    <menuitem iconSclass="z-icon-commenting-o" label="a" onClick="@command('a', index=i)"/>
    <menuitem iconSclass="z-icon-commenting-o" label="b" onClick="@command('b', index=i)"/>

Along with the image inside the div element i would like to pass the forEachStatus.index to use it for the comands a and b. I want to do the work only from those two buttons, not when the mennupopup is opened. Is it possible?

Thank you

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2021-02-25 00:55:29 +0800

Seen: 2 times

Last updated: Feb 25

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More