[Lift] Re: Using Lift to build a Web Service and the PUT HTTP method??

2009-08-28 Thread David Pollak
On Thu, Aug 27, 2009 at 5:35 PM, Alan M wrote: > > I'm trying to use PUT with Lift and it seems to be working, except I > can't find the content I put. I'm using jQuery on the front end (a > custom front-end) and firebug seems to think the data gets sent. > Although it doesn't show me the raw re

[Lift] Re: authentication and access control

2009-08-28 Thread marius d.
I'm not sure you HTTP authentication is what your looking for. Lift has support for both BASIC and DIGEST authentication models (irrespective of any persistence technology) and you can grant access based on Roles defined as a hierarchical structure. See /examples/http-authentication application.

[Lift] Re: authentication and access control

2009-08-28 Thread Timothy Perrett
Chris, Are you thinking along the lines of JAAS or similar? As Marius said, we currently don't have a defined way of doing general purpose authentication within Lift apps Cheers, Tim Sent from my iPhone On 28 Aug 2009, at 08:14, "marius d." wrote: > > I'm not sure you HTTP authentication

[Lift] Re: error in http authetication and openid

2009-08-28 Thread iboy
Thanks Timothy That helped me out a lot but i have one doubt that as per given in liftbook code i used LiftRules. httpAuthProtectedResource.append but new code used prepend and secondly how can we apply the role based access to the user model so that when signing in we can implicitly know that

[Lift] Re: Using Lift to build a Web Service and the PUT HTTP method??

2009-08-28 Thread Charles F. Munat
If, for example, you are sending an "id" property, then you should be able to get it through the Req object via params: req.params("id") That's how I do it, but without seeing what you're sending, I can't be sure how you would do it. It works the same way as with POST, so I'm not sure why you

[Lift] How to do pagination in lift application...

2009-08-28 Thread pravin
Hi.. i am using lift ORM (mapper framework) and MS SQL server(2008) i want to do pagination in my application. i tried with to starAt() and maxRows() but this generate Limit query... And MSSQL server not support limit query (it uses top for same..) So how can i do pagination with Lift OR

[Lift] Re: how to use thread in lift

2009-08-28 Thread marius d.
Why don't you use scala actors? ... and after you populate asynchronously the two lists do you need to report the lists back to client asynchronously (say Comet) or when the page is rendered? ... If it's the later that you'd probably need a count-down-latch or a cyclic barrier. Br's, Mairus On

[Lift] how to use thread in lift

2009-08-28 Thread pravin
Hi, i want to use thread in my lift application. I have two Lists i.e. List1() and List2(); when i click on submit button i want to do following things - i am executing to method to populate above to list -; List1() = fun1(); List2() = fun2(); So i want to do above things with thread s th

[Lift] Re: error in http authetication and openid

2009-08-28 Thread Timothy Perrett
It should not matter if its append or prepend (relatively speaking) as its a RuleSeq[T] OOTB, the HTTP Auth stuff has nothing to do with ProtoUser... you could probably knit them together, but that is not what it is designed to do from the starting blocks... Cheers, Tim On Aug 28, 8:09 am, iboy

[Lift] Re: Newbie Question design pattern for ORM in Lift

2009-08-28 Thread Bjarte Stien Karlsen
That looks very cool from a first glance. mvh Bjarte On Fri, Aug 28, 2009 at 5:04 AM, rstradling wrote: > > git clone git://github.com/rstradling/DDLtoLiftORM.git  is the > location of the git code. > > http://github.com/rstradling/DDLtoLiftORM is the web address > > I hope this is helpful to ot

[Lift] Re: how to use thread in lift

2009-08-28 Thread Timothy Perrett
Pravin, why not use scala actors? Cheers, Tim On 28/08/2009 10:05, "pravin" wrote: > > Hi, > i want to use thread in my lift application. > I have two Lists i.e. List1() and List2(); > when i click on submit button > i want to do following things - > > i am executing to method to popul

[Lift] Re: how to use thread in lift

2009-08-28 Thread Stefan Langer
Are you sure you are increasing performance? --~--~-~--~~~---~--~~ 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 l

[Lift] Re: authentication and access control

