[Lift] Re: Errors not shown after AJAX form submit

2010-01-05 Thread Marius
I think the difference is in showAll scope. It was implemented for non Ajax context (just for msgs snippet) but it wasn't implemented for Ajax (as far as I can tell). Ajax notices (if there are any) are appended to user's JsCmd response. But this code has no idea about the showAll snippet

Re: [Lift] Re: [lift] Lift based backend server subscribing via amqp

2010-01-05 Thread Timothy Perrett
We don't accept patches for legal reasons. However, I will upgrade the module today for you - giving a similar result. Cheers, Tim Sent from my iPhone On 5 Jan 2010, at 04:29, Franz Bettag fr...@bett.ag wrote: Hey guys, i've just updated the amqp code. I started a pull request on github

[Lift] Re: multiple forms on a page.

2010-01-05 Thread daiwhea
Thanks David. But this seems not work as wished. It will meet some error: [INFO] Compiling 1 source files to /home/daiwhea/myworks/java/ liftonscala/MapperBBS/target/classes /home/daiwhea/myworks/java/liftonscala/MapperBBS/src/main/scala/com/ vapee/main/snippet/GuestBook.scala:60: error: forward

[Lift] Re: CometActor and JQuery

2010-01-05 Thread martinsema...@googlemail.com
Thanks again, what i want to do is some stuff with a canvas element, where changes are reflected to the other clients. This why i think the SHtml things do not fit for me. I now think the best way would be to use the partialUpdate() of the CometActor to send changes to clients and may be a

Re: [Lift] Re: Errors not shown after AJAX form submit

2010-01-05 Thread Adam Warski
Hello, I think the difference is in showAll scope. It was implemented for non Ajax context (just for msgs snippet) but it wasn't implemented for Ajax (as far as I can tell). Ajax notices (if there are any) are appended to user's JsCmd response. But this code has no idea about the showAll

[Lift] Re: [lift] Lift based backend server subscribing via amqp

2010-01-05 Thread Timothy Perrett
In what way do you mean is mapper worth it? What kind of system is it? do you need ACID or BASE? What kind of load will the system be under? Do you need it to be distributed? You are not restricted to Mapper, you could use JPA or whatever persistence you want with lift. If you just want to make

[Lift] Re: Lift based backend server subscribing via amqp

2010-01-05 Thread Timothy Perrett
Pushed to master - will be in hudson jars in a few hours. Cheers, Tim On Jan 5, 10:06 am, Timothy Perrett timo...@getintheloop.eu wrote: http://github.com/dpp/liftweb/issues/#issue/270 Fixed and on review board. Cheers, Tim On Jan 5, 8:57 am, Timothy Perrett timo...@getintheloop.eu wrote:

[Lift] ANN: Akka 0.6 is released

2010-01-05 Thread Jonas Bonér
Hi. I am proud to announce the release of Akka 0.6. It is a major release in many ways. Many people have made this happen. Especially the great teamhttp://doc.akkasource.org/team but also many of the users on the mailing list. Thank you all. Download Akka 0.6

Re: [Lift] ANN: Akka 0.6 is released

2010-01-05 Thread Timothy Perrett
Congratulations all... you guys have put so much effort into Akka and its a really great framework; cant wait to see what is in store down the track! Cheers, Tim On 5 Jan 2010, at 13:34, Jonas Bonér wrote: Hi. I am proud to announce the release of Akka 0.6. It is a major release in many

Re: [Lift] ANN: Akka 0.6 is released

2010-01-05 Thread Jonas Bonér
Thanks Tim. You are part of the story. Thanks. 2010/1/5 Timothy Perrett timo...@getintheloop.eu Congratulations all... you guys have put so much effort into Akka and its a really great framework; cant wait to see what is in store down the track! Cheers, Tim On 5 Jan 2010, at 13:34, Jonas

Re: [Lift] Re: multiple forms on a page.

2010-01-05 Thread Naftoli Gugenheim
Just move var localNote ... to before def doReply() ... - daiwheadaiw...@gmail.com wrote: Thanks David. But this seems not work as wished. It will meet some error: [INFO] Compiling 1 source files to /home/daiwhea/myworks/java/

[Lift] new line to br /

