[Lift] Re: ProtoUser and securing pages

2009-08-19 Thread Keith K
I'd like to test the User for different access levels with functions for each menu item, looking at the User.scala mapped object. Is there some example code out there that does more than check for logged-in status? -Ketih On Jul 16, 5:43 am, Chris Lewis burningodzi...@gmail.com wrote: I did

[Lift] MappedDateTime losing time?

2009-08-19 Thread Grant Wood
Hello, I've extended MappedDateTime to override _toForm (to add a class=datepicker) and set my own DateFormat for the input/output. This is so that I could use a JQuerry datepicker which allows me to set the time as well as the date. Everything is working on the client, and the date with time

[Lift] Re: slow down ajax?

2009-08-19 Thread marius d.
No you can't override it because SHtml is an object not a type. The function definition above (def ajaxText(value: String, jsFunc: Call, func: String = JsCmd) ) already exists in SHtml. In fact we have this deferring mechanism for other functions like ajaxButton, a, etc. If you're still having

[Lift] Re: PreCache's use of WHERE ... IN

2009-08-19 Thread Jeppe Nejsum Madsen
David Pollak feeder.of.the.be...@gmail.com writes: On Tue, Aug 18, 2009 at 3:24 PM, harryh har...@gmail.com wrote: Because making things line up name-wise for joins (especially when you're joining to the same table) is a lot more difficult. All RDBMS except MySQL will optimize both

[Lift] Re: Relax method scope

2009-08-19 Thread Timothy Perrett
Committed - I also added a dirty_? : Boolean method to Field.scala Cheers, Tim On Aug 18, 6:38 pm, David Pollak feeder.of.the.be...@gmail.com wrote: It's okay to relax it... maybe even make it public. On Tue, Aug 18, 2009 at 8:57 AM, Timothy Perrett timo...@getintheloop.euwrote:

[Lift] lift:with-params deprecation alternatives

2009-08-19 Thread inca
As suggested in http://groups.google.com/group/liftweb/browse_thread/thread/d664b712d08fbf41 by Mr. Marius D., I should use lift:with-param in order to insert content into multiple bind points of template. But recently I read that this tag is deprecated. What alternatives are available? P.S. I

[Lift] Re: lift:with-params deprecation alternatives

2009-08-19 Thread Timothy Perrett
Its actually not deprecated! We did deprecate it for a while, then straight away un-deprecated it because people wanted it. So you can use it without any problems or concerns... Cheers, Tim On 19/08/2009 08:55, inca incarn...@whiteants.net wrote: As suggested in

[Lift] Re: lift:with-params deprecation alternatives

2009-08-19 Thread marius d.
Yes we tried to deprecate it but later on we un-derprecate it :) So you can use lift:with-param safely. Purely for naming perspective lift:insert seems to me more intuitive than lift:with-param ... I'm not sure if this is a strong enough motivation to change the name hence inducing a breaking

[Lift] Re: This is the official support channel for Lift

2009-08-19 Thread Randinn
If you haven't already David, you, may want to state where to go for Lift help in your Twitter Bio. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

[Lift] Re: lift:with-params deprecation alternatives

2009-08-19 Thread marius d.
This is a decision that needs consensus ... and David's agreement. Personally I agree with it but others may not. Br's, Marius On Aug 19, 12:41 pm, inca incarn...@whiteants.net wrote: Why not just introduce the new tag, leaving the former alone (possibly deprecated in next major releases)?

[Lift] Re: lift:with-params deprecation alternatives

2009-08-19 Thread inca
Why not just introduce the new tag, leaving the former alone (possibly deprecated in next major releases)? On 19 авг, 12:07, marius d. marius.dan...@gmail.com wrote: Yes we tried to deprecate it but later on we un-derprecate it :) So you can use lift:with-param safely. Purely for naming

[Lift] Include build # in LiftVersion?

2009-08-19 Thread Jeppe Nejsum Madsen
Hi, When living on the bleeding edge (i.e. 1.1-SNAPSHOT) it is sometimes difficult to figure out which version of lift is in use and deployed. LiftRules.liftVersion only returns 1-1.0-SNAPSHOT. I could probably try to correlate liftBuildDate with hudson and github but this seem error prone

[Lift] Re: lift:with-params deprecation alternatives

2009-08-19 Thread inca
Okay, thanks a lot! Let's hope the others will accept a proposal... --~--~-~--~~~---~--~~ 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

[Lift] Re: Has anyone tried Stax?

2009-08-19 Thread Ryan Donahue
I'm not so concerned about the lack of session replication from a scalability point of view. Sticky sessions will get you a long way. Plus I've learned my lesson about over-engineering for scalability before you need to. However, it'd be nice to choose a path that could scale in the rare event

[Lift] Re: lift:with-params deprecation alternatives

2009-08-19 Thread Ross Mellgren
I'm not sure if my consensus matters or not, but I like lift:insert better than lift:with-param. -Ross On Aug 19, 2009, at 9:10 AM, inca wrote: Okay, thanks a lot! Let's hope the others will accept a proposal... --~--~-~--~~~---~--~~ You received this

[Lift] Re: MappedDateTime losing time?

2009-08-19 Thread Peter Robinett
Hi Grant, I'm afraid I don't have the answer for you, but perhaps my attempt at making a MappedTimestamp will prove useful to you: http://groups.google.com/group/liftweb/msg/84b1612953fe9ac0. Peter Robinett On Aug 18, 6:02 pm, Grant Wood smackt...@gmail.com wrote: Hello, I've extended

[Lift] error while SHtml.ajaxInvoke call

2009-08-19 Thread pravin
Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds table border=0 width=100% class = resultheader cellpadding=10 t:feedsResultRows/ /table /lift:DisplayResults.showFeeds snippet for

[Lift] Re: CMS for Lift?

2009-08-19 Thread TylerWeir
Wonderful! On Aug 19, 11:03 am, David Pollak feeder.of.the.be...@gmail.com wrote: FWIW... I got roped into hosting a CMS by the PTA of my kids' school.  I may knock something together in Lift or leverage off the work Glenn has done. On Tue, Aug 18, 2009 at 3:26 PM, Timothy Perrett

[Lift] Re: Include build # in LiftVersion?

2009-08-19 Thread David Pollak
On Wed, Aug 19, 2009 at 5:44 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, When living on the bleeding edge (i.e. 1.1-SNAPSHOT) it is sometimes difficult to figure out which version of lift is in use and deployed. LiftRules.liftVersion only returns 1-1.0-SNAPSHOT. I could probably

[Lift] Re: More problems with CRUDify and SessionVars

2009-08-19 Thread David Pollak
On Wed, Aug 19, 2009 at 5:20 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Seems I missed this responsemore comments below On Wed, Aug 12, 2009 at 8:49 PM, David Pollakfeeder.of.the.be...@gmail.com wrote: On Mon, Aug 10, 2009 at 9:07 AM, Jeppe Nejsum Madsen je...@ingolfs.dk

[Lift] Re: ProtoUser and securing pages

2009-08-19 Thread David Pollak
On Tue, Aug 18, 2009 at 6:10 PM, Keith K quasike...@gmail.com wrote: I'd like to test the User for different access levels with functions for each menu item, looking at the User.scala mapped object. Is there some example code out there that does more than check for logged-in status? Can

[Lift] Re: Wiki article - CRUD

2009-08-19 Thread David Pollak
On Wed, Aug 19, 2009 at 9:12 AM, Hannes hannes.flo...@gmx.li wrote: Hey Lifters, Again and again I'm having problems to do simple CRUD operations with mapped fields, especially referenced fields (foreign keys). Because I think everyone need those things and I couldn't find a simple way to

[Lift] Re: Proposed internal changes on Mapper?

2009-08-19 Thread Derek Chen-Becker
OK, changes have been added to 1.0.1-SNAPSHOT (and deployed on scala-tools.org) and I'll roll them into 1.1-SNAPSHOT (along with the Oracle and PostgreSQL fixes) this afternoon. Derek On Tue, Aug 18, 2009 at 3:16 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I'll go ahead and see what I

[Lift] AutoComplete IE bug?

2009-08-19 Thread jon
Hi, The AutoComplete widget leaves a trailing , in the javascript that causes IE to complain and not function. Or, at least i think that's the only reason that it's not functioning in IE. Has anyone else noticed this problem? AutoComplete.scala:124 - Jon

[Lift] Read context param

