Re: [Zope-dev] The field converters (:int, :text, etc.)

2001-02-06 Thread ender

my alpha quality dtml-contract tag does allows custom field converters much 
as has been requested here, its meant as a generic form processing engine 
with the ability to define per variable error pages. its got some other 
features. its modeled on the arsdigita (acs) ad_page_contract.

due to my stupidity you have to add a custom filter directly to the filter 
dictionary defined in Filters.py.

fyi for the license impaired its gpl'd

available at www.zope.org/Members/k_vertigo/PageContract.tgz

kapil



> > On 4 Feb 2001, at 15:59, Morten W. Petersen wrote:
> > > IIRC, there was some talk about modularizing the field
> > > converters (checkers) so that they could be easiliy modified
> > > and added to.  Is there currently any efforts to solving
> > > this problem?  If not, there's definently a need for it,
> > > IMO..
> >
> > I agree. Each time I get a Zope update I have to edit Converters.py
> >
> > What I want is something like :empty_as_none
> >
> > So a float, int or date field will be passed as None if the fields are
>
> blank,
>
> > rather than having the converter raising an exception.
> >
> > ignore_empty doesn't work, because then the field isn't passed in the
> > Record at all.
> >
> > I use SQLDict as the backend for all my forms (wow, it's great), so None
> > really is needed for every field if its blank. If I have ignore_empty,
>
> then that
>
> > field doesn't get updated in the database, so if someone wants to blank
> > out a field, they can't do it.
> >
> >
> >
> > Brad Clements,[EMAIL PROTECTED]   (315)268-1000
> > http://www.murkworks.com  (315)268-9812 Fax
> > netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] The field converters (:int, :text, etc.)

2001-02-05 Thread Randall F. Kern

Unselected check boxes aren't in the request, maybe that is what your
thinking of?

-Randy

> -Original Message-
> From: Chris McDonough [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 05, 2001 7:18 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [Zope-dev] The field converters (:int, :text, etc.)
> 
> 
> I don't know, this was about a year ago... maybe I'm misremembering.
> 
> - Original Message -
> From: "Brad Clements" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, February 05, 2001 9:37 AM
> Subject: Re: [Zope-dev] The field converters (:int, :text, etc.)
> 
> 
> > On 5 Feb 2001, at 9:38, Chris McDonough wrote:
> >
> >
> > > The last time I had to mess around with it, IE didn't 
> pass along any
> empty
> > > form fields at all.  Is this still the case?
> >
> >
> > Still?
> >
> > I've never seen the behaviour you describe. My client uses 
> IE exclusively.
> >
> > What version of IE did you test?
> >
> >
> >
> > Brad Clements,[EMAIL PROTECTED]   (315)268-1000
> > http://www.murkworks.com  (315)268-9812 Fax
> > netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> >
> 
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
> 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] The field converters (:int, :text, etc.)

2001-02-05 Thread Chris McDonough

I don't know, this was about a year ago... maybe I'm misremembering.

- Original Message -
From: "Brad Clements" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 9:37 AM
Subject: Re: [Zope-dev] The field converters (:int, :text, etc.)


> On 5 Feb 2001, at 9:38, Chris McDonough wrote:
>
>
> > The last time I had to mess around with it, IE didn't pass along any
empty
> > form fields at all.  Is this still the case?
>
>
> Still?
>
> I've never seen the behaviour you describe. My client uses IE exclusively.
>
> What version of IE did you test?
>
>
>
> Brad Clements,[EMAIL PROTECTED]   (315)268-1000
> http://www.murkworks.com  (315)268-9812 Fax
> netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] The field converters (:int, :text, etc.)

2001-02-05 Thread Brad Clements

On 5 Feb 2001, at 9:38, Chris McDonough wrote:


> The last time I had to mess around with it, IE didn't pass along any empty
> form fields at all.  Is this still the case?


Still?

I've never seen the behaviour you describe. My client uses IE exclusively.

What version of IE did you test?



Brad Clements,[EMAIL PROTECTED]   (315)268-1000
http://www.murkworks.com  (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] The field converters (:int, :text, etc.)

2001-02-05 Thread Chris McDonough

The last time I had to mess around with it, IE didn't pass along any empty
form fields at all.  Is this still the case?

- Original Message -
From: "Brad Clements" <[EMAIL PROTECTED]>
To: "Morten W. Petersen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 8:58 AM
Subject: Re: [Zope-dev] The field converters (:int, :text, etc.)


> On 4 Feb 2001, at 15:59, Morten W. Petersen wrote:
>
> > IIRC, there was some talk about modularizing the field
> > converters (checkers) so that they could be easiliy modified
> > and added to.  Is there currently any efforts to solving
> > this problem?  If not, there's definently a need for it,
> > IMO..
>
> I agree. Each time I get a Zope update I have to edit Converters.py
>
> What I want is something like :empty_as_none
>
> So a float, int or date field will be passed as None if the fields are
blank,
> rather than having the converter raising an exception.
>
> ignore_empty doesn't work, because then the field isn't passed in the
> Record at all.
>
> I use SQLDict as the backend for all my forms (wow, it's great), so None
> really is needed for every field if its blank. If I have ignore_empty,
then that
> field doesn't get updated in the database, so if someone wants to blank
> out a field, they can't do it.
>
>
>
> Brad Clements,[EMAIL PROTECTED]   (315)268-1000
> http://www.murkworks.com  (315)268-9812 Fax
> netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] The field converters (:int, :text, etc.)

2001-02-05 Thread Brad Clements

On 4 Feb 2001, at 15:59, Morten W. Petersen wrote:

> IIRC, there was some talk about modularizing the field
> converters (checkers) so that they could be easiliy modified
> and added to.  Is there currently any efforts to solving
> this problem?  If not, there's definently a need for it,
> IMO..

I agree. Each time I get a Zope update I have to edit Converters.py

What I want is something like :empty_as_none

So a float, int or date field will be passed as None if the fields are blank, 
rather than having the converter raising an exception.

ignore_empty doesn't work, because then the field isn't passed in the 
Record at all. 

I use SQLDict as the backend for all my forms (wow, it's great), so None 
really is needed for every field if its blank. If I have ignore_empty, then that 
field doesn't get updated in the database, so if someone wants to blank 
out a field, they can't do it.



Brad Clements,[EMAIL PROTECTED]   (315)268-1000
http://www.murkworks.com  (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )