Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Hermann Himmelbauer
Am Mittwoch, 4. Juli 2007 00:33 schrieb Matt Bowen:
 That was not at all a silly question! That got me a little closer -- I am
 new enough not to have understood that i needed the ++skin++. Now, instead
 of a 404 page, I get the following when I try to display my object:

 127.0.0.1 - - [03/Jul/2007:18:26:54 -0400] GET
 /++skin++MovingTargetBrowser/viewguy/ HTTP/1.1 500 131 - Mozilla/5.0
 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.4) Gecko/20070515
 Firefox/2.0.0.4
 zope.component.interfaces.ComponentLookupError:
 ((z3c.pagelet.zcml.NextActionDisplayForm object at 0x2affb6d0, 
 zope.publisher.browser.BrowserRequest instance URL=
 http://localhost:9080/++skin++MovingTargetBrowser/viewguy/index.html, 
 movingtarget.nextaction.NextAction object at 0x2adbcf6cd2a8),
 InterfaceClass z3c.form.interfaces.IWidgets, u'')

This looks like some problem with widgets, I'm not sure. Such errors can be 
quite frustrating, I do it like this:

- locate where the adapter is queried, this will be somewhere in the z3c.form 
package
- If not sure, use print 'HERE I AM' statements in the source to find out 
where the exception is raised
- When you found the code line, things hopefully resolve
- Sometimes your object/request is not marked with the requested interface, 
you can check that out with a print 
IRequestedInterface.providedBy(myobject) in the framework source.

I know that it is probably a bad style to temporarily modify the framework 
source but I can't think of a better solution.

Over the time you'll start to smell why these component lookup errors happen 
and resolve them more easily.

 And for edit, I get this:

 127.0.0.1 - - [03/Jul/2007:18:30:30 -0400] GET
 /++skin++MovingTargetBrowser/viewguy/ HTTP/1.1 500 201 - Mozilla/5.0
 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.4) Gecko/20070515
 Firefox/2.0.0.4
 zope.security.interfaces.Unauthorized:
 (z3c.pagelet.zcml.NextActionEditForm object at 0x2af9dfd0,
 'browserDefault', 'zope.ManageContent')

  /opt/zope/zope-3.4.0a1

 /lib/python/zope/app/publication/browser.py(66)getDefaultTraversal()
 - return ob.browserDefault(request)

Maybe you did not log in into the Zope instance? You set the permissions 
to zope.ManageContent, you could also change this to zope.Public and try 
it again.

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


Re: [Zope3-Users] z3c.form 1.4.0, z3c.formui 1.1.0, and z3c.formdemo 1.2.0 released!

2007-07-04 Thread Gary Poster


On Jun 29, 2007, at 10:50 AM, Stephan Richter wrote:


Hello everyone,

again thanks to the great feedback we received -- especially from  
David Pratt,
Roy Mathew, and Joachim Werner -- we were able to fine-tune our new  
form
framework even more to make it as robust of a foundation as  
possible for your
projects! New features include group support, fully  
internationalized widgets

for number and calendar fields, a richer select widget, refined form
templates, and of course a new demo!

BTW, congratulations to Roger who became father for the third time  
last

weekend!


Congratulations Roger!



Again for the curious and impatient ...
---

There is also a new demo, of course! The Questionnaire demo  
provides a form

for filling out a simple questionaire about someones Zope community
involvement and then provides a very simple results page.  
Technically this
demo (available for the DIV- and Table-based layouts) demonstrates  
the usage
of groups, a new feature of this release, as well as writing  
attribute value

adapters.

To run the demos do the following::

  $ svn co svn://svn.zope.org/repos/main/z3c.formdemo/trunk formdemo
  $ cd formdemo
  $ python bootstrap.py
  $ ./bin/buildout -N


This currently fails.

:~/Dev/formdemo gary$ ./bin/buildout -N
Develop: '/Users/gary/Dev/formdemo/.'
Develop: '/Users/gary/Dev/formdemo/z3c.form'
Traceback (most recent call last):
  File /tmp/tmp-58J2C, line 10, in ?
execfile('/Users/gary/Dev/formdemo/z3c.form')
IOError: [Errno 2] No such file or directory: '/Users/gary/Dev/ 
formdemo/z3c.form'

While:
  Installing.
  Processing develop directory '/Users/gary/Dev/formdemo/z3c.form'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:

AssertionError:

