How to Implement a Menu Component

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to Implement a Menu Component

Robert Schwarz-2
Hi,
how can I implement a Seaside web application with a menu component  
and a content component?

Thanks
Robert
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement a Menu Component

Richard Eng
If I understand your question correctly, you design your web page with the
appropriate separation of HTML and CSS, then use Seaside to generate the
HTML, configure the (Comanche) web server to serve the CSS files, and do all
your content stuff. The HTML defines the "menu" (as an unordered list) and
"content" (as a div), and the CSS make them look pretty, like you would
expect from a website.

Regards,
Richard


On 7/21/07 10:55 AM, "Robert Schwarz" <[hidden email]> wrote:

> Hi,
> how can I implement a Seaside web application with a menu component
> and a content component?
>
> Thanks
> Robert
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement a Menu Component

Robert Schwarz-2
Yes - but how can I replace a content component from the menu.

Please tell me if I made an error in reasoning.

My Seaside application have 3 components
1.) main component with two instance variables for menu and content  
and a children method (array with: menu with: content)
2.) menu subcomponent
3.) content subcomponent

But if the menu component makes a #call: to another component, than  
the new component will appear in place of the menu and not in place  
of the content component.
Is the content component a subcomponent of menu or main?
I'm a little bit confused
Robert

Am 21.07.2007 um 17:59 schrieb Richard Eng:

> If I understand your question correctly, you design your web page  
> with the
> appropriate separation of HTML and CSS, then use Seaside to  
> generate the
> HTML, configure the (Comanche) web server to serve the CSS files,  
> and do all
> your content stuff. The HTML defines the "menu" (as an unordered  
> list) and
> "content" (as a div), and the CSS make them look pretty, like you  
> would
> expect from a website.
>
> Regards,
> Richard
>
>
> On 7/21/07 10:55 AM, "Robert Schwarz" <[hidden email]>  
> wrote:
>
>> Hi,
>> how can I implement a Seaside web application with a menu component
>> and a content component?
>>
>> Thanks
>> Robert
>> _______________________________________________
>> Seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement a Menu Component

Michael Gorsuch
> My Seaside application have 3 components
> 1.) main component with two instance variables for menu and content
> and a children method (array with: menu with: content)
> 2.) menu subcomponent
> 3.) content subcomponent

Here's how I do it, but your mileage may vary:

I have an "Interface" component for each of my main sections.  My
Welcome page, which handles logins and new user creation is called
"GHWelcomeInterface".  Once you get beyond that, you are sent to the
meat of the app, the GHUserInterface.

GHUserInterface handles rendering the menu and has a content
subcomponent.  Since the menu is actually part of the GHUserInterface
instance rather than a subcomponent, it just swaps out 'main' (or
'content' in your case) with the appropriate content instance.

So, just to be clear, I don't have three components, I just have two:
one that handles the general state of things (including the menu), and
the other is the actual content.

Hope this helps,

Michael Gorsuch
http://www.michaelgorsuch.org
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement a Menu Component

Philippe Marschall
2007/7/21, Michael Gorsuch <[hidden email]>:

> > My Seaside application have 3 components
> > 1.) main component with two instance variables for menu and content
> > and a children method (array with: menu with: content)
> > 2.) menu subcomponent
> > 3.) content subcomponent
>
> Here's how I do it, but your mileage may vary:
>
> I have an "Interface" component for each of my main sections.  My
> Welcome page, which handles logins and new user creation is called
> "GHWelcomeInterface".  Once you get beyond that, you are sent to the
> meat of the app, the GHUserInterface.
>
> GHUserInterface handles rendering the menu and has a content
> subcomponent.  Since the menu is actually part of the GHUserInterface
> instance rather than a subcomponent, it just swaps out 'main' (or
> 'content' in your case) with the appropriate content instance.
>
> So, just to be clear, I don't have three components, I just have two:
> one that handles the general state of things (including the menu), and
> the other is the actual content.

You can also stay with tree components and connect the menu and the
content component with announcements:
http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/

Philippe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to Implement a Menu Component

Balázs Kósi
Hi,

 we have a sample seaside app, which shows how to implement a menu
with announcements.
 You can install it from http://squeaksource.com/AXAnnouncements.html
 In the repo you'll find two packages. Install both, first the
AXAnnouncements package.
 It registers the app under seaside/menu.

Cheers, Balázs
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside