Whoops. Should've checked this before I responded to the previous email.
Glad you figured it out.
Chas.
glenn wrote:
> I found the problem. AjaxCall method returns a tuple, (String, JsExp).
>
> So, I just needed to change onclick function to
> onclick={SHtml.ajaxCall(Str("Button1"),ajaxFunc
Sorry, I should have been more explicit.
The UnprefixedAttribute is your "onclick" attribute. The first parameter
(a string) is "onclick." The third parambers (MetaData) is null. What
you are passing is the second parameter, which can be a) an Option
containing a Seq of scala.xml.Nodes, b) ano
The reason for the tuple is Lift's garbage collection mechanism.
However due to some jQuery issues regarding namespaces, this mechanism
is not yet used instead a more generalized GC mechanism is today in
place.
Note that you also have SHtml.makeAjaxCall function that just returns
the JsExp.
Br's
I found the problem. AjaxCall method returns a tuple, (String, JsExp).
So, I just needed to change onclick function to
onclick={SHtml.ajaxCall(Str("Button1"),ajaxFunc _)._2}
and all works as it should. I'm learning scala as I go along.
On Apr 20, 3:40 pm, "Charles F. Munat" wrote:
> There
Charles,
Actually, no, it doesn't help.
The error appears to refer to the third parameter to bind:
"button1" -> Press me
I suspect the compiler doesn't like this construct
{SHtml.ajaxCall(Str ("Button1"),ajaxFunc _)} for the onclick
handler.
even though the call to SHtml.ajaxCall in the cons
There are three constructors for UnprefixedAttribute (used to add
unprefixed attributes to XML elements).
All three return an instance of scala.xml.MetaData (attributes are a
subclass of MetaData).
The first takes:
a String,
an Option containing a Seq of scala.xml.Nodes,
and another piece of