repeated_onBeforeRowDisplayEvent is too early to try getDispalyFieldValue(). The event order is somethig like this: 1. repeated_onBeforeDisplay() [[ 2. repeated_onBeforerRowDisplay() 3. txtAxle_onBeforeDisplay() ]] repeated as many times as there are rows, minimum once. Only * after step 3* the DisplayField gets the current value and getDisplayFieldValue will return the correct stuff. (Before that it will return the values for the previous row or in the case of the first row, the value left by the previous web hit). Now, by this time it may be too late to do something graceful, the '<TR><TD>..' would have gone to the pipe. I would recommend looking at the dataObject's CSpDBResult directly and do the appropriate thing in repeated_onBeforeDisplay(). Aby TeamND > -----Original Message----- > From: Mick Davis [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 22, 2000 6:13 AM > To: [EMAIL PROTECTED] > Subject: [ND] Re: Getting value of textfields in onBeforeRowDisplay > > > > Sorry I forgot to mention this, yes I did try that. It > resulted in a null. > > Mick > > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > >have you tried getting the specific field vs > >the "*deep search" > > > >CSpRepeated rep = (CSpRepeated) event.getSource(); > >CSpValue axleNum = rep.getDisplayFieldValue("txtAxle"); > > > >//check the length of the stringified CSpValue at this point... > > > >-Chip > >Team NetDynamics > > > >"Mick Davis" <[EMAIL PROTECTED]> wrote: > >> > >>I'm sorry if this has been posted before but I cannot find > the answer to this problem > >>in the existing messages... > >> > >> > >>I have a repeated that has fields that are bound to a > dataobject. When the dataobject > >>select executes and no rows are retrieved I am getting a > blank row in the HTML. This > >>behavior is explained in the documentation. However when I > try to get the value of the > >>textfields in the onBeforeRowDisplay to skip the display of > the row I am getting > >>results that I do not understand. I'm also using this > event to gather information used > >>to calculate a value for a statictext that is displayed on > the same row. > >> > >>For the first row of the repeated my results are always > blank. Not NULL, but blank. > >>Am I doing something wrong here. Below is a snippet of > code showing what I'm doing, > >>The commented out code shows what I'm trying to accomplish > when the row is truly > >>blank. > >> > >>If anyone could help out with a code sample that works I > would greatly appreciate it. > >>I've been messing with this off and on for the past week > and it's really irritating me. > >> > >>Thanks! > >> > >>Mick Davis > >> > >> public int > rptWeight_onBeforeRowDisplayEvent(CSpDataDrivenVisualEvent event) > >> { > >> CSpValue axleNum = getDisplayFieldValue("*txtAxle"); > >> if (axleNum instanceof CSpNull) > >> { > >> if (CUtil.DEBUGSTAT) CUtil.debug("Axle > num is null."); > >> } else > >> { > >>// if (axleNum.stringValue().length() == 0) > >>// { > >>// return(SKIP); > >>// } > >> if (CUtil.DEBUGSTAT) CUtil.debug("Axle > Num: " + axleNum.stringValue()); > >> } > >> > >> > >> float PAL, vlw, nt, mw, vw; > >> int mac; > >> CSpFloat n; > >> CSpString s; > >> CSpValue v; > >> CSpValue axleKey = getDisplayFieldValue("*txtAxle"); > >> if (axleKey instanceof CSpNull) > >> { > >> return(SKIP); > >> } else > >> // Calculate Pneumatic Axle Limit: > >> // PAL = veh_and_load_weight div > num_tires div mfg_width > >> > >> vlw = 0; > >> try // ***** > AXLE_VEH_LOAD_WGHT_LB ***** > >> { > >> v = > getDisplayFieldValue("*txtTotalWeight"); > >> if (CUtil.DEBUGSTAT) > CUtil.debug("Total Weight = " + v.stringValue()); > >> if (!(v instanceof CSpNull)) > >> { vlw = v.floatValue(); } > >> } catch (Exception e2) > >> { > >> vlw = 0; > >> if (CUtil.DEBUGSTAT) > CUtil.debug("vlw: Exception = " + e2); > >> } > >> > >> nt = 0; > >> try // ***** > AXLE_NUMBER_OF_TIRES ***** > >> { > >> v = > getDisplayFieldValue("*txtNumTires"); > >> if (CUtil.DEBUGSTAT) > CUtil.debug("Num Tires = " + v.stringValue()); > >> if (!(v instanceof CSpNull)) > >> { nt = v.floatValue(); } > >> > > > > > ______________________________________________________________ > ___________ > To unsubscribe from this mailing list please send an email to: > [EMAIL PROTECTED] > Please remember to use the same email address you subscribed with. > > 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] _________________________________________________________________________ To unsubscribe from this mailing list please send an email to: [EMAIL PROTECTED] Please remember to use the same email address you subscribed with. 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]
