[Lift] Re: Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread Derek Chen-Becker
Maybe I'm misunderstanding the question, too. I thought he meant having a fully valid XHTML page for a template, but re-reading it he says XML-compliant. Marc, could you clarify what you mean with an example? Thanks, Derek On Fri, Mar 13, 2009 at 6:37 PM, Charles F. Munat wrote: > > Maybe I'm

[Lift] Re: Slash and burn

2009-03-13 Thread Charles F. Munat
Sorry I didn't reply to this sooner. With /page/ I see the page I want. With /page I get a "page not found" error. Chas. Derek Chen-Becker wrote: > Hmmm. I thought that this was what normally happened with most web > servers (Jetty included). Are you using SiteMap, by any chance? What is > th

[Lift] Re: Slash and burn

2009-03-13 Thread Timothy Perrett
> It seems that Lift used to serve /folks/ when /folks was called, but > recently it stopped. It would be nice if it looked for a *file* with > that name first, but then tried directories if no file was found. Is > there a downside to that? Im afraid your mistaken about it previously having diff

[Lift] Re: Bookmarkable never-expiring dynamic pages

2009-03-13 Thread Charles F. Munat
I have a lot of pages like this, so I should probably abstract out the code... Derek Chen-Becker wrote: > There may be a better way, but your approach looks very reasonable. > > Derek > > On Fri, Mar 13, 2009 at 6:32 PM, Charles F. Munat > wrote: > > > Ha! I knew

[Lift] Re: Bookmarkable never-expiring dynamic pages

2009-03-13 Thread Derek Chen-Becker
There may be a better way, but your approach looks very reasonable. Derek On Fri, Mar 13, 2009 at 6:32 PM, Charles F. Munat wrote: > > Ha! I knew it would be simple. I should've tried that. But I was also > interested in finding out if anyone had a better idea for how to handle > this situation

[Lift] Re: Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread Charles F. Munat
Maybe I'm not understanding the question, but it is perfectly possible to ignore the template and have index.html be anything you want. I have some pages that wrap the code with other templates (I use more than one, depending on the location on the site), and pages that stand alone. And I have

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Charles F. Munat
So the you is plural... Derek Chen-Becker wrote: > Well, to give proper credit, Tyler and Kris both did a lot of initial > work on the archetype and I just fixed a few minor things. > > Derek > > On Fri, Mar 13, 2009 at 5:49 PM, Charles F. Munat > wrote: > > > OH

[Lift] Re: Bookmarkable never-expiring dynamic pages

2009-03-13 Thread Charles F. Munat
Ha! I knew it would be simple. I should've tried that. But I was also interested in finding out if anyone had a better idea for how to handle this situation (as it is very common for the kind of sites I build). Thanks, Derek. You da man. Chas. Derek Chen-Becker wrote: > I think it may be hel

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Kris Nuttycombe
Yeah... the minor things that made it work at all. :) And ScalaJPA And the whole exploration of Scala's interaction with JPA that you so thoroughly documented on the wiki, which gave me the confidence to use Lift in a major project in my company in the first place... Thank you Derek. You do rock.

[Lift] Re: Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread Derek Chen-Becker
I think I was confusing lift:ignore in there... On Fri, Mar 13, 2009 at 6:12 PM, Jorge Ortiz wrote: > Yes, if index.xhtml is a compliant XML (preferably XHTML) document, it will > just be served up as-is. The tags define transformations that > are applied to your document before it is served up

[Lift] Re: Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread Jorge Ortiz
Yes, if index.xhtml is a compliant XML (preferably XHTML) document, it will just be served up as-is. The tags define transformations that are applied to your document before it is served up. --j On Fri, Mar 13, 2009 at 3:40 PM, Marc Boschma > wrote: > > Hi Mal, > > That aspect of the lift temp

[Lift] Re: Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread Derek Chen-Becker
Well, I just tested and this seems to not be the case :( On Fri, Mar 13, 2009 at 5:47 PM, Derek Chen-Becker wrote: > I think David could better answer this (I haven't looked at this part of > the code for a while), but I think that anything outside of the > tag is tossed, so you could have a ful

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Charles F. Munat
OH HELL YEAH! THANKYOUTHANKYOUTHANKYOU. You rock. Chas. Derek Chen-Becker wrote: > OK, it built and deployed. I just confirmed that you can create it with: > > mvn archetype:generate \ >-DarchetypeRepository=http://scala-tools.org/repo-snapshots \ >-DarchetypeGroupId=net.liftweb \ >

[Lift] Re: Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread Derek Chen-Becker
I think David could better answer this (I haven't looked at this part of the code for a while), but I think that anything outside of the tag is tossed, so you could have a fully compliant XML file that will only have a portion used. Derek On Fri, Mar 13, 2009 at 5:40 PM, Marc Boschma > wrote:

[Lift] Re: Bookmarkable never-expiring dynamic pages

2009-03-13 Thread Derek Chen-Becker
I think it may be helpful to use a guard: case RewriteRequest(path @ ParsePath("bios" :: id :: _, _, _,_), _, _) if id != "index" => RewriteResponse( ParsePath("bio" :: "index" :: Nil, "", true, false),

[Lift] Re: Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread Marc Boschma
Hi Mal, That aspect of the lift templating approach also warped my head for a while, having seen so many examples of the opposite approach (PHP, JSP, etc)... There is a certain part of me that still is unsettled about it, but I can see the advantages of it. Marc Ps. can the files such as

[Lift] Bookmarkable never-expiring dynamic pages

2009-03-13 Thread Charles F. Munat
I have a lot of sites that involve dynamically-generate pages. OK, all of them do. So let's say that I have a "bios" page where I link to a bunch of individual bios (for Sam, Sally, and Sue). If Sam is user #1 and Sally and Sue are #2 and #3 respectively, I want to get to their bios like this:

[Lift] Re: Slash and burn

2009-03-13 Thread Charles F. Munat
Sorry, I've missed most of this discussion, but thank you for your responses. Hopefully, I'll be able to figure out what they mean after I get some coffee (I had a very late night working). I organize all my sites the same way. Names of items are expressed as directories. All pages are called

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Kris Nuttycombe
Excellent! On Fri, Mar 13, 2009 at 12:55 PM, Derek Chen-Becker wrote: > OK, it built and deployed. I just confirmed that you can create it with: > > mvn archetype:generate \ >    -DarchetypeRepository=http://scala-tools.org/repo-snapshots \ >    -DarchetypeGroupId=net.liftweb \ >    -DarchetypeA

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Derek Chen-Becker
OK, it built and deployed. I just confirmed that you can create it with: mvn archetype:generate \ -DarchetypeRepository=http://scala-tools.org/repo-snapshots \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-jpa-basic \ -DarchetypeVersion=1.1-SNAPSHOT Derek On F

[Lift] Re: Slash and burn

2009-03-13 Thread Timothy Perrett
Hmmm, I see your point. Will have a noodle at the weekend and see what would be the best route. Cheers, Tim On 13/03/2009 17:45, "Derek Chen-Becker" wrote: > Well, treating a directory without a trailing slash (/path) as the directory + > index (/path/index) is pretty standard behavior in web

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Derek Chen-Becker
Darnit. It helps if I make the jpa archetype a module of the master lift project. Fixing now. Derek On Fri, Mar 13, 2009 at 12:52 PM, Derek Chen-Becker wrote: > 1.0, baby! > > http://scala-tools.org/mvnsites/scalajpa/ > > I've been too busy to put up a nice blog entry on it, but it's on my todo

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Derek Chen-Becker
1.0, baby! http://scala-tools.org/mvnsites/scalajpa/ I've been too busy to put up a nice blog entry on it, but it's on my todo list :( Derek On Fri, Mar 13, 2009 at 12:47 PM, Kris Nuttycombe wrote: > > I actually haven't deployed an archetype onto a remote repository > before, but it sounds r

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Kris Nuttycombe
I actually haven't deployed an archetype onto a remote repository before, but it sounds right. Has ScalaJPA become publicly available on scala-tools yet? Kris On Fri, Mar 13, 2009 at 11:28 AM, Derek Chen-Becker wrote: > OK, I'll go ahead and merge with master. If I understand this whole proces

[Lift] Re: Slash and burn

2009-03-13 Thread Derek Chen-Becker
Well, treating a directory without a trailing slash (/path) as the directory + index (/path/index) is pretty standard behavior in web servers (Apache returns a 301 from the former to the latter), so I think something that requires less user intervention would be good. Perhaps at most we would want

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Derek Chen-Becker
OK, I'll go ahead and merge with master. If I understand this whole process correctly, Hudson should build the new project and deploy it under snapshots on scala-tools.org. At that point we should be able to use the archetype:generate -DremoteRepository=http://scala-tools.org/repo-snapshotsto gener

[Lift] Re: Slash and burn

2009-03-13 Thread Timothy Perrett
Im pretty sure you could just do this with the existing infrastructure (RewritePF and DispatchPF) For instance, if Chas doesnt mind having two seperate resources, then he can easily use RewritePF to get the same content at two resource locations. Alternatively, he could just use a 301 redirect re

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Kris Nuttycombe
Done. On Fri, Mar 13, 2009 at 10:41 AM, Derek Chen-Becker wrote: > Actually, I see that you did that against git. Can you commit your changes? > > Thanks, > > Derek > > On Fri, Mar 13, 2009 at 11:40 AM, Derek Chen-Becker > wrote: >> >> Ah, I think I missed that part of the POM. Let me fix that

[Lift] Re: Slash and burn

2009-03-13 Thread Derek Chen-Becker
I think I was confusing this with some other behavior of SiteMap, hence my question. I think it would be good to allow some really pre-processing of the URL. Would it useful to allow the user to control it, or do you think it would be better to just make it implicit? Something like LiftRules.pathR

[Lift] Re: corrections for lift book and starting with lift guide

2009-03-13 Thread Derek Chen-Becker
OK, thanks for sending this. A few things: 1. The lift book list is moderated for all new members. You should have received a message to this effect when you posted. In any case, I approved you for all future messages 2. I'll fix the error in section 1.3. I thought we had caught all o

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Derek Chen-Becker
Actually, I see that you did that against git. Can you commit your changes? Thanks, Derek On Fri, Mar 13, 2009 at 11:40 AM, Derek Chen-Becker wrote: > Ah, I think I missed that part of the POM. Let me fix that and commit the > changes and then we can re-test. > > Thanks! > > Derek > > > On Fri,

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Derek Chen-Becker
Ah, I think I missed that part of the POM. Let me fix that and commit the changes and then we can re-test. Thanks! Derek On Fri, Mar 13, 2009 at 11:11 AM, Kris Nuttycombe wrote: > > How are you installing the archetype as a plugin? After clearing out > the repo and running an install of the pl

[Lift] corrections for lift book and starting with lift guide

2009-03-13 Thread Doug H
My post didn't go through to the other group, and one issue is with the official starting with lift guide on the lift site anyway. In the lift book under section 1.3 -DarchetypeVersion=0.9 \ can be changed to 1.0 I ran the command from the book and maven downloaded scala 2.7.1 for some reason.

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Kris Nuttycombe
How are you installing the archetype as a plugin? After clearing out the repo and running an install of the plugin project, I'm not seeing it in my local archetype repository. I had to add this to the lift-archetype-jpa-basic pom.xml to get it to install: diff --git a/lift-archetype-jpa-basic/po

[Lift] Re: Slash and burn

2009-03-13 Thread Timothy Perrett
Within Lift, /page does what it says on the tin, whilst /page/ actually works out as: /page/index IMO, this is good. If you want them to be the same, I think you could either do a rewrite to the same content (if memory serves there is also a boolean option for defining if your using the sla

[Lift] Re: Slash and burn

2009-03-13 Thread David Pollak
Derek, /page is parsed to List("page") and /page/ is parsed to List("page", "index"). Unfortunately, the rewrites are applied before the sitemap is in scope, so we can't consult the sitemap during rewrite, but I think there may be a way to write a DispatchPF to intercept List(xxx) and redirect to

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Derek Chen-Becker
de...@rocky:/home/software/liftbook$ mvn -v Maven version: 2.0.9 Java version: 1.6.0_11 OS name: "linux" version: "2.6.27-11-generic" arch: "amd64" Family: "unix" This line in your output concerns me: [INFO] Using following parameters for creating OldArchetype:lift-jpa-archetype:0.11-SNAPSHOT Th

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread Kris Nuttycombe
What version of Maven are you using? I'm getting the following errors: knuttyco...@knuttycombe-ubuntu:~/tmp$ mvn -DarchetypeCatalog=local archetype:generate [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO]

[Lift] Re: Objections to merging jpa archetype?

2009-03-13 Thread David Pollak
Go for it. On Fri, Mar 13, 2009 at 3:09 PM, Derek Chen-Becker wrote: > Would anyone like to look at the jpaarchetype branch before I merge it? > > Derek > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me:

[Lift] Objections to merging jpa archetype?

2009-03-13 Thread Derek Chen-Becker
Would anyone like to look at the jpaarchetype branch before I merge it? 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

[Lift] Re: Slash and burn

2009-03-13 Thread Derek Chen-Becker
Hmmm. I thought that this was what normally happened with most web servers (Jetty included). Are you using SiteMap, by any chance? What is the difference that you see between a response for /page and /page/ ? Derek On Fri, Mar 13, 2009 at 4:33 AM, Charles F. Munat wrote: > > It would be advanta

[Lift] Re: Archetype Compile Problems

2009-03-13 Thread Derek Chen-Becker
Yes, the Maven build will use the compiler and libraries specified in the pom.xml file. That way, the compiler version is consistent for the project. You technically don't even have to have Scala installed locally just to build a project; Maven will download the proper one when needed. Derek On F

[Lift] Re: Required goal not found: archetype:generate

2009-03-13 Thread erik.fris...@googlemail.com
Hi David, thanks for the kind words. I am really glad I received so much help and got it to work eventually. I will work through the "Getting Started" now and see where it leads me ;) Again, thanks for the very good support. Erik On Mar 13, 10:04 pm, David Pollak wrote: > On Fri, Mar 13, 2009

[Lift] Re: Archetype Compile Problems

2009-03-13 Thread johannes
I tried it on a different computer now and everything worked perfectly. Now it's on me to find the differences. As there is no scala installed (no %scala_home% set) on the good one, am I wonder if the maven-scala-plugin uses its internal scala-compiler or relies on the system-wide one? Thanks for

[Lift] Re: Required goal not found: archetype:generate

2009-03-13 Thread David Pollak
On Fri, Mar 13, 2009 at 10:52 AM, erik.fris...@googlemail.com < erik.fris...@googlemail.com> wrote: > > No, its not a typo in the PDF. I just got it mixed up when typing the > query. > Just as a point of order, I'm glad that you stuck with the thread and didn't get too frustrated. I'm glad we co

[Lift] Re: Required goal not found: archetype:generate

2009-03-13 Thread erik.fris...@googlemail.com
No, its not a typo in the PDF. I just got it mixed up when typing the query. Erik On Mar 13, 1:50 pm, Derek Chen-Becker wrote: > Is that a typo in the PDF? If so, I'll fix it. > > Derek > > On Thu, Mar 12, 2009 at 2:36 PM, Alexander Kellett wrote: > > > > > Few hours of playing with maven (mult

[Lift] Slash and burn

2009-03-13 Thread Charles F. Munat
It would be advantageous for me, given the way I organize my sites, if requests for /page were served the same way as requests for /page/, or at least /page redirected to /page/. Is there an easy way to do this? Thanks, Chas. --~--~-~--~~~---~--~~ You received

[Lift] Re: Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread David Pollak
Howdy, A Snippet is the bridge between the view and Scala code. In this example: Welcome to your project! The tag refers to the HelloWorld snippet which is is some Scala code in the HelloWorld class. Note the tag. This surrounds its body with a template called "default". The default.

[Lift] Why does HelloWorld index.html contain a snippet rather than a complete XHTML page?

2009-03-13 Thread mal3
Why does HelloWorld index.html contain a snippet rather than a complete XHTML page? When I first saw the HelloWorld example I thought there must be a mistake, because the index.html file contains a snippet, while default.html contains what looked more like a complete XHTML page. Why doesn't lift

[Lift] Re: Google search results

2009-03-13 Thread lmorroni
looks like google already removed all of the sub links which is kind of a bummer because it looks nice when you have those. On Mar 12, 5:41 pm, David Bernard wrote: > It'll be done next week-end. > > On Thu, Mar 12, 2009 at 17:43, James Matlik wrote: > > Why not have those links generate 301 re