• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Is WOBuilder supposed to see sessions in d2w templates?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Best tutorial book(s) for WebObjects?
  • Next by Date: What MySql/Java type gives editable booleans in d2w?
  • Previous by thread: RE: Best tutorial book(s) for WebObjects?
  • Next by thread: What MySql/Java type gives editable booleans in d2w?
  • Index(es):
    • Date
    • Thread