2009-08-19 Thread Naftoli Gugenheim
How can I read a context param (e.g. H2 sets connection param)? --~--~-~--~~~---~--~~ 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

[Lift] Re: AutoComplete IE bug?

2009-08-19 Thread jon
btw, i removed the trailing , and confirmed that it fixes the IE problem. - jon On Aug 19, 3:38 pm, marius d. marius.dan...@gmail.com wrote: If no other committer wants to look into this I'll look on it. Tim, would this interest you ? Br's, Marius On Aug 19, 9:13 pm, jon

[Lift] Re: Read context param

2009-08-19 Thread inca
I've got the quick-and-dirty: access HttpServletRequest and via the HttpSession to the ServletContext object. E.g., def fooParam = Text( S.servletRequest match { case Full(r) = r.getSession.getServletContext.getInitParameter (foo) case _ = } ) Best regards,

[Lift] Re: MappedDateTime losing time?

2009-08-19 Thread David Pollak
Grant, What database are you using? What version of Lift? Thanks, David On Tue, Aug 18, 2009 at 6:02 PM, Grant Wood smackt...@gmail.com wrote: Hello, I've extended MappedDateTime to override _toForm (to add a class=datepicker) and set my own DateFormat for the input/output. This is so

[Lift] Re: slow down ajax?

2009-08-19 Thread g-man
I quoted the def from net.liftweb.http.SHtml in: http://scala-tools.org/scaladocs/liftweb/1.0/ and when I tried the other version, my complier did not accept the extra param. That's why I thought I had to override something... Is there a newer version I should be using? On Aug 18, 10:38 pm,

[Lift] Re: ProtoUser and securing pages

2009-08-19 Thread Keith K
I added a field and cooresponding function to the User.scala class of liftworkshop, as follows: def isApprover_? = { isApprover.is } object isApprover extends MappedBoolean(this) { override def defaultValue = false } It appears to create the proper column for it in the DB, etc. but

[Lift] Re: ProtoUser and securing pages

