[Seaside] Re: Seaside and urls
Sabine Knöfel
sabine.knoefel at gmail.com
Wed Nov 13 16:11:04 UTC 2013
I give a parameter with the url and depending on the parameter I go to this
or that page
Example
http://myurl/RKA/RKA/?_direct=true
RKATask is a subclass of Task
RKATask>>go
((self requestContext request fields) at: '_direct' ifAbsent: [ nil ])
isNil
ifFalse: [
self call: (RKALayoutView new createLogin: #transient)].
....otherwise another call: ((AnotherView new)])
hope this is clear, otherwise please ask
Sabine
On Wed, Nov 13, 2013 at 5:00 PM, EstebanLM [via Smalltalk] <
ml-node+s1294792n4721775h20 at n4.nabble.com> wrote:
> I'm using Seaside-REST for that (even it is not its purpose), but I needed
> to hack it a bit (bah, not a BIT really...)
>
> See:
>
> in WARestfulFilter subclass: #EveRestFilter:
>
> EveRestFilter >>#shoppingList
> <get>
> <path: 'shopping-list'>
>
> self continueWithRoot: [ :root |
> root startOn: EveUNOPSShoppingListPanel new ].
>
> EveRestFilter >>#continueWithRoot: aBlock
> "Continues the execution of the application.
> I will pass aBlock to the root class of app, which I assume is a
> REApplication.
> Otherwise, this will fail"
> | requestContext application session rootComponent |
>
> requestContext := self requestContext.
> application := requestContext application.
> session := self obtainSessionWithApplication: application context:
> requestContext.
>
> requestContext
> push: session
> during: [
> rootComponent := requestContext
> rootComponentIfAbsent: [ nil ].
> rootComponent ifNil: [
> rootComponent := (application
> preferenceAt: #rootClass) new.
> requestContext rootComponent:
> rootComponent ].
> rootComponent do: aBlock.
> self next handleFiltered: requestContext ].
>
> EveRestFilter >>#obtainSessionWithApplication: application context:
> requestContext
> | sessionKey session |
>
> sessionKey := application trackingStrategy keyFromContext:
> requestContext.
> session := sessionKey ifNotNil: [
> application cache
> at: sessionKey
> ifAbsent: [ nil] ].
>
> session ifNil: [
> session := application newSession.
> application register: session ].
>
> ^ session
>
>
> then in the main component:
>
> EveMainComponent>>startOn: aComponent
> contentComponent show: aComponent
>
>
>
> is probably not the best way to do it, but is the easiest way I found, and
> it works :)
>
> Esteban
>
> On Nov 13, 2013, at 12:24 PM, Tommaso <[hidden email]<http://user/SendEmail.jtp?type=node&node=4721775&i=0>>
> wrote:
>
> > Hello everybody,
> >
> > I am building a web application with Seaside 3.0 and I would like to
> access single pages of the application with the URL, because I need to
> access them with other technologies (like javascript libraries).
> > I was looking into Seaside-REST, but I am wondering if it is the correct
> way to implement this, also because I would probably loose the session.
> >
> > Is there a way to provide some kind of routing to Seaside, or is REST
> the correct way?
> >
> > Thank you.
> > Tommaso Dal Sasso_______________________________________________
> > seaside mailing list
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4721775&i=1>
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4721775&i=2>
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Seaside-and-urls-tp4721764p4721775.html
> To start a new topic under Seaside General, email
> ml-node+s1294792n86180h75 at n4.nabble.com
> To unsubscribe from Seaside, click here<http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1310907&code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDEzMTA5MDd8MTA0OTM5MTYx>
> .
> NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://forum.world.st/Seaside-and-urls-tp4721764p4721778.html
Sent from the Seaside General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20131113/10ed7429/attachment.htm
More information about the seaside
mailing list