[Lift] Re: guid - function mapping not occuring for ajax generator rendered by CometActor

2010-01-04 Thread Marius
Thanks for checking this Chris. Br's, Marius On Jan 4, 3:10 am, ChrisX xtopher@gmail.com wrote: Marius, All working great now. Thanks for the quick response and fix. Chris On Dec 29 2009, 1:35 am, Marius marius.dan...@gmail.com wrote: This was a non trivial hustle to find the cause:)

[Lift] Re: Templating in lift

2010-01-04 Thread Randinn
Very nice! can I suggest you put an excerpt or a link it in here http://wiki.github.com/dpp/liftweb On Jan 4, 11:10 am, Mads Hartmann mads...@gmail.com wrote: Hello everyone, I just wrote a small blog post that contains an example of how you use templates in Lift when you need to iterate

[Lift] Re: Templating in lift

2010-01-04 Thread Marius
I think it is a really great blog. One comment if I may. I don't view snippets as controllers at all. Comparing to Spring MVC for instance AFAIK controllers are the ones that process the requests and generate data that will be rendered (in MVC way). Here snippets per say never process requests

Re: [Lift] Re: Templating in lift

2010-01-04 Thread Timothy Perrett
Agreed - also, im not sure what you covered that was not covered on the wiki article: http://is.gd/5LDlM Cheers, Tim On 4 Jan 2010, at 08:42, Marius wrote: I think it is a really great blog. One comment if I may. I don't view snippets as controllers at all. Comparing to Spring MVC for

Re: [Lift] Problem with creating new project

2010-01-04 Thread Indrajit Raychaudhuri
Quite right, mvn archetype:generate should be used instead of mvn archetype:create. mvn acrhetype:create would not work to give expected result [1]. [1] http://groups.google.com/group/liftweb/msg/ae637c021b1f114e Cheers, Indrajit On 03/01/10 8:23 PM, Tim Nelson wrote: I'm no maven expert,

[Lift] Re: Templating in lift

2010-01-04 Thread Mads Hartmann
@Marius You're right, I guess that would be why they're called Snippets and not controllers ;) @Timothy Just read it and I can't say I cover anything new in the blog post if you've read the wiki article - I just wasn't aware of that article :) @Randinn I won't leave an excerpt or an link on

Re: [Lift] Re: using .java files in lift's compile cycle

2010-01-04 Thread Indrajit Raychaudhuri
Alternately, setting the properties maven.compiler.source and maven.compiler.target (via -D) or via the properties section in pom.xml eradicates the necessity to configure maven-compiler-plugin. So you could do: mvn -Dmaven.compiler.source=1.5 -Dmaven.compiler.target=1.5 package or do the

[Lift] CometActor and JQuery

2010-01-04 Thread martinsema...@googlemail.com
Hi all if just started exploring Lift and I am playing around with CometActor and Listeneers. I followed Davids Screencast with the Chat Example which works nicely. Now i would like to communicate with the CometActors using my own jQuery code. I don't want to use lifts helpers for that, but want

[Lift] Re: Templating in lift

2010-01-04 Thread Marius
Very neat !!! ... thanks. I wish Lift official site to have links towards all these cool articles. Br's, Marius On Jan 4, 12:22 pm, Mads Hartmann mads...@gmail.com wrote: @Marius You're right, I guess that would be why they're called Snippets and not controllers ;) @Timothy Just read it

[Lift] Re: CometActor and JQuery

2010-01-04 Thread Marius
Do not disable Lift's ajax. Let's say you have your own myown.js file having say a function foo(). Now you from a CometActor you want to call this function (assume to included myown.js in your page head). When you receive a message in your comet you can call partialUpdate like: case MyMessage =

[Lift] Re: CometActor and JQuery

2010-01-04 Thread martinsema...@googlemail.com
Thanks for that Marius, it works, but it is only for the server to client direction. In the generated Html of the ajaxText there is something like: lift_ajaxHandler('F1162097909104VYK=' + encodeURIComponent (this.value), null, null) I guess the F116... is some kind of Id for the receiving

