[Seaside] Using one component to render multiple views?

Boris Popov boris at deepcovelabs.com
Thu Aug 10 22:02:06 UTC 2006

You could also have your components rendering slightly different for users
with varying privileges,

self user isAdmin
 ifTrue: [html input value: username; callback: [:v | username := v]]
 ifFalse: [html text: username].

But I'd say different views often warrant components of their own. Depending
on your composition, you could also insert admin-type child component into
your standard views.

self user isAdmin ifTrue: [html render: adminpanel]

Hope this helps,


DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

boris at deepcovelabs.com


This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any

Thank you.

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Rick Flower
Sent: Thursday, August 10, 2006 2:37 PM
To: Seaside Mailing List
Subject: [Seaside] Using one component to render multiple views?

I've got an "admin" sort of component for a set of code I'm working on, 
and I was wondering if I have the "admin" component initially put up a 
list of anchors/links with callbacks to specific functionality (e.g. add 
organization, edit organization, etc), is there a way to allow the 
anchor's callbacks to temporarily bring up a new view (that has its own 
forms, etc) if you will -- similar to using the #call setup, but without 
using a new object that has it's own #renderContentOn: method defined?

If I go that route (which seems reasonable, but tedious), I'll have 
separate components for each function I'm looking to do (one for "add 
organization", one for "edit organization", etc).. Ideally in my case, 
each of these functions (e.g. add organization) will have its own form 
and relevant processing, etc.. I'm guessing the proper way to do this is 
to use the #call/#answer setup, but thought I'd check to see if there's 
a way to do it without creating all of the extra components.


-- Rick
Seaside mailing list
Seaside at lists.squeakfoundation.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3370 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060810/f0f0eb81/smime.bin

More information about the Seaside mailing list