Re: [Lift] Re: Actor.timer daemon thread terminates after first request?

2010-01-20 Thread Yu-Shan Fung
Thanks for the reply, David! I finally realized my problem is that I was compiling against the scala 2.7.3 library instead of 2.7.7 as I thought. When I use the newer lib, the exception apparently goes away. Regardless, what would be a good replacement for the scala actors library? Thanks,

[Lift] Using frameset

2010-01-20 Thread Chris Thomet
Hi For one page on my website I need frames. How can I change from doctype 'transitional' to 'frameset'? Thank you! Chris -- 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

[Lift] Re: Welcome Mads Hartmann Jensen to the Lift Committers

2010-01-20 Thread Marius
Welcome Mads ! Please do work on that ... I never got to start working on it :) Br's, Marius On Jan 20, 12:12 am, Mads Hartmann mads...@gmail.com wrote: Thanks guys :) @Timothy Perrett Unless someone beats me to the punch I was thinking about solving

Re: [Lift] Re: Actor.timer daemon thread terminates after first request?

2010-01-20 Thread David Pollak
On Tue, Jan 19, 2010 at 11:58 PM, Yu-Shan Fung ambivale...@gmail.comwrote: Thanks for the reply, David! I finally realized my problem is that I was compiling against the scala 2.7.3 library instead of 2.7.7 as I thought. When I use the newer lib, the exception apparently goes away. Scala

[Lift] Re: Lift and Akka Actors in comparison?

2010-01-20 Thread Franz Bettag
Timothy, did you somehow manage to get them working together? I am at a point where i would want to mix them in my project. :) On 15 Jan., 00:56, Timothy Perrett timo...@getintheloop.eu wrote: No no, theLiftversion was only frozen inAkkabecause of the sample app (it was causing problems whilst

[Lift] How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Hi all, I use two db connections in my app, and I want to use DB.prepareStatement to select the records from the second db. It failed, Here is the code: ### def getHotByTid(id : Long) = DB.use(bootstrap.liftweb.TwoDB) { conn = DB.prepareStatement(SELECT * FROM hots

Re: [Lift] Re: Lift and Akka Actors in comparison?

2010-01-20 Thread David Pollak
On Wed, Jan 20, 2010 at 7:31 AM, Franz Bettag fr...@bett.ag wrote: Timothy, did you somehow manage to get them working together? I am at a point where i would want to mix them in my project. :) Are you saying that you want to have an Akka Actor as a CometActor or just have Akka Actors and

[Lift] Re: Using frameset

2010-01-20 Thread Chris Thomet
Thank you Tim! The doctype is now ok. Unfortunately, my frameset is still not working. By using the code below, Chrome and Firefox are only displaying the title 'Foo'. It works with IE8. Actually it's only not working if the frameset-page is processed by the lift framework. If I open that

[Lift] A better approach to ajax forms?

2010-01-20 Thread Kris Nuttycombe
Hi, all, I'm working on an AJAX form and feel like I'm missing something: namely, how to update the page based upon the result of the form submission. The three ajaxForm methods in SHtml have the following signatures: def ajaxForm(body : NodeSeq) def ajaxForm(body : NodeSeq, onSubmit : JsCmd)

Re: [Lift] How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Jeppe Nejsum Madsen
Neil.Lv anim...@gmail.com writes: Hi all, I use two db connections in my app, and I want to use DB.prepareStatement to select the records from the second db. It failed, Here is the code: ### def getHotByTid(id : Long) = DB.use(bootstrap.liftweb.TwoDB) { conn =

[Lift] Re: A better approach to ajax forms?

2010-01-20 Thread Kris Nuttycombe
On Wed, Jan 20, 2010 at 9:39 AM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: Hi, all, I'm working on an AJAX form and feel like I'm missing something: namely, how to update the page based upon the result of the form submission. The three ajaxForm methods in SHtml have the following

[Lift] What happens between 7000 and 8000 requests?

2010-01-20 Thread Stefan Koenig
Hey everyone, I'm very new to lift, so maybe this is just some production-flip I don't know about, but I made a few performance tests Lift vs. Rails and I was a bit surprised that with my configuration Rails won (for a high number of requests). As I said I'm new to Lift, but am using Rails since

Re: [Lift] What happens between 7000 and 8000 requests?

2010-01-20 Thread Ross Mellgren
I'm not going to try and explain, but I do recommend you run ab two or more times in succession and take the average. HotSpot VMs (the java VM) does selective optimization, so the first run of a benchmark will not be near it's maximum speed. I'm not saying this will resolve the issue for you,

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Thank you very much, But it doesn't work yet, maybe because of using two db connections. I'll test it later again. On Jan 21, 12:44 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Neil.Lv anim...@gmail.com writes: Hi all,   I use two db connections in my app, and I want to use

