Maybe you should attach code, at this point.

-- Curt

At 11:12 AM 8/13/99 -0700, Bhaskara Reddy wrote:

>Hi,
>I tried to move if-then logic (see below) to the onWebEvent() of the 
>'recalculate'.
>         It did not make any difference. I also moved this whole code to 
> another page onBeforeDisplayEvent()
>         in which I got the 'cart' page and then obtained the repeated and 
> then 'quantity'
>         value. It still says 'It is NOT a vector' and that single value 
> is always a null
>         value. Suspecting that href may not be submitting the form 
> values, I converted href
>         to a button. It still did not work. I am setting the initial 
> values for the repeated
>         'quantity' text box. I do not know if this makes any difference 
> (I created a test
>         cart page and a refreshed cart page. I did not set initial values 
> for the text box.
>         I did not add any other repeated elements. It now says 'It is a 
> vector'. If set initial
>         value or if I add any other repeated elements it says 'It is NOT 
> a vector').
>Please suggest any thing! I will try it. I am getting desperate to solve 
>this before next week.
>Thanks,
>-Bhaskara Reddy.
>
>Curt Springer <[EMAIL PROTECTED]> wrote:
> >Just a guess:
> >
> >You're executing 'getValue' _after_ page-level 'display' processing has
> >begun.  It is variable, but, by default, page fields are cleared before
> >page-level 'display' processing begins.
> >
> >You might want to try executing 'getValue' as part of the event method that
> >executes when your 'recalculate' button is clicked, and put the results
> >into an instance variable for later use during 'display' processing.
> >
> >-- Curt Springer, Team ND
> >
> >
> >At 12:53 PM 8/12/99 -0700, Bhaskara Reddy wrote:
> >
> >>Hi,
> >>
> >>I have a repeated called "rptCartItems" and a text box under that called
> >>"tbQuantity".
> >>         The user enters the quantity in those text boxes and clicks on an
> >> href called "recalculate"
> >>         which should display the same page with updated cart information.
> >>In this_onBeforeDisplayEvent(...) I check if user has clicked on
> >>"recalculate" and use the following generic if then logic:
> >>    CSpValue tbValue = getDisplayFieldValue("*tbQuantity");
> >>    if (tbValue instanceof CSpVector)
> >>    {
> >>       // It is a vector
> >>    }
> >>    else
> >>    {
> >>       // It is NOT a vector
> >>    }
> >>It always goes into "It is NOT a vector" (else part).
> >>
> >>Why is this happening? Can anyone please help me?
> >>
> >>Thanks in advance,
> >>Bhaskara Reddy.
> >>----------------------------------------
> >>
> >>The following code is in this_OnBeforeDisplayEvent(...) of the page where
> >>I check if a page
> >>session object is set (when "update cart" button is clicked this page
> >>session object is
> >>set and the same page is reloaded).
> >>
> >>--------------------------------------------
> >>Code:
> >>         CSpTextBox tbQuantity = (CSpTextBox)getDisplayField 
> ("*tbQuantity");
> >>         CSpValue tbValue =
> >>tbQuantity.getValue ();
> >>         if (tbValue instanceof CSpVector)       {
> >>                 // There are multiple row values in this display field
> >>                 umCartContents cart =
> >> (umCartContents)CSpider.getUserSessionObject("US_SHOPPING_CART");
> >>                 CSpVector tbValueVector = (CSpVector) tbValue;
> >>                 for (int i = 0; i < tbValueVector.size (); i++)         {
> >>                         CSpInteger currRowValue =
> >> (CSpInteger)tbValueVector.get (i);
> >>                         umCartItem item = cart.getCartItem(i);
> >>                         item.setQuantity(currRowValue.intValue());
> > >       }
> >                 CSpider.removeUserSessionObject("US_SHOPPING_CART");
> >>                 CSpider.putUserSessionObject("US_SHOPPING_CART", cart);
> >> }       else    {
> >>                 CSpInteger val = null;          if (tbValue != null)
> >>                         val = new CSpInteger(tbValue.intValue());
> >>--------------------------------
> >>
> >>Thanks,
> >>-BhaskaraReddy
> >>_________________________________________________________________________
> >>
> >>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]

_________________________________________________________________________

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