[Lift] Re: CometActor and JQuery

2010-01-04 Thread Marius
From your render method you can return something like: ajaxText(Hello, (text) = { println(text is: + text) // do something here and return a JsCmd. Thus you can return a JsRaw, a Call or whatever java script you want }) F1162097909104VYK has nothing to do with Comet. It is an opaque ID

[Lift] Lift based backend server subscribing via amqp

2010-01-04 Thread vishnu
Hi I'm trying to use lift to right a back end for a system that communicates via AMQP. The idea is to have a bunch of (threads?, processes? actors?) that subscribe to some queues on a queueing system and react to various messages by contacting various third party systems and persisting messages

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

2010-01-04 Thread Timothy Perrett
Hi, No, the AMQP module hasnt had any work for some time... I think im the only person actually using it. Check my article about it here: http://is.gd/5LZ34 Cheers, Tim On 4 Jan 2010, at 15:34, vishnu wrote: Hi I'm trying to use lift to right a back end for a system that communicates

Re: [Lift] Templating in lift

2010-01-04 Thread David Pollak
On Sun, Jan 3, 2010 at 4:10 PM, Mads Hartmann mads...@gmail.com wrote: Hello everyone, I just wrote a small blog post that contains an example of how you use templates in Lift when you need to iterate over a collection of data. This took me a bit of researching and coding to figure out so I'm

Re: [Lift] Problem with creating new project

2010-01-04 Thread David Pollak
Can you point us to where you found the instructions to use archetype:create so we can correct the source? On Sat, Jan 2, 2010 at 8:15 PM, Jaroslaw Zabiello hipertrac...@gmail.comwrote: I cannot create a new project because of Embedded error: The META- INF/maven/archetype.xml descriptor

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

2010-01-04 Thread David Pollak
On Sat, Jan 2, 2010 at 9:34 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I actually like StreamHandler better than StreamManager. StreamManager sounds like a something more complex. The implementation: trait Applier[T] { def apply[R](f: T = R): R } Has nothing to do with Streams.

Re: [Lift] Re: source of working demo of Lift+JPA on google app engine

2010-01-04 Thread David Pollak
On Sun, Jan 3, 2010 at 11:12 PM, qingshan qingshan@gmail.com wrote: Looks like no one knows the answer or don't want to answer my first post in Lift group. and the only thing I can do is to try JDO? (thanks a lot to ymnk) Thanks anyway, Qingshan On Dec 26 2009, 8:51 pm, qingshan

[Lift] Couch/Lift JSON/Dispatch integration

2010-01-04 Thread Ross Mellgren
(Reposting to the main list from the committers list where I tested the waters) Hi all, I've written a small library (http://github.com/Dridus/couchlift) that provides an integration to CouchDB using Lift JSON and Dispatch. Dispatch has an existing binding to Couch, but it uses its own

[Lift] Re: [Lift committers] Re: Couch/Lift JSON/Dispatch integration

2010-01-04 Thread Ross Mellgren
Regarding the polishing I noted these things: - Uses exceptions more than Boxes, in one case it even open_!'s a Box to generate an exception. Though, this does fit better into the Dispatch style, and I find in practice it works okay because I tend to be wrapping http(database...) in

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

2010-01-04 Thread Naftoli Gugenheim
Ah, I misunderstood. Where is it defined? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Sat, Jan 2, 2010 at 9:34 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I actually like StreamHandler better than StreamManager. StreamManager sounds like a

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

2010-01-04 Thread David Pollak
On Mon, Jan 4, 2010 at 10:07 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: Ah, I misunderstood. Where is it defined? Helpers.scala - David Pollakfeeder.of.the.be...@gmail.com wrote: On Sat, Jan 2, 2010 at 9:34 PM, Naftoli Gugenheim

Re: [Lift] mapper CRUDify

2010-01-04 Thread David Pollak
On Fri, Jan 1, 2010 at 11:04 AM, Gang wangga...@gmail.com wrote: Hi, I'm a newbie with Lift. with CRUDify, is it possible to override _showAllTemplate to show a limited number of columns? My table is big so I don't want to show everything when the List All menu is invoked. Unfortunately,

Re: [Lift] warning: value rewrite in object LiftRules is deprecated

2010-01-04 Thread David Pollak
On Thu, Dec 31, 2009 at 1:55 PM, Alex Black a...@alexblack.ca wrote: Two questions: 1. Whats the replacement for LiftRules.rewrite? 2. Is there a way I can write a custom Loc so that SiteMap is aware of the re-writing? Yes. Please see the Wiki code in example:

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

2010-01-04 Thread Naftoli Gugenheim
Maybe my repo is out of sync? Is it on master? When was it committed? git grep Applier is not turning it up. Is that command incorrect? Thanks. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Mon, Jan 4, 2010 at 10:07 AM, Naftoli Gugenheim

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

2010-01-04 Thread Ross Mellgren
You're probably out of date. Here is the commit that introduced it: http://github.com/dpp/liftweb/commit/5073a224cca39ab94ff3c3f7f4a8d093869e8f52 -Ross On Jan 4, 2010, at 1:43 PM, Naftoli Gugenheim wrote: Maybe my repo is out of sync? Is it on master? When was it committed? git grep Applier

Re: [Lift] Minor ***Breaking Changes*** - ContextPath thingy

2010-01-04 Thread Timothy Perrett
Awesome work Marius - good to see this in master!! Cheers, Tim Sent from my iPhone On 4 Jan 2010, at 18:41, Marius marius.dan...@gmail.com wrote: All, As with the fix for issue 269 the signature for LiftRules.calculateContextPath has been changed from: var calculateContextPath:

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

2010-01-04 Thread Naftoli Gugenheim
I don't have access to a browser right now. Do you mind telling me the date of that commit? Thanks. - Ross Mellgrendri...@gmail.com wrote: You're probably out of date. Here is the commit that introduced it:

Re: [Lift] cookie vs url sessionId precedence

2010-01-04 Thread Jonathan Hoffman
Thanks, I experimented a bit with hijacking the session via a custom servlet Filter and also with a custom LiftRules.getLiftSession, but decided it was much easier to just add a DispatchPF. - Jon On Dec 31, 2009, at 3:51 PM, David Pollak wrote: I don't think there's a way to do this right

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

2010-01-04 Thread Ross Mellgren
commit 5073a224cca39ab94ff3c3f7f4a8d093869e8f52 Author: David Pollak nom nom nom Date: Thu Dec 31 12:21:24 2009 -0800 Force closing of streams. More graceful restart of ActorPing -Ross On Jan 4, 2010, at 1:59 PM, Naftoli Gugenheim wrote: I don't have access to a browser right now. Do

[Lift] Errors not shown after AJAX form submit

2010-01-04 Thread Adam Warski
Hello, investigating further making the tutorial form submittable with ajax, I found some weird behavior; I'm using 1.1-M8. It seems that when the form is submitted with ajax, and there are form validation errors, the error is not shown. However, the notices work fine. So: - S.notice(Added

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

2010-01-04 Thread Ross Mellgren
S.error(NodeSeq) and S.error(List[FieldError]) differ in that the latter registers errors against particular fields, and the former is a page-wide error. The latter is more like S.error(String, NodeSeq). Do you have Msg snippets for each field, like this? ... field ... lift:msg

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

2010-01-04 Thread Channing Walton
Maybe Akka would be better for you? http://akkasource.org/ Akka has an AMQP module which abstracts AMQP Producer and Consumer as Actors. Channing vishnu-11 wrote: Hi I'm trying to use lift to right a back end for a system that communicates via AMQP. The idea is to have a bunch of

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

2010-01-04 Thread Kris Nuttycombe
On Mon, Jan 4, 2010 at 9:51 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Sat, Jan 2, 2010 at 9:34 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: I actually like StreamHandler better than StreamManager. StreamManager sounds like a something more complex. The implementation:

[Lift] Re: source of working demo of Lift+JPA on google app engine

2010-01-04 Thread Randinn
Last time I looked just JDO yes, I didn't think it was worth it as you cannot use most of what makes Lift special (Comet, mapper), but if you're looking for an example check out... http://mawson.wordpress.com/2009/04/10/first-steps-with-scala-on-google-app-engine/ (a bit dated)

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

2010-01-04 Thread Timothy Perrett
It depends on your use case... you don't really describe exactly what you want to do. Perhaps start by providing more detail? If you want service teir *only* though, its quite probable that akka would be a better fix. Cheers, Tim On 4 Jan 2010, at 20:30, Channing Walton wrote: Maybe Akka

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

2010-01-04 Thread Alex Boisvert
Instead of: LiftRules.getResourceAsStream(name: String): Box[InputStream] I'd suggest: LiftRules.doWithResource[T](name: String)(f: InputStream = T): Box[T]. And if you need laziness, you could use one of the usual suspects: lazy val, unapplied function, FatLazy, etc. alex On Thu, Dec 31,

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

2010-01-04 Thread Kris Nuttycombe
On Mon, Jan 4, 2010 at 8:48 AM, Timothy Perrett timo...@getintheloop.eu wrote: Hi, No, the AMQP module hasnt had any work for some time... I think im the only person actually using it. Check my article about it here: http://is.gd/5LZ34 Cheers, Tim Nope! We're using it in production as

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

2010-01-04 Thread Timothy Perrett
oh super awesome! I had no idea!! Cheers, Tim On 4 Jan 2010, at 21:06, Kris Nuttycombe wrote: Nope! We're using it in production as well. :) -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

[Lift] Re: cookie vs url sessionId precedence

2010-01-04 Thread Marius
Using jsessionid in the URL (aka url rewriting - servlets jargon) is about turning off cookies in container. I think with Jetty you can do this from /WEB-INF/jetty-web.xml. Something like: ?xml version=1.0 encoding=UTF-8? !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN

[Lift] Safe handling of long params

2010-01-04 Thread Jim Wise
So, in my endless retweaking of this code, getting better (and learning more lift) on each pass, I've got a rewrite rule like this case RewriteRequest(ParsePath(image :: image :: Nil, _, _, _), _, _) = RewriteResponse(viewImage :: Nil, Map(image - image)) which is

Re: [Lift] Safe handling of long params

2010-01-04 Thread Ross Mellgren
I can answer b) -- S.param(image).flatMap(asLong) asLong comes from BasicTypesHelpers. -Ross On Jan 4, 2010, at 4:42 PM, Jim Wise wrote: So, in my endless retweaking of this code, getting better (and learning more lift) on each pass, I've got a rewrite rule like this case

Re: [Lift] Safe handling of long params

2010-01-04 Thread Timothy Perrett
Shouldnt that be: S.param(image).flatMap(_.asLong) Cheers, Tim On 4 Jan 2010, at 21:45, Ross Mellgren wrote: S.param(image).flatMap(asLong) -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

Re: [Lift] Safe handling of long params

2010-01-04 Thread Ross Mellgren
Nope, it's not a implicit extension of String or anything, it's just a plain method def asLong(s: String): Box[Long] in BasicTypesHelpers -Ross On Jan 4, 2010, at 5:08 PM, Timothy Perrett wrote: Shouldnt that be: S.param(image).flatMap(_.asLong) Cheers, Tim On 4 Jan 2010, at 21:45,

Re: [Lift] Safe handling of long params

2010-01-04 Thread Timothy Perrett
Ah right yeah - I thought it was implicit :) On 4 Jan 2010, at 22:09, Ross Mellgren wrote: Nope, it's not a implicit extension of String or anything, it's just a plain method def asLong(s: String): Box[Long] in BasicTypesHelpers -Ross On Jan 4, 2010, at 5:08 PM, Timothy Perrett wrote:

