It is inefficient to call doAction which will generate html to re-display
the current page, then toss away that html.

Use the high-level executeAllInsertingDataObjects, if you don't want to
dispense with all the pointy-clicky stuff, then if the insert works, just
load the next page.

-- Curt Springer, Team ND


At 02:34 PM 5/28/99 -0500, Shamdasani Nimmi-ANS004 wrote:
>Asaf:
>
>No you don't change any of the functionality of your built-in insert button
>across the project. You only change it for this page  by modifying the web
>event of the button in the java file of the page.
>
>
>The default code of the insert button is following:
>
>       public int Insert_onWebEvent(CSpWebEvent event)
>       {
>               int command = PROCEED;
>               command = doAction(event);
>               return(command);
>       }
>
>where all the insert action is performed in 2nd line. 
>
>
>You modify it to:
>
>       public int Insert_onWebEvent(CSpWebEvent event)
>       {
>               int command = PROCEED;
>               command = doAction(event);
>               if (command == PROCEED) {
>                       CSpHtml.reset();
>                       return(load("nextpage"));
>
>               }
>               return(command);
>       }
>All you are doing is modifying what happens after the insert is done
>successfully. In the normal insert once the record is added the same page is
>loaded again with clear fields. When you add the extra code you tell ND to
>flush out that page and instead load the page you want.
>
>Hope this makes it clear.
>
>-Nimmi
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Friday, May 28, 1999 2:42 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [ND] Button using "Built-in Insert". How do I control what
>
>
>
>Thanks for your help.  I think you pointed me in the right direction, but I
>still don't understand.
>
>Question 1: Does what you suggest doing change the behavior of the built-in
>insert
>       action accross the project.  So that anytime I use the built-in
>insert it will behave
>       the way I defined it, or is it only applied to the current page.
>
>Question 2: That code that you qouted... where does it go?  Do I override
>the doAction() method of the page with the code you qouted, or do I put it
>somewhere else.  Where?
>
>I looked at the documentation... I think the docs are good (even though
>there are
>       errors in the example code many times), but finding where what you
>are looking for
>       is explained is extremely difficult.
>
>More of your help is appreciated,
>
>- Asaf :)
>_________________________________________________________________________
>
>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