No, you have exclusive access to all objects in the project graph during
the entire web event. I always say "from the time the browser sends a
request until all the html has been produced" to distinguish the span of
the web event, which can cover multiple pages and methods, from a single
method like "btSubmit_onWebEvent", which is also sometimes called a "web
event". Maybe a better way to put it would be to say that the web event
ends at the end of all display processing.
-- Curt Springer, Team ND
At 02:25 PM 10/18/99 -0700, Teplitsky, Alexander wrote:
>Does it all mean that I need to populate fields on Page2 _before_ loading
>it, since if I do it after it's been loaded iVector may be modified by
>someone else (losing exclusive access after html for page2 generated, hence
>can't rely on iVector anymore)?
>
>Thanks for your replies !
>
>Alex
>
> > //instance variable
> > private CSpPage _page2;
> >
> > //in this_onAfterInitEvent
> > _page2 = CSpider.getPage("Page2");
> >
> > //submit button event
> > btSubmit_onWebEvent () {
> > _page2.iVector = theCSpVectorIGotFromRepeated;
> // set display field, then load _page2 ????
> _page2.setDisplayFieldValue("TBFirstName", _page2.iVector.get(0));
> > _page2.load();
> > }
> >
> >
> > ----------
> > From: Curt Springer[SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, October 18, 1999 2:05 PM
> > To: Teplitsky, Alexander
> > Cc: 'NetDynamics Developers forum'; 'Aby Mathew'
> > Subject: Re: [ND] Passing data to the next page
> >
> > During the life of a web event (from the time a request is passed from a
> > browser to ND, to the time ND finishes sending html, regardless of how
> > many
> > pages are loaded in the mean time), a session has _exclusive_ access to
> > all
> > of the objects in a project graph, which basically is a set of one each of
> >
> > all of the data objects, pages, data sources, etc., in a project.
> >
> > Further, whenever you call CSpider.getPage, getDataObject, etc., you will
> > get an object in the same project graph that you have exclusive access to.
> >
> > It works the same way for object initialization, a reference by one object
> >
> > to another via CSpider will always yield the object in the same graph.
> >
> > Thus, this would also work, and be marginally more efficient at runtime:
> >
> > //instance variable
> > private CSpPage _page2;
> >
> > //in this_onAfterInitEvent
> > _page2 = CSpider.getPage("Page2");
> >
> > //submit button event
> > btSubmit_onWebEvent () {
> > _page2.iVector = theCSpVectorIGotFromRepeated;
> > _page2.load();
> > }
> >
> > -- Curt Springer, Team ND
> >
> >
> >
> >
> > At 01:48 PM 10/18/99 -0700, Teplitsky, Alexander wrote:
> > >Aby,
> > >
> > >Thanks for your reply. But is it safe to use instance variable in Page 2
> > ?
> > >Its value may be changed by a concurrent user since all sessions use the
> > >same instance of CSpPage.
> > >
> > >Does anyone have any comments ?
> > >
> > >Thanks !
> > >Alex
> > >
> > > > ----------
> > > > From: Aby Mathew[SMTP:[EMAIL PROTECTED]]
> > > > Sent: Monday, October 18, 1999 11:46 AM
> > > > To: Teplitsky, Alexander; 'NetDynamics Developers forum'
> > > > Subject: Re: [ND] Passing data to the next page
> > > >
> > > > You don't need UserSessionObjects to pass data from one page to
> > another
> > > > with
> > > > the same *web event* -the entire sequence of events that happen
> > between an
> > > > http request and the reply.
> > > > You can have an instance variable in Page2 and set it from page1
> > before
> > > > loading page1.
> > > >
> > > > I mean, the following the code absolutely safe:
> > > > ==============================
> > > > on Page1 ->
> > > > btSubmit_onWebEvent () {
> > > > Page2 page2 = (Page2) CSpider.getPage("Page2");
> > > > page2.iVector = theCSpVectorIGotFromRepeated;
> > > > page2.load();
> > > > }
> > > > ==============================
> > > > I believe instance variables are much 'cheaper' than
> > UserSessionObjects.
> > > >
> > > > Aby
> > > >
> > > > -----Original Message-----
> > > > From: Teplitsky, Alexander [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, October 15, 1999 5:52 PM
> > > > To: 'NetDynamics Developers forum'
> > > > Subject: [ND] Passing data to the next page
> > > >
> > > >
> > > > On my ND page (pg1) I have one textbox outside of repeated (let's call
> > it
> > > > TB1) and one (TB2) inside the repeated (rpt1).
> > > > I am trying to pass data from those textboxes and store it in the
> > hidden
> > > > fields on the next page (pg2).
> > > >
> > > > Page pg2 has hidden HD1 where the value of pg1.TB1 will be stored.
> > This is
> > > > easy to do with ND wizard.
> > > >
> > > > Page pg2 also has repeated (rpt1) with hidden HD2 in it. HD2 should
> > have
> > > > values from pg1.rpt1.HD2. ND wizard doesn't let me to
> > > > send all values HD2[0] ... HD2[n] to the destination page. I know that
> > I
> > > > can
> > > > save the values in the repeated in CSpVector and pass it using
> > > > putUserSessionObject("vector"). However I am not sure that this would
> > be
> > > > the
> > > > best solution because CSpVector may be to big for ND's session to
> > handle.
> > > >
> > > > My questions are
> > > > 1) Is there some other way to do this ?
> > > > 2) Is there a limit on the size of data that can be passed ?
> > > > 3) Does removeUserSessionObject() reclaim some space for use ?
> > > >
> > > > Thanks,
> > > >
> > > > Alex
> > > >
> > _________________________________________________________________________
> > > >
> > > > 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]
> >
_________________________________________________________________________
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]