[ZPT] passing values to external methods from a template

Michael Fischer v. Mollard mfvm@businessvillage.de
Fri, 04 Oct 2002 09:41:15 +0200


Tim Lynch wrote:

>When I follow this as given, I get:
>
>Error Type: NameError
>Error Value: global name 'getStateName' is not defined
>
>
>
>If I revise the ext. method call to:
>            <span tal:replace="here/getStateName" />
>
>the call succeeds using the default value. 
>
>But, I can't figure out how to pass in a value.
>
>The external method is OK; I've tested it outside of zope.
>(actually, my version is not making an xml-rpc call at all -- 
>it's just returning whatever number is passed in as a sring)
>
>I'm running Zope 2.60b1
>
>
>So, how do I invoke an external method and pass it a value?
>
>  
>
As allways
 <span tal:replace="python:here.getStateName(stateNumber)" />


MfG
    MFvM