Re: [Lift] Safe handling of long params

2010-01-04 Thread Jim Wise
Aha! Thanks, Sent from my iPhone On Jan 4, 2010, at 16:45, Ross Mellgren dri...@gmail.com wrote: I can answer b) -- S.param(image).flatMap(asLong) asLong comes from BasicTypesHelpers. -Ross On Jan 4, 2010, at 4:42 PM, Jim Wise wrote: So, in my endless retweaking of this code,

[Lift] QueryParams and joins

2010-01-04 Thread Mads Hartmann
Hello, I'm having a problem and I'm sure it's an easy fix for someone with a bit more experience I have 3 model classes: tag, user, tweet and a join class TagUser. A tag has a list of users. If i want all of the users in a tag i use the following code (which works): def users =

Re: [Lift] QueryParams and joins

2010-01-04 Thread David Pollak
On Mon, Jan 4, 2010 at 3:24 PM, Mads Hartmann mads...@gmail.com wrote: Hello, I'm having a problem and I'm sure it's an easy fix for someone with a bit more experience I have 3 model classes: tag, user, tweet and a join class TagUser. A tag has a list of users. If i want all of the users

[Lift] Re: source of working demo of Lift+JPA on google app engine

2010-01-04 Thread qingshan
seems not really many people work on lift+gae+jpa http://code.google.com/p/scala-lift-gae-js-example/ is still an empty project http://github.com/ymnk/lift-gae-jdo is a beautiful working demo for JDO though. Cheers, Qingshan On Jan 4, 12:53 pm, Randinn rand...@gmail.com wrote: Last time I

