I've corrected my email address. Sorry about that.

Cleaned up code and removed references to set rows. I also added another text box 
outside
of the repeated to make sure data I keyed stayed on the page. 

Results with display(false) = keyed data in repeated and in test text box. Page 
reloaded with
all fields blank.

Results with load("page",false) = keyed data in repeated and in test box. Page 
reloaded with
garbage in repeated but data in test text box remained.

Curt Springer <[EMAIL PROTECTED]> wrote:
>Let's try for a baseline first.  Can you simply redisplay the rows that >were sent 
>back, before taking on trying to add empty rows:
>
>1.  This shouldn't make any difference, but best to simplify and eliminate 
>noise:
>     It's not necessary to get a reference to the page in order to execute 
>display().
>
>         You could replace the last 2 lines of the button web event (before 
>'return') with just:
>                 display(false);
>
>2.  Comment out 'setCurrNumRows' and 'setMaxDisplayRows'
>
>BTW, if you are posting this via a newsreader, check your configuration.  I 
>got your post through the email list, and the reply-to had a dash (-) in 
>"frito-lay".
>
>-- Curt
>
>
>At 11:15 AM 7/29/99 -0700, David Stanwick wrote:
>
>>I have a repeated with 4 text boxes and initially defined with 5 rows. I 
>>also have a
>>"Custom" button that does the following:
>>         public int btAddLines_onWebEvent(CSpWebEvent event)
>>         {
>>                 CSpCommonRepeated rList = getCommonRepeated("*Repeated1");
>>
>>                 int newMaxRows = rList.getMaxDisplayRows() + iAddLines;
>>
>>                 String sCurrGrandTotal = 
>> getDisplayFieldValue("tbGrandTotal").toString();
>>
>>                 CSpider.putUserSessionObject("usMaxRows",new 
>> CSpInteger(newMaxRows));
>>                 CSpider.putUserSessionObject("usGrandTotal",new 
>> CSpString(sCurrGrandTotal));
>>
>>//              int command = load("pgCreateInventoryTotalNoPrefill",false);
>>                 CSpPage reloadPage = 
>> CSpider.getPage("pgCreateInventoryTotalNoPrefill");
>>                 int command = reloadPage.display(false);
>>
>>                 return(PROCEED);
>>         }
>>
>>I also have the following defined to set the max rows in the pages 
>>onDisplayEvent:
>>         public int this_onBeforeDisplayEvent(CSpDisplayEvent event)
>>         {
>>                 int iCurrMaxRows = 5;
>>
>>                 CSpCommonRepeated rList = getCommonRepeated("*Repeated1");
>>
>>                 try
>>                 {
>>                         iCurrMaxRows = 
>> CSpider.getUserSessionObject("usMaxRows").intValue();
>>                 }
>>                 catch (NullPointerException ex)
>>                 {
>>                 }
>>
>>                 rList.setCurrNumOfRows(iCurrMaxRows);
>>                 rList.setMaxDisplayRows(iCurrMaxRows);
>>
>>                 return (PROCEED);
>>         }
>>
>>The page redisplays with the new row count but the previously entered data 
>>is gone.
>>I hope this helps.
>>
>>
>>Curt Springer <[EMAIL PROTECTED]> wrote:
>> >OK, now give us code snippets or otherwise tell us how you are getting 
>> the >extra rows to display.  Normally display(false) will preserve the user
>> >input, even with the 'repeated' construct.
>> >
>> >-- Curt Springer, Team ND
>> >
>> >At 08:49 AM 7/29/99 -0700, David Stanwick wrote:
>> >
>> >>I tried the display(false) and that got rid of the garbage. I'm still
>> >>losing the user input
>> >>though. One note: I mistakenly posted this to ND3. I'm actually running
>> >>ND4. My
>> >>mistake.
>> >>DS
>> >>
>> >>Curt Springer <[EMAIL PROTECTED]> wrote:
>> >> >You want to call display(false), not load(false).>
>> >> >I presume you already have some way of knowing how many lines you started
>> >> >with.  You will probably need to add some onbeforerowdisplayevent
>> >> >processing to blank out the new rows.
>> >> >
>> >> >-- Curt Springer, Team ND
>> >> >
>> >> >
>> >> >At 07:34 AM 7/29/99 -0700, David Stanwick wrote:
>> >> >
>> >> >>I have a repeated on a page that I use for user input. I've defined a
>> >> >>button that allows
>> >> >>the user to generate additional blank lines in the repeated for more 
>> input.
>> >> >>
>> >> >>Within the button code, I call load("page",false) which I understand 
>> loads
>> >> >>the page without
>> >> >>refreshing the values.
>> >> >>
>> >> >>When the page is reloaded, all of the repeated fields have garbage in
>> >> >>them. I want to
>> >> >>preserve what the user entered before pushing the button. The only
>> >> >>workaround I've
>> >> >>come up with is to save the values entered into a vector, store that 
>> as a
>> >> >>user session
>> >> >>object, and then reload the repeated when the page is redisplayed 
>> but this
>> >> >>seems to
>> >> >>be a lot of work to keep the data.
>> >> >>
>> >> >>Any ideas?
>> >> >>_____________________________________________________________________ 
>> ____
>> >> >>
>> >> >>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]
>

_________________________________________________________________________

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