One last question, is there any way to give an ajaxText some kind of style/class/id attribute? I looked at the source but it was really hard to get the hang of it.
best regards. On 21 Jan., 02:05, Franz Bettag <fr...@bett.ag> wrote: > Ah, i was already wondering if that was a typo or what it does =) > thank you very much. > > The project is coming along nicely. You really notice the performance > difference between our old one (ruby based) and scala. Lift delivery > the list of all subnets in 2.6 seconds. Merb needed almost 8 seconds > for the same request. > > I must admit that the merb project used amqp to collect remote data > and i use akka now, but the performance boost is kinda incredible. > Also on the merb-implementation, i had most of the rendering done by > JS since rendering everything with ruby slowed down everything for > another few seconds, on lift it works even faster on the client side > since it already does the output-generation in a nip of a second. > > Kudos! > > On 21 Jan., 01:24, Ross Mellgren <dri...@gmail.com> wrote: > > > Use & to combine JsCmd. e.g. > > > JsShowId("ajax-spinner") & SetHtml("subnet-1234", <span>my awesome subnet > > contents</span>) > > > -Ross > > > On Jan 20, 2010, at 7:16 PM, Franz Bettag wrote: > > > > Works like a charm now! Thanks! > > > > One last question tho, is it possible to get a client-Side-callback > > > for net.liftweb.http.SHtml.a? > > > I want to start showing a specific ajax spinner (have more than one on > > > the page) upon pressing a special link. > > > > I don't get how i might "chain" them together. :) > > > > On 20 Jan., 22:15, Franz Bettag <fr...@bett.ag> wrote: > > >> Of course i forgot to paste the snippet..http://pastie.org/787160 > > > >> On 20 Jan., 21:44, Ross Mellgren <dri...@gmail.com> wrote: > > > >>> Scala can't figure out what type of parameter you mean, so you need to > > >>> annotate it -- "expand" -> (fooXhtml: NodeSeq) => {... } > > > >>> Or use a separately named function with a type signature, e.g. > > > >>> def doTheStuff(ns: NodeSeq): NodeSeq) = { Log.error(ns.toStrnig); <span > > >>> /> } > > > >>> bind(..., "expand" -> doTheStuff _) > > > >>> -Ross > > > >>> On Jan 20, 2010, at 3:41 PM, Franz Bettag wrote: > > > >>>> "expand" -> (fooXhtml) => { Log.error(fooXhtml.toString); <span/> }, > > > >>>> error: not a legal formal parameter (pointing at the => ) > > > >>>> On 20 Jan., 21:32, greekscala <hellectro...@gmail.com> wrote: > > >>>>> Hello, > > > >>>>> yes a function that takes NodeSeq parameter and returns > > >>>>> a NodeSeq :) > > > >>>>> "foo" -> (ns) => {function body} or > > >>>>> "foo" -> theCalledFunction > > > >>>>> best regards > > > >>>>> On 20 Jan., 21:26, Franz Bettag <fr...@bett.ag> wrote: > > > >>>>>> How would that look like? > > >>>>>> "foo" => nodeSeqMethod _ ? > > > >>>>>> On 20 Jan., 21:21, Naftoli Gugenheim <naftoli...@gmail.com> wrote: > > > >>>>>>> Meaning to the right of the -> arrow. > > > >>>>>>> ------------------------------------- > > > >>>>>>> Franz Bettag<fr...@bett.ag> wrote: > > > >>>>>>> Ah figured it out. Played long enough around to get the right way: > > > >>>>>>> () => {expand(trafficReply.subnet)} > > > >>>>>>> Another question though, would it be possible to use > > >>>>>>> <IPs:expand><span><traffic:sometag/></span></IPs:expand> and pass > > >>>>>>> the > > >>>>>>> given NodeSeq over the bind into a function? > > > >>>>>>> On 20 Jan., 19:08, Franz Bettag <fr...@bett.ag> wrote: > > > >>>>>>>> Sorry if i am asking a lot of questions lately, but i am trying to > > >>>>>>>> get > > >>>>>>>> this project of mine working so i can write about the specific > > >>>>>>>> problems i ran into and how they got done. > > > >>>>>>>> def subnets(xhtml: NodeSeq): NodeSeq = { > > >>>>>>>> val content = IPnet.findAll(OrderBy(IPnet.name, > > >>>>>>>> Ascending)).map(ip > > >>>>>>>> => { > > > >>>>>>>> /* Bind the xml */ > > >>>>>>>> bind("ip", xhtml, > > >>>>>>>> "subnet" -> Text(ip.name.toString), > > >>>>>>>> "action" -> > > >>>>>>>> SHtml.a(expand(ip.subnet) _, "See all IPs") > > >>>>>>>> ) > > >>>>>>>> }).mkString > > > >>>>>>>> XML.loadString("<span>%s</span>".format(content)) > > >>>>>>>> } > > > >>>>>>>> def expand(subnet: String): JsCmd = { > > >>>>>>>> Log.info("Requested subnet %s".format(subnet)) > > >>>>>>>> Alert("subnet %s was requested".format(subnet)) > > >>>>>>>> } > > > >>>>>>>> The Problem is the "action" that gets binded. I don't get how i > > >>>>>>>> have > > >>>>>>>> to use SHtml.a to pass a value to the called function. Any hints? > > > >>>>>>>> Thank you very much in advance > > > >>>>>>> -- > > >>>>>>> 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 > > >>>>>>> athttp://groups.google.com/group/liftweb?hl=en. > > >>>> -- > > >>>> 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 > > >>>> athttp://groups.google.com/group/liftweb?hl=en. > > > -- > > > 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 > > > athttp://groups.google.com/group/liftweb?hl=en.
-- 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.