[Zope3-Users] z3c.form - How to register IFormLayer?
Hermann Himmelbauer
dusty at qwer.tk
Thu Jun 21 02:06:30 EDT 2007
Am Mittwoch, 20. Juni 2007 00:24 schrieb Stephan Richter:
> On Friday 15 June 2007 12:10, Hermann Himmelbauer wrote:
> > So, at first, what's the idea with this IFormLayer? Why does any request
> > to provide this interface? How can I tell Zope that all requests
> > implement this interface?
>
> The problem with the older form-related frameworks is that their
> registrations are made on the default browser layer, making it (1) very
> hard to selectively add registrations to your own layer/skin, and (2)
> polluting the default browser layer.
>
> z3c.form fixes this problem by creating a new layer dedicated to the form
> registrations. All you need to do is to inherit this layer in your custom
> skin to get the form registrations to work. Philipp provided the sample
> code already.
>
> Yes, this does mean that z3c.form cannot be used within any of the default
> skins, such as Rotterdam, but that's exactely the point. Of course, you can
> just simply make all the registrations in the Rotterdam layer/skin and
> z3c.form will be available there.
Thanks, I temporarily fixed my problem by creating a skin which inherits from
Rotterdam + IFormLayer, now z3c.form work.
It seems as if the trend is going away from ZMI - is that true? At least for
me, customizing ZMI for my application is quite painful, it seems a lot
easier to use z3c.layer instead. On the other hand, ZMI offers some
functionality, such as add/delete/cut & paste etc. which I'd have to rewrite
for many applications, so ZMI is quite appealing, too.
Or is it perhaps possible to use such functionality in my z3c.layer.pagelet -
based skin?
Best Regards,
Hermann
--
x1 at aon.at
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7
More information about the Zope3-users
mailing list