I'm using p:steps
as a workflow, it works well except active index doesn't have an URL attach
xhtml:
<p:fieldset legend="Etape" toggleable="true" toggleSpeed="500" style="height:110px;">
<p:steps model="#{etapeModel.model}" activeIndex="#{besoin.etape.code}"
styleClass="custom" readonly="false" />
</p:fieldset>
java code:
public EtapeModel(){
model = new DefaultMenuModel();
Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
selected = BesoinService.get(Integer.parseInt(params.get("id")));
for(Etape e : Etape.values()){
DefaultMenuItem item = new DefaultMenuItem(e.getLibelle());
item.setUrl("besoinForm.xhtml?faces-redirect=true&i=1&id="+selected.getId()+"&etape="+e.getCode());
item.setId("etape"+e.getCode());
model.addElement(item);
}
}
I understand this behaviour, but what possibilities I have to attach an url on active index ?
Mojarra 2.2.0 and Primefaces 5.3