Re: [Zope3-Users] z3c.form / TextLine-Schema in List-Schema

2007-09-03 Thread Markus Leist
Hi

some addition to my mail:

this is an object-instance from 
http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/net/interfaces.py :
http://demo1.ict-ok.org/243cc85c808da990a939a4ae361c67a12/edit.html
all works great

this is an object-instance from 
http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/host/interfaces.py :
http://demo1.ict-ok.org/243cc85c808da990a939a4ae361c67a12/c1c0f0290ac1034b761044ea233dbf9f7/edit.html
with the error:
> ComponentLookupError: ((, 
>  0x958d96c>,  URL=http://demo1.ict-ok.org/243cc85c808da990a939a4ae361c67a
> 12/c1c0f0290ac1034b761044ea233dbf9f7/edit.html>),  z3c.form.interfaces.IFieldWidget>, u'')
the error (with stacktrace) will be renderd in the web-page, too.

We can try out any idea on the test-site above:
http://demo1.ict-ok.org
login is: 'zope3', password 'zope3'   (valid on 2007-09-03)

Markus

ps. yes, z3c.form is great, but also complicated ..

Am Montag 03 September 2007 um 11:33 Uhr schrieb Markus Leist <[EMAIL 
PROTECTED]>:
> Hello,
> 
> i've tried out diffenrent parts of z3c.formdemo, but there is noch 
> schema.List from schema.Textline
> example in the demo.
> 
> when omitting the osList-attribute by:
> > 109 fields = 
> > field.Fields(IHost).omit(*HostDetails.omit_editfields)
> > [see 
> > http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/host/browser/host.py
> >  ]
> > with HostDetails.omit_editfields = ['osList']
> z3c.form work great, so accordingly the request must be ok, right?
> 
> form registration is in line 44 of 
> http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/host/browser/configure.zcml
> 
> you can see my IFormLayer in
> http://trac.ict-ok.org/browser/trunk/org/ict_ok/skin/interfaces.py line 27
> 
> the widget from z3c.form are "too sharp for me". I think, there is my problem.
> 
> Thanx so far
> 
> Markus
>
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form / TextLine-Schema in List-Schema

2007-09-03 Thread Markus Leist
Hello,

i've tried out diffenrent parts of z3c.formdemo, but there is noch schema.List 
from schema.Textline
example in the demo.

when omitting the osList-attribute by:
> 109   fields = field.Fields(IHost).omit(*HostDetails.omit_editfields)
> [see 
> http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/host/browser/host.py
>  ]
> with HostDetails.omit_editfields = ['osList']
z3c.form work great, so accordingly the request must be ok, right?

form registration is in line 44 of 
http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/host/browser/configure.zcml

you can see my IFormLayer in
http://trac.ict-ok.org/browser/trunk/org/ict_ok/skin/interfaces.py line 27

the widget from z3c.form are "too sharp for me". I think, there is my problem.

Thanx so far

Markus

Am Montag 03 September 2007 um 10:39 Uhr schrieb Hermann Himmelbauer <[EMAIL 
PROTECTED]>:
> Am Sonntag, 2. September 2007 18:26 schrieb Markus Leist:
> > Hi list,
> >
> > z3c.form has a very generic, well approach - but at the moment it's to
> > complicated to me.
> >
> > I have an interface defined like:
> >
> > 100 osList = List (
> > 101 title = _("operating systems"),
> > 103 value_type = TextLine(
> > 105 title = _("Operatingsystem"),
> > 107 default = u"",
> > 108 required = False),
> > 109 required = False)
> > [originally from
> > http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/host/interfaces.
> >py ]
> >
> > when z3c.form will do his update, i'll get a
> >
> > ComponentLookupError: (
> >   (,
> >,
> > > URL=http://localhost:8081/cc071bd954f8fd7b3fccf9fab2b1c7b58/add_host.html>)
> >, , u'')
> > [full trace on http://paste.lisp.org/display/47105 ]
> 
> I think I know that one: Your request object hast to be marked with the 
> appropriate interface, in this case it's IFormLayer.
> 
> I recommend you to have a decent look at z3c.formdemo.
> 
> To sum my z3c.form-experience up: In the beginning it's quite hard and 
> complicated, although the documentation is good. One has to deeply understand 
> the component-based software design (Interfaces, Adapters etc.) and other 
> packages (e.g. pagelets). However it pays off later on, because other 
> alternatives (e.g. formlib) are too limiting for many use cases.
> 
> Best Regards,
> Hermann
> 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form / TextLine-Schema in List-Schema

2007-09-03 Thread Hermann Himmelbauer
Am Sonntag, 2. September 2007 18:26 schrieb Markus Leist:
> Hi list,
>
> z3c.form has a very generic, well approach - but at the moment it's to
> complicated to me.
>
> I have an interface defined like:
>
> 100   osList = List (
> 101   title = _("operating systems"),
> 103   value_type = TextLine(
> 105   title = _("Operatingsystem"),
> 107   default = u"",
> 108   required = False),
> 109   required = False)
> [originally from
> http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/host/interfaces.
>py ]
>
> when z3c.form will do his update, i'll get a
>
> ComponentLookupError: (
>   (,
>,
> URL=http://localhost:8081/cc071bd954f8fd7b3fccf9fab2b1c7b58/add_host.html>)
>, , u'')
> [full trace on http://paste.lisp.org/display/47105 ]

I think I know that one: Your request object hast to be marked with the 
appropriate interface, in this case it's IFormLayer.

I recommend you to have a decent look at z3c.formdemo.

To sum my z3c.form-experience up: In the beginning it's quite hard and 
complicated, although the documentation is good. One has to deeply understand 
the component-based software design (Interfaces, Adapters etc.) and other 
packages (e.g. pagelets). However it pays off later on, because other 
alternatives (e.g. formlib) are too limiting for many use cases.

Best Regards,
Hermann

-- 
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] z3c.form / TextLine-Schema in List-Schema

2007-09-02 Thread Markus Leist
Hi list,

z3c.form has a very generic, well approach - but at the moment it's to 
complicated to me.

I have an interface defined like:

100 osList = List (
101 title = _("operating systems"),
103 value_type = TextLine(
105 title = _("Operatingsystem"),
107 default = u"",
108 required = False),
109 required = False)
[originally from 
http://trac.ict-ok.org/browser/trunk/org/ict_ok/components/host/interfaces.py ]

when z3c.form will do his update, i'll get a

ComponentLookupError: (
  (,
   ,
   http://localhost:8081/cc071bd954f8fd7b3fccf9fab2b1c7b58/add_host.html>),
 , u'')
[full trace on http://paste.lisp.org/display/47105 ]

ok, the problem is in getMultiAdapter() .. 
which does'n find the correct widget to render a TextLine into a 
List-HTML-Widget.

(After hours of searching, i feel stupid ... but it's not rocket science, or?)

Where and how such a widget must be registered and implemented?

Does anyone have such an extension of the ze3.form-widgets or
can tell me a kind of skeleton for this approach?

Can we migrate code from zope.formlib to z3c.form?

Any help would be appreciated.

Markus
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users