How to update progressbar while doing serverside processing?
Hi,
I have the following use case:
- When the user clicks a button a file must be downloaded. Because it can take some time before the server gathered the data, a progressindicator must be shown. After that the file is presented to the user.
Currently, I have clientside javascript that shows the popup, and then queues a server event that starts the serverside processing. A poller is running that should keep track of the progress.
My problem is that the popup only shows at the end of the serverside method. Also, the poller doesnt poll while the serverside method is executed, and resumes at the end of the serverside method execution. So even when the popup would show, it wouldnt properly display the progress.
I have the following code:function showProgressPopup(event) {
var popup = AdfPage.PAGE.findComponent("pt:progressPopup");
var hints = {};
hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_OVERLAP;
hints[AdfRichPopup.HINT_ALIGN_ID] = "pt:downloadButton";
popup.show(hints);
var source = event.getSource();
AdfCustomEvent.queue(source, "startDownload", {}, false); //at this moment, popup should show and serverside processing starts
<af:panelGroupLayout id="pgl6">
<af:poll id="poller"/>
<af:commandButton text="Download in Excel-formaat" id="downloadButton" partialSubmit="true">
<af:clientListener type="action" method="showProgressPopup"/>
<af:serverListener type="startDownload" method="#{CombinotaExportBean.startDownload}"/>
</af:commandButton>
<af:popup id="progressPopup" clientComponent="true">
<af:dialog id="downloadDialog" type="cancel" modal="true" closeIconVisible="false" title="Downloading..." partialTriggers="downloadButton poller">
<af:switcher id="downloadSwitcher" defaultFacet="showRunning"
facetName="#{CombinotaExportBean.value == CombinotaExportBean.maximum ? 'showReady' : 'showRunning'}">
<f:facet name="showRunning">
<af:panelGroupLayout id="pgl7">
<af:panelHeader text="One moment please" id="ph3"/>
<af:progressIndicator id="progressIndicator" value="#{CombinotaExportBean}" partialTriggers="poller">
<af:outputFormatted styleUsage="instruction" value="Data is being collected..." id="of1"/>
</af:progressIndicator>
</af:panelGroupLayout>
</f:facet>
<f:facet name="showReady">
<af:goLink text="Click to download file" id="gl1" partialTriggers="poller" destination="#{CombinotaExportBean.downloadFile}">
<af:clientListener type="click" method="closeProgressPopup"/>
</af:goLink>
</f:facet>
</af:switcher>
</af:dialog>
<af:clientListener method="downloadDialogCanceled" type="popupCanceled"/>
<af:serverListener type="downloadCanceled" method="#{CombinotaExportBean.downloadCanceled}"/>
</af:popup>
</af:panelGroupLayout>When I start a new Thread in my serverside CombinotaExportBean.startDownload method, it works because then that method returns while the server is still processing. However then I have problems with quering my RowSetIterators, they start throwing NPE's. Multithreading is evil in webapps I guess.
So how can I do this in one thread? How can I make sure my popup shows first, and my poller keeps polling while the server collects data?
with kind regards,
Gerben
Hi Frank,
Thanks for your suggestion. In my current implementation I'm basically using a animated image, because I'm now using the ProgressIndicator without BoundedRangeModel and then it just shows a running clock.
However, in my case its quite easy to monitor the progress on the server thread. So I thought this is the typical use case for a real ProgressIndicator. Unfortunately I can only find 10g examples of the progress indicator and I dont get the 11g progressindicator to work like that. So what I am curious about is, if a typical ProgressIndicator use case is any different. And if there's any example of it, with or without the usage of the poller.
I already found the answer to part of my question. If I set noResponseExpected to the serverevent, the client event finishes and is effective immediately, before the server event is finished:var source = event.getSource();
var customEvent = new AdfCustomEvent(source, "startDownload", {}, false);
customEvent.noResponseExpected();
customEvent.queue(true);with kind regards,
Gerben
Similar Messages
-
What are the accounts that will hit while doing subcontracting process
What are the accounts that will hit while doing subcontracting process?
Hi Raj,
In Case of Sub contract
While doing Transfer Posting (Providing material to vendor) in MB1B or ME2O only Material document will be generated. No Accounting Document will be generated.
While Receiving the Finished / Semifinished material both Material and Accounting documents will get generated and the accounting entries will be as under
1. Stock Account (finished Account) BSX - Debits
2. GR/IR clearing Account WRX - Credits
3. Change in Stock Account BSV - Credits
4. Processing Charges/Sub Contract Charges FRL - Debits
5. Stock Account (Raw Material) BSX - Credits
6. consumption from stock of material provided to vendor GBB(VBO) - Debits
bye
Sridhar Thota -
To display a window while doing some process
Hi all
Is it possible to display a informative dialog box/window when I
am doing some updation or forms doing some process say the table
I am quering in a form has got n number of rows, so Obviously
this will take some time to diplay the last row when users
presses last row button provided by my application, when it is
fetching the rows I would like to display a alert with relavant
message depending upon the situation and this display and
closing of this alert/dialogue box should dynamic with out any
user interaction,
its some thing like ORACLE PLUS displays a window/dialog box
with "EXECUTING QUERY" if any SQL statement issued at SQL PLUS
prompt.
Regards
Mahesh
nullHi Mahesh,
You can do it by writing the required message in a new window in
your form and use SHOW_WINDOW('window_name') and
HIDE_WINDOW('window_name') before and after EXECUTE_QUERY
command respectively.
I think it would solve your problem.
Feel free to write back to me if you have any problem
Lalit
Mahesh (guest) wrote:
: Hi all
: Is it possible to display a informative dialog box/window when
I
: am doing some updation or forms doing some process say the
table
: I am quering in a form has got n number of rows, so Obviously
: this will take some time to diplay the last row when users
: presses last row button provided by my application, when it is
: fetching the rows I would like to display a alert with relavant
: message depending upon the situation and this display and
: closing of this alert/dialogue box should dynamic with out any
: user interaction,
: its some thing like ORACLE PLUS displays a window/dialog box
: with "EXECUTING QUERY" if any SQL statement issued at SQL PLUS
: prompt.
: Regards
: Mahesh
null -
Update terminated while doing KP26
hello, friends.
while doing KP26, the system terminated update with the following info (from ST22):
runtime error SAPSQL_ARRAY_INSERT_DUPREC
exceptions CX_SY_OPEN SQLDB
could anyone tell me why we are having this error? does this have something to do with number ranges and how do we correct this?
many thanks.Hi Deepa
I increased the number range for CO documents though it was not exhausted. Then the error disappeared and the documents were saved.
Thanks
Sanjay -
Update terminated while doing migo , mb1a .
dear friends,
when i am doing migo , mb1a update of document is terminated.
I have checked sm13 .It is showing nothing.
There are no number range problem also.
plz help me why this problem occured.
Thanks in advance.
waiting for your reply.
Ajit Aitawade.Hi,
While termination you might be gettng some message, share that message someone will help you.
To my knowledge its better you discuss the problem with your system administrator you may get good result.
CHeers!!
VEnk@ -
How to make ProgressBar work for long process with finally download action
Hi ADF-Experts,
i wonder if there is a adf-solution to this use case.
In my case the user clicks a context-menu item to get a report. So a background process will be started to generate the report(in pdf format) and when the generation is finished,
the user can choose to download the report in the browser built-in popup.
This all works, but because the generation process could take a long time, i want now to showing a progess bar in clock form with af:progressIndicator to inform the user about the running process.
public void clickGenerateMenuItem(event) {
startProgressBar();
generateReport();
private void generateReport() {
doGeneration();
stopProgressBar();
downloadReport();
The problem is that the ProgressBar will never be shown bacause of the call of generateReport()-methode. It is impossible in one request to make two different event (one for download and another for popup show/hide).
I also tried with af:poll together with af:progressIndicator, the ProgressBar is indeed shown but because of the native Ajax-Poll Request the generated Report can not be downloaded more.
Any idea how this problem could be answered?
Thanks in advance.
Regards
PengHi,
no, you can't make to calls. But you could show an animated gif instead. Have a look at sample 027 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
Frank -
How to close Item while doing GR
Dear Sir
i would like to close PO item when i do Goods Receive
Example PO Qty = 5000 ea
and GR = 3000 ea only, then i want to close this item during Goods Receive
so, when i do GR for the rest 2000 ea, system will not allow because this item is already closed
How to do ?
Annop chHi Annop,
Unfortunately, this is not possible during the goods receipt.
At the time of posting the goods receipt, the only option we have is to set the "delivery completed" indicator, but this does not stop the system from avoiding the posting of further goods receipts for the Purchase Order quantity that remains opened.
Setting the 'delivery completed' indicator has the following effects:
.- The purchase order item is considered as completed and can be deleted even if not the entire quantity was delivered.
.- A further delivery is not expected. This affects material requirements planning (materials planning) and purchase order commitment.
.- However, another delivery up to the purchase order quantity (including overdelivery tolerance) is still possible.
.- During the next goods receipt, the system does not select the item as a proposal in the selection list in Transaction MB01. In Transaction MIGO, the system does not propose the 'OK' indicator even if it would normally be proposed due to the user settings.
To stop the system from proposing a quantity in Transactions MB01 or MIGO and to prevent a GR posting, you can proceed as follows:
.- Reduce the purchase order quantity to the previous GR quantity.
.- Block the purchase order item. (ME22N: Block pushbutton; ME22 Menu -> Edit -> Block).
.- Fill the date field for the 'Latest Possible Goods Receipt' (LEWED) in the purchase order item. If you do this and you enter a GR document after this date, the system issues message M7163, which you must set as an error message in Customizing.
I hope this helps,
Esther. -
How to update VBFA while sales order creation using BAPI
Hi,
I am trying to create sales orders for each schedule line items while inquiry creation.
This I have done in the user exit in the VA11 program MV45AFF using BAPI "BAPI_SALESORDER_CREATEFROMDAT2".
along with the Inquiry, Sales orders are also getting created. But I am facing 2 problems.
1) BAPI is not returning the sales order number to the program but when checked from SE37 it is returning the sales order
number.
2) It is not updating the VBFA (SD flow) table.
Regards,
Krishna.Hello,
1) BAPI is not returning the sales order number to the program but when checked from SE37 it is returning the sales order
number.
- are you passing simulation parameter (TESTRUN) as 'X'
2) It is not updating the VBFA (SD flow) table.
- Please use BAPI_SALESDOCUMENT_COPY for copying and updating VBFA table
Thanks
Krish -
How to exclude tables while doing import in Traditional import/export
Hi OTN,
Please suggest me, while using Oracle Datapump we can exclude tables as below i mentioned.... if i will use Traditional export/import how can i exclude tables.
impdp tech_test10/[email protected] directory=EAMS04_DP_DIR dumpfile=EXP_DEV6_05092012.dmp logfile=IMP_TECH_TEST10_29MAY.log REMAP_SCHEMA=DEV6:TECH_TEST10 remap_tablespace=DEV6_DATA ATA_TECH_TEST10 remap_tablespace=DEV6_INDX:INDEX_TECH_TEST10 EXCLUDE=TABLE:\"IN \(\'R5WSMESSAGES_ARCHIVE\',\'R5WSMESSAGES\',\'R5AUDVALUES\'\)\"
Your suggestions will be helpful to me find the way.you cannot exclude. But you can use tables parameter to list all the tables needs to be exported.
exp scott/tiger file=emp.dmp tables=(emp,dept)
similarly for import
Edited by: Kiran on Jul 18, 2012 2:20 AM -
i did an update on my sons iphone 4s and now it says it is in recovery mode and that it can not reboot or restore the phone?! it will not power down normal and keeps saying hook to itunes. all i did was an update and it went into recovery mode and will now not restore! how do i fix this???
Do exactly as it says, connect to a computer running iTunes and restore.
-
Document express update terminated while doing delievery
hi all
I ve a problame when i am doing delievery with vl01n I am getting an erroe stating that document express trminated when i click the inbox it shows update was terminated
user sap1
transaction vl01n
updatekey 01ab371d6f2b4161b1704e58d0026f71
plz help me outHi,
As far as I know, this issue is usually related to BASIS. It comes when the update is not happening in the data base for that document. II used to get that issue several times. It was always related to BASIS since the database was either full or update in the data base was not happening.
So check with your BASIS guy about this issue. He might be able to resolve it.
Regards,
Rohan -
ITunes 10.6 (Mac mini) Crashes doing "gap processing"
Just upgraded to 10.6.
Added a folder of music.
Crashes all the time while doing gap processing.
I have tired this a couple of times now, same problem.
Where can I downloand iTunes 10.5.3? I don't want to wait for Apple to fix this.After much frustration, including trying to use time machine to get my old library back (doesnt work), I finally found a site that shows how to restore iTunes 10.5.3. These instructions are pretty clear and easy to follow, but better yet, they work. http://untetheredjb.com/fix-itunes-10-6-crashing-on-mac-osx-leopard-and-lion. Very happy to have my devices synced again. I dont think I'm going to do another iTunes upgrade for a while after this nightmare.
-
Error while doing OASV T Code in ECC 6
Can anybody help me how to fix this while doing T Code OASV.
I will assign good points.
Balance in 1 currencies
Message no. F5842
Diagnosis
Balances have been found in 1 currencies with the following details:
Currency type Amount Currency
30 0.01 USD
(A maximum of three differences are listed)
System Response
The prerequisite for posting a document in financial accounting is that the balances for all currency types are zero.
Procedure
This is a system error in the calling application or the FI/CO interface.
Thanx,
EduHye
When you are using multiple currencies this error arrises. You can not transfer the values through OASV.
You have to follow the other way :
first reset the asset reconcilation account.
post the transaction through fb50 or f-02
after posting the entry re-set the reconcilation account.
The path : Assets accounting preparing for production start upset or reset recon account. -
While doing 3rd party process, So, how system will pick the vendor?
Hi SAP SD Experts,
while doing 3rd party process, at the time of creation of sales order system automatically creates Purchase Requestiion with reference to this Purchase order will be created while creating Purchase order system automatically picks the Vendor?
So, how system will pick the vendor?
where we do configuration for this?
please help me out.
Thanks & Regards,
NivasHI
Based on the source List , Check with MM Consultant for better understanding the Source list concept
and also check the below links
[About the Source List Determination|http://www.sap-img.com/materials/about-the-source-list-determination.htm]
[Inforecord and source list |Inforecord and source list;
Regards,
Prasanna -
While doing BDC in VL02N , How do update POSNR
While doing BDC in VL02N how to update POSNR in BDC program.I need to choose purticular line number and should update that line item.kindly send me a BDC sample code for this .
You better use a BAPI like BAPI_OUTB_DELIVERY_CHANGE.
Else you could use function code POPO_T "Place cursor" and then you will have to use field names like LIPSD-G_LFIMG(01) in your BDCDATA.
Regards
Maybe you are looking for
-
This is my last shot at getting Aperture 3 to work for me. Despite the good efforts and advice of folks here in the Community, and conversations with Apple, I can't get the **** thing to work correctly with Photoshop. Or, I am not using it correctly.
-
When syncing the Curve 8300 to the ICal on a MacBook Pro running OS 10.5.8 i now get the following message. "The Calendar cannot be accessed for synchronization. For help resolving this issue, refer to KB19454 in the Blackberry Desktop Manager Knowle
-
Won't Organize Tracks Correctly
Hi, I have a problem with my itunes. I have a few cds where everything is tagged correctly and the track numbers are all numbered correctly, but itunes will not organize the cd by the track order. For example, I have one cd with 10 tracks, itunes has
-
Updated to tiger 10.4.9 - Photoshop CS will not open files
Hey all, Hoping someone out there can answer this question for me. I have a bit of a serious problem. I don't know if this is an issue with Mac OS or Photoshop. I just bought a MacBook Pro. Copied all my files over to the new computer. A strange thin
-
Score from MIDI issues...
Can anyone tell me how to make MIDI transcribe CORRECTLY? What I mean is, I have MIDI notes on specific keys, and it is somehow scribing two of the same key hits on two different staffs. Why would this happen? I mean, MIDI uses standard keys... For i