0

forEach on Hashmap not working for menuitem

asked 2009-05-29 00:26:14 +0800

abrar gravatar image abrar
27

I have following code in my zul page
<menupopup id="contextMenu">
<menuitem forEach="${customMenu}" label="${each.key}" forward="${each.value}"/>
<!--
<menuitem label="Delete" forward="onDeleteMenuItemClick"/>
-->
</menupopup>

and my custom menu is defined as a property in the spring bean def
...
<property name="customMenu">
<map>
<entry>
<key><value>Delete</value></key>
<value>onDeleteMenuItemClick</value>
</entry>
</map>
</property>
...
I get an Xel exception: Encountered EOF when it was expecting other character(s). Am I doing something wrong?
I have verified that the map entry is coming in correctly.
When I hard code it, as in the commented line above it works perfectly

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-06-02 04:49:33 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

looks like forward directive doesn't support full el-expression, i've posted it to feature-request. please follow this tracker.

/robbie

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

RSS

Stats

Asked: 2009-05-29 00:26:14 +0800

Seen: 253 times

Last updated: Jun 02 '09

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