What event should I use to grab the record count of a DataGrid?

I have a "Go" button on a search form.  It works correctly, fetching records from a CF data service into a data bound DataGrid.  However, using the code shown below, the record count always shows zero.  I've tried putting the "..Provider.length" line shown below, into various events on the grid, so that it will always update the count at the correct time, but I get "null" object errors at run time. There seems to be no event that fires "AfterDataLoad".
            protected function btnGo_clickHandler(event:MouseEvent):void
                 getSBJsResult.token = baa_data_svc.getSBJs(cmbSrch.text);
                 tabSbjs.label = 'Subjects: ' + grdSBJs.dataProvider.length;    //  This always returns zero.  Why?

For example, this doesn't work.  The grid is told to loaded data on line 1, but this must just be only a message send to the Flash Player 10, because the processing doesn't stop and wait for the loading of data to complete, it just continues on to line 2, at which point '...Provider.length' is always zero the first time through.   So... the NEXT time the user clicks the Go button, line 2 is processed for the DataGrid which is holding data from the PREVIOUS search, so it updates the tabSbjs.label with the count from the previous search, not the current search.  The count of records is always for the previous data set.
            protected function btnGo_clickHandler(event:MouseEvent):void
1               getSBJsResult.token = baa_data_svc.getSBJs(cmbSrch.text);  // edtSrch.text
2               tabSbjs.label = 'Subjects: ' + grdSBJs.dataProvider.length;                                                                            
All I'm trying to do is (which seems like a very difficult thing to do in FB4):
-Display a DataGrid popluated with data records
-Display a count of how many records are in the data grid
If I rely on CF9 functions, which can only return a single value, then I have to make two CF9  functions, with the exact same SQL, one that returns data, and one that returns a count of the records.... which is non-sensicle.
There must be a simple way to do this, but I'm going around in circles.

