can't get wizard to work

Replies: 1
Up one level
Pages: [1]
can't get wizard to work
« on: January 14, 2010 19:32:12 +0000 »
I'm trying to figure out how to make a wizard. Looked at some code in z3ext.cache and some other places but still get "page not found" when trying to access

....atestcase/editwizard.html
and
....atestcase/editwizard.html/requirements


The important pieces of code follow:


class ITestcaseWizard(interface.Interface):
    pass

class TestcaseEditWizard(Wizard):
    interface.implements(ITestcaseWizard)


class RequirementsStep(WizardStepForm):
    interface.implements(ISaveable)
   
    fields = Fields(IRequirements)





    <z3ext:pagelet
        name="editwizard.html"
        for="..interfaces.ITestcaseType
               ..interfaces.ITestcase"
        class=".testcasewizard.TestcaseEditWizard"
        permission="z3ext.ModifyContent"
        />
       
    <z3ext:pagelet
        name="requirements"
        type="wizard.step"
        title="Testcase Requirements"
        label="Requirements"
        for=".testcasewizard.ITestcaseWizard"
        class=".testcasewizard.RequirementsStep"
        weight="1"
        />



Anyplace else I should be looking at?


Re: can't get wizard to work
« on: January 14, 2010 23:53:28 +0000 »
Some more hints.. I removed ITestcaseType from the "for" entry and could get things a bit more ahead but still not there...

>>> getMultiAdapter((testcase, request), name=u"editwizard.html")
<z3ext.layout.zcml.PageletClass from <class 'tp4.contenttype.testcase.browser.testcasewizard.TestcaseEditWizard'> object at 0xab8d06c>
>>> twizard = getMultiAdapter((testcase, request), name=u"editwizard.html")
>>> getMultiAdapter((twizard, request), name=u"requirements")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/gustavo/.buildout/eggs/zope.component-3.4.0-py2.5.egg/zope/component/_api.py", line 101, in getMultiAdapter
    adapter = queryMultiAdapter(objects, interface, name, context=context)
  File "/home/gustavo/.buildout/eggs/zope.component-3.4.0-py2.5.egg/zope/component/_api.py", line 114, in queryMultiAdapter
    return sitemanager.queryMultiAdapter(objects, interface, name, default)
  File "/home/gustavo/.buildout/eggs/zope.component-3.4.0-py2.5.egg/zope/component/registry.py", line 207, in queryMultiAdapter
    objects, interface, name, default)
  File "/home/gustavo/.buildout/eggs/zope.interface-3.4.1-py2.5-linux-i686.egg/zope/interface/adapter.py", line 482, in queryMultiAdapter
    result = factory(*objects)
TypeError: __init__() takes at least 4 arguments (3 given)

Actions

Notifications