Getting myGrid.selectedItems to properly *select*...

I have an application with a popup window that is created
from a function on click. The popup has a datagrid. The "get all
data" function for the grid is coming from a simple component that
brings in the data, called inside the popup - lets say an AC
allData. The comopnent inside the popup broadcasts an event saying
"done loading" and I'm handling that event in the popup to select
myData.selectedItems, based on the data passed from a custom event
in the man application..
The grid properly displays all data from the data component.
The selectedItems arrayCollection is definitely available to the
popup. It is an AC of myValueObject, seen in the debugger. The
manager's "get all data" is also an AC of myValueObject.
In the above scenario, it doesn't work when I say
myGrid.selectedItems = selectedData as Array.
Instead, I have another function "getSelection(selectedData)"
which basically loops through the selectedData AC and
pushes each item to a new Array and returns that array. I've
triple checked this, and it also does not work. As a test, to make
sure its not realted to the "loading" process of the popup, I've
even set the "getSelection" function to run via a button's click so
that it is well after everything is loaded in the popup. It still
selects nothing.
BUT! If I have "myGrid.selectedData = getSelection(allData)"
where allData is the same exact AC that is used to populate the
grid's dataProvider, it selects all items in the grid. What's
totally odd, is the AC from the dataProvider and the AC for
selectedData look absolutely *identical* in the debugger, minus a
bunch of items for the selectedData, as it should be.
The only working alternative I can figure out is to create
another function in the data component that "re-gets" the
selectedData. While this works, it is unfortunately not acceptible,
because other areas of the application might change the
selectedData, without calling to the database. I need to keep
moving that data around to components all over the application
freely without calling him.
Any thoughts on what's wrong here?
Here's a screen capture to emphasize the complication:
qnotemedia.com / wontwork.gif
...note that in the above example, only arSecondSelection
actually works. The others select nothing.

Got it!
It appears that selectedItems is dependent on the data being
absolutely identical to the dataProvider. And while I thought my
data was identical, it really wasn't. In the debugger, if you look
at a variable, its always: "Array (@123456)". What I found was that
although the data was definitely the same, the number was not.
To fix the problem, I centralized all data to go through one
data manager, whereas before I was reinitializing a different data
component in each component.
So now, I'm basically calling
parentApplication.dataManager.someFunction() from all of my
components. This isn't good quite frankly, but by doing so, the
@123456 is always the same.
If anyone else can think of a better way, I'm all
ears...

