Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with page object dtc 1

Status
Not open for further replies.

frogggg

Programmer
Jan 17, 2002
182
US
Thanks MerlinB for your direction. I would like to learn to use page object.
I tried MSDN VI documentation, which was a start, but I need some more specific examples to understand how to apply it to my code.

Does anyone know where I can get some tutorials or documentation on this?

Thanks.
 
There is very little documentation about the Page Object, however it is very simple to use...

> Add it to a page to give you access to the 'thisPage' object (which is an alias for the name of this page).
- And ensures each form has a different name, for xref purposes.

> Can store 'persistant' variables
- variables that are set by server code can be extracted via client code, and vica-versa.
- page variables exist only while the user uses this page (navigate to another page, and they disappear) - i.e. hidden form values
- session variables exist for the remainder of the users session. They are implemented as session varlues - but they are prefixed with the page name to (try-to) avoid name duplication.
- Set a reference from one page to another, via page object, and all 'session' variables become available (and included in drop-down member/property list)
- access via thisPage.setXxxx or .getXxxx methods.
- Why have these? They save the bother of generating hidden form fields, and client code to read/write to them, and/or creating unique named session values and writing these names down so you do not forget them later. However, you can do this stuff manually.

> Lets you refer to function/subroutines either as
- navigate functions - loads a page and runs that function. Can be very useful for grid-row 'delete' function - each grid row has a 'delete' link, that causes the delete 'navigate' function to be called, passing the required recordset key values as parameters.
- execute functions - uses Java applet to asynchronously load page, run a function, return the function value. This is quite an excellent feature for interactive client-side code - you can do server-side validation without the usual client round trip (i.e. a separate hidden HTTP session is created to call function, send parameters and return results). However, it does require Java on the client. [ It can be emulated using Layers (netscape) or in-line frames (IE) - these can load up a web page with query string parameters, and scrape out the results from the returned html, all in an invisible layer. You would need to define a syntax for result values and a load of javascript to handle it all! ]

Hope this helps. If it does, then please do add it to the FAQ area. (Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top