[Lift] Working with database views

2009-11-08 Thread GA
Hello guys, I need to create a database view to create a very specific query from an API. I am planning the following steps: 1. Create the view in the database directly 2. Create a model without a primary key extending Mapper instead of Keymapper 3. I am not going to add the view to Schemifi

[Lift] CometActor and render

2009-11-08 Thread jack
I have a CometActor. render is called when it is supposed to be but I don't see the changes. If I refresh the page at anytime, I do see the changes. Any idea what might cause this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

[Lift] Re: CometActor and render

2009-11-08 Thread jack
By the way, I know that when render is called, all the variables have the right values. I just don't see it on the screen unless I refresh it. On Nov 8, 3:12 am, jack wrote: > I have a CometActor. render is called when it is supposed to be but I > don't see the changes. If I refresh the page at

[Lift] Re: A little emacs help please

2009-11-08 Thread Marius
You guys are right. Thank you very much. Fixed. Br's, Marius On Nov 8, 1:11 am, Derek Williams wrote: > On Sat, Nov 7, 2009 at 3:29 PM, Marius wrote: > > > (add-hook 'scala-mode-hook > > >           '(lambda () > > >              (yas/minor-mode-on) > > Not sure if this is just an incomplete c

[Lift] Re: CometActor and render

2009-11-08 Thread Timothy Perrett
Without posting your code it's going to be tough to help you. Cheers, Tim Sent from my iPhone On 8 Nov 2009, at 08:14, jack wrote: > > By the way, I know that when render is called, all the variables have > the right values. I just don't see it on the screen unless I refresh > it. > > On Nov

[Lift] Re: Working with database views

2009-11-08 Thread Jeppe Nejsum Madsen
GA writes: > Hello guys, > > I need to create a database view to create a very specific query from > an API. I am planning the following steps: > > 1. Create the view in the database directly > 2. Create a model without a primary key extending Mapper instead of > Keymapper > 3. I am not goin

[Lift] Re: Select multiple values

