2

I have a Primefaces-based application, in which there are some lengthy operations.

When such operation is being executed, I want to indicate this somehow (like displaying an hourglass or a message, which appears at the center of the screen).

What is the easiest way to do this in Primefaces/JSF?

4

1 に答える 1

11

で行うことをお勧めし<p:blockUI>ます。次に例を示します。

<h:form>
    <p:panel id="content" >
        ...
        <p:commandButton id="longOperation" value="Process" />
    </p:panel>
    <p:blockUI block="content" trigger="longOperation">  
        <p>Here you can customize what appears as the overlay over the blocked content.</p>
        <p:graphicImage value="/images/ajax-loader.gif"/>  
    </p:blockUI>
</h:form>

詳細については、http://www.primefaces.org/showcase/ui/blockUI.jsfをご覧ください。

于 2012-10-31T21:43:29.667 に答える