ADF Code Corder 42: by using a <; af:poll >; with an Application Module
Hi all
With the help of JDev 11.1.2.3.0.
I worked to solve this puzzle for a while. I'm trying to implement a simplified version of the ADF Code corner #42 (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/42-progressbarcolor-169184.pdf)
The thing is that my 'business ' service is running in my module of the application. In short, I take 10,000 rows to view object and run through a few different algorithms. It would be nice to give a report during this operation. However, as soon as I start my method of request module, my component < af:poll > end, refusing to update the current page.
I watched a lot of sites tutorials to try to solve this problem. I try to stay within the limits of the ADF Essentials which means no ADVERTISING, only of the poll. Here are some of the best references:
GEBS | Oracle Fusion Middleware 11g ADF progress indicator
Refresh the page periodically by using survey components |
Their service 'business' in the managed bean and the other simply re - runs a page runs a view object. I can't find a site that will their own business service and surveys it. Here's what I have:
Application module
private long uploadStatus; public void doUpload() { long max = this.getMaximum(); for(this.uploadStatus = 0; this.uploadStatus <= max ; this.uploadStatus += 500){ System.out.println("@ " + this.uploadStatus); try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { e.printStackTrace(); } } System.out.println("Upload Complete"); } public long getStatus(){ return this.uploadStatus; } public long getMaximum(){ return 10000; }
Backing Bean
public class ProgressBarModel extends BoundedRangeModel { private long max; private long status; Thread newProgress = null; public ProgressBarModel() { this.getMaximum(); this.getValue(); } @Override public long getMaximum() { // Not best practice. Should get through page def method operation AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModule("AppModuleDataControl"); this.max = am.getMaximum(); return this.max; } @Override public long getValue() { System.out.println("polling ..."); AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModule("AppModuleDataControl"); this.status = am.getStatus(); return this.status; } public void doUpload(ActionEvent actionEvent) { if (newProgress != null) { newProgress.interrupt(); } ProgressUpdater progressSimulator = new ProgressUpdater(); newProgress = new Thread(progressSimulator); newProgress.run(); } public void stopUpload() { newProgress.interrupt(); newProgress = null; } class ProgressUpdater implements Runnable { public void run() { AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModule("AppModuleDataControl"); am.doUpload(); } } public long getPercentageUploaded() { long state = this.status * 10 / 10000; if(state >= 100){ this.stopUpload(); } return this.status * 100 / 10000; } }
JSPX
<af:panelFormLayout id="pfl1"> <af:poll id="pollid" interval="1000"/> <af:outputFormatted value="#{MyProgressRangeModel.percentageUploaded}% completed" id="of1" partialTriggers="pollid"/> <af:commandToolbarButton actionListener="#{MyProgressRangeModel.doUpload}" text="Run" id="ctb1"/> </af:panelFormLayout>
Give me the result
polling ... polling ... polling ... @ 0 @ 500 @ 1000 @ 1500 @ 2000 @ 2500 @ 3000 .... // up to 10000 Upload Complete polling ... polling ...
How can I get the survey allows you to control when the method of the module of an application is running? Use more than one module app, for inclusion in the database and the other for monitoring?
Thank you
Will be
I went with that instead
How I finally reached updates to asynchronous UI with WebSockets and JMS
Tags: Java
Similar Questions
-
Edit the HTML code of a page of catalyst for business with the Toolbox modules
Here's the HMTL for my page: its for my website simcoeoptical.com
Code can be found here - http://jsfiddle.net/9tpxboao/
I want to add a module to display a specific catalog have been would insert it? whenever I place it in a place I think it will never work doneHello.
(I edited your post, you don't need html code, a link would have been better, but I put it in a violin store downtown for you).You just need to sink the documentation, choose what you need, access its features or layouts according to your needs.
-
What shortcut to use to appear popup with recent applications or running?
What shortcut can make up a small window with recent applications or running (4-6 App icons)? a small popup showing the email browser etc...
Please tell me in win 7 and 8 to win?
There are running XP or vista?
Keep now Alt while you press tab to select the item in the context menu:
-
How to use the "Toshiba controls" with other players?
Heey
I have a Satellite with Toshiba controls. How can I change so I can use the buttons for other media players and not only Windows Media Player?
A dude sorry for the bad news, but I fear that it is not possible to use the Toshiba controls with another application as with WMP (CD) and WinDVD (DVD)
I think that the utility was already programmed and designed to use only these two applications. -
Is the power cord USB/lightning the same cord that I use to recharge my iPhone 5?
I don't know that I got a charging cord relief with my Magic trackpad 2. Is this the same as the cord that I use to charge my iPhone 5?
Yes. It of a good thing, records remember another piece if kit to carry around.
Come to think of it, mine was hidden in a cardboard slip in the box. In case you missed it, look carefully.
-
A Mac mini, purchased in the UNITED Arab Emirates can be used in the USA with only change the power cord?
Yes.
http://www.Apple.com/Mac-mini/specs/
the voltage may vary from 100-240 V AC.
-
I get this message on my iPhone 6. To continue using Icloud on this iPhone, do agree with your other devices using iCloud or either your iCloud security code. I don't know my security code. I have my book of power with me how check my iPhone 6.
Mike.
Hello
For checking your apple iphone should send you a massage to your other device
With a code.
See you soon
Brian
-
code low-level format using debug or any assmbler... can someone help me? I need to go to my subjects... T_T
MicroControl
My only suggestion is to try to do a search for 3 third party sites that offer this type of support.
-
Original title:
Windows code
I have 2 questions... 1 is - anyone know of any legit windows code, find online programs for windows on a computer code. My wifes sister and she want to fix his computer by putting in a new hard drive and installing windows, but I wanted to see if I could legitimate his computer code and the sticker is missing, damaged already.
2. is possible to get the code for the window using the id and product received in a store you microsoft some how I have two computer, I bought my children 3 years ago and to replace hard drives with larger ones, and one of them still has readable sticker. Thanks again
As I said, reported for an installation by the manufacturer OEM of Windows key code reflects the image of their system and not the license key on the sticker that is what is needed for a re-installation of consumer, is not surprising that the Samsung 2 is the same. The key to the thumbnail is not stored anywhere other than on the tile.
If you cannot or do not want to clone the disks, you can buy a recovery media set at the manufacturer or new media of Windows 7 (becomes very expensive and problematic for the commercial version that MS no longer sells it).
-
Redemption code has already been used
I am a student and received my code redemption for Adobe Creative Cloud. However, when I try to use the code after signing in, it indicates that the redemption code has already been used. I was in contact with technical support Adobe several times where they have installed and uninstalled CC and still without a bit of luck. Someone at - it other suggestions to redeem the code or if I install the application update the redemption code later.
Any help would be much appreciated.
Casey
Redemption codes used only once. The redemption code no longer has any purpose after he used only once. After using it once you have the subscription assigned to your account and should be able to sign to the creative cloud using your Adobe account information.
Contact support - for the link below, click on the still need help? option in the blue box below and choose the option to chat or by phone...
Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache. If it fails to connect, try to use another browser.
Creative cloud support (all creative cloud customer service problems)
http://helpx.Adobe.com/x-productkb/global/service-CCM.html ( http://adobe.ly/19llvMN )
-
Hello! I am a fashion design student and my school offer us a wide range of Adobe programs. I asked the Redemption Code and I, but when I try to enter on behalf of the school know that this code has already been used however the Photoshop and Illustrator that I already have on my Mac do not work. Before you begin the school pack, I used a free version and so now I see that my free version is over but I can't use the pack of the school that gave me. How can I start using it?
Hello
Please see redemption code help
You will need to contact support by calling/chat for this request.
* Be sure to stay connected with your Adobe ID before accessing the link above *.
Kind regards
Sheena
-
Door problem "this code has already been used.
I bought a license for teaching of 'work at home' 10 months ago. When I went through the process to install the CC on my desk, I received a message that my Mac OS (10.6.11) do not allow for creative cloud. I recently updated my OS and now get this message when you try to complete the registration process "Attention, this code has already been used." When I look at 'my account', it does not show the paid education CC license, just a free trial expired I did before buying the education work at home license. How can I get the CC installed and working at home?
If it says that the code has been redeemed, it means that you have enabled the CC, you tried to connect to CC using the Adobe ID with which you have redeemed the code?
Please let us know if it worked.
Concerning
Baudier
-
I had to buy my CC license for the school. but when I try to turn it on, it says installation code has already been used, I had to fill it up again because the last time I filled in there, nothing displayed on my screen and the whole process stopped. can someone help me pls?
Hello
Please see the link below.
Creative Cloud applications unexpectedly back in the test mode. CCM, CS6
Kind regards
Bani
-
We filled the redemption for Adobe Creative Cloud code. The answer is that "this code has already been used. How do proceed us?
Hello
If you buy the code, then creative cloud will assign to the e-mail address that you used to exchange the product.
You may not receive the serial number for Creative cloud (not not required)
You can download Creative Cloud application link below
https://creative.Adobe.com/products/download/creative-cloud
Once it is installed, log in with your e-mail address and click on the applications tab.
You can see the installation option for your products.
-
Hi, I have a problem with code for my Adobe Creative cloud, it is alphanumeric, but the registry works only with numeric codes ¿where I can use my code? is a subscription to creative cloud of throughout the year.
Probably you have a redemption code... especially if you did not purchase directly from Adobe
Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html
Maybe you are looking for
-
When you visit a Web site that has some kind of issue of Certificate SSL, as missing certificate untrusted or invalid etc, the browser is supposed to display a warning message, which should warn us of the potential dangers of visiting the website. I
-
Satellite C50 - A - 15 L: unable to play audio or video via the media player
Hi all I have problems with my player functions and media browser suddenly - it seems to have taken place after a "significant recent update" (causes more problems than the patches). In any case, since this update, I was unable to play video or audio
-
Qosmio F30-141 - how to change the RAID to IDA in the BIOS?
Hello world! I own computer laptop Qosmio F30-141. The problem is that I don't like vassive RAID. Please, could you tell me step by step how to change the RAID to IDA in the BIOS. Thank you in advance.
-
I recently updated my Vista and saw that my window update in Control Panel, security, updates now resembles the version of windows 7! Can someone tell me what (KB) update was? I want to erase it from my computer and stick with what looked like Vista.
-
As soon as I install updates, he again wants me to install the same.
When the yellow shield appears saying him are updated to install I install updates and a few minutes more late the shield there is once again telling me to install the same updates.