2009-11-08 Thread suls
Allright. This code does the trick: bind("e", xhtml, "name" -> text("", name = _), "availableManagers"-> SHtml.multiSelect( User.findAvailableManagers.map(v => (v.id.toString, v.email)), Nil, _.foreach { id => loadM

[Lift] MegaProtoUser + MappedPassword question

2009-11-08 Thread george
I'm using MegaProtoUser which has a MappedPassword field. When the sign up form is displayed, the password field is pre- populated to '***' which is proving very confusing for some users. I would like to display the password field as a completely empty field, but I can not see a way to overr

[Lift] MegaProtoUser + MappedPassword question

2009-11-08 Thread george
I'm using MegaProtoUser which has a MappedPassword field. When the sign up form is displayed, the password field is pre- populated to '***' which is proving very confusing for some users. I would like to display the password field as a completely empty field, but I can not see a way to overr

[Lift] Re: Working with database views

2009-11-08 Thread GA
Yes, it just did the trick. It compiles now. Why is it working now? Isn't it Mapper also a MetaMapper? On Nov 8, 2009, at 12:27 PM, Jeppe Nejsum Madsen wrote: > > GA writes: > >> Hello guys, >> >> I need to create a database view to create a very specific query from >> an API. I am planning t

[Lift] Re: A little emacs help please

2009-11-08 Thread Marius
Do you guys know how to select text just with keyboard in emacs? Something similar with SHIFT + down-arrow etc. Br's, Marius On Nov 8, 10:40 am, Marius wrote: > You guys are right. Thank you very much. Fixed. > > Br's, > Marius > > On Nov 8, 1:11 am, Derek Williams wrote: > > > On Sat, Nov 7,

[Lift] Re: A little emacs help please

2009-11-08 Thread Ross Mellgren
Set transient mark mode (from options menu), then M-SPC (ESC then space, or alt+space) to set mark and move around with cursor. Then M-w (ESC then w, or alt+w) to copy region, C-w (ctrl+w) to kill (cut) region. -Ross On Nov 8, 2009, at 10:08 AM, Marius wrote: > > Do you guys know how to s

[Lift] Re: A little emacs help please

2009-11-08 Thread Ross Mellgren
Acckkk whoops I said M-SPC, I meant C-SPC (ctrl+space) to set mark. M- SPC is reduce all surrounding whitespace to one space. -Ross On Nov 8, 2009, at 10:08 AM, Marius wrote: > > Do you guys know how to select text just with keyboard in emacs? > Something similar with SHIFT + down-arrow etc.

[Lift] Re: A little emacs help please

2009-11-08 Thread Marius
Thanks a lot ! ... I just ran into C-SPC :) Br's, Marius On Nov 8, 5:11 pm, Ross Mellgren wrote: > Acckkk whoops I said M-SPC, I meant C-SPC (ctrl+space) to set mark. M- > SPC is reduce all surrounding whitespace to one space. > > -Ross > > On Nov 8, 2009, at 10:08 AM, Marius wrote: > > > > > D

[Lift] Novell Pulse, front end by Lift

2009-11-08 Thread David Pollak
Folks, Last week, Novell announced their new groupware product, Pulse: http://www.novell.com/products/pulse/ Pulse's UI was built with Lift. If you have time to watch the demo, it's very impressive... quite frankly, I was blown away... I didn't think web browsers could do that, Lift or no. So,

[Lift] Re: Build Broken?

2009-11-08 Thread aw
Build is working now. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubsc

[Lift] Re: Novell Pulse, front end by Lift

2009-11-08 Thread Timothy Perrett
Kudos everyone - the fact that organisations are building saleable products on Lift is a testament to the quality of the platform so early on in its life; as a team we should take real pride in this :-) Cheers, Tim On 8 Nov 2009, at 18:06, David Pollak wrote: > Folks, > > Last week, Novell

[Lift] Re: CometActor and render

2009-11-08 Thread Jack Widman
Sorry. Here it is: As I said, I know that when render is called, foo.getValue has the right value. But it does not show on the screen, unless I refresh the browser. package com.foo.comet import net.liftweb._ import http._ import js._ import JsCmds._ import net.liftweb.util._ import net.liftweb.

[Lift] Re: CometActor and render

2009-11-08 Thread jack
One more thing. 'foo's get added to the FooQueue periodically. On Nov 8, 6:47 pm, Jack Widman wrote: > Sorry. Here it is:   As I said, I know that when render is called, > foo.getValue has the right value. But it does not show on the screen, unless > I refresh the browser. > > package com.foo.co

[Lift] Re: Select multiple values

2009-11-08 Thread David Pollak
On Sun, Nov 8, 2009 at 1:32 AM, suls wrote: > > Allright. This code does the trick: > > bind("e", xhtml, >"name" -> text("", name = _), >"availableManagers"-> SHtml.multiSelect( > User.findAvailableManagers.map(v => > (v.id.toString, v.email)), >

[Lift] broken app

2009-11-08 Thread Oliver Lambert
Hi Over the last couple of days I have been getting the following error on Lift 1.0 using scala 2.7.3 when I try to deploy an application to a Glassfish (or Tomcat) server (Jetty works ok) : Exception starting filter LiftFilter java.lang.IncompatibleClassChangeError: Class scala.List$$anon$1 does

[Lift] Re: broken app

2009-11-08 Thread David Pollak
Oliver, Looks like a mixed scala version issue. Please look in your WAR file to make sure there's only 1 Scala JAR and also make sure you app server does not have a Scala library in the /lib directory. Thanks, David On Sun, Nov 8, 2009 at 5:22 PM, Oliver Lambert wrote: > Hi > > Over the last

[Lift] jetty/actors performance question tangentially related to lift

2009-11-08 Thread Lincoln
Hi, Currently I have a jetty webapp that uses continuations and actors to scale to many connections. While this isn't a lift question per se I was hoping the folks on this list could help since it's my understanding that Lift does similar stuff under certain setups. Basically, the functionality

[Lift] How to bind the Map to View in the Snippet ?

2009-11-08 Thread Neil.Lv
Hi all, How to bind the Map to View in the Snippet ? This is the bind code ### scala.collection.mutable.Map[String,List[String]] = Map(2009/10/09 -> List(St1), 2009/10/10 -> List(Hello, M7, 123, da)) var data = Map(2009/10/09 -> List(St1), 2009/10/10 -> List(Hello, M7, 123, da))

[Lift] Re: How to bind the Map to View in the Snippet ?

2009-11-08 Thread Naftoli Gugenheim
That should not be foreach but flatMap. Foreach is like map but returns Unit, and flatMap is like map but it concatenates the resulting elements, which must be iterable (or iterators, depending). - Neil.Lv wrote: Hi all, How to bind the Map to View in t

[Lift] My Sitemap Problem

2009-11-08 Thread Randinn
I made this sitemap but the User.sitemap is not showing up on the site, it looks like it should work but is not, can someone point out what I did wrong? val entries = Menu(Loc("Home", List("index"), "Home")):: Menu(Loc("Item", List("member", "index") -> false, "Item"), Menu(Loc("Ite

[Lift] Re: How to bind the Map to View in the Snippet ?

2009-11-08 Thread Neil.Lv
How should i write the bind code ? var data = Map(2009/10/09 -> List(St1), 2009/10/10 -> List(Hello, M7, 123,da)) data.flatMap(d=> { Log.info(" *:" + d) bind("data", in, "date_title" -> Text("222") ) }) Get this erors

[Lift] Re: jetty/actors performance question tangentially related to lift

2009-11-08 Thread David Pollak
If you have all your requests going to 1 actor, then you've reduced your application to a single threaded app. If you're using Scala Actors, there are all kinds of wacky things that happen with the Fork-Join library that the Actors use for scheduling and a whole lot of knobs to turn to get the sch

[Lift] Re: How to bind the Map to View in the Snippet ?

2009-11-08 Thread David Pollak
On Sun, Nov 8, 2009 at 7:45 PM, Neil.Lv wrote: > > > How should i write the bind code ? > > var data = Map(2009/10/09 -> List(St1), 2009/10/10 -> List(Hello, M7, > 123,da)) > > > data.flatMap(d=> { > data.toList.flatMap(...) > Log.info(" *:" + d) > b

[Lift] Re: Working with database views

2009-11-08 Thread David Pollak
On Sun, Nov 8, 2009 at 5:51 AM, GA wrote: > > Yes, it just did the trick. It compiles now. > > Why is it working now? Isn't it Mapper also a MetaMapper? > No. A Mapper corresponds to a row in your table. A MetaMapper corresponds to the table itself. > > > On Nov 8, 2009, at 12:27 PM, Jeppe N

[Lift] Re: jetty/actors performance question tangentially related to lift

2009-11-08 Thread Lincoln
Thanks for the feedback David... I have also created a pool of actors and dispatch requests round-robin style to it. Oddly enough, I see absolutely no difference in the performance characteristics - in both cases 95% of the time is spent between the suspend and the actor receiving the request, bu

[Lift] Re: CometActor and render

2009-11-08 Thread David Pollak
Jack, I reproduced your code and it seems to work fine. I've enclosed a working copy. Some comments about your code: - The foos variable and the foo variable may be getting confused in the code... the render method may be rendering the same thing based on the unchanging foos variable.

[Lift] How quick is webdev with Lift?

2009-11-08 Thread Alex Siman
How quick is webdev with Lift? Is your Lift dev-cycle of webapp is the same as with classic Java? I mean these steps: 1) code 2) compile 3) deploy 4) find error ... n-2) re-compile n-1) re-deploy ... Such as Scala is compilable lang, every change made into the snippets requires "re-compile" and

[Lift] Re: How quick is webdev with Lift?

2009-11-08 Thread harryh
I use JRebel and SBT (http://code.google.com/p/simple-build-tool/) and very rarely have to restart my server when doing development. It's a very quick dev-cycle. No big tips really. I save the code and reload the page and see the results of my work. -harryh --~--~-~--~~

[Lift] Re: How to bind the Map to View in the Snippet ?

2009-11-08 Thread Neil.Lv
David, Thanks very much! It works now and can be shown in the page ! Cheers, Neil On Nov 9, 12:06 pm, David Pollak wrote: > On Sun, Nov 8, 2009 at 7:45 PM, Neil.Lv wrote: > > > How should i write the bind code ? > > > var data = Map(2009/10/09 -> List(St1), 2009/10/10 -> List(Hello

[Lift] How to specify the SELECT statement in the Mapper ?

2009-11-08 Thread Neil.Lv
Hi all, There is some example code: ### SELECT id, name, sex, created_at, DAYOFWEEK(created_at,) as week, (CURRENT_DATE) as t FROM users WHERE created_at > (CURRENT_DATE ) AND created_at < (CURRENT_DATE + interval 2 day) ORDER BY created_at ASC ### How can i specify the SELECT statement th

[Lift] Re: About the localization with lift:loc !

2009-11-08 Thread YING-KWANG TU
Neil, Considering that we are both using the lift-core_xx_XX in our bundle. 1. S.??("works seamlessly") However, I am having same issue with you on: Default Value OR Default Value OR login I am not sure if it has to do with the bundle name we are using but no, we can't get to work. On Sat

[Lift] Re: My Sitemap Problem

2009-11-08 Thread Randinn
I just realized that it should be: Menu(Loc("AuserList", List("auser", "list"), "User List"))) :: User.sitemap On Nov 9, 2:37 pm, Randinn wrote: > I made this sitemap but the User.sitemap is not showing up on the > site, it looks like it should work but is not, can someone point ou

[Lift] Re: CometActor and render

2009-11-08 Thread Jack Widman
Thanks David. This is a big help. Can you tell me exactly how lowPriority, mediumPriorty and highPriority work? When are they called? On Sun, Nov 8, 2009 at 11:35 PM, David Pollak wrote: > Jack, > > I reproduced your code and it seems to work fine. I've enclosed a working > copy. > > Some comme

[Lift] Is there a Order Map in the lift ?

2009-11-08 Thread Neil.Lv
Hi all, Is there a Order Map in the lift ? Example: 1-> "xx", 2 -> "yy", 3 -> "zz" 1:) add 1-> "xx" Map(1-> "xx") 2:) add 3 -> "zz" Map(3 -> "zz", 1-> "xx") 3:) add 2 -> "yy" Map(2 -> "yy", 3 -> "zz", 1-> "xx") The result maybe: Map(2 -> "yy", 3 -> "zz", 1-> "xx")