Should I just check out z3c.form and put a symlink in there?

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


Re: [Zope3-Users] z3c.form 1.4.0, z3c.formui 1.1.0, and z3c.formdemo 1.2.0 released!

2007-07-04 Thread Stephan Richter
On Wednesday 04 July 2007 10:32, Gary Poster wrote:
 This currently fails.

 :~/Dev/formdemo gary$ ./bin/buildout -N

 Develop: '/Users/gary/Dev/formdemo/.'
 Develop: '/Users/gary/Dev/formdemo/z3c.form'
 Traceback (most recent call last):
    File /tmp/tmp-58J2C, line 10, in ?
      execfile('/Users/gary/Dev/formdemo/z3c.form')
 IOError: [Errno 2] No such file or directory: '/Users/gary/Dev/
 formdemo/z3c.form'
 While:
    Installing.
    Processing develop directory '/Users/gary/Dev/formdemo/z3c.form'.

 An internal error occured due to a bug in either zc.buildout or in a
 recipe being used:

 AssertionError:

 Should I just check out z3c.form and put a symlink in there?

I accidently checked in my development setup making z3c.form and z3c.formui 
develop eggs. I just checked in the fix.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Matt Bowen

Hi again,

I now have all three forms giving me the component lookup error -- as you
sugguested, I changed zope.ManageContent to zope.Public; I'd rather have one
problem at a time. I also have a full traceback, because I realized that I
didn't include one last night:

zope.component.interfaces.ComponentLookupError:
((z3c.pagelet.zcml.NextActionAddForm object at 0x2b69896b4850, 
zope.publisher.browser.BrowserRequest instance URL=
http://localhost:9080/++skin++MovingTargetBrowser/addNextAction.html, 
zope.app.folder.folder.Folder object at 0x2b69896eb0c8), InterfaceClass
z3c.form.interfaces.IWidgets, u'')

/opt/zope/zope-3.4.0a1

/lib/python/zope/component/_api.py(103)getMultiAdapter()
- raise ComponentLookupError(objects, interface, name)
(Pdb)
Traceback (most recent call last):
 File /opt/zope/python2.4//lib/python2.4/threading.py, line 422, in run
   self.__target(*self.__args, **self.__kwargs)
 File /opt/zope/zope-3.4.0a1/lib/python/twisted/python/threadpool.py,
line 148, in _worker
   context.call(ctx, function, *args, **kwargs)
 File /opt/zope/zope-3.4.0a1/lib/python/twisted/python/context.py, line
59, in callWithContext
   return self.currentContext().callWithContext(ctx, func, *args, **kw)
 File /opt/zope/zope-3.4.0a1/lib/python/twisted/python/context.py, line
37, in callWithContext
   return func(*args,**kw)
--- exception caught here ---
 File /opt/zope/zope-3.4.0a1/lib/python/twisted/web2/wsgi.py, line 198,
in run
   result = self.application(self.environment, self.startWSGIResponse)
 File /opt/zope/zope-3.4.0a1/lib/python/zope/app/wsgi/__init__.py, line
72, in __call__
   return app.__call__(environ, start_response)
 File /opt/zope/zope-3.4.0a1/lib/python/zope/app/wsgi/__init__.py, line
54, in __call__
   request = publish(request, handle_errors=handle_errors)
 File /opt/zope/zope-3.4.0a1/lib/python/zope/publisher/publish.py, line
133, in publish
   result = publication.callObject(request, obj)
 File 
/opt/zope/zope-3.4.0a1/lib/python/zope/app/publication/zopepublication.py,
line 161, in callObject
   return mapply(ob, request.getPositionalArguments(), request)
 File /opt/zope/zope-3.4.0a1/lib/python/zope/publisher/publish.py, line
108, in mapply
   return debug_call(obj, args)
 File /opt/zope/zope-3.4.0a1/lib/python/zope/publisher/publish.py, line
114, in debug_call
   return obj(*args)
 File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
1.3.0-py2.4.egg/z3c/form/form.py, line 144, in __call__
   self.update()
 File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
1.3.0-py2.4.egg/z3c/form/form.py, line 139, in update
   super(Form, self).update()
 File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
1.3.0-py2.4.egg/z3c/form/form.py, line 88, in update
   self.updateWidgets()
 File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
