[Zope] Problem with Zclass Property Sheet

Jochen Haeberle listen@midras.de
Thu, 30 Jan 2003 20:15:33 +0100


--Apple-Mail-6--925060043
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=WINDOWS-1252;
	format=flowed

Hi,

as to 1) I guess you used a checkbox to represent yor boolean=20
property?? If so, those beasts are a little nasty to handle.
If you uncheck a checkbox in a HTML from, it means that the value will=20=

not be posted to the recieving action at all!

So you need to check if the variable is posted at all, if not, you need=20=

to set the boolean property to 0 by yourself.

There are ways around this in your form, but this might be the=20
solution...

Cheers
Jochen

Am Donnerstag, 30.01.03, um 18:33 Uhr (Europe/Berlin) schrieb pieter=20
claassen:

> Hello,
>
> =A0
>
> I have developed a product with ZClasses called Newster. The newsclass=20=

> contains a subclass called message that contains the messages.
>
> =A0
>
> Everything works really swell (you can see the frontpage at=20
> www.openauth.co.uk ) but I have the following problems:
>
> 1.	I tried to create a Boolean property in the message class basic=20=

> property sheet to tick to expire messages. However, when I create a=20
> propert_sheet_interface, the template code is generated fine except=20
> that for some reason the Boolean property doesn=92t work properly. I=20=

> cannot unselect it once it is selected and no matter how much I=20
> scratch around in the code, I cannot resolve this issue. In the end I=20=

> replaced the Boolean property with a string object and just set it=20
> from 0 to 1 when I want to expire messaged. Is this a known issue and=20=

> is there a Boolean based workaround?
> 2.	Also, how do I give my Zope product an icon in the free view? I=20=

> guess I have to set this somewhere in the Zclass, but how?
>
> =A0
>
> All help appreciated,
>
> Thanks,
>
> Pieter
>

--Apple-Mail-6--925060043
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
	charset=WINDOWS-1252

Hi,


as to 1) I guess you used a checkbox to represent yor boolean
property?? If so, those beasts are a little nasty to handle.

If you uncheck a checkbox in a HTML from, it means that the value will
not be posted to the recieving action at all!


So you need to check if the variable is posted at all, if not, you
need to set the boolean property to 0 by yourself.


There are ways around this in your form, but this might be the
solution...


Cheers

Jochen


Am Donnerstag, 30.01.03, um 18:33 Uhr (Europe/Berlin) schrieb pieter
claassen:


=
<excerpt><fontfamily><param>Arial</param><smaller>Hello,</smaller></fontfa=
mily>


<fontfamily><param>Arial</param><smaller>=A0</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>I have developed a product
with ZClasses called Newster. The newsclass contains a subclass called
message that contains the messages.</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>=A0</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>Everything works really swell
(you can see the frontpage at
=
<underline><color><param>0000,0000,FFFF</param>www.openauth.co.uk</color><=
/underline>
) but I have the following problems:</smaller></fontfamily>


1.	<fontfamily><param>Arial</param><smaller>I tried to create a
Boolean property in the message class basic property sheet to tick to
expire messages. However, when I create a propert_sheet_interface, the
template code is generated fine except that for some reason the
Boolean property doesn=92t work properly. I cannot unselect it once it
is selected and no matter how much I scratch around in the code, I
cannot resolve this issue. In the end I replaced the Boolean property
with a string object and just set it from 0 to 1 when I want to expire
messaged. Is this a known issue and is there a Boolean based
workaround?</smaller></fontfamily>

2.	<fontfamily><param>Arial</param><smaller>Also, how do I give my
Zope product an icon in the free view? I guess I have to set this
somewhere in the Zclass, but how?</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>=A0</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>All help =
appreciated,</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>Thanks,</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>Pieter</smaller></fontfamily>


</excerpt>=

--Apple-Mail-6--925060043--