Similar Messages

  • I recently updated to the newest version of Flash (17.0.0.134) and I have a MacBook Air, running OSX. Ever since the update I can no longer select drop down menus or get Netflix to run properly. Has anyone else had this issue/know how to resolve it?

    I recently updated to the newest version of Flash (17.0.0.134) and I have a MacBook Air, running OS X and I have Safari version 8.0.4.  Ever since the update I can no longer select drop down menus or get Netflix to run properly. Has anyone else had this issue/know how to resolve it?

    1. System Preferences > Flash Player > Advanced > Delete All
        Press “Delete All” button under “Browsing Data and Settings”.
    2. Install Adobe Flash Player.
        System Preferences > Flash Player > Updates
        Press the “Check Now” button.
        http://get.adobe.com/flashplayer/
        Download it and quit Safari from Safari menu in the menu bar.
        Follow the prompts to install Adobe Flash Player.

  • I purchased a MyBook Studio 4gb external hard drive.  I can't get it to work properly.  WD have assessed it and say its fine and that the problem is with Apple?

    I purchased a MyBook Studio 4gb external hard drive.  I can't get it to work properly.  WD have assessed it and say its fine and that the problem is with Apple?  Any ideas?

    Hello EucaBlue!
    So in Disk Utility, with the external harddrive selected, go to the Partition tab, and then under "Partition Layout:" select 1 Partition.
    After than, verify that it is formatting the drive as "Mac OS Extended (Journaled) under "Partition Information"
    Also verify that it's using using the GUID Partition Map under the Options button at the lower left of this window.
    Then click apply and confirm that you want to format the drive. It will ask you if you're sure, and probably for an Administrator password.
    Once your harddrive is formatted properly, you should be able to use Time Machine, or any other Mac backup software.
    Happy tinkering!
    Paul

  • Pressing "shuffle" on my 7th gen Nano will only randomly pick the first song, then repeats it over and over. How do I get "shuffle to work properly?

    Pressing "shuffle" on my 7th gen Nano will only randomly pick the first song, then repeats it over and over. How do I get "shuffle to work properly?

    Is "REPEAT ONE" highlighted. If it is, touch it to de-select. Cheers!

  • Clicking on the dashboard icon opens up the dashboard briefly, and then it opens up Scrabble in Chrome. How do I get it to operate properly?

    Clicking on the dashboard icon opens up the dashboard briefly, and then it opens up Scrabble in Chrome. How do I get it to operate properly?

    Back up all data.
    In the Finder, hold down the option key and select
    Go ▹ Library
    from the menu bar. From the Library folder, move the following item to the Trash, if it exists:
    Caches/com.apple.dashboard.client
    and move the following items to the Desktop:
    Preferences/com.apple.dashboard.client.plist
    Preferences/com.apple.dashboard.plist
    Log out, log back in, and test. If you still have the issue, put the items on the Desktop back where they came from and post again. Otherwise, delete the items.

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • How can I get a drop-down list selection also be selected in another field with the same list but a different name?

    I have a street address and a billing address. A question is posed with a checkbox — "Is the billing address the same as the street address?" If Yes is checked, the street address automatically fills the billing fields. If No is checked, the user must fill in new information. In both the street address and billing addres, the State field is a drop-down list. How can I get the drop-down list selection in the street address State also be selected in drop-down list for the billing address State?

    Has anyone done this?

  • A problem to get the value of a selected cell

    Hi all,
    I am trying to get the value of a cell in JTable. The problem that I have is ListSelectionListener only listens if the selection changes(valueChanged method).
    It means that if I select apple then rum, only rowSelectionModel is triggered, which means I do not get the index of the column from selectionModel of ColumnModel.
    apple orange plum
    rum sky blue
    This is a piece of code from JTable tutorial that I modified by adding
    selRow and selCol variables to keep track of the location so that I can get the value of the selected cell.
    Thank you.
    if (ALLOW_ROW_SELECTION) { // true by default
    ListSelectionModel rowSM = table.getSelectionModel();
    rowSM.addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting()) return;
    ListSelectionModel lsm = (ListSelectionModel)e.getSource();
    if (lsm.isSelectionEmpty()) {
    System.out.println("No rows are selected.");
    } else {
    int selectedRow = lsm.getMinSelectionIndex();
    selRow = selectedRow;
    System.out.println("Row " + selectedRow + " is now selected.");
    else {
    table.setRowSelectionAllowed(false);
    if (ALLOW_COLUMN_SELECTION) { // false by default
    if (ALLOW_ROW_SELECTION) {
    table.setCellSelectionEnabled(true);
    table.setColumnSelectionAllowed(true);
    ListSelectionModel colSM = table.getColumnModel().getSelectionModel();
    colSM.addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
    //Ignore extra messages.
    if (e.getValueIsAdjusting()) return;
    ListSelectionModel lsm = (ListSelectionModel)e.getSource();
    if (lsm.isSelectionEmpty()) {
    System.out.println("No columns are selected.");
    } else {
    int selectedCol = lsm.getMinSelectionIndex();
    selCol = selectedCol;
    System.out.println("Column " + selCol + " is now selected.");
    System.out.println("Row " + selRow + " is now selected.");
    javax.swing.table.TableModel model = table.getModel();
    // I get the value here
    System.out.println("Value: "+model.getValueAt(selRow,selCol));
    }

    maybe you can try with :
    table.getSelectedColumn()
    table.getSelectedRow()
    :)

  • How to get the position of a selected cell in a table ?

    Hi,
    How can I get the position of a selected cell in a table or in a list multicolumn cmd ?
    Thanks.

    Invoke node >>> point to Row Column
    Ben
    Message Edited by Ben on 07-19-2007 03:14 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Point_To_Row_Column.PNG ‏22 KB

  • Getting an error in this select

    Hi,
    i am getting an error on this select
    select add_months(to_date('31-MAR-'||'to_char(to_date('31-MAR-2011')','YYYY'))-12) from dual
    Kindly help !!!

    Your format-codes are wrong and sometimes missing.
    Please try this:
    select add_months(to_date('31-MAR-'||to_char(  to_date('31-MAR-2011','DD-MON-YYYY'),'YYYY'),'DD-MON-YYYY'),-12) from dual;I did correct it, but it is not nice code. Why do you use the same constant value (31-MAR) twice? The second is only for extracting the year. You could do the same with this:
    select add_months(to_date('31-MAR-2011','DD-MON-YYYY'),-12) from dual;Keep in mind: There is a dependency of the setting of NLS_DATE_LANGUAGE in this code. NLS_DATE_LANGUAGE should be english for you code.
    For example if NLS_DATE_LANGUAGE is GERMAN the code for march will be 'MRZ' instead of 'MAR'.
    The following code would be language independent:
    select add_months(to_date('31-03-2011','DD-MM-YYYY'),-12) from dual;Edited by: hm on 11.09.2011 22:51

  • Indesign CS3: How to get the UID of the selected object?

    Hello,
    How can I get the UID of the selected object in an document?
    Thanks,
    Alois Blaimer

    Hello!
    I do not get it. Please give me some more hints.
    I only want to know if the selected object is a square and then the UID of the selected square.
    Thanks,
    Alois Blaimer

  • TS4009 I have followed the steps above but when I get to the screen to select a downgraded option, the  Done button is grayed out and won't let me select a new option. I see a lock up in top right-hand corner, but not sure how to unlock it.

    I have followed the steps above for downgrading iCloud storage options, but when I get to the screen to select a downgraded option, the  Done button is grayed out and won't let me select a new option. I see a lock in top right-hand corner, but not sure where to go to unlock it.

    Choose Apple () menu > System Preferences, then click the iCloud icon.
    Click the Manage button.
    Click Change Storage Plan.
    Click Downgrade Options.
    Enter your Apple ID password, then click Manage.
    Choose your current plan, then click Done.
    (from http://support.apple.com/kb/HT5527 )

  • The genius bar sold me a LaCie 500 GB EHD today but I can't get it to work properly.  Can I schedule another genius bar appt. to help me with this issue even though the EHD is not an Apple product?

    The genius bar sold me a LaCie 500 GB EHD today but I can't get it to work properly.  Can I schedule another genius bar appt. to help me with this issue even though the EHD is not an Apple product?

    Yes, if you purchased it in an Apple store, they should be able to assist you.  Bring your MBP with you as well as the Drive.
    Ciao.

  • IMovie wii no longer share with iDVD.  I just upgraded to Yosemite 10.10.2 and now I can't get iDVD to work properly.  Any thoughts?

    iMovie wii no longer share with iDVD.  I just upgraded to Yosemite 10.10.2 and now I can't get iDVD to work properly.  Any thoughts?  This is what comes up.....

    iDVD does work with Yosemite although, as Kappy pointed out unsupported for 2 years, so try this basic troubleshooting fix:
    1 - delete the IDVD preference file, com.apple.iDVD.plist, that resides in your
    User/Home/Library/Preferences folder.
    2 - delete the contents of IDVD'S cache folder: User/Home/Library/Caches/com.apple.iDVD.
    3 - launch IDVD and try again.
    NOTE: In Lion and Mountain Lion the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and press the Return key - 10.7: Un-hide the User Library folder.
    If you're running Mavericks or Yosemite go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    If iDVD crashes again post the first 50 lines of the crash report.  Don't post a screenshot but copy and paste the actual text.
    To get a movie from iMovie to iDVD it should be exported out of iMovie as 480p and added manually to iDVD.

  • I can't get iTunes to work properly on Windows 8

    I can't get iTunes to work properly on Windows 8. I tried everything and iTunes is NOT compatible with Windows 8. There is either an iTunes issue or a Microsoft issue.

    I finally got it to work right. Some files and folders (iTunes video files, etc) were referenced to my iTunes account, I copied from my backup (external) Hard Drive to my system Hard Drive. The only thing that can keep me from accessing my wish list for some time is a very heavy Internet traffic via iTunes players to iTunes Store. So everything is now NORMAL.

Maybe you are looking for

  • Creating a new site

    Whats going on with creating a new site using Dreamweaver CS4?  When I create a new site and select the 'Local Root Folder' & 'Default images folder' I always have to go up one folder level. For example if my site was located here 'C:\Users\Me\Docume

  • How to block maintenance order from releasing if cost is high

    Hi Experts If cost of maintenance order is more than Rs.100000(e.g); it should not release and if less than this value then it can be released. Plz help me can i do this in SAP PM and how ? Regards Pooja

  • Financial Reporting 9.1.3 - Modifying Email Body text of cmd line scheduled

    I would like to add text to the body of the command line scheduled email that is sent out using Financial Reporting. Ideally I would like to suppress the text that is automatically added to the body of the email by Financial Reporting as well. I have

  • SSID with preshared key + ISE

    Hi, We have recently implemented Wifi at out site. we have Cisco 3502 AP's, 2504-WLC and the latest cisco ISE. I understand that in ISE deployment, we cant have a preshared key (password or key) for the SSID as ISE will take over the authentication.

  • Absorption&Variable(Direct)method Costing, are possible both method on SAP?

    Hello my dear Gurus: In our actual project; we are trying to include on SAP the Absorption and Variable (Direct) costing methods; this of course within the Controlling modules (Product costing (actual costing), CCA, IO's, etc.) In order to comply wit