1.3.0-py2.4.egg/z3c/form/form.py, line 167, in updateWidgets
   self.widgets = zope.component.getMultiAdapter(
 File /opt/zope/zope-3.4.0a1/lib/python/zope/component/_api.py, line 103,
in getMultiAdapter
   raise ComponentLookupError(objects, interface, name)
zope.component.interfaces.ComponentLookupError: ((
z3c.pagelet.zcml.NextActionAddForm object at 0x2b69896b4850, 
zope.publisher.browser.BrowserRequest instance URL=
http://localhost:9080/++skin++MovingTargetBrowser/addNextAction.html, 
zope.app.folder.folder.Folder object at 0x2b69896eb0c8), InterfaceClass
z3c.form.interfaces.IWidgets, u'')

I keep reading over the .txt files in z3c.form, and I feel like I may be
missing some line. Do I need a datamanager? My schema is pretty
straightforward:

from zope.interface import Interface
from zope.schema import Bool, Text, Datetime, TextLine

class INextAction(Interface):
   Stores next actions, or the next physical
   thing a person can do for a project

   id = TextLine(
   title=u'ID',
   readonly=True,
   required=True)

   description = Text(
   title = uDescription,
   description = uWhat is the next things you can physically do?,
   required = True
   )

   done = Bool(
   title = uDone?,
   description = uIs this Next Action complete?,
   required = False
   )

   due = Datetime(
   title = uDue date.,
   description = uWhen must this action be complete?,
   required = False
   )

Thanks again for all the advice; I feel like I'm making a little more
progress now :)

Gratefully,
Matt

On 7/4/07, Hermann Himmelbauer [EMAIL PROTECTED] wrote:


Am Mittwoch, 4. Juli 2007 00:33 schrieb Matt Bowen:
 That was not at all a silly question! That got me a little closer -- I
am
 new enough not to have understood that i needed the ++skin++. Now,
instead
 of a 404 page, I get the following when I try to display my object:

 127.0.0.1 - - [03/Jul/2007:18:26:54 -0400] GET
 /++skin++MovingTargetBrowser/viewguy/ HTTP/1.1 500 131 - Mozilla/5.0
 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.4) Gecko/20070515
 Firefox/2.0.0.4
 zope.component.interfaces.ComponentLookupError:
 

[Zope3-Users] Re: [Zope] Re: z3c.form 1.4.0, z3c.formui 1.1.0, and z3c.formdemo 1.2.0 released!

2007-07-04 Thread Stephan Richter
On Wednesday 04 July 2007 01:09, Jeff Kowalczyk wrote:
 Something in z3c.formdemo r77305 gives the following error (r77253 builds
 and runs):

I accidently checked in my development buildout.cfg. I fixed that now and 
everything should be fine.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with internationalization

2007-07-04 Thread Dmitry Vasiliev

Jeremy Cook wrote:
Is there an example site where ++lang++whatever works? I have tried 
always with this at the beginning of the path to no avail. It would be 
nice to see it working as a confidence builder.


You can look at my site. :-) It only in Russian for now (since I've 
rebuilt it from scratch about a month ago) but a few fields already 
translated to English so the following URLs work as expected:


http://hlabs.spb.ru/++lang++ru
http://hlabs.spb.ru/++lang++en

--
Dmitry Vasiliev dima at hlabs.spb.ru
http://hlabs.spb.ru
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope] Re: z3c.form 1.4.0, z3c.formui 1.1.0, and z3c.formdemo 1.2.0 released!

2007-07-04 Thread Jeff Kowalczyk
--- Stephan Richter [EMAIL PROTECTED] wrote:
 I accidently checked in my development buildout.cfg. I fixed that now and 
 everything should be fine.

Thanks, after the API update there is one class of errors remaining in
AddressBook, with each FormClass occurrence of:

def updateWidgets(self):
super(AddressForm, self).updateWidgets()
for name, widget in self.widgets.items():
widget.addClass(name)

ERROR SiteError http://localhost:8080/addressbook.html
Traceback (most recent call last):
  File
/software/formdemo/eggs/tmppf6cGx/zope.publisher-3.4.0b1_r76188-py2.4.egg/zope/publisher/publish.py,
line 133, in publish
  File
/software/formdemo/eggs/tmpGGl_q_/zope.app.publication-3.4.0a1_2-py2.4.egg/zope/app/publication/zopepublication.py,
line 167, in callObject
  File