Similar Messages

  • What method should be used for resizing the particular JTable Column width

    I have a four table. Only one table which are on top have a table header. I want that when user resize the topmost table with a mouse other table colume also be resized automatically. So I want to know that what method should be used for resizing the particular JTable Column width.
    Thanks
    Lalit

    maybe you can implement a interface ComponentListener as well as ComponentAdapter with your topmost Table.
    for example:
    toptable.addComponentListener(
    new ComponentAdapter(){
    public void componentResized(ComponentEvent e){
    table1.setSize(....);
    table2.setSize(....);
    /*Optionally, you must also call function revalidate
    anywhere;*/
    );

  • What setting should be used to make the smallest size quicktime video file.

    What setting should I use to make a small sized movie for my family that lives 1200 miles away. I am using the iSight with QT Pro 7.0.4 and will be emailing them via Apple Mail to my mom that uses the most current version of AOL for PC with a 1 Meg DSL connection. The reason I am emailing them is she does not have a camera to live chat.
    The first movie I tried was over 4 meg and these files have to go over the internet. It bounced back saying it was to big. It was only a minute long.
    Mac Mini 1.42 8X DVD+-RW Dual Layer 24X CD-RW 250 Gig Ministack Version 2   Mac OS X (10.4.6)   Apple Bluetooth keyboard 19" Nec VGA CRT Flat Screen 1 Gig Memory iSight

    Make your recordings and then open the QuickTime movie.
    Use the Share menu and choose the email small setting. You'll get an estimated file size in the dialog window.
    Your viewers must have QuickTime 7 installed to view these files.

  • What Component should be used to display the list on UI

    Hi All,
    I have a table in which when the user selects a row and tries to remove the row. I am supposed to show the pop up which shows all the rows matching to the header of the row.
    In my backing bean i have the context of the row so i could extract the matching rows form db into a List<String> . Now what i need to know is which component on the Ui will show this as a list in Pop Up.
    I mean which component af:??? should be used to display the List ?
    I am kind of new to ADF.
    Regards,
    Sharma

    inputComboboxListOfValues
    selectOneChoice
    inputListOfValues

  • What event should I use to remotely monitor a 2010 DAG failover occurence

    I have a 2 Exchange 2010 servers installed on Server 2008 r2. Both have all roles, one is used as the primary server and the second is a passive back up. My question is about how to monitor when a database fails over to my passive server. It seems like there
    should be an event logged, probably on the server that is taking the active copy since in theory the other one is non responsive for one reason or another. I've dug through the logs and I've found some events that seem to occur around that time, but nothing
    that definitely says that a failover has occurred. Can anybody point me towards a reliable method of monitoring this?
    Thank you in advance, Joel

    A number of event logs can fire when there is a failover, but the most commons ones are: 
    Alternatively, test in the lab and grab the events as you bounce servers.
    Log Name: Application 
    Source: MSExchangeIS 
    Date: 
    Event ID: 9796 
    Task Category: General 
    Level: Warning 
    Keywords: Classic 
    User: N/A 
    Computer: 
    Description: 
    Database "<Database" has been subject to a lossy failover. The database may be patched if the Information Store detects it is necessary.
    and 
    Log Name:      Application 
    Source:        MSExchangeRepl 
    Date:          
    Event ID:      2099 
    Task Category: Service 
    Level:         Information 
    Keywords:      Classic 
    User:          N/A 
    Computer:      
    Description: 
    The Microsoft Exchange Replication Service requested that Hub Transport server ...
    and
    Event ID: 2153
    Source: MSExchangeRepl
    The log copier was unable to communicate with server ''. The copy of database ' is in a disconnected state. The communication error was: An error occurred while communicating with server ''. Error: Unable to read data from the transport connection: An established
    connection was aborted by the software in your host machine. The copier will automatically retry after a short delay. 
    Event ID: 4082
    Source: MSExchangeRepl
    The replication network manager encountered an error while monitoring events. Error: Microsoft.Exchange.Cluster.Replay.AmClusterApiException: An Active Manager operation failed. Error: An error occurred while attempting a cluster operation. Error: Cluster API
    '"OpenCluster() failed with 0x6d9. Error: There are no more endpoints available from the 
    Twitter!:

  • What event should i use to make code execute whenever I type a letter?

    This is what I'm trying and it makes an empty file, so I know that the code is executed at least once, but since the file is always empty, I don't think that I'm using the right method to get text out of the text pane.
    private void jTextPane1PropertyChange(java.awt.event.InputMethodEvent evt)
    String words;
    FileOutputStream out;
    PrintStream p;
    try
    words = new String(jTextPane1.getText());
    out = new FileOutputStream("myfile.txt");
    p = new PrintStream( out );
    p.println (words);
    p.close();
    catch (Exception e)
    System.err.println ("Error writing to file");
    Edited by: hansbig on Jan 13, 2008 12:41 PM

    PrintStream doesn't like the FileWriter, it's all squiggly. Oh, and I found the right event so that it updates every time i type a letter. So, what is this you say about making a FileOutputStream an attribute? I don't know what that means. I'm also not sure what you mean by listener, is that the PrintStream?
    private void jTextPane1KeyTyped(java.awt.event.KeyEvent evt) {
    FileWriter out;
    PrintStream p;
    try
    out = new FileWriter("myfile.txt");
    p = new PrintStream(out);
    p.println (jTextPane1.getText());
    p.close();
    catch (Exception e)
    System.err.println ("Error writing to file");}
    }

  • What application should i use to create the xml data as the input data for XFA template

    HI,
    I need to generate pdf or html document form from existing XDP with the given xml formatted data set. We usually use word to generate content for those XFA template, as the data should be in xml format content in word document should be able to convert into xml document that is compatible with XFA template. I want to know if there is any tool to conver word doument content to xml format that is compatible with XFA template or has adobe given their own tool to create content that comply with XFA template? . Also i want to know if i can do above mention functionality jaut with adobe forms if not what are the other services that i should use. Please give me the prices of adobe forms and any other tool that i should use. Thank you

    XFA is just the definition of the form template. Once you have an XFA based template, you can merge any XML you want.
    The trick is do the appropriate binding so the data from the XML goes in the right fields on your form. This binding is done using LiveCycle Designer.
    Jasmin

  • What Datatype Should I Use to Change the "lockoutTime" attribute using JNDI

    I am able to use JNDI to modify an object's String valued attributes in ADAM.
    However, now I want to modify lockoutTime which has a datatype of LargeInteger/interval
    According to the documentation for AD, I can set the lockoutTime as:
    new BasicAttribute("lockoutTime", Integer.toString(0)));But with ADAM this throws the exception:
    [LDAP: error code 53 - 00000057: LdapErr: DSID-0C090A4C, comment: Error in attribute conversion operation, data 0, vece_What datatype do you suggest I use, to set lockoutTime to 0 using java/JNDI?
    What datatype does LargeInteger/interval map to in java?

    As both are equivalent to "0" it is impossible to believe that that solved your problem.

  • What application should i use to open the MACOSXUpdCombo10.4.11Intel.pkg

    need assistance i have downloaded the package from the apple support download but when i click on it it is asking me for an application to open it which one is it?
    N

    It appears to be time for a relatively painless Archive & Install, which gives you a new/old OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space and no Disk corruption, and is relatively quick & painless...
    http://docs.info.apple.com/article.html?artnum=107120
    Just be sure to select Preserve Users & Settings.

  • What resolution should I use?

    I'm trying to creat a special graphic image to upload onto iWeb, but t always is A LOT smaller once loaded onto iWeb, what resolution should I use to create the image initially? I've ried 72 dpi but it still came out tiny.
    Thanls

    ThanX Kevin;
    That's the core of the issue I'd also had with taking those suggestions into PhotoShop and then back to iWeb. Tu whit..:
    In instances of some larger graphics, I've found a conundrum of going from one to the other not reproducing the image as the same size. I can paste back into iWeb something just copied from PhotoShop, and it'll be a third the original. How to deal with that.?
    When I tried to increase my 'canvas size' and then blow up the graphic, I'm told that the "Clipboard export failed because it is too big to export."..? Yeah, it's a whole page graphic that I'd blown up almost 3x so that it's import into iWeb would be close to the original (out of iWeb).
    So I tried various test graphics to see which yielded what. It would seem for my CS2 and iWeb1.1.2, there's some upper threshold, beyond which iWeb will only accept/display it around 300 pxs.
    What's wrong with that picture.? How come I seem to be forced away from the recommendation not to resize in iWeb.? Or is there some secret combination to getting large (almost full page) images into iWeb without have to adjust them.?
    Also I'd found what seems an anomaly with the idea of file size increase with iWeb adjustment. I checked my locally published files for pages I'd tried to use an image for background. The png size is declared by the finder to be 36K; but the original, a jpg, is listed as 76k. This seems the inverse of what I'd understood to have been recommended; particularly so for me when I'd set iWeb up to manipulate this image to fit the page by selecting "stretch". What's wrong with my understanding here.?
    and so; what IS the definitive best way to get large size graphics into iWeb as small size files..?

  • What backend should be used?

    well i m developing a card game in java.
    i would like to know for saving the game settings like the cards and variables of the game what backend should i use. i want the application to be fully platform independent and also dont want to use any proprietory s/w like ms access.
    should i store it in a txt/dat file or is there any such compatible db; not talking abt full fledged server kinda dbms like oracle or sql server. just a basic dbms s/w for a small need like this.
    thanx

    It really depends on the scope of the game. Will this be played on the web by many people at a time? Or is this more of a single player desktop app?
    For a dbms MySQL is a free, easy to install and light weight solution. This is my usual go-to light weight dbms.
    Outside of a database, one option is to serialize the objects that contain the states in which you want to save such as player info, card in players hand, and cards in the deck. You just need to make sure those classes implement the Serializable Interface. When the player saves or exits the game, the objects will be serialized saving their state. When the player is ready to start the game again you can deserialize those objects back into java objects on the stack with the same state they had when they were serialized.
    Take a look at the "Serializable" class on the documentation page here [url http://download.oracle.com/javase/6/docs/api/index.html]http://download.oracle.com/javase/6/docs/api/index.html. It is in the Java.io package.
    If you want a Java based DB that is super light wait (very little functionality), can be distributed with your game app, and completely platform independent you can take a look at SmallSQL [url http://www.smallsql.de/]http://www.smallsql.de/. I have not used this one myself but it might do the job you are looking for as well.
    Again, choosing between a DB and data file/serialized objects as well as choosing which DB you should use will depend on the scope of the game. If you are hosting the game, a DB like MySQL will work great. If it is a desktop app than serialization of object or distributing the SmallSQL java DB with you app might be the better choice.
    Edited by: JDScoot on May 15, 2011 12:05 PM

  • After upgrading from Mavericks to Yosemite I can no longer find in Mail the icon (looks like the Add To Contacts icon without the   mark) I used to press in order to obtain an e-mail address from my contact list. What procedure should I use now in or

    After yesterday upgrading from Mavericks to Yosemite I can no longer find in Mail the icon (looks like the Add To Contacts icon without the + mark) I used to press in order to obtain an e-mail address from my contact list. What procedure should I use now in order to quickly add an address to an e-mail that I wish to send?
    Bob

    On the right of the To: field you will see a circled plus sign:
    Click it.

  • What type of hard drive replacement should i use to replace the hard drive in my first generation mac min 2005 model a 1103?

    what type of hard drive replacement should I use to replace the hard drive on my first generation mac mini model a 1103?   G4 1.25 mhz 40 gb hd 1 gb. mem.

    You'll need a 2.5" parallel ATA interface hard drive. Most are 5400RPM, forget 7200RPM drives and slower 4200rpm drives.  You don't want a serial ATA (SATA) drive, as that has a different connector and won't work.
    One source I've used for drives is Newegg, and their parallel ATA hard drives are at http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&N=100007605%2060000344 2&IsNodeId=1&name=IDE%20Ultra%20ATA100%20%2f%20ATA-6 .  Newegg also has many user comments about the drives. Other sources are OWC at http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/ (Click on ATA on the left) . Look for at least a 3 year warranty. 

  • Hi, i have a A1186 Mac Pro 2008 Tower. Im running windows 7 64Bit on it. Im not sure about what version of bootcamp should i use to get the drivers. Someone please help me.

    Hi, i have a A1186 Mac Pro 2008 Tower. Im running windows 7 64Bit on it. Im not sure about what version of bootcamp should i use to get the drivers. Someone please help me.

    Boot Camp support:
    http://www.apple.com/support/bootcamp/
    Boot Camp FAQ:
    http://support.apple.com/kb/HT5639?viewlocale=en_US

  • Everytime I try to enter something into the search box a further box appears to tell me this is a json file and what program should I use to open it. How can I

    I am using Linux mint 12 with firefox.
    Everytime I try to type something in the search box a further box appears to tell me this is a JSON file and what program should I use to open it.
    This has only happened since reinstalling my system a couple of weeks ago.
    I am not really interested in what a json file is I simply want to get rid of this pop up box.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    See also:
    *[[/questions/921535]]

Maybe you are looking for