读书人

ADF 进度条的运用

发布时间: 2012-08-03 00:12:14 作者: rapoo

ADF 进度条的使用

This post will teach you how to configure the ADF Progress Indicator component within a .jspx web page of your OFM 11g application.

Implementation

Step 1

Add the following code to your?web.xml file:

In order to stop the poll, once the upload is done, we use the following?method:

Step 3

In order to start the poll we shall use JavaScrip. The?handlePoll?function is listed below:

2.?Enable?upload on the page:

3.?Use?af:inputFile?to?upload the file:

4.?Use?af:progressIndicator?in order to display the current status of the uploading process:

6. af:commandButton?is used to invoke the?doUpload()?method and start the upload process:

The?af:clientListener?is used to call the JavaScript method that will start the poll once the upload starts.

The look of the progress indicator component can be changed by changing the?skin-family?within thetrinidad-config.xml?file or by implementing your custom component and use css to integrate it with the OFM application. ?ADFProgressIndicator?sample?application uses?fusion?skin-family.

?

?

?

Running the application

Open?ADFProgressIndicator?OFM application in your JDevelopper IDE, navigate to?Main.jspx?page and run it use Mozilla Firefox or Internet Explorer browsers; Google Chrome browser ?represents a special case which will be discussed later in this post.

Hint:?In order to set JDevelopper IDE default browser follow the steps below:

Open?JDevelopper IDE?->?Tools?->?Preferences…?->?Web Browser and Proxy?(bottom part of the left facet) ->?Browser Command Line:

After the application is successfully deployed you should see the following page:

ADF 进度条的运用

Choose a file and press Run. A new panel box will be displayed, containing the progress indicator:

ADF 进度条的运用

After the upload is done the progress indicator is hidden and the following info message is displayed:

ADF 进度条的运用

Notice:?In order for?ADFProgressIndicator?OFM application to run when using Google Chrome browser the following are required:

1. Create a new jspx page containing the?af:progressIndicator?and?af:poll?conponents.

2. Integrate the newly constructed page within the current page by using the iframe component:

?

<iframe src="NewlyConstructedPage.jspx"/>

?

?

1 楼 genius 2011-11-16 我运行了你的例子,进度条不会自动更新啊

读书人网 >开源软件

热点推荐