Question

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?

Was it helpful?

Solution

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 .

OTHER TIPS

There's a bug in Primefaces 3.5 I think see: How to reference p:commandLink in p:dataTable from p:blockUI trigger?

You could try using JQuery BlockUI http://www.malsup.com/jquery/block/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top