On Wed, May 6, 2009 at 1:12 PM, Keith Hodges <keith_hodges(a)yahoo.co.uk>wrote;wrote:
Mariano Martinez Peck wrote:
On Wed, May 6, 2009 at 5:42 AM, Lukas Renggli <renggli(a)gmail.com
<mailto:renggli@gmail.com>> wrote:
I missed that one ;-)
Yes, it's probable. I am sending lots of mails per day hahaha.
Can I do this just with Pier as it is now or I
need to extend,
modify or
create something ?
I would create a Seaside component (subclass of PRWidget). That's
probably the simplest solution.
Ok. I will do it then.
Thanks!
Mariano
Hi Mariano,
In my environment I am able to subclass the standard renderers,
including the PRReferenceRenderer
in my subclass I add the following, and it works much better than making
a special component for every message that you want to give the user
saying "please log in".
Keith
visitInternalLink: aLink
((link hasParameter: 'loggedout') and: [component context isLoggedIn
]) ifTrue: [ ^ self ].
((link hasParameter: 'loggedin') and: [component context isLoggedIn
not ]) ifTrue: [ ^ self ].
(aLink hasParameter: 'button') ifFalse: [ ^ super visitInternalLink:
aLink ].
html form: [
html button
attributes: (self attributesFor: aLink);
class: 'internal';
title: aLink title;
goto: (self contextForInternalLink: aLink);
with: [ self visitLink: aLink ]
]
Keith: thanks for the help. I have Beach in mind and I was going to take
ideas or just adapt it to run in pharo. At least for the thing I need right
now.
Now I know where to start from.
Thanks again.
Mariano
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki