[Lift] Re: Maven skip tests

2009-08-04 Thread Indrajit Raychaudhuri

Telling maven to never fail:
mvn -fn (NEVER fail the build, regardless of project result)

Telling maven to skip test: (quite different from never failing)
mvn -Dmaven.test.skip=true

/irc

On 05/08/09 2:27 AM, Naftoli Gugenheim wrote:
>
> How do you tell maven to install even if tests fail?
>
> >

--~--~-~--~~~---~--~~
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: makeUtf8 and HttpServletRequest broken in new build???

2009-08-18 Thread Indrajit Raychaudhuri

+1 on some amount of nesting and reorganization.
For example: docs, lift-archetype-basic, lift-facebook, lift-installer
are all too different to be peers and probably can have different home
(nested) based on 'traits' :)

Cheers,
Indrajit

On Aug 18, 3:51 am, Timothy Perrett  wrote:
> They would still output the same of course ­ I just see a need for a few
> more starting points and I don¹t want to clutter the main codebase so a
> little bit of housekeeping is in order :-)
>
> Cheers, Tim
>
> On 17/08/2009 23:43, "David Pollak"  wrote:
>
> > As long as you don't mess with the Basic archetype... I'm cool.

--~--~-~--~~~---~--~~
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: Deploying

2009-08-18 Thread Indrajit Raychaudhuri

Peter,

Just adding the following section in nginx conf would be a good start.

server {
  location / {
proxy_pass http://localhost:8080/;
  }
}

There is whole page on Nginx wiki on this: 
http://wiki.nginx.org/NginxJavaServers.

Cheers,
Indrajit

On Aug 18, 6:14 am, Peter Robinett  wrote:
> Timothy,
>
> I'm just starting to learn how to use Nginx and would love to some
> pointers. How did you set up Nginx? How to do you launch your Jetty
> instances?
>
> Peter
>
> On Aug 17, 3:34 pm, Timothy Perrett  wrote:
>
> > I run several sizable applications with NGINX and Jetty... Works like a
> > dream.
>
> > On 17/08/2009 18:55, "Peter Robinett"  wrote:
>
> > > I know David likes running Nginx in front of Jetty

--~--~-~--~~~---~--~~
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: Include build # in LiftVersion?

2009-08-21 Thread Indrajit Raychaudhuri

Maven is still quite git unfriendly, unfortunately.

We used to have BuildNumber plugin (http://mojo.codehaus.org/
buildnumber-maven-plugin/create-mojo.html) in a Subversion based
project.
I don't think that works for Maven's Git SCM provider though.

Alternately, this plugin allows injecting timestamp (http://
code.google.com/p/maven-timestamp-plugin/) into manifest.mf.
This is crude, and far different from what we want (git commit hash),
but probably useful in identifying the unique build timestamp.

Thoughts?

/indrajit

On Aug 21, 12:32 pm, David Bernard  wrote:
> I don't know how to grab git fingerprint, but I can modify the pom.xml
> to add a timestamp in the Manifest
>    
> ${project.version}-${buildNumber}
>
> Are you ok ?
>
> On Wed, Aug 19, 2009 at 18:26, David
>
> Pollak wrote:
>
> > On Wed, Aug 19, 2009 at 5:44 AM, Jeppe Nejsum Madsen 
> > wrote:
>
> >> Hi,
>
> >> When living on the bleeding edge (i.e. 1.1-SNAPSHOT) it is sometimes
> >> difficult to figure out which version of lift is in use and deployed.
>
> >> LiftRules.liftVersion only returns 1-1.0-SNAPSHOT.
>
> >> I could probably try to correlate liftBuildDate with hudson and github but
> >> this seem error prone :-)
>
> >> Would it be possible to:
>
> >> 1) Include the build # in liftVersion for the snapshot release?
>
> > Right now the version number is available in the manifest file.  If you, or
> > someone else, can suggest a way grab the Git fingerprint for the build
> > release, I'm all for including that in the manifest as well.
>
> >> 2) Make it possible to identify the revision from this build #
> >> (e.g. push the hudson build tags to the github repo or something
> >> similar)?
>
> >> /Jeppe
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Include build # in LiftVersion?

2009-08-22 Thread Indrajit Raychaudhuri

Indeed, looking out in the maven land for a way out would be useful.
Meanwhile, there is an issue request for buildnumber plugin to support
GIT: http://jira.codehaus.org/browse/MOJO-1199.

However, Maven plugin for lift activities (creating boilerplate codes
- like model, snippet etc.) could be interesting.

/Indrajit


On Aug 21, 11:51 pm, Timothy Perrett  wrote:
> Perhaps its worth going to market (as it were) to check that there is either
> no single solution, nor a number of other solutions (mojos) that we could
> string together to get what we want? Im not sure that the effort involved in
> making our own is warranted given the output...
>
> Perhaps someone in the wider java/maven land has some existing effort in a
> repo someplace...
>
> Cheers, Tim
>
> On 21/08/2009 17:53, "David Pollak"  wrote:
>
> > Gaacckkk... that's the first thought that comes to mind... ;-)
>
> > Looks like our choices are:
> > - Write our own Maven plugin and/or update the BuildNumber plugin
> > - Avoid the feature
>
> > We actually have the build time already in the manifest.  I'd love to get 
> > the
> > repo and the fingerprint in there as well.
> >  

--~--~-~--~~~---~--~~
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: JPA blank archetype

2009-08-24 Thread Indrajit Raychaudhuri


Can you please set scala.version dependency to 2.7.5 in pom.xml and re-
attempt.
You can do this by looking for  element in the
pom.xml.

/Indrajit

