[Lift] Re: ResourceServer problem

2009-07-22 Thread Timothy Perrett
Naftoli, Can you explain what your trying to do? My assumption is that you have a secondary jar away from your WAR and you want to load template from there? A completely valid use case... Right now there are ways of doing it but you then don't get a lot of the stuff lift provides for free

[Lift] Re: Multiple DBs

2009-07-22 Thread MrWHO
Thank you! Exactly what I was looking for... tested and tried :) Fabio On Jul 15, 9:51 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: You can use different net.liftweb.mapper.ConnectionIdentifiers to represent different DBs. Then there are MetaMapper methods that take

[Lift] Re: Template tags and properties

2009-07-22 Thread José María
Doesn't this put view code (XML/Xhtml) in controller code? I've read many times in Lift doc about not puting logic in view but the reverse can be even worst, doing impossible to have a separate design. You can't broke logic but design. On Jul 21, 10:19 am, Timothy Perrett

[Lift] Re: Template tags and properties

2009-07-22 Thread José María
That's fine, I just want to generate paths in snippet code. On Jul 21, 10:20 am, marius d. marius.dan...@gmail.com wrote: Something like: a lift:snippet=Path.buildhi/a where path is thesnippetclass and build is the method name. But what is your use case? Br's, Marius On Jul 21, 12:11 

[Lift] Acceding object fields in template

2009-07-22 Thread José María
Hi, Is it possible to access to the field of an object binded to a name in a template? bind(data , xhtml, product -- product) And then in the template: h1 id=Titledata:product.name //h1 Thanks. --~--~-~--~~~---~--~~ You received this message because

[Lift] Re: Starting with lift, problem

2009-07-22 Thread Timothy Perrett
Just to clarify what Jeppe wrote, you need the = because that tells the compiler this method will be returning a concrete type, not Unit (like void in Java) Cheers, Tim On 22/07/2009 11:20, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: You need a = before the function body: def

[Lift] Re: Template tags and properties

2009-07-22 Thread marius d.
Lift is not a MVC framework but a View First one. Snippets are the way to generate dynamic content that will be woven into the resulting markup. There is no design break in fact it is one of the most fundamental design goals of Lift. Snippets work with markup building blocks to generate the

[Lift] Re: Template tags and properties

