[aida] How to set the #addLinkTo:

Germán Arduino garduino at gmail.com
Thu Jan 15 17:04:03 CET 2009


I should add that another doubt is how the app know which instance of
its observee is that it most show?

And searching on the image I found (on a Scribo class) the following:

	self redirectTo: self observee repository documentSystem view: #main
parameter: 'folderid' value: self observee uuid

Seems that is possible to pass a paramter to the view to permit it
show the desired object?

Mmmmm, I must continue investigating.


2009/1/15 Germán Arduino <garduino en gmail.com>:
> Hi:
>
> I'm working with a model that has a main collection and other instvar
> to store choices for the main collection.
>
> Such #choices is a Dictionary that can have differente things as
> elements, by example:
>
> * A simple preloaded array:
>
> brands
>        ^self choices at: #brands ifAbsentPut: [Array with: 'IBM' with:
> 'Hewlett Packard' with: 'Clon']
>
> * A collection of full objects, as:
>
> serverTypes
>        ^self choices at: #serverTypes ifAbsentPut: [Set new]
>
> ServerType in this case is an object with several instvars (name,
> brand, machine model, etc)
>
> Then, on server collection of the main class (the system) each server
> have an instvar named #serverType
> who has the #name of the server type object of the serverTypes
> collection stored on the dictionary
> choices.
>
> I'm adding server types on the serverTypes collection on the way:
>
> addServerType: aServerType
>        ^self serverTypes add: aServerType
>
>
> The main view of the system is as follow:
>
> viewMain
>
>        | e entryList |
>
>        e := WebElement new.
>        e addTextH1: 'Server List'.
>        entryList := WebGrid new.
>        entryList columnNames: #('' 'Name' 'Role' 'Company' 'Status' 'Server Type');
>                setNumbering;
>                columnFilters: #(nil nil nil true true nil);
>                sortOn: 2;
>                collection: self observee servers;
>                columnAspects: #(nil #name #role #company #status #serverTypeName);
>                column: 6 addBlock: [ :each |
>                        (WebElement new) addLinkTo: each text: each serverTypeName].
>        e add: entryList.
>        e addBreak.
>        e addButtonText: 'Add a new server'.
>        self pageFrameWith: e title: 'Server List'.
>
> My goal is provide a link on server type column that show all the data
> of such server type.
>
> The text I show is #serverTypeName because I must to show the name of
> server type object, as follow:
>
> serverTypeName
>        ^ serverType name
>
> The question is what should code at addLinkTo: (on the column 6 of
> above text) to link the ServerTypeApp
> that shows the server type data which name is #serverTypeName?
>
> May be that I'm not setting a #parent: on #addServerType above? I'm
> not sure neither of the proper
> use of parent.
>
> I hope the mail be clear and sorry by the long post.
>
> Cheers.
>
> --
> Germán S. Arduino
> http://www.arsol.biz
> http://www.arsol.net
>



-- 
Germán S. Arduino
http://www.arsol.biz
http://www.arsol.net


More information about the Aida mailing list