Well, yes, we could talk about how ND _should_ do things. But the question
is what do they _actually_ do, and is it at variance with their documentation.
-- Curt
At 06:21 AM 5/24/99 -0800, [EMAIL PROTECTED] wrote:
>
>Curt,
>
>I think 'dynamic criteria of a DO beiing sessionized as user session
object' makes more sense. Let's consider a simple case- a page having a
list box populated by a DO whose dyn. criteria
>is set during onBeforeDisplay event of the page. Now if dyn.
>criteria were not to be sessionized & let's say some other user
>changed the it right after the display of my page and 2 min.
>later I refreshed my page, the contents of the list box would
>change and that wouldn't be very nice of ND.
>
>Hope this makes sense
>
>Vishal
>
>Curt Springer <[EMAIL PROTECTED]> wrote:
>>Well, now I'm confused.
>>
>>The below was always my understanding. Then, the last time that Team ND
>>got together, back in February, I mentioned this to Brendan, who thought
>>otherwise. He whipped up a little test project that seemed to prove this
>>wrong. At that point, I figured that my reliance on so-called sessioning
>>was where I was setting criteria in a DO in a button or href event method,
>>and then executing it after loading another page, but in the same web
>>event. Stuff in the same web event doesn't really use sessioning, even if
>>your use put/get(Any)UserSessionObject (as discussed in another thread, or
>>is it this one, can't keep track).
>>
>>OK, I will have to do my own test project, and report the results.
>>
>>-- Curt Springer, Team ND
>>
>>At 03:09 PM 5/21/99 -0500, Shamdasani Nimmi-ANS004 wrote:
>>>Aby,
>>>
>>>Is this what you are looking for?
>>>
>>>-Nimmi
>>>
>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> =20
>>>Class spider.database.$Package_Description$
>>>
>>>
>>>The WHERE Clause
>>>
>>>
>>>SELECT, UPDATE, and DELETE queries allow (and often require) that you
>>>specify
>>>criteria. The criteria define the subset of the database records to be
>>>retrieved
>>>or affected. The criteria are specified in the WHERE clause of the query. A
>>>common base class named CSpCriteriaSQLObject provides common functions for
>>>constructing queries and defines constant values.
>>>
>>>
>>>In order to support the 4GL functionality NetDynamics provides, the final
>>>WHERE
>>>clause (when automatically created) is constructed from 5 sub-elements:
>>>
>>>
>>>=B7 Static Join - The joins you specify in the Studio for this data object
>>>using
>>>the Joins tab of the data object editor
>>>
>>>=B7 Static Filter - The where criteria you specify in the Studio for this
>>>data
>>>object using the Where tab of the data object editor
>>>
>>>=B7 QBE Dynamic Criteria - The criteria automatically added by the doQBE()
>>>method
>>>(or manually added by you)
>>>
>>>=B7 DrillDown Dynamic Criteria - The criteria automatically added in some
>>>cases by
>>>the doAction() method (or manually added by you)
>>>
>>>=B7 Join Dynamic Criteria - All criteria automatically added by the=
>> doJoin()
>>>and
>>>methods like executeAllUpdatingDataObjects() (or manually added by you)
>>>
>>>
>>>The first two parts (Static Join and Static Filter) are typically provided
>>>by
>>>the developer, and they tend to be fixed for all executions of this data
>>>object
>>>by all end users. In contrast, the three Dynamic Criteria types tend to
>>>change
>>>from one end user to another, and they may even change during the same end
>>>user's session. For example, if the end user searches for all customers
>>>living
>>>in England, the doQBE() method would add a QBE Dynamic Criterion:
>>>
>>>
>>>(Customers.Country =3D 'England')
>>>
>>>
>>>
>>>If the results of the query contain more than the requested number of rows
>>>in
>>>the output HTML, the end user may return after an unknown time period and
>>>press
>>>the <Next> button. Naturally, he/she would expect to see the next page of
>>>all
>>>customers that live in England. Between these two web events, another end
>>>user
>>>might "intrude" and search for customers whose first name begins with "Jo".
>>>In
>>>short, the dynamic parts of the the WHERE clause are automatically saved by
>>>each
>>>criteria data object as normal session objects. This is the mechanism
>>>NetDynamics uses so that it does not get confused in such cases.
>>>
>>>There is a predefined hierarchy between the three parts of a dynamic
>>>criteria:
>>>
>>>
>>>=B7 QBE
>>>
>>>=B7 Drill Down
>>>
>>>=B7 Join
>>>
>>>
>>>Consequently, high level Java CP methods that need to clear one level
>>>automatically clear all levels below it.
>>>
>>>
>>>=B7 doQBE() clears all dynamic criteria (QBE, Drill Down, and Join).
>>>
>>>=B7 doAction() may clear the Drill Down (and Join) criteria.
>>>
>>>=B7 doJoin() clears the Join part only.
>>>
>>>
>>>In some cases you may add dynamic criteria yourself, check the criteria
>>>automatically added by the system, clear some parts, and so on. The=
>> database
>>
>>>package provides methods such as addDynamicCriterion(), getDynamicCriteria
>>>and
>>>clearDynamicCriteria() to perform such tasks.
>>>
>>>
>>>Warning: Changes that you make to the dynamic criteria affect only the
>>>current
>>>end user (since criteria are automatically stored as user session objects).
>>>Changes made to the other two parts of the WHERE clause (Static Join and
>>>Static
>>>Filter) affect all end users. They are member variables of data objects
>>>shared
>>>by all end users.
>>>
>>>-----Original Message-----
>>>From: Mathew, Aby [mailto:[EMAIL PROTECTED]]
>>>Sent: Friday, May 21, 1999 2:36 PM
>>>To: 'Curt Springer';
>>>[EMAIL PROTECTED]
>>>Subject: Re: [ND] Why do I have to execute the dataobject before calling
>>>i ts getValue()?
>>>
>>>
>>>Curt,
>>>
>>>I too spent a lot of my ND life thinking Dynamic Criteria are as=
>> trustworthy
>>>as instance variables, until I was corrected recently.=20
>>>
>>>From what I learned, even though dataObject.addDynamicCriterion() sounds
>>>like adding something to the DataObject instance, ND goes and keeps the
>>>stuff in a userSessionObject, so it stays for the same user for later use.
>>>This functionality seems to be crucial for the built-in handling of Next,
>>>Prev etc.
>>>
>>>I had read a detailed note on this, but not able to locate it. It was=
>> fairly
>>>recently, otherwise I would doubt myself.
>>>
>>>Regards,
>>>
>>>Aby
>>>
>>>> -----Original Message-----
>>>> From: Curt Springer [SMTP:[EMAIL PROTECTED]]
>>>> Sent: Friday, May 21, 1999 2:38 PM
>>>> To: [EMAIL PROTECTED]
>>>> Subject: Re: [ND] Why do I have to execute the dataobject before
>>>> calling its getValue()?
>>>>=20
>>>> see below
>>>>=20
>>>> At 11:02 AM 5/21/99 -0800, [EMAIL PROTECTED] wrote:
>>>> >Hi,
>>>> >
>>>> >If some one could clarify the following that will be great-
>>>> >
>>>> >My Case:
>>>> >I have a DO that is not bound to the page, I am calling it on=20
>>>> >the onBeforeDisplay event of the page and adding dynamic=20
>>>> >criterion to it to personalize the contents of the page=20
>>>> >(actually a listbox on the page) for the user. Now I want to use
>>>> >the same DO in onWebEvent of a button the page, regarding that I=20
>>>> >have following questions-
>>>> >1. Why do I have to call execute() method of the DO before=20
>>>> >calling its getValue()?
>>>>=20
>>>> execute() causes the SQL 'select' statement to be sent to the dbms and
>>>> results to be retrieved back. When the DO is bound to the page, the page
>>>> calls execute() automatically. When the DO is not bound, you have to do
>>>> it
>>>> yourself.
>>>>=20
>>>> >2. Can I be sure that the DO's dynamic criteria is still the same
>>>> >assuming multiple user sessions are active and provided I did=20
>>>> >not change the criteria any where else in the code? My understanding is
>>>> that- instances DOs are not shared between sessions.
>>>>=20
>>>> I must admit I took a long time to get this straight (pre-emptive
>>>> statement).
>>>>=20
>>>> Dynamic criteria in a DO are like member variables in a page object. =
>> They
>>>> hold for the life of a web event, i.e., from a page load or beginning of
>>>> button/href method, until a page is sent back to the browser (including
>>>> the
>>
>>>> situation where you set criteria on a DO in a button event, then load
>>>> another page and execute the DO in that page's onBeforeLoad or
>>>> onBeforeDisplay event). And, at the outset of a web event, they must be
>>>> assumed to reflect work done in a previous web event using the same
>>>> object.
>>>>=20
>>>> At the beginning of a web event, the DO might have criteria set by=
>> another
>>>> page session. So before you add any dynamic criteria for the current=
>> page
>>>> session, you must execute clearDynamicCriteria on the DO. Then you can
>>>> add
>>>> your current criteria.
>>>>=20
>>>> Also, in case it was not clear above, in one web event, if you are in a
>>>> button event of PageA, and you call CSpider.getDataObject("DO"),=20
>>>> and then you load PageB, and in its onBeforeLoadEvent, you call the same
>>>> CSpider.getDataObject("DO"), you will get the same object. =20
>>>>=20
>>>> -- Curt Springer, Team ND
>>>>=20
>>>>=20
>>>> >
>>>> >Thanks in advance to all the noble souls who are gonna reply...
>>>> >
>>>> >Vishal
>>>>=
>> >_________________________________________________________________________
>>>> >
>>>> >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]
>>>> >=20
>>>> _________________________________________________________________________
>>>>=20
>>>> For help in using, subscribing, and unsubscribing to the discussion
>>>> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>>>>=20
>>>> 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]
>>>=20
>
>_________________________________________________________________________
>
>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]