1

Does anyone know if there is an equivalent of richfaces rich:clientId in primefaces?

Example, if I want to get the full client id of my field: username.

'#{rich:clientId('username'), how can I do this in primefaces? This is because I want to get the value of that field dynamically.

czetsuya
  • 4,773
  • 13
  • 53
  • 99
  • you can use a generic JSF way: like this : http://stackoverflow.com/a/12127017/617373 – Daniel Apr 18 '13 at 06:26
  • yes, but I want more generic approach because I need to pass the id and get the component. so I really need something like rich:clientId(). – czetsuya Apr 18 '13 at 15:08

1 Answers1

2

You can try:

<h:form id="fm">
        <p:panel id="zzz">
            <p:outputPanel id="opa"/>
        </p:panel>
        #{p:component('zzz')}
        #{p:component('opa')}
    </h:form>

And i get output:

    fm:zzz 
    fm:opa
Rong Nguyen
  • 4,143
  • 5
  • 27
  • 53