Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Tim Roberts <timr@pr...> - 2002-09-03 17:30:31
I have a moderate web site that I created with WebKit. I like the concept of
PSP, and I like the way it cleans up mostly static pages, so I decided to
take a shot at porting some of it to PSP this weekend. Overall, it went
I did come across one oddity that stumped me for a while. I wonder if
someone could offer an explanation.
My webkit directories all have a SitePage.py that defines the basic common
structure of a page, derived from WebKit.SidebarPage. In my first attempts
at PSP, I extracted code from the samples, and ended up with this at the
beginning of my page:
<%@ page imports = "PSP.Examples.PSPExamplePage" %>
<%@ page method="writeContent" %>
<%@ page extends="SitePage"%>
This worked. I got my sidebar-based structure along with the static content
in the PSP file. I was tickled pink.
As I looked at this, however, I realized that I wasn't using anything from
PSPExamplesPage, so I deleted the "imports" line. Suddenly, things changed:
all I got in the browser was the HTML code in the PSP page. I got none of
the inherited behavior. No titles, no sidebars.
This confused me. I re-added the "imports", and it worked again. I changed
the imports to "PSP.PSPPage", and it still worked. Finally, I changed my own
SitePage.py to inherit from both SidebarPage and PSPPage, and then I don't
need the "imports" directive at all.
I have two questions. First, why should the mere act of importing
PSP.PSPPage have affected the behavior so radically?
Second, am I likely to run into any troubles by having a single SitePage
class derive from both WebKit.SidebarPage and PSP.PSPPage? Both of them
eventually inherit from WebKit.Page. Is that a problem? It seems to work
fine for both PSP pages and WebKit servlets.
- Tim Roberts, timr@...
Providenza & Boekelheide, Inc.