2009-08-28 Thread Chris Lewis
Tim, No, just looking around at a higher level. Back to what I like about spring security, it stays entirely out of application code's way (as does the protouser stuff). I will look at those auth examples, and I will poke through (Mega)ProtoUser source (I'm more accustomed to having an applic

[Lift] Re: authentication and access control

2009-08-28 Thread David Pollak
On Thu, Aug 27, 2009 at 6:42 PM, Chris Lewis wrote: > > Lift users, > > I'm curious what you all are using for user access control (Mapper users > excluded). I'm seriously evaluating lift for a project that will use > JPA. My full time job uses Spring Security, which while nice in that it > stays

[Lift] Re: How to do pagination in lift application...

2009-08-28 Thread David Pollak
Our support for SQL Server is not complete. Please file tickets with specific use cases at http://github.com/dpp/liftweb/issues We currently have little demand for SQL Server support. If you have an app that's greenlighted for production, please contact me off-list about it and we can talk about

[Lift] Re: error in http authetication and openid

2009-08-28 Thread David Pollak
I think you'll be best off protecting your resource with basic auth to determine who the user is but using sitemap (for HTML pages) and guards in partial functions (for web services) to enforce URL-level RBAC. On Fri, Aug 28, 2009 at 2:44 AM, Timothy Perrett wrote: > > It should not matter if its

[Lift] Re: Scope issues with CometActors

2009-08-28 Thread David Pollak
On Thu, Aug 27, 2009 at 11:24 PM, Spencer Uresk wrote: > That did the trick, and I understand what is going on much better now. > Thank you! > > For some reason my brain is having trouble adjusting to the idea that you > can generate more sophisticated markup in Scala code. I think it's okay to

[Lift] Re: authentication and access control

2009-08-28 Thread Timothy Perrett
A your talking about access control? That is something different. See DPP's response about that as his answer I believe is what you want. Regarding the JPA example I'll look at that - there have been some breaking changes in trunk recently so its likely that they have not been updated. Chee

[Lift] Re: how to use thread in lift

2009-08-28 Thread David Pollak
Using threads in Lift is the same as using threads in any JVM-based application. Scala has a particular friendly mechanism for dealing with threads called Actors (others have noted this). Combined with Futures, they make for some nice coding. Here's an example: import scala.actors._ import Acto

[Lift] Re: (beginner question) Liftweb View folder

2009-08-28 Thread dan
On Aug 27, 12:26 pm, David Pollak wrote: > On Thu, Aug 27, 2009 at 9:49 AM, Daniel Nelson wrote: > > Hello, > > > *Problem* > > I'm new to Lift/Scala and trying to understand/experiment with Lift's View > > folder.  I've not gotten past a 404 error on the browser (as it relates to > > the View f

[Lift] Creating your own tags?

2009-08-28 Thread Timothy Perrett
Guys, If I wanted to create my own set of custom tags that looked like: Ive not seen anyone ask this before and I know I cant use LiftTagPF to do it, so how would one go about doing such trickery? Can I still make use of lift goodness for snippets etc? Cheers, Tim --~--~-~--~~

[Lift] Re: Mapper with custom id

