Nuxeo mailing list archives
[CPS-devel] can call script via url but not from script
Joachim Schmitz
js at aixtraware.de
Thu Nov 9 22:10:25 CET 2006
In the port_root I have a ProxyFolder campus of portal_type University.
In the University-Class I defined a routine to get a certain value.
when I call this via the browser-url like so:
http://www.test.de/srp/campus/getHallTitle?hall=xxx
the correct title is returned.
but when I call it in a script:
context.portal_url.getPortalObject().campus.getHallTitle("xxx")
I get an attribute error "getHallTitle"
this works also in a script:
context.restrictedTraverse("%s/campus/getHallTitle" %
(context.portal_url.getPortalPath()))("xxx")
I consider this a little bit weird
--
Gruß Joachim
This list archive provided by Nuxeo, the
leaders of open source ECM.
Check out the Nuxeo 5 open source,
standards-based ECM project.