Hi everyone,

I'm having trouble with the folowing bit of code. It's in the
onBeforeDisplayEvent of my page. The combo box is filled and displays properly.
The only problem is that the row I expect to be selected is not being selected
in my HTML page. I know that the if clause is getting executed based on entries
in my Log file. Is there something quirky about the CSpSelectableGroup.select()
function that I am missing? Is onBeforeDisplayEvent the wrong place to use it?

I'm in ND5 on NT4.

Thanks in advance,
Beth



// result is a previously defined CSpDBResultTable
// combo is a previously defined CSpComboBox
// _iCurrEntity is a previously defined int

// Loop through our result cursor and fill our combo box.
for (int i = 0; i < result.getNumOfRows(); i++)
{
     combo.addSelectable(i, result.getRowData(i,1).toString(), new
CSpInteger((result.getRowData(i,0)).intValue()));

     // Make sure the proper item in the list is selected.
     CSpLog.send(this, CSpLog.USER_DEBUG, new
String("prjAD3.pagMFS.onBeforeDisplayEvent() : i = " + i + ",
result.getRowData(i,0).intValue() = " + result.getRowData(i,0).intValue() + ",
_iCurrEntity = " + _iCurrEntity));
     if (result.getRowData(i,0).intValue() == _iCurrEntity)
     {
          CSpLog.send(this, CSpLog.USER_DEBUG, new
String("prjAD3.pagMFS.onBeforeDisplayEvent() : Match Found!"));
          combo.select(i);
     }
}



-------------------------------------------------------------------------
Beth Elicia Finn                              Competitive Media Reporting
Applications Developer                              1385 Enterprise Drive
[EMAIL PROTECTED]                                      West Chester, PA 19380
http://www.cmr.com/                                        (610) 430-6404


_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to