jsf - How to get id of current component in EL -
i'm working jsf , primefaces, need value of id of component. because i'm building dinamycally panels diferent id, show panel need compare if current panel, show it.
for example if i've next panel
<p:outputpanel id="#{bean.getid}" autoupdate="true" renderer=#{@this.id == bean.currentpanel} > </p:outputpanel>
and bean
public class bean(){ private int numberpanels =0; private int currentpanel = 0; public int getid(){ //...a process return different id } // getter's , setters
}
obviously, @this.id
doesn't work. so, how value of id of componente ne jsf primefaces?
there implicit #{component}
object in el scope evaluates current ui component. given information, you'll following attribute:
rendered="#{component.id eq bean.currentpanel}"
Comments
Post a Comment