0

Pass parameter to contex menu

asked 2013-11-26 17:12:18 +0800

hf gravatar image hf
0

updated 2013-11-27 00:52:41 +0800

cor3000 gravatar image cor3000
4406 2 7
ZK Team

Hi,

I need to pass parameters to context menu. This is my code:

<label forEach="${stamp.stamps}" width="55px" 
   value="${stamp.stamps[forEachStatus.index]}" 
   tooltiptext="Ore: ${stamp.stamps[forEachStatus.index]} Anomaly: ${stamp.stamps[forEachStatus.index].anomaly}" 
   style="${stamp.stamps[forEachStatus.index].anomaly eq 'true' ? 'color:red;text-align:right' : 'color:#373842;text-align:right' }"
   context="contextMenu" />

and this is my contextMenu:

<menupopup id="contextMenu">
    <menuitem label="Dettagli giornata" />
    <menuitem label="Inserisci giustificativo" />
</menupopup>

Thanks.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-27 02:42:37 +0800

cor3000 gravatar image cor3000
4406 2 7
ZK Team

updated 2013-11-27 02:44:26 +0800

Hi,

you cannot pass parameters to the context menu directly. The context menu will receive an OpenEvent containing the a reference to the opening component.

Check out this example on zkfiddle which shows a simple usecase of a dynamic context menu reacting on its referencing component.

Robert

link publish delete flag offensive edit
Your answer
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

Follow
1 follower

RSS

Stats

Asked: 2013-11-26 17:12:18 +0800

Seen: 17 times

Last updated: Nov 27 '13

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