Strictly speaking the cspvalue shouldn't be null. But rarely, the handler
obtained
by the getSelected() fn. returns null. It's better to check for null before
proceeding further.
i.e
CSpComboBox cbBox = (CSpComboBox)
getDisplayField("cmbUserClassCodes");
CSpListItem currSlected = (CSpListItem) cbBox.getSelected();
if(currSelected != null)
{
CSpString .......
}
bye,
Prasad
> -----Original Message-----
> From: Beaudreau, Marilyn [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, May 11, 1999 3:17 PM
> To: '[EMAIL PROTECTED]'
> Subject: [ND] CSpValue causing an intermittant problem?
>
> Is there any reason why the following command should not work in NDV4? I
> seem to have an intermittant problem in this area of the code and I'm
> wondering if the CSpValue could be the cultrit. Since a classcode is
> autopopulated the selectedValue should never be null...
>
> thx,
> - marilyn
>
>
> CSpComboBox cbBox = (CSpComboBox) getDisplayField("cmbUserClassCodes");
> CSpListItem currSlected = (CSpListItem) cbBox.getSelected();
>
> CSpSting selectedLabel = new CSpString( currentSelected.getLabel())
> CSpValue selectedValue = currSelected.getValue();
>
> CSpider.putUserSessionObject(Sobj.pgMainPartAss_ClassCode, selectedValue);
>
> _________________________________________________________________________
>
> 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]
_________________________________________________________________________
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]