Я использую Primefaces 3.0.1 и создаю строку меню с программно заполненной моделью. Мне нужны некоторые ссылки, такие как depotDetails.xhtml? id = 1 Но если я использую эти URL для моего меню
item.setUrl("depotDetail.xhtml?id=1"); // that dont work
, поэтому я попытался добавить ActionListener:
FacesContext facesContext = FacesContext.getCurrentInstance();
ValueExpression target = facesContext.getApplication().getExpressionFactory().createValueExpression(FacesContext.getCurrentInstance().getELContext(), "#{DepotBean.currentDepot}",String.class);
ValueExpression value = facesContext.getApplication().getExpressionFactory().createValueExpression(FacesContext.getCurrentInstance().getELContext(), "ehnemeneee",String.class);
ActionListener handler = new SetPropertyActionListenerImpl(target, value);
item.addActionListener(handler);
но это также не работает. Кто-нибудь может помочь?
Привет, Томас