Lyn Headley
Lyn Headley

Reputation: 11588

Seaside: Instantiate and Render a Component via RESTful api

I'd like to expose a component of my seaside application using a restful api. I read the REST chapter of the seaside book and did not learn how to instantiate and render one of my components from a restful filter. For example, suppose I have a filter method on a subclass of WARestfulFilter, how do I fill in the blanks? Note that I am nervous about this previous answer as I want my rendered callbacks to work too.

Myfilter>>showDocument: name
   <get>

  | component |
  component := MyComponent named: name.
  "__how to render this?__"

Upvotes: 1

Views: 274

Answers (2)

EstebanLM
EstebanLM

Reputation: 4357

What you want it to provide a meaningful url to a component, using SeasideREST (which is not originally made for that).

But, you can check this thread: http://forum.world.st/Seaside-and-urls-td4721764.html

I provide there a way to do what you want, by tweaking the SeasideREST implementation and purpose :)

Upvotes: 2

philippeback
philippeback

Reputation: 801

The previous answer looks like realistic when it comes to callbacks.

If you do REST, callbacks shouldn't work IMHO.

But nobody precludes you from generating URIs that are meaningful for your component when called again.

Maybe a configuration setting in MyComponent would do the trick.

Upvotes: 0

Related Questions