/software/formdemo/eggs/tmppf6cGx/zope.publisher-3.4.0b1_r76188-py2.4.egg/zope/publisher/publish.py,
line 108, in mapply
   - __traceback_info__: security proxied z3c.pagelet.zcml.AddressBook
instance at 0x8ea1c4c
  File
/software/formdemo/eggs/tmppf6cGx/zope.publisher-3.4.0b1_r76188-py2.4.egg/zope/publisher/publish.py,
line 114, in debug_call
  File /software/formdemo/src/z3c/formdemo/addressbook/browser.py, line 412,
in __call__
self.update()
  File /software/formdemo/src/z3c/formdemo/addressbook/browser.py, line 397,
in update
self.form.update()
  File /software/formdemo/src/z3c/formdemo/addressbook/browser.py, line 275,
in update
self.phonesForm.update()
  File /software/formdemo/src/z3c/formdemo/addressbook/browser.py, line 176,
in update
form.update()
  File /software/formdemo/eggs/z3c.form-1.4.0-py2.4.egg/z3c/form/subform.py,
line 55, in update
super(EditSubForm, self).update()
  File /software/formdemo/eggs/z3c.form-1.4.0-py2.4.egg/z3c/form/form.py,
line 96, in update
self.updateWidgets()
  File /software/formdemo/src/z3c/formdemo/addressbook/browser.py, line 136,
in updateWidgets
widget.addClass(name)
AttributeError: 'TextWidget' object has no attribute 'addClass'


BTW, is the mailing list the right place to report minor issues with zope3
packages or add-ons like formdemo? This thread was also started crossposted,
should it be zope3-users only?

Thanks.



   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=listsid=396545433
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope] Re: z3c.form 1.4.0, z3c.formui 1.1.0, and z3c.formdemo 1.2.0 released!

2007-07-04 Thread Stephan Richter
On Wednesday 04 July 2007 14:21, Jeff Kowalczyk wrote:
 --- Stephan Richter [EMAIL PROTECTED] wrote:
  I accidently checked in my development buildout.cfg. I fixed that now and
  everything should be fine.

 Thanks, after the API update there is one class of errors remaining in
 AddressBook, with each FormClass occurrence of:

 def updateWidgets(self):
 super(AddressForm, self).updateWidgets()
 for name, widget in self.widgets.items():
 widget.addClass(name)
...
 AttributeError: 'TextWidget' object has no attribute 'addClass'

This is a new API call. :-) In the next release notes I will ask the users to 
checkout the release tags, so that issues like this do not occur.

I just released new packages, so you have to run buildout without the -N 
option, so that it picks up the latest z3c.form and z3c.formui code.

 BTW, is the mailing list the right place to report minor issues with zope3
 packages or add-ons like formdemo? This thread was also started
 crossposted, should it be zope3-users only?

I think zope3-users is the correct mailing list to address issues with Zope 3 
packages, just to keep the zope mailing list less busy.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form 1.4.0, z3c.formui 1.1.0, and z3c.formdemo 1.2.0 released!

2007-07-04 Thread Stephan Richter
On Friday 29 June 2007 05:43, Darryl Cousins wrote:
  Again for the curious and impatient ...
  ---
 
  There is also a new demo, of course! The Questionnaire demo provides a
  form for filling out a simple questionaire about someones Zope community
  involvement and then provides a very simple results page. Technically
  this demo (available for the DIV- and Table-based layouts) demonstrates
  the usage of groups, a new feature of this release, as well as writing
  attribute value adapters.

 The questionnaire returned with errors (because groups return
 RequiredMissing errors). Should fields be selected to name and age only?
 If not, then is there a template registration missing perhaps for the
 fieldsets?

Does this problem still persist? I have worked with the packages the last days 
and everything seems to work just fine.

  Paul has made some great progress recently and we have now two demos
  working, including a fully Javascript-driven calculator. I'll leave it up
  to Paul to decide whether he wants to make an announcement, but he will
  be definitely promoting his work at EuroPython!
 
  secretTo see the demos: Replace formdemo with formjsdemo and follow
  the instructions above./secret

 Amazing. It sent me diving into jquery packages. You all have provided a
 wonderful set of tools. Thank you. Thank you.

Very cool! I think the jquery stuff is very nice and coming along well. Paul 
will be working on form validation the next days, so stay tuned!

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Stephan Richter
On Wednesday 04 July 2007 06:21, Hermann Himmelbauer wrote:
 I know that it is probably a bad style to temporarily modify the framework
 source but I can't think of a better solution.