2009-08-19 Thread Keith K
Okay, I think I may have figured out how to do this. I need to call User.currentUser and then call open_! on it. (I guess this loads it from the db). Then my canViewSecretPage_? func can work as follows. def canViewSecretPage_? : Boolean = { if (User.loggedIn_? ) { val user :

[Lift] Re: ProtoUser and securing pages

2009-08-19 Thread David Pollak
On Wed, Aug 19, 2009 at 11:52 AM, Keith K quasike...@gmail.com wrote: I added a field and cooresponding function to the User.scala class of liftworkshop, as follows: def isApprover_? = { isApprover.is } object isApprover extends MappedBoolean(this) { override def defaultValue = false

[Lift] Re: how to do basic joins

2009-08-19 Thread David Pollak
On Sat, Aug 15, 2009 at 11:14 AM, harryh har...@gmail.com wrote: class Foo extends LongKeyedMapper[Foo] with IdPK { def getBazes = { Baz.findAll(In(Baz.barid, Bar.id, By(Bar.fooid, this))) } OK, upgrading to 1.1-M4 got rid of the NPE so I'm just gonna assume there was a bug that

[Lift] Re: Read context param

2009-08-19 Thread marius d.
In 1.1-SNAPSHOT you don't have access to servletRequest. you have val r: HTTPRequest = S.containerRequest But currently HTTPRequest does not provide a way of getting the net.liftweb.http.provider.HTTPContext. I will add this support pretty soon. You can still do that by: import

[Lift] Re: AutoComplete IE bug?

2009-08-19 Thread marius d.
If no other committer wants to look into this I'll look on it. Tim, would this interest you ? Br's, Marius On Aug 19, 9:13 pm, jon jonhoff...@gmail.com wrote: Hi, The AutoComplete widget leaves a trailing , in the javascript that causes IE to complain and not function.  Or, at least i think

[Lift] Re: SHtml.a generating an a with bad attributes

2009-08-19 Thread David Pollak
On Mon, Aug 17, 2009 at 1:19 PM, harryh har...@gmail.com wrote: Looks like a bug to me It does to me as well. And a somewhat serious one. FYI this bug (if it is indeed a bug) does *not* occur in Lift 1.0, but does in 1.1-M1 and later versions. It should be fixed in trunk. In 1.1,

[Lift] Re: ProtoUser and securing pages

2009-08-19 Thread Keith K
That's what I call Code-for-Clunkers. Thanks, -Keith On Aug 19, 1:57 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Aug 19, 2009 at 11:52 AM, Keith K quasike...@gmail.com wrote: I added a field and cooresponding function to the User.scala class of liftworkshop, as follows:

[Lift] Re: Read context param

2009-08-19 Thread Naftoli Gugenheim
Can you do that in Boot? That's where I need to access the connection. On Wed, Aug 19, 2009 at 2:45 PM, inca incarn...@whiteants.net wrote: I've got the quick-and-dirty: access HttpServletRequest and via the HttpSession to the ServletContext object. E.g., def fooParam = Text(

[Lift] Re: Sitemap and mapper dependency's effects on object reuse

2009-08-19 Thread David Pollak
Glenn, Lemme see if I can put together some abstractions that might help out. Thanks, David On Tue, Aug 18, 2009 at 4:58 PM, glenn gl...@exmbly.com wrote: I'm looking for some answers on best coding practices, particularly when it comes to object reuse. In a data-centric application,

[Lift] Re: Read context param

2009-08-19 Thread David Pollak
On Wed, Aug 19, 2009 at 11:29 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: How can I read a context param (e.g. H2 sets connection param)? Why is the context necessary to figure out the DB connection parameter? -- Lift, the simply functional web framework http://liftweb.net

[Lift] Re: MappedDateTime losing time?

2009-08-19 Thread Grant Wood
Thank you Peter, In the process of trying to figure out the proper syntax to extend the MappedDateTime class I had run across your thread which had been very useful. After your comment, I grabbed your MappedTimestamp source from github and added code for my custom DateFormat. Works like a

[Lift] Git dumbitude

2009-08-19 Thread Derek Chen-Becker
Well, I pushed the new Oracle/Mapper code to Git and then I realized that somehow I merged the code twice. The logs are going to look a little confusing but I've at least confirmed that everything is correct and working. Apologies for the mistake. In other news, I can't get into GitHub's web

[Lift] Re: CMS for Lift?

2009-08-19 Thread glenn
I think the trick to a really vibrant CMS is the ability to create plugins - modules in Lift that can be dynamically installed. I'm not sure how to affect this except through OSGi. On Aug 19, 8:55 am, TylerWeir tyler.w...@gmail.com wrote: Wonderful! On Aug 19, 11:03 am, David Pollak

[Lift] clue for the clueless?

2009-08-19 Thread Meredith Gregory
Lifted, i readily confess to being a total idiot. i'm always running into this problem of not knowing when the namespace binding is in effect. i've cribbed Chat.scala and other files from liftweb/site/example and added it whole sale to my project.When i add val entries = (

[Lift] Re: error while SHtml.ajaxInvoke call

2009-08-19 Thread David Pollak
Are you trying to create a link/button that someone clicks on to cause the Ajax call to be made? On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com wrote: Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds

[Lift] Re: Sitemap and mapper dependency's effects on object reuse

2009-08-19 Thread glenn
David, Sounds like you know where I'm coming from on this. What got me was an attempt to write a Menu Loc for listing all registered users on the site. The Template for this contains a lift tag for a snippet in another class. I don't necessarily object to the dependency on a snippet class, but

[Lift] Re: clue for the clueless?

2009-08-19 Thread Derek Chen-Becker
What does your template look like? I don't think that the error you're getting has anything to do with SiteMap (problems there would result in a 403 or 404 HTTP error). Derek On Wed, Aug 19, 2009 at 5:47 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Lifted, i readily confess to being a

[Lift] Re: Sitemap and mapper dependency's effects on object reuse

2009-08-19 Thread glenn
Complicating matters a bit, I decided to use the new ModelSnippet, which extends StatefulSniippet for my snippet class, so I'm not sure the Template can be refactored to not use it. Glenn... On Aug 19, 4:42 pm, glenn gl...@exmbly.com wrote: David, Sounds like you know where I'm coming from

[Lift] Re: lift:with-params deprecation alternatives

2009-08-19 Thread David Pollak
On Wed, Aug 19, 2009 at 2:46 AM, marius d. marius.dan...@gmail.com wrote: This is a decision that needs consensus ... and David's agreement. I'm cool with it. It might also be worth thinking about creating some alias library so folks could change the default names of Lift's snippets. Or

[Lift] Re: PreCache's use of WHERE ... IN

2009-08-19 Thread Derek Chen-Becker
And PostGIS rocks if you do any GIS-related stuff. On Tue, Aug 18, 2009 at 5:25 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Aug 18, 2009 at 3:24 PM, harryh har...@gmail.com wrote: Because making things line up name-wise for joins (especially when you're joining to

[Lift] Re: Git dumbitude

2009-08-19 Thread TylerWeir
GitHub's Front End has been crawling for a while now. Still, it's easier to blame you. :) On Aug 19, 6:25 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I pushed the new Oracle/Mapper code to Git and then I realized that somehow I merged the code twice. The logs are going to look a

[Lift] Re: clue for the clueless?

2009-08-19 Thread David Pollak
what URL are you using? Can you include the full browser source? On Wed, Aug 19, 2009 at 4:47 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Lifted, i readily confess to being a total idiot. i'm always running into this problem of not knowing when the namespace binding is in effect.

[Lift] Re: PreCache's use of WHERE ... IN

2009-08-19 Thread harryh
And PostGIS rocks if you do any GIS-related stuff. Which I am (this was my other reason for planning on migrating over). I guess it's time to take the plunge. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Lift] Re: clue for the clueless?

2009-08-19 Thread Naftoli Gugenheim
That's probably a Firefox XML error - look at view source and see what the Elem label is that's not being bound. - Meredith Gregorylgreg.mered...@gmail.com wrote: Lifted, i readily confess to being a total idiot. i'm always running into this problem of not

[Lift] Re: version issues for comet actor stuff

2009-08-19 Thread David Pollak
On Wed, Aug 19, 2009 at 3:03 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: David, et al, i cribbed the Chat.scala and related files from the liftweb examples dir as a beginning for the Pixillion project. i'm getting issues compiling these files around missing defns for CometListener,

[Lift] Re: Git dumbitude

2009-08-19 Thread Derek Chen-Becker
Mea culpa, mea culpa! On Wed, Aug 19, 2009 at 7:39 PM, TylerWeir tyler.w...@gmail.com wrote: GitHub's Front End has been crawling for a while now. Still, it's easier to blame you. :) On Aug 19, 6:25 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I pushed the new Oracle/Mapper

[Lift] Re: slow down ajax?

2009-08-19 Thread g-man
Well, I went down the rabbit hole on a quest for 1.1-SNAPSHOT - It is not visible, even though my pom points to it, and the .m2 repository shows a directory for it. .m2\repository\net\liftweb\lift-archetype-basic\1.1-SNAPSHOT Bottom line is : src\main\scala\bootstrap\liftweb\Boot.scala:11:

[Lift] Re: slow down ajax?

2009-08-19 Thread Naftoli Gugenheim
Are you using maven to compile? Delete any earlier jar so you rule out that possibility. Also, if you turn on debug output in maven (-X) it might tell you the path that it's using to invoke the compiler so you can see which jar it's using if any. -

[Lift] Re: slow down ajax?

2009-08-19 Thread marius d.
Or just checkout from git master and do a mvn clean:clean install Trust me it's all there :) Br's, Marius On Aug 20, 8:15 am, Naftoli Gugenheim naftoli...@gmail.com wrote: Are you using maven to compile? Delete any earlier jar so you rule out that possibility. Also, if you turn on debug

[Lift] Re: Read context param

2009-08-19 Thread marius d.
I think that regardless of Naftoli's particular case he brought up a valid point such as if when initializing a servlet user has a ServletConfig ... we could easily abstract things here as well to make it available in Boot as well. I'll noodle on this and see what I can do. Of course I would not

[Lift] Re: error while SHtml.ajaxInvoke call

2009-08-19 Thread pravin
yes i have submit button. on click event of this i am doing other tasks. above data population for text is not on click submit button. On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Are you trying to create a link/button that someone clicks on to cause the Ajax call to

[Lift] Re: Read context param

2009-08-19 Thread Naftoli Gugenheim
H2's DbStarter reads the url/username/password and stores a connection object back in the servlet context. - marius d.marius.dan...@gmail.com wrote: I think that regardless of Naftoli's particular case he brought up a valid point such as if when