2009-07-22 Thread José María
Solved: class MyObject { def url_image = new UnprefixedAttribute(src, http://localhost/ imgs/ + this.product.id+.jpg, null) } In the view (as marius said): img lift:snippet=MyObject:url_image/ Cheers. On Jul 21, 9:11 am, José María josemariar...@gmail.com wrote: Hi, I suppose that

[Lift] find, set and save

2009-07-22 Thread Hannes
Hi Lifters, It seems like I'm having problems to modify items that are already in the database. What I do is, first find the item, then set a new value to it and then save it. So far so good, or? Because its a expensive filter process to find those items to modify, I made a local copy of the

[Lift] Re: Weekly Article Request

2009-07-22 Thread yonkeltron
Thank you! I think this is a great Idea, I would like to add my request for an article on testing Lift applications. I have seen some strategies discussed on a mailing list but I think it would be tremendously helpful if there could be an article describing the different ways to do testing for

[Lift] Re: Newbee question

2009-07-22 Thread Tim Nelson
You might want to check out the Lift Book: http://groups.google.com/group/the-lift-book @Lift coders: Is there a reason there is no link anywhere on the liftweb.netsite to the Lift Book? Tim On Tue, Jul 21, 2009 at 11:29 PM, Jeff McKenna agile.act...@gmail.comwrote: Xavi, That helps

[Lift] Bug/Problem with Db.runQuery and NUMERIC results

2009-07-22 Thread Jeppe Nejsum Madsen
Hi, I'm using adhoc queries and I'm running into a problem where the results of aggregate functions get mapped to integers: I have this val (_,result) = DB.runQuery(SELECT AVG(vt.fuel_efficiency), vt.fuel_type, vt.category FROM + vehicles v JOIN vehicle_types vt ON

[Lift] Re: Newbee question

2009-07-22 Thread Timothy Perrett
You mean like the one on the left hand side of the home page titled The Lift Book? ;-) Cheers, Tim On 22/07/2009 14:06, Tim Nelson tnell...@gmail.com wrote: @Lift coders: Is there a reason there is no link anywhere on the liftweb.net http://liftweb.net site to the Lift Book?

[Lift] Re: Weekly Article Request

2009-07-22 Thread Timothy Perrett
Xavi, I'll do the one on localization - think im the only committer doing any heavy duty localization work so probably best placed to write an example / how-to. I'll try and churn something out onto my blog then just convert it wholesale onto the lift wiki. Cheers, Tim PS: You deserve a medal

[Lift] Re: Acceding object fields in template

2009-07-22 Thread Timothy Perrett
José, im afraid it doesn't do that, you have to use explicit binds as far as im aware. Perhaps you'll find this article on lifts binding mechanism useful: http://is.gd/sfyT Cheers, Tim On Jul 22, 11:02 am, José María josemariar...@gmail.com wrote: Hi, Is it possible to access to the field of

[Lift] Re: Acceding object fields in template

2009-07-22 Thread David Pollak
Jose, At this point, Lift doesn't support this kind of functionality... but I think it's an interesting feature. Can you open a ticket for it at http://github.com/dpp/liftweb/issues Thanks, David On Wed, Jul 22, 2009 at 3:02 AM, José María josemariar...@gmail.com wrote: Hi, Is it

[Lift] Re: Weekly Article Request

2009-07-22 Thread David Pollak
On Wed, Jul 22, 2009 at 3:22 AM, Xavi Ramirez xavi@gmail.com wrote: Hello, My name is Xavi and I've volunteered as the wiki garden. Every week I'll post a couple of articles topics that we should work on. Here are my picks for this week. Articles we should write: How to parse and

[Lift] Re: Newbee question

2009-07-22 Thread David Pollak
On Tue, Jul 21, 2009 at 4:34 PM, Jeff McKenna agile.act...@gmail.comwrote: http://wiki.liftweb.net/index.php/HowTo_start_a_new_liftwebapp I'll fix this page. I'd also suggest using the ToDo example ( http://liftweb.net/docs/getting_started.html) to get started. On Jul 21, 3:56 pm, David

[Lift] Re: Bug/Problem with Db.runQuery and NUMERIC results

2009-07-22 Thread David Pollak
On Wed, Jul 22, 2009 at 6:07 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, I'm using adhoc queries and I'm running into a problem where the results of aggregate functions get mapped to integers: I have this val (_,result) = DB.runQuery(SELECT AVG(vt.fuel_efficiency), vt.fuel_type,

[Lift] Re: ResourceServer problem

2009-07-22 Thread David Pollak
On Tue, Jul 21, 2009 at 9:55 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Now a direct call to ResourceServer does work, but the template is still not being found. Any ideas? Templates are looked up simply by using the ServletContainer Context's resource locator. I've expanded the

[Lift] Re: Acceding object fields in template

2009-07-22 Thread marius d.
Not sure how much it worths but I'm having second thoughts about this because it feels to me like it drifts away from the Lift's templating idiom. Accessing arbitrary objects properties/methods seems to bring lift closer to JSF kinds of things and I don't really see what problem this actually

[Lift] Re: Mapper and Primary Keys

2009-07-22 Thread Peter Robinett
Because it's unique across systems and maps directly to hardware I'm tracking. But thanks for the equations! Peter On Jul 21, 7:20 pm, jon jonhoff...@gmail.com wrote: This doesn't address your question, so I'll apologize in advance, but why do you want to use a mac address as a primary key?  

[Lift] Re: Bug/Problem with Db.runQuery and NUMERIC results

2009-07-22 Thread Jeppe Nejsum Madsen
David Pollak feeder.of.the.be...@gmail.com writes: On Wed, Jul 22, 2009 at 6:07 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, I'm using adhoc queries and I'm running into a problem where the results of aggregate functions get mapped to integers: I have this val (_,result) =

[Lift] Re: Bug/Problem with Db.runQuery and NUMERIC results

2009-07-22 Thread David Pollak
Please open a ticket at http://github.com/dpp/liftweb/issues On Wed, Jul 22, 2009 at 9:20 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: David Pollak feeder.of.the.be...@gmail.com writes: On Wed, Jul 22, 2009 at 6:07 AM, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, I'm using

[Lift] Re: Trigger object creation to send message to actor

2009-07-22 Thread David Pollak
On Tue, Jul 21, 2009 at 2:04 PM, Peter Robinett pe...@bubblefoundry.comwrote: Hi David, I'm looking to use your code in my application but first I wanted to ask you about Scala Actors versus LiftActors. I see you use the Scala ones here. Why is that? Would it be better to use your Lift

[Lift] Re: A problem involving Lift and javascript dodged for now..

2009-07-22 Thread David Pollak
Can you show a reproducible example of the issue that nailed you? Lift does not modify the XHTML on the page unless you explicitly tell it to... so Lift will not remove the class attribute on a ul tag. I suspect what's happening is that Lift's default of serving application/xhtml+xml is causing

[Lift] Re: Bug/Problem with Db.runQuery and NUMERIC results

2009-07-22 Thread David Pollak
On Wed, Jul 22, 2009 at 9:33 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: David Pollak feeder.of.the.be...@gmail.com writes: Please open a ticket at http://github.com/dpp/liftweb/issues Done. At some point I got the impression (don't know why :-) that Lighthouse was being used for

[Lift] Re: Contributing Life and/or Scala

2009-07-22 Thread Ken Egervari
Hi David! I definitely agree with you. I am not working on any projects right now, although I work on enterprise web applications and database work specifically. I'd be interested in working on a modern orm for scala, or a dsl for for the ORM, or both. That would be totally fun... like really

[Lift] Re: A problem involving Lift and javascript dodged for now..

2009-07-22 Thread marius d.
Have you tried looking at tree widget in lift-widgets project? ... We're using jquery.treeview ... Br's, Mairus On Jul 22, 12:04 am, Alan M alan.morten...@gmail.com wrote: I'm using lift for web services and I need to serve a javascript driven front end from the same web server (don't feel

[Lift] Re: find, set and save

2009-07-22 Thread David Pollak
Howdy, You can save some memory by using findMap: def joinOrders(o1: LimitOrder): Unit = { /* select all orders where status=NEW and where that.tradeType != order1.tradeType */ val newOrders = LimitOrderMetaObj.findMap(By(LimitOrderMetaObj.status, NEW)){o2 =

[Lift] Re: Contributing Life and/or Scala

2009-07-22 Thread Peter Robinett
Hi Ken, I can't speak for David or any of the other committers, but it sounds like you could contribute to fleshing out Record. Peter Robinett On Jul 22, 9:38 am, Ken Egervari ken.egerv...@gmail.com wrote: Hi David! I definitely agree with you. I am not working on any projects right now,

[Lift] Re: HadoopDB

2009-07-22 Thread Viktor Klang
Read it earlier today. It's quite interesting, transcoding SQL to MapReduce jobs that uses RDBMes as datasources I see this really useful for analytical querying over huge datasets, but I wouldn't imagine it as an option as persistence-store for domain/business objects. On Wed, Jul 22, 2009

[Lift] Re: HadoopDB

2009-07-22 Thread Alex Cruise
Viktor Klang wrote: Read it earlier today. It's quite interesting, transcoding SQL to MapReduce jobs that uses RDBMes as datasources I see this really useful for analytical querying over huge datasets, but I wouldn't imagine it as an option as persistence-store for domain/business

[Lift] Re: Eclipse - project generation

2009-07-22 Thread Niels Boldt
Got it - it was actually a configuration which I haven't configured in eclipse. Thanks, Niels On Wed, Jul 22, 2009 at 8:25 PM, Miles Sabin mi...@milessabin.com wrote: On Wed, Jul 22, 2009 at 6:58 PM, nielsbo...@gmail.comnielsbo...@gmail.com wrote: Am I missing something out here, or what

[Lift] Re: HadoopDB

2009-07-22 Thread Viktor Klang
On Wed, Jul 22, 2009 at 8:05 PM, Alex Cruise a...@cluonflux.com wrote: Viktor Klang wrote: Read it earlier today. It's quite interesting, transcoding SQL to MapReduce jobs that uses RDBMes as datasources I see this really useful for analytical querying over huge datasets, but I

[Lift] Re: Eclipse - project generation

2009-07-22 Thread Miles Sabin
On Wed, Jul 22, 2009 at 7:57 PM, Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Is the M2_REPO classpath variable defined? Iirc, the maven generated .classpath uses this. There's a mvn target to generate or just manually create it to point to your .m2/repository directory. There's no mention

[Lift] Re: HadoopDB

2009-07-22 Thread Meredith Gregory
Viktor, Your comment is intriguing to me. As near as i can tell the Web 2.0 trend has this effect that what started out as a traditional domain/business object model scales out to the point where it starts to look a lot like an analytics db -- especially when you're trawling for patterns, trends

[Lift] Re: Eclipse - project generation

2009-07-22 Thread Niels Boldt
Jeppe, It was the M2_REPO variable which wasn't defined. I did try eclipse:configure-workspacehttp://maven.apache.org/plugins/maven-eclipse-plugin/configure-workspace-mojo.htmlbut it did not work before I configured it manually. /Niels On Wed, Jul 22, 2009 at 8:57 PM, Jeppe Nejsum Madsen

[Lift] Re: Eclipse - project generation

2009-07-22 Thread Jeppe Nejsum Madsen
Miles Sabin mi...@milessabin.com writes: On Wed, Jul 22, 2009 at 7:57 PM, Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Is the M2_REPO classpath variable defined? Iirc, the maven generated .classpath uses this. There's a mvn target to generate or just manually create it to point to your

[Lift] Re: HadoopDB

2009-07-22 Thread Viktor Klang
On Wed, Jul 22, 2009 at 10:03 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, Your comment is intriguing to me. As near as i can tell the Web 2.0 trend has this effect that what started out as a traditional domain/business object model scales out to the point where it starts to

[Lift] Re: Eclipse - project generation

2009-07-22 Thread Miles Sabin
On Wed, Jul 22, 2009 at 9:36 PM, Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Miles Sabin mi...@milessabin.com writes: There's no mention of the M2_REPO classpath variable on either of the Wiki pages I've just pointed to. Can someone who cares about Maven comment on whether or not that's an

[Lift] Re: Acceding object fields in template

2009-07-22 Thread Naftoli Gugenheim
What you can do is use the overload of bind that takes a nodeFailureXform argument, and for that argument pass a Full function that transforms your nodes. Basically it will get nodes with the prefix you want, and then parse the label, e.g., using (Rich)String.split('.'). Use Mapper's methods

[Lift] Re: ResourceServer problem

2009-07-22 Thread Naftoli Gugenheim
Great, thanks! It's for a TableEditor component, which provides a default template or you can use your own view setup. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Tue, Jul 21, 2009 at 9:55 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Now a

[Lift] Re: Trigger object creation to send message to actor

2009-07-22 Thread Peter Robinett
Ok, good to know. For people looking to extend David's code earlier in this thread to have Comet listeners receive some, and not all, object creation events, take a look at David's Skittr code[1], namely UserActor[2], UserList[3], and WatchUser[4]. Basically, a singleton object (UserList in

[Lift] Re: HadoopDB

2009-07-22 Thread Alex Cruise
Viktor Klang wrote: Absolutely, perhaps I'm tainted by write-heavy systems and perhaps I'm just failing to see the overhead we're talking about. Perhaps I overlooked it, but the paper didn't mention performance for small writes and potentially multiple nodespanning transactions. HadoopDB

[Lift] Re: Lift and Oracle, what's the situation?

2009-07-22 Thread Derek Chen-Becker
Awesome! Other than the Schemifier issue, have you run into anything? Derek On Wed, Jul 22, 2009 at 8:41 AM, Jon jon.klei...@usit.uio.no wrote: Thanks Jeppe! On Jul 21, 10:04 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: ... Here's a very simple example (albeit not with compound keys)

[Lift] Re: HadoopDB

2009-07-22 Thread Meredith Gregory
Alex, Viktor, i think write semantics could get complicated quickly, actually. However, i was initially responding to the idea that trad business object models don't give way to analytics. Being able to make read-only queries against large volumes of data using the original business object schema

[Lift] Re: Contributing Life and/or Scala

2009-07-22 Thread Ken Egervari
Hi Peter, Yeah, definitely. That's the kind of thing I'm up for. I did read in a blog that the record model for Lift is very similar to RoR. There were some comments on how Grail's orm is more fleshed out. I'll be the first to admit that I haven't taken a look at the Record implementation yet -

[Lift] Re: find, set and save

2009-07-22 Thread Hannes
Hi David, Thanks for that trick! But until there I had no problems.is code ok, that modifies and saves the model? Cause it feels like the changes are not saved. thanks Tobias Howdy, You can save some memory by using findMap: def joinOrders(o1: LimitOrder): Unit = { /* select all

[Lift] Re: find, set and save

2009-07-22 Thread Hannes
I got a compiler error when I tried to compile: val newOrders = LimitOrderMetaObj.findMap(By(LimitOrderMetaObj.status, NEW)){o2 = Full(o2).filter(o2.tradeType.name != o1.tradeType.name)} - error: type mismatch; found : Boolean required:

[Lift] Re: find, set and save

2009-07-22 Thread Hannes
I kind of found the problem. So far, it has nothing to do with save or anything like that. The problem is that this line: val newOrders = LimitOrderMetaObj.findAll(By(LimitOrderMetaObj.status, NEW)).toList.filter(o2 = o2.tradeType.name != o1.tradeType.name) does not compare the name of the

[Lift] JsFlotAppendData

2009-07-22 Thread Peter Robinett
Hi all, I'm trying to use the flot widget and some Comet code to have a regularly updating chart like in the flotDemo's flot-comet page. Unfortunately, my chart wasn't updating and I found I was using JsFlotAppendData incorrectly. Looking at the source code I see that the datas and newDatas

[Lift] Re: find, set and save

2009-07-22 Thread David Pollak
In the first filter line... do you just want to filter out the LimitOrders that do not have the same tradeType foreign key reference as the FK of the parameter that you pass in? Can you post the model opens (the LimitOrder and the other stuff) as well as the logic? For example,

[Lift] Possible to get MegaProtoUser password as entered by the user?

2009-07-22 Thread ssid
Hi, just started with Lift and Scala some weeks ago and did the usual stuff like going through and modifying examples and have mainly been succesfull as long as I keep it simple enough ;-) I'm sort of stuck now because for going further in my little test- project I would need the unscrambled

[Lift] Re: Possible to get MegaProtoUser password as entered by the user?

2009-07-22 Thread David Pollak
ssid, Yeah... you're pretty much out of luck. :-( The MappedPassword stuff is is pretty anal about making sure the plain text of the password does not escape. I'd suggest copying/pasting the MetaProtoUser stuff into your own class and mucking with stuff. Thanks. David On Wed, Jul 22, 2009

[Lift] Re: Weekly Article Request

2009-07-22 Thread Xavi Ramirez
Thanks for the kind words, but it was really David P. who suggested the weekly article request. Also, thank you for lending a helping hand. -Xavi On Wed, Jul 22, 2009 at 9:51 AM, Timothy Perretttimo...@getintheloop.eu wrote: Xavi, I'll do the one on localization - think im the only