On Mon, Jan 18, 2010 at 10:31 AM, Felipe Rodrigues < [email protected]> wrote:
> That's a little better.. thanks > > Originally, the function returned Any... and this led to problems (people returning HTML, Strings, etc.) It turns out that 95% of the time, you want to do something to tell the user that the server did something (unless the function sends a message to a CometActor), so using the type-system to make sure Ajax functions returned JsCmds was the right answer. > > greekscala wrote: > >> Hello, >> >> know what you mean. You can use JsCmds._Noop to return "nohting" as >> JsCmd. >> >> best regards >> >> On 18 Jan., 17:25, Felipe Rodrigues <[email protected]> >> wrote: >> >> >>> Here is how I made it, but seems ugly: >>> >>> SHtml.a(() => {serverSideFunction(t.text); Call("void", Num(0)).cmd}, t) >>> >>> It is awkward having to add a JsCmd even when I don't need it. >>> >>> Felipe >>> >>> Naftoli Gugenheim wrote: >>> >>> >>>> Never mind my question; I hadn't paid attention to the subject. >>>> ------------------------------------- >>>> Felipe Rodrigues<[email protected]> wrote: >>>> Hi all, >>>> I want to create a link which when clicked calls a server side >>>> function. >>>> No need for JavaScript callback. >>>> I tried with no success: >>>> SHtml.a(() => {serverSideFunction(t.text)}, t) >>>> Any idea how can I accomplish that will be appreciated. >>>> Thanks, >>>> Felipe >>>> >>>> >>> > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
