1
votes

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.

1
you can use a generic JSF way: like this : stackoverflow.com/a/12127017/617373 - Daniel
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

1 Answers

2
votes

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