On Aug 24, 11:06 am, "Charles F. Munat"  wrote:
> Nope. Same error, even after blowing away m2 and rerunning the basic
> archetype to create a new app.
>
> Chas.
>
> Charles F. Munat wrote:
> > No on blowing away m2. I did switch to the blank archetype (which is
> > what I actually wanted) and it worked fine. But I can try again with the
> > basic and blowing away m2.
>
> > Chas.
>
> > Derek Chen-Becker wrote:
> >> It looks like this is still the older archive before HttpServletRequest
> >> → HTTPRequest. The code in master has the change applied, so I'm not
> >> sure why it's failing. The warnings are normal (I haven't figured out
> >> all of the tricks with the velocity templating), but something isn't
> >> being pulled correctly. Have you tried blowing away your .m2?
>
> >> Derek
>
> >> On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat  >> > wrote:
>
> >>     I found this in the lift book and used it:
>
> >>     mvn archetype:generate \
> >>     -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
> >>     -DarchetypeGroupId=net.liftweb \
> >>     -DarchetypeArtifactId=lift-archetype-jpa-basic \
> >>     -DarchetypeVersion=1.1-SNAPSHOT \
> >>     -DgroupId=com.foo.jpaweb \
> >>     -DartifactId=JPADemo \
> >>     -Dversion=1.0-SNAPSHOT
>
> >>     During the creation of the basic jpa app, I got this:
>
> >>     Downloading:
> >>    http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
> >>     44K
> >>     
> >> 
> >>     downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
> >>     [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
> >>     '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
> >>     '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
> >>     Downloading:
> >>    http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
> >>     44K
> >>     
> >> 
> >>     downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
> >>     [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
> >>     '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
> >>     '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
>
> >>     And a bunch of warnings:
>
> >>     [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> >>     reference : template = archetype-resources/pom.xml [line 37,column 16] 
> >> :
> >>     ${scala.version} is not a valid reference.
> >>     [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> >>     reference : template = archetype-resources/pom.xml [line 43,column 16] 
> >> :
> >>     ${scala.version} is not a valid reference.
> >>     [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> >>     reference : template = archetype-resources/pom.xml [line 85,column 25] 
> >> :
> >>     ${scala.version} is not a valid reference.
> >>     [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
> >>     [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> >>     reference : template = archetype-resources/web/pom.xml [line 13,column
> >>     9] : ${parent.artifactId} is not a valid reference.
> >>     [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> >>     reference : template = archetype-resources/web/pom.xml [line 24,column
> >>     16] : ${pom.groupId} is not a valid reference.
> >>     [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> >>     reference : template = archetype-resources/web/pom.xml [line 26,column
> >>     16] : ${pom.version} is not a valid reference.
> >>     [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> >>     reference : template = archetype-resources/spa/pom.xml [line 14,column
> >>     9] : ${parent.artifactId} is not a valid reference.
>
> >>     The build completed successfully anyway. Afterward, I tried "mvn
> >>     compile" in the top directory and got the following error:
>
> >>     [WARNING]
> >>     
> >> /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:70:
> >>     error: type mismatch;
> >>     [WARNING]  found   :
> >>     net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]
> >>     [WARNING]  required:
> >>     net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]
> >>     [WARNING]       case null =>
> >>     Full(LiftRules.defaultLocaleCalculator(request))
> >>     [WARNING]                                                             ^
> >>     [WARNING]
> >>     
> >> /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:75:
> >>     error: type mismatch;
> >>     [WARNING]  found   :
> >>     (net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]) =>

[Lift] Re: JPA blank archetype

2009-08-24 Thread Indrajit Raychaudhuri

Charles,

Sorry for the false noise, setting lift-core dependency to
1.1-M4 instead of  1.1-SNAPSHOT
in web/pom.xml quite likely would help better.

/Indrajit

NB: I have had created a lift jpa project internally and played with
it for sometime. It took a while to filter out the exact delta wrt the
barebone archetype. Hope this helps.

On Aug 24, 1:49 pm, "Charles F. Munat"  wrote:
> Hi, Marius...
>
> I don't know what you mean by "Are you using master?" What I did was use
> the Maven archetype to create a basic JPA lift app. Then I changed
> directory to the top directory and ran "mvn compile." That's it. I got
> the errors you see. I didn't do anything else.
>
> I've tried blowing away .m2 and I've tried changing the scala version to
> 2.7.5 (from 2.7.4). No difference.
>
> Does the basic JPA lift app not compile until you do something else to
> it? The blank one worked fine. Can you create and compile the Basic JPA
> app on your machine without error? Maybe it's something on my machine,
> but everything else is working fine.
>
> The Maven command I used is reproduced below.
>
> Chas.
>
> marius d. wrote:
> > Charles,
>
> > AFAIK I removed all dependencies to javax.servlet.* classes even from
> > archetypes.  Are you using master? ... I did a full search and servlet
> > things are not being used. The archetype looks ok to me ... Am I
> > missing something?
>
> > Br's,
> > Marius
>
> > On Aug 24, 9:06 am, "Charles F. Munat"  wrote:
> >> Nope. Same error, even after blowing away m2 and rerunning the basic
> >> archetype to create a new app.
>
> >> Chas.
>
> >> Charles F. Munat wrote:
> >>> No on blowing away m2. I did switch to the blank archetype (which is
> >>> what I actually wanted) and it worked fine. But I can try again with the
> >>> basic and blowing away m2.
> >>> Chas.
> >>> Derek Chen-Becker wrote:
>  It looks like this is still the older archive before HttpServletRequest
>  → HTTPRequest. The code in master has the change applied, so I'm not
>  sure why it's failing. The warnings are normal (I haven't figured out
>  all of the tricks with the velocity templating), but something isn't
>  being pulled correctly. Have you tried blowing away your .m2?
>  Derek
>  On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat   > wrote:
>      I found this in the lift book and used it:
>      mvn archetype:generate \
>      -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
>      -DarchetypeGroupId=net.liftweb \
>      -DarchetypeArtifactId=lift-archetype-jpa-basic \
>      -DarchetypeVersion=1.1-SNAPSHOT \
>      -DgroupId=com.foo.jpaweb \
>      -DartifactId=JPADemo \
>      -Dversion=1.0-SNAPSHOT
>      During the creation of the basic jpa app, I got this:
>      Downloading:
>     
>  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
>      44K
>      
>  
>      downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
>      [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
>      '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
>      '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
>      Downloading:
>     
>  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
>      44K
>      
>  
>      downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
>      [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
>      '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
>      '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
>      And a bunch of warnings:
>      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
>      reference : template = archetype-resources/pom.xml [line 37,column 
>  16] :
>      ${scala.version} is not a valid reference.
>      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
>      reference : template = archetype-resources/pom.xml [line 43,column 
>  16] :
>      ${scala.version} is not a valid reference.
>      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
>      reference : template = archetype-resources/pom.xml [line 85,column 
>  25] :
>      ${scala.version} is not a valid reference.
>      [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
>      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
>      reference : template = archetype-resources/web/pom.xml [line 
>  13,column
>      9] : ${parent.artifactId} is not a valid reference.
>      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
>      reference : template = archetype-resources/web/pom.xml [line 
>  24,colum

[Lift] Re: JPA blank archetype

2009-08-24 Thread Indrajit Raychaudhuri

Tim,

Quite likely he is effectively on *latest* 1.1-SNAPSHOT as he used -
DarchetypeVersion=1.1-SNAPSHOT during archetype:create.

Would look forward to the archetype refactoring.
Meanwhile, I have created an issue summarizing the observations in
http://github.com/dpp/liftweb/issues/#issue/52. Would be great if they
can be addressed.

/Indrajit

On Aug 24, 2:02 pm, Timothy Perrett  wrote:
> Chas,
>
> Marius means are you using the *latest* 1.1-SNAPSHOT?
>
> I have some works to do on the maven archetypes in the next couple of days
> so I'll make sure they are all working correctly when I do the code
> refactoring.
>
> Cheers, Tim
>
> On 24/08/2009 09:49, "Charles F. Munat"  wrote:
>
>
>
> > Hi, Marius...
>
> > I don't know what you mean by "Are you using master?" What I did was use
> > the Maven archetype to create a basic JPA lift app. Then I changed
> > directory to the top directory and ran "mvn compile." That's it. I got
> > the errors you see. I didn't do anything else.
>
> > I've tried blowing away .m2 and I've tried changing the scala version to
> > 2.7.5 (from 2.7.4). No difference.
>
> > Does the basic JPA lift app not compile until you do something else to
> > it? The blank one worked fine. Can you create and compile the Basic JPA
> > app on your machine without error? Maybe it's something on my machine,
> > but everything else is working fine.
>
> > The Maven command I used is reproduced below.
>
> > Chas.
>
> > marius d. wrote:
> >> Charles,
>
> >> AFAIK I removed all dependencies to javax.servlet.* classes even from
> >> archetypes.  Are you using master? ... I did a full search and servlet
> >> things are not being used. The archetype looks ok to me ... Am I
> >> missing something?
>
> >> Br's,
> >> Marius
>
> >> On Aug 24, 9:06 am, "Charles F. Munat"  wrote:
> >>> Nope. Same error, even after blowing away m2 and rerunning the basic
> >>> archetype to create a new app.
>
> >>> Chas.
>
> >>> Charles F. Munat wrote:
>  No on blowing away m2. I did switch to the blank archetype (which is
>  what I actually wanted) and it worked fine. But I can try again with the
>  basic and blowing away m2.
>  Chas.
>  Derek Chen-Becker wrote:
> > It looks like this is still the older archive before HttpServletRequest
> > → HTTPRequest. The code in master has the change applied, so I'm not
> > sure why it's failing. The warnings are normal (I haven't figured out
> > all of the tricks with the velocity templating), but something isn't
> > being pulled correctly. Have you tried blowing away your .m2?
> > Derek
> > On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat  > > wrote:
> > I found this in the lift book and used it:
> > mvn archetype:generate \
> > -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
> > -DarchetypeGroupId=net.liftweb \
> > -DarchetypeArtifactId=lift-archetype-jpa-basic \
> > -DarchetypeVersion=1.1-SNAPSHOT \
> > -DgroupId=com.foo.jpaweb \
> > -DartifactId=JPADemo \
> > -Dversion=1.0-SNAPSHOT
> > During the creation of the basic jpa app, I got this:
> > Downloading:
>
> >http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
> > 44K
>
> > 
> > downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
> > [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
> > '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
> > '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
> > Downloading:
>
> >http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
> > 44K
>
> > 
> > downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
> > [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
> > '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
> > '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
> > And a bunch of warnings:
> > [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> > reference : template = archetype-resources/pom.xml [line 37,column 
> > 16]
> > :
> > ${scala.version} is not a valid reference.
> > [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> > reference : template = archetype-resources/pom.xml [line 43,column 
> > 16]
> > :
> > ${scala.version} is not a valid reference.
> > [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> > reference : template = archetype-resources/pom.xml [line 85,column 
> > 25]
> > :
> > ${scala.version} is not a valid reference.
> > [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
> >   

[Lift] Re: Include build # in LiftVersion?

2009-08-24 Thread Indrajit Raychaudhuri

Tim,

Great to know, this would be wonderful.
Grails can be a good reference. Not all grails idioms have direct
analogy though.

/Indrajit


On Aug 23, 4:15 pm, Timothy Perrett  wrote:
> Indrajit,
>
> We actually discussed this a while back for the installers, and the
> long term plan is still that we do something like this to speed the
> getting started process if you know of any generation plugins that
> could potentially serve as a starting point that would be great!
>
> This stuff is certainly on the radar, but as always its a case of time
> and resources :-)
>
> Cheers, Tim
>
> On Aug 22, 2:48 pm, Indrajit Raychaudhuri  wrote:
>
> > Indeed, looking out in the maven land for a way out would be useful.
> > Meanwhile, there is an issue request for buildnumber plugin to support
> > GIT:http://jira.codehaus.org/browse/MOJO-1199.
>
> > However, Maven plugin for lift activities (creating boilerplate codes
> > - like model, snippet etc.) could be interesting.
>
> > /Indrajit
>
> > On Aug 21, 11:51 pm, Timothy Perrett  wrote:
>
> > > Perhaps its worth going to market (as it were) to check that there is 
> > > either
> > > no single solution, nor a number of other solutions (mojos) that we could
> > > string together to get what we want? Im not sure that the effort involved 
> > > in
> > > making our own is warranted given the output...
>
> > > Perhaps someone in the wider java/maven land has some existing effort in a
> > > repo someplace...
>
> > > Cheers, Tim
>
> > > On 21/08/2009 17:53, "David Pollak"  wrote:
>
> > > > Gaacckkk... that's the first thought that comes to mind... ;-)
>
> > > > Looks like our choices are:
> > > > - Write our own Maven plugin and/or update the BuildNumber plugin
> > > > - Avoid the feature
>
> > > > We actually have the build time already in the manifest.  I'd love to 
> > > > get the
> > > > repo and the fingerprint in there as well.
> > > >  

--~--~-~--~~~---~--~~
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: JPA blank archetype

2009-08-24 Thread Indrajit Raychaudhuri

Chas,

The problem is quite likely with the archetype jar in the scala-tools
repo. Derek is probably looking into it.
Yes, your being confused about the master reference is
understandable :)

Good that it compiles through. For now, you can set the dependencies
to lift-core and lift-jpa to 1.1-M4 and proceed merrily.

Cheers, Indrajit

On Aug 24, 11:09 pm, "Charles F. Munat"  wrote:
> I'm on a new laptop. I didn't do any git pulls of Lift stuff. I just
> installed Scala with the IZ installer and then Maven, then I ran the
> archetype command to create a basic JPA app and let it build the m2
> repository on my machine. When that didn't work, I blew away m2 and
> tried it again.
>
> Changing the lift-core dependency worked. So the problem is definitely
> with 1.1-SNAPSHOT -- at least the one I ended up with.
>
> Does this make sense? Do you see why I was confused by your reference to
> master?
>
> Chas.
>
> marius d. wrote:
> > What I means is if you did a git pull from git master and ran mvn
> > clean:clean install. That inherently means version 1.1-SNAPSHOT
>
> > Br's,
> > marius
>
> > On Aug 24, 11:49 am, "Charles F. Munat"  wrote:
> >> Hi, Marius...
>
> >> I don't know what you mean by "Are you using master?" What I did was use
> >> the Maven archetype to create a basic JPA lift app. Then I changed
> >> directory to the top directory and ran "mvn compile." That's it. I got
> >> the errors you see. I didn't do anything else.
>
> >> I've tried blowing away .m2 and I've tried changing the scala version to
> >> 2.7.5 (from 2.7.4). No difference.
>
> >> Does the basic JPA lift app not compile until you do something else to
> >> it? The blank one worked fine. Can you create and compile the Basic JPA
> >> app on your machine without error? Maybe it's something on my machine,
> >> but everything else is working fine.
>
> >> The Maven command I used is reproduced below.
>
> >> Chas.
>
> >> marius d. wrote:
> >>> Charles,
> >>> AFAIK I removed all dependencies to javax.servlet.* classes even from
> >>> archetypes.  Are you using master? ... I did a full search and servlet
> >>> things are not being used. The archetype looks ok to me ... Am I
> >>> missing something?
> >>> Br's,
> >>> Marius
> >>> On Aug 24, 9:06 am, "Charles F. Munat"  wrote:
>  Nope. Same error, even after blowing away m2 and rerunning the basic
>  archetype to create a new app.
>  Chas.
>  Charles F. Munat wrote:
> > No on blowing away m2. I did switch to the blank archetype (which is
> > what I actually wanted) and it worked fine. But I can try again with the
> > basic and blowing away m2.
> > Chas.
> > Derek Chen-Becker wrote:
> >> It looks like this is still the older archive before HttpServletRequest
> >> → HTTPRequest. The code in master has the change applied, so I'm not
> >> sure why it's failing. The warnings are normal (I haven't figured out
> >> all of the tricks with the velocity templating), but something isn't
> >> being pulled correctly. Have you tried blowing away your .m2?
> >> Derek
> >> On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat  >> > wrote:
> >>     I found this in the lift book and used it:
> >>     mvn archetype:generate \
> >>     -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
> >>     -DarchetypeGroupId=net.liftweb \
> >>     -DarchetypeArtifactId=lift-archetype-jpa-basic \
> >>     -DarchetypeVersion=1.1-SNAPSHOT \
> >>     -DgroupId=com.foo.jpaweb \
> >>     -DartifactId=JPADemo \
> >>     -Dversion=1.0-SNAPSHOT
> >>     During the creation of the basic jpa app, I got this:
> >>     Downloading:
> >>    
> >> http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
> >>     44K
> >>     
> >> 
> >>     downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
> >>     [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local 
> >> =
> >>     '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
> >>     '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
> >>     Downloading:
> >>    
> >> http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
> >>     44K
> >>     
> >> 
> >>     downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
> >>     [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local 
> >> =
> >>     '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
> >>     '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
> >>     And a bunch of warnings:
> >>     [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> >>     reference : template = archetype-resources/pom.xml [line 37,column 
> >> 16] :
> >>     ${scala.version} is not a valid ref

[Lift] Re: JetBrains IntelliJ IDEA integration

2009-08-26 Thread Indrajit Raychaudhuri

I have found generating IDEA project (*.ipr) and module (*.iml) files
with mvn idea:idea to be more consistent. It would take care of
downloading the required jars.
You can then proceed and open the project with IDEA. Newer versions
might ask if you want to move to new project format which you can
answer in affirmative.

To Jetbrain's credit, IDEA 9 (still in EAP) does better job of
handling pom.xml though.

Cheers, Indrajit

On Aug 26, 1:42 pm, Ilya Sergey  wrote:
> Hello.
>
> Normally, there must be no problems, if you point to the existing pom.xml
> file as a project file (File -> New Project etc.). All libraries should be
> fetched form the repository automatically. What build of IDEA do you use?
>
> Cheers,
> Ilya
>
> 2009/8/26 Dorinel 
>
>
>
> > I've managed to create simple scala projects in Intellij IDEA, but
> > when I try to import an existing lift pom.xml file I fail.
> > It seems that all the libraries from pom.xml are not added to the
> > project and all the lift classes used in project are marked as syntax
> > errors.
> > Have anybody managed to add pom.xml to IDEA?
> > Also is there a way to download necessary liftweb jars manually to add
> > them manually to the project as libraries?

--~--~-~--~~~---~--~~
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: Codebase Organization...

2009-08-26 Thread Indrajit Raychaudhuri

Tim,

sites to examples, certainly. For consistency lift-examples could be
better.
Some examples becoming archetype is great idea.

Cheers, Indrajit

On Aug 26, 2:59 pm, Timothy Perrett  wrote:
> To clarify, only some of the examples will become archetypes... Not all.
>
> On 26/08/2009 10:39, "Timothy Perrett"  wrote:
>
>
>
> > Chaps,
>
> > Any objections to me renaming "sites" to examples?
>
> > Moreover, I want to move some of these so called "examples" to be
> > archetypes as it strikes me that they are better starting points than
> > anything else (e.g. HTTP Auth, PayPal etc)
>
> > Thoughts?
>
> > Cheers, Tim

--~--~-~--~~~---~--~~
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: XHTML gotchas

2009-08-26 Thread Indrajit Raychaudhuri

It should be invalid for  in any mode of XHTML (strict,
transitional) or HTML4 whatever you choose.

 is an inline element that was never meant to support a block
level element (,  etc.)

Browsers nowadays are very smart to render anything you throw at it
gracefully but that cannot be a license to generate semantically
invalid content intentionally. It's best to avoid. If not anything
else, the CSS designer would have hard time with layouts et al.

Yes, W3C validator often gets erratic, but that isn't the case here.

Cheers, Indrajit

On Aug 26, 10:27 pm, David Pollak 
wrote:
> On Wed, Aug 26, 2009 at 9:12 AM, Peter Robinett 
> wrote:
>
>
>
> > Would it be too complicated to let the developer choose (perhaps in
> > Boot.scala) whether they want a strict mode?
>
> Even transitional mode has these restrictions
>
>
>
>
>
> > Peter Robinett
>
> > On Aug 26, 8:20 am, David Pollak 
> > wrote:
> > > Folks,
> > > I've been working on the XHTML validation stuff for Lift.  Basically, you
> > > can, in dev mode, turn on validation and you'll get an "error box" at the
> > > bottom of each screen that has a validation error as well as an error in
> > the
> > > console.
>
> > > I've found that a fair number of constructs that work in browsers fail
> > > validation.
>
> > > For example:
>
> > > ...
>
> > > fails validation (no blocks in a span and form is a block).
>
> > > 
> > > 
> > > 
>
> > > fails validation (sub-tags of form must be blocks.)
>
> > > Is this right?  Is it worthwhile to add W3C validation when these
> > constructs
> > > are allowed by browsers?
>
> > > Thanks,
>
> > > David
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Git some:http://github.com/dpp
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Overriding widgets stylesheets

2009-08-30 Thread Indrajit Raychaudhuri

4. Additionally, you have to add this in Boot environment. Often we
end up missing out on this step, or don't get the pattern right :)

ResourceServer.allow {
  case _ :: "style.css" :: Nil => true
}

Of course, you can narrow the PF argument to better adjust to the
need.

Cheers, Indrajit


On Aug 27, 9:06 pm, Marius  wrote:
> Someone encountered the problem where he couldn't override the
> stylesheet used by some widget. Damn I can't find any more that
> thread ...
>
> Anyways here it is:
>
> 1. Include the widget in your application say monthview.
> 2. The url to the stylesheet is: /classpath/calendars/monthview/
> style.css
> 3. In order to override this put your changed style.css in WEB-INF/
> classes/toserve/calendars/monthview/style.css
>
> This works for me.
>
> Br's,
> Marius

--~--~-~--~~~---~--~~
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: Overriding widgets stylesheets

2009-08-30 Thread Indrajit Raychaudhuri

Oops, I didn't follow that this is about the bundled
CalendarMonthView.

I stand corrected, ResourceServer.allow {} isn't necessary because
CalendarMonthlyView.init does the needful.

Cheers, Indrajit

On Aug 30, 9:32 pm, "marius d."  wrote:
> No you don't have to do this because In Boot you are already calling
> CalendarMonthlyView.init
>
> Br's,
> Marius
>
> On Aug 30, 7:22 pm, Indrajit Raychaudhuri  wrote:
>
> > 4. Additionally, you have to add this in Boot environment. Often we
> > end up missing out on this step, or don't get the pattern right :)
>
> > ResourceServer.allow {
> >   case _ :: "style.css" :: Nil => true
>
> > }
>
> > Of course, you can narrow the PF argument to better adjust to the
> > need.
>
> > Cheers, Indrajit
>
> > On Aug 27, 9:06 pm, Marius  wrote:
>
> > > Someone encountered the problem where he couldn't override the
> > > stylesheet used by some widget. Damn I can't find any more that
> > > thread ...
>
> > > Anyways here it is:
>
> > > 1. Include the widget in your application say monthview.
> > > 2. The url to the stylesheet is: /classpath/calendars/monthview/
> > > style.css
> > > 3. In order to override this put your changed style.css in WEB-INF/
> > > classes/toserve/calendars/monthview/style.css
>
> > > This works for me.
>
> > > Br's,
> > > Marius

--~--~-~--~~~---~--~~
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: what's in Classpath?

2009-08-30 Thread Indrajit Raychaudhuri

All that you see under "src/main/resources/toserve" are available via
"/classpath" prefix.
Specifically, you would be interested in the "toserve" path under lift-
webkit and lift-widgets.

The ones bundled with lift-webkit are available with "zero config",
just refer to them via "/classpath/..." in your templates.

The ones bundled with lift-widgets are part of widget libraries and
you need to initialize the widget via .init in Boot
environment _before_ you can refer to them via "/classpath/..." in
your templates. Lift widgets are available under net.liftweb.widgets._

Cheers, Indrajit

On Aug 31, 7:37 am, g-man  wrote:
> How can we know what is included in Lift's classpath for javascript
> and css files?
>
> I see src="/classpath/jquery.js" and src="/classpath/json.js" in the
> example template, and even  and
> .
>
> Where can I see exactly what we are getting 'for free', so I will know
> what I have to load explicitly into html?
>
> Thanks as always!
--~--~-~--~~~---~--~~
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: Ajax in ToDo application hanging

2009-09-01 Thread Indrajit Raychaudhuri

Additionally, you need to adjust the Boot.scala

1. Add: import _root_.net.liftweb.http.provider._

2. Remove: all of import _root_.javax.servlet.http._

3 Change the req argument type in makeUtf8 to HTTPRequest instead of
HttpServletRequest so that the signature looks thus:
private def makeUtf8(req: HTTPRequest) {...}

Cheers, Indrajit

On Sep 1, 1:19 pm, Dorinel  wrote:
> After updating I have this error:
>
> =
> [INFO] use java command with args in file forced : false
> /home/dorin/work/todo/src/main/scala/bootstrap/liftweb/Boot.scala:42:
> error: type mismatch;
>  found   : (javax.servlet.http.HttpServletRequest) => Unit
>  required: (net.liftweb.http.provider.HTTPRequest) => Any
>     LiftRules.early.append(makeUtf8)
>                            ^
> one error found
> =
> I've added  tag to  without removing old one
> and haven't changed anything in 
>
> On Aug 28, 7:19 am, David Pollak 
> wrote:
>
> > On Thu, Aug 27, 2009 at 6:24 PM, Dorinel  wrote:
>
> > > Is there a way to update ToDo application to use 1.1-SNAPSHOT?
>
> > Edit your pom.xml file.
>
> > Change the Scala version to 2.7.5.  Change the net.liftweb dependencies to
> > 1.1-SNAPSHOT and make sure the  tag contains:
>
> >     
> >       scala-tools.org.snapshots
> >       Scala-Tools Maven2 Repository for Snapshots
> >       http://scala-tools.org/repo-snapshots
> >       
> >     
>
> [skip]
--~--~-~--~~~---~--~~
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: Mapper and Primary Keys

2009-09-02 Thread Indrajit Raychaudhuri

Som,

1. Your source code had dbAutoGenerated_?. The actual function is
dbAutogenerated_? (g is in lower case).
Hope you have the right case for 'g' one :)

2. If your project model (pom.xml) has lift versions set to 1.1-
SNAPSHOT, you must be on the master and thus on the latest code.
FWIW, dbAutoGenerated_? is part of the trait BaseMappedField in lift-
mapper

Verify if both things are in order at give it another spin :)

Cheers, Indrajit

On Sep 2, 7:29 pm, Somindra  Bhattacharya  wrote:
> Hi again,
>
> I just wanted to mention that I cannot override dbAutogenerated_?. I
> get the following error:
>
> error: method dbAutogenerated_? overrides nothing
>     override def dbAutogenerated_? = false
>
> Looks to me that I am not using the latest framework code. How do I
> verify this?
>
> Thanks,
> Som
>
> On Sep 2, 2:24 pm, Somindra  Bhattacharya  wrote:
>
> > On Jul 30, 3:36 am, David Pollak 
> > wrote:
>
> > > I had to add a property on MappedField for dbGenerated_? which has to be 
> > > set
> > > to false.
>
> > > Here's the change set and the revised, working (wait for an hour for 
> > > Hudson
> > > to build the new code) version.
>
> > > On Wed, Jul 29, 2009 at 1:26 PM, Peter Robinett 
> > > wrote:
>
> > Hi,
>
> > I am new to programming for the Web and Lift is the first web
> > framework I am using. Therefore, please excuse me if my questions seem
> > naive.
>
> > I have the same problem that Peter was facing. David, I looked through
> > your diff and tried making similar changes to my model class. However,
> > the primary key is still empty in the database.
>
> > Here is the class that I have defined:
>
> > class MJData extends KeyedMapper[String,MJData]
> > {
> >   def getSingleton = MJData
>
> >   override def primaryKeyField = uid
>
> >   object uid extends MappedStringIndex[MJData](this,128)
> >   {
> >     override def writePermission_? = true
> >     override def dbDisplay_? = true
> > //    override def dbAutoGenerated_? = false //commented because it
> > does not compile
>
> >     override lazy val defaultValue = "11232312" // any string for
> > now...
>
> >     private var myDirty_? = false
> >     override protected def dirty_?(b: Boolean) = myDirty_? = b
> >     override def dirty_? = myDirty_?
> >   }
>
> > After looking at the pom.xml that Peter had posted, I upgraded to the
> > 1.1-SNAPSHOT. Is there something else that I need to do?
>
> > Another question:
>
> > >  (wait for an hour for Hudson
> > > to build the new code) version.
>
> > What does this mean? I am using Maven and I am assuming that it will
> > "pull" any new changes to the framework.
>
> > Thanks for reading.
>
> > Regards,
> > Som
--~--~-~--~~~---~--~~
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: Lift and Cappuccino integration... a first step

2009-09-04 Thread Indrajit Raychaudhuri

Great stuff. Now how about an archetype for this?

Cheers, Indrajit

On Sep 4, 3:10 am, David Pollak  wrote:
> Folks,
>
> Hearkening back to my NextStep days, I took a dive into Cappuccino today.
> Yep... Obj-J is just like Obj-C and Cappuccino faithfully captures AppKit
> goodness.
>
> I've integrated Lift with Cappuccino.  The integration points are as
> follows:
>
>    1. A Lift application serves the Cappuccino application.  This means that
>    one could mix a "web style" Lift based app with a could of "app style"
>    Cappuccino-based application pages.
>    2. Cappuccino can initiate calls to Lift via Ajax.  The call from Cap
>    looks like: performAjaxCall([input stringValue]); where there's been a
>    binding a Lift JSON message handler to the performAjaxCall function.  The
>    binding looks like:
>    Script(
>        Function("performAjaxCall", List("param"), JsonVar.is._1("hello",
>    JsVar("param"))) &
>        JsonVar.is._2)
>    3. Lift can initiate calls into a Cappuccino app via Lift's Comet
>    support.  Here's the Lift code that's necessary to create a clock that 
> ticks
>    every 3 seconds in the Cap app:
>      override def highPriority = {
>        case 'Ping =>
>          partialUpdate(currentTime)
>          ActorPing.schedule(this, 'Ping , 3 seconds)
>      }
>
>      def currentTime: JsCmd = JsRaw("clockCallback("+(""+now).encJs+");")
>    Plus the following line that must appear in the page that contains the
>    Cap app:
>    
>
> A running version of the Lift/Cappuccino integrated app can be found 
> athttp://frothy.liftweb.net/
>
> The source can be found athttp://github.com/dpp/Frothy/tree/master (please
> don't laugh at/vomit on my ObjJ code... it's been 15 years since I did
> ObjC).
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift and Cappuccino integration... a first step

2009-09-05 Thread Indrajit Raychaudhuri

Yes, that makes sense. Apart from the usual configuration and filtering 
activities, downloading and merging the Cappuccino stuff during 
archetype:generate could be interesting addition.

Cheers, Indrajit


On 05/09/09 1:31 AM, Timothy Perrett wrote:
>
> Right now there is *a lot* of deep changes going on in the capp
> codebase... IMHO, lets wait until 0.8 is released then make an
> archetype against that.
>
> Cheers, Tim
>
>
> On 4 Sep 2009, at 09:39, Indrajit Raychaudhuri wrote:
>
>>
>> Great stuff. Now how about an archetype for this?
>>
>> Cheers, Indrajit
>>
>> On Sep 4, 3:10 am, David Pollak  wrote:
>>> Folks,
>>>
>>> Hearkening back to my NextStep days, I took a dive into Cappuccino
>>> today.
>>> Yep... Obj-J is just like Obj-C and Cappuccino faithfully captures
>>> AppKit
>>> goodness.
>>>
>>> I've integrated Lift with Cappuccino.  The integration points are as
>>> follows:
>>>
>>> 1. A Lift application serves the Cappuccino application.  This
>>> means that
>>> one could mix a "web style" Lift based app with a could of "app
>>> style"
>>> Cappuccino-based application pages.
>>> 2. Cappuccino can initiate calls to Lift via Ajax.  The call
>>> from Cap
>>> looks like: performAjaxCall([input stringValue]); where there's
>>> been a
>>> binding a Lift JSON message handler to the performAjaxCall
>>> function.  The
>>> binding looks like:
>>> Script(
>>> Function("performAjaxCall", List("param"), JsonVar.is._1
>>> ("hello",
>>> JsVar("param")))&
>>> JsonVar.is._2)
>>> 3. Lift can initiate calls into a Cappuccino app via Lift's Comet
>>> support.  Here's the Lift code that's necessary to create a
>>> clock that ticks
>>> every 3 seconds in the Cap app:
>>>   override def highPriority = {
>>> case 'Ping =>
>>>   partialUpdate(currentTime)
>>>   ActorPing.schedule(this, 'Ping , 3 seconds)
>>>   }
>>>
>>>   def currentTime: JsCmd = JsRaw("clockCallback("+(""+now).encJs
>>> +");")
>>> Plus the following line that must appear in the page that
>>> contains the
>>> Cap app:
>>> 
>>>
>>> A running version of the Lift/Cappuccino integrated app can be
>>> found athttp://frothy.liftweb.net/
>>>
>>> The source can be found athttp://github.com/dpp/Frothy/tree/master
>>> (please
>>> don't laugh at/vomit on my ObjJ code... it's been 15 years since I
>>> did
>>> ObjC).
>>>
>>> Thanks,
>>>
>>> David
>>>
>>> --
>>> Lift, the simply functional web frameworkhttp://liftweb.net
>>> Beginning Scalahttp://www.apress.com/book/view/1430219890
>>> Follow me:http://twitter.com/dpp
>>> Git some:http://github.com/dpp
>>>
>>
>
>
> >

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift and Cappuccino integration... a first step

2009-09-05 Thread Indrajit Raychaudhuri

Indeed. it's important for Lift archetypes to be able to 'pull' the
prerequisites from 'known places' (great if available in a maven repo,
explicitly fetch otherwise).
This Cappuccino archetype presents a scenario where we would certainly
have to do this.

Licensing being one strong reason, the other two being weaker coupling
on versions and lightening up Lift's codebase by avoiding additional
'payload' within.

IMHO, we might even go all the way and have Lift follow similar
strategy even withing it's framework licensing or no licensing.
Particularly for JS and CSS libraries instead of having them (a)
'bloat' the codebase and (b) force Lift as a framework be responsible
by default for version updates (bug and security fixes) of these
libraries.

Cheers, Indrajit


On Sep 5, 6:58 pm, David Pollak  wrote:
> I think we'll have to do the archetype outside of the main Lift
> repository/distribution (although it would still be available on Maven).
>  Cappuccino has a ton of LGPL code in it and itself is LGPL.  I'd rather not
> mix licensing models in the stuff we keep in the main Lift repository.
>
> On Sat, Sep 5, 2009 at 3:47 AM, Indrajit Raychaudhuri
> wrote:
>
>
>
>
>
> > Yes, that makes sense. Apart from the usual configuration and filtering
> > activities, downloading and merging the Cappuccino stuff during
> > archetype:generate could be interesting addition.
>
> > Cheers, Indrajit
>
> > On 05/09/09 1:31 AM, Timothy Perrett wrote:
>
> > > Right now there is *a lot* of deep changes going on in the capp
> > > codebase... IMHO, lets wait until 0.8 is released then make an
> > > archetype against that.
>
> > > Cheers, Tim
>
> > > On 4 Sep 2009, at 09:39, Indrajit Raychaudhuri wrote:
>
> > >> Great stuff. Now how about an archetype for this?
>
> > >> Cheers, Indrajit
>
> > >> On Sep 4, 3:10 am, David Pollak  wrote:
> > >>> Folks,
>
> > >>> Hearkening back to my NextStep days, I took a dive into Cappuccino
> > >>> today.
> > >>> Yep... Obj-J is just like Obj-C and Cappuccino faithfully captures
> > >>> AppKit
> > >>> goodness.
>
> > >>> I've integrated Lift with Cappuccino.  The integration points are as
> > >>> follows:
>
> > >>>     1. A Lift application serves the Cappuccino application.  This
> > >>> means that
> > >>>     one could mix a "web style" Lift based app with a could of "app
> > >>> style"
> > >>>     Cappuccino-based application pages.
> > >>>     2. Cappuccino can initiate calls to Lift via Ajax.  The call
> > >>> from Cap
> > >>>     looks like: performAjaxCall([input stringValue]); where there's
> > >>> been a
> > >>>     binding a Lift JSON message handler to the performAjaxCall
> > >>> function.  The
> > >>>     binding looks like:
> > >>>     Script(
> > >>>         Function("performAjaxCall", List("param"), JsonVar.is._1
> > >>> ("hello",
> > >>>     JsVar("param")))&
> > >>>         JsonVar.is._2)
> > >>>     3. Lift can initiate calls into a Cappuccino app via Lift's Comet
> > >>>     support.  Here's the Lift code that's necessary to create a
> > >>> clock that ticks
> > >>>     every 3 seconds in the Cap app:
> > >>>       override def highPriority = {
> > >>>         case 'Ping =>
> > >>>           partialUpdate(currentTime)
> > >>>           ActorPing.schedule(this, 'Ping , 3 seconds)
> > >>>       }
>
> > >>>       def currentTime: JsCmd = JsRaw("clockCallback("+(""+now).encJs
> > >>> +");")
> > >>>     Plus the following line that must appear in the page that
> > >>> contains the
> > >>>     Cap app:
> > >>>     
>
> > >>> A running version of the Lift/Cappuccino integrated app can be
> > >>> found athttp://frothy.liftweb.net/
>
> > >>> The source can be found athttp://github.com/dpp/Frothy/tree/master
> > >>> (please
> > >>> don't laugh at/vomit on my ObjJ code... it's been 15 years since I
> > >>> did
> > >>> ObjC).
>
> > >>> Thanks,
>
> > >>> David
>
> > >>> --
> > >>> Lift, the simply functional web frameworkhttp://liftweb.net
> > >>> Beginning Scalahttp://www.apress.com/book/view/1430219890
> > >>> Follow me:http://twitter.com/dpp
> > >>> Git some:http://github.com/dpp
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: putting data in a session

2009-09-06 Thread Indrajit Raychaudhuri

object FooVar extends SessionVar[Box[String]](Empty)

// to set
FooVar.set(Full(fooValToSet))

// to retreive
val foo = FooVar.is.openOr("Not found")

Cheers, Indrajit

On Sep 7, 12:36 am, jack  wrote:
> How do I put something in the session from one page and take it out
> from another page?
--~--~-~--~~~---~--~~
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: Milestone 5 now available!

2009-09-10 Thread Indrajit Raychaudhuri

You can typically leave out lift-util in most cases (just remove the
dependency element in the pom) because most of other higher order
modules (like lift-webkit) depend on lift-util and therefore would be
transitively included during the build.

Cheers, Indrajit

On Sep 10, 7:28 pm, Timothy Perrett  wrote:
> Exactly right - upgrade them all.
>
> Cheers, Tim
>
> On 10 Sep 2009, at 15:01, Xavi Ramirez wrote:
>
>
>
> > Thanks for the quick reply.
>
> > It seems I have three lift dependencies: lift-util, lift-webkit,  
> > lift-mapper
>
> > Do I upgrade all them to 1.1-M5?
>
> > Thanks,
> > Xavi
>
> > On Wed, Sep 9, 2009 at 11:41 AM, Timothy Perrett
> >  wrote:
>
> >> Change:
>
> >> 1.1-M4
>
> >> to
>
> >> 1.1-M5
>
> >> Cheers, Tim
>
> >> On 9 Sep 2009, at 16:22, Xavi Ramirez wrote:
>
> >>> Please excuse my ignorance, but how do you upgrade to the latest
> >>> milestone?
>
> >>> I assume it involves updating my POM.xml file, but that's all I  
> >>> know.
>
> >>> Thanks,
> >>> Xavi
>
> >>> On Wed, Sep 9, 2009 at 11:15 AM, Timothy Perrett  wrote:
>
>  Yes it does, it provides a fixed point in time so that users who  
>  are
>  developing against HEAD can have stability if they are going into
>  production for instance, or just want a fixed reference point (as  
>  we
>  are far away from 1.0 now)
>
>  Cheers, Tim
>
>  On 9 Sep 2009, at 16:02, glenn wrote:
>
> > Does this milestone incorporate what's in 1.1-Snapshot?
>
> > Glenn
>
> > On Sep 8, 9:57 pm, "Charles F. Munat"  wrote:
> >> The Lift team proudly announces Milestone 5! Some text here  
> >> that I
> >> forgot to copy and paste.
>
> >> Go get it!
>
> >> Chas. Munat
--~--~-~--~~~---~--~~
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: Lift deal breakers

2009-09-12 Thread Indrajit Raychaudhuri

Even if we assumed that Lift managed to do all the hard work, we still
have a contradictory situation: the  being completely devoid of
scripts but still have 'JS loaded at the end of the page'. It still
has to be before the close of  tag and thereby sneaking into the
. Worse, it's going to be incredibly difficult to implement a
rich client interface (Cappuccino, Dojo, Sproutcore etc. - those who
want to take complete control over the DOM) without the developer
constantly having to prevent Lift and the UI framework not wrestle and
step into the each other. A web *application* (like CMS) can get away
with that, but not a *framework* (like Lift).

And I am given to understand spiders are nowadays smart to recognize
dom events handlers (e.g., onclick) and decide what to do when it
encounters them.

Oh, and while at that, 'view source' a GWT based application and help
youself have a perspective :)

Cheers, Indrajit

On Sep 12, 5:07 pm, "marius d."  wrote:
> +1 Andrew.
>
> Regarding the "rule" - absolutely no javascript in the markup doesn't
> make a lot of sense. Some of the Lift's generated javascript for comet/
> ajax calls is put inline at the end of the page. I see no practical
> reason not to do that. On the other hand putting liftAjax.js on the
> top of the page is not bad either. IN certain situations users may
> need this loaded prior their own js code. Besides I really doubt that
> putting it at the end of the page would really make any practical
> difference.
>
> Not putting lift's JS callas such as Ajax at onclick events like that
> can become quite lucrative from framework perspective because:
>
> 1. Lift would have to queue all these events and add them to a JS
> sequence and add this js to the served page.
> 2. that would create a dependency to JQuery events style that would
> have to be changed when YUI is in place or potentially other
> framework. If we'd still want this style but be JS library agnostic
> we'd have to do our own DOM manipulation etc which just adds more
> overhead without any practical gain.
>
> Br's,
> Marius
>
> On Sep 11, 10:18 pm, Andrew Scherpbier  wrote:
>
> > Dustin Whitney wrote:Hey, I like Lift so in an effort to improve it I am 
> > submitting some criticism.
> > Obtrusive javascript:
> > when I create an ajaxButton I get this 
> > html: >  null, null, null); return false;">Press meThat onclick is not 
> > ok.  It's bad for SEO and makes the page harder to read.  Ideally, no 
> > javascript should appear on the page whatsoever. (I presume here SEO == 
> > Search Engine Optimization.)
> > If you are going to use AJAX in your website, you have to use Javascript, 
> > right?  If you don't want to use AJAX with lift, don't...  Just use 
> > standard forms and links.  (Also turn off client-side garbage collection 
> > and any comet stuff in Boot.scala...)
> > So assuming you actually want an ajaxButton, the onclick needs to get in 
> > there somehow.  The only other way would be to have lift create some 
> > javascript that modifies the DOM to somehow add that onclick.  I think that 
> > would be much harder to read!
> > For the SEO stuff, are you assuming deep traversal (clicking through forms) 
> > into your webapp by spiders?  I don't know of any spiders that do that very 
> > well.  Anyway, if that's what you want, then I wouldn't use AJAX for 
> > anything.
> > A neat trick to let spiders get to all your public pages if your site has a 
> > complex form/ajax based navigation system is to use a site map and make 
> > sure all your main URLS are simple, non-form URLs.
> > Criticism is best if one can demonstrate a better alternative.Client Side 
> > Load Time:
> > I strive for that A in Y-Slow, so when I 
> > seeat 
> > the top of the page, I feel a little uneasy, and there is nothing I can do 
> > (I think) to move it to the bottom of the page. Have you actually verified 
> > that this makes a difference?  I haven't verified this, so pardon my 
> > ignorance.  It just seems like it either makes a difference of milliseconds 
> > or no difference at all because modern browsers make parallel requests and 
> > start rendering before everything is available.
> > I'm sure if you can demonstrate two pages where the only difference is the 
> > location of the script include, and the one with the script include up 
> > front is noticeably slower than the other one, I'm sure something can be 
> > done.
> > --Andrew
> > -Dustin
--~--~-~--~~~---~--~~
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: MappedDate.setFromAny only works with strings?

2009-09-12 Thread Indrajit Raychaudhuri

> > Also, the LiftRules.parseDate function currently does DateTime
> > parsing, so I would have to make a breaking change to rename it to
> > parseDateTime and add new parseDate and parseTime (and associated
> > format methods). Thoughts?
>
> I think this is the right solution. Don't know how much will break
> because of this though. But hey, if we're breaking things anyway, why
> not put in Joda time (or maybe 
> scala-timehttp://github.com/jorgeortiz85/scala-time/tree/master;-)

Although not belonging to breaking changers camp, breaking changes are
great when it's for a cause. IMHO, scala time is a darn good cause and
worth the break!

Cheers, Indrajit

>
> /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: Lift deal breakers

2009-09-12 Thread Indrajit Raychaudhuri



On Sep 12, 7:02 pm, "marius d."  wrote:
> On Sep 12, 8:34 am, Indrajit Raychaudhuri  wrote:
>
> > Even if we assumed that Lift managed to do all the hard work, we still
> > have a contradictory situation: the  being completely devoid of
> > scripts but still have 'JS loaded at the end of the page'. It still
> > has to be before the close of  tag and thereby sneaking into the
> > . Worse, it's going to be incredibly difficult to implement a
> > rich client interface (Cappuccino, Dojo, Sproutcore etc. - those who
> > want to take complete control over the DOM) without the developer
> > constantly having to prevent Lift and the UI framework not wrestle and
> > step into the each other. A web *application* (like CMS) can get away
> > with that, but not a *framework* (like Lift).
>
> What control of Lift over the DOM are you talking about. Lift's
> generated scripts in HTML is minimal, and it is about Comet mostly.
> Lift scripts do not really stay in other frameworks way. If you have a
> concrete example where Lift's stays in the way of integrating other
> tools please be specific about the problem and we'll see what/if we
> can do something about it. What is the exact wrestle here?

My comment was in addition to your point:
"If we'd still want this style but be JS library agnostic we'd have to
do our own DOM manipulation etc which just adds more overhead without
any practical gain."

Currently, Lift *doesn't* do any DOM manipulation at all, just
generates valid XHTML content and thus *doesn't* stay in the way of
integration, which is a healthy thing. And that was my point.

Cheers, Indrajit

>
>
> > And I am given to understand spiders are nowadays smart to recognize
> > dom events handlers (e.g., onclick) and decide what to do when it
> > encounters them.
>
> > Oh, and while at that, 'view source' a GWT based application and help
> > youself have a perspective :)
>
> > Cheers, Indrajit
>
> > On Sep 12, 5:07 pm, "marius d."  wrote:
>
> > > +1 Andrew.
>
> > > Regarding the "rule" - absolutely no javascript in the markup doesn't
> > > make a lot of sense. Some of the Lift's generated javascript for comet/
> > > ajax calls is put inline at the end of the page. I see no practical
> > > reason not to do that. On the other hand putting liftAjax.js on the
> > > top of the page is not bad either. IN certain situations users may
> > > need this loaded prior their own js code. Besides I really doubt that
> > > putting it at the end of the page would really make any practical
> > > difference.
>
> > > Not putting lift's JS callas such as Ajax at onclick events like that
> > > can become quite lucrative from framework perspective because:
>
> > > 1. Lift would have to queue all these events and add them to a JS
> > > sequence and add this js to the served page.
> > > 2. that would create a dependency to JQuery events style that would
> > > have to be changed when YUI is in place or potentially other
> > > framework. If we'd still want this style but be JS library agnostic
> > > we'd have to do our own DOM manipulation etc which just adds more
> > > overhead without any practical gain.
>
> > > Br's,
> > > Marius
>
> > > On Sep 11, 10:18 pm, Andrew Scherpbier  wrote:
>
> > > > Dustin Whitney wrote:Hey, I like Lift so in an effort to improve it I 
> > > > am submitting some criticism.
> > > > Obtrusive javascript:
> > > > when I create an ajaxButton I get this 
> > > > html: > > >  null, null, null); return false;">Press meThat onclick is not 
> > > > ok.  It's bad for SEO and makes the page harder to read.  Ideally, no 
> > > > javascript should appear on the page whatsoever. (I presume here SEO == 
> > > > Search Engine Optimization.)
> > > > If you are going to use AJAX in your website, you have to use 
> > > > Javascript, right?  If you don't want to use AJAX with lift, don't...  
> > > > Just use standard forms and links.  (Also turn off client-side garbage 
> > > > collection and any comet stuff in Boot.scala...)
> > > > So assuming you actually want an ajaxButton, the onclick needs to get 
> > > > in there somehow.  The only other way would be to have lift create some 
> > > > javascript that modifies the DOM to somehow add that onclick.  I think 
> > > > that would be much harder to read!
> > > > For t

[Lift] Re: email encoding problem

2009-09-12 Thread Indrajit Raychaudhuri

Can you please check what the Content-Type field in the mail header
looks like in the mail that you get?

Cheers, Indrajit

On Sep 12, 3:40 pm, night_stalker  wrote:
> hi all,
>
> I'm new to lift, I met with a problem when trying to send a mail.
>
> //Mail.scala---
> package my.site
> import net.liftweb.util._
> import Helpers._
> import Mailer._
> import javax.mail._
> import javax.mail.internet._
> import xml._
>
> object Mail {
>   var from = ""
>
>   def config(host: String, user: String, password: String) {
>     System.setProperty("mail.smtp.starttls.enable","true");
>     System.setProperty("mail.smtp.host", host)
>     System.setProperty("mail.smtp.auth", "true")
>     System.setProperty("mail.mime.charset", "UTF-8")
>     Mailer.authenticator = Full(new Authenticator {
>       override def getPasswordAuthentication =
>         new PasswordAuthentication(user, password)
>     })
>     from = user
>   }
>
>   def send(to: String, xmlContent: NodeSeq) {
>     sendMail(From(from), Subject("hi"),
>       XHTMLMailBodyType(xmlContent)::To(to)::Nil : _* )
>   }
>
> }
>
> //useMail.scala--
> ...
> // host, user, password
> my.site.Mail.config("smtp.gmail.com", "*...@gmail.com", "*")
> // the recieved mail body becomes "??"
> my.site.Mail.send("*...@gmail.com", (你好))
>
> All source files are UTF-8, and project.build.sourceEncoding is UTF-8
> too.
> Is there a missing step?
--~--~-~--~~~---~--~~
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: email encoding problem

2009-09-12 Thread Indrajit Raychaudhuri

Indeed, but "Content-Transfer-Encoding: 7bit" could be the real
suspect.

I think, MimeBodyPart forces us-ascii charset for 7bit encoding.

Cheers, Indrajit

On Sep 12, 9:03 pm, Viktor Klang  wrote:
> Content-Type: text/html; charset=us-ascii
>
> IMHO that should read:
>
> Content-Type: text/html; charset=UTF-8
>
> So basically, the content-type isn't correctly set.
>
>
>
> On Sat, Sep 12, 2009 at 5:55 PM, night_stalker  wrote:
>
> > the last part is like:
>
> > Subject: hi
> > MIME-Version: 1.0
> > Content-Type: multipart/alternative;
> >        boundary="=_Part_0_21171036.1252770284921"
>
> > --=_Part_0_21171036.1252770284921
> > Content-Type: text/html; charset=us-ascii
> > Content-Transfer-Encoding: 7bit
>
> > ??
> > --=_Part_0_21171036.1252770284921--
>
> > I don't know how to set Content-Type ...
>
> > On Sep 12, 10:34 pm, Indrajit Raychaudhuri 
> > wrote:
> > > Can you please check what the Content-Type field in the mail header
> > > looks like in the mail that you get?
>
> > > Cheers, Indrajit
>
> --
> Viktor Klang
>
> Blog: klangism.blogspot.com
> Twttr: viktorklang
>
> Lift Committer - liftweb.com
> AKKA Committer - akkasource.org
> Cassidy - github.com/viktorklang/Cassidy.git
> SoftPub founder:http://groups.google.com/group/softpub
--~--~-~--~~~---~--~~
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: how / where to set the runmode of a lift application?

2009-09-13 Thread Indrajit Raychaudhuri

If you are modifying web.xml, doing it via  and having it
available via JNDI (java:comp/env) [1] seems closest.
However, I am not sure that would be available via System.getProperty
().

Alternately, try jetty.xml (or jetty-env.xml, if possible) [2][3] to
do something like:

  run.mode
  production


[1]: http://docs.codehaus.org/display/JETTY/JNDI#JNDI-enventry
[2]: http://docs.codehaus.org/display/JETTY/Syntax+Reference
[3]: http://docs.codehaus.org/display/JETTY/jetty-env.xml


On Sep 13, 1:47 pm, george  wrote:
> Thanks Xavi
>
> > I believe you can also modify web.xml in some way, but I'm not really sure.
>
> that would be useful as I don't have the ability to set properties on
> the production environment.
>
> I wonder if anyone else can confirm?
--~--~-~--~~~---~--~~
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: using jquery 1.3.2 and 'tabs'

2009-09-13 Thread Indrajit Raychaudhuri

David,

1. Lift includes jquery-1.3.2, just do:

 and your done.

2. For the other stuff:

a. Put the files in src/main/resources/toserve/ui (e.g., src/main/
resources/toserve/ui/ui.tabs.js)

b. Add them to ResourceServer.allowedPaths by adding this to Boot:
ResourceServer.allow {
  case "ui" :: _ => true
}

c. Refer them as 

Hope this helps.

Cheers, Indrajit


On Sep 13, 9:43 am, David  wrote:
> I'd like to use the latest jquery, 1.3.2.  I'm new to both jquery and
> lift but I like what I see!
>      script>
>