2010-01-05 Thread daiwhea
my issue is: There are some text input by users. There are new line character(\r\n) in these text. I want to convert those new line characters into br / In the snippet, I put p{note.replyContent.replaceAll(\n, br /)} /p. But the converted br / was changed to lt;br /gt; by lift. So, my question

Re: [Lift] Re: Errors not shown after AJAX form submit

2010-01-05 Thread Naftoli Gugenheim
I don't know the exact reason, but the parameter to the RequestVar constructor is a call by name, which means it's a function that can be re-evaluated. Normally this value is recalculated at the start of each request. In any case its seems that in your case they're being recalculated and

Re: [Lift] Re: Errors not shown after AJAX form submit

2010-01-05 Thread Adam Warski
Ah so it's treated as a new request each time. Clear now, thanks :) Adam On Jan 5, 2010, at 3:31 PM, Naftoli Gugenheim wrote: I don't know the exact reason, but the parameter to the RequestVar constructor is a call by name, which means it's a function that can be re-evaluated. Normally

Re: [Lift] new line to br /

2010-01-05 Thread Alex Boisvert
The problem is that you're creating a String (not a NodeSeq) and the String content is being escaped inside the wrapping elements. Try this, p { note.replyContent split '\n' map { Text(_) ++ br/ } reduceLeft (_ ++ _) } /p alex On Tue, Jan 5, 2010 at 9:24 AM, daiwhea daiw...@gmail.com wrote:

Re: [Lift] new line to br /

2010-01-05 Thread Naftoli Gugenheim
I don't know the exact syntax offhand, but you could probably to a split on the string to divide it into lines, followed by a foldLeft to convert each line into a Text and a br. - daiwheadaiw...@gmail.com wrote: my issue is: There are some text input by

Re: [Lift] Safe handling of long params

2010-01-05 Thread Jim Wise
I can answer b) -- S.param(image).flatMap(asLong) asLong comes from BasicTypesHelpers. -Ross One more quick question about this, more of a Scala question really: I've noticed both here and in the examples that there is a tendency to use flatMap() instead of map(). I understand the

Re: [Lift] Safe handling of long params

2010-01-05 Thread Naftoli Gugenheim
map would result in a Box[Box[Long]] - Jim Wisejw...@draga.com wrote: I can answer b) -- S.param(image).flatMap(asLong) asLong comes from BasicTypesHelpers. -Ross One more quick question about this, more of a Scala question really: I've noticed both

Re: [Lift] Safe handling of long params

2010-01-05 Thread Ross Mellgren
They aren't. Here are the type signatures for map and flatMap, from Box (the type on Seq is the same, but not specialized to the Box return type): def map[B](f: A = B): Box[B] def flatMap[B](f: A = Box[B]): Box[B] The key is the return type of f -- in map, it always returns what goes in

Re: [Lift] Safe handling of long params

2010-01-05 Thread Jim Wise
Ross Mellgren dri...@gmail.com writes: In your case, asLong is: def asLong(s: String): Box[Long] So if you used map: Full(1234).map(asLong) // result is Full(Full(1234)), because the result of asLong went into the Full that map creates Conversely, flatMap removes a level of structure:

[Lift] SessionVars in different snippets

2010-01-05 Thread michall
I have two snippets Login and Profile, and I want to read same object stored in session, when I use SessionVar it create two different object: object user extends SessionVar[Box[User]](Empty) // same in two snippets When I set this object in Login.scala : val usr =

Re: [Lift] ANN: Akka 0.6 is released

2010-01-05 Thread David Pollak
Congratulations! On Tue, Jan 5, 2010 at 5:34 AM, Jonas Bonér jbo...@gmail.com wrote: Hi. I am proud to announce the release of Akka 0.6. It is a major release in many ways. Many people have made this happen. Especially the great teamhttp://doc.akkasource.org/team but also many of the

Re: [Lift] ANN: Akka 0.6 is released

2010-01-05 Thread Jonas Bonér
Thanks 2010/1/5 David Pollak feeder.of.the.be...@gmail.com: Congratulations! On Tue, Jan 5, 2010 at 5:34 AM, Jonas Bonér jbo...@gmail.com wrote: Hi. I am proud to announce the release of Akka 0.6. It is a major release in many ways. Many people have made this happen. Especially the great 

[Lift] Question: How to emulate exit behavior with LiftActors

