[Lift] File uploads
I am doing file uploads to several of my sites. Right now, I've hard coded the path to the directory to which the files are saved. This is a pain because it's not the same directory on the production server as it is on the dev server. How can I grab the current path so I can work with that? Or is there a better way? For example, if I had an /images/ directory in my web root, how would I save uploaded images to that directory? Thanks, Chas. --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: ORM Framework
Thank you! Jorge, do you have any example or tutorial of how to do this? []s Paulo On Sun, Feb 22, 2009 at 10:11 PM, Jorge Ortiz wrote: > I've used Mapper on desktop apps that don't do http. You lose a lot of the > features but it's still usable and sometimes even convenient. > > YMMV, > > --j > > On Sun, Feb 22, 2009 at 4:23 PM, David Pollak > wrote: >> >> >> On Sun, Feb 22, 2009 at 3:45 PM, Paulo Cheque >> wrote: >>> >>> Thanks by the fast answer David, and congratulations by the good work! >>> >>> I think this relationship is very strange (domain + http), is there >>> any idea to change this in the future? >> >> Lift's Mapper stuff relies of classes in the HTTP framework for access >> control, form generation, etc. It would significantly detract from the >> Mapper classes to remove this kind of functionality. Plus, Lift's OR Mapper >> stuff is nice for simple projects (like ActiveRecord), it's not meant to >> replace the functionality of a JPA solution (caching, etc.) >> So, no, there's no plan to remove the dependency between mapper and >> webkit. >> >>> >>> Thanks in advance again >>> []s >>> Paulo >>> >>> >>> >>> On Sun, Feb 22, 2009 at 8:24 PM, David Pollak >>> wrote: >>> > Paulo, >>> > Lift's Mapper depends on the HTTP framework. I would suggest using JPA >>> > as a >>> > stand-alone alternative. >>> > Thanks, >>> > David >>> > >>> > On Sun, Feb 22, 2009 at 11:04 AM, Paulo Cheque >>> > wrote: >>> >> >>> >> Like GORM in Grails, it is possible to use the ORM framework of Lift >>> >> separately?? There is any tutorial or documentation avaiable? >>> >> >>> >> Thanks in advance >>> >> >>> >> []s >>> >> Paulo >>> >> >>> >> >>> > >>> > >>> > >>> > -- >>> > Lift, the simply functional web framework http://liftweb.net >>> > Beginning Scala http://www.apress.com/book/view/1430219890 >>> > Follow me: http://twitter.com/dpp >>> > Git some: http://github.com/dpp >>> > >>> > > >>> > >>> >>> >> >> >> >> -- >> Lift, the simply functional web framework http://liftweb.net >> Beginning Scala http://www.apress.com/book/view/1430219890 >> Follow me: http://twitter.com/dpp >> Git some: http://github.com/dpp >> >> > > > > > --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: ORM Framework
I've used Mapper on desktop apps that don't do http. You lose a lot of the features but it's still usable and sometimes even convenient. YMMV, --j On Sun, Feb 22, 2009 at 4:23 PM, David Pollak wrote: > > > On Sun, Feb 22, 2009 at 3:45 PM, Paulo Cheque wrote: > >> >> Thanks by the fast answer David, and congratulations by the good work! >> >> I think this relationship is very strange (domain + http), is there >> any idea to change this in the future? > > > Lift's Mapper stuff relies of classes in the HTTP framework for access > control, form generation, etc. It would significantly detract from the > Mapper classes to remove this kind of functionality. Plus, Lift's OR Mapper > stuff is nice for simple projects (like ActiveRecord), it's not meant to > replace the functionality of a JPA solution (caching, etc.) > > So, no, there's no plan to remove the dependency between mapper and webkit. > > >> >> >> Thanks in advance again >> []s >> Paulo >> >> >> >> On Sun, Feb 22, 2009 at 8:24 PM, David Pollak >> wrote: >> > Paulo, >> > Lift's Mapper depends on the HTTP framework. I would suggest using JPA >> as a >> > stand-alone alternative. >> > Thanks, >> > David >> > >> > On Sun, Feb 22, 2009 at 11:04 AM, Paulo Cheque >> > wrote: >> >> >> >> Like GORM in Grails, it is possible to use the ORM framework of Lift >> >> separately?? There is any tutorial or documentation avaiable? >> >> >> >> Thanks in advance >> >> >> >> []s >> >> Paulo >> >> >> >> >> > >> > >> > >> > -- >> > Lift, the simply functional web framework http://liftweb.net >> > Beginning Scala http://www.apress.com/book/view/1430219890 >> > Follow me: http://twitter.com/dpp >> > Git some: http://github.com/dpp >> > >> > > >> > >> >> >> > > > -- > Lift, the simply functional web framework http://liftweb.net > Beginning Scala http://www.apress.com/book/view/1430219890 > Follow me: http://twitter.com/dpp > Git some: http://github.com/dpp > > > > --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: UPDATED jQuery to 1.3.2 (eom)
Tnx On Sun, Feb 22, 2009 at 4:19 PM, Jorge Ortiz wrote: > --j > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: ORM Framework
On Sun, Feb 22, 2009 at 3:45 PM, Paulo Cheque wrote: > > Thanks by the fast answer David, and congratulations by the good work! > > I think this relationship is very strange (domain + http), is there > any idea to change this in the future? Lift's Mapper stuff relies of classes in the HTTP framework for access control, form generation, etc. It would significantly detract from the Mapper classes to remove this kind of functionality. Plus, Lift's OR Mapper stuff is nice for simple projects (like ActiveRecord), it's not meant to replace the functionality of a JPA solution (caching, etc.) So, no, there's no plan to remove the dependency between mapper and webkit. > > > Thanks in advance again > []s > Paulo > > > > On Sun, Feb 22, 2009 at 8:24 PM, David Pollak > wrote: > > Paulo, > > Lift's Mapper depends on the HTTP framework. I would suggest using JPA > as a > > stand-alone alternative. > > Thanks, > > David > > > > On Sun, Feb 22, 2009 at 11:04 AM, Paulo Cheque > > wrote: > >> > >> Like GORM in Grails, it is possible to use the ORM framework of Lift > >> separately?? There is any tutorial or documentation avaiable? > >> > >> Thanks in advance > >> > >> []s > >> Paulo > >> > >> > > > > > > > > -- > > Lift, the simply functional web framework http://liftweb.net > > Beginning Scala http://www.apress.com/book/view/1430219890 > > Follow me: http://twitter.com/dpp > > Git some: http://github.com/dpp > > > > > > > > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] UPDATED jQuery to 1.3.2 (eom)
--j --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: ORM Framework
Thanks by the fast answer David, and congratulations by the good work! I think this relationship is very strange (domain + http), is there any idea to change this in the future? Thanks in advance again []s Paulo On Sun, Feb 22, 2009 at 8:24 PM, David Pollak wrote: > Paulo, > Lift's Mapper depends on the HTTP framework. I would suggest using JPA as a > stand-alone alternative. > Thanks, > David > > On Sun, Feb 22, 2009 at 11:04 AM, Paulo Cheque > wrote: >> >> Like GORM in Grails, it is possible to use the ORM framework of Lift >> separately?? There is any tutorial or documentation avaiable? >> >> Thanks in advance >> >> []s >> Paulo >> >> > > > > -- > Lift, the simply functional web framework http://liftweb.net > Beginning Scala http://www.apress.com/book/view/1430219890 > Follow me: http://twitter.com/dpp > Git some: http://github.com/dpp > > > > --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: ORM Framework
Paulo, Lift's Mapper depends on the HTTP framework. I would suggest using JPA as a stand-alone alternative. Thanks, David On Sun, Feb 22, 2009 at 11:04 AM, Paulo Cheque wrote: > > Like GORM in Grails, it is possible to use the ORM framework of Lift > separately?? There is any tutorial or documentation avaiable? > > Thanks in advance > > []s > Paulo > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] ORM Framework
Like GORM in Grails, it is possible to use the ORM framework of Lift separately?? There is any tutorial or documentation avaiable? Thanks in advance []s Paulo --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Error while going through the starting guide: prefix not bound to namespace
On Sun, Feb 22, 2009 at 1:20 AM, babysnakes wrote: > > Phew, that was hard It certainly was a tricky problem. In 1.1, I'll put a warning on the console if a situation like this is encountered. Thanks! David > > > I've found the problem. In the TD.scala class I had: > def add(form: NodeSeq) { > ... > > But I should have had: > def add(form: NodeSeq) = { > ... > > I'm still a complete scala newbie so I don't even sure what's the > difference > but I've just started reading the scala book, so I guess I'll catch it > soon enough. > > Thanks. > > On Feb 22, 1:21 am, babysnakes wrote: > > Hi > > > > I'm trying to run the starting guide with version 0.10. When I got to > > the ToDo section (2.11), I got the error above. The page renders all > > the tags instead of replacing them with the 'toForm' > > method. > > > > Here is my relevant files: > > > > TD.scala > > === > > package lift.workshop.snippet > > > > import lift.workshop._ > > import model._ > > > > import net.liftweb._ > > import http._ > > import SHtml._ > > import S._ > > > > import js._ > > import JsCmds._ > > > > import mapper._ > > import util._ > > import Helpers._ > > > > import scala.xml.{NodeSeq, Text} > > > > class TD { > > def add(form: NodeSeq) { > > val todo = ToDo.create.owner(User.currentUser) > > > > def checkAndSave(): Unit = > > todo.validate match { > > case Nil => todo.save; S.notice("Added " + todo.desc) > > case xs => S.error(xs); S.mapSnippet("TD.add", doBind) > > } > > > > def doBind(form: NodeSeq) = > > bind("todo", form, > > "priority" -> todo.priority.toForm, > > "desc" -> todo.desc.toForm, > > "submit" -> submit("New", checkAndSave)) > > > > doBind(form) > > } > > > > } > > > > index.html > > > > > > Please > > Log In > > > > > > > > > > > > Description: > > To Do > > > > > > Priority: > > > > 1 > > > > > > > > > > > > > > New > > > > > > > > > > > > > > > > > > = = = = = = = = = = = = = = = > > > > Am I missing something? > > > > Thanks in advance > > -- > > Haim > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Error while going through the starting guide: prefix not bound to namespace
On Feb 22, 6:25 pm, David Bernard wrote: > On Sun, Feb 22, 2009 at 10:20, babysnakes wrote: > > > Phew, that was hard > > > I've found the problem. In the TD.scala class I had: > > def add(form: NodeSeq) { > > ... > > return type is Unit ( == void in java/C) > the explicit version : > def add(form: NodeSeq) : Unit = { > > => nothing to display Thanks. That's explain it. Bye > > > But I should have had: > > def add(form: NodeSeq) = { > > ... > > return type is infered from your last expression > > the explicit version (in case you return a NodeSeq (html fragment) : > def add(form: NodeSeq) : NodeSeq = { > > => a xml fragment to display > > > > > I'm still a complete scala newbie so I don't even sure what's the > > difference > > but I've just started reading the scala book, so I guess I'll catch it > > soon enough. > > > Thanks. > > > On Feb 22, 1:21 am, babysnakes wrote: > > > Hi > > > > I'm trying to run the starting guide with version 0.10. When I got to > > > the ToDo section (2.11), I got the error above. The page renders all > > > the tags instead of replacing them with the 'toForm' > > > method. > > > > Here is my relevant files: > > > > TD.scala > > > === > > > package lift.workshop.snippet > > > > import lift.workshop._ > > > import model._ > > > > import net.liftweb._ > > > import http._ > > > import SHtml._ > > > import S._ > > > > import js._ > > > import JsCmds._ > > > > import mapper._ > > > import util._ > > > import Helpers._ > > > > import scala.xml.{NodeSeq, Text} > > > > class TD { > > > def add(form: NodeSeq) { > > > val todo = ToDo.create.owner(User.currentUser) > > > > def checkAndSave(): Unit = > > > todo.validate match { > > > case Nil => todo.save; S.notice("Added " + todo.desc) > > > case xs => S.error(xs); S.mapSnippet("TD.add", doBind) > > > } > > > > def doBind(form: NodeSeq) = > > > bind("todo", form, > > > "priority" -> todo.priority.toForm, > > > "desc" -> todo.desc.toForm, > > > "submit" -> submit("New", checkAndSave)) > > > > doBind(form) > > > } > > > > } > > > > index.html > > > > > > > > > Please > > > Log In > > > > > > > > > > > > > > > > > > Description: > > > To Do > > > > > > > > > Priority: > > > > > > 1 > > > > > > > > > > > > > > > > > > > > > New > > > > > > > > > > > > > > > > > > > > > > > > > = = = = = = = = = = = = = = = > > > > Am I missing something? > > > > Thanks in advance > > > -- > > > Haim --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Error while going through the starting guide: prefix not bound to namespace
On Sun, Feb 22, 2009 at 10:20, babysnakes wrote: > > Phew, that was hard > > I've found the problem. In the TD.scala class I had: > def add(form: NodeSeq) { > ... > return type is Unit ( == void in java/C) the explicit version : def add(form: NodeSeq) : Unit = { => nothing to display > But I should have had: > def add(form: NodeSeq) = { > ... return type is infered from your last expression the explicit version (in case you return a NodeSeq (html fragment) : def add(form: NodeSeq) : NodeSeq = { => a xml fragment to display > > I'm still a complete scala newbie so I don't even sure what's the > difference > but I've just started reading the scala book, so I guess I'll catch it > soon enough. > > Thanks. > > On Feb 22, 1:21 am, babysnakes wrote: > > Hi > > > > I'm trying to run the starting guide with version 0.10. When I got to > > the ToDo section (2.11), I got the error above. The page renders all > > the tags instead of replacing them with the 'toForm' > > method. > > > > Here is my relevant files: > > > > TD.scala > > === > > package lift.workshop.snippet > > > > import lift.workshop._ > > import model._ > > > > import net.liftweb._ > > import http._ > > import SHtml._ > > import S._ > > > > import js._ > > import JsCmds._ > > > > import mapper._ > > import util._ > > import Helpers._ > > > > import scala.xml.{NodeSeq, Text} > > > > class TD { > > def add(form: NodeSeq) { > > val todo = ToDo.create.owner(User.currentUser) > > > > def checkAndSave(): Unit = > > todo.validate match { > > case Nil => todo.save; S.notice("Added " + todo.desc) > > case xs => S.error(xs); S.mapSnippet("TD.add", doBind) > > } > > > > def doBind(form: NodeSeq) = > > bind("todo", form, > > "priority" -> todo.priority.toForm, > > "desc" -> todo.desc.toForm, > > "submit" -> submit("New", checkAndSave)) > > > > doBind(form) > > } > > > > } > > > > index.html > > > > > > Please > > Log In > > > > > > > > > > > > Description: > > To Do > > > > > > Priority: > > > > 1 > > > > > > > > > > > > > > New > > > > > > > > > > > > > > > > > > = = = = = = = = = = = = = = = > > > > Am I missing something? > > > > Thanks in advance > > -- > > Haim > > > > --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Error while going through the starting guide: prefix not bound to namespace
Phew, that was hard I've found the problem. In the TD.scala class I had: def add(form: NodeSeq) { ... But I should have had: def add(form: NodeSeq) = { ... I'm still a complete scala newbie so I don't even sure what's the difference but I've just started reading the scala book, so I guess I'll catch it soon enough. Thanks. On Feb 22, 1:21 am, babysnakes wrote: > Hi > > I'm trying to run the starting guide with version 0.10. When I got to > the ToDo section (2.11), I got the error above. The page renders all > the tags instead of replacing them with the 'toForm' > method. > > Here is my relevant files: > > TD.scala > === > package lift.workshop.snippet > > import lift.workshop._ > import model._ > > import net.liftweb._ > import http._ > import SHtml._ > import S._ > > import js._ > import JsCmds._ > > import mapper._ > import util._ > import Helpers._ > > import scala.xml.{NodeSeq, Text} > > class TD { > def add(form: NodeSeq) { > val todo = ToDo.create.owner(User.currentUser) > > def checkAndSave(): Unit = > todo.validate match { > case Nil => todo.save; S.notice("Added " + todo.desc) > case xs => S.error(xs); S.mapSnippet("TD.add", doBind) > } > > def doBind(form: NodeSeq) = > bind("todo", form, > "priority" -> todo.priority.toForm, > "desc" -> todo.desc.toForm, > "submit" -> submit("New", checkAndSave)) > > doBind(form) > } > > } > > index.html > > > Please > Log In > > > > > > Description: > To Do > > > Priority: > > 1 > > > > > > > New > > > > > > > > > = = = = = = = = = = = = = = = > > Am I missing something? > > Thanks in advance > -- > Haim --~--~-~--~~~---~--~~ 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 options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---