[Lift] Help understanding lift:comet

2010-01-20 Thread Donald McLean
I am a total newbie trying to learn Scala and Lift. It is a near certainty that my problem is a misunderstanding of something simple so please don't assume that I have a clue. My organization is performing a technology evaluation and the winning technology will be used for an upcoming project.

[Lift] Re: A better approach to ajax forms?

2010-01-20 Thread Kris Nuttycombe
On Wed, Jan 20, 2010 at 9:51 AM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: On Wed, Jan 20, 2010 at 9:39 AM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: Hi, all, I'm working on an AJAX form and feel like I'm missing something: namely, how to update the page based upon the result

Re: [Lift] Re: Lift and Akka Actors in comparison?

2010-01-20 Thread David Pollak
On Wed, Jan 20, 2010 at 9:09 AM, Franz Bettag fr...@bett.ag wrote: What i am trying is, to get a CometActor to receive messages from an Akka Actor. That should just work. Send the message from the Akka Actor to the CometActor. On 20 Jan., 17:13, David Pollak feeder.of.the.be...@gmail.com

Re: [Lift] Help understanding lift:comet

2010-01-20 Thread Naftoli Gugenheim
Also note that the error is not from lift but the browser, if I'm not mistaken. - David Pollakfeeder.of.the.be...@gmail.com wrote: The problem is very simple. You're only binding to the srvstat:up/ tag. Please update: bind(up - upText, down - downText) With

Re: [Lift] Help understanding lift:comet

2010-01-20 Thread David Pollak
On Wed, Jan 20, 2010 at 9:55 AM, Donald McLean dmclea...@gmail.com wrote: Yes, that was simple. Thank you, David. I actually planned on redrawing only on change - I just hadn't gotten that far yet. Okay. Also, for such a small component, you might just want to do a reRender(false) rather

[Lift] Re: Lift and Akka Actors in comparison?

2010-01-20 Thread Franz Bettag
I am having a little bug that i'll investigate. It's prolly something in my cometactor. But in debugging it looks fine so far. On 20 Jan., 18:25, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 20, 2010 at 9:09 AM, Franz Bettag fr...@bett.ag wrote: What i am trying is, to get a

[Lift] Re: Using frameset

2010-01-20 Thread Chris Thomet
it's working now. i have forgotten to add xmlns=http://www.w3.org/ 1999/xhtml in the html element On Jan 20, 5:38 pm, Chris Thomet ch.tho...@gmail.com wrote: Thank you Tim! The doctype is now ok. Unfortunately, my frameset is still not working. By using the code below, Chrome and Firefox are

[Lift] Snippet question

2010-01-20 Thread Franz Bettag
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,

Re: [Lift] Re: Using frameset

2010-01-20 Thread David Pollak
On Wed, Jan 20, 2010 at 10:03 AM, Chris Thomet ch.tho...@gmail.com wrote: it's working now. i have forgotten to add xmlns=http://www.w3.org/ 1999/xhtml http://www.w3.org/%0A1999/xhtml in the html element I'd also strongly recommend setting the character set to UTF-8 for anything that's

[Lift] Mapper FKs

2010-01-20 Thread Naftoli Gugenheim
David and everone, Some time ago we discussed on this list what it would take to have Schemifier generate foreign key constraints. The obvious reason why it doesn't currently is because the relevant flag on all the DriverTypes is set to false. Derek was going to work on it but he got busy and

[Lift] Re: Snippet question

2010-01-20 Thread Franz Bettag
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:expandspantraffic:sometag//span/IPs:expand and pass the given NodeSeq over the bind into a function? On 20 Jan., 19:08, Franz Bettag

Re: [Lift] Re: Snippet question

2010-01-20 Thread Naftoli Gugenheim
You can pass a NodeSeq=NodeSeq function to bind instead of a plain NodeSeq. - Franz Bettagfr...@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

Re: [Lift] Re: Snippet question

2010-01-20 Thread Naftoli Gugenheim
Meaning to the right of the - arrow. - Franz Bettagfr...@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

[Lift] Re: Snippet question

2010-01-20 Thread Franz Bettag
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 Bettagfr...@bett.ag wrote: Ah figured it out. Played long enough around to get the right way:

[Lift] Re: Snippet question

2010-01-20 Thread greekscala
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

[Lift] Re: Snippet question

