This same thing is also touched by http://reviewboard.liftweb.net/r/184/ (driven by Kris' post)
Do you agree with these following statements: 1. The SHtml Ajax function should return JsCmd 2. The SHtml non Ajax function should return a Unit instead of Any (unless there are compelling reasons to keep Any) If so I could probably make the adjustments today since I'm on that defect anyways. Br's, Marius On Jan 22, 5:48 am, David Pollak <feeder.of.the.be...@gmail.com> wrote: > On Mon, Jan 18, 2010 at 10:31 AM, Felipe Rodrigues < > > felipero.maill...@gmail.com> 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 <felipero.maill...@gmail.com> > >> 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<felipero.maill...@gmail.com> 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 lift...@googlegroups.com. > > To unsubscribe from this group, send email to > > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/liftweb?hl=en. > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://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 lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.