question about using parameters and action converters together
Hello, This is working: <input type="submit" value="do-something!" name="apythonscript:method"> but this not: <input type="submit" value="do-something!" name ="apythonscript?number=4:method"> i get this as an answer: Resource not found Resource: http/................apythonscript%3Fnumber%3D4 Why is this and what can i do about it The traceback states: Traceback (innermost last): File M:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 223, in publish_module File M:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 187, in publish File M:\Program Files\Zope\lib\python\Zope\__init__.py, line 226, in zpublisher_exception_hook (Object: hetformulier) File M:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 162, in publish File M:\Program Files\Zope\lib\python\ZPublisher\BaseRequest.py, line 373, in traverse File M:\Program Files\Zope\lib\python\ZPublisher\HTTPResponse.py, line 540, in notFoundError NotFound: (see above) Thanks in advance Hans de Wit Stichting Farmaceutische Kengetallen Postbus 30460 2500 GL DEN HAAG Tel. 070-3737448 Fax 070-3737445
H.de.Wit@SFK.NL writes:
This is working: <input type="submit" value="do-something!" name="apythonscript:method">
but this not: <input type="submit" value="do-something!" name ="apythonscript?number=4:method">
When you use "number" only in this action, then you could use a hidden variable. When you are ready to use JavaScript, you can use a hidden variable even if "number" is used in different actions with different values. You would set the hidden variable's value through JavaScript. Then you can use the "traversal_subpath" binding of Python Scripts. This would allow you to use: <input ... name="apythonscript/4" ...> or <input ... name="apythonscript/number=4" ...> or <input ... name="apythonscript/number/4" ...> and find in your "traversal_subpath" ['4'], ['number=4'] or ['number','4'], respecitvely. Finally, you can look at my Dispatcher Product <http://www.dieter.handshake.de/pyprojects/zope> Dieter
participants (2)
-
Dieter Maurer -
H.de.Wit@SFK.NL