Mirza

Some background
CSP itself provides a single entry that the  is called by the
cspServer process

if you are creating a csp file either in Studio or Dreamweaver the
page compiler creates a series of call
OnPageCSPROOT
OnPageHEAD
OnPageHTML
....

now as you are sub-classing %CSP.Page all you get is the onPage method
that you put the complete HTML into.

As this is a single method call you cannot call "parts" of it.

so what you need to do is create your own structure


====================
Class MySuperClass extends %CSP.Page

ClassMethod OnPage()
{
write "<html>"
do ..MyHeader()
do ..MyBody()
write "</html>"
}

ClassMethod MyHeader()
{
write "<head>"
do ..OnMyHeader()
write "</head>"
}

ClassMethod OnMyHeader()
{
do some javascript

}

now you can sub-class off the one above


====================
Class SuperClass extends MySuperClass

//override OnMyHeader

ClassMethod OnMyHeader()
{
  do some special JS

// and call the super class method
do #super()

}


It's a bit complex but what you are doing is simply breaking the
OnPage into smaller methods wnch can then be individually
overriden/extended

Hope it's clear

Peter








Reply via email to