[Lift] IE6 Strict mode - skip ?xml version 1.0... header

2010-01-04 Thread Alex Black
I've read here: http://css-discuss.incutio.com/?page=RenderingMode and here: http://hsivonen.iki.fi/doctype/ that if you include the xml declaration: ?xml version=1.0 encoding=utf-8? Then IE6 (and others?) go into quirks mode. Is there a way in lift to omit this from IE? I tried removing it

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

2010-01-04 Thread vishnu
well I'm not sure how to describe it differently. As you said it's only service tier. The truth is I dont know anything about Lift yet and Im just now running through some basic Scala books. I need a library with which to talk to rabbitmq as a subscriber that might work at a higher level than the

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

2010-01-04 Thread Franz Bettag
Hey guys, i've just updated the amqp code. I started a pull request on github but that seems *not* to be the proper way *smirking @dpp's auto- reply*. Anyway here is the patch. The problem was that in version 1.5.0 of rabbitmq's library, the ticket-stuff was removed. diff --git

Re: [Lift] IE6 Strict mode - skip ?xml version 1.0... header

2010-01-04 Thread David Pollak
On Mon, Jan 4, 2010 at 6:45 PM, Alex Black a...@alexblack.ca wrote: I've read here: http://css-discuss.incutio.com/?page=RenderingMode and here: http://hsivonen.iki.fi/doctype/ that if you include the xml declaration: ?xml version=1.0 encoding=utf-8? Then IE6 (and others?) go into

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

2010-01-04 Thread David Pollak
On Mon, Jan 4, 2010 at 7:25 PM, Alex Black a...@alexblack.ca wrote: I'm intrigued by the Nginx, could you tell us more about what the advantages of using Nginx as well as Jetty instead of Jetty? You can have more than one domain per IP address served by different applications with Nginx up

[Lift] Re: QueryParams and joins

2010-01-04 Thread Mads Hartmann
My ultimate goal would be to only pull out the top x users. I'm currently using the following code to achieve this: TagUser.findAll(By(TagUser.tag, this.id)).map(_.user.obj.open_!) .sort(_.followers_count.is _.followers_count.is) .take(x) But im concerned that this creates

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

2010-01-04 Thread Adam Warski
Hello, Ah, I didn't spot this. I only have: lift:Msgs showAll=true/ which would suggest that it should show all errors. And anyway, why does it work then with normal form submit, and doesn't with ajax form submit? Adam On Jan 4, 2010, at 9:14 PM, Ross Mellgren wrote: S.error(NodeSeq) and