Thanks for the help.
The solution from Ricardo and Peter was along the lines of:
When i'm going to read a CSpRepeated, i got a CSpVector that contains the values of oll
repeated.
Example:
CSpVector vProvincias = (CSpVector)getDisplayFieldValue("*txtXXXProvincia");
CSpVector vComarcas = (CSpVector)getDisplayFieldValue("*txtXXXComarca");
int intElementos = vProvincias.size();
for (int intcontador = 0; intContador < intElementos ; intContador++){
.
.
.
}
This works great until, in my app, I had a
repeating group with only one row.
Based on Martin Wells' suggestion of using getValue(),
I put together the following:
// read and save the city/state column info
v_location.clear();
try
{ v_location = (CSpVector) getDisplayFieldValue("*tbCityState");
}
catch(Exception ex)
{ // if only one value
CSpTextBox tbCityState = (CSpTextBox) getDisplayField("*tbCityState");
v_location.put(tbCityState.getValue());
}
CSpider.putUserSessionObject("svLocationVector",v_location);
The try block will handle things if there are
multiple rows, the catch if there is only one.
If you just use the catch block on a group where
there are multiple rows, the contents of each
row seem to get concatenated and put in the first
element of the vector.
"Ron Schiller" <[EMAIL PROTECTED]> wrote:
>>Trying to read data the user may input >in a text box after a button press. Trying
to use the code below:>>CSpRepeated rgItineraryGrid = > (CSpRepeated)
getCommonRepeated("rgItineraryGrid");>
rgItineraryGrid.goToFirst();> >try>{ CSpTextBox tbCityState
= > (CSpTextBox)
rgItineraryGrid.getDisplayField("*tbCityState");> CSpHtml.sendMessage("
The first
tbCityState of rgItineraryGrid = " + >
getDisplayFieldValue("tbCityState") + "<br>");>}>catch(NullPointerException
ex)>{ CSpHtml.sendMessage(" The getDisplayField returned an exception" +
"<br>");>}>>The
output doesn't indicate a null but>simply outputs a blank. Any help would>be
greatly
appreciated. Thanks.
_________________________________________________________________________
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]