Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

p:commandLink doesn't trigger p:blockUI

I am using PrimeFaces. Here is the code:

<h:form>    
    <p:dataTable...>
        <p:column...>
            <p:commandLink id="featuresLinkId"...>
        </p:column>
    </p:dataTable>
</h:form>

<p:blockUI block=":smForm" trigger="featuresLinkId">
    <p:graphicImage alt="loader image" value="/images/loader.gif"/> 
</p:blockUI>

When the page is being loaded, I see the following error:

javax.servlet.ServletException: 
Cannot find component with identifier "featuresLinkId" in view.

Seems like commandLink can't be used to trigger blockUI in such a scenario. What could the problem be?

like image 977
Danijel Avatar asked Jul 13 '26 10:07

Danijel


1 Answers

Because it won't find that compnent because its inside the form/datatable.

Make changes as

1-

<h:form id="formId">

2-

<p:dataTable id="tbl">

3-

<p:blockUI block=":smForm" trigger=":formId:tbl:featuresLinkId">

Try above .

like image 108
Makky Avatar answered Jul 15 '26 13:07

Makky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!