Add Progress Bar to a query component (ViewCriteria)

Hi,
I would like to add a progress bar (or any relevant component to show the process is going on) to QueryComponent (ViewCriteria).
Please guide me how to achieve this.
Thanks.

I have solved the problem:
     public Component getTableCellRendererComponent(JTable table, Object value,
          boolean isSelected, boolean hasFocus, int row, int column)
          if(value != null)
               setString(((JProgressBar) value).getString());
               setMinimum(((JProgressBar) value).getMinimum());
               setMaximum(((JProgressBar) value).getMaximum());
               setValue(((JProgressBar) value).getValue());
          return this;
     }

Similar Messages

  • Progress bar before loading a component

    hi,
    Can anybody send me the coding to show a progress bar before loading a component.
    thanks in advance.

    Hi,
    Here is one idea;
    http://www.cflex.net/showFileDetails.cfm?ObjectID=448
    Johnny
    Please rate answers.

  • Add custom field to af:query component?

    Anyone had any experience overriding af:query copmonent? I need to add my custom search field (to query component), which would have a search icon next to it, and on click, a popup widow would open containing my custom task flow where I could select a record with certain value and on return that custom field (in query component) would get populated with selected value. I hope I'm being clear. Please point me to any useful information. Is that even possible? I use JDeveloper 11.1.2.3.4.0 Regards, Marko

    Hi,
    af:query is a component that comes as is. Its not designed for customization in that you can add your own fields. If you have a requirement for this then
    1. expose a method on the VO Impl or AM Impl that expect arguments (your query parameters)
    2. Use the arguments to populate bind variables used by a ViewCriteria
    3. Apply the View Criteria to the View Object
    4. Execte the View Object
    5. Drag and drop the method from the DC panel as a parameter form
    6. Ensure the result table PartialTrigger property is pointing to the button ID of the parameter form
    7. Change whatever UI component you want to change in the parameter form
    This gets you going ...
    Frank

  • Progress bar in a JProgressBar component is not always drawn

    Hi experts,
    I have a strange issue with a swing application. This app contains of a JFrame including a JTable. This table has multiple columns, one of them is a JProgressBar (implementing a TableCellRenderer). Multiple background threads are running, every of them updates one row's progress bar via the InvokeLater() method. This works fine.
    At a specific point within the runtime of the application, the value of a progress bar is set back to 0, and instead of the default percentage text a custom string is displayed (then continuing to progress with this custom text set). This works fine as well.
    Problem is, that when a custom string is set to one progress bar as described above, then the bars of the other JProgressBars are not painted any more. But the default percentage text of these other JProgressBars are still incremented and painted correctly. When the one progress bar, that has the custom string set, has finished and this row is removed from table, then the other progress bars are again painted correctly (including the default percentage text).
    A part of the custom TableCellRenderer class is shown here:
         public class ProgressRenderer extends JProgressBar implements TableCellRenderer
         public ProgressRenderer()
              super(SwingConstants.HORIZONTAL);
              setBorderPainted(false);
              setStringPainted(true);
         public Component getTableCellRendererComponent(JTable table, Object value,
              boolean isSelected, boolean hasFocus, int row, int column)
              if(value != null)
                   setValue(((JProgressBar) value).getValue());
                   setString(((JProgressBar) value).getString());
                   setMinimum(((JProgressBar) value).getMinimum());
                   setMaximum(((JProgressBar) value).getMaximum());
              return this;
    ...Any ideas what could be wrong here?
    I am really out of ideas here :(
    Thanks in advance for your help!
    Kind regards, Matthias

    I have solved the problem:
         public Component getTableCellRendererComponent(JTable table, Object value,
              boolean isSelected, boolean hasFocus, int row, int column)
              if(value != null)
                   setString(((JProgressBar) value).getString());
                   setMinimum(((JProgressBar) value).getMinimum());
                   setMaximum(((JProgressBar) value).getMaximum());
                   setValue(((JProgressBar) value).getValue());
              return this;
         }

  • Progress bar and sql query

    Hi, first of all excuse my English.
    I have a problem that I can not solve, i implement a indeterminate progress bar for a sql query but not shown until you have completed method. I tested threads and swingworker but can't make it work.
    The pseudocode would be:
    @Action
    public void Find() {
        progressbar.setVisible(true);
        ... query ...
    }If anyone has a solution would be very grateful.

    The Find() method is automatically created by NetBeans when I select "Set Action" from the context menu of a JButton.
    NetBeans generated code is as follows:
    public MyClass { // Constructor
        initComponents();
    private void initComponents() {
        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(administration.AdministrationApp.class).getContext().getActionMap(MyClass.class, this);
        button_find.setAction(actionMap.get("Find")); // NOI18N
    @Action
    public void Find() {
    }don't exist a method actionPerformed()

  • How to add progress bar in servlets

    a task running within a program might take a while to complete, then how i can make a progress bar.

    you can't, well not reliably anyway
    that is unless you want to do some crazy ajax thing but i've never heard of anyone going through that much trouble for a progress bar
    just popup a message that says "Processing..."

  • Splash screen with progress bar and multiple jar files to load

    Hello,
    I have been looking to the new features in java 6 for splash screens. I haven't implemented this never before and i was wondering how i could do the following with java 1.5 or 6:
    I would like to see a splash screen with a progress bar that "grows" when every jar file has been read.
    At this time i call my application like this from a shell script:
    exec "$JAVA_BIN" -Djava.library.path=$LIBRARIES_J3D -classpath xxxx.jar yyyy.jar zzzz.jar ...
    where xxx.jar, yyy.jar and zzz.jar are very heavy jars.
    So i would like to see in the progress bar 33% 66% and 100% when they are loaded.
    I do not know if this is the right forum to ask for this. If no, please point me which would be the ideal one.
    Any help will be very useful. Thanks to all!

    Am 10.07.2015 um 07:17 schrieb Lalit Solanki:
    > Hi friend,
    >
    > I am create pure eclipse E4 application and trying to splash screen with progress bar and message.
    >
    >
    >
    >
    > but above image in only support eclipse E3 application so pleas help me how to add progress bar and message in eclipse E4 application
    >
    Hi Lalit,
    there's a Bug entry: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382224
    Meanwhile you can use this solution:
    https://www.eclipse.org/forums/index.php/t/328812/5ceed4bcaa683a94d65efb161bffd217/
    Regards,
    Ralf.

  • Dynamic control of progress bar component

    Hello, I'm trying to use a load progress bar component to
    appear as .swf files are loaded into a blank movie symbol when
    users click on a button. What script can I use to connect the
    progress bar, button, and the empty movie clip?

    You can use the progress bar Component as a preloader of
    sorts, but this doesn't work very well within the same document.
    The best way to go about doing this is to create a 'loading' swf
    file, that is the same size as the swf your main swf, then make an
    empty MC and load the swf into it and you can then use the progress
    bar Component to display the loading (or any number of other visual
    indicators) loading is best done using the MovieClipLoader class,
    where you can use it's event handlers and methods to effect the
    progress indicator, however the pbar Component has these handler
    built in as well so in this case for simplicity I'll use the
    loadMovie method (I rarely do) So with a swf the same size as the
    one you want to load, place a pbar instance on the stage with the
    instance name of 'my_pb', and create an 'actions' layer and add
    this code to the first frame:

  • Need progress bar component help.

    I have a huge headache from doing hours of web searching for
    what seems to be a simple solution. All I want to do is use the
    progress bar component on frame one to load my main timeline and I
    can't find a tutorial for this anywhere. Can anyone help? Thanks in
    advance,
    Joe

    You can use the progress bar Component as a preloader of
    sorts, but this doesn't work very well within the same document.
    The best way to go about doing this is to create a 'loading' swf
    file, that is the same size as the swf your main swf, then make an
    empty MC and load the swf into it and you can then use the progress
    bar Component to display the loading (or any number of other visual
    indicators) loading is best done using the MovieClipLoader class,
    where you can use it's event handlers and methods to effect the
    progress indicator, however the pbar Component has these handler
    built in as well so in this case for simplicity I'll use the
    loadMovie method (I rarely do) So with a swf the same size as the
    one you want to load, place a pbar instance on the stage with the
    instance name of 'my_pb', and create an 'actions' layer and add
    this code to the first frame:

  • How to determine a sql query size to display a progress bar

    I would like to show a progress of an sql query within a jsp page.
    Background:
    I have a reporting web application, where over 500 contacts can run reports based on different criteria such as date range....
    I current display a message stating 'executng query please wait', however the users (hate users) do not seem to wait, thereofore they decide to run the query all over again which affected my reportign sever query size (eventually this crashes, stopping all reports)
    Problem:
    The progress bar is not a problem, how would I determine the size of the query at runtime therefore adding the time onto my progress bar.

    Yes it's doable (we do it) but it sure ain't easy.
    We've got about 23,500,000 features (and counting) in a geodata database. Precise spatial selection algorithms are expensive. Really expensive.
    We cannot impose arbitrary limits on search criteria. If the client requires the whole database we are contractually obligated to provide it...
    For online searches We use statistics to approximate the number of features which a given query is likely to return... more or less the same way that the query optimiser behind any half decent (not mysql (5 alteast)) database management system does.
    We have a batch job which records how many features are linked to each distinct value of each search criteria... we just do the calculations (presuming a normal (flat) distribution) and...
    ... if the answer is more than a 100,000 we inform the user that the request must be "batched", and give them a form to fill out confirming there contact details. We run the extract overnight and send the user an email containing a link which allows them to download the result the next morning.
    ... if the answer is more than a million features we inform the user that the request must batched over the weekend... same deal as above, except we do it over the weekend to (a) discourage this; and (b) the official version ensure we have enough time to run the extract without impinging upon the maintenance window.
    ... if the answer is more than 5 million we display our brilliant "subscribe to our DVD service to get the latest version of the whole shebang every three months (or so), so you can kill your own blooody server with these ridiculous searches" form.
    Edited by: corlettk on Dec 5, 2007 11:12 AM

  • How can I add a Progress bar to show the "render to JPG" progress?

    Hi everyone, I have a button which renders my component to
    JPG.
    How can I attach a progress bar to show the progress of the
    rendering?
    <mx:Button label="render" click="renderasJPEG ()"/>
    public function renderasJPEG( ):void
    convertToImage( component001, new JPEGEncoder( 100));
    private function convertToImage( object:IUICompon ent,
    encoder:IImageEncod er):void
    var base64string: String = ImageSnapshot. encodeImageAsBas
    e64(
    ImageSnapshot. captureImage( object, 72, encoder));
    var variables:URLVariab les = new URLVariables( );
    variables.encoded = base64string;
    variables.type = "jpeg";
    var request:URLRequest = new URLRequest(" script_saveasima
    ge.php");
    request.method = "POST";
    request.data = variables;
    navigateToURL( request, "_blank");
    Thanks in advance.

    Hi,
    I would have thrown a prompt to the user in the renderasJpeg
    function and removed it in last line of convertToImage function.
    Isn't this what you want?
    Hope this helps.

  • I keep getting the message on iTunes that my Shuffle (which is current on updates) needs to be restored.  It is showing up in devices, but when I try to add songs to it, I don't get the little progress bar showing me that the song is being added. ***?

    I updated to the new iTunes last week.  Today I plugged in my 4th generation Shuffle to add some new songs.  The shuffle appears in Devices, but when I try to add songs, I'm not getting the progress bar at the top of the screen, so I'm assuming the song isn't being added.  I tried ejecting the Shuffle and plugging it in again, and I got a message that my iPod needed to be restored before it could be used with iTunes -- even though the screen also said the Shuffle is up to date on the software. I finally gave in and restored it, but I continue to get the same message.  When I eject the iPod and try to play it now, I'm getting nothing, and when it is connected to the usb port, the orange light is continually flashing.  I've been trying to figure this out for about 3 hours now, so if anyone could help me, I'd be eternally grateful!

    The 1st and 2nd gen shuffles do not have an automatic syncing mode, like later shuffles and the "big" iPods.  It is maintained manually (or by using the Autofill feature).
    If the iTunes sidebar (along left side of window) is hidden, from the menu bar, under View, select Show Sidebar.  The shuffle appears in the sidebar, under DEVICES, when connected.
    To add songs to the shuffle...  Show a list of songs in the iTunes window.  For example, you can select Music under LIBRARY (in the sidebar) to show your complete iTunes music library list.  Select a song and drag it to the shuffle in the sidebar.  You can do this with more than one song selected.  Alternately, select the song(s), right-click the selection, and choose the command to Add to Playlist -> [name of iPod].
    To remove songs from the shuffle...  Select the shuffle in the sidebar.  To the right, it's Settings screen is shown.  Toward the top, where it says Settings, click on On This iPod (to the right).  The list of songs on the shuffle is shown below.  Select the song you want to remove and press Delete on the keyboard.  You can do this with more than one song selected. 
    NOTE:  At the bottom of the shuffle's list of songs, there are controls for the Autofill feature.  You can also use Autofill to fill your shuffle from your music library or from a specific playlist.

  • Question about plugging in an ajax progress bar component onto a black-box.

    Hello,
    I have the following problem: I want to integrate an ajax progress bar component to a j2ee application and I am in reference to the following pattern (https://bpcatalog.dev.java.net/nonav/ajax/progress-bar/design.html). It seems I need for the "task" component to return the percent. The problem I have is that I am calling a legacy method (i.e. as400) that does not return a percent as it is to me only a black-box. Here is a snippet of what it looks like to me:
          AS400 sys = new AS400("AS400D.calyonfinancial.com");
           sys.setUserId("jmartin");
           sys.setPassword("jmartin");
           CommandCall cmd = new CommandCall(sys);
           cmd.run("my as400 command goes here");
           AS400Message[] messageList = cmd.getMessageList();
           for (AS400Message msg : messageList) {
               System.out.println(msg.getText());      
           sys.disconnectService(AS400.COMMAND);At best I can know whether or not it is completed.
    void actionCompleted(ActionCompletedEvent event) //Invoked when an action has completed.What do you advise I do bearing in mind I want to avoid using an indeterminate progress bar??
    Thanks in advance,
    Julien Martin.

    That's not a legacy method. The latest version of JTOpen was issued less than a month ago. And note that it's open-source, so you could change it yourself to provide percent-complete data. (Of course you'd have to be able to get that data from the underlying iSeries command.)
    It wouldn't be easy, but if you think about it for a minute you'll realize that you can't display percentage complete in a progress bar unless you have some way of finding out what percentage the task has actually completed.

  • How can add a progress bar into script?

    Hi,
    I got a script for gen pdf
    I want put a progress bar, and make it working
    but I don't know where I can put the progress bar
    and how
    //=====================================================================
    var doc = app.documents; 
    app.findTextPreferences = null; 
    app.findTextPreferences.underline = true; 
    for(var i=0;i<doc.length;i++) 
            var found = doc[i].findText(); 
            var _pages = []; 
            for(var j=0;j<found.length;j++) 
                    var txfms = found[j].texts[0].parentTextFrames; 
                    for(var k=0;k<txfms.length;k++) 
                            _pages.push(txfms[k].parentPage.name); 
            for(var j=0;j<_pages.length;j++) 
                    if(_pages[j] === _pages[j-1]) 
                            _pages.splice(j,1); 
            if(_pages.length != 0) 
                    app.pdfExportPreferences.pageRange = _pages.toString(); 
                    doc[i].exportFile(ExportFormat.PDF_TYPE, new File(doc[i].fullName.toString().replace(/\.indd$/i,".pdf")), false); 
            _pages = []; 
    //=================================================================== Can I put progress bar in here?
               var counter = new Window("palette");
               counter.prompt = counter.add("statictext",[0,0,80,20]);
               counter.show();
               var cells = app.activeDocument.allCellStyles;
               for(var i = cells.length-1; i > 0; i--){
               counter.prompt.text = String(i);
               cells[i].verticalJustification = VerticalJustification.bottomAlign;
               counter.close();
    //===================================================================
    app.findTextPreferences = null;
    alert("Done.");
    thanks
    Harvey

    Hi Harvey,
    Try this,
    var doc = app.documents;
    app.findTextPreferences = null;
    app.findTextPreferences.underline = true;
    for(var i=0;i<doc.length;i++)
            var found = doc[i].findText();
            var _pages = [];
            for(var j=0;j<found.length;j++)
                    var txfms = found[j].texts[0].parentTextFrames;
                    for(var k=0;k<txfms.length;k++)
                            _pages.push(txfms[k].parentPage.name);
            for(var j=0;j<_pages.length;j++)
                    if(_pages[j] === _pages[j-1])
                            _pages.splice(j,1);
            if(_pages.length != 0)
                    app.pdfExportPreferences.pageRange = _pages.toString();
                    doc[i].exportFile(ExportFormat.PDF_TYPE, new File(doc[i].fullName.toString().replace(/\.indd$/i,".pdf")), false);
            _pages = [];
        var counter = new Window("palette");
        counter.prompt = counter.add("statictext",[0,0,80,20]);
        counter.show();
        var cells = app.activeDocument.allCellStyles;
        var w = new Window('palette');
        w.pbar = w.add('progressbar', undefined, 0, cells.length);
        w.pbar.preferredSize.width = 300;
        w.show();
        w.pbar.value = 0;
        for(var i = cells.length-1; i > 0; i--)
            w.pbar.value += 1;
            counter.prompt.text = String(i);
            cells[i].verticalJustification = VerticalJustification.bottomAlign;
        counter.close();
    app.findTextPreferences = null;
    alert("Done.");
    Regards,
    Chinna

  • Customizing OI to add step progress bar

    Hello custom RTOI experts!  I am attempting to make a customization to the full-featured LabVIEW RTOI (for TestStand 3.0) in order to provide the seemingly simple feature of a step completion progress bar on the execution page of the tab control.  Let me explain a little behind the concept I'm going for.  There are some steps in my sequences that take a relatively long time (15 minutes or so).  During this period, a requirement of mine is to have a progress bar that gets updates every so often such that by the time the step would ordinary complete, the progress bar is at 100%.  Initial attempts involved a separate VI that managed the progress bars, but having yet another window is not the ideal UI design...  Instead, I was hoping to integrate this functionality into the RTOI so that each time a new step begins executing, additional custom data (the expected step duration) is (optionally) sent to the RTOI providing the progress update portion of the RTOI code the necessary data.
    Is there any sample code out there that performs some similar task so that I can get a better feel for how the pieces fit together?  In particular, there are a few things that are befuddling me:
    1) What is a good way to store this custom information (step duration) in the sequence file?  Should I modify the basic step types to add a new duration field which can be optionally set to something greater than the default, 0?
    2) How should the step duration get passed to the RTOI?  My current thought is to override the PreStep engine callback to send the custom duration field in a custom UIMessage, but that may be partly because I'm not familiar enough with the structure of the data is that is that is accessible via the sequence context...
    3) How do I link the progress bar data to the actual execution page that is currently being viewed.  Up to 4 executions can be running using the parallel model or the batch model in my sequences, so something would clearly need to be done so that when execution 1 is visible, the associated progress bar is shown, etc...  I'm assuming I can trap on some event when the user clicks on an execution in the list bar, but there is no similar code in the out-of-box RTOI - all that appears to be managed automatically by linking the controls to the execution manager.
    Thanks for any pointers or code samples (or even suggested reading) that anyone can give.

    Thanks for the response.
    I may indeed want to use the ProgressPercent message, but I'm not so sure just yet.  I did not want to leave the responsibility of sending UIMessages up to the VIs and other code modules called by the sequence - I was hoping for a simple solution to provide a new field (ExpectedDuration) that can be set for any given step.  In this way, the RTOI can manage updating the progress simply by counting seconds.  Perhaps there is some timer callback that can be leveraged to perform this function?
    What I have so far is as follows: I have a new step type called PassFailTestWithDuration.  It is a copy of the PassFailTest step type with the addition of a ExpectedDuration property and a new PreStep which calls the PostUIMessageEx with a custom event (10001).  The expected duration and the RunState.TestSockets.MyIndex both get passed as parameters.  Inside the RTOI, I have added a UserMessage callback VI which stores the data in the appropriate slot of a global (indexed by socket index).  (The global array is implemented as what I've heard called an action engine - there are init, read, and write actions that it can perform on data stored in the VI, and it is set as non-reentrant so that race conditions cannot occur).  Each entry in the global array has 2 fields - the expected duration, and the current elapsed time.  My idea was to continually update the current elapsed time for all active executions and simply show a progress bar for the "active" execution by displaying its elapsed time/expected duration in each necessary event...
    I think my main question now is - how do you determine the RunState.TestSocket.MyIndex of the active execution in the execution manager (or application manager)?  It seems like such an obvious thing to want to know, but I don't see it anywhere.
    Thanks again for any hints you can provide!

Maybe you are looking for

  • AP Vendor Inquiry Report

    Hi BW Experts, I have an urgent requirement to develop a report which has the following fields: This is a AP Inquiry report. Vendornum Invoicenum Invoicedate Companycode DocumentAmount LocalCurrency GroupAmount GroupCurrency POnumber DocumentNumber F

  • How can I make my sons iPod HIS without getting him his own iTunes account and without using mine on his device?

    We purchased an iPod touch for my son.  He is using my iTunes account and all of my  and contacts are on his phone.  How can I set it up so his iPod is HIS and he doesn't share my stuff without giving him an iTunes account?

  • GR Posting before Schdeule date

    Hi Gurus Is it possible to post the GR for a scheduling agreement sch lines well before the date of schedule lines ? Edited by: Raja Krishna on Aug 28, 2008 7:11 AM

  • STMS-Transport Routes creattion

    Hi Friends, Please clarify my question regarding transport routes. We had total 4 systems in our landscpae like ECC-dev,Qas,Trn and PRD. as usually the old transport connections are existed beteen "dev-qas" then "qas to trn" and "prd".Now we want to

  • Opening ports in windows Web 2008?

    Is there a way to open ports in windows web 2008? i tried on firewall and didn't work. can someone help please