2010-01-20 Thread Franz Bettag
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

Re: [Lift] Re: Snippet question

2010-01-20 Thread Ross Mellgren
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

Re: [Lift] Re: Snippet question

2010-01-20 Thread Ross Mellgren
Well, it would help to have the compiler error, but I may have gotten precedence wrong. Try: expand - { (fooXhtml: NodeSeq) = ... } instead -Ross On Jan 20, 2010, at 3:51 PM, Franz Bettag wrote: That doesn't seem to fix the compiler error. :) On 20 Jan., 21:44, Ross Mellgren

[Lift] Embedding comet actor in ModalDialog

2010-01-20 Thread ced
Hi all, I'm trying to create some sort of progress notification for a long lasting request. The idea is to answer an ajax request with a JqJsCmds.ModalDialog which embeds a comet actor like so: ajaxButton(Start process, () = ModalDialog(divdivProgress/ divlift:comet type=Progress//div))

[Lift] Re: Snippet question

2010-01-20 Thread Franz Bettag
What i am trying to do, maybe i am doing it all wrong. The html/xml can be found here: http://pastie.org/787126 The question is, what is the best way to render the bound XML which i pass in ip:expand, so that upon the actions click, it will be rendered in the correct table on the page. I haven't

Re: [Lift] Re: Snippet question

