Is WOBuilder supposed to see sessions in d2w templates?
Is WOBuilder supposed to see sessions in d2w templates?
- Subject: Is WOBuilder supposed to see sessions in d2w templates?
- From: Scott Ellsworth <email@hidden>
- Date: Thu, 10 Apr 2003 17:14:19 -0700
Howdy, all.
Just wanted to check my understanding of something.
Frozen components, being direct descendants of WOComponent, have a
session() method to reach the session object, which returns a Session.
This is why WOBuilder shows the session, and all of its content, as
something which can be reached just by a simple drag with no code
required.
Saved templates, not being direct descendants of WOComponent, do not.
In the case of my AgentTemplate, it extends D2WListPage.
To make the session, and its variables, visible in this saved template,
I added a method:
public String getUsername(){
return ((Session)session()).getUsername();
}
This, then, does show up in WOBuilder, and can be dragged as needed to
connect things up in a saved d2w template's .wo file.
If this makes sense, I suppose one could create a more generic
public Session getSession(){
return ((Session)session());
}
(The code works when run, but I wanted to be sure I understood why
WOBuilder did not show session and application, as I expected.)
Scott
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.