Re: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-19 Thread Lennart Regebro
On 5/19/05, Ken Winter [EMAIL PROTECTED] wrote: The difference between this and the deletion example is that this form (personform.htm) need to be called with an argument, giving the person_id that identifies the record it is supposed to display. I have tried a number of ways to sneak this

RE: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-19 Thread Ken Winter
-Original Message- From: Lennart Regebro [mailto:[EMAIL PROTECTED] Sent: Thursday, May 19, 2005 4:36 AM To: [EMAIL PROTECTED] Cc: J Cameron Cooper; zope@zope.org Subject: Re: [Zope] How to make a ZPT-based form that calls itself? (Part II) On 5/19/05, Ken Winter [EMAIL PROTECTED]

Re: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-19 Thread Lennart Regebro
On 5/19/05, Ken Winter [EMAIL PROTECTED] wrote: * I assume you include data retrieved from (and updated in) an underlying relational database. * Does data also include parameters (or arguments, or query string variables, or whatever you call them) passed from one HTML page to the next?

RE: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-19 Thread Ken Winter
-Original Message- From: Lennart Regebro [mailto:[EMAIL PROTECTED] Sent: Thursday, May 19, 2005 11:07 AM To: [EMAIL PROTECTED] Cc: J Cameron Cooper; zope@zope.org Subject: Re: [Zope] How to make a ZPT-based form that calls itself? (Part II) On 5/19/05, Ken Winter [EMAIL

Re: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-19 Thread Lennart Regebro
What's wrong with this picture? This: context.REQUEST.RESPONSE.redirect('personform.htm') When you do this, you loose everything in the form. When you then in the personform.htm do context.REQUEST.person_id you get a key-error. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content

RE: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-19 Thread Ken Winter
-Original Message- From: Lennart Regebro [mailto:[EMAIL PROTECTED] Sent: Thursday, May 19, 2005 12:03 PM To: [EMAIL PROTECTED] Cc: J Cameron Cooper; zope@zope.org Subject: Re: [Zope] How to make a ZPT-based form that calls itself? (Part II) What's wrong with this picture?

Re: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-19 Thread Lennart Regebro
On 5/19/05, Ken Winter [EMAIL PROTECTED] wrote: But that just changed the error to KeyError: 'personform_htm'. Well, it's 'personform.htm', not undescore, right? -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/

RE: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-19 Thread Tino Wildenhain
Am Donnerstag, den 19.05.2005, 11:56 -0400 schrieb Ken Winter: -Original Message- From: Lennart Regebro [mailto:[EMAIL PROTECTED] Sent: Thursday, May 19, 2005 11:07 AM To: [EMAIL PROTECTED] Cc: J Cameron Cooper; zope@zope.org Subject: Re: [Zope] How to make a ZPT-based form

RE: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-18 Thread Ken Winter
In Part I, J Cameron Cooper showed me how to write a ZPT-based form that displayed a list of database records and gave the user a chance to delete one of them, after which the form redisplayed itself with a refreshed list that reflected the deletion just performed. The core of this was this

Re: [Zope] How to make a ZPT-based form that calls itself? (Part II)

2005-05-18 Thread Paul Winkler
On Wed, May 18, 2005 at 07:32:29PM -0400, Ken Winter wrote: The difference between this and the deletion example is that this form (personform.htm) need to be called with an argument, giving the person_id that identifies the record it is supposed to display. I have tried a number of ways to

Re: [Zope] How to make a ZPT-based form that calls itself?

2005-05-11 Thread J Cameron Cooper
Ken Winter wrote: Hi Zopers - I'm trying to make a ZPT-based HTML form that: 1. Displays the records in a MySQL 'Person' table; 2. Offers a field for updating this table (in my simple test example, it accepts the Id of a Person to delete); 3. When you push its 'Submit' button, updates the

RE: [Zope] How to make a ZPT-based form that calls itself?

2005-05-11 Thread Ken Winter
-Original Message- From: J Cameron Cooper [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 11, 2005 4:27 PM To: [EMAIL PROTECTED] Cc: zope@zope.org Subject: Re: [Zope] How to make a ZPT-based form that calls itself? Ken Winter wrote: Hi Zopers - I'm trying to make a ZPT-based

Re: [Zope] How to make a ZPT-based form that calls itself?

2005-05-11 Thread Phillip Hutchings
Case A: return context.some_page() Case B: context.REQUEST.RESPONSE.redirect('some_page') GREAT!! Case B works perfectly (and it would have taken me forever to guess this solution). Case A didn't work when written as return context.deltest.htm() Of course it didn't,

Re: [Zope] How to make a ZPT-based form that calls itself?

2005-05-11 Thread J Cameron Cooper
Ken Winter wrote: -Original Message- From: J Cameron Cooper [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 11, 2005 4:27 PM To: [EMAIL PROTECTED] Cc: zope@zope.org Subject: Re: [Zope] How to make a ZPT-based form that calls itself? Ken Winter wrote: Hi Zopers - I'm trying to make a

Re: [Zope] How to make a ZPT-based form that calls itself?

2005-05-11 Thread Paul Winkler
On Wed, May 11, 2005 at 04:51:33PM -0500, J Cameron Cooper wrote: Look at your Python. It understands a dot as an attribute access. That's why Zope historically avoids dotted object names. Witness 'index_html'. You may use dictionary lookup: context['deltest.htm']() or getattr. But