Re: [Pharo-users] How to edit an element with Teapot

2016-12-17 Thread stepharong
Hi sven so I studied your code and I got a solution working. Tx for your support. Now I do not know if what I did is correct. registerRoutes teapot GET: '/' -> 'My game collection'; output: #html; GET: '/games' -> [ :reg | (self htmlListFo

Re: [Pharo-users] How to edit an element with Teapot

2016-12-17 Thread stepharong
On Sat, 17 Dec 2016 15:29:24 +0100, Sven Van Caekenberghe wrote: Do want to build/use a REST API or do you want to build a simple web app I want to have a small web app that is basically using to teapot to listen and serve I thought you wanted to do the first. No because teapot is

Re: [Pharo-users] How to edit an element with Teapot

2016-12-17 Thread Sven Van Caekenberghe
Do want to build/use a REST API or do you want to build a simple web app ? I thought you wanted to do the first. The second is easy too, ZnDefaultServerDelegate>>#formTest1: #formTest2: #formTest3: are doing that (in a single handler, generating the page, using the submitted info as well. > O

Re: [Pharo-users] How to edit an element with Teapot

2016-12-17 Thread stepharong
Ok I read it but I do not understand how I should do it ;( With teapot or Zinc I want to be able to serve an html string (containing a form probably with a submit button) that will let the user to pass some data and that the server can access this data and invoke a method. I want to get the

Re: [Pharo-users] How to edit an element with Teapot

2016-12-17 Thread Stephane Ducasse
Tx for the pointer. I was planning to read the seaside implementation to understand. I read your Simple Web App but it was not there, nor in Teapot, nor in tinyblog (obviously). So I will have a look at the one. I think that al the docs are only showing displaying information while inputting is the

Re: [Pharo-users] How to edit an element with Teapot

2016-12-17 Thread Sven Van Caekenberghe
I meant section 11 of the Zinc HTTP Server chapter https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Zinc-HTTP-Server/Zinc-HTTP-Server.html > On 17 Dec 2016, at 11:56, Sven Van Caekenberghe wrote: > > Chapter 11 : Scripting a REST Web Servi

Re: [Pharo-users] How to edit an element with Teapot

2016-12-17 Thread Sven Van Caekenberghe
Chapter 11 : Scripting a REST Web Service with Zinc of the Enterprise book > On 17 Dec 2016, at 11:31, stepharong wrote: > > Hi > > This is probably a stupid question but I dare to ask it. > > I have a tiny teapot application (based on the library example) and I would > like to let the use a

[Pharo-users] How to edit an element with Teapot

2016-12-17 Thread stepharong
Hi This is probably a stupid question but I dare to ask it. I have a tiny teapot application (based on the library example) and I would like to let the use add an item or edit an item. I do want to force the user to do it via the request path with a post or that way ZnClient new