Hi,
I'm using Seaside to make a web application, with some components : - the main application, - a sidebar, - the 'contents' component. The main application displays the sidebar and the contents. Can the sidebar have methods to change the contents ? I don't know how to do this because they are both subcomponents of the main application. Thanks, Nicolas Petton -- ___ .:! DEBIAN GNU/Linux !:. / _ \ | / | The universal OS | \__/ \ ------------------------------------- Ma clé GPG est disponible ici : http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside signature.asc (196 bytes) Download Attachment |
Nicolas,
WAStore class does that. Take a deep to it. That will lead you to the task wich is a kind of component useful for workflow. cheers, Sebastian > -----Mensaje original----- > De: [hidden email] > [mailto:[hidden email]] En nombre > de Nicolas Petton > Enviado el: Miércoles, 25 de Abril de 2007 09:20 > Para: [hidden email] > Asunto: [Seaside] a sidebar which displays another component ? > > Hi, > > I'm using Seaside to make a web application, with some components : > - the main application, > - a sidebar, > - the 'contents' component. > > The main application displays the sidebar and the contents. > Can the sidebar have methods to change the contents ? I don't > know how to do this because they are both subcomponents of > the main application. > > Thanks, > > Nicolas Petton > -- > ___ > .:! DEBIAN GNU/Linux !:. / _ \ > | / | > The universal OS | \__/ > \ > ------------------------------------- > Ma clé GPG est disponible ici : > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Nicolas Petton
2007/4/25, Nicolas Petton <[hidden email]>:
> Hi, > > I'm using Seaside to make a web application, with some components : > - the main application, > - a sidebar, > - the 'contents' component. > > The main application displays the sidebar and the contents. > Can the sidebar have methods to change the contents ? I don't know how > to do this because they are both subcomponents of the main application. sidebar and the main application. Cheers Philippe > Thanks, > > Nicolas Petton > -- > ___ > .:! DEBIAN GNU/Linux !:. / _ \ > | / | > The universal OS | \__/ > \ > ------------------------------------- > Ma clé GPG est disponible ici : > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFGL0eEgxoTqOeIw00RAuxwAJ4lPgub0EKrSBpxMX9tpVDZQsH+HwCghUJQ > diyRBtSkmM6rGny0eMCKhIc= > =r/ZO > -----END PGP SIGNATURE----- > > _______________________________________________ > 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 |
In reply to this post by Nicolas Petton
Nicolas Petton wrote:
> Hi, > > I'm using Seaside to make a web application, with some components : > - the main application, > - a sidebar, > - the 'contents' component. > > The main application displays the sidebar and the contents. > Can the sidebar have methods to change the contents ? I don't know how > to do this because they are both subcomponents of the main application. > > Thanks, > > Nicolas Petton > > ------------------------------------------------------------------------ > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > and a submenu. In order to cater for this, I have a registry which I use for storing the main content component (amongst other things) and this is passed to all components, then I have: renderContentOn: html html anchor class: 'menu'; with: [ html text: 'Click this link']; callback: [ self regsitry at: 'content' put: SomeClass new] My root component then uses: renderContentOn: html html render: self menu. html render: self submenu. html render: self content and of course the #content method: content ^(self registry at: 'content' ifNil: [DefaultContent new]) HTH, John www.pinesoft.co.uk Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Thu, Apr 26, 2007 at 10:11:37AM +0100, John Thornborrow wrote:
> Nicolas Petton wrote: > > Hi, > > > > I'm using Seaside to make a web application, with some components : > > - the main application, > > - a sidebar, > > - the 'contents' component. > > > > The main application displays the sidebar and the contents. > > Can the sidebar have methods to change the contents ? I don't know how > > to do this because they are both subcomponents of the main application. > > > > Thanks, > > > > Nicolas Petton > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > I've got exactly the same setup for one of my sites, we have a main menu > and a submenu. In order to cater for this, I have a registry which I use > for storing the main content component (amongst other things) and this > is passed to all components, then I have: > > renderContentOn: html > html anchor class: 'menu'; with: [ > html text: 'Click this link']; callback: [ > self regsitry at: 'content' put: SomeClass new] > > My root component then uses: > > renderContentOn: html > html render: self menu. > html render: self submenu. > html render: self content > > and of course the #content method: > > content > ^(self registry at: 'content' ifNil: [DefaultContent new]) > > HTH, > John > > www.pinesoft.co.uk I think about another solution, maybe easier. In the main component, in the initialize method : sidebar := (Sidebar new) rootComponent: self. In the Sidebar class, I've got a rootComponent method : rootComponent: aComponent rootComponent := aComponent So the sidebar knows its parent. Is it ugly code ? Nicolas Petton -- ___ .:! DEBIAN GNU/Linux !:. / _ \ | / | The universal OS | \__/ \ ------------------------------------- Ma clé GPG est disponible ici : http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside signature.asc (196 bytes) Download Attachment |
2007/4/26, Nicolas Petton <[hidden email]>:
> On Thu, Apr 26, 2007 at 10:11:37AM +0100, John Thornborrow wrote: > > Nicolas Petton wrote: > > > Hi, > > > > > > I'm using Seaside to make a web application, with some components : > > > - the main application, > > > - a sidebar, > > > - the 'contents' component. > > > > > > The main application displays the sidebar and the contents. > > > Can the sidebar have methods to change the contents ? I don't know how > > > to do this because they are both subcomponents of the main application. > > > > > > Thanks, > > > > > > Nicolas Petton > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > Seaside mailing list > > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > I've got exactly the same setup for one of my sites, we have a main menu > > and a submenu. In order to cater for this, I have a registry which I use > > for storing the main content component (amongst other things) and this > > is passed to all components, then I have: > > > > renderContentOn: html > > html anchor class: 'menu'; with: [ > > html text: 'Click this link']; callback: [ > > self regsitry at: 'content' put: SomeClass new] > > > > My root component then uses: > > > > renderContentOn: html > > html render: self menu. > > html render: self submenu. > > html render: self content > > > > and of course the #content method: > > > > content > > ^(self registry at: 'content' ifNil: [DefaultContent new]) > > > > HTH, > > John > > > > www.pinesoft.co.uk > > Thank you for your answers ! > > I think about another solution, maybe easier. > In the main component, in the initialize method : > > sidebar := (Sidebar new) rootComponent: self. > > In the Sidebar class, I've got a rootComponent method : > > rootComponent: aComponent > rootComponent := aComponent > > So the sidebar knows its parent. > Is it ugly code ? http://lists.squeakfoundation.org/pipermail/seaside/2007-April/011734.html Cheers Philippe > Nicolas Petton > -- > ___ > .:! DEBIAN GNU/Linux !:. / _ \ > | / | > The universal OS | \__/ > \ > ------------------------------------- > Ma clé GPG est disponible ici : > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFGMPfqgxoTqOeIw00RAmpfAKDFBkKMd4hse0F1nTXP+iFY+5Nm4gCgrh+U > d3vIXQnAzRnOqs3ViRst4RA= > =mVNx > -----END PGP SIGNATURE----- > > _______________________________________________ > 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 |
On Sat, Apr 28, 2007 at 07:24:59AM +0200, Philippe Marschall wrote:
> 2007/4/26, Nicolas Petton <[hidden email]>: > >On Thu, Apr 26, 2007 at 10:11:37AM +0100, John Thornborrow wrote: > >> Nicolas Petton wrote: > >> > Hi, > >> > > >> > I'm using Seaside to make a web application, with some components : > >> > - the main application, > >> > - a sidebar, > >> > - the 'contents' component. > >> > > >> > The main application displays the sidebar and the contents. > >> > Can the sidebar have methods to change the contents ? I don't know how > >> > to do this because they are both subcomponents of the main application. > >> > > >> > Thanks, > >> > > >> > Nicolas Petton > >> > > >> > > >------------------------------------------------------------------------ > >> > > >> > _______________________________________________ > >> > Seaside mailing list > >> > [hidden email] > >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >> > > >> I've got exactly the same setup for one of my sites, we have a main menu > >> and a submenu. In order to cater for this, I have a registry which I use > >> for storing the main content component (amongst other things) and this > >> is passed to all components, then I have: > >> > >> renderContentOn: html > >> html anchor class: 'menu'; with: [ > >> html text: 'Click this link']; callback: [ > >> self regsitry at: 'content' put: SomeClass new] > >> > >> My root component then uses: > >> > >> renderContentOn: html > >> html render: self menu. > >> html render: self submenu. > >> html render: self content > >> > >> and of course the #content method: > >> > >> content > >> ^(self registry at: 'content' ifNil: [DefaultContent new]) > >> > >> HTH, > >> John > >> > >> www.pinesoft.co.uk > > > >Thank you for your answers ! > > > >I think about another solution, maybe easier. > >In the main component, in the initialize method : > > > >sidebar := (Sidebar new) rootComponent: self. > > > >In the Sidebar class, I've got a rootComponent method : > > > >rootComponent: aComponent > > rootComponent := aComponent > > > >So the sidebar knows its parent. > >Is it ugly code ? > > Yes, announcements are a better solution: > http://lists.squeakfoundation.org/pipermail/seaside/2007-April/011734.html Squeak too ? > > Cheers > Philippe > > >Nicolas Petton > >-- > > ___ > >.:! DEBIAN GNU/Linux !:. / _ \ > > | / | > > The universal OS | \__/ > > \ > >------------------------------------- > >Ma clé GPG est disponible ici : > >http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D > > > >-----BEGIN PGP SIGNATURE----- > >Version: GnuPG v1.4.6 (GNU/Linux) > > > >iD8DBQFGMPfqgxoTqOeIw00RAmpfAKDFBkKMd4hse0F1nTXP+iFY+5Nm4gCgrh+U > >d3vIXQnAzRnOqs3ViRst4RA= > >=mVNx > >-----END PGP SIGNATURE----- > > > >_______________________________________________ > >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 -- ___ .:! DEBIAN GNU/Linux !:. / _ \ | / | The universal OS | \__/ \ ------------------------------------- Ma clé GPG est disponible ici : http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside signature.asc (196 bytes) Download Attachment |
Yepp:
http://www.lukas-renggli.ch/blog/decoupling?command=PRViewCommand&view=PBPostHtmlView 2007/4/28, Nicolas Petton <[hidden email]>: > On Sat, Apr 28, 2007 at 07:24:59AM +0200, Philippe Marschall wrote: > > 2007/4/26, Nicolas Petton <[hidden email]>: > > >On Thu, Apr 26, 2007 at 10:11:37AM +0100, John Thornborrow wrote: > > >> Nicolas Petton wrote: > > >> > Hi, > > >> > > > >> > I'm using Seaside to make a web application, with some components : > > >> > - the main application, > > >> > - a sidebar, > > >> > - the 'contents' component. > > >> > > > >> > The main application displays the sidebar and the contents. > > >> > Can the sidebar have methods to change the contents ? I don't know how > > >> > to do this because they are both subcomponents of the main application. > > >> > > > >> > Thanks, > > >> > > > >> > Nicolas Petton > > >> > > > >> > > > >------------------------------------------------------------------------ > > >> > > > >> > _______________________________________________ > > >> > Seaside mailing list > > >> > [hidden email] > > >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > >> > > > >> I've got exactly the same setup for one of my sites, we have a main menu > > >> and a submenu. In order to cater for this, I have a registry which I use > > >> for storing the main content component (amongst other things) and this > > >> is passed to all components, then I have: > > >> > > >> renderContentOn: html > > >> html anchor class: 'menu'; with: [ > > >> html text: 'Click this link']; callback: [ > > >> self regsitry at: 'content' put: SomeClass new] > > >> > > >> My root component then uses: > > >> > > >> renderContentOn: html > > >> html render: self menu. > > >> html render: self submenu. > > >> html render: self content > > >> > > >> and of course the #content method: > > >> > > >> content > > >> ^(self registry at: 'content' ifNil: [DefaultContent new]) > > >> > > >> HTH, > > >> John > > >> > > >> www.pinesoft.co.uk > > > > > >Thank you for your answers ! > > > > > >I think about another solution, maybe easier. > > >In the main component, in the initialize method : > > > > > >sidebar := (Sidebar new) rootComponent: self. > > > > > >In the Sidebar class, I've got a rootComponent method : > > > > > >rootComponent: aComponent > > > rootComponent := aComponent > > > > > >So the sidebar knows its parent. > > >Is it ugly code ? > > > > Yes, announcements are a better solution: > > http://lists.squeakfoundation.org/pipermail/seaside/2007-April/011734.html > > I saw the announcement framework was in VisualWorks. Can I use it in > Squeak too ? > > > > Cheers > > Philippe > > > > >Nicolas Petton > > >-- > > > ___ > > >.:! DEBIAN GNU/Linux !:. / _ \ > > > | / | > > > The universal OS | \__/ > > > \ > > >------------------------------------- > > >Ma clé GPG est disponible ici : > > >http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D > > > > > >-----BEGIN PGP SIGNATURE----- > > >Version: GnuPG v1.4.6 (GNU/Linux) > > > > > >iD8DBQFGMPfqgxoTqOeIw00RAmpfAKDFBkKMd4hse0F1nTXP+iFY+5Nm4gCgrh+U > > >d3vIXQnAzRnOqs3ViRst4RA= > > >=mVNx > > >-----END PGP SIGNATURE----- > > > > > >_______________________________________________ > > >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 > > > -- > ___ > .:! DEBIAN GNU/Linux !:. / _ \ > | / | > The universal OS | \__/ > \ > ------------------------------------- > Ma clé GPG est disponible ici : > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFGMzCygxoTqOeIw00RArLrAJ99OYsBmpPGO9AjSwT6ZtWnHyLyuACgon8h > dp1qSphlf6J5Z9ITkv9bz3Y= > =QY7r > -----END PGP SIGNATURE----- > > _______________________________________________ > 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 |
In reply to this post by John Thornborrow
Patrick Collison wrote:
> On 27/04/07, John Thornborrow <[hidden email]> wrote: >> Currently I pass it semi-explicity. I have an abstract component which >> is a subclass of WAComponent, which has the methods #registry: and >> #registry, then all my site components are subclasses of the abstract >> component > > Ah, ok, I see. Am I misunderstanding things, or would it be possible > to do this by storing the registry in a subclass of WASession, which > would then be automatically available to all subclasses without ever > having to explicitly pass it? > > Thanks, > > Patrick > > > to ensure that your subclass would be used in place of WASession. Regards, John. www.pinesoft.co.uk Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |