[Lift] Re: REST: Why is this returning an empty page?
Thank you! On Jun 28, 3:22 am, Timothy Perrett wrote: > Perhaps something like: > > def deleteUser(inUsername: String): LiftResponse = User.find(By > (User.username, inUsername)) match { > case Full(user) => { > try { > user.delete_! > OkResponse() > } catch { > case e => InternalServerErrorResponse() > } > } > case _ => NotFoundResponse() > } > > Does that help? > > Cheers, Tim > > On Jun 27, 8:34 pm, fbettag wrote: > > > > > Thank you! Most of the Stuff now seems to work! :) > > > The last two things regarding this topic, then i guess i'm done: > > > - In my code i had the error messages upon creation/update, also it > > was possible to use GET/POST to set variables. > > I am not sure if jQuery can send XML (i know it can receive), > > therefore i am not sure if your XML way is the "right" way for me. > > > - I am still having a little trouble with my delete method, but i > > guess its a result of my lacking scala skill ;) Anyhow a quick > > solution would be nice: > > > def deleteLayout(inLayoutid: String): LiftResponse = > > Layout.find(By(Layout.id, inLayoutid.toLong)).delete_! match { > > case Full(success) => XmlResponse( > success={success.toString}/>) > > > case Failure(msg, _, _) => NotAcceptableResponse(msg) > > case _ => NotFoundResponse() > > } > > > the Full(success) is looking for a Bool, but is finding a Full[A]. I > > also tried to enclose my Layout.find..delete into () (which is most > > languages gives back a bool). > > > Any ideas for those two? > > > On Jun 27, 8:14 pm, Timothy Perrett wrote: > > > > Doh! Sorry about that - im using a bunch of implicit conversions that > > > I wrote for my specific application (as I had beef with not being able > > > to configure the root node of the response xml generically - im still > > > looking for a good solution to this but here's what I have) > > > > Stick this in the same file:http://gist.github.com/137066 > > > > Hope that helps > > > > Cheers, Tim > > > > On Jun 27, 6:51 pm, fbettag wrote: > > > > > This looks alot cleaner than my try. Anyhow, using the update/create > > > > in one method is only useful if you give your db-objects something > > > > like a unique key identifier in form of a string. > > > > Since mine only consist of an id, name (with spaces and trash-chars), > > > > content and a mappedlocale, i am not sure if it is so good to simply > > > > create an entry for id 50234 just because somebody tries to "update" > > > > it ;) > > > > I hope you get my draft. > > > > > Also this irritates me: > > > > // user methods > > > > def listUsers(): LiftResponse = { > > > > val users = User.findAll.flatMap(_.toXml) > > > > // XmlResponse(wrapXmlBody("users",users.open_!)) > > > > ("users",users) > > > > } > > > > > NetBeans shows me an Error that ("users",users) is a type mismatch. > > > > found: (java.lang.String, List[scala.xml.Node]) > > > > required: net.liftweb.http.LiftResponse (obvious) > > > > > I tried something like this, but understanding Box[] and making the > > > > best of it still gives me headaches: > > > > val obj: Content = if (inContentid == "new") new Content; > > > > else Content.find(By(Content.id, inContentid.toLong)); > > > > > Also NetBeans always complains that wrapXmlBody was not found. I > > > > googled for it but i really couldn't find anything to it which would > > > > have turned up the import path i'd have to use. > > > > > best regards > > > > > On Jun 27, 11:33 am, Timothy Perrett wrote: > > > > > > I read your post with interest - having built quite a large ROA with > > > > > Lift. Here's what I have with a simple bit of REST user management: > > > > > > def dispatch: LiftRules.DispatchPF = { > > > > > // user methods > > > > > case Req("api" :: "users" :: Nil, "", GetRequest) => () => > > > > > listUsers() > > > > > case Req("api" :: "user" :: user :: Nil, "", GetRequest) => () => > > > > > showUser(user) > > > > > case r @ Req("api" :: "user" :: user :: Nil, "", PutRequest) => () > > > > > => addOrUpdateUser(user, r) > > > > > case Req("api" :: "user" :: user :: Nil, "", DeleteRequest) => () > > > > > => deleteUser(user) > > > > > > > > > > } > > > > > > // user methods > > > > > def listUsers(): LiftResponse = { > > > > > val users = User.findAll.flatMap(_.toXml) > > > > > // XmlResponse(wrapXmlBody("users",users.open_!)) > > > > > ("users",users) > > > > > } > > > > > > def showUser(inUsername: String): LiftResponse = { > > > > > val user: Box[NodeSeq] = for(user <- User.find(By(User.username, > > > > > inUsername))) yield user.toXml > > > > > ("users",user) > > > > > } > > > > > > def addOrUpdateUser(inUsername: String, req: Req): LiftResponse = { > > > > > var user = User.find(By(User.username, inUsername)) openOr new > > > > > User > > > > > user.user
[Lift] Re: REST: Why is this returning an empty page?
Perhaps something like: def deleteUser(inUsername: String): LiftResponse = User.find(By (User.username, inUsername)) match { case Full(user) => { try { user.delete_! OkResponse() } catch { case e => InternalServerErrorResponse() } } case _ => NotFoundResponse() } Does that help? Cheers, Tim On Jun 27, 8:34 pm, fbettag wrote: > Thank you! Most of the Stuff now seems to work! :) > > The last two things regarding this topic, then i guess i'm done: > > - In my code i had the error messages upon creation/update, also it > was possible to use GET/POST to set variables. > I am not sure if jQuery can send XML (i know it can receive), > therefore i am not sure if your XML way is the "right" way for me. > > - I am still having a little trouble with my delete method, but i > guess its a result of my lacking scala skill ;) Anyhow a quick > solution would be nice: > > def deleteLayout(inLayoutid: String): LiftResponse = > Layout.find(By(Layout.id, inLayoutid.toLong)).delete_! match { > case Full(success) => XmlResponse( success={success.toString}/>) > > case Failure(msg, _, _) => NotAcceptableResponse(msg) > case _ => NotFoundResponse() > } > > the Full(success) is looking for a Bool, but is finding a Full[A]. I > also tried to enclose my Layout.find..delete into () (which is most > languages gives back a bool). > > Any ideas for those two? > > On Jun 27, 8:14 pm, Timothy Perrett wrote: > > > > > Doh! Sorry about that - im using a bunch of implicit conversions that > > I wrote for my specific application (as I had beef with not being able > > to configure the root node of the response xml generically - im still > > looking for a good solution to this but here's what I have) > > > Stick this in the same file:http://gist.github.com/137066 > > > Hope that helps > > > Cheers, Tim > > > On Jun 27, 6:51 pm, fbettag wrote: > > > > This looks alot cleaner than my try. Anyhow, using the update/create > > > in one method is only useful if you give your db-objects something > > > like a unique key identifier in form of a string. > > > Since mine only consist of an id, name (with spaces and trash-chars), > > > content and a mappedlocale, i am not sure if it is so good to simply > > > create an entry for id 50234 just because somebody tries to "update" > > > it ;) > > > I hope you get my draft. > > > > Also this irritates me: > > > // user methods > > > def listUsers(): LiftResponse = { > > > val users = User.findAll.flatMap(_.toXml) > > > // XmlResponse(wrapXmlBody("users",users.open_!)) > > > ("users",users) > > > } > > > > NetBeans shows me an Error that ("users",users) is a type mismatch. > > > found: (java.lang.String, List[scala.xml.Node]) > > > required: net.liftweb.http.LiftResponse (obvious) > > > > I tried something like this, but understanding Box[] and making the > > > best of it still gives me headaches: > > > val obj: Content = if (inContentid == "new") new Content; > > > else Content.find(By(Content.id, inContentid.toLong)); > > > > Also NetBeans always complains that wrapXmlBody was not found. I > > > googled for it but i really couldn't find anything to it which would > > > have turned up the import path i'd have to use. > > > > best regards > > > > On Jun 27, 11:33 am, Timothy Perrett wrote: > > > > > I read your post with interest - having built quite a large ROA with > > > > Lift. Here's what I have with a simple bit of REST user management: > > > > > def dispatch: LiftRules.DispatchPF = { > > > > // user methods > > > > case Req("api" :: "users" :: Nil, "", GetRequest) => () => > > > > listUsers() > > > > case Req("api" :: "user" :: user :: Nil, "", GetRequest) => () => > > > > showUser(user) > > > > case r @ Req("api" :: "user" :: user :: Nil, "", PutRequest) => () > > > > => addOrUpdateUser(user, r) > > > > case Req("api" :: "user" :: user :: Nil, "", DeleteRequest) => () > > > > => deleteUser(user) > > > > > > > > } > > > > > // user methods > > > > def listUsers(): LiftResponse = { > > > > val users = User.findAll.flatMap(_.toXml) > > > > // XmlResponse(wrapXmlBody("users",users.open_!)) > > > > ("users",users) > > > > } > > > > > def showUser(inUsername: String): LiftResponse = { > > > > val user: Box[NodeSeq] = for(user <- User.find(By(User.username, > > > > inUsername))) yield user.toXml > > > > ("users",user) > > > > } > > > > > def addOrUpdateUser(inUsername: String, req: Req): LiftResponse = { > > > > var user = User.find(By(User.username, inUsername)) openOr new > > > > User > > > > user.username(inUsername) > > > > req.xml match { > > > > case Full({paramaters @ _*}) => { > > > > for(paramater <- paramaters){ > > > > paramater match { > > > > case {firstname} => user.firstName > > > > (firstname) > > > >
[Lift] Re: Turning on Logging for third-party libraries in Lift
I tried the log4j.xml in classes but it didn't work, until... :) I renamed it to default.log4j.xml and fixed a conflict with log4j and commons-logging libraries. It turns out in Tomcat that you have to be very careful about how you load those libraries, especially when using something like maven. Basically as per an interesting article on the log4j web site (that I don't have the URL for on this computer) you should put a copy of the log4j and commons-logging jars in the common/ lib directory of tomcat and not in any particular web-app or else it gets confused. It was also a bit of an endorsement for SFL4j though I didn't really look into to that so close yet. Anyway, once I did that (manually for now, have to fix the pom to not include those two from dependencies.. ugh..) everything worked as expected. Woohoo!! Alan On Jun 27, 3:17 am, "marius d." wrote: > I think that simply putting log4j.xml in WEB-INF/classes folder does > the trick. > > Br's, > Marius > > On Jun 27, 3:06 am, Alan M wrote: > > > I'm trying to enable log4j logging in a third party library (well > > third party to me.. it was developed in house) so that it logs it's > > output to the same place my Lift webapp logs. > > > In the third party library, a log4j Logger is obtained and used but no > > setup is done, figuring the log4j config will be done by the app > > builder. > > > Now I figured the root logger would catch it.. but it didn't seem to > > work. So I added a specific logger with the exact string used in the > > third party code.. Still no output.. > > > Am I missing something about class loaders? Or is there something > > about start-up that's messing with the getLogger method (it's actually > > in the method so it should be happening after Lift initializes > > everything)? Or is there something else special about lift logging > > that won't let the library piggy back off of it? > > > BTW, I should mention that Lift logging otherwise is working for me. > > By otherwise I mean when logging from any classes directly in the web- > > app classes directory. > > > Alan --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
> Make sure you're trying to plot the same data with the same plot options. Well, that's an easy one, since the bug appears in all graphs with legends, everywhere. > I'm basically in the same boat and will probably clone the > lift-widgets module on github and work from there (I'm not a Lift > committer). I hope Francois will then commit the changes to Lift at > some point :-) I think we should coordinate the effort to avoid > wasting resources. Let me know what you think > > /Jeppe The beauty of GitHub is that you can just fork the repository, and send a fork merge request when you're done. No one who has commit access needs to review your code, but instead simply accept your request. I think that that's what I'll do. Oh, and I have the solution to the problem (and it's something really, really stupid): The default Bluetype CSS theme, in the screen.css file, has a "width: 100%;" attribute in a raw "table" selector. This is what causes the problem. If I only had had FireBug earlier... To fix the bug, we need to create a stylesheet for Flot that resets some options. If someone with repository access will pull my fork afterwards, I'll make one (and clean up a little of the Flot code while I'm at it). Otherwise, I would be happy if someone simply would fix this issue; it just requires adding this to a CSS file of choice (where the-graph-id is inserted dynamically): #the-graph-id .legend table { width: auto !important; } Still, the bug remains with the legend issues; it's not possible to have an external legend for some reason. --~--~-~--~~~---~--~~ 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: REST: Why is this returning an empty page?
Thank you! Most of the Stuff now seems to work! :) The last two things regarding this topic, then i guess i'm done: - In my code i had the error messages upon creation/update, also it was possible to use GET/POST to set variables. I am not sure if jQuery can send XML (i know it can receive), therefore i am not sure if your XML way is the "right" way for me. - I am still having a little trouble with my delete method, but i guess its a result of my lacking scala skill ;) Anyhow a quick solution would be nice: def deleteLayout(inLayoutid: String): LiftResponse = Layout.find(By(Layout.id, inLayoutid.toLong)).delete_! match { case Full(success) => XmlResponse() case Failure(msg, _, _) => NotAcceptableResponse(msg) case _ => NotFoundResponse() } the Full(success) is looking for a Bool, but is finding a Full[A]. I also tried to enclose my Layout.find..delete into () (which is most languages gives back a bool). Any ideas for those two? On Jun 27, 8:14 pm, Timothy Perrett wrote: > Doh! Sorry about that - im using a bunch of implicit conversions that > I wrote for my specific application (as I had beef with not being able > to configure the root node of the response xml generically - im still > looking for a good solution to this but here's what I have) > > Stick this in the same file:http://gist.github.com/137066 > > Hope that helps > > Cheers, Tim > > On Jun 27, 6:51 pm, fbettag wrote: > > > > > This looks alot cleaner than my try. Anyhow, using the update/create > > in one method is only useful if you give your db-objects something > > like a unique key identifier in form of a string. > > Since mine only consist of an id, name (with spaces and trash-chars), > > content and a mappedlocale, i am not sure if it is so good to simply > > create an entry for id 50234 just because somebody tries to "update" > > it ;) > > I hope you get my draft. > > > Also this irritates me: > > // user methods > > def listUsers(): LiftResponse = { > > val users = User.findAll.flatMap(_.toXml) > > // XmlResponse(wrapXmlBody("users",users.open_!)) > > ("users",users) > > } > > > NetBeans shows me an Error that ("users",users) is a type mismatch. > > found: (java.lang.String, List[scala.xml.Node]) > > required: net.liftweb.http.LiftResponse (obvious) > > > I tried something like this, but understanding Box[] and making the > > best of it still gives me headaches: > > val obj: Content = if (inContentid == "new") new Content; > > else Content.find(By(Content.id, inContentid.toLong)); > > > Also NetBeans always complains that wrapXmlBody was not found. I > > googled for it but i really couldn't find anything to it which would > > have turned up the import path i'd have to use. > > > best regards > > > On Jun 27, 11:33 am, Timothy Perrett wrote: > > > > I read your post with interest - having built quite a large ROA with > > > Lift. Here's what I have with a simple bit of REST user management: > > > > def dispatch: LiftRules.DispatchPF = { > > > // user methods > > > case Req("api" :: "users" :: Nil, "", GetRequest) => () => > > > listUsers() > > > case Req("api" :: "user" :: user :: Nil, "", GetRequest) => () => > > > showUser(user) > > > case r @ Req("api" :: "user" :: user :: Nil, "", PutRequest) => () > > > => addOrUpdateUser(user, r) > > > case Req("api" :: "user" :: user :: Nil, "", DeleteRequest) => () > > > => deleteUser(user) > > > > > > } > > > > // user methods > > > def listUsers(): LiftResponse = { > > > val users = User.findAll.flatMap(_.toXml) > > > // XmlResponse(wrapXmlBody("users",users.open_!)) > > > ("users",users) > > > } > > > > def showUser(inUsername: String): LiftResponse = { > > > val user: Box[NodeSeq] = for(user <- User.find(By(User.username, > > > inUsername))) yield user.toXml > > > ("users",user) > > > } > > > > def addOrUpdateUser(inUsername: String, req: Req): LiftResponse = { > > > var user = User.find(By(User.username, inUsername)) openOr new > > > User > > > user.username(inUsername) > > > req.xml match { > > > case Full({paramaters @ _*}) => { > > > for(paramater <- paramaters){ > > > paramater match { > > > case {firstname} => user.firstName > > > (firstname) > > > case {lastname} => user.lastName > > > (lastname) > > > case {email} => user.email(email) > > > case {superuser} => user.superUser > > > (superuser.text.toBoolean) > > > case {active} => user.active > > > (active.text.toBoolean) > > > case {password} => user.password > > > (password.text) > > > case _ => > > > } > > > } > > > try { > > > user.save > > > CreatedResponse(wrapXmlBody("user",user.toXml), "text/xml") > > > } catch { > > > case e => Log.error("Could not save user"
[Lift] Re: scala-tools.org down
Thanks Derek. On Jun 27, 6:54 pm, Derek Chen-Becker wrote: > Hi all, > DPP gave me access to the primary Xen server that everything else runs > on, but I'm unable to reach it. This may either be a network failure or a > total hardware failure, but it's unclear at this point. I'm going to call > CalPop, the hosting provider, and see if they can look at the box. > > Derek --~--~-~--~~~---~--~~ 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: scala-tools.org down
Thanks Derek. On Jun 27, 6:54 pm, Derek Chen-Becker wrote: > Hi all, > DPP gave me access to the primary Xen server that everything else runs > on, but I'm unable to reach it. This may either be a network failure or a > total hardware failure, but it's unclear at this point. I'm going to call > CalPop, the hosting provider, and see if they can look at the box. > > Derek --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
Hi, * To generate the api : all the jar should be installed (mvn install scala:doc). that is very long because generating api redo compilation (vscaladoc and scaldoc use the scalac api) * To generate the api in a single doc, I used experimental feature of maven-scala-plugin (2.11-SNAPSHOT) and vscaladoc (1.2-SNASHOT). But the test case I used to check this feature failed with latest SNAPSHOT of both tool (a failure when scala.XML try to load DTD of HTML). I'll release maven-scala-plugin soon (few days) and vscaladoc when the agregate feature will be fixed + some other fix. I hope both will be available before 2009-07-15. /davidB On Sat, Jun 27, 2009 at 20:16, Timothy Perrett wrote: > > That im not sure - its a vscaladoc thing (which DavidB wrote)... > perhaps he'll chime in shortly with a solution. From what I remember > it requires some additional configuration to do this which we don't > use by default in the lift code base proper (the online api doc is > pushed out by our hudson install) > > Cheers, Tim > > On Jun 27, 5:29 pm, george wrote: > > ok, well i upgraded maven to 2.1.0 and the build succeeded. > > > > but how can I generate the docs so they are combined into one set like > > onhttp://scala-tools.org/scaladocs/liftweb/1.0, instead of broken up > > by package ? > > > > --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
That im not sure - its a vscaladoc thing (which DavidB wrote)... perhaps he'll chime in shortly with a solution. From what I remember it requires some additional configuration to do this which we don't use by default in the lift code base proper (the online api doc is pushed out by our hudson install) Cheers, Tim On Jun 27, 5:29 pm, george wrote: > ok, well i upgraded maven to 2.1.0 and the build succeeded. > > but how can I generate the docs so they are combined into one set like > onhttp://scala-tools.org/scaladocs/liftweb/1.0, instead of broken up > by package ? --~--~-~--~~~---~--~~ 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] scala-tools.org down
Hi all, DPP gave me access to the primary Xen server that everything else runs on, but I'm unable to reach it. This may either be a network failure or a total hardware failure, but it's unclear at this point. I'm going to call CalPop, the hosting provider, and see if they can look at the box. Derek --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
ok, well i upgraded maven to 2.1.0 and the build succeeded. but how can I generate the docs so they are combined into one set like on http://scala-tools.org/scaladocs/liftweb/1.0, instead of broken up by package ? On Jun 27, 2:31 pm, Timothy Perrett wrote: > But of course! Clone the lift source repo onto your local machine then do > the following: > > cd > mvn scala:doc > > Cheers, Tim > > On 27/06/2009 14:07, "george" wrote: > > > > > > > Is there any way to locally generate the Lift API scaladocs without > > needing scala-tools.org? > > > George > > > On Jun 27, 1:16 pm, Josh Suereth wrote: > >> Hi, I forwarded the email to ad...@scala-tools.org, but I have not received > >> it back (meaning is has not been sent). I also tried ssh'ing onto the > >> box, > >> and was unsuccessful. That's being my powers of admin for > >> scala-tools.orguntil we can get it active again. > > >> David Pollak and Derek Chen-Becker are the other admins (for future > >> reference). > > >> - Josh > > >> On Sat, Jun 27, 2009 at 5:28 AM, marius d. wrote: > > >>> dunno who can help .. I sent an email on scala-list but nothing yet > > >>> On Jun 27, 12:17 pm, Timothy Perrett wrote: > @marius Is there anyone around to checkup on scala-tools? DavidB > doesn't monitor the lift list much these days and I'm not sure if > there are any other non-American guys (I.e people who are awake now!) > to take a look at the server? > > Cheers, Tim > > Sent from my iPhone > > On 27 Jun 2009, at 10:06, "marius d." wrote: > > > try maven -o > > > Marius > > > On Jun 27, 11:46 am, Ellis wrote: > >> Maven is suddenly refusing to compile because scala-tools.org is > >> down. Can the liftweb-snapshot-1.1 POM be changed in order to let > >> maven work in offline mode? > > >> Here's an excerpt of the error message when trying to run in offline > >> mode: > >> $ mvn -o -npu compile > >> [INFO] > >> NOTE: Maven is executing in offline mode. Any artifacts not already > >> in > >> your local > >> repository will be > >> inaccessible. > >> ... > >> [ERROR] BUILD > >> ERROR > >> [INFO] > >> --- > >> - > >> [INFO] Failed to resolve > >> artifact. > >> ... > >> Missing: > >> -- > >> 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > >> ... > > >> The files DO appear to be in my local repository, last updated via > >> maven yesterday at 15:20 GMT: > >> $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1- > >> SNAPSHOT/ > >> lift-util-1.1-SNAPSHOT.jar > >> lift-util-1.1-SNAPSHOT.jar.sha1 > >> lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > >> lift-util-1.1-SNAPSHOT.pom > >> lift-util-1.1-SNAPSHOT.pom.sha1 > >> lift-util-1.1-SNAPSHOT-sources.jar > >> lift-util-1.1-SNAPSHOT-sources.jar.sha1 > >> maven-metadata-scala-tools.org.snapshots.xml > >> maven-metadata-scala-tools.org.snapshots.xml.sha1 > >> maven-metadata-scala-tools.org.xml > >> resolver-status.properties > > >> Any ideas how to force maven to use the files that it was content to > >> use yesterday? > > >> Thanks, > >> Ellis --~--~-~--~~~---~--~~ 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: REST: Why is this returning an empty page?
Doh! Sorry about that - im using a bunch of implicit conversions that I wrote for my specific application (as I had beef with not being able to configure the root node of the response xml generically - im still looking for a good solution to this but here's what I have) Stick this in the same file: http://gist.github.com/137066 Hope that helps Cheers, Tim On Jun 27, 6:51 pm, fbettag wrote: > This looks alot cleaner than my try. Anyhow, using the update/create > in one method is only useful if you give your db-objects something > like a unique key identifier in form of a string. > Since mine only consist of an id, name (with spaces and trash-chars), > content and a mappedlocale, i am not sure if it is so good to simply > create an entry for id 50234 just because somebody tries to "update" > it ;) > I hope you get my draft. > > Also this irritates me: > // user methods > def listUsers(): LiftResponse = { > val users = User.findAll.flatMap(_.toXml) > // XmlResponse(wrapXmlBody("users",users.open_!)) > ("users",users) > } > > NetBeans shows me an Error that ("users",users) is a type mismatch. > found: (java.lang.String, List[scala.xml.Node]) > required: net.liftweb.http.LiftResponse (obvious) > > I tried something like this, but understanding Box[] and making the > best of it still gives me headaches: > val obj: Content = if (inContentid == "new") new Content; > else Content.find(By(Content.id, inContentid.toLong)); > > Also NetBeans always complains that wrapXmlBody was not found. I > googled for it but i really couldn't find anything to it which would > have turned up the import path i'd have to use. > > best regards > > On Jun 27, 11:33 am, Timothy Perrett wrote: > > > > > I read your post with interest - having built quite a large ROA with > > Lift. Here's what I have with a simple bit of REST user management: > > > def dispatch: LiftRules.DispatchPF = { > > // user methods > > case Req("api" :: "users" :: Nil, "", GetRequest) => () => > > listUsers() > > case Req("api" :: "user" :: user :: Nil, "", GetRequest) => () => > > showUser(user) > > case r @ Req("api" :: "user" :: user :: Nil, "", PutRequest) => () > > => addOrUpdateUser(user, r) > > case Req("api" :: "user" :: user :: Nil, "", DeleteRequest) => () > > => deleteUser(user) > > > > } > > > // user methods > > def listUsers(): LiftResponse = { > > val users = User.findAll.flatMap(_.toXml) > > // XmlResponse(wrapXmlBody("users",users.open_!)) > > ("users",users) > > } > > > def showUser(inUsername: String): LiftResponse = { > > val user: Box[NodeSeq] = for(user <- User.find(By(User.username, > > inUsername))) yield user.toXml > > ("users",user) > > } > > > def addOrUpdateUser(inUsername: String, req: Req): LiftResponse = { > > var user = User.find(By(User.username, inUsername)) openOr new > > User > > user.username(inUsername) > > req.xml match { > > case Full({paramaters @ _*}) => { > > for(paramater <- paramaters){ > > paramater match { > > case {firstname} => user.firstName > > (firstname) > > case {lastname} => user.lastName > > (lastname) > > case {email} => user.email(email) > > case {superuser} => user.superUser > > (superuser.text.toBoolean) > > case {active} => user.active > > (active.text.toBoolean) > > case {password} => user.password > > (password.text) > > case _ => > > } > > } > > try { > > user.save > > CreatedResponse(wrapXmlBody("user",user.toXml), "text/xml") > > } catch { > > case e => Log.error("Could not save user", e); > > InternalServerErrorResponse() > > } > > } > > case _ => Log.error("Request was malformed"); BadResponse() > > } > > } > > > The main difference is that I see no need for seperate add and update > > methods - generally speaking the semantics are the same in rest. For > > instance: > > > GET - /users (lists all the users) > > GET - /user/timperrett (displays just timperrett user) > > PUT - /user/timperrett (if no user exists, create a new one, > > otherwise, update the existing one) > > > This is a fairly pure ROA, if you have url's like /user/add/timperrett > > - that is less REST and more RPC action based servicing. > > > Thoughts? > > > Cheers, Tim > > > On Jun 27, 5:15 am, fbettag wrote: > > > > Hey guys, > > > > i've been playing around with REST all night, the list, add and delete > > > is working great so far. > > > The problem is, that upon update, it returns me an empty page and > > > doesn't run through the update functionality. > > > Any ideas what the problem in my update method might be? > > > > This is what i got from the samples of the liftweb sources: > > > > object Layouts { > > > // Register the Layouts webservice with the dispatcher > > > def init() { > > >
[Lift] Re: REST: Why is this returning an empty page?
This looks alot cleaner than my try. Anyhow, using the update/create in one method is only useful if you give your db-objects something like a unique key identifier in form of a string. Since mine only consist of an id, name (with spaces and trash-chars), content and a mappedlocale, i am not sure if it is so good to simply create an entry for id 50234 just because somebody tries to "update" it ;) I hope you get my draft. Also this irritates me: // user methods def listUsers(): LiftResponse = { val users = User.findAll.flatMap(_.toXml) // XmlResponse(wrapXmlBody("users",users.open_!)) ("users",users) } NetBeans shows me an Error that ("users",users) is a type mismatch. found: (java.lang.String, List[scala.xml.Node]) required: net.liftweb.http.LiftResponse (obvious) I tried something like this, but understanding Box[] and making the best of it still gives me headaches: val obj: Content = if (inContentid == "new") new Content; else Content.find(By(Content.id, inContentid.toLong)); Also NetBeans always complains that wrapXmlBody was not found. I googled for it but i really couldn't find anything to it which would have turned up the import path i'd have to use. best regards On Jun 27, 11:33 am, Timothy Perrett wrote: > I read your post with interest - having built quite a large ROA with > Lift. Here's what I have with a simple bit of REST user management: > > def dispatch: LiftRules.DispatchPF = { > // user methods > case Req("api" :: "users" :: Nil, "", GetRequest) => () => > listUsers() > case Req("api" :: "user" :: user :: Nil, "", GetRequest) => () => > showUser(user) > case r @ Req("api" :: "user" :: user :: Nil, "", PutRequest) => () > => addOrUpdateUser(user, r) > case Req("api" :: "user" :: user :: Nil, "", DeleteRequest) => () > => deleteUser(user) > > } > > // user methods > def listUsers(): LiftResponse = { > val users = User.findAll.flatMap(_.toXml) > // XmlResponse(wrapXmlBody("users",users.open_!)) > ("users",users) > } > > def showUser(inUsername: String): LiftResponse = { > val user: Box[NodeSeq] = for(user <- User.find(By(User.username, > inUsername))) yield user.toXml > ("users",user) > } > > def addOrUpdateUser(inUsername: String, req: Req): LiftResponse = { > var user = User.find(By(User.username, inUsername)) openOr new > User > user.username(inUsername) > req.xml match { > case Full({paramaters @ _*}) => { > for(paramater <- paramaters){ > paramater match { > case {firstname} => user.firstName > (firstname) > case {lastname} => user.lastName > (lastname) > case {email} => user.email(email) > case {superuser} => user.superUser > (superuser.text.toBoolean) > case {active} => user.active > (active.text.toBoolean) > case {password} => user.password > (password.text) > case _ => > } > } > try { > user.save > CreatedResponse(wrapXmlBody("user",user.toXml), "text/xml") > } catch { > case e => Log.error("Could not save user", e); > InternalServerErrorResponse() > } > } > case _ => Log.error("Request was malformed"); BadResponse() > } > } > > The main difference is that I see no need for seperate add and update > methods - generally speaking the semantics are the same in rest. For > instance: > > GET - /users (lists all the users) > GET - /user/timperrett (displays just timperrett user) > PUT - /user/timperrett (if no user exists, create a new one, > otherwise, update the existing one) > > This is a fairly pure ROA, if you have url's like /user/add/timperrett > - that is less REST and more RPC action based servicing. > > Thoughts? > > Cheers, Tim > > On Jun 27, 5:15 am, fbettag wrote: > > > > > Hey guys, > > > i've been playing around with REST all night, the list, add and delete > > is working great so far. > > The problem is, that upon update, it returns me an empty page and > > doesn't run through the update functionality. > > Any ideas what the problem in my update method might be? > > > This is what i got from the samples of the liftweb sources: > > > object Layouts { > > // Register the Layouts webservice with the dispatcher > > def init() { > > LiftRules.dispatch.append(NamedPF("Layouts WebService") { > > case Req("layouts" :: "list" :: Nil, _, GetRequest) > > => > > () => Full(list()) > > > case Req("layouts" :: "add" :: Nil, _, rt) > > if rt == GetRequest || rt == PostRequest || > > rt == PutRequest => > > () => Full(add()) > > > case Req("layouts" :: "update" :: Nil, _, rt) > > if rt == GetRequest || rt == PostRequest || > > rt == PutRequest =>
[Lift] Re: liftweb.net down now, and maven refuses to compile
scala-tools.org is back up and running - Derek called the hosts directly. Enjoy. Cheers, Tim On Jun 27, 2:57 pm, David Bernard wrote: > Hi, > > * It's right I don't monitor the mailing list actively (use keyword to > filter) > * I'm no longer admin of scala-tools.org (since 2 or 3 month). > > To work offline with maven you need to call it with : > mvn -o > > but there is a bug with maven 2.0.x and offline mode. you need to use and > install 2.1.0. > An other tips : I suggest you modify your pom.xml (or settings.xml) with the > following code to avoid daily update of lift-snapshots (only on demand when > you call "mvn -U ") > > > scala-tools.org.snapshots > Scala Tools Maven2 Repository > http://scala-tools.org/repo-snapshots > > false > > > true > never > > > > see for > detailshttp://maven.apache.org/ref/current/maven-model/maven.html#class_snap... > > /davidB > > > > On Sat, Jun 27, 2009 at 12:03, Ellis wrote: > > > > try maven -o > > The point of my message was that maven -o doesn't work! :) > > > On Jun 27, 11:06 am, "marius d." wrote: > > > try maven -o > > > > Marius > > > > On Jun 27, 11:46 am, Ellis wrote: > > > > > Maven is suddenly refusing to compile because scala-tools.org is > > > > down. Can the liftweb-snapshot-1.1 POM be changed in order to let > > > > maven work in offline mode? > > > > > Here's an excerpt of the error message when trying to run in offline > > > > mode: > > > > $ mvn -o -npu compile > > > > [INFO] > > > > NOTE: Maven is executing in offline mode. Any artifacts not already in > > > > your local > > > > repository will be > > > > inaccessible. > > > > ... > > > > [ERROR] BUILD > > > > ERROR > > > > [INFO] > > > > > > > [INFO] Failed to resolve > > > > artifact. > > > > ... > > > > Missing: > > > > -- > > > > 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > > > > ... > > > > > The files DO appear to be in my local repository, last updated via > > > > maven yesterday at 15:20 GMT: > > > > $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1-SNAPSHOT/ > > > > lift-util-1.1-SNAPSHOT.jar > > > > lift-util-1.1-SNAPSHOT.jar.sha1 > > > > lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > > > > lift-util-1.1-SNAPSHOT.pom > > > > lift-util-1.1-SNAPSHOT.pom.sha1 > > > > lift-util-1.1-SNAPSHOT-sources.jar > > > > lift-util-1.1-SNAPSHOT-sources.jar.sha1 > > > > maven-metadata-scala-tools.org.snapshots.xml > > > > maven-metadata-scala-tools.org.snapshots.xml.sha1 > > > > maven-metadata-scala-tools.org.xml > > > > resolver-status.properties > > > > > Any ideas how to force maven to use the files that it was content to > > > > use yesterday? > > > > > Thanks, > > > > Ellis --~--~-~--~~~---~--~~ 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: scala-tools.org down
OK, CalPop checked it and said that the network cable was bad. I'm a network engineer and in my experience cables don't generally go bad, but it seems to be working now so I don't feel like complaining too loudly ;) Derek On Sat, Jun 27, 2009 at 9:54 AM, Derek Chen-Becker wrote: > Hi all, > DPP gave me access to the primary Xen server that everything else runs > on, but I'm unable to reach it. This may either be a network failure or a > total hardware failure, but it's unclear at this point. I'm going to call > CalPop, the hosting provider, and see if they can look at the box. > > Derek > --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
Thanks Tim It seems that scala-tools.org is back up now, but even so I get this error: $ mvn scala:doc -e + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Lift [INFO] Lift Utils [INFO] Lift Actor [INFO] Lift WebKit [INFO] Lift OSGi [INFO] Lift Widgets [INFO] Lift Mapper [INFO] Lift Machine [INFO] Lift Record [INFO] Lift Textile [INFO] Lift Facebook [INFO] Lift AMQP [INFO] Lift XMPP [INFO] Lift OpenID [INFO] Lift OAuth [INFO] Lift PayPal [INFO] Lift TestKit [INFO] Lift Core (full lift) [INFO] Lift JPA [INFO] Lift Sites [INFO] Lift Example [INFO] OSGi Examples for Lift - Hello [INFO] OSGi Examples for Lift [INFO] Skittr Example [INFO] HelloLift example application [INFO] HelloDarwin tutorial application [INFO] JPA Demo Master [INFO] JPADemo-spa [INFO] JPADemo-web [INFO] HTTP Authentication example [INFO] lift-archetype-blank [INFO] lift-archetype-basic [INFO] lift-archetype-jpa-basic [INFO] lift-archetype-jpa-blank [INFO] lift-archetype-jpa-blank-single [INFO] Searching repository for plugin with prefix: 'scala'. WAGON_VERSION: 1.0-beta-2 [INFO] [INFO] Building Lift [INFO]task-segment: [scala:doc] [INFO] [INFO] [scala:doc] [INFO] Checking for multiple versions of scala [WARNING] No source files found in /Users/george/Sites/git/liftweb/src/ main/scala [INFO] [INFO] Building Lift Utils [INFO]task-segment: [scala:doc] [INFO] [INFO] [scala:doc] [INFO] Checking for multiple versions of scala [INFO] Checking for multiple versions of scala [INFO] delete :/Users/george/Sites/git/liftweb/lift-util/target/site/ scaladocs/scaladocs [WARNING] warning: there were unchecked warnings; re-run with - unchecked for details [INFO] failed to find baseUri for org.slf4j.Logger :: org.slf4j [INFO] failed to find baseUri for org.slf4j.Logger :: org.slf4j [INFO] failed to find baseUri for org.apache.log4j.Logger :: org.apache.log4j [INFO] failed to find baseUri for org.apache.log4j.Logger :: org.apache.log4j [INFO] failed to find baseUri for org.apache.log4j.Level :: org.apache.log4j [INFO] failed to find baseUri for org.apache.log4j.Priority :: org.apache.log4j [WARNING] one warning found [INFO] [INFO] Building Lift Actor [INFO]task-segment: [scala:doc] [INFO] [INFO] [scala:doc] [INFO] Checking for multiple versions of scala [INFO] Checking for multiple versions of scala [INFO] delete :/Users/george/Sites/git/liftweb/lift-actor/target/site/ scaladocs/scaladocs [WARNING] /Users/george/Sites/git/liftweb/lift-actor/src/main/scala/ net/liftweb/actor/LAFuture.scala:20: error: not found: value Helpers [WARNING] import Helpers._ [WARNING]^ [WARNING] /Users/george/Sites/git/liftweb/lift-actor/src/main/scala/ net/liftweb/actor/LAPinger.scala:18: error: not found: value Helpers [WARNING] import Helpers.TimeSpan [WARNING]^ [WARNING] /Users/george/Sites/git/liftweb/lift-actor/src/main/scala/ net/liftweb/actor/LiftActor.scala:20: error: not found: value Helpers [WARNING] import Helpers._ [WARNING]^ [WARNING] /Users/george/Sites/git/liftweb/lift-actor/src/main/scala/ net/liftweb/actor/LiftActor.scala:179: error: missing parameter type for expanded function ((x0$1) => x0$1 match { [WARNING] case (e @ _) => Log.error("Error processing Actor ".$plus (this), e) [WARNING] }) [WARNING] protected def exceptionHandler: PartialFunction[Throwable, Unit] = { [WARNING] ^ [WARNING] four errors found [INFO] [ERROR] BUILD ERROR [INFO] [INFO] wrap: org.apache.maven.reporting.MavenReportException: wrap: command line returned non-zero value:1 [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: wrap: org.apache.maven.reporting.MavenReportException: wrap: command line returned non-zero value:1 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecutor.java:584) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal (DefaultLifecycleExecutor.java:513) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (DefaultLifecycleExecutor.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegm
[Lift] Re: Anyone working on the flot widget?
Guys, If you want changes made to the flot widgets, please let us know what exactly needs changing and we'll get it done. By all means, please don't feel you are out in the cold! Cheers, Tim On 27/06/2009 15:14, "Jeppe Nejsum Madsen" wrote: > I'm basically in the same boat and will probably clone the > lift-widgets module on github and work from there (I'm not a Lift > committer). I hope Francois will then commit the changes to Lift at > some point :-) I think we should coordinate the effort to avoid > wasting resources. Let me know what you think --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
On Sat, Jun 27, 2009 at 11:10 AM, dflemstr wrote: > As can be seen here: http://bit.ly/13EEnw , the bug isn't present in > the vanilla Flot library. Make sure you're trying to plot the same data with the same plot options. > I am at a loss to find the bug causing all this. The whole Flot widget > seems to be very messy (it consists of 30% commented-away code, for > instance) and I would be happy to help improve it once and for all, > since I'm in need of the Flot library for a project. I'm basically in the same boat and will probably clone the lift-widgets module on github and work from there (I'm not a Lift committer). I hope Francois will then commit the changes to Lift at some point :-) I think we should coordinate the effort to avoid wasting resources. Let me know what you think /Jeppe --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
Hi, * It's right I don't monitor the mailing list actively (use keyword to filter) * I'm no longer admin of scala-tools.org (since 2 or 3 month). To work offline with maven you need to call it with : mvn -o but there is a bug with maven 2.0.x and offline mode. you need to use and install 2.1.0. An other tips : I suggest you modify your pom.xml (or settings.xml) with the following code to avoid daily update of lift-snapshots (only on demand when you call "mvn -U ") scala-tools.org.snapshots Scala Tools Maven2 Repository http://scala-tools.org/repo-snapshots false true never see for details http://maven.apache.org/ref/current/maven-model/maven.html#class_snapshots /davidB On Sat, Jun 27, 2009 at 12:03, Ellis wrote: > > > try maven -o > The point of my message was that maven -o doesn't work! :) > > > On Jun 27, 11:06 am, "marius d." wrote: > > try maven -o > > > > Marius > > > > On Jun 27, 11:46 am, Ellis wrote: > > > > > Maven is suddenly refusing to compile because scala-tools.org is > > > down. Can the liftweb-snapshot-1.1 POM be changed in order to let > > > maven work in offline mode? > > > > > Here's an excerpt of the error message when trying to run in offline > > > mode: > > > $ mvn -o -npu compile > > > [INFO] > > > NOTE: Maven is executing in offline mode. Any artifacts not already in > > > your local > > > repository will be > > > inaccessible. > > > ... > > > [ERROR] BUILD > > > ERROR > > > [INFO] > > > > > > > [INFO] Failed to resolve > > > artifact. > > > ... > > > Missing: > > > -- > > > 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > > > ... > > > > > The files DO appear to be in my local repository, last updated via > > > maven yesterday at 15:20 GMT: > > > $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1-SNAPSHOT/ > > > lift-util-1.1-SNAPSHOT.jar > > > lift-util-1.1-SNAPSHOT.jar.sha1 > > > lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > > > lift-util-1.1-SNAPSHOT.pom > > > lift-util-1.1-SNAPSHOT.pom.sha1 > > > lift-util-1.1-SNAPSHOT-sources.jar > > > lift-util-1.1-SNAPSHOT-sources.jar.sha1 > > > maven-metadata-scala-tools.org.snapshots.xml > > > maven-metadata-scala-tools.org.snapshots.xml.sha1 > > > maven-metadata-scala-tools.org.xml > > > resolver-status.properties > > > > > Any ideas how to force maven to use the files that it was content to > > > use yesterday? > > > > > Thanks, > > > Ellis > > > > > > > > --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
But of course! Clone the lift source repo onto your local machine then do the following: cd mvn scala:doc Cheers, Tim On 27/06/2009 14:07, "george" wrote: > > Is there any way to locally generate the Lift API scaladocs without > needing scala-tools.org? > > George > > On Jun 27, 1:16 pm, Josh Suereth wrote: >> Hi, I forwarded the email to ad...@scala-tools.org, but I have not received >> it back (meaning is has not been sent). I also tried ssh'ing onto the box, >> and was unsuccessful. That's being my powers of admin for >> scala-tools.orguntil we can get it active again. >> >> David Pollak and Derek Chen-Becker are the other admins (for future >> reference). >> >> - Josh >> >> >> >> On Sat, Jun 27, 2009 at 5:28 AM, marius d. wrote: >> >>> dunno who can help .. I sent an email on scala-list but nothing yet >> >>> On Jun 27, 12:17 pm, Timothy Perrett wrote: @marius Is there anyone around to checkup on scala-tools? DavidB doesn't monitor the lift list much these days and I'm not sure if there are any other non-American guys (I.e people who are awake now!) to take a look at the server? >> Cheers, Tim >> Sent from my iPhone >> On 27 Jun 2009, at 10:06, "marius d." wrote: >> > try maven -o >> > Marius >> > On Jun 27, 11:46 am, Ellis wrote: >> Maven is suddenly refusing to compile because scala-tools.org is >> down. Can the liftweb-snapshot-1.1 POM be changed in order to let >> maven work in offline mode? >> >> Here's an excerpt of the error message when trying to run in offline >> mode: >> $ mvn -o -npu compile >> [INFO] >> NOTE: Maven is executing in offline mode. Any artifacts not already >> in >> your local >> repository will be >> inaccessible. >> ... >> [ERROR] BUILD >> ERROR >> [INFO] >> --- >> - >> [INFO] Failed to resolve >> artifact. >> ... >> Missing: >> -- >> 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT >> ... >> >> The files DO appear to be in my local repository, last updated via >> maven yesterday at 15:20 GMT: >> $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1- >> SNAPSHOT/ >> lift-util-1.1-SNAPSHOT.jar >> lift-util-1.1-SNAPSHOT.jar.sha1 >> lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated >> lift-util-1.1-SNAPSHOT.pom >> lift-util-1.1-SNAPSHOT.pom.sha1 >> lift-util-1.1-SNAPSHOT-sources.jar >> lift-util-1.1-SNAPSHOT-sources.jar.sha1 >> maven-metadata-scala-tools.org.snapshots.xml >> maven-metadata-scala-tools.org.snapshots.xml.sha1 >> maven-metadata-scala-tools.org.xml >> resolver-status.properties >> >> Any ideas how to force maven to use the files that it was content to >> use yesterday? >> >> Thanks, >> Ellis > > > --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
Is there any way to locally generate the Lift API scaladocs without needing scala-tools.org? George On Jun 27, 1:16 pm, Josh Suereth wrote: > Hi, I forwarded the email to ad...@scala-tools.org, but I have not received > it back (meaning is has not been sent). I also tried ssh'ing onto the box, > and was unsuccessful. That's being my powers of admin for > scala-tools.orguntil we can get it active again. > > David Pollak and Derek Chen-Becker are the other admins (for future > reference). > > - Josh > > > > On Sat, Jun 27, 2009 at 5:28 AM, marius d. wrote: > > > dunno who can help .. I sent an email on scala-list but nothing yet > > > On Jun 27, 12:17 pm, Timothy Perrett wrote: > > > @marius Is there anyone around to checkup on scala-tools? DavidB > > > doesn't monitor the lift list much these days and I'm not sure if > > > there are any other non-American guys (I.e people who are awake now!) > > > to take a look at the server? > > > > Cheers, Tim > > > > Sent from my iPhone > > > > On 27 Jun 2009, at 10:06, "marius d." wrote: > > > > > try maven -o > > > > > Marius > > > > > On Jun 27, 11:46 am, Ellis wrote: > > > >> Maven is suddenly refusing to compile because scala-tools.org is > > > >> down. Can the liftweb-snapshot-1.1 POM be changed in order to let > > > >> maven work in offline mode? > > > > >> Here's an excerpt of the error message when trying to run in offline > > > >> mode: > > > >> $ mvn -o -npu compile > > > >> [INFO] > > > >> NOTE: Maven is executing in offline mode. Any artifacts not already > > > >> in > > > >> your local > > > >> repository will be > > > >> inaccessible. > > > >> ... > > > >> [ERROR] BUILD > > > >> ERROR > > > >> [INFO] > > > >> --- > > > >> - > > > >> [INFO] Failed to resolve > > > >> artifact. > > > >> ... > > > >> Missing: > > > >> -- > > > >> 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > > > >> ... > > > > >> The files DO appear to be in my local repository, last updated via > > > >> maven yesterday at 15:20 GMT: > > > >> $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1- > > > >> SNAPSHOT/ > > > >> lift-util-1.1-SNAPSHOT.jar > > > >> lift-util-1.1-SNAPSHOT.jar.sha1 > > > >> lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > > > >> lift-util-1.1-SNAPSHOT.pom > > > >> lift-util-1.1-SNAPSHOT.pom.sha1 > > > >> lift-util-1.1-SNAPSHOT-sources.jar > > > >> lift-util-1.1-SNAPSHOT-sources.jar.sha1 > > > >> maven-metadata-scala-tools.org.snapshots.xml > > > >> maven-metadata-scala-tools.org.snapshots.xml.sha1 > > > >> maven-metadata-scala-tools.org.xml > > > >> resolver-status.properties > > > > >> Any ideas how to force maven to use the files that it was content to > > > >> use yesterday? > > > > >> Thanks, > > > >> Ellis --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
Hi, I forwarded the email to ad...@scala-tools.org, but I have not received it back (meaning is has not been sent). I also tried ssh'ing onto the box, and was unsuccessful. That's being my powers of admin for scala-tools.orguntil we can get it active again. David Pollak and Derek Chen-Becker are the other admins (for future reference). - Josh On Sat, Jun 27, 2009 at 5:28 AM, marius d. wrote: > > dunno who can help .. I sent an email on scala-list but nothing yet > > On Jun 27, 12:17 pm, Timothy Perrett wrote: > > @marius Is there anyone around to checkup on scala-tools? DavidB > > doesn't monitor the lift list much these days and I'm not sure if > > there are any other non-American guys (I.e people who are awake now!) > > to take a look at the server? > > > > Cheers, Tim > > > > Sent from my iPhone > > > > On 27 Jun 2009, at 10:06, "marius d." wrote: > > > > > > > > > try maven -o > > > > > Marius > > > > > On Jun 27, 11:46 am, Ellis wrote: > > >> Maven is suddenly refusing to compile because scala-tools.org is > > >> down. Can the liftweb-snapshot-1.1 POM be changed in order to let > > >> maven work in offline mode? > > > > >> Here's an excerpt of the error message when trying to run in offline > > >> mode: > > >> $ mvn -o -npu compile > > >> [INFO] > > >> NOTE: Maven is executing in offline mode. Any artifacts not already > > >> in > > >> your local > > >> repository will be > > >> inaccessible. > > >> ... > > >> [ERROR] BUILD > > >> ERROR > > >> [INFO] > > >> --- > > >> - > > >> [INFO] Failed to resolve > > >> artifact. > > >> ... > > >> Missing: > > >> -- > > >> 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > > >> ... > > > > >> The files DO appear to be in my local repository, last updated via > > >> maven yesterday at 15:20 GMT: > > >> $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1- > > >> SNAPSHOT/ > > >> lift-util-1.1-SNAPSHOT.jar > > >> lift-util-1.1-SNAPSHOT.jar.sha1 > > >> lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > > >> lift-util-1.1-SNAPSHOT.pom > > >> lift-util-1.1-SNAPSHOT.pom.sha1 > > >> lift-util-1.1-SNAPSHOT-sources.jar > > >> lift-util-1.1-SNAPSHOT-sources.jar.sha1 > > >> maven-metadata-scala-tools.org.snapshots.xml > > >> maven-metadata-scala-tools.org.snapshots.xml.sha1 > > >> maven-metadata-scala-tools.org.xml > > >> resolver-status.properties > > > > >> Any ideas how to force maven to use the files that it was content to > > >> use yesterday? > > > > >> Thanks, > > >> Ellis > > > --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
Sorry On Jun 27, 1:03 pm, Ellis wrote: > > try maven -o > > The point of my message was that maven -o doesn't work! :) > > On Jun 27, 11:06 am, "marius d." wrote: > > > try maven -o > > > Marius > > > On Jun 27, 11:46 am, Ellis wrote: > > > > Maven is suddenly refusing to compile because scala-tools.org is > > > down. Can the liftweb-snapshot-1.1 POM be changed in order to let > > > maven work in offline mode? > > > > Here's an excerpt of the error message when trying to run in offline > > > mode: > > > $ mvn -o -npu compile > > > [INFO] > > > NOTE: Maven is executing in offline mode. Any artifacts not already in > > > your local > > > repository will be > > > inaccessible. > > > ... > > > [ERROR] BUILD > > > ERROR > > > [INFO] > > > > > > [INFO] Failed to resolve > > > artifact. > > > ... > > > Missing: > > > -- > > > 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > > > ... > > > > The files DO appear to be in my local repository, last updated via > > > maven yesterday at 15:20 GMT: > > > $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1-SNAPSHOT/ > > > lift-util-1.1-SNAPSHOT.jar > > > lift-util-1.1-SNAPSHOT.jar.sha1 > > > lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > > > lift-util-1.1-SNAPSHOT.pom > > > lift-util-1.1-SNAPSHOT.pom.sha1 > > > lift-util-1.1-SNAPSHOT-sources.jar > > > lift-util-1.1-SNAPSHOT-sources.jar.sha1 > > > maven-metadata-scala-tools.org.snapshots.xml > > > maven-metadata-scala-tools.org.snapshots.xml.sha1 > > > maven-metadata-scala-tools.org.xml > > > resolver-status.properties > > > > Any ideas how to force maven to use the files that it was content to > > > use yesterday? > > > > Thanks, > > > Ellis --~--~-~--~~~---~--~~ 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: Turning on Logging for third-party libraries in Lift
I think that simply putting log4j.xml in WEB-INF/classes folder does the trick. Br's, Marius On Jun 27, 3:06 am, Alan M wrote: > I'm trying to enable log4j logging in a third party library (well > third party to me.. it was developed in house) so that it logs it's > output to the same place my Lift webapp logs. > > In the third party library, a log4j Logger is obtained and used but no > setup is done, figuring the log4j config will be done by the app > builder. > > Now I figured the root logger would catch it.. but it didn't seem to > work. So I added a specific logger with the exact string used in the > third party code.. Still no output.. > > Am I missing something about class loaders? Or is there something > about start-up that's messing with the getLogger method (it's actually > in the method so it should be happening after Lift initializes > everything)? Or is there something else special about lift logging > that won't let the library piggy back off of it? > > BTW, I should mention that Lift logging otherwise is working for me. > By otherwise I mean when logging from any classes directly in the web- > app classes directory. > > Alan --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
> try maven -o The point of my message was that maven -o doesn't work! :) On Jun 27, 11:06 am, "marius d." wrote: > try maven -o > > Marius > > On Jun 27, 11:46 am, Ellis wrote: > > > Maven is suddenly refusing to compile because scala-tools.org is > > down. Can the liftweb-snapshot-1.1 POM be changed in order to let > > maven work in offline mode? > > > Here's an excerpt of the error message when trying to run in offline > > mode: > > $ mvn -o -npu compile > > [INFO] > > NOTE: Maven is executing in offline mode. Any artifacts not already in > > your local > > repository will be > > inaccessible. > > ... > > [ERROR] BUILD > > ERROR > > [INFO] > > > > [INFO] Failed to resolve > > artifact. > > ... > > Missing: > > -- > > 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > > ... > > > The files DO appear to be in my local repository, last updated via > > maven yesterday at 15:20 GMT: > > $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1-SNAPSHOT/ > > lift-util-1.1-SNAPSHOT.jar > > lift-util-1.1-SNAPSHOT.jar.sha1 > > lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > > lift-util-1.1-SNAPSHOT.pom > > lift-util-1.1-SNAPSHOT.pom.sha1 > > lift-util-1.1-SNAPSHOT-sources.jar > > lift-util-1.1-SNAPSHOT-sources.jar.sha1 > > maven-metadata-scala-tools.org.snapshots.xml > > maven-metadata-scala-tools.org.snapshots.xml.sha1 > > maven-metadata-scala-tools.org.xml > > resolver-status.properties > > > Any ideas how to force maven to use the files that it was content to > > use yesterday? > > > Thanks, > > Ellis > > --~--~-~--~~~---~--~~ 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: Turning on Logging for third-party libraries in Lift
Hey Alan, Check this out from the JPA example in the lift codebase repo - http://is.gd/1fQuw That enables logging for the 3rd party JPA JARs and it works great. It could probably be done more elegantly with an external file, but that certainly works :-) Cheers, Tim On Jun 27, 1:06 am, Alan M wrote: > I'm trying to enable log4j logging in a third party library (well > third party to me.. it was developed in house) so that it logs it's > output to the same place my Lift webapp logs. > > In the third party library, a log4j Logger is obtained and used but no > setup is done, figuring the log4j config will be done by the app > builder. > > Now I figured the root logger would catch it.. but it didn't seem to > work. So I added a specific logger with the exact string used in the > third party code.. Still no output.. > > Am I missing something about class loaders? Or is there something > about start-up that's messing with the getLogger method (it's actually > in the method so it should be happening after Lift initializes > everything)? Or is there something else special about lift logging > that won't let the library piggy back off of it? > > BTW, I should mention that Lift logging otherwise is working for me. > By otherwise I mean when logging from any classes directly in the web- > app classes directory. > > Alan --~--~-~--~~~---~--~~ 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: suggestion: I'm a brand spanking new user....some first impressions on 'getting started'
Id also recommend searching through the mailing list archive - the vast majority of questions we see here have been asked in the past and there are some great answers that were never distilled from the ML to the wiki. Cheers, Tim On Jun 27, 8:31 am, "marius d." wrote: > You can also look son the examples application that come with Lift in > sites folder. Just get lift from github. > > Br's, > Marius > > On Jun 27, 6:22 am, g-man wrote: > > > > > My path to learning was threefold: > > > 1. Do the 'ToDo' app tutorial, while studying the 'PocketChange' app > > from the book at the same time. > > > 2. Read the Lift book. > > > 3. Read David's and the 'Staircase' Scala books. > > > I agree that, compared to the wealth of information, books, tutorials, > > videos, etc to be found on Rails, GAE-Django, and web2py, there is far > > less for Lift and Scala, but this is a young (and, in my opinion, much > > more advanced) framework, so it will take time. > > > Tell us what you have learned, as I am doing on the group! > > > On Jun 26, 6:14 pm, Rick wrote: > > > > Today is my very first day that I planned to take a serious look at Lift. > > > I've coded webapps in many different frameworks and plan to do a simple > > > Employee app and add my 'how to' to the site I host > > > herehttp://www.learntechnology.net/content/main.jsp(whichmanyof the > > > examples > > > there show the same application being built with different frameworks.) > > > > Some users like myself might want to start by looking at an existing > > > examples before going through the exact step by step as described in the > > > user manual (which has a broken link to the wiki by the way -yes, I > > > submitted a bug report.) > > > > If I want to take that route there should be a quick way to find example > > > projects with the source code. Finding these example was extremely > > > tedious > > > > At some point a new user might go the wiki. .. > > > you get to the wiki page looking for examples.. > > > you look at the content menu.. > > > you might try the 'cheat sheet getting started link'... > > > cheat by examples has a link 'lift by examples', but that doesn't seem to > > > really show example apps? > > > BY CHANCE, I happened to see in a "How To" - how to run examples (which at > > > first i thought why would I click this when I haven't even seen any > > > examples?), but I clicked it anyway.. > > > Then on the "how to run examples' link I was excited to see a list of some > > > examples (buried way to deep for a new user to find imo.) > > > Yet only the war links work? None of the project links are active? > > > > Finding example apps to study and learn by is seemingly very difficult to > > > do. Are there any out there? If so where? > > > > For new user, learning by examples is extremely important. I think a lot > > > of > > > new users will be turned off if it's difficult to find some example > > > applications to study to learn from. > > > > I understand all of this is open source and I plan to write a tutorial > > > once > > > I learn it, but it would be nice to find some existing apps to start with. > > > > thanks for all the work done so far. > > > > -- > > > Rick R --~--~-~--~~~---~--~~ 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: REST: Why is this returning an empty page?
I read your post with interest - having built quite a large ROA with Lift. Here's what I have with a simple bit of REST user management: def dispatch: LiftRules.DispatchPF = { // user methods case Req("api" :: "users" :: Nil, "", GetRequest) => () => listUsers() case Req("api" :: "user" :: user :: Nil, "", GetRequest) => () => showUser(user) case r @ Req("api" :: "user" :: user :: Nil, "", PutRequest) => () => addOrUpdateUser(user, r) case Req("api" :: "user" :: user :: Nil, "", DeleteRequest) => () => deleteUser(user) } // user methods def listUsers(): LiftResponse = { val users = User.findAll.flatMap(_.toXml) // XmlResponse(wrapXmlBody("users",users.open_!)) ("users",users) } def showUser(inUsername: String): LiftResponse = { val user: Box[NodeSeq] = for(user <- User.find(By(User.username, inUsername))) yield user.toXml ("users",user) } def addOrUpdateUser(inUsername: String, req: Req): LiftResponse = { var user = User.find(By(User.username, inUsername)) openOr new User user.username(inUsername) req.xml match { case Full({paramaters @ _*}) => { for(paramater <- paramaters){ paramater match { case {firstname} => user.firstName (firstname) case {lastname} => user.lastName (lastname) case {email} => user.email(email) case {superuser} => user.superUser (superuser.text.toBoolean) case {active} => user.active (active.text.toBoolean) case {password} => user.password (password.text) case _ => } } try { user.save CreatedResponse(wrapXmlBody("user",user.toXml), "text/xml") } catch { case e => Log.error("Could not save user", e); InternalServerErrorResponse() } } case _ => Log.error("Request was malformed"); BadResponse() } } The main difference is that I see no need for seperate add and update methods - generally speaking the semantics are the same in rest. For instance: GET - /users (lists all the users) GET - /user/timperrett (displays just timperrett user) PUT - /user/timperrett (if no user exists, create a new one, otherwise, update the existing one) This is a fairly pure ROA, if you have url's like /user/add/timperrett - that is less REST and more RPC action based servicing. Thoughts? Cheers, Tim On Jun 27, 5:15 am, fbettag wrote: > Hey guys, > > i've been playing around with REST all night, the list, add and delete > is working great so far. > The problem is, that upon update, it returns me an empty page and > doesn't run through the update functionality. > Any ideas what the problem in my update method might be? > > This is what i got from the samples of the liftweb sources: > > object Layouts { > // Register the Layouts webservice with the dispatcher > def init() { > LiftRules.dispatch.append(NamedPF("Layouts WebService") { > case Req("layouts" :: "list" :: Nil, _, GetRequest) => > () => Full(list()) > > case Req("layouts" :: "add" :: Nil, _, rt) > if rt == GetRequest || rt == PostRequest || > rt == PutRequest => > () => Full(add()) > > case Req("layouts" :: "update" :: Nil, _, rt) > if rt == GetRequest || rt == PostRequest || > rt == PutRequest => > () => Full(update()) > > case Req("layouts" :: "delete" :: Nil, _, rt) > if rt == GetRequest || rt == PostRequest || rt == > DeleteRequest > => > () => Full(delete()) > }) > } > > // List all Layouts as XML > def list(): XmlResponse = > XmlResponse( > > { > Layout.findAll.map(_.toXml) > } > > ) > > // extract the parameters, create the layout > // return the appropriate response > def add(): LiftResponse = > (for { > name <- S.param("name") ?~ "name parameter missing" > layout <- S.param("layout") ?~ "layout content > missing" > language <- S.param("language") ?~ "language > parameter missing" > } yield { > val l = > Layout.create.name(name).layout(layout).language(language) > l.save > }) match { > case Full(success) => XmlResponse( success={success.toString}/>) > > case Failure(msg, _, _) => NotAcceptableResponse(msg) > case _ => NotFoundResponse() > }
[Lift] Re: liftweb.net down now, and maven refuses to compile
dunno who can help .. I sent an email on scala-list but nothing yet On Jun 27, 12:17 pm, Timothy Perrett wrote: > @marius Is there anyone around to checkup on scala-tools? DavidB > doesn't monitor the lift list much these days and I'm not sure if > there are any other non-American guys (I.e people who are awake now!) > to take a look at the server? > > Cheers, Tim > > Sent from my iPhone > > On 27 Jun 2009, at 10:06, "marius d." wrote: > > > > > try maven -o > > > Marius > > > On Jun 27, 11:46 am, Ellis wrote: > >> Maven is suddenly refusing to compile because scala-tools.org is > >> down. Can the liftweb-snapshot-1.1 POM be changed in order to let > >> maven work in offline mode? > > >> Here's an excerpt of the error message when trying to run in offline > >> mode: > >> $ mvn -o -npu compile > >> [INFO] > >> NOTE: Maven is executing in offline mode. Any artifacts not already > >> in > >> your local > >> repository will be > >> inaccessible. > >> ... > >> [ERROR] BUILD > >> ERROR > >> [INFO] > >> --- > >> - > >> [INFO] Failed to resolve > >> artifact. > >> ... > >> Missing: > >> -- > >> 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > >> ... > > >> The files DO appear to be in my local repository, last updated via > >> maven yesterday at 15:20 GMT: > >> $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1- > >> SNAPSHOT/ > >> lift-util-1.1-SNAPSHOT.jar > >> lift-util-1.1-SNAPSHOT.jar.sha1 > >> lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > >> lift-util-1.1-SNAPSHOT.pom > >> lift-util-1.1-SNAPSHOT.pom.sha1 > >> lift-util-1.1-SNAPSHOT-sources.jar > >> lift-util-1.1-SNAPSHOT-sources.jar.sha1 > >> maven-metadata-scala-tools.org.snapshots.xml > >> maven-metadata-scala-tools.org.snapshots.xml.sha1 > >> maven-metadata-scala-tools.org.xml > >> resolver-status.properties > > >> Any ideas how to force maven to use the files that it was content to > >> use yesterday? > > >> Thanks, > >> Ellis --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
@marius Is there anyone around to checkup on scala-tools? DavidB doesn't monitor the lift list much these days and I'm not sure if there are any other non-American guys (I.e people who are awake now!) to take a look at the server? Cheers, Tim Sent from my iPhone On 27 Jun 2009, at 10:06, "marius d." wrote: > > try maven -o > > Marius > > On Jun 27, 11:46 am, Ellis wrote: >> Maven is suddenly refusing to compile because scala-tools.org is >> down. Can the liftweb-snapshot-1.1 POM be changed in order to let >> maven work in offline mode? >> >> Here's an excerpt of the error message when trying to run in offline >> mode: >> $ mvn -o -npu compile >> [INFO] >> NOTE: Maven is executing in offline mode. Any artifacts not already >> in >> your local >> repository will be >> inaccessible. >> ... >> [ERROR] BUILD >> ERROR >> [INFO] >> --- >> - >> [INFO] Failed to resolve >> artifact. >> ... >> Missing: >> -- >> 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT >> ... >> >> The files DO appear to be in my local repository, last updated via >> maven yesterday at 15:20 GMT: >> $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1- >> SNAPSHOT/ >> lift-util-1.1-SNAPSHOT.jar >> lift-util-1.1-SNAPSHOT.jar.sha1 >> lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated >> lift-util-1.1-SNAPSHOT.pom >> lift-util-1.1-SNAPSHOT.pom.sha1 >> lift-util-1.1-SNAPSHOT-sources.jar >> lift-util-1.1-SNAPSHOT-sources.jar.sha1 >> maven-metadata-scala-tools.org.snapshots.xml >> maven-metadata-scala-tools.org.snapshots.xml.sha1 >> maven-metadata-scala-tools.org.xml >> resolver-status.properties >> >> Any ideas how to force maven to use the files that it was content to >> use yesterday? >> >> Thanks, >> Ellis > > > --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
Follow-up on my other reply: When using the latest Flot 0.5 version, the exact same bug appears when using it with the widgets.flot module. I am absolutely certain that I am loading the correct Flot JS files (I haven't shadowed the old resource path, but instead forked the whole Flot widget library and changed all of the paths in it). This bug appears in Firefox (which is very serious) as well as in other browsers based on WebKit/ Gecko/KHTML. As can be seen here: http://bit.ly/13EEnw , the bug isn't present in the vanilla Flot library. I am at a loss to find the bug causing all this. The whole Flot widget seems to be very messy (it consists of 30% commented-away code, for instance) and I would be happy to help improve it once and for all, since I'm in need of the Flot library for a project. On Jun 27, 9:50 am, Jeppe Nejsum Madsen wrote: > dflemstr writes: > > Hello everyone involved, > > I am having a very annoying problem with the Flot widget: The > > automatically generated legend's auto-sizing feature is broken (it > > grows horizontally to the max allowed space while still adhering to > > the margin values specified, and it's not possible to create an > > external, custom legend) as demonstrated by this screenshot: > >http://bit.ly/uKE9o > > > This bug is present in 1.1-M1 as well as 1.1-SNAPSHOT, isn't caused by > > me (since it is present int he demo app) and seems to originate from > > something on the client-side (obviously). > > > Does anyone have a solution to this problem, or if not, can I make a > > fork of the widgets module, try to fix the problem, and commit it > > back? This little inconvenience removes much of the visual quality of > > plots, so a solution to it would be very much appreciated. > > I haven't looked in detail but: Is this a problem with the widget or the > Flot library? As far as I know, the widget is just a thin wrapper on top > of the Flot JS library. If it's a problem with the JS, you should > probably try to fix this upstream:http://code.google.com/p/flot/ > > /Jeppe --~--~-~--~~~---~--~~ 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: liftweb.net down now, and maven refuses to compile
try maven -o Marius On Jun 27, 11:46 am, Ellis wrote: > Maven is suddenly refusing to compile because scala-tools.org is > down. Can the liftweb-snapshot-1.1 POM be changed in order to let > maven work in offline mode? > > Here's an excerpt of the error message when trying to run in offline > mode: > $ mvn -o -npu compile > [INFO] > NOTE: Maven is executing in offline mode. Any artifacts not already in > your local > repository will be > inaccessible. > ... > [ERROR] BUILD > ERROR > [INFO] > > [INFO] Failed to resolve > artifact. > ... > Missing: > -- > 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT > ... > > The files DO appear to be in my local repository, last updated via > maven yesterday at 15:20 GMT: > $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1-SNAPSHOT/ > lift-util-1.1-SNAPSHOT.jar > lift-util-1.1-SNAPSHOT.jar.sha1 > lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated > lift-util-1.1-SNAPSHOT.pom > lift-util-1.1-SNAPSHOT.pom.sha1 > lift-util-1.1-SNAPSHOT-sources.jar > lift-util-1.1-SNAPSHOT-sources.jar.sha1 > maven-metadata-scala-tools.org.snapshots.xml > maven-metadata-scala-tools.org.snapshots.xml.sha1 > maven-metadata-scala-tools.org.xml > resolver-status.properties > > Any ideas how to force maven to use the files that it was content to > use yesterday? > > Thanks, > Ellis --~--~-~--~~~---~--~~ 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] liftweb.net down now, and maven refuses to compile
Maven is suddenly refusing to compile because scala-tools.org is down. Can the liftweb-snapshot-1.1 POM be changed in order to let maven work in offline mode? Here's an excerpt of the error message when trying to run in offline mode: $ mvn -o -npu compile [INFO] NOTE: Maven is executing in offline mode. Any artifacts not already in your local repository will be inaccessible. ... [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. ... Missing: -- 1) net.liftweb:lift-util:jar:1.1-SNAPSHOT ... The files DO appear to be in my local repository, last updated via maven yesterday at 15:20 GMT: $ ls -1 /home/ellis/.m2/repository/net/liftweb/lift-util/1.1-SNAPSHOT/ lift-util-1.1-SNAPSHOT.jar lift-util-1.1-SNAPSHOT.jar.sha1 lift-util-1.1-SNAPSHOT-javadoc.jar.lastUpdated lift-util-1.1-SNAPSHOT.pom lift-util-1.1-SNAPSHOT.pom.sha1 lift-util-1.1-SNAPSHOT-sources.jar lift-util-1.1-SNAPSHOT-sources.jar.sha1 maven-metadata-scala-tools.org.snapshots.xml maven-metadata-scala-tools.org.snapshots.xml.sha1 maven-metadata-scala-tools.org.xml resolver-status.properties Any ideas how to force maven to use the files that it was content to use yesterday? Thanks, Ellis --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
If this indeed is an upstream bug (I'll have to try to re-implement the "Flot" object with an alternate resource file to check; annoying that such things are hardcoded), then the only solution to it would be to update the flot widget to a newer version anyways, so some work needs to be done on the widget module whichever way you choose. It appears, however, that you don't have the same problem? Is this the case? Oh, and by the way, is scala-tools.org down? Maven complains about it. /dflemstr On Jun 27, 9:50 am, Jeppe Nejsum Madsen wrote: > dflemstr writes: > > Hello everyone involved, > > I am having a very annoying problem with the Flot widget: The > > automatically generated legend's auto-sizing feature is broken (it > > grows horizontally to the max allowed space while still adhering to > > the margin values specified, and it's not possible to create an > > external, custom legend) as demonstrated by this screenshot: > >http://bit.ly/uKE9o > > > This bug is present in 1.1-M1 as well as 1.1-SNAPSHOT, isn't caused by > > me (since it is present int he demo app) and seems to originate from > > something on the client-side (obviously). > > > Does anyone have a solution to this problem, or if not, can I make a > > fork of the widgets module, try to fix the problem, and commit it > > back? This little inconvenience removes much of the visual quality of > > plots, so a solution to it would be very much appreciated. > > I haven't looked in detail but: Is this a problem with the widget or the > Flot library? As far as I know, the widget is just a thin wrapper on top > of the Flot JS library. If it's a problem with the JS, you should > probably try to fix this upstream:http://code.google.com/p/flot/ > > /Jeppe --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
dflemstr writes: > Hello everyone involved, > I am having a very annoying problem with the Flot widget: The > automatically generated legend's auto-sizing feature is broken (it > grows horizontally to the max allowed space while still adhering to > the margin values specified, and it's not possible to create an > external, custom legend) as demonstrated by this screenshot: > http://bit.ly/uKE9o > > This bug is present in 1.1-M1 as well as 1.1-SNAPSHOT, isn't caused by > me (since it is present int he demo app) and seems to originate from > something on the client-side (obviously). > > Does anyone have a solution to this problem, or if not, can I make a > fork of the widgets module, try to fix the problem, and commit it > back? This little inconvenience removes much of the visual quality of > plots, so a solution to it would be very much appreciated. I haven't looked in detail but: Is this a problem with the widget or the Flot library? As far as I know, the widget is just a thin wrapper on top of the Flot JS library. If it's a problem with the JS, you should probably try to fix this upstream: http://code.google.com/p/flot/ /Jeppe --~--~-~--~~~---~--~~ 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: suggestion: I'm a brand spanking new user....some first impressions on 'getting started'
You can also look son the examples application that come with Lift in sites folder. Just get lift from github. Br's, Marius On Jun 27, 6:22 am, g-man wrote: > My path to learning was threefold: > > 1. Do the 'ToDo' app tutorial, while studying the 'PocketChange' app > from the book at the same time. > > 2. Read the Lift book. > > 3. Read David's and the 'Staircase' Scala books. > > I agree that, compared to the wealth of information, books, tutorials, > videos, etc to be found on Rails, GAE-Django, and web2py, there is far > less for Lift and Scala, but this is a young (and, in my opinion, much > more advanced) framework, so it will take time. > > Tell us what you have learned, as I am doing on the group! > > On Jun 26, 6:14 pm, Rick wrote: > > > Today is my very first day that I planned to take a serious look at Lift. > > I've coded webapps in many different frameworks and plan to do a simple > > Employee app and add my 'how to' to the site I host > > herehttp://www.learntechnology.net/content/main.jsp(whichmany of the > > examples > > there show the same application being built with different frameworks.) > > > Some users like myself might want to start by looking at an existing > > examples before going through the exact step by step as described in the > > user manual (which has a broken link to the wiki by the way -yes, I > > submitted a bug report.) > > > If I want to take that route there should be a quick way to find example > > projects with the source code. Finding these example was extremely > > tedious > > > At some point a new user might go the wiki. .. > > you get to the wiki page looking for examples.. > > you look at the content menu.. > > you might try the 'cheat sheet getting started link'... > > cheat by examples has a link 'lift by examples', but that doesn't seem to > > really show example apps? > > BY CHANCE, I happened to see in a "How To" - how to run examples (which at > > first i thought why would I click this when I haven't even seen any > > examples?), but I clicked it anyway.. > > Then on the "how to run examples' link I was excited to see a list of some > > examples (buried way to deep for a new user to find imo.) > > Yet only the war links work? None of the project links are active? > > > Finding example apps to study and learn by is seemingly very difficult to > > do. Are there any out there? If so where? > > > For new user, learning by examples is extremely important. I think a lot of > > new users will be turned off if it's difficult to find some example > > applications to study to learn from. > > > I understand all of this is open source and I plan to write a tutorial once > > I learn it, but it would be nice to find some existing apps to start with. > > > thanks for all the work done so far. > > > -- > > Rick R --~--~-~--~~~---~--~~ 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: Including jars into a liftweb project
I am trying to build a eBay-API-Application which uses eBay's Java SDK. It's in no maven repository, that's why i wanted to know how to include it manually :) But i've gone your way and created my own maven repository for this. Thanks for the great idea! I always thought creating my own maven repository is voodoo ;) This will really help me getting my third party jars organized. Thanks again! :) On Jun 26, 10:16 am, Timothy Perrett wrote: > To clarify - you only need that system path if its a JAR not in a > maven repository anywhere. What JAR are you trying to add? > > Cheers, Tim > > On Jun 26, 9:01 am, Caoyuan wrote: > > > > > On Fri, Jun 26, 2009 at 3:51 PM, Jeppe Nejsum Madsen > > wrote: > > > > On 26 Jun 2009, fbettag wrote: > > > >> Hey guys, > > > >> i was wondering how (and where) i have to put jars in my liftweb > > >> project to get them included. i know it's a beginners question, but > > >> i've been playing around all night and i couldn't get it to work. > > > > Normally, you would put jars in the WEB-INF/lib folder and they will be > > > picked up by the servlet container > > > > They need to be available at compile time too... > > > > /Jeppe > > > Usually, jar files should be put under maven's dependency management, > > but you can try to add them by adding something like the following to > > pom.xml > > > > > > > com.xxx > > com.xxx.xxx > > 4.7.1 > > system > > > > ${basedir}/src/main/webapp/WEB-INF/lib/x-4.7.1.jar > ath> > > --~--~-~--~~~---~--~~ 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] REST: Why is this returning an empty page?
Hey guys, i've been playing around with REST all night, the list, add and delete is working great so far. The problem is, that upon update, it returns me an empty page and doesn't run through the update functionality. Any ideas what the problem in my update method might be? This is what i got from the samples of the liftweb sources: object Layouts { // Register the Layouts webservice with the dispatcher def init() { LiftRules.dispatch.append(NamedPF("Layouts WebService") { case Req("layouts" :: "list" :: Nil, _, GetRequest) => () => Full(list()) case Req("layouts" :: "add" :: Nil, _, rt) if rt == GetRequest || rt == PostRequest || rt == PutRequest => () => Full(add()) case Req("layouts" :: "update" :: Nil, _, rt) if rt == GetRequest || rt == PostRequest || rt == PutRequest => () => Full(update()) case Req("layouts" :: "delete" :: Nil, _, rt) if rt == GetRequest || rt == PostRequest || rt == DeleteRequest => () => Full(delete()) }) } // List all Layouts as XML def list(): XmlResponse = XmlResponse( { Layout.findAll.map(_.toXml) } ) // extract the parameters, create the layout // return the appropriate response def add(): LiftResponse = (for { name <- S.param("name") ?~ "name parameter missing" layout <- S.param("layout") ?~ "layout content missing" language <- S.param("language") ?~ "language parameter missing" } yield { val l = Layout.create.name(name).layout(layout).language(language) l.save }) match { case Full(success) => XmlResponse() case Failure(msg, _, _) => NotAcceptableResponse(msg) case _ => NotFoundResponse() } // extract the parameters, create the layout // return the appropriate response def update(): LiftResponse = (for { id <- S.param("id") ?~ "id parameter missing" name <- S.param("name") layout <- S.param("layout") language <- S.param("language") } yield { var l = Layout.findAll(By(Layout.id, id.toLong)).first if (name != "") l.name(name) if (layout != "") l.layout(layout) if (language != "") l.language(language) l.save }) match { case Full(success) => XmlResponse() case Failure(msg, _, _) => NotAcceptableResponse(msg) case _ => NotFoundResponse() } // extract the parameters, delete the layout // return the appropriate response def delete(): LiftResponse = (for { id <- S.param("id") ?~ "id parameter missing" } yield { Layout.findAll(By(Layout.id, id.toLong)).first.delete_! }) match { case Full(success) => XmlResponse() case Failure(msg, _, _) => NotAcceptableResponse(msg) case _ => NotFoundResponse() } } The Idea is to create a Scala/Liftweb based CMS which is administrated over a jQuery Window Interface. So a user can manage everything (and see live-changes on the page) without having an extra Browser-Window for the administration interface open. Authentication isn't builtin yet tho ;) I'll get to that when the bare system is working. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---