3

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?

skuntsel
  • 11,624
  • 11
  • 44
  • 67
Danijel
  • 8,198
  • 18
  • 69
  • 133

2 Answers2

4

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 .

Makky
  • 17,117
  • 17
  • 63
  • 86
3

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/

Community
  • 1
  • 1
zargarf
  • 633
  • 6
  • 18