2009-08-28 Thread Derek Chen-Becker
I'm probably missing something here, but wouldn't putting those 5 lines of code into a trait work? trait ManualValue { /* allow user-defined primary key */ override def writePermission_? = true override def dbAutogenerated_? = false private var myDirty = false ov

[Lift] Re: Implementing new datatypes into metamapper

2009-08-28 Thread Derek Chen-Becker
Well, off the top of my head this may require some changes to the MetaMapper code to get working. Looking at the example PG code that you linked to, they use setObject on the PreparedStatement to insert CIDR objects. The problem is that the current MetaMapper code *always* uses the overload of setO

[Lift] Re: has anyone seen this exception?

2009-08-28 Thread Jack Widman
I'm able to get the page with wget, no problem. My application is making many hits to other sites. Maybe that has something to do with it. Also I am using Jetty in embedded mode. Is there a difference in performance and throughput with Jetty embedded vs non embedded? On Fri, Aug 28, 2009 at 12:20

[Lift] Re: Db.addLogFunc

2009-08-28 Thread marius d.
EXCELLENT WORK DEREK ! On Aug 28, 7:28 pm, Derek Chen-Becker wrote: > Hi all, >     I've made a change to the Mapper logging functionality in > wip-dcb-sql-log-wrappers. The DB.addLogFunc method has changed to: > > addLogFunc( f: (DBLog,Long) => Any) > > where DBLog is a new trait (below) and th

[Lift] Bug in HasManyThough causing unexpected deletions?

2009-08-28 Thread harryh
Tips are on TipLists based on TipListBinds. Tips are also hooked to a Venue: class Tip extends LongKeyedMapper[Tip] with IdPK { // other unrelated stuff stuff object venueid extends MappedLongForeignKey(this, Venue) object lists extends HasManyThrough(this, TipList, TipListBind, TipListBind

[Lift] Re: Bug in HasManyThough causing unexpected deletions?

2009-08-28 Thread harryh
> Currently thinking through what's going on in > HasManyThrough::afterUpdate override def afterUpdate { val current = through.findAll(By (throughFromField,owner.primaryKeyField)) val newKeys = new HashSet[ThroughType]; theSetList.foreach(i => newKeys += i) val toDelete = current.fi

[Lift] Re: Creating your own tags?

2009-08-28 Thread David Pollak
On Fri, Aug 28, 2009 at 8:03 AM, Timothy Perrett wrote: > > Guys, > > If I wanted to create my own set of custom tags that looked like: > > There's been some discussion of this feature in the past. The generally outcome is that cost of prefix/label soup would become very confusing because the

[Lift] Re: weirdness with stateful snippets and multiple forms on the page

2009-08-28 Thread harryh
> Yeah... that's a bug.  I'll have a fix committed up in a few. Bug fix FTW! Thanks! -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.c

[Lift] Re: Db.addLogFunc

2009-08-28 Thread Derek Chen-Becker
Hi all, I've made a change to the Mapper logging functionality in wip-dcb-sql-log-wrappers. The DB.addLogFunc method has changed to: addLogFunc( f: (DBLog,Long) => Any) where DBLog is a new trait (below) and the Long corresponds to the *total* duration of a given DB execution method. DBLog is

[Lift] syntax question

2009-08-28 Thread DavidV
This may be more of an HTML question, but since I haven't found an answer online, I'm working in Lift and I'm sure most people here can answer this easily I figured I'd ask. I am trying to create a dynamic HTML table, by looping through the rows and columns of the table and inserting variables fr

[Lift] Re: has anyone seen this exception?

2009-08-28 Thread David Pollak
On Fri, Aug 28, 2009 at 9:21 AM, Jack Widman wrote: > I'm able to get the page with wget, no problem. My application is making > many hits to other sites. Maybe that has something to do with it. Also I am > using Jetty in embedded mode. Is there a difference in performance and > throughput with J

[Lift] Re: Creating your own tags?

2009-08-28 Thread Timothy Perrett
Hey David, Id like to echo your thoughts - I see no issue with views being tied to plugins or other such arbitrary tags... as you say, they are already tied to snippets. What are your thoughts on how arbitrary tag / prefix support could be implemented? Cheers, Tim > There's been some discussio

[Lift] Re: Modularization of Lift code

2009-08-28 Thread AlBlue
On Jul 29, 12:55 pm, Heiko Seeberger wrote: > Just a quick and dirty reply: In order to get OSGi support LiftRules should > delegate *everything* to a Collection of LiftModules.  LiftModules can be > added to and removed from this collection anytime. Yup, maintaining a collection is the easiest

[Lift] Re: syntax question

2009-08-28 Thread DavidV
Like this? def resultTable: NodeSeq = { {for (r <- 0 until analysis.slots.length) { {for (c <- 0 until test.testvars.length) { new CellType(calls(r)(c).output) }} }} } that is not working for me either, it still returns an empty ta

[Lift] Re: Modularization of Lift code

2009-08-28 Thread glenn
David, I'll take a look at the ESME code to see if what you've done scratches my itch on this issue. I've run the war file and it looks interesting. I assume the source is also available. Thanks for the heads-up. Glenn... On Aug 27, 7:55 pm, David Pollak wrote: > On Thu, Aug 27, 2009 at 2:00 P

[Lift] Re: Creating your own tags?

2009-08-28 Thread Timothy Perrett
Hey Marius Firstly I agree with your thoughts on LiftTagPF - im not sure that overriding the default lift tags would ever be a good idea for implementing users... However, I do see a use case, in, for instance the CMS arena where having a specialized tagging mechanism would be beneficial because

[Lift] Re: syntax question

2009-08-28 Thread DavidV
Sorry for the confusion. The way I initially represented the table, it did not compile. I got the following errors: in XML literal: '>' expected instead of '0' in XML literal: '>' expected instead of '0' in XML literal: expected closing tag of - in XML literal: expected closing tag of - on lin

[Lift] Re: syntax question

2009-08-28 Thread DavidV
and yes, I verified that it has the necessary information to iterate by substituting the values with a println On Aug 28, 4:15 pm, Naftoli Gugenheim wrote: > Before it was empty or not compiling? > Can you verify that it has what to iterate? > > - > > DavidV

[Lift] Re: Creating your own tags?

2009-08-28 Thread marius d.
Personally I'm not a fan of such feature. To me this doesn't bring much benefits especially that snippets pretty much allow this support such as: ...yes the wrapping tag is extra typing but still I can't find a real problem where a custom tags solves it and snippets do now. To me this look

[Lift] Re: Creating your own tags?

2009-08-28 Thread marius d.
On Aug 28, 11:20 pm, Timothy Perrett wrote: > Hey Marius > > Firstly I agree with your thoughts on LiftTagPF - im not sure that > overriding the default lift tags would ever be a good idea for > implementing users... Well I was referring to overwriting (as those would take precedence over buil

[Lift] Re: syntax question

2009-08-28 Thread Viktor Klang
{ for(i <- 0 until 10) yield { for(j <- 0 until 10) yield {j} } } My guess is that you've omitted your yields On Fri, Aug 28, 2009 at 10:34 PM, DavidV wrote: > > and yes, I verified that it has the necessary information to iterate > by substituting the values with a println > > On Aug 28

[Lift] Searching this Group

2009-08-28 Thread Ryan Donahue
"Search this group" doesn't always work. I found this by searching for the term "fade", recalling a discussion Marius posted about fading out messages. "Search this group" does not find the discussion, but you can find the discussion by changing the search criteria to "fade group:liftweb" and us

[Lift] Re: error in http authetication and openid

2009-08-28 Thread iboy
i will explore more in this area . Thanks for replies On Aug 28, 4:33 am, David Pollak wrote: > I think you'll be best off protecting your resource with basic auth to > determine who the user is but using sitemap (for HTML pages) and guards in > partial functions (for web services) to enforce U

[Lift] Re: syntax question

2009-08-28 Thread Naftoli Gugenheim
Are you positive the list is not empty? And is it empty of tr's or just td's? - DavidV wrote: Sorry for the confusion. The way I initially represented the table, it did not compile. I got the following errors: in XML literal: '>' expected instead of '0' in

[Lift] Re: Creating your own tags?

2009-08-28 Thread Timothy Perrett
Its not that I want to completely stop the normal lift tag processing, I don't, I just want to make it appear to users as if they are not using lift... That might sound crazy, but essentially I want users to only know about that tags they are told about, rather than having obvious access to all th

[Lift] Re: syntax question

2009-08-28 Thread Naftoli Gugenheim
You can nest curly braces - just surround the for loop with another pair. - DavidV wrote: This may be more of an HTML question, but since I haven't found an answer online, I'm working in Lift and I'm sure most people here can answer this easily I figured I'd

[Lift] Re: syntax question

2009-08-28 Thread DavidV
Aha! I knew it was something simple. Thanks! On Aug 28, 4:57 pm, Viktor Klang wrote: > { for(i <- 0 until 10) yield { for(j <- 0 until 10) yield > {j} }  } > > My guess is that you've omitted your yields > > > > On Fri, Aug 28, 2009 at 10:34 PM, DavidV wrote: > > > and yes, I verified tha

[Lift] Re: syntax question

2009-08-28 Thread Naftoli Gugenheim
Before it was empty or not compiling? Can you verify that it has what to iterate? - DavidV wrote: Like this? def resultTable: NodeSeq = { {for (r <- 0 until analysis.slots.length) { {for (c <- 0 until test.testvars.length) {

[Lift] Re: syntax question

2009-08-28 Thread Naftoli Gugenheim
--~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more

[Lift] Proposed improvement to CRUDify

2009-08-28 Thread jon
Hi, I think the _showAllTemplate should wrap the header and footer rows in and blocks respectively so that the table plays nice with the TableSorter widget. - Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "L

[Lift] Re: Creating your own tags?

2009-08-28 Thread Charles F. Munat
Security by obscurity, eh? Timothy Perrett wrote: > Its not that I want to completely stop the normal lift tag processing, I > don't, I just want to make it appear to users as if they are not using > lift... That might sound crazy, but essentially I want users to only know > about that tags they

[Lift] Re: how to ajaxInvoke on page load?

2009-08-28 Thread David Pollak
On Wed, Aug 26, 2009 at 2:34 PM, harryh wrote: > > Answering my own question: > > val (name, exp) = ajaxInvoke(() => { SetHtml(id, xhtml) }) > > {Script(OnLoad(exp.cmd))} > > AFAIK I can just ignore name? For now. The name is part of the Lift GC mechanism. At this time (due to a bad interacti

[Lift] Maven dependency problem with smack jar

2009-08-28 Thread ishiijp
Hi. I downloaded PocketChange Application referenced in the pdf file below. http://build.schuerrer.org/liftbook/master.pdf But maven say - Missing artifact org.igniterealtime.smack:smack:jar:3.1.0:compile - Missing artifact org.igniterealtime.smack:smackx:jar:3.1.0:compile Which repository has s

[Lift] model existing postgresql database

2009-08-28 Thread Jim Myers
We have an existing PostgreSQL database with many tables, views, indexes that we'd like to model in Lift. I created a basic model but it seems to insist on creating an index that isn't needed. Below is the error followed by the model code. Note that 'person' is a view in our database, not a tabl

[Lift] Re: syntax question

2009-08-28 Thread Ross Mellgren
I think you need the "yield" keyword, otherwise the for-loop is acting as foreach, not map: def resultTable(tab: Array[Array[Int]]): NodeSeq = { for (r <- 0 until tab.length) yield { { for (c <- 0 until tab(r).length) yield { { ta

[Lift] Maven dependency problem with smack jar

2009-08-28 Thread ishiijp
Sorry, It's just my environment problem... Please Ignore this and before post. --~--~-~--~~~---~--~~ 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 unsubscrib

[Lift] why match not exhaustive?

2009-08-28 Thread g-man
I am getting this warning during compile of my ToDo tutorial app enhancement: ToDo.scala:355: warning: match is not exhaustive! missing combination ParamFailure missing combination Failure case Nil => selectedTag match { My code is: currentTask.validate match {

[Lift] Re: why match not exhaustive?

2009-08-28 Thread Ross Mellgren
scalac is checking that you have a case for each possible pattern for the given value, which it can determine because Box and its subclasses are sealed. In this case, you explicitly handle Full and Empty, but do not consider Failure or its subclass ParamFailure, which will cause a MatchEr

[Lift] MappedStringIndex Odd Behaviour/Problems

2009-08-28 Thread Justin Reardon
Hi, I've been attempting to use MappedStringIndex in my data model which is being backed by a Derby database. I'm having two issues with it though. It does not make the column NOT NULL, so when the mapper attempts to add the index, it complains with errors like: 'TOKEN' cannot be a column of a p

[Lift] Re: Creating your own tags?

2009-08-28 Thread marius d.
Tim, obscuring things may get you a really long way indeed. But once the obscurity get broken and people figure out that they can do other things by using strange undocumented tags (i.e lift tags) they could cause lots of problems and side effects. Personally I'd stay away from it. And if I'd nee

[Lift] Re: Creating your own tags?

2009-08-28 Thread Viktor Klang
Tim, if you really want to go that riute create an xslt to transform your custom tags to luft tags? On Aug 29, 2009 8:01 AM, "marius d." wrote: Tim, obscuring things may get you a really long way indeed. But once the obscurity get broken and people figure out that they can do other things by us