2010-01-05 Thread Jcon
I'm new to scala and lift, and I've been hacking with a LiftActor used to a local mail server for development based on the post by Ryan Donahue: http://groups.google.com/group/liftweb/browse_thread/thread/56002b39aa67aee6/4d3946d145560d3e?lnk=gstq=test+mail#4d3946d145560d3e However the code in

[Lift] Re: ANN: Akka 0.6 is released

2010-01-05 Thread Marius
Kudos ! Great stuff. On Jan 5, 6:52 pm, Jonas Bonér jbo...@gmail.com wrote: Thanks 2010/1/5 David Pollak feeder.of.the.be...@gmail.com: Congratulations! On Tue, Jan 5, 2010 at 5:34 AM, Jonas Bonér jbo...@gmail.com wrote: Hi. I am proud to announce the release of Akka 0.6. It is a

Re: [Lift] Re: QueryParams and joins

2010-01-05 Thread David Pollak
Lift uses the SQL IN statement rather than joins. This has a negative impact for users of MySQL and Derby. Try: TagUser.findAll(By(TagUser.tag, this), In(TagUser.user, User.id, OrderBy(User.followers_count, Descending), MaxRows[User](10))) On Mon, Jan 4, 2010 at 11:10 PM, Mads Hartmann

Re: [Lift] SessionVars in different snippets

2010-01-05 Thread Naftoli Gugenheim
Each SessionVar is distinct. Create one -- it can be global -- and use it in both snippets. - michallchen...@gmail.com wrote: I have two snippets Login and Profile, and I want to read same object stored in session, when I use SessionVar it create two

Re: [Lift] Question: How to emulate exit behavior with LiftActors

2010-01-05 Thread David Pollak
On Tue, Jan 5, 2010 at 8:56 AM, Jcon javarad...@gmail.com wrote: I'm new to scala and lift, and I've been hacking with a LiftActor used to a local mail server for development based on the post by Ryan Donahue:

