[Laszlo-dev] soap support

Henry Minsky hminsky at laszlosystems.com
Fri Dec 12 07:43:16 PST 2008


On Fri, Dec 12, 2008 at 2:48 AM, ono keiji <keiji_ono at net8.co.jp> wrote:
> I have been checking LPP-5172, and i found the cause that the getValue() of param class in rpc.lzx.
> These 2 case code works fine( you can see this in the test/rpc/soap/soaptest3.lzx ).
>
>    1.<remotecall funcname="whatString">
>        <param>
>           <method name="getValue">
>                return canvas.soaptest.makedoc( parent.name, s.text );
>           </method>
>        </param>
>      </remotecall>
>                      :
>      <button text="whatString" onclick="canvas.soaptest.whatString.invoke()"/>
>
>    2.<remotecall funcname="whatString"/>
>                      :
>      <button text="whatString" onclick="canvas.soaptest.whatString.invoke( canvas.soaptest.makedoc( parent.name, s.text ), null )"/>
>
> But this code dose not work.This is the popular style, as in dev-guide and api-ref.And this works in lps-3.3.3.
>
>    3.<remotecall funcname="whatString">
>          <param value="${canvas.soaptest.makedoc( parent.name, s.text )}"/>
>      </remotecall>
>                      :
>      <button text="whatString" onclick="canvas.soaptest.whatString.invoke()"/>
>
>
> From these, i guess it is bad to implement the getValue() at param class in rpc.lzx.
> So i suspicious the type of value attribute in param class. It is 'expression' now.
>
> Any advices?
>
> ono keiji
>
>

I don't think that the schema data-type of the "value"  attribute
would affect this case, because the
value is being set by a constraint function.

The schema data type of an attribute  ( "expression". "string",
"color", etc ) only
affects how the tag compiler compiles *constant* values in the source
code, such as

<view x="100">
or
<view bgcolor="red">

These get emitted as javascript which creates initialization values
for these attributes. But if the
value is a constraint, like
<view x="${canvas.width}">

Then the compiler emits code which turns that into a handler to set
the value to the result of your  constraint expression, and  the data
type of the attribute from the schema is not used in that case.


More information about the Laszlo-dev mailing list