2010-01-20 Thread Naftoli Gugenheim
Yes, the problem is the operator precedence. If the function consists of one expression you can use parenthesis instead of curly braces. If you're using curly braces, you don't need the parenthesis around the argument: { ns: NodeSeq = ... - Ross

Re: [Lift] Re: Snippet question

2010-01-20 Thread Naftoli Gugenheim
The problem with writing two spans in Scala is that one is a whole expression. So either concatenate them with ++, or surround them with xml:group..., which is a fake xml element to wrap a few elements as one expression. - Franz Bettagfr...@bett.ag wrote:

[Lift] Re: Snippet question

2010-01-20 Thread Franz Bettag
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

Re: [Lift] Embedding comet actor in ModalDialog

2010-01-20 Thread David Pollak
Due to the way CometActors work, they must be on the originally requested page and cannot currently be delivered via an Ajax response. On Wed, Jan 20, 2010 at 1:00 PM, ced docpom...@googlemail.com wrote: Hi all, I'm trying to create some sort of progress notification for a long lasting

[Lift] Re: Embedding comet actor in ModalDialog

2010-01-20 Thread Marius
I really don't see the need for such use-case. I mean if one wants to see async stuff in a dialog only when the dialog is opened this could be easily done via Ajax requests that will activate/deactivate async messages to client by sending from the ajax functions messages to the comet actor. Is

[Lift] Re: What happens between 7000 and 8000 requests?

2010-01-20 Thread cody koeninger
On Jan 20, 11:03 am, Stefan Koenig koeni...@gmail.com wrote: So basically my questions: Did I do something wrong? Complete requests: 1 Failed requests:9866 (Connect: 0, Receive: 0, Length: 9866, Exceptions: 0) Unless you're intentionally returning a page with dynamic

Re: [Lift] Re: What happens between 7000 and 8000 requests?

2010-01-20 Thread David Pollak
I've updated the project to Lift 2.0-SNAPSHOT It's been my experience that Jetty doesn't always close streams and has problems with benchmarks where it's just open stream, dump stuff out, forget to close stream. I'd suggest trying with Tomcat. I have not seen similar problems in production.

[Lift] Re: Snippet question

2010-01-20 Thread Franz Bettag
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

Re: [Lift] Re: Snippet question

2010-01-20 Thread Ross Mellgren
Use to combine JsCmd. e.g. JsShowId(ajax-spinner) SetHtml(subnet-1234, spanmy 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

Re: [Lift] Re: What happens between 7000 and 8000 requests?

2010-01-20 Thread Derek Williams
I could be wrong here, but I think the failed requests might be due to the jsessionid that jetty adds onto the links, they may be different sizes. I am away from my computer right now and can't test it though. On Jan 20, 2010 5:11 PM, David Pollak feeder.of.the.be...@gmail.com wrote: I've

[Lift] Re: Snippet question

2010-01-20 Thread Franz Bettag
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

[Lift] Ideas for how to inject QueryParams into find() and findAll()

2010-01-20 Thread Franz Bettag
Metaprogramming is still a bit new for me, so here is the question: What would be the cleanest way to implement a parameter-injection into find() and findAll()? The idea is to wrap catch every find() and findAll() and inject for example the User.currentUser's customerId. So it would be quite

Re: [Lift] Ideas for how to inject QueryParams into find() and findAll()

2010-01-20 Thread Naftoli Gugenheim
Why not define a new method? def findByCurUser(params: QueryParam*) = User.currentUser.flatMap(user= find((Seq(By(User.username, user.username.is)) ++ params): _*)) find returns a Box and currentUser does too, so flatMap flattens them into one. Basically find takes a varargs and you're passing a

[Lift] what's S.addAround(DB.buildLoanWrapper) used for?

2010-01-20 Thread XiaomingZheng
a silly question, S.addAround(BS.buildLoadWrapper) seems to be new in lift web application. What's this clouse used for? thanks -- 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

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Mabye it's a bug with DB.runQuery and DB.use in the two db vender Two question: (problem) 1: I don't know why the HelloWorld snippet code will be execute 2 times in this code. (See the HelloWorld.scala file.) 2: The dbDefaultConnectionIdentifier method in the Model that it works fine when

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
My email is : anim...@gmail.com On Jan 21, 11:17 am, Neil.Lv anim...@gmail.com wrote: Mabye it's a bug with DB.runQuery and DB.use in the two db vender Two question: (problem) 1: I don't know why the HelloWorld snippet code will be execute 2 times in this code. (See the

Re: [Lift] what's S.addAround(DB.buildLoanWrapper) used for?

2010-01-20 Thread David Pollak
On Wed, Jan 20, 2010 at 5:52 PM, XiaomingZheng xiaomingzhen...@gmail.comwrote: a silly question, S.addAround(BS.buildLoadWrapper) seems to be new in lift web application. What's this clouse used for? thanks S.addAround takes a LoanWrapper and applies the LoanWrapper with the body of the

Re: [Lift] Ideas for how to inject QueryParams into find() and findAll()

2010-01-20 Thread David Pollak
If you've got a MetaMapper object: object MyTable extends MyTable with MetaMapper[MyTable] In your snippet: MyTable.addlQueryParams.set(By(MyTable.user, User.currentUser)) Or, if you want to do it just as part of a call: MyTable.addQueryParams.doWith(By(MyTable.user, User.currentUser)) { ...

[Lift] Re: Memory behavior in Jetty with CometActor - 25MB of scala.xml.Text!

2010-01-20 Thread Java1Guy
Ok - i've left my Jetty server up and running with one page open... The good news is Jetty hasn't crapped out. It had 500MB of heap space used before a forced GC brought it down to 250MB. The heap dump is interesting: http://twitpic.com/z0xnx almost 25MB of Text objects used by the almost 80K

Re: [Lift] Re: Memory behavior in Jetty with CometActor - 25MB of scala.xml.Text!

2010-01-20 Thread David Pollak
On Wed, Jan 20, 2010 at 9:03 PM, Java1Guy mark.cha...@gmail.com wrote: Ok - i've left my Jetty server up and running with one page open... The good news is Jetty hasn't crapped out. It had 500MB of heap space used before a forced GC brought it down to 250MB. The heap dump is interesting:

Re: [Lift] Re: Memory behavior in Jetty with CometActor - 25MB of scala.xml.Text!

2010-01-20 Thread mark chance
I did post the project to drop.io - http://drop.io/memtest. On Wed, Jan 20, 2010 at 10:06 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 20, 2010 at 9:03 PM, Java1Guy mark.cha...@gmail.com wrote: Ok - i've left my Jetty server up and running with one page open... The

Re: [Lift] Re: Memory behavior in Jetty with CometActor - 25MB of scala.xml.Text!

2010-01-20 Thread David Pollak
On Wed, Jan 20, 2010 at 9:28 PM, mark chance mark.cha...@gmail.com wrote: I did post the project to drop.io - http://drop.io/memtest. This drop is empty On Wed, Jan 20, 2010 at 10:06 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 20, 2010 at 9:03 PM, Java1Guy

[Lift] Re: Memory behavior in Jetty with CometActor - 25MB of scala.xml.Text!

2010-01-20 Thread Java1Guy
Well, no idea where it went :( I'm uploading it again, but this time, I'll keep the heapdump files separate since they're so big. Waiting on drop.io now... Thanks David! On Jan 20, 10:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 20, 2010 at 9:28 PM, mark chance

[Lift] Re: Embedding comet actor in ModalDialog

2010-01-20 Thread ced
@David: Thanks. Now the approach is clear. Is that your use-case ? so see async intems coming from server only when the dialog is opened? @Marius: Yes, it is. I'd like to display a progressbar in the dialog. It seemed to me quite natural to deliver it (the comet component) along with the