-
1. Re: rich:contextMenu doesn't work when binding attribute is used
mcmurdosound Mar 16, 2012 2:09 PM (in response to devinderpal)Which version do you use? RF 3.3.3 or 4.x?
UIContextMenu contextMenu = new UIContextMenu();
UIMenuItem menuItem = new UIMenuItem();
menuItem.setValue("Test 1");
UIMenuItem menuItem2 = new UIMenuItem();
menuItem2.setValue("Test 2");
this work for RF 3.3.3. You'll have to use Application.createComponent(UIContextMenu.COMPONENT_TYPE) etc. to create valid components. Componentbinding is at least tricky: you'll have to keep the scope of your bean in mind. RequestScope!
There is also an alternative: use some iterator in your facelet to create multiple ContextMenu entries ondemand.
<a4j:repeat value="#{bean.contextMenuDTO}" var="item">
<rich:menuItem ..../>
</a4j:repeat>
If this doesn't work. try <c:forEach>
-
2. Re: rich:contextMenu doesn't work when binding attribute is used
devinderpal Mar 20, 2012 3:03 PM (in response to mcmurdosound)I have tried by using Application.createComponent but that also doesn't work. I'm using RF4.2.0
Have already tried using iterators - both a4j:repeat and c:forEach but none works. Please let me know if you have some other ideas.