Hello Janko:
On Mon, Jan 19, 2009 at 11:15 PM, Janko Mivšek <[hidden email]> wrote:
Prashanth: no. I implemented #aidademo (just copied #demo) but still the mission page points to demo.html. Here's the code fragment from #navBarMainLinksElement:
Here's the #viewMission code:
and the code for aidademo:
I am little confused with the need to implement an aidademo method in AIDASite. what are we referencing when we are actually executing:
(AIDASite named 'aidademo') urlResolver...
does this mean that "named:" can have anyName as value? In that case, I kept getting an error with #styleClass:
Regards.
-- _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Prashanth Hebbar wrote:
> site aidademo? Do you have a method #aidademo implemented somewhere? in > AIDASite? > Prashanth: no. I implemented #aidademo (just copied #demo) but still the > mission page points to demo.html. Here's the code fragment from > #navBarMainLinksElement: > > > addLinkTo: self site aidademo text: 'Mission' view: #mission; > > > Here's the #viewMission code: > > > viewMission > | e | > e := WebElement new. > e addTextH1: 'Content Accounting & Protection Society'. e addBreak. > e add: self missionElement. > self pageFrameWith: e title: 'CAPS - Mission' This method you implemented in WebDemoApp, right? > > and the code for aidademo: > > aidademo > ^self userServices at: #WebDemo > ifAbsent: > [self addUserService: WebDemo new named: #WebDemo. > self urlResolver defaultURL: '/aidademo.html' forObject: self > aidademo. > ^self aidademo] Well, you actually reuse the already registered WebDemo, that's why addLinkTo: resloves always to the old Url :) Which is also ok, if you just extended WebDemoApp with additional view? If you like to have another WebDemo instance, then correct above method: ^self userServices at: #AnotherDemo ... self addUserService: WebDemo new named: #AnotherDemo ... > I am little confused with the need to implement an aidademo method in > AIDASite. what are we referencing when we are actually executing: > (AIDASite named 'aidademo') urlResolver... Yes, this is actually a double registration of root domain object. Why? Because the registration in AIDASite's user services is considered more safe, more strong than just in url resolver. Remember, loosing a reference to a root object is a fatal event, you can loose a while domain model at the next garbage collection cycle. In tutorial registering the root object is only to url resolver because of simplicity, but if you look at the real Aida systems, all root objects are primary registered elsewhere, mostly in AIDASite user services. > does this mean that "named:" can have anyName as value? In that case, I > kept getting an error with #styleClass: (AIDASite named: 'site name') is a method to find the instance of AIDASite with that name. If you look at the implementation, it first asks SwazooServer for its singleton, then ask it to find the site. Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |