[Seaside] Component confusion

Boris Popov boris at deepcovelabs.com
Wed Aug 2 17:54:59 UTC 2006


You're most welcome, and certainly don't hesitate asking any questions you may have. The documentation is faily limited and spread across various blogs and web pages, but the bits that are out there are likely quite useful too.

Cheers!

-Boris

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

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

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
attachments.

Thank you.

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Jason Johnson
Sent: Wednesday, August 02, 2006 10:47 AM
To: 'The Squeak Enterprise Aubergines Server - general discussion.'
Subject: AW: [Seaside] Component confusion

Ah, that is simple enough.  Thanks everyone.  I saw the part about
deriving a Styles class, but that would put me reading in a file and
then passing it as a string.  But the updateRoot looks perfect.

Sorry for all the questions that are probably all answered somewhere in
the documentation (I really looked all over for this styles thing and
didn't see it).  I am brand new to smalltalk, started last Friday.  My
first dynamic language was Perl and I didn't like it at all.  But
smalltalk seems pretty nice.  Simple syntax, power comes from the
library, which is how I like it.

-----Ursprüngliche Nachricht-----
Von: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] Im Auftrag von Boris
Popov
Gesendet: Mittwoch, 2. August 2006 19:43
An: The Squeak Enterprise Aubergines Server - general discussion.
Betreff: RE: [Seaside] Component confusion

For these types of things you could create a subclass of WAStyleLibrary,
say MyStyles, and then add it to your application,

MyApplication class>>initialize
 | app |
 app := self registerAsApplication: 'myapplication'.
 app libraries add: MyStyles.

See WAStandardStyles for a sample of such style library.

Having said all this, you can also link to the external stylesheets, by
modifying the html root in the #updateRoot: method on your component,

updateRoot: aHtmlRoot
 super updateRoot: aHtmlRoot.
 aHtmlRoot
	title: 'Welcome to My Application';
	linkToStyle: 'http://www.myapplication.com/style.css'

Hope this helps,

-Boris

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

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

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
attachments.

Thank you.

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Jason
Johnson
Sent: Wednesday, August 02, 2006 10:34 AM
To: 'The Squeak Enterprise Aubergines Server - general discussion.'
Subject: AW: [Seaside] Component confusion

Oh no, I didn't read the documentation. :(  I appologize, I really
thought I had read through everything.  I guess I'm trying to learn too
many things at once.

Anyway, thank you very much for your help on this. Now it works
beutiful.  Exactly as I would expect.

I read through the docs more thouroughly this time but I still have a
question about something.

I did notice that Seaside seems to want all styles to be in the code.
How hard would it be to set it up so that a call to the style method
will return a URL?  For example, if I have a site that is static on an
Apache server, that happens to redirect all requests for applications to
seaside, but I want to use site wide style sheets for it.  The easiest
thing would be if I can just get seaside to give a full URL for where to
find the stylesheet.

Thanks,
Jason

-----Ursprüngliche Nachricht-----
Von: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] Im Auftrag von Boris
Popov
Gesendet: Mittwoch, 2. August 2006 18:23
An: seaside at lists.squeakfoundation.org
Betreff: RE: [Seaside] Component confusion

Jason,

Welcome to the Light Side :) Check these links out for the explanation,

http://www.shaffer-consulting.com/david/Seaside/Embedding/index.html
http://www.motionobj.com/seasidefaq/ComponentsNotFoundWhileProcessingCal
lbacks
http://www.motionobj.com/seasidefaq/RegisteringASubcomponent

You must be doing render: component somewhere but that component is not
included in the #children method of the container component.

Hope this helps,

-Boris

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

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

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
attachments.

Thank you.

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Jason
Johnson
Sent: Wednesday, August 02, 2006 9:14 AM
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] Component confusion

Hello all,
 
I have just started using seaside, and I must say I am very impressed.
I have been able to fix all the problems I have ran into so far but now
I tried to make a new component and there seems to be something wrong
with it.  I am confused because it seems to me like any other component
(im using the Store example as a reference).  The message I get is
"Error. Components not found while processing callbacks:#(a WANavBar)".
 
What my component is trying to do is be the main navagation component
for a site I will eventually build.  It is a very simple class at the
moment.  It inherits from WAComponent and it has two instance variables:
items (the list items) and activeItem.  Here is the renderOn: method:
 
renderContentOn: html
            html divNamed: 'navcontainer' with: [
                        html cssId: 'navlist'; unorderedList: [
                                   items do: [:item| 
                                               (item = activeItem)
ifTrue: [ html cssId: 'active'].
                                               html listItem: [
                                                           html
anchorWithAction: [self activeItem: item ] text: item
                                               ]
                                   ]
                        ] 
            ].
 
As you can see, all I'm trying to do is make a CSS aware navagation so
that the designer can just do his thing with CSS without having to
figure out how it gets made.  I want any part of the site to use this.
I tried it in another test application where it does:
 
navBar := WANavBar new.
navBar items: #('Item one' 'Item two').
navBar activeItem: 'Item one'.
 
When I click on either item I get the above error.
 
Thanks very much for your help,
Jason
_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the Seaside mailing list