Re: [Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder

2010-01-05 Thread David Pollak
On Mon, Jan 4, 2010 at 1:03 PM, Alex Boisvert alex.boisv...@gmail.comwrote: Instead of: LiftRules.getResourceAsStream(name: String): Box[InputStream] I'd suggest: LiftRules.doWithResource[T](name: String)(f: InputStream = T): Box[T]. Sounds good. Please open a ticket and make it happen.

Re: [Lift] findAll and inner/outer joins

2010-01-05 Thread David Pollak
On Wed, Dec 23, 2009 at 10:18 PM, Dmitry Olyenyov dmitry.olyen...@gmail.com wrote: Hi! Help me, please, with example of inner and outer relations in findAll query. Is it possible to do without manual BySQL()? I want to do following select: select * from payment_order o join client c on

[Lift] How to remove manyTomany children?

2010-01-05 Thread GA
Hello guys, I have a table that has a many-to-many relationship with itself. I manage to add new entries to the relationship table using the MapperManyToMany, but I cannot remove entries. This is the code I am using to remove: for (entryToRemove - entry.childEntries) { val indexOf =

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread Naftoli Gugenheim
Can you try entry.childEntries.clear entry.save ? - GAmy_li...@me.com wrote: Hello guys, I have a table that has a many-to-many relationship with itself. I manage to add new entries to the relationship table using the MapperManyToMany, but I cannot remove

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread GA
It does not work either with the LongKeyedMapper. Am I doing something wrong? On Jan 5, 2010, at 7:25 PM, Guillermo Acilu wrote: It was the first thing I tried. But it does not work. I have run out of options now. I am going to try to add a LongKeyMapper to see if the problem gets

[Lift] Re: QueryParams and joins

2010-01-05 Thread Mads Hartmann
Sure thing, it's quite long though :) Just one thing, i added the following for it to compile (I want to return List[User] not List[TagUser] : .map(_.user.obj.open_!) So in all it looks like this def getTopUsers(in: Int) :List[User] = { TagUser.findAll(By(TagUser.tag, this.id),

[Lift] Re: QueryParams and joins

2010-01-05 Thread Mads Hartmann
I've got this in my pom.xml dependency groupIdnet.liftweb/groupId artifactIdlift-core/artifactId version1.0/version /dependency On Jan 5, 8:54 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Jan 5, 2010 at 11:51 AM, Mads Hartmann mads...@gmail.com wrote:

Re: [Lift] Re: QueryParams and joins

2010-01-05 Thread David Pollak
On Tue, Jan 5, 2010 at 12:10 PM, Mads Hartmann mads...@gmail.com wrote: I've got this in my pom.xml dependency groupIdnet.liftweb/groupId artifactIdlift-core/artifactId version1.0/version /dependency Ah hah! I'd strongly recommend you upgrade to Lift 1.1-M8. It's

[Lift] Re: Question: How to emulate exit behavior with LiftActors

2010-01-05 Thread Jcon
Great, thanks. Added a shutdown message that my actor responds to and added the following to Boot.scala: LiftRules.unloadHooks append(() = DumbMail ! DumbMailShutdown) And now my mail actor cleans up appropriately when Jetty restarts. Good learning exercise. I may also try to configure a

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread Naftoli Gugenheim
Are they not getting removed from the collection when you call clear, or are they not getting deleted in the database when you call save? Also, are you trying to delete the actual entity? Clear and remove just delete the relationship. - GAmy_li...@me.com

[Lift] Re: Simple deployment of Lift apps on Jetty/Nginx

2010-01-05 Thread Alex Black
You can have more than one domain per IP address served by different applications with Nginx up front.  You can swap from one instance of an application to another (semi-seamless upgrades) with Nginx up front.  You can front many different Lift instances (some running on other machines) with

Re: [Lift] Re: QueryParams and joins

2010-01-05 Thread Ross Mellgren
It looks like you probably have some other dependencies somewhere or old jars pointing to the old lift version. Please first try mvn clean jetty:run, and if that doesn't work, run mvn dependency:tree to try and find where the other version of lift- webkit is coming from. If you're still

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread GA
I would like to remove them from the database, not only the relationship. How should I do that? Thanks, On Jan 5, 2010, at 9:42 PM, Naftoli Gugenheim wrote: Are they not getting removed from the collection when you call clear, or are they not getting deleted in the database when you call

Re: [Lift] How to remove manyTomany children?

2010-01-05 Thread Naftoli Gugenheim
Just call .delete_! on the entity itself. It should automatically remove the relationships. - GAmy_li...@me.com wrote: I would like to remove them from the database, not only the relationship. How should I do that? Thanks, On Jan 5, 2010, at 9:42 PM,

[Lift] Re: multiple forms on a page.

2010-01-05 Thread daiwhea
On Jan 5, 10:18 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Just move var localNote ... to before def doReply() ... - Thanks Naftoli. It does save a reply to the db after I move var localNote to before def doReply(). But It will only save reply to the

[Lift] Re: new line to br /

2010-01-05 Thread daiwhea
Thanks Alex. Yes, this can work. But I wonder how to achieve the require below? In our old php practice, we often use some jseditor to provide some kind of WYWG function. So peoples can input text with some style built in, such as font-size, font-weight, color, background-color or even insert a

Re: [Lift] Re: multiple forms on a page.

2010-01-05 Thread David Pollak
The easiest thing to do is for you to post your project as a complete runnable whole to GitHub (just make a public repository). I'll clone the repository, fix the issue and you'll see the diff and have a running project. Sound good? On Tue, Jan 5, 2010 at 6:32 PM, daiwhea daiw...@gmail.com

[Lift] Re: new line to br /

2010-01-05 Thread daiwhea
Yeah, I'll try Textile later. It's far beyond my ability now. I'm not so familiar with lift now. Thanks David. You always help a lot. On Jan 6, 11:41 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Jan 5, 2010 at 7:34 PM, daiwhea daiw...@gmail.com wrote: Thanks Alex. Yes,

[Lift] Debug message

2010-01-05 Thread Naftoli Gugenheim
What does this message mean? Msgs: Default Error is not rendered as the default title is the empty string -- 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

Re: [Lift] Re: Skittr example in bad shape

2010-01-05 Thread David Pollak
A fix will be up in the next few days. On Mon, Dec 21, 2009 at 2:03 PM, Vesa brut...@gmail.com wrote: Hi, I noticed logged in user still can't see messages by other users they follow. There were couple of messages still missing parameters. Patch shows the parts that need to be modified to

[Lift] Lift on Atmosphere

2010-01-05 Thread paksegu
Hello World. I am a Lift beginner and I would like to know if anyone has successfully succeeded in running Lift on Atmosphere: https://atmosphere.dev.java.net thanks. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to