refresh a rich:menuGroup
alvarot Dec 3, 2008 9:45 AMhello i hace a rich:menuGroup that run ok, but some action delete elemnts of this, i call a method to recalculate the rich:menuGroup but the getMethod for the binding of the rich:menuGroup is not called, only the first time is called. i try with scope of bean request and session and not,
i am using
3.2.1.GA
<rich:dropDownMenu value="Mis criterios de búsqueda" direction="bottom-right" jointPoint="bl" styleClass="notaBoton">
<rich:menuItem value="Nuevo" action="#{reoffermanager.newFilter}"/>
<rich:menuItem value="Guardar actual" onselect="TrPanelPopup.showPopup('form_panelPopupSave_popupContainer', 'form_panelPopupSave', event, 'click','centered',true,0,0,0,0); return false;">
<f:facet name="icon">
<h:graphicImage value="/icons/disk.png" />
</f:facet>
</rich:menuItem>
<rich:menuItem value="Eliminar actual" action="#{reoffermanager.deleteFilter}"/>
<rich:menuGroup binding="#{menuBean.listFilterMap}" value="Mis "
styleClass="notaBoton" id="selectFilter" />
</rich:dropDownMenu>
mybean
HtmlMenuGroup item1 = (HtmlMenuGroup) app.createComponent(HtmlMenuGroup.COMPONENT_TYPE);
item1.setValue("Mis Criterios");
item1.setId("idMenu");
log.info("se esta creando la lista de menu con tamaño "+neededBean.getListFilter2().size());
for (int i=0;i<neededBean.getListFilter2().size();i++) {
HtmlMenuItem item = (HtmlMenuItem) app.createComponent(HtmlMenuItem.COMPONENT_TYPE);
Interest si=(Interest) neededBean.getListFilter2().get(i);
Integer id=si.getInterestedId();
item.setValue(si.getInterestName());
item.setId("id"+si.getInterestedId().toString());
Class[] params = {};
MethodExpression actionExpression = app.getExpressionFactory().createMethodExpression(ctx.getELContext(),
"#{reoffermanager.changeFilter}",
String.class, params);
String onSelect = "aler(this,"+id+");";
item.setOnselect(onSelect);
item.setActionExpression(actionExpression);
// String onSelect = "open(this,'" + map.get(key).toString() + "')";
// item.setOnselect(onSelect);
item1.getChildren().add(item);
}
return item1;
i just verify that the new menugroup is create when is called a delete method but the getlistFilterMap is not called.
i look this
https://jira.jboss.org/jira/browse/RF-2918
but is fixed in 3.2.1
i don't know what happend, if some can helpme, will be great