Please file a bug at jira.openlaszlo.org. I'm guessing the smallest test case would be:

<canvas>
  <attribute name="z" value="" />
</canvas>

At the very least, the compiler should give you a more informative message. But the question is, do you want the compiler to complain if you have said you want the attribute to have a value, but failed to give it a value (the double-quotes are not part of the value)? Or do you want the compiler to assume that you didn't mean to give it a value after all?

Under the covers, the reason you are getting an error is what you wrote:

  <attribute name="z" value="" />

translates into the following Javascript:

  var z = ;

which is not valid.

On 2008-08-12, at 11:57EDT, Paulo Scardine wrote:

This bug triggers only if I give a value of "", because value is an 'expression' attribute. If I use " ' ' " or "null" it works.

I still think the compiler error message is awfully misleading.

Thanks,
--
Paulo

Paulo Scardine escreveu:

Hi all,

I would like to send some parameters to the backend while using a form component. I tried to use dataset.setQueryParam, but soon I learned that the submit.submit() will wipe any query parameter in the dataset. The I tried to include a hidden form component in the form, something like:

---------8<-----------------------------------------------------
<canvas>

<class name="hiddenfield" extends="baseformitem" />
<class name="xtd_form" extends="form">
  <hiddenfield name="key" value=""/>
</class>

<xtd_form name="a">
  <statictext text="test" />
  <edittext width="200" name="bla" />
</xtd_form>

</canvas>
---------8<-----------------------------------------------------

This will fail with:
---------8<-----------------------------------------------------
Compilation Errors
Syntax error: the attribute value ended in mid-expression.
Look for an unclosed '(', '{', or '['.
---------8<-----------------------------------------------------

Apart from not showing any hint about the location of the offending code, the message itself is very misleading. How nasty!

How do you guys send hidden paramenters to the backend?

Thaks in advance,
--
Paulo






Reply via email to