URL Manipulation

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

URL Manipulation

Sylvain pralon
Hi,

I am currently wondering how can I manipulate urls generated by Seaside.
In my application I have several components which can be displayed in the main interface.
In some of them I create some anchors.
First I want to konw how can I add some parameters in this url ?
Second, when the link is clicked, how can browse the parameters in my current url in order
to take some decisions depending on their values ?

For example, imagine a "cloud tag" where each tag is an anchor which should recall another component which could be a kind of research component.

From the Seaside FAQ, I read some stuffs about that. It seems that this parameters is stored in the session variable but I have to recognize that I need some more explanations...

Thanks in advance.

Sylvain



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

RE: URL Manipulation

Sebastian Sastre-2

De: [hidden email] [mailto:[hidden email]] En nombre de Sylvain Pralon
Enviado el: Viernes, 30 de Noviembre de 2007 16:50
Para: Seaside - general discussion
Asunto: [Seaside] URL Manipulation

Hi,

I am currently wondering how can I manipulate urls generated by Seaside.
In my application I have several components which can be displayed in the main interface.
In some of them I create some anchors.
First I want to konw how can I add some parameters in this url ?
Second, when the link is clicked, how can browse the parameters in my current url in order
to take some decisions depending on their values ?
Why you could possibly want to do that if you don't have a real need to send (away from the server) nor bring the parameters at all?
The desicions can (should?) be made in the objects of your model. That way you make thos anchors to be rendered or not depending on model state (if that is what you want).
 
 
For example, imagine a "cloud tag" where each tag is an anchor which should recall another component which could be a kind of research component.
Any anchor can call any component that the rendered component can reach. Take a look:
 
MainPage
    first := FirstComponent new.
    second := SecondComponent new.
 
  MainPage>>renderContentOn: html
     
    html anchor
        callback: [self call: first];
        with: 'first'.
 
    html anchor
        callback: [self call: second];
        with: 'first'.
 
From the Seaside FAQ, I read some stuffs about that. It seems that this parameters is stored in the session variable but I have to recognize that I need some more explanations... 
 
The main explanation I think you must deal with *at this stage* is to implode the paradigm of using the url to send and receive things and/or states of things. Let that creepy design for the past and enjoy the Seaside. Widgets details, styling and rendering aside, if you start feeling that deveop with Seaside has a lot in common with desktop development you will be in the right path.
 
cheers,
 
Sebastian
 
Thanks in advance.

Sylvain



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

Re: URL Manipulation

Philippe Marschall
In reply to this post by Sylvain pralon
Url manipulation is for bookmarkable urls. Not for implementing any
kind of behaviour. Your problem sounds as if it would be implemented
much easier with annoucements:
http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/

Cheers
Philippe

2007/11/30, Sylvain Pralon <[hidden email]>:

> Hi,
>
> I am currently wondering how can I manipulate urls generated by Seaside.
> In my application I have several components which can be displayed in the
> main interface.
> In some of them I create some anchors.
>  First I want to konw how can I add some parameters in this url ?
> Second, when the link is clicked, how can browse the parameters in my
> current url in order
> to take some decisions depending on their values ?
>
>  For example, imagine a "cloud tag" where each tag is an anchor which should
> recall another component which could be a kind of research component.
>
> From the Seaside FAQ, I read some stuffs about that. It seems that this
> parameters is stored in the session variable but I have to recognize that I
> need some more explanations...
>
> Thanks in advance.
>
> Sylvain
>
>
>
> _______________________________________________
> 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: URL Manipulation

Sylvain pralon
Thanks for these explanations.
You are absolutely right and I will quickly review my design's application.

Sylvain

2007/11/30, Philippe Marschall <[hidden email]>:
Url manipulation is for bookmarkable urls. Not for implementing any
kind of behaviour. Your problem sounds as if it would be implemented
much easier with annoucements:
http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/

Cheers
Philippe

2007/11/30, Sylvain Pralon <[hidden email]>:

> Hi,
>
> I am currently wondering how can I manipulate urls generated by Seaside.
> In my application I have several components which can be displayed in the
> main interface.
> In some of them I create some anchors.
>  First I want to konw how can I add some parameters in this url ?
> Second, when the link is clicked, how can browse the parameters in my
> current url in order
> to take some decisions depending on their values ?
>
>  For example, imagine a "cloud tag" where each tag is an anchor which should
> recall another component which could be a kind of research component.
>
> From the Seaside FAQ, I read some stuffs about that. It seems that this
> parameters is stored in the session variable but I have to recognize that I
> need some more explanations...
>
> Thanks in advance.
>
> Sylvain
>
>
>
> _______________________________________________
> 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