I do this all the time! :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Stephan Richter
On Wednesday 04 July 2007 12:59, Matt Bowen wrote:
   File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
 1.3.0-py2.4.egg/z3c/form/form.py, line 144, in __call__
 self.update()
   File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
 1.3.0-py2.4.egg/z3c/form/form.py, line 139, in update
 super(Form, self).update()
   File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
 1.3.0-py2.4.egg/z3c/form/form.py, line 88, in update
 self.updateWidgets()
   File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
 1.3.0-py2.4.egg/z3c/form/form.py, line 167, in updateWidgets
 self.widgets = zope.component.getMultiAdapter(
   File /opt/zope/zope-3.4.0a1/lib/python/zope/component/_api.py, line
 103, in getMultiAdapter
 raise ComponentLookupError(objects, interface, name)
 zope.component.interfaces.ComponentLookupError: ((
 z3c.pagelet.zcml.NextActionAddForm object at 0x2b69896b4850, 
 zope.publisher.browser.BrowserRequest instance URL=
 http://localhost:9080/++skin++MovingTargetBrowser/addNextAction.html, 
 zope.app.folder.folder.Folder object at 0x2b69896eb0c8), InterfaceClass
 z3c.form.interfaces.IWidgets, u'')

This error tells you that the widget manager (implementing ``IWidgets``) 
cannot be found for your (form, request, context) discriminator. This can 
really just mean one of the following three things:

1. Your skin MovingTargetBrowser does *not* inherit from the ``IFormLayer`` 
skin. Can you show us your skin definition in Python and the registration in 
ZCML?

2. Your form does not provide ``IFieldsForm``. What does the following return?

   from z3c.form import interfaces
   interfaces.IFieldsForm.providedBy(form)

  Can you paste your form Python code and the registration?

3. You did not hook up the ZCML files of z3c.form? Are you sure 
z3c/form/configure.zcml is loaded? This can be checked by causing a syntax 
error in that file and see whether the startup also breaks.

 I keep reading over the .txt files in z3c.form, and I feel like I may be
 missing some line. Do I need a datamanager? My schema is pretty
 straightforward:

No, the data manager and everything else is defined for the common case you 
are having.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Stephan Richter
On Wednesday 04 July 2007 14:00, Hermann Himmelbauer wrote:
    File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
  1.3.0-py2.4.egg/z3c/form/form.py, line 167, in updateWidgets
      self.widgets = zope.component.getMultiAdapter(
    File /opt/zope/zope-3.4.0a1/lib/python/zope/component/_api.py, line
  103, in getMultiAdapter
      raise ComponentLookupError(objects, interface, name)
  zope.component.interfaces.ComponentLookupError: ((
  z3c.pagelet.zcml.NextActionAddForm object at 0x2b69896b4850, 
  zope.publisher.browser.BrowserRequest instance URL=
  http://localhost:9080/++skin++MovingTargetBrowser/addNextAction.html, 
  zope.app.folder.folder.Folder object at 0x2b69896eb0c8), InterfaceClass
  z3c.form.interfaces.IWidgets, u'')
 
  I keep reading over the .txt files in z3c.form, and I feel like I may be
  missing some line. Do I need a datamanager? My schema is pretty
  straightforward:

 I'm pretty clueless here, too. What I however don't understand why an
 adapter for a Folder object is queried.

There is no special adapter for folder. It is a triplet-adapter for (form, 
request, context). The context just happens to be a folder. But the default 
IWidgets adapter is registered for (IFieldsForm, IFormLayer, Interface), 
which effectively means that any context will work.

 However, I think the interface is fine and I don't think you need a
 datamanager in your case. I'd check if the request is marked with a
 IFormLayer, though.

Yep IFormLayer is important to inherit in your skin.

 Here's once again the newbie problem: there's a query for an adapter, which
 is for sure registered somewhere in the package, however the objects are
 probably not marked with the right interfaces, so the query fails and it's
 hard to find out why...

I'll note that APIDOC is your friend.

1. I just started up Zope 3, where z3c.form* is installed.
2. Start APIDOC: http://localhost:8080/++apidoc++
3. Click on the Interfaces module
4. Search for IWidgets
5. Click on z3c.form.interfaces.IWidgets
6. Go to the section Adapters that provide this interface:

There you see one entry that tells you how the adapter is registered. You then 
basically have to make sure that your objects provide the necessary 
interfaces.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Stephan Richter
On Tuesday 03 July 2007 08:57, Matt Bowen wrote:
 from z3c.form.interfaces import IFormLayer
 from z3c.layer.pagelet import IPageletBrowserLayer

 class IMovingTargetBrowserLayer(IFormLayer, IPageletBrowserLayer):
 The moving target browser skin layer

 and registered it:
 !-- Moving Target Skin Layer --
   interface
   interface=movingtarget.layer.IMovingTargetBrowserLayer
   type=zope.publisher.interfaces.browser.IBrowserSkinType
   name=MovingTargetLayer
 /

 Then I have a browser skin:

 from z3c.formui import interfaces
 from movingtarget.layer import IMovingTargetBrowserLayer

 class IMovingTargetBrowserSkin(interfaces.IDivFormLayer,
 IMovingTargetBrowserLayer):
 The Moving Target Browser skin

 which I register:

   zope:interface
   interface=movingtarget.skin.browserskin.IMovingTargetBrowserSkin
   type=zope.publisher.interfaces.browser.IBrowserSkinType
   name=MovingTargetBrowser
   /

The skin setup looks good.

   !-- layout template --
   z3c:layout
   for=*
   layer=movingtarget.layer.IMovingTargetBrowserLayer
   template=template.pt
   /

Also good.

 I have very simple edit and display classes:

 class NextActionEditForm(form.EditForm, layout.FormLayoutSupport):
 A simple edit form for Next Actions
 label = uNext Action Edit Form
 fields = field.Fields(INextAction)

 class NextActionDisplayForm(form.DisplayForm, layout.FormLayoutSupport):
 The display form for NextActions
 fields = field.Fields(INextAction)

I am pretty sure that you need the FormLayoutSupport *before* the EditForm and 
DisplayForm in your inheritance order. The super-classes are read from right 
to left, and the layout support in FormLayoutSupport overrides attributes in 
DiaplayForm and EditForm.

 which I *think* I've registered edit and displays view with the following:

   !-- Edit Form --
   z3c:pagelet
   name=edit.html
   for=movingtarget.interfaces.INextAction
   class=.nextaction.NextActionEditForm
   layer=movingtarget.skin.browserskin.IMovingTargetBrowserSkin
   permission=zope.ManageContent
   /

Since you have issues with security, make the permission zope.Public for now.

   !-- Display Form --
   z3c:pagelet
   name=index.html
   for=movingtarget.interfaces.INextAction
   class=.nextaction.NextActionDisplayForm
   layer=movingtarget.skin.browserskin.IMovingTargetBrowserSkin
   permission=zope.Public
   /

   z3c:template
   template=nextactionview.pt
   for=.nextaction.NextActionDisplayForm
   layer=movingtarget.skin.browserskin.IMovingTargetBrowserSkin
   /

Looks all good.

 But when I click on the name of my interpreter-made object, I get a 404.
 Anything obvious I'm missing?

I guess Hermann solved this problem already, suggestinbg that you need the 
++skin++ declaration.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Stephan Richter
On Tuesday 03 July 2007 05:38, Maciej Wisniowski wrote:
 TraversalError: (ErrorViewSnippet for RequiredMissing, 'widget')

People that got this error had either old versions of the code (run buildout 
without -N) and/or had a PYTHONPATH set. Please make sure you have no entry 
in PYTHONPATH.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form 1.4.0, z3c.formui 1.1.0, and z3c.formdemo 1.2.0 released!

2007-07-04 Thread Darryl Cousins
Hi,


On Wed, 2007-07-04 at 16:27 -0400, Stephan Richter wrote:
snip
  The questionnaire returned with errors (because groups return
  RequiredMissing errors). Should fields be selected to name and age only?
  If not, then is there a template registration missing perhaps for the
  fieldsets?
 
 Does this problem still persist? I have worked with the packages the last 
 days 
 and everything seems to work just fine.

And it certainly does. Cheers.

  Amazing. It sent me diving into jquery packages. You all have provided a
  wonderful set of tools. Thank you. Thank you.
 
 Very cool! I think the jquery stuff is very nice and coming along well. Paul 
 will be working on form validation the next days, so stay tuned!

This jquery plugin came to my attention, perhaps you are already aware
of it?

http://malsup.com/jquery/taconite/

Best regards,
DArryl

 
 Regards,
 Stephan

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