[aida] Another question...(about WebUser)
nicolas petton
petton.nicolas at gmail.com
Fri Oct 26 13:52:45 CEST 2007
Le vendredi 26 octobre 2007 à 13:44 +0200, Janko Mivšek a écrit :
> Hi Nicolas,
>
> nicolas petton a écrit :
> >>> I want to add a new variable to WebUser. I added this :
> >>>
> >>> WebUser>>website
> >>> ^self otherValuesAt: 'website' ifAbsent: [self otherValuesAt: 'website'
> >>> put: '']
> >>>
> >>> WebUser>>website: aString
> >>> self otherValuesAt: 'website' put: aString
> >>>
> >>> in a custom category, so no problem.
> >>>
> >>> But what about views ? I would like to display the new feild in views
> >>> (WebAdminApp>>viewRegistration and
> >>> WebSecurityManagerApp>>userElementForm:).
> >>>
> >>> My first idea was to subclass this apps, and override MyWebSite>>admin
> >>> and MyWebSite>>securityManager.
> >>>
> >>> But if I do it, I need to create empty subclasses of WebAdmin and
> >>> WebSecurityManager too, and I really don't like it. Is there another way
> >>> to do it without creating those empty subclasses ?
> >>>
> >>>
> >> You are right, better avoid subclassing and rather use extensions. So on
> >> Squeak, if you have a package MyPackage, add method category *MyPackage
> >> in class WebUser and that's it! You don't need change any other classes
> >> in that case, specially not WebSecurityManager etc.
> >>
> >
> > But if I don't suclass, there will be no field for website (in the
> > registration form, and update form), right ? I didn't see the code for
> > this in WebSecurityManagerApp>>userElementForm: or
> > WebAdminApp>>viewRegistration
> >
> Then override those methods too with your own ones in your package and
> you'll have the same result but without subclasing.
Thank you Janko for your answers.
But if I do it, there will be another problem: this will be applied to
all AIDASites.
I have another idea, but I don't know how to do. I would like to
subclass WebSecurityManagerApp but without subclassing
WebSecurityManager. But is there a way to set a custom app to an object
(an app with a different name)? Something like:
UrlResolver defaultUrl: '/admin.html' forObject: admin app: MyAdminApp
Thank you,
Nicolas
>
> Janko
> _______________________________________________
> Aida mailing list
> Aida at aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida
--
Nicolas Petton
http://nico.bioskop.fr
___
ooooooo
OOOOOOOOO
|Smalltalk|
OOOOOOOOO
ooooooo
\ /
[|]
--------------------------------
Ma clé GPG est disponible ici :
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D
-------------- section suivante --------------
Une pi�ce jointe non texte a �t� nettoy�e...
Nom: non disponible
Type: application/pgp-signature
Taille: 189 octets
Desc: Ceci est une partie de message
=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url: http://lists.aidaweb.si/pipermail/aida/attachments/20071026/f3ed0ff6/attachment.sig
More information about the Aida
mailing list