[Lift] Re: Lift Mapper support for Oracle Sequences

2009-11-18 Thread aw
Thank you Derek...  Clever trick!

I'm not using 1.1-SNAPSHOT -- I am using 1.1-M7...  But that shouldn't
matter to me since I am not using Schemifier to create and manage the
database...  (I am using LiquiBase.)

I had imagined an alternative strategy whereby I would provide a
sequence name to the id object and then it would simply create
statements like:

  insert into Table (id, colA, colB, colC) values
(Table_Sequence.NextVal, colA, colB, colC)

but the more I think about it...  I'm thinking your strategy insulates
my code from declaring anything Oracle specific in my mapper
objects...

I will give this a go.  Thanks!

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: Ajax + Comet Chat across a Cluster

2009-11-18 Thread Margaret
hi,aw

I create a simple chat app online

http://maweis.com:8080

the source is

git://github.com/maweis1981/chatOnLift.git


if you have a good idea on cluster, dont forget to be share with us.
-
mawei...@gmail.com
13585201588
http://maweis.com




On Thu, Nov 19, 2009 at 2:26 PM, aw  wrote:
> I certainly understand the Actor model, but I am new to Akka...  From
> browsing their wiki (http://wiki.github.com/jboner/akka), it is
> unclear to me that they provide a publish/subscribe concept -- and I
> think I would need that...  Please point me to that reference if you
> are aware of that.
>
> I'll take a closer look at RabbitMQ...
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: odd ajax issue (works every other time)

2009-11-18 Thread Marius
That makes two of us David ...

The thing is that during my debugging there was no session destruction
and I traced this right in the guts of SessionMaster. The session was
always there. But somehow the sessionId fed in was different even
though the cookie seemed to be correct. I know I know ... it doesn't
make much sense but if you find more info on this please do let me
know. This is killing me :)

Br's,
Marius

On Nov 19, 2:20 am, David Pollak 
wrote:
> Marius,
>
> Thanks for tracking this down and checking in a fix.
>
> I'm still curious as to why a double-init was causing session destruction...
> I'll do more digging.
>
> We should also document this in the code (and maybe even thrown an exception
> on a double-init).
>
> Thanks,
>
> David
>
> On Wed, Nov 18, 2009 at 2:30 PM, Marius  wrote:
> > My assumption on the causality is that things remained set on
> > ThreadGlobals and threads are re-used by container. I know it doesn't
> > make the most sense what I'm saying since the ThredGlobals are
> > properly scoped but the previous thread-global value is cached and
> > restored after the closure execution. At least this is my assumption
> > right now (so late) ...
>
> > Br's,
> > Marius
>
> > On Nov 19, 12:26 am, Marius  wrote:
> > > Ok I did some more debugging on this.
>
> > > I put traces in the code and at some point when LiftRules is
> > > requesting the session from the SessionMaster I'm seeing a different
> > > sessionId provided to the SessionMaster thus the session is not found.
> > > I removed my addition from LiftSession#contextFuncBuilder
>
> > >         //S.init(req, session) {
> > >           S.CurrentLocation.doWith(curLoc) {
> > >             snippetMap.doWith(snippetMap.is ++ currentMap) {
> > >               super.apply(in)
> > >             }
> > >           }
> > >        // }
>
> > > so I commented out the S.init and I wasn't able to reproduce the
> > > problem anymore. Therefore I took the liberty of pushing this change
> > > into master without going through the review board process. I did this
> > > due to the urgency nature.
>
> > > Please test this and see if you can reproduce the problem
>
> > > Br's,
> > > Marius
>
> > > On Nov 18, 11:11 pm, Marius  wrote:
>
> > > > I've noticed this today as well but in a different context. Sometimes
> > > > out of the sudden, I'm being kicked out of the session to the login
> > > > page.
>
> > > > Dave I wonder is this may have been caused by the S.init call inside
> > > > LiftSession#contextFuncBuilder. I can't think of a reason right now on
> > > > why would that such effect though.
>
> > > > Br's,
> > > > Marius
>
> > > > On Nov 18, 10:18 pm, David Pollak 
> > > > wrote:
>
> > > > > Okay, I've reproduced the issue on Tomcat, so it's definitely
> > something in
> > > > > Lift that's borking the session
>
> > > > > On Wed, Nov 18, 2009 at 12:00 PM, David Pollak <
>
> > > > > feeder.of.the.be...@gmail.com> wrote:
> > > > > > Kris,
>
> > > > > > As far as I can tell, it's a Jetty issue.  Could you start by
> > trying to
> > > > > > reproduce the problem in Tomcat?  If you can repro it in Tomcat,
> > then
> > > > > > clearly the problem is in Lift.  If, however, the problem does not
> > manifest
> > > > > > in Tomcat, then we're poking Jetty wrong.
>
> > > > > > Thanks,
>
> > > > > > David
>
> > > > > > On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe <
> > > > > > kris.nuttyco...@gmail.com> wrote:
>
> > > > > >> I've got a few other things that I have to take care of today, but
> > if
> > > > > >> I can get those out of the way I will run a git bisect, compiling
> > &
> > > > > >> running with your test project to see if I can at least figure out
> > the
> > > > > >> commit that introduced the error. I've been wanting to learn about
> > > > > >> bisect anyway. :)
>
> > > > > >> Kris
>
> > > > > >> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
> > > > > >>  wrote:
>
> > > > > >> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
> > > > > >> >  wrote:
>
> > > > > >> >> I am able to reproduce the problem with a simple Ajax control.
>
> > > > > >> >> It's very, very odd.  It seems to be an intermittent failure of
> > the
> > > > > >> >> servlet container to find the HttpServletSession.  The client
> > is
> > > > > >> presenting
> > > > > >> >> the cookie correctly, but Jetty is not recognizing it.
>
> > > > > >> > For some reason, even though the browser sends the right
> > cookies, Jetty
> > > > > >> is
> > > > > >> > not recognizing them.  This is pretty easy to reproduce with
> > Firefox,
> > > > > >> but I
> > > > > >> > haven't seen it with Chrome.
>
> > > > > >> > I'm enclosing a simple version of the project I used for
> > testing... just
> > > > > >> > keep pressing on the button and eventually the page will reload
> > > > > >> (indicating
> > > > > >> > that the session was lost) or the counter will stop counting
> > (same
> > > > > >> > indication).
>
> > > > > >> > I'm out of pocket for most of today (I might be on email just a
> >

[Lift] Re: Ajax + Comet Chat across a Cluster

2009-11-18 Thread aw
I certainly understand the Actor model, but I am new to Akka...  From
browsing their wiki (http://wiki.github.com/jboner/akka), it is
unclear to me that they provide a publish/subscribe concept -- and I
think I would need that...  Please point me to that reference if you
are aware of that.

I'll take a closer look at RabbitMQ...

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: odd ajax issue (works every other time)

2009-11-18 Thread Marius
Cool.

On Nov 19, 6:54 am, Kris Nuttycombe  wrote:
> Okay, I finally got to test this an the fix looks good to me. Thanks Marius!
>
> Kris
>
> On Wed, Nov 18, 2009 at 3:26 PM, Marius  wrote:
> > Ok I did some more debugging on this.
>
> > I put traces in the code and at some point when LiftRules is
> > requesting the session from the SessionMaster I'm seeing a different
> > sessionId provided to the SessionMaster thus the session is not found.
> > I removed my addition from LiftSession#contextFuncBuilder
>
> >        //S.init(req, session) {
> >          S.CurrentLocation.doWith(curLoc) {
> >            snippetMap.doWith(snippetMap.is ++ currentMap) {
> >              super.apply(in)
> >            }
> >          }
> >       // }
>
> > so I commented out the S.init and I wasn't able to reproduce the
> > problem anymore. Therefore I took the liberty of pushing this change
> > into master without going through the review board process. I did this
> > due to the urgency nature.
>
> > Please test this and see if you can reproduce the problem
>
> > Br's,
> > Marius
>
> > On Nov 18, 11:11 pm, Marius  wrote:
> >> I've noticed this today as well but in a different context. Sometimes
> >> out of the sudden, I'm being kicked out of the session to the login
> >> page.
>
> >> Dave I wonder is this may have been caused by the S.init call inside
> >> LiftSession#contextFuncBuilder. I can't think of a reason right now on
> >> why would that such effect though.
>
> >> Br's,
> >> Marius
>
> >> On Nov 18, 10:18 pm, David Pollak 
> >> wrote:
>
> >> > Okay, I've reproduced the issue on Tomcat, so it's definitely something 
> >> > in
> >> > Lift that's borking the session
>
> >> > On Wed, Nov 18, 2009 at 12:00 PM, David Pollak <
>
> >> > feeder.of.the.be...@gmail.com> wrote:
> >> > > Kris,
>
> >> > > As far as I can tell, it's a Jetty issue.  Could you start by trying to
> >> > > reproduce the problem in Tomcat?  If you can repro it in Tomcat, then
> >> > > clearly the problem is in Lift.  If, however, the problem does not 
> >> > > manifest
> >> > > in Tomcat, then we're poking Jetty wrong.
>
> >> > > Thanks,
>
> >> > > David
>
> >> > > On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe <
> >> > > kris.nuttyco...@gmail.com> wrote:
>
> >> > >> I've got a few other things that I have to take care of today, but if
> >> > >> I can get those out of the way I will run a git bisect, compiling &
> >> > >> running with your test project to see if I can at least figure out the
> >> > >> commit that introduced the error. I've been wanting to learn about
> >> > >> bisect anyway. :)
>
> >> > >> Kris
>
> >> > >> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
> >> > >>  wrote:
>
> >> > >> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
> >> > >> >  wrote:
>
> >> > >> >> I am able to reproduce the problem with a simple Ajax control.
>
> >> > >> >> It's very, very odd.  It seems to be an intermittent failure of the
> >> > >> >> servlet container to find the HttpServletSession.  The client is
> >> > >> presenting
> >> > >> >> the cookie correctly, but Jetty is not recognizing it.
>
> >> > >> > For some reason, even though the browser sends the right cookies, 
> >> > >> > Jetty
> >> > >> is
> >> > >> > not recognizing them.  This is pretty easy to reproduce with 
> >> > >> > Firefox,
> >> > >> but I
> >> > >> > haven't seen it with Chrome.
>
> >> > >> > I'm enclosing a simple version of the project I used for testing... 
> >> > >> > just
> >> > >> > keep pressing on the button and eventually the page will reload
> >> > >> (indicating
> >> > >> > that the session was lost) or the counter will stop counting (same
> >> > >> > indication).
>
> >> > >> > I'm out of pocket for most of today (I might be on email just a 
> >> > >> > little).
>
> >> > >> > This is a super ultra mega high priority in my book.  If Marius or 
> >> > >> > Tim
> >> > >> or
> >> > >> > Derek or any of the other Lift committers could shake loose time to 
> >> > >> > look
> >> > >> at
> >> > >> > this one, I'd really appreciate it... and Kris thanks for the
> >> > >> time/effort
> >> > >> > you've put into this.  Please keep plugging.
>
> >> > >> > Thanks,
>
> >> > >> > David
>
> >> > >> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
> >> > >> >>  wrote:
>
> >> > >> >>> I am able to duplicate this error. I was concerned that it might 
> >> > >> >>> be
> >> > >> >>> the result of my Loc changes, so I just rebuilt Lift without the
> >> > >> >>> patches associated with that change and reproduced the problem 
> >> > >> >>> again.
>
> >> > >> >>> Here are the conditions under which I'm able to reproduce the 
> >> > >> >>> failure:
>
> >> > >> >>> 1) load a page where the snippets are managed by a StatefulSnippet
> >> > >> >>> 2) some page elements (in my case select boxes) have their values
> >> > >> >>> update by AJAX in response to user events. This appears to work
> >> > >> >>> normally.
> >> > >> >>> 3) upon submission of the form on the page, the page is 
> >> > >> >>> r

[Lift] Re: Lift Scaladocs for Maven?

2009-11-18 Thread aw
Note that the Maven Javadoc Plugin has a specific goal defined for
creating a jar of the javadocs:
http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html
Then you need to add a goal to attach it when you create a package:

http://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html

Unfortunately, I don't see a corresponding goal for the Maven Scala
Plugin:
http://scala-tools.org/mvnsites/maven-scala-plugin/plugin-info.html

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: Call it Lift 2.0

2009-11-18 Thread Jim Barrows
Only if Phx is in town :)

On Wed, Nov 18, 2009 at 10:48 AM, Heiko Seeberger <
heiko.seeber...@googlemail.com> wrote:

> Jim,
>
> Let's stop this discussion (I won't convince you and you wont't convince
> me) and start doing something more valuable: Are you in town for a couple of
> beers?
>
> Heiko
>
> 2009/11/18 Jim Barrows 
>
>>
>>
>> On Wed, Nov 18, 2009 at 10:25 AM, Heiko Seeberger <
>> heiko.seeber...@googlemail.com> wrote:
>>
>>> Jim,
>>>
>>> 2009/11/17 Jim Barrows 
>>>

 The behavior of a method, it's implementation is part of the contract I
 have with the library.

>>>
>>> Behavior yes, as long as agreed part of the contract. Implementation no.
>>>
>>
>> Implementation is not behavior?
>>
>>
>>>
>>>
 So, just because you, or some committee ...

>>>
>>> Not a committe, but the developer of the library.
>>>
>>
>> I don't care who.  Somebody, who isn't me, is deciding whether the impact
>> to me is is minor (ie 0.0.1), major (ie 0.1.0), or catastrophic (ie 1.0.0).
>>
>>
>>>
 ... think that the change is "minor", I still have to thoroughly test
 everything that uses your library.

>>>
>>> Did you hear me saying "Don't test your app when a required library
>>> changes its version"?
>>>
>>
>> Yes, actually your attempting to use a scheme to tell me what I need to
>> test.  If you agree that with every change, I need to test those changes,
>> then why complicate everybody's lives with number schemes?  Because whether
>> a someone uses the OSGI complex scheme of numbers, or Ubuntus year.month
>> scheme, it still means I have to read the change list, and test the things
>> that changed.
>>
>>
>>>
>>>
 As to your "As Lift also is to support OSGi (already some support in
 place) it would be beneficial to stick to this version policy" comment.  I
 counter with "Lift works on Ubuntu it would be beneficial to stick to this
 version policy" and of course "Lift runs on scala  it would be beneficial 
 to
 stick to this version policy", or better yet "Lift runs  on the Java VM it
 would be beneficial to stick to this version policy."  All three of my
 arguments have far more to do with Lift running then OSGI does.

>>>
>>> If you are not interested in OSGi or Lift's OSGi support, then just
>>> ignore it. As far as I know neither Ubuntu, nor Scala, nor the JVM care
>>> about Lift's version number or version strategy. But OSGi does!
>>>
>>
>> You miss my point.  My point was that the argument you make is useless.
>>
>>
>>>
>>>
 That's what I really need to know,

>>>
>>> Please accept that other folks might have different needs.
>>>
>>
>> You cut the context.  However Everyone needs to know that things
>> changed.  And they need to know what changed.  The OSGI scheme attempts to
>> tell the developer how severe the change is, without knowing how the
>> developer is using the library.  That's useless.
>> --
>> James A Barrows
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@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=.
>>
>
>
>
> --
> Heiko Seeberger
>
> My job: weiglewilczek.com
> My blog: heikoseeberger.name
> Follow me: twitter.com/hseeberger
> OSGi on Scala: scalamodules.org
> Lift, the simply functional web framework: liftweb.net
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>



-- 
James A Barrows

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: odd ajax issue (works every other time)

2009-11-18 Thread Kris Nuttycombe
Okay, I finally got to test this an the fix looks good to me. Thanks Marius!

Kris

On Wed, Nov 18, 2009 at 3:26 PM, Marius  wrote:
> Ok I did some more debugging on this.
>
>
> I put traces in the code and at some point when LiftRules is
> requesting the session from the SessionMaster I'm seeing a different
> sessionId provided to the SessionMaster thus the session is not found.
> I removed my addition from LiftSession#contextFuncBuilder
>
>        //S.init(req, session) {
>          S.CurrentLocation.doWith(curLoc) {
>            snippetMap.doWith(snippetMap.is ++ currentMap) {
>              super.apply(in)
>            }
>          }
>       // }
>
> so I commented out the S.init and I wasn't able to reproduce the
> problem anymore. Therefore I took the liberty of pushing this change
> into master without going through the review board process. I did this
> due to the urgency nature.
>
> Please test this and see if you can reproduce the problem
>
>
> Br's,
> Marius
>
> On Nov 18, 11:11 pm, Marius  wrote:
>> I've noticed this today as well but in a different context. Sometimes
>> out of the sudden, I'm being kicked out of the session to the login
>> page.
>>
>> Dave I wonder is this may have been caused by the S.init call inside
>> LiftSession#contextFuncBuilder. I can't think of a reason right now on
>> why would that such effect though.
>>
>> Br's,
>> Marius
>>
>> On Nov 18, 10:18 pm, David Pollak 
>> wrote:
>>
>> > Okay, I've reproduced the issue on Tomcat, so it's definitely something in
>> > Lift that's borking the session
>>
>> > On Wed, Nov 18, 2009 at 12:00 PM, David Pollak <
>>
>> > feeder.of.the.be...@gmail.com> wrote:
>> > > Kris,
>>
>> > > As far as I can tell, it's a Jetty issue.  Could you start by trying to
>> > > reproduce the problem in Tomcat?  If you can repro it in Tomcat, then
>> > > clearly the problem is in Lift.  If, however, the problem does not 
>> > > manifest
>> > > in Tomcat, then we're poking Jetty wrong.
>>
>> > > Thanks,
>>
>> > > David
>>
>> > > On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe <
>> > > kris.nuttyco...@gmail.com> wrote:
>>
>> > >> I've got a few other things that I have to take care of today, but if
>> > >> I can get those out of the way I will run a git bisect, compiling &
>> > >> running with your test project to see if I can at least figure out the
>> > >> commit that introduced the error. I've been wanting to learn about
>> > >> bisect anyway. :)
>>
>> > >> Kris
>>
>> > >> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
>> > >>  wrote:
>>
>> > >> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
>> > >> >  wrote:
>>
>> > >> >> I am able to reproduce the problem with a simple Ajax control.
>>
>> > >> >> It's very, very odd.  It seems to be an intermittent failure of the
>> > >> >> servlet container to find the HttpServletSession.  The client is
>> > >> presenting
>> > >> >> the cookie correctly, but Jetty is not recognizing it.
>>
>> > >> > For some reason, even though the browser sends the right cookies, 
>> > >> > Jetty
>> > >> is
>> > >> > not recognizing them.  This is pretty easy to reproduce with Firefox,
>> > >> but I
>> > >> > haven't seen it with Chrome.
>>
>> > >> > I'm enclosing a simple version of the project I used for testing... 
>> > >> > just
>> > >> > keep pressing on the button and eventually the page will reload
>> > >> (indicating
>> > >> > that the session was lost) or the counter will stop counting (same
>> > >> > indication).
>>
>> > >> > I'm out of pocket for most of today (I might be on email just a 
>> > >> > little).
>>
>> > >> > This is a super ultra mega high priority in my book.  If Marius or Tim
>> > >> or
>> > >> > Derek or any of the other Lift committers could shake loose time to 
>> > >> > look
>> > >> at
>> > >> > this one, I'd really appreciate it... and Kris thanks for the
>> > >> time/effort
>> > >> > you've put into this.  Please keep plugging.
>>
>> > >> > Thanks,
>>
>> > >> > David
>>
>> > >> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
>> > >> >>  wrote:
>>
>> > >> >>> I am able to duplicate this error. I was concerned that it might be
>> > >> >>> the result of my Loc changes, so I just rebuilt Lift without the
>> > >> >>> patches associated with that change and reproduced the problem 
>> > >> >>> again.
>>
>> > >> >>> Here are the conditions under which I'm able to reproduce the 
>> > >> >>> failure:
>>
>> > >> >>> 1) load a page where the snippets are managed by a StatefulSnippet
>> > >> >>> 2) some page elements (in my case select boxes) have their values
>> > >> >>> update by AJAX in response to user events. This appears to work
>> > >> >>> normally.
>> > >> >>> 3) upon submission of the form on the page, the page is re-rendered.
>> > >> >>> Logging in the submission function indicates that it is never 
>> > >> >>> called.
>> > >> >>> 4) if I fill in the form again and resubmit after the initial 
>> > >> >>> failure,
>> > >> >>> the form submit behaves properly.
>> > >> >>> 5) I believe I've seen a

[Lift] Re: Hello world problems

2009-11-18 Thread jimmy
Thankyou everybody for the prompt replies!

I was running on a Windows XP machine with java sdk 1.6 already
installed.

I downloaded and ran the "windows installer" from here :
http://liftweb.net/download.html

I then followed the instructions here 
http://liftweb.net/docs/getting_started/mod_master.html#x1-50001.3

>From the "cd work" step (after putting the maven directory in the %PATH
%)

The I ran the "mvn archetype:generate -U . "
and encountered the missing jetty pom problem.
I added mortbay to the "groups" in the POM file and tried again.

This time the command appeared to work.

However after cding to the HelloWorld directory and running
"mvn jetty:run: "
I get the missing webapp message.

I tried creating the directory manually and putting the example from
the instructions in there
but then I get a "BUILD FAILED" message but no other error message or
indication as to why
the build should fail.

I had to do this at home as I cannot get maven to work through the
various proxies and firewalls at work
(exceutable .jar files get gutted and classes are replaced by a "you
shouldnt do this" text!) so I cannot provided
the full log at the moment.

When I get home I will start from the top and post the complete log.

Thanks

On Nov 18, 9:14 pm, Naftoli Gugenheim  wrote:
> What did you do to create the project?
>
> -
>
> jimmy wrote:
>
> I am trying to try out lift/scala and I must say I am not getting a
> warm cosy feeling about this!
>
> First after following the instructions on the "mvn jetty:run" step I
> get--
>  "mortbay.jetty. etc etc not found message.
>
> A quick web search revelas this to be a ubiquitous apache/maven
> problem
> but after adding the mortbay group  to the plugins in hte pom I can
> carry on.
>
> The next problem is however:-
> "Webapp source directory C:\lift\helloworld\src\main\webapp does not
> exist"
>
> and its true what it says the direcctory does not exist
> I have a "C:\lift\helloworld\src\main\java\demo\helloworld"  directory
> but not a Webapp directory.
>
> Now remember this is my first try with lift I and was seriously
> considering it as against Grails.
> With grails I got all the way through to defineing a many to many
> relationship with GORM before I encountered
> a problem I had to work at.
> With lift I cannot get HelloWorld to work. Now most people would not
> have bothered any further
> but I will persist for a while.
>
> Whats wrong here? The instructions, maven, the application or me?
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/liftweb?hl=.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Lift Scaladocs for Maven?

2009-11-18 Thread Josh Suereth
Yes.  http://www.scala-tools.org/.  I think you need to look at the snapshot
sites.

Also, I'm not sure the scaladoc are being attached to the lift builds
correctly.  If one of the maven guru committers wants to attack that,
otherwise I'll add it to my pile of TODOs.


- Josh

On Wed, Nov 18, 2009 at 3:46 PM, braver  wrote:

> Perhaps I'm not looking in the right place, but I didn't find the
> scaladocs alongside the jars and source.jars for Lift in the usual
> maven repo.
> Are we supposed to use scaladoc manually, or IDEs, to generate the API
> docs?
>
> Also, I'm interested in liftweb-actor separately, and see its jar and
> source.jar in the maven repo.  Is there a pre-cooked scaladoc
> somewhere?
>
> Thanks,
> Alexy
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: Where are the dragons hiding?

2009-11-18 Thread David Pollak
Paul,

I think this thread contains the key dragons in Lift.  Basically, it boils
down to: Lift is highly stateful... that has its pluses and minuses.  We're
working on mitigating the minuses (session replication and persistence).

But one of the key things to keep in mind regarding Lift is how we as a
community handle problems.  One of the biggest, nastiest bugs in Lift-land
crept into the code in the last few days:
http://groups.google.com/group/liftweb/browse_thread/thread/558280f51666972f/0291e1224f0f0ce8?hl=en#0291e1224f0f0ce8.
Sessions were getting destroyed seemingly randomly.  Please look at how the
problem was dealt with.  There will be bugs in Lift in the future.  You can
expect that they will be dealt with in the future in the same way.  What you
will hear from the Lift developers is that we stand behind Lift and when
there are problems, we stand behind fixing them.  In terms of Scala the
language, EPFL has a very similar attitude.  We will do what it takes to
support the folks who bet their careers and companies on Lift right on down
to the JVM.

Thanks,

David

On Wed, Nov 18, 2009 at 3:43 PM, Paul Butcher  wrote:

> Thanks everyone - that's exactly the kind of information that I was
> looking for.
>
> Now all I need to do is persuade my colleagues that selecting a young
> technology (again) is a good idea ;-)
>
> Thanks again,
>
> paul.butcher->msgCount++
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Presenting on Lift @ NYC Scala Meetup: Dec 7

2009-11-18 Thread David Pollak
I so wish I could come to this!

On Wed, Nov 18, 2009 at 1:00 PM, harryh  wrote:

> For anyone who lives in the NYC are and would be interested in this
> sort of thing:
>
> http://www.meetup.com/New-York-Scala-Enthusiasts/calendar/11900384/
>
> -harryh
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: odd ajax issue (works every other time)

2009-11-18 Thread David Pollak
Marius,

Thanks for tracking this down and checking in a fix.

I'm still curious as to why a double-init was causing session destruction...
I'll do more digging.

We should also document this in the code (and maybe even thrown an exception
on a double-init).

Thanks,

David


On Wed, Nov 18, 2009 at 2:30 PM, Marius  wrote:

> My assumption on the causality is that things remained set on
> ThreadGlobals and threads are re-used by container. I know it doesn't
> make the most sense what I'm saying since the ThredGlobals are
> properly scoped but the previous thread-global value is cached and
> restored after the closure execution. At least this is my assumption
> right now (so late) ...
>
> Br's,
> Marius
>
> On Nov 19, 12:26 am, Marius  wrote:
> > Ok I did some more debugging on this.
> >
> > I put traces in the code and at some point when LiftRules is
> > requesting the session from the SessionMaster I'm seeing a different
> > sessionId provided to the SessionMaster thus the session is not found.
> > I removed my addition from LiftSession#contextFuncBuilder
> >
> > //S.init(req, session) {
> >   S.CurrentLocation.doWith(curLoc) {
> > snippetMap.doWith(snippetMap.is ++ currentMap) {
> >   super.apply(in)
> > }
> >   }
> >// }
> >
> > so I commented out the S.init and I wasn't able to reproduce the
> > problem anymore. Therefore I took the liberty of pushing this change
> > into master without going through the review board process. I did this
> > due to the urgency nature.
> >
> > Please test this and see if you can reproduce the problem
> >
> > Br's,
> > Marius
> >
> > On Nov 18, 11:11 pm, Marius  wrote:
> >
> > > I've noticed this today as well but in a different context. Sometimes
> > > out of the sudden, I'm being kicked out of the session to the login
> > > page.
> >
> > > Dave I wonder is this may have been caused by the S.init call inside
> > > LiftSession#contextFuncBuilder. I can't think of a reason right now on
> > > why would that such effect though.
> >
> > > Br's,
> > > Marius
> >
> > > On Nov 18, 10:18 pm, David Pollak 
> > > wrote:
> >
> > > > Okay, I've reproduced the issue on Tomcat, so it's definitely
> something in
> > > > Lift that's borking the session
> >
> > > > On Wed, Nov 18, 2009 at 12:00 PM, David Pollak <
> >
> > > > feeder.of.the.be...@gmail.com> wrote:
> > > > > Kris,
> >
> > > > > As far as I can tell, it's a Jetty issue.  Could you start by
> trying to
> > > > > reproduce the problem in Tomcat?  If you can repro it in Tomcat,
> then
> > > > > clearly the problem is in Lift.  If, however, the problem does not
> manifest
> > > > > in Tomcat, then we're poking Jetty wrong.
> >
> > > > > Thanks,
> >
> > > > > David
> >
> > > > > On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe <
> > > > > kris.nuttyco...@gmail.com> wrote:
> >
> > > > >> I've got a few other things that I have to take care of today, but
> if
> > > > >> I can get those out of the way I will run a git bisect, compiling
> &
> > > > >> running with your test project to see if I can at least figure out
> the
> > > > >> commit that introduced the error. I've been wanting to learn about
> > > > >> bisect anyway. :)
> >
> > > > >> Kris
> >
> > > > >> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
> > > > >>  wrote:
> >
> > > > >> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
> > > > >> >  wrote:
> >
> > > > >> >> I am able to reproduce the problem with a simple Ajax control.
> >
> > > > >> >> It's very, very odd.  It seems to be an intermittent failure of
> the
> > > > >> >> servlet container to find the HttpServletSession.  The client
> is
> > > > >> presenting
> > > > >> >> the cookie correctly, but Jetty is not recognizing it.
> >
> > > > >> > For some reason, even though the browser sends the right
> cookies, Jetty
> > > > >> is
> > > > >> > not recognizing them.  This is pretty easy to reproduce with
> Firefox,
> > > > >> but I
> > > > >> > haven't seen it with Chrome.
> >
> > > > >> > I'm enclosing a simple version of the project I used for
> testing... just
> > > > >> > keep pressing on the button and eventually the page will reload
> > > > >> (indicating
> > > > >> > that the session was lost) or the counter will stop counting
> (same
> > > > >> > indication).
> >
> > > > >> > I'm out of pocket for most of today (I might be on email just a
> little).
> >
> > > > >> > This is a super ultra mega high priority in my book.  If Marius
> or Tim
> > > > >> or
> > > > >> > Derek or any of the other Lift committers could shake loose time
> to look
> > > > >> at
> > > > >> > this one, I'd really appreciate it... and Kris thanks for the
> > > > >> time/effort
> > > > >> > you've put into this.  Please keep plugging.
> >
> > > > >> > Thanks,
> >
> > > > >> > David
> >
> > > > >> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
> > > > >> >>  wrote:
> >
> > > > >> >>> I am able to duplicate this error. I was concerned that it
> might be
> > > > >> >>> 

[Lift] Re: Where are the dragons hiding?

2009-11-18 Thread Paul Butcher
Thanks everyone - that's exactly the kind of information that I was
looking for.

Now all I need to do is persuade my colleagues that selecting a young
technology (again) is a good idea ;-)

Thanks again,

paul.butcher->msgCount++

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: odd ajax issue (works every other time)

2009-11-18 Thread Marius
My assumption on the causality is that things remained set on
ThreadGlobals and threads are re-used by container. I know it doesn't
make the most sense what I'm saying since the ThredGlobals are
properly scoped but the previous thread-global value is cached and
restored after the closure execution. At least this is my assumption
right now (so late) ...

Br's,
Marius

On Nov 19, 12:26 am, Marius  wrote:
> Ok I did some more debugging on this.
>
> I put traces in the code and at some point when LiftRules is
> requesting the session from the SessionMaster I'm seeing a different
> sessionId provided to the SessionMaster thus the session is not found.
> I removed my addition from LiftSession#contextFuncBuilder
>
>         //S.init(req, session) {
>           S.CurrentLocation.doWith(curLoc) {
>             snippetMap.doWith(snippetMap.is ++ currentMap) {
>               super.apply(in)
>             }
>           }
>        // }
>
> so I commented out the S.init and I wasn't able to reproduce the
> problem anymore. Therefore I took the liberty of pushing this change
> into master without going through the review board process. I did this
> due to the urgency nature.
>
> Please test this and see if you can reproduce the problem
>
> Br's,
> Marius
>
> On Nov 18, 11:11 pm, Marius  wrote:
>
> > I've noticed this today as well but in a different context. Sometimes
> > out of the sudden, I'm being kicked out of the session to the login
> > page.
>
> > Dave I wonder is this may have been caused by the S.init call inside
> > LiftSession#contextFuncBuilder. I can't think of a reason right now on
> > why would that such effect though.
>
> > Br's,
> > Marius
>
> > On Nov 18, 10:18 pm, David Pollak 
> > wrote:
>
> > > Okay, I've reproduced the issue on Tomcat, so it's definitely something in
> > > Lift that's borking the session
>
> > > On Wed, Nov 18, 2009 at 12:00 PM, David Pollak <
>
> > > feeder.of.the.be...@gmail.com> wrote:
> > > > Kris,
>
> > > > As far as I can tell, it's a Jetty issue.  Could you start by trying to
> > > > reproduce the problem in Tomcat?  If you can repro it in Tomcat, then
> > > > clearly the problem is in Lift.  If, however, the problem does not 
> > > > manifest
> > > > in Tomcat, then we're poking Jetty wrong.
>
> > > > Thanks,
>
> > > > David
>
> > > > On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe <
> > > > kris.nuttyco...@gmail.com> wrote:
>
> > > >> I've got a few other things that I have to take care of today, but if
> > > >> I can get those out of the way I will run a git bisect, compiling &
> > > >> running with your test project to see if I can at least figure out the
> > > >> commit that introduced the error. I've been wanting to learn about
> > > >> bisect anyway. :)
>
> > > >> Kris
>
> > > >> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
> > > >>  wrote:
>
> > > >> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
> > > >> >  wrote:
>
> > > >> >> I am able to reproduce the problem with a simple Ajax control.
>
> > > >> >> It's very, very odd.  It seems to be an intermittent failure of the
> > > >> >> servlet container to find the HttpServletSession.  The client is
> > > >> presenting
> > > >> >> the cookie correctly, but Jetty is not recognizing it.
>
> > > >> > For some reason, even though the browser sends the right cookies, 
> > > >> > Jetty
> > > >> is
> > > >> > not recognizing them.  This is pretty easy to reproduce with Firefox,
> > > >> but I
> > > >> > haven't seen it with Chrome.
>
> > > >> > I'm enclosing a simple version of the project I used for testing... 
> > > >> > just
> > > >> > keep pressing on the button and eventually the page will reload
> > > >> (indicating
> > > >> > that the session was lost) or the counter will stop counting (same
> > > >> > indication).
>
> > > >> > I'm out of pocket for most of today (I might be on email just a 
> > > >> > little).
>
> > > >> > This is a super ultra mega high priority in my book.  If Marius or 
> > > >> > Tim
> > > >> or
> > > >> > Derek or any of the other Lift committers could shake loose time to 
> > > >> > look
> > > >> at
> > > >> > this one, I'd really appreciate it... and Kris thanks for the
> > > >> time/effort
> > > >> > you've put into this.  Please keep plugging.
>
> > > >> > Thanks,
>
> > > >> > David
>
> > > >> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
> > > >> >>  wrote:
>
> > > >> >>> I am able to duplicate this error. I was concerned that it might be
> > > >> >>> the result of my Loc changes, so I just rebuilt Lift without the
> > > >> >>> patches associated with that change and reproduced the problem 
> > > >> >>> again.
>
> > > >> >>> Here are the conditions under which I'm able to reproduce the 
> > > >> >>> failure:
>
> > > >> >>> 1) load a page where the snippets are managed by a StatefulSnippet
> > > >> >>> 2) some page elements (in my case select boxes) have their values
> > > >> >>> update by AJAX in response to user events. This appears to work
> > > >> >>> normally.
> > > >> >>> 3

[Lift] Re: odd ajax issue (works every other time)

2009-11-18 Thread Marius
Ok I did some more debugging on this.


I put traces in the code and at some point when LiftRules is
requesting the session from the SessionMaster I'm seeing a different
sessionId provided to the SessionMaster thus the session is not found.
I removed my addition from LiftSession#contextFuncBuilder

//S.init(req, session) {
  S.CurrentLocation.doWith(curLoc) {
snippetMap.doWith(snippetMap.is ++ currentMap) {
  super.apply(in)
}
  }
   // }

so I commented out the S.init and I wasn't able to reproduce the
problem anymore. Therefore I took the liberty of pushing this change
into master without going through the review board process. I did this
due to the urgency nature.

Please test this and see if you can reproduce the problem


Br's,
Marius

On Nov 18, 11:11 pm, Marius  wrote:
> I've noticed this today as well but in a different context. Sometimes
> out of the sudden, I'm being kicked out of the session to the login
> page.
>
> Dave I wonder is this may have been caused by the S.init call inside
> LiftSession#contextFuncBuilder. I can't think of a reason right now on
> why would that such effect though.
>
> Br's,
> Marius
>
> On Nov 18, 10:18 pm, David Pollak 
> wrote:
>
> > Okay, I've reproduced the issue on Tomcat, so it's definitely something in
> > Lift that's borking the session
>
> > On Wed, Nov 18, 2009 at 12:00 PM, David Pollak <
>
> > feeder.of.the.be...@gmail.com> wrote:
> > > Kris,
>
> > > As far as I can tell, it's a Jetty issue.  Could you start by trying to
> > > reproduce the problem in Tomcat?  If you can repro it in Tomcat, then
> > > clearly the problem is in Lift.  If, however, the problem does not 
> > > manifest
> > > in Tomcat, then we're poking Jetty wrong.
>
> > > Thanks,
>
> > > David
>
> > > On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe <
> > > kris.nuttyco...@gmail.com> wrote:
>
> > >> I've got a few other things that I have to take care of today, but if
> > >> I can get those out of the way I will run a git bisect, compiling &
> > >> running with your test project to see if I can at least figure out the
> > >> commit that introduced the error. I've been wanting to learn about
> > >> bisect anyway. :)
>
> > >> Kris
>
> > >> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
> > >>  wrote:
>
> > >> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
> > >> >  wrote:
>
> > >> >> I am able to reproduce the problem with a simple Ajax control.
>
> > >> >> It's very, very odd.  It seems to be an intermittent failure of the
> > >> >> servlet container to find the HttpServletSession.  The client is
> > >> presenting
> > >> >> the cookie correctly, but Jetty is not recognizing it.
>
> > >> > For some reason, even though the browser sends the right cookies, Jetty
> > >> is
> > >> > not recognizing them.  This is pretty easy to reproduce with Firefox,
> > >> but I
> > >> > haven't seen it with Chrome.
>
> > >> > I'm enclosing a simple version of the project I used for testing... 
> > >> > just
> > >> > keep pressing on the button and eventually the page will reload
> > >> (indicating
> > >> > that the session was lost) or the counter will stop counting (same
> > >> > indication).
>
> > >> > I'm out of pocket for most of today (I might be on email just a 
> > >> > little).
>
> > >> > This is a super ultra mega high priority in my book.  If Marius or Tim
> > >> or
> > >> > Derek or any of the other Lift committers could shake loose time to 
> > >> > look
> > >> at
> > >> > this one, I'd really appreciate it... and Kris thanks for the
> > >> time/effort
> > >> > you've put into this.  Please keep plugging.
>
> > >> > Thanks,
>
> > >> > David
>
> > >> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
> > >> >>  wrote:
>
> > >> >>> I am able to duplicate this error. I was concerned that it might be
> > >> >>> the result of my Loc changes, so I just rebuilt Lift without the
> > >> >>> patches associated with that change and reproduced the problem again.
>
> > >> >>> Here are the conditions under which I'm able to reproduce the 
> > >> >>> failure:
>
> > >> >>> 1) load a page where the snippets are managed by a StatefulSnippet
> > >> >>> 2) some page elements (in my case select boxes) have their values
> > >> >>> update by AJAX in response to user events. This appears to work
> > >> >>> normally.
> > >> >>> 3) upon submission of the form on the page, the page is re-rendered.
> > >> >>> Logging in the submission function indicates that it is never called.
> > >> >>> 4) if I fill in the form again and resubmit after the initial 
> > >> >>> failure,
> > >> >>> the form submit behaves properly.
> > >> >>> 5) I believe I've seen at least one instance (though I can't reliably
> > >> >>> reproduce this) where just a normal AJAX call (modifying one of the
> > >> >>> select boxes) caused the entire page to reload.
>
> > >> >>> Kris
>
> > >> >>> Kris
>
> > >> >>> On Tue, Nov 17, 2009 at 4:07 PM, O'Rorke Paul 
> > >> wrote:
> > >> >>> > Not in a

[Lift] Re: Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread glenn
You can either use debugging facilities in Eclipse or, as I mostly
do,
sprinkle a lot of println or Log.info statements around. But coding it
right in the first place requires access to Lift source code, and for
that I use maven's facility for downloading source jars from the pom.
If the source jar isn't complete, or isn't in the maven repository,
I'm
out of luck.

Glenn

On Nov 18, 1:19 pm, Jeppe Nejsum Madsen  wrote:
> Kris Nuttycombe  writes:
> > On Wed, Nov 18, 2009 at 1:51 PM, Jeppe Nejsum Madsen  
> > wrote:
> >> Kris Nuttycombe  writes:
>
> >>> On Wed, Nov 18, 2009 at 12:31 PM, glenn  wrote:
>  Kris,
>
>  Don't want to clone the GitHub repo, as I need a Maven repo.
>
>  Glenn
>
> >>> Out of curiosity, is this because you have a Maven tool that helps
> >>> automate interaction with a debugger? If so I'd be interested in
> >>> learning about it - I've got a Lift bug I'm looking at now that would
> >>> probably benefit from using an actual debugger on.
>
> >> If you use Eclipse, it can automatically get the sourc files from the
> >> sources jar. "Open Type" -> Select e.g. Box -> You get the Box.scala
> >> file. It is readonly though, so you can't easily try a quick hack
>
> >> /Jeppe
>
> > Eclipse required? println debugging it is then!
>
> Yeah, 2.7.x is not that great. I'm really looking forward to 2.8, keep
> hearing lots of good stuff. But first we need Lift to work on 2.8 :-)
>
> /Jeppe

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Jeppe Nejsum Madsen
Kris Nuttycombe  writes:

> On Wed, Nov 18, 2009 at 1:51 PM, Jeppe Nejsum Madsen  wrote:
>> Kris Nuttycombe  writes:
>>
>>> On Wed, Nov 18, 2009 at 12:31 PM, glenn  wrote:
 Kris,

 Don't want to clone the GitHub repo, as I need a Maven repo.

 Glenn

>>>
>>> Out of curiosity, is this because you have a Maven tool that helps
>>> automate interaction with a debugger? If so I'd be interested in
>>> learning about it - I've got a Lift bug I'm looking at now that would
>>> probably benefit from using an actual debugger on.
>>
>> If you use Eclipse, it can automatically get the sourc files from the
>> sources jar. "Open Type" -> Select e.g. Box -> You get the Box.scala
>> file. It is readonly though, so you can't easily try a quick hack
>>
>> /Jeppe
>
> Eclipse required? println debugging it is then!

Yeah, 2.7.x is not that great. I'm really looking forward to 2.8, keep
hearing lots of good stuff. But first we need Lift to work on 2.8 :-)

/Jeppe

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: How to make Ajax call from "onLoad"/"onResize"?

2009-11-18 Thread Ross Mellgren
Yes, jsonCall is an extension of ajaxCall that automatically does the  
JSON conversion for you, which why you get an immutable.Map out of it  
rather than a blob of text. Let me know how it works out.

-Ross

On Nov 18, 2009, at 4:16 PM, jhonig wrote:

> Hi Ross,
>
> Thanks for your suggestion!  So I can actually use any jsonCall as if
> it were
> Ajax and deal with the result...  OK, nice.  Will try it out tomorrow!
>
> Job
>
> On Nov 18, 6:24 pm, Ross Mellgren  wrote:
>> (n.b. not compiled or tested, and there might be an easier way:)
>>
>> class MySnippet {
>> def handlers(ns: NodeSeq): NodeSeq = {
>> val handleResize = SHtml.jsonCall(JE.JsObj("width" ->  
>> JE.JsVar
>> ("window", "screen", "width"),
>>"height" ->
>> JE.JsVar("window", "screen", "height")),
>>   obj => {
>> val result = for {
>>m <- (Box!!obj).asA[scala.collection.immutable.Map
>> [String, Any]]
>>width  <- m.get("width").asA[Int]
>>height <- m.get("height").asA[Int]
>> } yield {
>>// do stuff with the width and height
>>
>>// some JS command to send back to the browser
>>JsCmds.Noop
>> }
>>
>> result.openOr(/* JS command to send back to browser if we
>> failed to get arguments and so on */ JsCmds.Noop)
>> })._2
>>
>> { Script {
>> Function("handleResize", Nil, handleResize)
>> } }
>> }
>>
>> }
>>
>> Then in your template say onResize="handleResize()"
>>
>> Hope that gives you some pointers,
>> -Ross
>>
>> On Nov 18, 2009, at 4:19 AM, jhonig wrote:
>>
>>> Hi All,
>>
>>> Yet another question: I need to make Ajax calls when a page is  
>>> loaded
>>> or resized.  The call would need to pass some local client  
>>> information
>>> (browser size).  The return should be javascript code that  
>>> populates a
>>> div on that page (in particular: an image that is scaled on the  
>>> server
>>> to match the browser size).   Actually, local js code is in place  
>>> that
>>> makes the call only after the user has stopped resizing (using a
>>> timeout).
>>
>>> I guess I have to use AjaxCall, providing an expression that puts  
>>> the
>>> window dimensions in an array or list, then return the javascript to
>>> add an  tag that downloads the scaled image from a generated  
>>> url.
>>
>>> Given the level of success I achieved so far, I thought I better ask
>>> if this would work our before I start trying endlessly.
>>
>>> Thanks for any suggestions,
>>
>>> Job
>>
>>> --
>>
>>> You received this message because you are subscribed to the Google
>>> Groups "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> liftweb+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/liftweb?hl=
>>> .
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Lift" group.
> To post to this group, send email to lift...@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 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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 to make Ajax call from "onLoad"/"onResize"?

2009-11-18 Thread jhonig
Hi Ross,

Thanks for your suggestion!  So I can actually use any jsonCall as if
it were
Ajax and deal with the result...  OK, nice.  Will try it out tomorrow!

Job

On Nov 18, 6:24 pm, Ross Mellgren  wrote:
> (n.b. not compiled or tested, and there might be an easier way:)
>
> class MySnippet {
>  def handlers(ns: NodeSeq): NodeSeq = {
>  val handleResize = SHtml.jsonCall(JE.JsObj("width" -> JE.JsVar
> ("window", "screen", "width"),
> "height" ->
> JE.JsVar("window", "screen", "height")),
>obj => {
>  val result = for {
> m <- (Box!!obj).asA[scala.collection.immutable.Map
> [String, Any]]
> width  <- m.get("width").asA[Int]
> height <- m.get("height").asA[Int]
>  } yield {
> // do stuff with the width and height
>
> // some JS command to send back to the browser
> JsCmds.Noop
>  }
>
>  result.openOr(/* JS command to send back to browser if we
> failed to get arguments and so on */ JsCmds.Noop)
>  })._2
>
>  { Script {
>  Function("handleResize", Nil, handleResize)
>  } }
>  }
>
> }
>
> Then in your template say onResize="handleResize()"
>
> Hope that gives you some pointers,
> -Ross
>
> On Nov 18, 2009, at 4:19 AM, jhonig wrote:
>
> > Hi All,
>
> > Yet another question: I need to make Ajax calls when a page is loaded
> > or resized.  The call would need to pass some local client information
> > (browser size).  The return should be javascript code that populates a
> > div on that page (in particular: an image that is scaled on the server
> > to match the browser size).   Actually, local js code is in place that
> > makes the call only after the user has stopped resizing (using a
> > timeout).
>
> > I guess I have to use AjaxCall, providing an expression that puts the
> > window dimensions in an array or list, then return the javascript to
> > add an  tag that downloads the scaled image from a generated url.
>
> > Given the level of success I achieved so far, I thought I better ask
> > if this would work our before I start trying endlessly.
>
> > Thanks for any suggestions,
>
> > Job
>
> > --
>
> > You received this message because you are subscribed to the Google
> > Groups "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=
> > .

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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: odd ajax issue (works every other time)

2009-11-18 Thread Marius
I've noticed this today as well but in a different context. Sometimes
out of the sudden, I'm being kicked out of the session to the login
page.

Dave I wonder is this may have been caused by the S.init call inside
LiftSession#contextFuncBuilder. I can't think of a reason right now on
why would that such effect though.

Br's,
Marius

On Nov 18, 10:18 pm, David Pollak 
wrote:
> Okay, I've reproduced the issue on Tomcat, so it's definitely something in
> Lift that's borking the session
>
> On Wed, Nov 18, 2009 at 12:00 PM, David Pollak <
>
> feeder.of.the.be...@gmail.com> wrote:
> > Kris,
>
> > As far as I can tell, it's a Jetty issue.  Could you start by trying to
> > reproduce the problem in Tomcat?  If you can repro it in Tomcat, then
> > clearly the problem is in Lift.  If, however, the problem does not manifest
> > in Tomcat, then we're poking Jetty wrong.
>
> > Thanks,
>
> > David
>
> > On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe <
> > kris.nuttyco...@gmail.com> wrote:
>
> >> I've got a few other things that I have to take care of today, but if
> >> I can get those out of the way I will run a git bisect, compiling &
> >> running with your test project to see if I can at least figure out the
> >> commit that introduced the error. I've been wanting to learn about
> >> bisect anyway. :)
>
> >> Kris
>
> >> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
> >>  wrote:
>
> >> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
> >> >  wrote:
>
> >> >> I am able to reproduce the problem with a simple Ajax control.
>
> >> >> It's very, very odd.  It seems to be an intermittent failure of the
> >> >> servlet container to find the HttpServletSession.  The client is
> >> presenting
> >> >> the cookie correctly, but Jetty is not recognizing it.
>
> >> > For some reason, even though the browser sends the right cookies, Jetty
> >> is
> >> > not recognizing them.  This is pretty easy to reproduce with Firefox,
> >> but I
> >> > haven't seen it with Chrome.
>
> >> > I'm enclosing a simple version of the project I used for testing... just
> >> > keep pressing on the button and eventually the page will reload
> >> (indicating
> >> > that the session was lost) or the counter will stop counting (same
> >> > indication).
>
> >> > I'm out of pocket for most of today (I might be on email just a little).
>
> >> > This is a super ultra mega high priority in my book.  If Marius or Tim
> >> or
> >> > Derek or any of the other Lift committers could shake loose time to look
> >> at
> >> > this one, I'd really appreciate it... and Kris thanks for the
> >> time/effort
> >> > you've put into this.  Please keep plugging.
>
> >> > Thanks,
>
> >> > David
>
> >> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
> >> >>  wrote:
>
> >> >>> I am able to duplicate this error. I was concerned that it might be
> >> >>> the result of my Loc changes, so I just rebuilt Lift without the
> >> >>> patches associated with that change and reproduced the problem again.
>
> >> >>> Here are the conditions under which I'm able to reproduce the failure:
>
> >> >>> 1) load a page where the snippets are managed by a StatefulSnippet
> >> >>> 2) some page elements (in my case select boxes) have their values
> >> >>> update by AJAX in response to user events. This appears to work
> >> >>> normally.
> >> >>> 3) upon submission of the form on the page, the page is re-rendered.
> >> >>> Logging in the submission function indicates that it is never called.
> >> >>> 4) if I fill in the form again and resubmit after the initial failure,
> >> >>> the form submit behaves properly.
> >> >>> 5) I believe I've seen at least one instance (though I can't reliably
> >> >>> reproduce this) where just a normal AJAX call (modifying one of the
> >> >>> select boxes) caused the entire page to reload.
>
> >> >>> Kris
>
> >> >>> Kris
>
> >> >>> On Tue, Nov 17, 2009 at 4:07 PM, O'Rorke Paul 
> >> wrote:
> >> >>> > Not in a place where I can really debug this right now but I'm
> >> curious
> >> >>> > whether anybody else has seen this and knows the solution...
>
> >> >>> > since rebuilding a day or two ago with no recent code or other
> >> changes:
> >> >>> > every second time I go to click on an ajax checkbox or select
> >> widget,
> >> >>> > I get effectively no response.
> >> >>> > actually, it looks like there is a very quick spinning wheel (almost
> >> >>> > imperceptible) but the page doesn't  get  repainted and the database
> >> >>> > does not change.
> >> >>> > If  I use another operation that is non ajax (going in and editing
> >> an
> >> >>> > item and doing old fashioned get / posts) everything works fine
> >> after
> >> >>> > that (one time).
> >> >>> > Or if I reload the page then if I use an ajax widget after reloading
> >> >>> > ajax works (once).
>
> >> >>> > This is with 2.7.5 Scala and Lift 1.1-SNAPSHOT.
>
> >> >>> > Perhaps not coincidentally, I am getting "Multiple versions of scala
> >> >>> > libraries detected!" warnings and have not yet figured out how to
>

Re: [Lift] odd ajax issue (works every other time)

2009-11-18 Thread Kris Nuttycombe
I'm reproducing it on Glassfish, so yes I think it's Lift.

Kris

On Wed, Nov 18, 2009 at 1:18 PM, David Pollak
 wrote:
> Okay, I've reproduced the issue on Tomcat, so it's definitely something in
> Lift that's borking the session
>
> On Wed, Nov 18, 2009 at 12:00 PM, David Pollak
>  wrote:
>>
>> Kris,
>>
>> As far as I can tell, it's a Jetty issue.  Could you start by trying to
>> reproduce the problem in Tomcat?  If you can repro it in Tomcat, then
>> clearly the problem is in Lift.  If, however, the problem does not manifest
>> in Tomcat, then we're poking Jetty wrong.
>>
>> Thanks,
>>
>> David
>>
>> On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe
>>  wrote:
>>>
>>> I've got a few other things that I have to take care of today, but if
>>> I can get those out of the way I will run a git bisect, compiling &
>>> running with your test project to see if I can at least figure out the
>>> commit that introduced the error. I've been wanting to learn about
>>> bisect anyway. :)
>>>
>>> Kris
>>>
>>> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
>>>  wrote:
>>> >
>>> >
>>> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
>>> >  wrote:
>>> >>
>>> >> I am able to reproduce the problem with a simple Ajax control.
>>> >>
>>> >> It's very, very odd.  It seems to be an intermittent failure of the
>>> >> servlet container to find the HttpServletSession.  The client is
>>> >> presenting
>>> >> the cookie correctly, but Jetty is not recognizing it.
>>> >
>>> > For some reason, even though the browser sends the right cookies, Jetty
>>> > is
>>> > not recognizing them.  This is pretty easy to reproduce with Firefox,
>>> > but I
>>> > haven't seen it with Chrome.
>>> >
>>> > I'm enclosing a simple version of the project I used for testing...
>>> > just
>>> > keep pressing on the button and eventually the page will reload
>>> > (indicating
>>> > that the session was lost) or the counter will stop counting (same
>>> > indication).
>>> >
>>> > I'm out of pocket for most of today (I might be on email just a
>>> > little).
>>> >
>>> > This is a super ultra mega high priority in my book.  If Marius or Tim
>>> > or
>>> > Derek or any of the other Lift committers could shake loose time to
>>> > look at
>>> > this one, I'd really appreciate it... and Kris thanks for the
>>> > time/effort
>>> > you've put into this.  Please keep plugging.
>>> >
>>> > Thanks,
>>> >
>>> > David
>>> >
>>> >>
>>> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
>>> >>  wrote:
>>> >>>
>>> >>> I am able to duplicate this error. I was concerned that it might be
>>> >>> the result of my Loc changes, so I just rebuilt Lift without the
>>> >>> patches associated with that change and reproduced the problem again.
>>> >>>
>>> >>> Here are the conditions under which I'm able to reproduce the
>>> >>> failure:
>>> >>>
>>> >>> 1) load a page where the snippets are managed by a StatefulSnippet
>>> >>> 2) some page elements (in my case select boxes) have their values
>>> >>> update by AJAX in response to user events. This appears to work
>>> >>> normally.
>>> >>> 3) upon submission of the form on the page, the page is re-rendered.
>>> >>> Logging in the submission function indicates that it is never called.
>>> >>> 4) if I fill in the form again and resubmit after the initial
>>> >>> failure,
>>> >>> the form submit behaves properly.
>>> >>> 5) I believe I've seen at least one instance (though I can't reliably
>>> >>> reproduce this) where just a normal AJAX call (modifying one of the
>>> >>> select boxes) caused the entire page to reload.
>>> >>>
>>> >>> Kris
>>> >>>
>>> >>> Kris
>>> >>>
>>> >>> On Tue, Nov 17, 2009 at 4:07 PM, O'Rorke Paul 
>>> >>> wrote:
>>> >>> > Not in a place where I can really debug this right now but I'm
>>> >>> > curious
>>> >>> > whether anybody else has seen this and knows the solution...
>>> >>> >
>>> >>> > since rebuilding a day or two ago with no recent code or other
>>> >>> > changes:
>>> >>> > every second time I go to click on an ajax checkbox or select
>>> >>> > widget,
>>> >>> > I get effectively no response.
>>> >>> > actually, it looks like there is a very quick spinning wheel
>>> >>> > (almost
>>> >>> > imperceptible) but the page doesn't  get  repainted and the
>>> >>> > database
>>> >>> > does not change.
>>> >>> > If  I use another operation that is non ajax (going in and editing
>>> >>> > an
>>> >>> > item and doing old fashioned get / posts) everything works fine
>>> >>> > after
>>> >>> > that (one time).
>>> >>> > Or if I reload the page then if I use an ajax widget after
>>> >>> > reloading
>>> >>> > ajax works (once).
>>> >>> >
>>> >>> > This is with 2.7.5 Scala and Lift 1.1-SNAPSHOT.
>>> >>> >
>>> >>> > Perhaps not coincidentally, I am getting "Multiple versions of
>>> >>> > scala
>>> >>> > libraries detected!" warnings and have not yet figured out how to
>>> >>> > get
>>> >>> > rid of them.
>>> >>> > I don't see another version of Scala in my pom or eclipse maven
>>> >>> > dependency graph and have been going aro

Re: [Lift] Re: Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Kris Nuttycombe
On Wed, Nov 18, 2009 at 1:51 PM, Jeppe Nejsum Madsen  wrote:
> Kris Nuttycombe  writes:
>
>> On Wed, Nov 18, 2009 at 12:31 PM, glenn  wrote:
>>> Kris,
>>>
>>> Don't want to clone the GitHub repo, as I need a Maven repo.
>>>
>>> Glenn
>>>
>>
>> Out of curiosity, is this because you have a Maven tool that helps
>> automate interaction with a debugger? If so I'd be interested in
>> learning about it - I've got a Lift bug I'm looking at now that would
>> probably benefit from using an actual debugger on.
>
> If you use Eclipse, it can automatically get the sourc files from the
> sources jar. "Open Type" -> Select e.g. Box -> You get the Box.scala
> file. It is readonly though, so you can't easily try a quick hack
>
> /Jeppe

Eclipse required? println debugging it is then!

:)

>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] Presenting on Lift @ NYC Scala Meetup: Dec 7

2009-11-18 Thread harryh
For anyone who lives in the NYC are and would be interested in this
sort of thing:

http://www.meetup.com/New-York-Scala-Enthusiasts/calendar/11900384/

-harryh

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Jeppe Nejsum Madsen
Kris Nuttycombe  writes:

> On Wed, Nov 18, 2009 at 12:31 PM, glenn  wrote:
>> Kris,
>>
>> Don't want to clone the GitHub repo, as I need a Maven repo.
>>
>> Glenn
>>
>
> Out of curiosity, is this because you have a Maven tool that helps
> automate interaction with a debugger? If so I'd be interested in
> learning about it - I've got a Lift bug I'm looking at now that would
> probably benefit from using an actual debugger on.

If you use Eclipse, it can automatically get the sourc files from the
sources jar. "Open Type" -> Select e.g. Box -> You get the Box.scala
file. It is readonly though, so you can't easily try a quick hack

/Jeppe

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] Lift Scaladocs for Maven?

2009-11-18 Thread braver
Perhaps I'm not looking in the right place, but I didn't find the
scaladocs alongside the jars and source.jars for Lift in the usual
maven repo.
Are we supposed to use scaladoc manually, or IDEs, to generate the API
docs?

Also, I'm interested in liftweb-actor separately, and see its jar and
source.jar in the maven repo.  Is there a pre-cooked scaladoc
somewhere?

Thanks,
Alexy

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Kris Nuttycombe
On Wed, Nov 18, 2009 at 12:31 PM, glenn  wrote:
> Kris,
>
> Don't want to clone the GitHub repo, as I need a Maven repo.
>
> Glenn
>

Out of curiosity, is this because you have a Maven tool that helps
automate interaction with a debugger? If so I'd be interested in
learning about it - I've got a Lift bug I'm looking at now that would
probably benefit from using an actual debugger on.

Kris

> On Nov 18, 11:19 am, Indrajit Raychaudhuri 
> wrote:
>> Still, something looks wrong:
>>
>> http://scala-tools.org/repo-releases/net/liftweb/lift-webkit/1.1-M7/l...
>> has the .scala sources
>>
>> buthttp://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA...
>> doesn't.
>>
>> - Indrajit
>>
>> On 19/11/09 12:32 AM, Kris Nuttycombe wrote:
>>
>> > I recommend cloning dpp's github repository:http://github.com/dpp/liftweb
>>
>> > Kris
>>
>> > On Wed, Nov 18, 2009 at 11:41 AM, glenn  wrote:
>> >> Where are all the java source files in
>> >>http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA...
>>
>> >> It's kind of hard to debug without them.
>>
>> >> Glenn
>>
>> >> --
>>
>> >> You received this message because you are subscribed to the Google Groups 
>> >> "Lift" group.
>> >> To post to this group, send email to lift...@googlegroups.com.
>> >> To unsubscribe from this group, send email to 
>> >> liftweb+unsubscr...@googlegroups.com.
>> >> For more options, visit this group 
>> >> athttp://groups.google.com/group/liftweb?hl=en.
>>
>> > --
>>
>> > You received this message because you are subscribed to the Google Groups 
>> > "Lift" group.
>> > To post to this group, send email to lift...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > liftweb+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/liftweb?hl=en.
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Indrajit Raychaudhuri

Tried a local build, sources.jar contains the *.scala files. And so does 
1.1-M7. In both cases, they were built outside Hudson (Chas probably 
builds outside Hudson).

At the moment I am suspecting Hudson, needs more investigation.

- Indrajit

On 19/11/09 1:49 AM, Jeppe Nejsum Madsen wrote:
> glenn  writes:
>
>> Where are all the java source files in
>> http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNAPSHOT/lift-webkit-1.1-SNAPSHOT-sources.jar?
>>
>> It's kind of hard to debug without them.
>
> FWIW, http://github.com/dpp/liftweb/issues#issue/167
>
> /Jeppe
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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.
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Jeppe Nejsum Madsen
glenn  writes:

> Where are all the java source files in
> http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNAPSHOT/lift-webkit-1.1-SNAPSHOT-sources.jar?
>
> It's kind of hard to debug without them.

FWIW, http://github.com/dpp/liftweb/issues#issue/167

/Jeppe

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] odd ajax issue (works every other time)

2009-11-18 Thread David Pollak
Okay, I've reproduced the issue on Tomcat, so it's definitely something in
Lift that's borking the session

On Wed, Nov 18, 2009 at 12:00 PM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

> Kris,
>
> As far as I can tell, it's a Jetty issue.  Could you start by trying to
> reproduce the problem in Tomcat?  If you can repro it in Tomcat, then
> clearly the problem is in Lift.  If, however, the problem does not manifest
> in Tomcat, then we're poking Jetty wrong.
>
> Thanks,
>
> David
>
>
> On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe <
> kris.nuttyco...@gmail.com> wrote:
>
>> I've got a few other things that I have to take care of today, but if
>> I can get those out of the way I will run a git bisect, compiling &
>> running with your test project to see if I can at least figure out the
>> commit that introduced the error. I've been wanting to learn about
>> bisect anyway. :)
>>
>> Kris
>>
>> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
>>  wrote:
>> >
>> >
>> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
>> >  wrote:
>> >>
>> >> I am able to reproduce the problem with a simple Ajax control.
>> >>
>> >> It's very, very odd.  It seems to be an intermittent failure of the
>> >> servlet container to find the HttpServletSession.  The client is
>> presenting
>> >> the cookie correctly, but Jetty is not recognizing it.
>> >
>> > For some reason, even though the browser sends the right cookies, Jetty
>> is
>> > not recognizing them.  This is pretty easy to reproduce with Firefox,
>> but I
>> > haven't seen it with Chrome.
>> >
>> > I'm enclosing a simple version of the project I used for testing... just
>> > keep pressing on the button and eventually the page will reload
>> (indicating
>> > that the session was lost) or the counter will stop counting (same
>> > indication).
>> >
>> > I'm out of pocket for most of today (I might be on email just a little).
>> >
>> > This is a super ultra mega high priority in my book.  If Marius or Tim
>> or
>> > Derek or any of the other Lift committers could shake loose time to look
>> at
>> > this one, I'd really appreciate it... and Kris thanks for the
>> time/effort
>> > you've put into this.  Please keep plugging.
>> >
>> > Thanks,
>> >
>> > David
>> >
>> >>
>> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
>> >>  wrote:
>> >>>
>> >>> I am able to duplicate this error. I was concerned that it might be
>> >>> the result of my Loc changes, so I just rebuilt Lift without the
>> >>> patches associated with that change and reproduced the problem again.
>> >>>
>> >>> Here are the conditions under which I'm able to reproduce the failure:
>> >>>
>> >>> 1) load a page where the snippets are managed by a StatefulSnippet
>> >>> 2) some page elements (in my case select boxes) have their values
>> >>> update by AJAX in response to user events. This appears to work
>> >>> normally.
>> >>> 3) upon submission of the form on the page, the page is re-rendered.
>> >>> Logging in the submission function indicates that it is never called.
>> >>> 4) if I fill in the form again and resubmit after the initial failure,
>> >>> the form submit behaves properly.
>> >>> 5) I believe I've seen at least one instance (though I can't reliably
>> >>> reproduce this) where just a normal AJAX call (modifying one of the
>> >>> select boxes) caused the entire page to reload.
>> >>>
>> >>> Kris
>> >>>
>> >>> Kris
>> >>>
>> >>> On Tue, Nov 17, 2009 at 4:07 PM, O'Rorke Paul 
>> wrote:
>> >>> > Not in a place where I can really debug this right now but I'm
>> curious
>> >>> > whether anybody else has seen this and knows the solution...
>> >>> >
>> >>> > since rebuilding a day or two ago with no recent code or other
>> changes:
>> >>> > every second time I go to click on an ajax checkbox or select
>> widget,
>> >>> > I get effectively no response.
>> >>> > actually, it looks like there is a very quick spinning wheel (almost
>> >>> > imperceptible) but the page doesn't  get  repainted and the database
>> >>> > does not change.
>> >>> > If  I use another operation that is non ajax (going in and editing
>> an
>> >>> > item and doing old fashioned get / posts) everything works fine
>> after
>> >>> > that (one time).
>> >>> > Or if I reload the page then if I use an ajax widget after reloading
>> >>> > ajax works (once).
>> >>> >
>> >>> > This is with 2.7.5 Scala and Lift 1.1-SNAPSHOT.
>> >>> >
>> >>> > Perhaps not coincidentally, I am getting "Multiple versions of scala
>> >>> > libraries detected!" warnings and have not yet figured out how to
>> get
>> >>> > rid of them.
>> >>> > I don't see another version of Scala in my pom or eclipse maven
>> >>> > dependency graph and have been going around nuking old copies of
>> scala
>> >>> > but to no avail as yet.
>> >>> >
>> >>> > Another odd thing that is now happening is that when I shutdown with
>> a
>> >>> > control C in the terminal window, I get the following error:
>> >>> >
>> >>> >> INFO - Service request (GET) /ajax_request/liftAjax.js took 2
>

Re: [Lift] odd ajax issue (works every other time)

2009-11-18 Thread David Pollak
Kris,

As far as I can tell, it's a Jetty issue.  Could you start by trying to
reproduce the problem in Tomcat?  If you can repro it in Tomcat, then
clearly the problem is in Lift.  If, however, the problem does not manifest
in Tomcat, then we're poking Jetty wrong.

Thanks,

David

On Wed, Nov 18, 2009 at 8:07 AM, Kris Nuttycombe
wrote:

> I've got a few other things that I have to take care of today, but if
> I can get those out of the way I will run a git bisect, compiling &
> running with your test project to see if I can at least figure out the
> commit that introduced the error. I've been wanting to learn about
> bisect anyway. :)
>
> Kris
>
> On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
>  wrote:
> >
> >
> > On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
> >  wrote:
> >>
> >> I am able to reproduce the problem with a simple Ajax control.
> >>
> >> It's very, very odd.  It seems to be an intermittent failure of the
> >> servlet container to find the HttpServletSession.  The client is
> presenting
> >> the cookie correctly, but Jetty is not recognizing it.
> >
> > For some reason, even though the browser sends the right cookies, Jetty
> is
> > not recognizing them.  This is pretty easy to reproduce with Firefox, but
> I
> > haven't seen it with Chrome.
> >
> > I'm enclosing a simple version of the project I used for testing... just
> > keep pressing on the button and eventually the page will reload
> (indicating
> > that the session was lost) or the counter will stop counting (same
> > indication).
> >
> > I'm out of pocket for most of today (I might be on email just a little).
> >
> > This is a super ultra mega high priority in my book.  If Marius or Tim or
> > Derek or any of the other Lift committers could shake loose time to look
> at
> > this one, I'd really appreciate it... and Kris thanks for the time/effort
> > you've put into this.  Please keep plugging.
> >
> > Thanks,
> >
> > David
> >
> >>
> >> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
> >>  wrote:
> >>>
> >>> I am able to duplicate this error. I was concerned that it might be
> >>> the result of my Loc changes, so I just rebuilt Lift without the
> >>> patches associated with that change and reproduced the problem again.
> >>>
> >>> Here are the conditions under which I'm able to reproduce the failure:
> >>>
> >>> 1) load a page where the snippets are managed by a StatefulSnippet
> >>> 2) some page elements (in my case select boxes) have their values
> >>> update by AJAX in response to user events. This appears to work
> >>> normally.
> >>> 3) upon submission of the form on the page, the page is re-rendered.
> >>> Logging in the submission function indicates that it is never called.
> >>> 4) if I fill in the form again and resubmit after the initial failure,
> >>> the form submit behaves properly.
> >>> 5) I believe I've seen at least one instance (though I can't reliably
> >>> reproduce this) where just a normal AJAX call (modifying one of the
> >>> select boxes) caused the entire page to reload.
> >>>
> >>> Kris
> >>>
> >>> Kris
> >>>
> >>> On Tue, Nov 17, 2009 at 4:07 PM, O'Rorke Paul  wrote:
> >>> > Not in a place where I can really debug this right now but I'm
> curious
> >>> > whether anybody else has seen this and knows the solution...
> >>> >
> >>> > since rebuilding a day or two ago with no recent code or other
> changes:
> >>> > every second time I go to click on an ajax checkbox or select widget,
> >>> > I get effectively no response.
> >>> > actually, it looks like there is a very quick spinning wheel (almost
> >>> > imperceptible) but the page doesn't  get  repainted and the database
> >>> > does not change.
> >>> > If  I use another operation that is non ajax (going in and editing an
> >>> > item and doing old fashioned get / posts) everything works fine after
> >>> > that (one time).
> >>> > Or if I reload the page then if I use an ajax widget after reloading
> >>> > ajax works (once).
> >>> >
> >>> > This is with 2.7.5 Scala and Lift 1.1-SNAPSHOT.
> >>> >
> >>> > Perhaps not coincidentally, I am getting "Multiple versions of scala
> >>> > libraries detected!" warnings and have not yet figured out how to get
> >>> > rid of them.
> >>> > I don't see another version of Scala in my pom or eclipse maven
> >>> > dependency graph and have been going around nuking old copies of
> scala
> >>> > but to no avail as yet.
> >>> >
> >>> > Another odd thing that is now happening is that when I shutdown with
> a
> >>> > control C in the terminal window, I get the following error:
> >>> >
> >>> >> INFO - Service request (GET) /ajax_request/liftAjax.js took 2
> >>> >> Milliseconds
> >>> >> ^C2009-11-16 15:29:01.634::INFO:  Shutdown hook executing
> >>> >> 2009-11-16 15:29:02.249::INFO:  Shutdown hook complete
> >>> >> [INFO] Jetty server exiting.
> >>> >> [INFO]
> >>> >>
> >>> >>
> 
> >>> >> [INFO] BUILD SUCCESSFUL
> >>> >> [INFO]
> >>> >>
> >>> >>
> 

Re: [Lift] Re: Firefox error in returning a CreatedResponse

2009-11-18 Thread David Pollak
On Wed, Nov 18, 2009 at 11:40 AM, Ross Mellgren  wrote:

> It's less rigorous. The reason you have to turn it off it is makes
> some javascript fail to work. Lift itself and all it generates (to my
> knowledge) out of the box works with it on, but some third party
> libraries don't like it on, as it disables document.write.
>
> I don't think offhand there's any particular problem with having it
> off other than it's not as nice.
>

Having XHTML and using the proper mime type ensures compliant rendering
(your pages look the same) across all non-IE browsers (I've only found one
very minor exception to this rule between FF and Safari 3.)

If you are using text/html, browsers may choose different rendering/layout
rules (tag soup.)


>
> -Ross
>
> On Nov 18, 2009, at 2:36 PM, glenn wrote:
>
> > Ross,
> >
> > Yep, that fixes it. Thanks, although I'm not sure if the
> > solution is worse than the problem. I mean, what possible
> > side affects could turning off the use of Xhtml mime type have?
> >
> > Glenn
> >
> > On Nov 18, 11:23 am, Ross Mellgren  wrote:
> >> Try turning off the XHTML mime type by putting
> >>
> >> LiftRules.useXhtmlMimeType = false
> >>
> >> into your Boot and see if it goes away?
> >>
> >> -Ross
> >>
> >> On Nov 18, 2009, at 2:21 PM, glenn wrote:
> >>
> >>> I'm returning  Full(CreatedResponse(form, "text/xhtml" )) in
> >>> LiftRules.DispatchPF, where form is just a MetaMapper.toForm node,
> >>> which works fine in IE but fails in Firefox with the following
> >>> error.
> >>
> >>> XML or text declaration not at start of entity
> >>> [Break on this error] http://www.w3.org/1999/xhtml";> >>> xml
> >>> version="1.0" encoding="UTF-8"?> (line 1)
> >>> uncaught exception: [Exception... "Component returned failure code:
> >>> 0x80004003 (NS_ERROR_INVALID_POINTER)
> >>> [nsIDOMNSHTMLElement.innerHTML]"
> >>> nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
> >>> frame ::http://localhost:8080/classpath/jquery.js:: anonymous ::
> >>> line 251" data: no]
> >>
> >>> Anyone have an idea why this happening?
> >>
> >>> Glenn
> >>
> >>> --
> >>
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Lift" group.
> >>> To post to this group, send email to lift...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> >>> .
> >>> For more options, visit this group athttp://
> groups.google.com/group/liftweb?hl=en
> >>> .
> >
> > --
> >
> > You received this message because you are subscribed to the Google
> > Groups "Lift" group.
> > To post to this group, send email to lift...@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
> > .
> >
> >
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Where are the dragons hiding?

2009-11-18 Thread Eros Candelaresi
Hi,

Marius wrote:
> On Nov 18, 6:31 pm, Paul Butcher  wrote:
>   
>> I'm seriously considering Lift for a new project. I know what the
>> benefits of Scala and Lift are (that's why I'm seriously considering
>> this as a route forwards :-) What I'm wondering is whether there are
>> any lurking nasties that I should be aware of (so that I can avoid
>> learning about them the hard way).
>> 
>
> Not sure if there is any. One thing though Lift's session state is
> kept in memory and not serialized in the DB. Session serialization is
> a bit tricky since we keep the bound functions on the session state.
> Those functions are in many cases anonymous function that may hold
> other references which are not serializable. Even if everything is
> serializable using Java serialization is likely suboptimal. But
> keeping the sessions in memory and have a session affinity load
> balancing is a very good choice from performance perspective.
>
>   
There are people playing around with Terracotta 
(http://www.terracotta.org/web/display/orgsite/Platform) and Lift. There 
seems to be some success regarding actors running on a cluster. No idea 
if Terracotta plays well with Lift session handling. There's only an 
unanswered post in the ML archive on that.

Regards,
Eros

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Firefox error in returning a CreatedResponse

2009-11-18 Thread Ross Mellgren
It's less rigorous. The reason you have to turn it off it is makes  
some javascript fail to work. Lift itself and all it generates (to my  
knowledge) out of the box works with it on, but some third party  
libraries don't like it on, as it disables document.write.

I don't think offhand there's any particular problem with having it  
off other than it's not as nice.

-Ross

On Nov 18, 2009, at 2:36 PM, glenn wrote:

> Ross,
>
> Yep, that fixes it. Thanks, although I'm not sure if the
> solution is worse than the problem. I mean, what possible
> side affects could turning off the use of Xhtml mime type have?
>
> Glenn
>
> On Nov 18, 11:23 am, Ross Mellgren  wrote:
>> Try turning off the XHTML mime type by putting
>>
>> LiftRules.useXhtmlMimeType = false
>>
>> into your Boot and see if it goes away?
>>
>> -Ross
>>
>> On Nov 18, 2009, at 2:21 PM, glenn wrote:
>>
>>> I'm returning  Full(CreatedResponse(form, "text/xhtml" )) in
>>> LiftRules.DispatchPF, where form is just a MetaMapper.toForm node,
>>> which works fine in IE but fails in Firefox with the following  
>>> error.
>>
>>> XML or text declaration not at start of entity
>>> [Break on this error] http://www.w3.org/1999/xhtml";>>> xml
>>> version="1.0" encoding="UTF-8"?> (line 1)
>>> uncaught exception: [Exception... "Component returned failure code:
>>> 0x80004003 (NS_ERROR_INVALID_POINTER)  
>>> [nsIDOMNSHTMLElement.innerHTML]"
>>> nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
>>> frame ::http://localhost:8080/classpath/jquery.js:: anonymous ::
>>> line 251" data: no]
>>
>>> Anyone have an idea why this happening?
>>
>>> Glenn
>>
>>> --
>>
>>> You received this message because you are subscribed to the Google
>>> Groups "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> liftweb+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/liftweb?hl=en
>>> .
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Lift" group.
> To post to this group, send email to lift...@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 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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: Firefox error in returning a CreatedResponse

2009-11-18 Thread glenn
Ross,

Yep, that fixes it. Thanks, although I'm not sure if the
solution is worse than the problem. I mean, what possible
side affects could turning off the use of Xhtml mime type have?

Glenn

On Nov 18, 11:23 am, Ross Mellgren  wrote:
> Try turning off the XHTML mime type by putting
>
> LiftRules.useXhtmlMimeType = false
>
> into your Boot and see if it goes away?
>
> -Ross
>
> On Nov 18, 2009, at 2:21 PM, glenn wrote:
>
> > I'm returning  Full(CreatedResponse(form, "text/xhtml" )) in
> > LiftRules.DispatchPF, where form is just a MetaMapper.toForm node,
> > which works fine in IE but fails in Firefox with the following error.
>
> > XML or text declaration not at start of entity
> > [Break on this error] http://www.w3.org/1999/xhtml";> > version="1.0" encoding="UTF-8"?> (line 1)
> > uncaught exception: [Exception... "Component returned failure code:
> > 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]"
> > nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
> > frame ::http://localhost:8080/classpath/jquery.js:: anonymous ::
> > line 251" data: no]
>
> > Anyone have an idea why this happening?
>
> > Glenn
>
> > --
>
> > You received this message because you are subscribed to the Google  
> > Groups "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=en
> > .

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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: Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread glenn
Kris,

Don't want to clone the GitHub repo, as I need a Maven repo.

Glenn

On Nov 18, 11:19 am, Indrajit Raychaudhuri 
wrote:
> Still, something looks wrong:
>
> http://scala-tools.org/repo-releases/net/liftweb/lift-webkit/1.1-M7/l...
> has the .scala sources
>
> buthttp://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA...
> doesn't.
>
> - Indrajit
>
> On 19/11/09 12:32 AM, Kris Nuttycombe wrote:
>
> > I recommend cloning dpp's github repository:http://github.com/dpp/liftweb
>
> > Kris
>
> > On Wed, Nov 18, 2009 at 11:41 AM, glenn  wrote:
> >> Where are all the java source files in
> >>http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA...
>
> >> It's kind of hard to debug without them.
>
> >> Glenn
>
> >> --
>
> >> You received this message because you are subscribed to the Google Groups 
> >> "Lift" group.
> >> To post to this group, send email to lift...@googlegroups.com.
> >> To unsubscribe from this group, send email to 
> >> liftweb+unsubscr...@googlegroups.com.
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/liftweb?hl=en.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Firefox error in returning a CreatedResponse

2009-11-18 Thread Ross Mellgren
Try turning off the XHTML mime type by putting

LiftRules.useXhtmlMimeType = false

into your Boot and see if it goes away?

-Ross

On Nov 18, 2009, at 2:21 PM, glenn wrote:

> I'm returning  Full(CreatedResponse(form, "text/xhtml" )) in
> LiftRules.DispatchPF, where form is just a MetaMapper.toForm node,
> which works fine in IE but fails in Firefox with the following error.
>
> XML or text declaration not at start of entity
> [Break on this error] http://www.w3.org/1999/xhtml";> version="1.0" encoding="UTF-8"?> (line 1)
> uncaught exception: [Exception... "Component returned failure code:
> 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]"
> nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
> frame :: http://localhost:8080/classpath/jquery.js :: anonymous ::
> line 251" data: no]
>
>
> Anyone have an idea why this happening?
>
> Glenn
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Lift" group.
> To post to this group, send email to lift...@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 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] Firefox error in returning a CreatedResponse

2009-11-18 Thread glenn
I'm returning  Full(CreatedResponse(form, "text/xhtml" )) in
LiftRules.DispatchPF, where form is just a MetaMapper.toForm node,
which works fine in IE but fails in Firefox with the following error.

XML or text declaration not at start of entity
[Break on this error] http://www.w3.org/1999/xhtml";> (line 1)
uncaught exception: [Exception... "Component returned failure code:
0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]"
nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
frame :: http://localhost:8080/classpath/jquery.js :: anonymous ::
line 251" data: no]


Anyone have an idea why this happening?

Glenn





--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Indrajit Raychaudhuri
Still, something looks wrong:

http://scala-tools.org/repo-releases/net/liftweb/lift-webkit/1.1-M7/lift-webkit-1.1-M7-sources.jar
 
has the .scala sources

but 
http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNAPSHOT/lift-webkit-1.1-SNAPSHOT-sources.jar
 
doesn't.

- Indrajit


On 19/11/09 12:32 AM, Kris Nuttycombe wrote:
> I recommend cloning dpp's github repository: http://github.com/dpp/liftweb
>
> Kris
>
> On Wed, Nov 18, 2009 at 11:41 AM, glenn  wrote:
>> Where are all the java source files in
>> http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNAPSHOT/lift-webkit-1.1-SNAPSHOT-sources.jar?
>>
>> It's kind of hard to debug without them.
>>
>> Glenn
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "Lift" group.
>> To post to this group, send email to lift...@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.
>>
>>
>>
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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.
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Kris Nuttycombe
I recommend cloning dpp's github repository: http://github.com/dpp/liftweb

Kris

On Wed, Nov 18, 2009 at 11:41 AM, glenn  wrote:
> Where are all the java source files in
> http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNAPSHOT/lift-webkit-1.1-SNAPSHOT-sources.jar?
>
> It's kind of hard to debug without them.
>
> Glenn
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread glenn
Where are all the java source files in
http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNAPSHOT/lift-webkit-1.1-SNAPSHOT-sources.jar?

It's kind of hard to debug without them.

Glenn

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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: Where are the dragons hiding?

2009-11-18 Thread harryh
See this thread:

http://groups.google.com/group/liftweb/browse_thread/thread/4a174ecf34873967/

In which we discuss how certain queries generated by Mapper perform
very poorly on MySQL.  Certainly this problem could be addressed, but
until it is using Mapper with MySQL will be problematic.

-harryh

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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: Where are the dragons hiding?

2009-11-18 Thread Marius
If I may .. this statement is confusing leading to incorrect
interpretation. Lift works with MySQL as ANY Java application. Harry
may have referred to Lift's Mapper framework which for MySql may be
some problems that I'm not aware of. But if MySQL becomes critical for
you I'm sure things can be prioritized.

On Nov 18, 8:23 pm, cody koeninger  wrote:
> On Nov 18, 11:32 am, harryh  wrote:
>
> > - Don't use Lift with MySQL, they don't play nicely.  Use PostgreSQL
>
> Can you elaborate?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: Where are the dragons hiding?

2009-11-18 Thread cody koeninger


On Nov 18, 11:32 am, harryh  wrote:

> - Don't use Lift with MySQL, they don't play nicely.  Use PostgreSQL
>


Can you elaborate?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Suggestion for a Lift app

2009-11-18 Thread Donna Malayeri
As I mentioned on the Scala mailing list (http://thread.gmane.org/
gmane.comp.lang.scala/18399), I've written a tool that will take
scaladoc as XML input and write back to the Scala sources. From now
on, submitted patches that are changes to scaladoc are to use this
file format (described in the message).

It would be great if someone could develop a wiki that would let
people edit the scaladoc directly. The app could export to the XML
file so that these changes would be reflected in the current source.

If anyone is interested in doing this, please post to this list or one
of the scala lists.

Donna

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: Call it Lift 2.0

2009-11-18 Thread Heiko Seeberger
Jim,

Let's stop this discussion (I won't convince you and you wont't convince me)
and start doing something more valuable: Are you in town for a couple of
beers?

Heiko

2009/11/18 Jim Barrows 

>
>
> On Wed, Nov 18, 2009 at 10:25 AM, Heiko Seeberger <
> heiko.seeber...@googlemail.com> wrote:
>
>> Jim,
>>
>> 2009/11/17 Jim Barrows 
>>
>>>
>>> The behavior of a method, it's implementation is part of the contract I
>>> have with the library.
>>>
>>
>> Behavior yes, as long as agreed part of the contract. Implementation no.
>>
>
> Implementation is not behavior?
>
>
>>
>>
>>> So, just because you, or some committee ...
>>>
>>
>> Not a committe, but the developer of the library.
>>
>
> I don't care who.  Somebody, who isn't me, is deciding whether the impact
> to me is is minor (ie 0.0.1), major (ie 0.1.0), or catastrophic (ie 1.0.0).
>
>
>>
>>> ... think that the change is "minor", I still have to thoroughly test
>>> everything that uses your library.
>>>
>>
>> Did you hear me saying "Don't test your app when a required library
>> changes its version"?
>>
>
> Yes, actually your attempting to use a scheme to tell me what I need to
> test.  If you agree that with every change, I need to test those changes,
> then why complicate everybody's lives with number schemes?  Because whether
> a someone uses the OSGI complex scheme of numbers, or Ubuntus year.month
> scheme, it still means I have to read the change list, and test the things
> that changed.
>
>
>>
>>
>>> As to your "As Lift also is to support OSGi (already some support in
>>> place) it would be beneficial to stick to this version policy" comment.  I
>>> counter with "Lift works on Ubuntu it would be beneficial to stick to this
>>> version policy" and of course "Lift runs on scala  it would be beneficial to
>>> stick to this version policy", or better yet "Lift runs  on the Java VM it
>>> would be beneficial to stick to this version policy."  All three of my
>>> arguments have far more to do with Lift running then OSGI does.
>>>
>>
>> If you are not interested in OSGi or Lift's OSGi support, then just ignore
>> it. As far as I know neither Ubuntu, nor Scala, nor the JVM care about
>> Lift's version number or version strategy. But OSGi does!
>>
>
> You miss my point.  My point was that the argument you make is useless.
>
>
>>
>>
>>> That's what I really need to know,
>>>
>>
>> Please accept that other folks might have different needs.
>>
>
> You cut the context.  However Everyone needs to know that things
> changed.  And they need to know what changed.  The OSGI scheme attempts to
> tell the developer how severe the change is, without knowing how the
> developer is using the library.  That's useless.
> --
> James A Barrows
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>



-- 
Heiko Seeberger

My job: weiglewilczek.com
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Lift & Scala style.

2009-11-18 Thread Heiko Seeberger
Hi,

As "now is the time to improve names", I suggest to change the Actor names
in lift-common:

SimpleActor -> Receiver
SimplestActor -> DefaultReceiver
TypedActor -> Actor
GenericActor -> BaseActor
SimplestGenericActor -> DefaultActor

Heiko

2009/11/16 Kris Nuttycombe 

>
> Hi, all,
>
> This is just a starting point for debate with a hope of eventual
> consensus on something that's ultimately somewhat trivial matter.
> Since style is currently a topic of discussion on the main scala-users
> list, I thought it an appropriate time to bring it up.
>
> Lift is one of the most prominent, perhaps the most prominent Scala
> applications in current existence, and as such I think it has a
> significant role to play in exemplifying good Scala style. At the same
> time, Lift has also been developed over the course of its' developers
> familiarization with the language, and so it displays some occasional
> stylistic warts. At the same time, major changes coming with Scala
> 2.8, particularly named & default parameters, may be something we want
> to take advantage of in ways that may have a substantial effect on
> usability of our APIs.
>
> I guess my general question is, how does the Lift community want to
> deal with the stylistic warts and naming inconsistencies, and how do
> we want to go about integrating some of these new features? In some
> cases, we may be able to use a strategy of giving some operations new
> names and deprecating the old, but in others this might lead to some
> really hacky looking APIs since we've already got good names, and
> changing their signatures might break a lot of code. Also, what are
> the big warts on Lift that ought to be resolved by renames or
> named/default parameters?
>
> Two naming issues that have come up recently in Lift internal
> discussions follow:
>
> First, Alex Boisvert suggested that S.init be renamed to S.doWith to
> have more consistency with Req and LiftSession. At least internally, I
> think that the consensus was that this wasn't necessarily appropriate.
>
> Second, I suggested the deprecation of the pattern of using apply() on
> AnyVar to provide setter functionality, since to me using something
> that looks like function application to do a mutation seems
> ill-conceived. My initial suggestion was to piggyback our
> functionality on the update() rewriting that is done by Scala, but on
> further reflection and David's feedback I realized that this would be
> even uglier since you'd have to use myRequestVar() = "foo". So, what
> would folks think about defining the symbolic method ":=" on both
> AnyVal and within the Mapper framework instead, with the goal of
> eventual deprecation of the apply style?
>
> Thirdly, I would like to propose that any "marker" traits (i.e. traits
> that declare no methods) within Lift either be sealed, or have the
> relevant methods tailored to the shared functionality they represent
> added (or both.) Match errors can be nasty, and sealing the traits
> (providing an extension point for users if need be) can help the
> compiler help us to eliminate that class of errors.
>
> Fourth, in compiling the Lift source I see far more warnings related
> to type erasure in match statements than I'm strictly comfortable
> with. My personal plan is to start working through these and
> eliminating them where possible, but in general I think that we as a
> community should start running all of our builds with all warnings
> enabled, and strive to eliminate them. The Scala type system can be
> complicated, but in my experience it is virtually always possible to
> avoid such warnings (and type unsafety!) with a bit of extra thought.
> The less we subvert the type system, the less likely we are to have
> unexpected errors.
>
> Kris
>
> --~--~-~--~~~---~--~~
> 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
> -~--~~~~--~~--~--~---
>
>


-- 
Heiko Seeberger

My job: weiglewilczek.com
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: Call it Lift 2.0

2009-11-18 Thread Jim Barrows
On Wed, Nov 18, 2009 at 10:25 AM, Heiko Seeberger <
heiko.seeber...@googlemail.com> wrote:

> Jim,
>
> 2009/11/17 Jim Barrows 
>
>>
>> The behavior of a method, it's implementation is part of the contract I
>> have with the library.
>>
>
> Behavior yes, as long as agreed part of the contract. Implementation no.
>

Implementation is not behavior?


>
>
>> So, just because you, or some committee ...
>>
>
> Not a committe, but the developer of the library.
>

I don't care who.  Somebody, who isn't me, is deciding whether the impact to
me is is minor (ie 0.0.1), major (ie 0.1.0), or catastrophic (ie 1.0.0).


>
>> ... think that the change is "minor", I still have to thoroughly test
>> everything that uses your library.
>>
>
> Did you hear me saying "Don't test your app when a required library changes
> its version"?
>

Yes, actually your attempting to use a scheme to tell me what I need to
test.  If you agree that with every change, I need to test those changes,
then why complicate everybody's lives with number schemes?  Because whether
a someone uses the OSGI complex scheme of numbers, or Ubuntus year.month
scheme, it still means I have to read the change list, and test the things
that changed.


>
>
>> As to your "As Lift also is to support OSGi (already some support in
>> place) it would be beneficial to stick to this version policy" comment.  I
>> counter with "Lift works on Ubuntu it would be beneficial to stick to this
>> version policy" and of course "Lift runs on scala  it would be beneficial to
>> stick to this version policy", or better yet "Lift runs  on the Java VM it
>> would be beneficial to stick to this version policy."  All three of my
>> arguments have far more to do with Lift running then OSGI does.
>>
>
> If you are not interested in OSGi or Lift's OSGi support, then just ignore
> it. As far as I know neither Ubuntu, nor Scala, nor the JVM care about
> Lift's version number or version strategy. But OSGi does!
>

You miss my point.  My point was that the argument you make is useless.


>
>
>> That's what I really need to know,
>>
>
> Please accept that other folks might have different needs.
>

You cut the context.  However Everyone needs to know that things
changed.  And they need to know what changed.  The OSGI scheme attempts to
tell the developer how severe the change is, without knowing how the
developer is using the library.  That's useless.
-- 
James A Barrows

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: Where are the dragons hiding?

2009-11-18 Thread harryh
Some issues I've run into along the way that you should be aware of
(in no particular order):

- Don't use Lift with MySQL, they don't play nicely.  Use PostgreSQL

- Be away that Lift webservers are stateful, so if you have more than
1 of them serving the same application you will need sticky sessions.
It can take some care to get this set up right.

- Take care to serve items that don't require session state from the
"stateless dispatch table."  Further, things like static images, css,
and js files shouldn't be served by lift at all.  I as running into
problems with too many single use sessions being created (from things
like web crawlers) and it causing CPU spike when the GC got
overwhelmed.

-harryh

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: Where are the dragons hiding?

2009-11-18 Thread Marius

On Nov 18, 6:31 pm, Paul Butcher  wrote:
> I'm seriously considering Lift for a new project. I know what the
> benefits of Scala and Lift are (that's why I'm seriously considering
> this as a route forwards :-) What I'm wondering is whether there are
> any lurking nasties that I should be aware of (so that I can avoid
> learning about them the hard way).

Not sure if there is any. One thing though Lift's session state is
kept in memory and not serialized in the DB. Session serialization is
a bit tricky since we keep the bound functions on the session state.
Those functions are in many cases anonymous function that may hold
other references which are not serializable. Even if everything is
serializable using Java serialization is likely suboptimal. But
keeping the sessions in memory and have a session affinity load
balancing is a very good choice from performance perspective.

>
> Some background: Until recently I was CTO of Texperts, a UK startup.
> We moved to using Ruby on Rails shortly after version 1.0 was released
> (i.e. when it was at just about the same level of maturity as Lift is
> now). Our experience was mostly very good - the major issues we had
> were deployment problems arising from the fact that Ruby's threads
> aren't really threads.
>
> I'm now looking at a new project, a significant chunk of which will be
> a webservice likely to be installed within a mobile network operator's
> infrastructure. That fact is a powerful argument for writing it in
> Java (MNOs all know how to run big Java app servers) but the very
> thought of being stuck writing Java for the foreseeable future makes
> me break out in hives :-)
>
> So I'm considering Scala and Lift. In particular, I'm considering the
> tradeoffs of Lift versus something like Spring+Scala.

IMHO there is no tradeoff. Scala's nature tremendously facilitates
things using functional composition and Spring's MVC/AOP etc. doesn;t
really bring you much benefits. Not to mention that Lift's templating
mechanism  is really great.

>
> I'm not too worried about problems that might bite us while we're
> developing the service. I hope that we're smart enough, and the Lift
> community is helpful enough, that we should be able to work our way
> through those kinds of problem (although a heads-up would still be
> welcome).

I'd say that this is a safe bet.

>
> What I *am* worried about are problems that might bite us when we come
> to install the service at an MNO. Having said "don't worry - it'll run
> on your app server just fine", is there anything that might prove
> problematic if we choose Lift?

In essence Lift start as a plain servlet filter so I wouldn't expect
any incompatibilities. But I'd recommend lightweight containers with
nice non-blocking IO. Jetty looks to be a good choice. Non blocking IO
support is particularly helpful when using Comet and Lift has a built
in mechanism for that.

 Is there anything we can do ahead of
> time to head this kind of problem off at the pass? How should we test
> to minimise the chance of problems? Would choosing Spring+Scala
> decrease any of these risks?

I don't see what Spring brings and Lift doesn't and how it would
minimize risks.

>
> Very many thanks in advance for any help or advice you can offer,
>
> paul.butcher->msgCount++

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: Call it Lift 2.0

2009-11-18 Thread Heiko Seeberger
Jim,

2009/11/17 Jim Barrows 

>
> The behavior of a method, it's implementation is part of the contract I
> have with the library.
>

Behavior yes, as long as agreed part of the contract. Implementation no.


> So, just because you, or some committee ...
>

Not a committe, but the developer of the library.


> ... think that the change is "minor", I still have to thoroughly test
> everything that uses your library.
>

Did you hear me saying "Don't test your app when a required library changes
its version"?


> As to your "As Lift also is to support OSGi (already some support in place)
> it would be beneficial to stick to this version policy" comment.  I counter
> with "Lift works on Ubuntu it would be beneficial to stick to this version
> policy" and of course "Lift runs on scala  it would be beneficial to stick
> to this version policy", or better yet "Lift runs  on the Java VM it would
> be beneficial to stick to this version policy."  All three of my arguments
> have far more to do with Lift running then OSGI does.
>

If you are not interested in OSGi or Lift's OSGi support, then just ignore
it. As far as I know neither Ubuntu, nor Scala, nor the JVM care about
Lift's version number or version strategy. But OSGi does!


> That's what I really need to know,
>

Please accept that other folks might have different needs.

Heiko Seeberger

My job: weiglewilczek.com
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] How to make Ajax call from "onLoad"/"onResize"?

2009-11-18 Thread Ross Mellgren
(n.b. not compiled or tested, and there might be an easier way:)

class MySnippet {
 def handlers(ns: NodeSeq): NodeSeq = {
 val handleResize = SHtml.jsonCall(JE.JsObj("width" -> JE.JsVar 
("window", "screen", "width"),
"height" ->  
JE.JsVar("window", "screen", "height")),
   obj => {
 val result = for {
m <- (Box!!obj).asA[scala.collection.immutable.Map 
[String, Any]]
width  <- m.get("width").asA[Int]
height <- m.get("height").asA[Int]
 } yield {
// do stuff with the width and height

// some JS command to send back to the browser
JsCmds.Noop
 }

 result.openOr(/* JS command to send back to browser if we  
failed to get arguments and so on */ JsCmds.Noop)
 })._2

 { Script {
 Function("handleResize", Nil, handleResize)
 } }
 }
}

Then in your template say onResize="handleResize()"

Hope that gives you some pointers,
-Ross


On Nov 18, 2009, at 4:19 AM, jhonig wrote:

> Hi All,
>
> Yet another question: I need to make Ajax calls when a page is loaded
> or resized.  The call would need to pass some local client information
> (browser size).  The return should be javascript code that populates a
> div on that page (in particular: an image that is scaled on the server
> to match the browser size).   Actually, local js code is in place that
> makes the call only after the user has stopped resizing (using a
> timeout).
>
> I guess I have to use AjaxCall, providing an expression that puts the
> window dimensions in an array or list, then return the javascript to
> add an  tag that downloads the scaled image from a generated url.
>
> Given the level of success I achieved so far, I thought I better ask
> if this would work our before I start trying endlessly.
>
> Thanks for any suggestions,
>
> Job
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Lift" group.
> To post to this group, send email to lift...@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= 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: XML Parsing Error: prefix not bound to a namespace

2009-11-18 Thread Ross Mellgren
Still getting the same error? Can you post the code you're using so we  
can see what's going on? It looks like it should work, with the quotes.

To confirm, the Appointment class is located in a  
your.package.snippet, and there's LiftRules.addToPackages 
("your.package") in Boot.scala? Do you get any errors about locating  
the snippet on the jetty log?

-Ross

On Nov 18, 2009, at 3:02 AM, mr najmi wrote:

> sory..it works..thank you very much..
>
> On Nov 18, 12:57 pm, Ross Mellgren  wrote:
>> You forgot to quote "branches" before -> in your bind. That is,
>>
>>>bind("e",xhtml,
>>> branches -> SHtml.text(branches,branches=_)
>>
>>>)
>>
>> Should be:
>>
>>>bind("e",xhtml,
>>> "branches" -> SHtml.text(branches,branches=_)
>>
>>>)
>>
>> As it is, the only tag that would be accepted would be "" (the  
>> empty string)
>>
>> -Ross
>>
>> On Nov 17, 2009, at 11:46 PM, mr najmi wrote:
>>
>>> hai,
>>
>>> i have a problem in liftweb that is XML Parsing Error: prefix not
>>> bound to a namespace..
>>> Branch : 
>>> ^
>>> here is the code
>>
>>> 
>>>
>>>
>>>Branch : 
>>
>>>Search
>>>
>>>
>>
>>> class Appointment {
>>
>>>def search(xhtml:NodeSeq):NodeSeq={
>>>var branches = ""
>>
>>>bind("e",xhtml,
>>> branches -> SHtml.text(branches,branches=_)
>>
>>>)
>>>}
>>> }
>>
>>> i have try all the sugested solution but fail to solve this  
>>> problem..i
>>> really2 need help.
>>
>>> --
>>
>>> You received this message because you are subscribed to the Google  
>>> Groups "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> liftweb+unsubscr...@googlegroups.com 
>>> .
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/liftweb?hl= 
>>> .
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Lift" group.
> To post to this group, send email to lift...@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= 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: MetaMapper trying to open Empty Box - best practice?

2009-11-18 Thread Ross Mellgren
There's an "edit" and "delete" link near the top (to the right of  
"Created nnn minutes ago by opyate", I believe) that you can use.

If you make sure each "code" line has 4 spaces in front of it,  
markdown should do the right thing.

-Ross

On Nov 18, 2009, at 11:12 AM, opyate wrote:

> Issue created:
> http://github.com/dpp/liftweb/issues/#issue/199
>
> The markdown went ballistic, and I don't know how to edit, but I'm
> sure the gist is communicated.
>
> Thanks guys!
>
> On Nov 18, 3:04 pm, opyate  wrote:
>> I'll create the test app momentarily.
>>
>> Thanks Mr. Pollak - you're the reason I have a San Fran clock on my
>> dashboard :-)
>>
>> On Nov 18, 2:52 pm, Jim McBeath  wrote:
>>
>>
>>
>>> Juan,
>>
>>> I ran into this same bug.  I have not yet had time to put together a
>>> test app to demonstrate it.  That's on my to-do list, but if you get
>>> to it first, that would be great.
>>
>>> Re not seeing the INSERT statement in your log file: the SQL is
>>> only logged after it is executed, and the log info includes how long
>>> it took to execute.  Unfortunately, that means that when execution
>>> fails with an exception, there is no easy way to see what the SQL
>>> is that is causing the problem.
>>
>>> --
>>> Jim
>>
>>> On Wed, Nov 18, 2009 at 05:37:46AM -0800, opyate wrote:
 Date: Wed, 18 Nov 2009 05:37:46 -0800 (PST)
 From: opyate 
 To: Lift 
 Subject: [Lift]MetaMappertrying to open Empty Box - best practice?
>>
 Hello Lifters,
>>
 I'm overriding my model's primary key like so, because the "id"  
 field
 is non-autoincrement:
>>
 (taken from Derek's suggestion on
 http://groups.google.com/group/liftweb/browse_thread/thread/41650fc1e 
 ...)
>>
 --START--
 override def primaryKeyField = id
>>
   object id extends MappedLongIndex(this) {
 override def dbDisplay_? = true
 override def writePermission_? = true
 override def dbAutogenerated_? = false
 private var myDirty = false
 override def dirty_? = myDirty
 override def dirty_?(b : Boolean) = { myDirty = b;  
 super.dirty_?
 (b) }
   }
 --END--
>>
 In my form I also make the id editable as a text field.
>>
 However, when I save (click submit on the form), I get a stack  
 trace:
>>
 Message: java.lang.NullPointerException: Trying to open an empty  
 Box
net.liftweb.common.EmptyBox.open_$bang(Box.scala:370)
net.liftweb.common.EmptyBox.open_$bang(Box.scala:366)
net.liftweb.mapper.MetaMapper$$anonfun$runAppliers$1$1.apply
 (MetaMapper.scala:617)
>>
 Line 617 is:
 findApplier(indexMap.open_!, rs.getObject(1)) match {
>>
 Could someone please shed some light? If I want to override the
 primary key, do I need to do extra house-keeping? (e.g. managing
 indexMap ?)
>>
 I enabled query logging by using the code on
 http://groups.google.com/group/liftweb/browse_thread/thread/7d5daf78a 
 ...
 but I can't see the "insert" SQL code in the logs/console - line  
 618
 probably takes care of that.
>>
 Thank you,
 Juan
>>
 --
>>
 You received this message because you are subscribed to the  
 Google Groups "Lift" group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to 
 liftweb+unsubscr...@googlegroups.com 
 .
 For more options, visit this group 
 athttp://groups.google.com/group/liftweb?hl= 
 .
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Lift" group.
> To post to this group, send email to lift...@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= 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Where are the dragons hiding?

2009-11-18 Thread Paul Butcher
I'm seriously considering Lift for a new project. I know what the
benefits of Scala and Lift are (that's why I'm seriously considering
this as a route forwards :-) What I'm wondering is whether there are
any lurking nasties that I should be aware of (so that I can avoid
learning about them the hard way).

Some background: Until recently I was CTO of Texperts, a UK startup.
We moved to using Ruby on Rails shortly after version 1.0 was released
(i.e. when it was at just about the same level of maturity as Lift is
now). Our experience was mostly very good - the major issues we had
were deployment problems arising from the fact that Ruby's threads
aren't really threads.

I'm now looking at a new project, a significant chunk of which will be
a webservice likely to be installed within a mobile network operator's
infrastructure. That fact is a powerful argument for writing it in
Java (MNOs all know how to run big Java app servers) but the very
thought of being stuck writing Java for the foreseeable future makes
me break out in hives :-)

So I'm considering Scala and Lift. In particular, I'm considering the
tradeoffs of Lift versus something like Spring+Scala.

I'm not too worried about problems that might bite us while we're
developing the service. I hope that we're smart enough, and the Lift
community is helpful enough, that we should be able to work our way
through those kinds of problem (although a heads-up would still be
welcome).

What I *am* worried about are problems that might bite us when we come
to install the service at an MNO. Having said "don't worry - it'll run
on your app server just fine", is there anything that might prove
problematic if we choose Lift? Is there anything we can do ahead of
time to head this kind of problem off at the pass? How should we test
to minimise the chance of problems? Would choosing Spring+Scala
decrease any of these risks?

Very many thanks in advance for any help or advice you can offer,

paul.butcher->msgCount++

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: MetaMapper trying to open Empty Box - best practice?

2009-11-18 Thread opyate
Issue created:
http://github.com/dpp/liftweb/issues/#issue/199

The markdown went ballistic, and I don't know how to edit, but I'm
sure the gist is communicated.

Thanks guys!

On Nov 18, 3:04 pm, opyate  wrote:
> I'll create the test app momentarily.
>
> Thanks Mr. Pollak - you're the reason I have a San Fran clock on my
> dashboard :-)
>
> On Nov 18, 2:52 pm, Jim McBeath  wrote:
>
>
>
> > Juan,
>
> > I ran into this same bug.  I have not yet had time to put together a
> > test app to demonstrate it.  That's on my to-do list, but if you get
> > to it first, that would be great.
>
> > Re not seeing the INSERT statement in your log file: the SQL is
> > only logged after it is executed, and the log info includes how long
> > it took to execute.  Unfortunately, that means that when execution
> > fails with an exception, there is no easy way to see what the SQL
> > is that is causing the problem.
>
> > --
> > Jim
>
> > On Wed, Nov 18, 2009 at 05:37:46AM -0800, opyate wrote:
> > > Date: Wed, 18 Nov 2009 05:37:46 -0800 (PST)
> > > From: opyate 
> > > To: Lift 
> > > Subject: [Lift]MetaMappertrying to open Empty Box - best practice?
>
> > > Hello Lifters,
>
> > > I'm overriding my model's primary key like so, because the "id" field
> > > is non-autoincrement:
>
> > > (taken from Derek's suggestion on
> > >http://groups.google.com/group/liftweb/browse_thread/thread/41650fc1e...)
>
> > > --START--
> > > override def primaryKeyField = id
>
> > >   object id extends MappedLongIndex(this) {
> > >     override def dbDisplay_? = true
> > >     override def writePermission_? = true
> > >     override def dbAutogenerated_? = false
> > >     private var myDirty = false
> > >     override def dirty_? = myDirty
> > >     override def dirty_?(b : Boolean) = { myDirty = b; super.dirty_?
> > > (b) }
> > >   }
> > > --END--
>
> > > In my form I also make the id editable as a text field.
>
> > > However, when I save (click submit on the form), I get a stack trace:
>
> > > Message: java.lang.NullPointerException: Trying to open an empty Box
> > >    net.liftweb.common.EmptyBox.open_$bang(Box.scala:370)
> > >    net.liftweb.common.EmptyBox.open_$bang(Box.scala:366)
> > >    net.liftweb.mapper.MetaMapper$$anonfun$runAppliers$1$1.apply
> > > (MetaMapper.scala:617)
>
> > > Line 617 is:
> > > findApplier(indexMap.open_!, rs.getObject(1)) match {
>
> > > Could someone please shed some light? If I want to override the
> > > primary key, do I need to do extra house-keeping? (e.g. managing
> > > indexMap ?)
>
> > > I enabled query logging by using the code on
> > >http://groups.google.com/group/liftweb/browse_thread/thread/7d5daf78a...
> > > but I can't see the "insert" SQL code in the logs/console - line 618
> > > probably takes care of that.
>
> > > Thank you,
> > > Juan
>
> > > --
>
> > > You received this message because you are subscribed to the Google Groups 
> > > "Lift" group.
> > > To post to this group, send email to lift...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > liftweb+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/liftweb?hl=.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] odd ajax issue (works every other time)

2009-11-18 Thread Kris Nuttycombe
I've got a few other things that I have to take care of today, but if
I can get those out of the way I will run a git bisect, compiling &
running with your test project to see if I can at least figure out the
commit that introduced the error. I've been wanting to learn about
bisect anyway. :)

Kris

On Wed, Nov 18, 2009 at 7:26 AM, David Pollak
 wrote:
>
>
> On Tue, Nov 17, 2009 at 10:33 PM, David Pollak
>  wrote:
>>
>> I am able to reproduce the problem with a simple Ajax control.
>>
>> It's very, very odd.  It seems to be an intermittent failure of the
>> servlet container to find the HttpServletSession.  The client is presenting
>> the cookie correctly, but Jetty is not recognizing it.
>
> For some reason, even though the browser sends the right cookies, Jetty is
> not recognizing them.  This is pretty easy to reproduce with Firefox, but I
> haven't seen it with Chrome.
>
> I'm enclosing a simple version of the project I used for testing... just
> keep pressing on the button and eventually the page will reload (indicating
> that the session was lost) or the counter will stop counting (same
> indication).
>
> I'm out of pocket for most of today (I might be on email just a little).
>
> This is a super ultra mega high priority in my book.  If Marius or Tim or
> Derek or any of the other Lift committers could shake loose time to look at
> this one, I'd really appreciate it... and Kris thanks for the time/effort
> you've put into this.  Please keep plugging.
>
> Thanks,
>
> David
>
>>
>> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe
>>  wrote:
>>>
>>> I am able to duplicate this error. I was concerned that it might be
>>> the result of my Loc changes, so I just rebuilt Lift without the
>>> patches associated with that change and reproduced the problem again.
>>>
>>> Here are the conditions under which I'm able to reproduce the failure:
>>>
>>> 1) load a page where the snippets are managed by a StatefulSnippet
>>> 2) some page elements (in my case select boxes) have their values
>>> update by AJAX in response to user events. This appears to work
>>> normally.
>>> 3) upon submission of the form on the page, the page is re-rendered.
>>> Logging in the submission function indicates that it is never called.
>>> 4) if I fill in the form again and resubmit after the initial failure,
>>> the form submit behaves properly.
>>> 5) I believe I've seen at least one instance (though I can't reliably
>>> reproduce this) where just a normal AJAX call (modifying one of the
>>> select boxes) caused the entire page to reload.
>>>
>>> Kris
>>>
>>> Kris
>>>
>>> On Tue, Nov 17, 2009 at 4:07 PM, O'Rorke Paul  wrote:
>>> > Not in a place where I can really debug this right now but I'm curious
>>> > whether anybody else has seen this and knows the solution...
>>> >
>>> > since rebuilding a day or two ago with no recent code or other changes:
>>> > every second time I go to click on an ajax checkbox or select widget,
>>> > I get effectively no response.
>>> > actually, it looks like there is a very quick spinning wheel (almost
>>> > imperceptible) but the page doesn't  get  repainted and the database
>>> > does not change.
>>> > If  I use another operation that is non ajax (going in and editing an
>>> > item and doing old fashioned get / posts) everything works fine after
>>> > that (one time).
>>> > Or if I reload the page then if I use an ajax widget after reloading
>>> > ajax works (once).
>>> >
>>> > This is with 2.7.5 Scala and Lift 1.1-SNAPSHOT.
>>> >
>>> > Perhaps not coincidentally, I am getting "Multiple versions of scala
>>> > libraries detected!" warnings and have not yet figured out how to get
>>> > rid of them.
>>> > I don't see another version of Scala in my pom or eclipse maven
>>> > dependency graph and have been going around nuking old copies of scala
>>> > but to no avail as yet.
>>> >
>>> > Another odd thing that is now happening is that when I shutdown with a
>>> > control C in the terminal window, I get the following error:
>>> >
>>> >> INFO - Service request (GET) /ajax_request/liftAjax.js took 2
>>> >> Milliseconds
>>> >> ^C2009-11-16 15:29:01.634::INFO:  Shutdown hook executing
>>> >> 2009-11-16 15:29:02.249::INFO:  Shutdown hook complete
>>> >> [INFO] Jetty server exiting.
>>> >> [INFO]
>>> >>
>>> >> 
>>> >> [INFO] BUILD SUCCESSFUL
>>> >> [INFO]
>>> >>
>>> >> 
>>> >> [INFO] Total time: 33 minutes 4 seconds
>>> >> [INFO] Finished at: Mon Nov 16 15:29:02 PST 2009
>>> >> [INFO] Final Memory: 23M/257M
>>> >> [INFO]
>>> >>
>>> >> 
>>> >> ERROR - Couldn't start SessionMaster ping
>>> >> net.liftweb.util.ActorPingException: net.liftweb.http.SessionMaster
>>> >> $checkandpur...@1cab4a5 could not be scheduled on
>>> >> net.liftweb.http.sessionmast...@119c2af
>>> >>       at net.liftweb.util.ActorPing$.s

[Lift] Re: MetaMapper trying to open Empty Box - best practice?

2009-11-18 Thread opyate
I'll create the test app momentarily.

Thanks Mr. Pollak - you're the reason I have a San Fran clock on my
dashboard :-)

On Nov 18, 2:52 pm, Jim McBeath  wrote:
> Juan,
>
> I ran into this same bug.  I have not yet had time to put together a
> test app to demonstrate it.  That's on my to-do list, but if you get
> to it first, that would be great.
>
> Re not seeing the INSERT statement in your log file: the SQL is
> only logged after it is executed, and the log info includes how long
> it took to execute.  Unfortunately, that means that when execution
> fails with an exception, there is no easy way to see what the SQL
> is that is causing the problem.
>
> --
> Jim
>
>
>
> On Wed, Nov 18, 2009 at 05:37:46AM -0800, opyate wrote:
> > Date: Wed, 18 Nov 2009 05:37:46 -0800 (PST)
> > From: opyate 
> > To: Lift 
> > Subject: [Lift]MetaMappertrying to open Empty Box - best practice?
>
> > Hello Lifters,
>
> > I'm overriding my model's primary key like so, because the "id" field
> > is non-autoincrement:
>
> > (taken from Derek's suggestion on
> >http://groups.google.com/group/liftweb/browse_thread/thread/41650fc1e...)
>
> > --START--
> > override def primaryKeyField = id
>
> >   object id extends MappedLongIndex(this) {
> >     override def dbDisplay_? = true
> >     override def writePermission_? = true
> >     override def dbAutogenerated_? = false
> >     private var myDirty = false
> >     override def dirty_? = myDirty
> >     override def dirty_?(b : Boolean) = { myDirty = b; super.dirty_?
> > (b) }
> >   }
> > --END--
>
> > In my form I also make the id editable as a text field.
>
> > However, when I save (click submit on the form), I get a stack trace:
>
> > Message: java.lang.NullPointerException: Trying to open an empty Box
> >    net.liftweb.common.EmptyBox.open_$bang(Box.scala:370)
> >    net.liftweb.common.EmptyBox.open_$bang(Box.scala:366)
> >    net.liftweb.mapper.MetaMapper$$anonfun$runAppliers$1$1.apply
> > (MetaMapper.scala:617)
>
> > Line 617 is:
> > findApplier(indexMap.open_!, rs.getObject(1)) match {
>
> > Could someone please shed some light? If I want to override the
> > primary key, do I need to do extra house-keeping? (e.g. managing
> > indexMap ?)
>
> > I enabled query logging by using the code on
> >http://groups.google.com/group/liftweb/browse_thread/thread/7d5daf78a...
> > but I can't see the "insert" SQL code in the logs/console - line 618
> > probably takes care of that.
>
> > Thank you,
> > Juan
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] MetaMapper trying to open Empty Box - best practice?

2009-11-18 Thread Jim McBeath
Juan,

I ran into this same bug.  I have not yet had time to put together a
test app to demonstrate it.  That's on my to-do list, but if you get
to it first, that would be great.

Re not seeing the INSERT statement in your log file: the SQL is
only logged after it is executed, and the log info includes how long
it took to execute.  Unfortunately, that means that when execution
fails with an exception, there is no easy way to see what the SQL
is that is causing the problem.

--
Jim

On Wed, Nov 18, 2009 at 05:37:46AM -0800, opyate wrote:
> Date: Wed, 18 Nov 2009 05:37:46 -0800 (PST)
> From: opyate 
> To: Lift 
> Subject: [Lift] MetaMapper trying to open Empty Box - best practice?
> 
> Hello Lifters,
> 
> I'm overriding my model's primary key like so, because the "id" field
> is non-autoincrement:
> 
> (taken from Derek's suggestion on
> http://groups.google.com/group/liftweb/browse_thread/thread/41650fc1eb0098bd/cd93612309878979?lnk=gst&q=primary+key#)
> 
> --START--
> override def primaryKeyField = id
> 
>   object id extends MappedLongIndex(this) {
> override def dbDisplay_? = true
> override def writePermission_? = true
> override def dbAutogenerated_? = false
> private var myDirty = false
> override def dirty_? = myDirty
> override def dirty_?(b : Boolean) = { myDirty = b; super.dirty_?
> (b) }
>   }
> --END--
> 
> In my form I also make the id editable as a text field.
> 
> However, when I save (click submit on the form), I get a stack trace:
> 
> Message: java.lang.NullPointerException: Trying to open an empty Box
>   net.liftweb.common.EmptyBox.open_$bang(Box.scala:370)
>   net.liftweb.common.EmptyBox.open_$bang(Box.scala:366)
>   net.liftweb.mapper.MetaMapper$$anonfun$runAppliers$1$1.apply
> (MetaMapper.scala:617)
> 
> Line 617 is:
> findApplier(indexMap.open_!, rs.getObject(1)) match {
> 
> Could someone please shed some light? If I want to override the
> primary key, do I need to do extra house-keeping? (e.g. managing
> indexMap ?)
> 
> I enabled query logging by using the code on
> http://groups.google.com/group/liftweb/browse_thread/thread/7d5daf78a7e52275/ff9b6f80e19a999b?lnk=gst&q=addLogFunc#ff9b6f80e19a999b
> but I can't see the "insert" SQL code in the logs/console - line 618
> probably takes care of that.
> 
> Thank you,
> Juan
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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=.
> 

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Tutorials or documentation about Factory?

2009-11-18 Thread Vesa
Hi,

It would be nice to have some kind of tutorial on how to use this new
addition.

- Vesa

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] odd ajax issue (works every other time)

2009-11-18 Thread David Pollak
On Tue, Nov 17, 2009 at 10:33 PM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

> I am able to reproduce the problem with a simple Ajax control.
>
> It's very, very odd.  It seems to be an intermittent failure of the servlet
> container to find the HttpServletSession.  The client is presenting the
> cookie correctly, but Jetty is not recognizing it.
>

For some reason, even though the browser sends the right cookies, Jetty is
not recognizing them.  This is pretty easy to reproduce with Firefox, but I
haven't seen it with Chrome.

I'm enclosing a simple version of the project I used for testing... just
keep pressing on the button and eventually the page will reload (indicating
that the session was lost) or the counter will stop counting (same
indication).

I'm out of pocket for most of today (I might be on email just a little).

This is a super ultra mega high priority in my book.  If Marius or Tim or
Derek or any of the other Lift committers could shake loose time to look at
this one, I'd really appreciate it... and Kris thanks for the time/effort
you've put into this.  Please keep plugging.

Thanks,

David


>
> On Tue, Nov 17, 2009 at 4:10 PM, Kris Nuttycombe <
> kris.nuttyco...@gmail.com> wrote:
>
>> I am able to duplicate this error. I was concerned that it might be
>> the result of my Loc changes, so I just rebuilt Lift without the
>> patches associated with that change and reproduced the problem again.
>>
>> Here are the conditions under which I'm able to reproduce the failure:
>>
>> 1) load a page where the snippets are managed by a StatefulSnippet
>> 2) some page elements (in my case select boxes) have their values
>> update by AJAX in response to user events. This appears to work
>> normally.
>> 3) upon submission of the form on the page, the page is re-rendered.
>> Logging in the submission function indicates that it is never called.
>> 4) if I fill in the form again and resubmit after the initial failure,
>> the form submit behaves properly.
>> 5) I believe I've seen at least one instance (though I can't reliably
>> reproduce this) where just a normal AJAX call (modifying one of the
>> select boxes) caused the entire page to reload.
>>
>> Kris
>>
>> Kris
>>
>> On Tue, Nov 17, 2009 at 4:07 PM, O'Rorke Paul  wrote:
>> > Not in a place where I can really debug this right now but I'm curious
>> > whether anybody else has seen this and knows the solution...
>> >
>> > since rebuilding a day or two ago with no recent code or other changes:
>> > every second time I go to click on an ajax checkbox or select widget,
>> > I get effectively no response.
>> > actually, it looks like there is a very quick spinning wheel (almost
>> > imperceptible) but the page doesn't  get  repainted and the database
>> > does not change.
>> > If  I use another operation that is non ajax (going in and editing an
>> > item and doing old fashioned get / posts) everything works fine after
>> > that (one time).
>> > Or if I reload the page then if I use an ajax widget after reloading
>> > ajax works (once).
>> >
>> > This is with 2.7.5 Scala and Lift 1.1-SNAPSHOT.
>> >
>> > Perhaps not coincidentally, I am getting "Multiple versions of scala
>> > libraries detected!" warnings and have not yet figured out how to get
>> > rid of them.
>> > I don't see another version of Scala in my pom or eclipse maven
>> > dependency graph and have been going around nuking old copies of scala
>> > but to no avail as yet.
>> >
>> > Another odd thing that is now happening is that when I shutdown with a
>> > control C in the terminal window, I get the following error:
>> >
>> >> INFO - Service request (GET) /ajax_request/liftAjax.js took 2
>> >> Milliseconds
>> >> ^C2009-11-16 15:29:01.634::INFO:  Shutdown hook executing
>> >> 2009-11-16 15:29:02.249::INFO:  Shutdown hook complete
>> >> [INFO] Jetty server exiting.
>> >> [INFO]
>> >>
>> 
>> >> [INFO] BUILD SUCCESSFUL
>> >> [INFO]
>> >>
>> 
>> >> [INFO] Total time: 33 minutes 4 seconds
>> >> [INFO] Finished at: Mon Nov 16 15:29:02 PST 2009
>> >> [INFO] Final Memory: 23M/257M
>> >> [INFO]
>> >>
>> 
>> >> ERROR - Couldn't start SessionMaster ping
>> >> net.liftweb.util.ActorPingException: net.liftweb.http.SessionMaster
>> >> $checkandpur...@1cab4a5 could not be scheduled on
>> >> net.liftweb.http.sessionmast...@119c2af
>> >>   at net.liftweb.util.ActorPing$.schedule(ActorPing.scala:54)
>> >>   at
>> net.liftweb.http.SessionMaster$.net$liftweb$http$SessionMaster$
>> >> $doPing(LiftSession.scala:187)
>> >>   at net.liftweb.http.SessionMaster$$anonfun$1.apply
>> >> (LiftSession.scala:169)
>> >>   at net.liftweb.http.SessionMaster$$anonfun$1.apply
>> >> (LiftSession.scala:135)
>> >>   at
>> net.liftweb.actor.LiftActor$class.execTranslate(LiftActor.scala:
>> >> 247)
>>

Re: [Lift] Hello world problems

2009-11-18 Thread David Pollak
Please include a step-by-step description of what Maven commands you used
and what the output was.

Also, please include the results of "mvn -version"

I'm no Maven guru.  I know how to type "mvn clean install jetty:run" and
that's about it.  Yes, I manage to create at least 1 new Lift app a day and
manage it using Maven.

There are 1,500+ people on this list.  Yes, we get 1 or 2 Maven-related
issues a week (I wish we had fewer, but that first Maven command to create a
project is a bear), but we also have 50+ posts a day, so I'm pretty sure
that Maven is not a complete fail.

You may also look into sbt: http://code.google.com/p/simple-build-tool/
It's cleaner and easier and gives you a lot of benefits.

On Wed, Nov 18, 2009 at 3:05 AM, jimmy  wrote:

> I am trying to try out lift/scala and I must say I am not getting a
> warm cosy feeling about this!
>
> First after following the instructions on the "mvn jetty:run" step I
> get--
>  "mortbay.jetty. etc etc not found message.
>
> A quick web search revelas this to be a ubiquitous apache/maven
> problem
> but after adding the mortbay group  to the plugins in hte pom I can
> carry on.
>
> The next problem is however:-
> "Webapp source directory C:\lift\helloworld\src\main\webapp does not
> exist"
>
> and its true what it says the direcctory does not exist
> I have a "C:\lift\helloworld\src\main\java\demo\helloworld"  directory
> but not a Webapp directory.
>
> Now remember this is my first try with lift I and was seriously
> considering it as against Grails.
> With grails I got all the way through to defineing a many to many
> relationship with GORM before I encountered
> a problem I had to work at.
> With lift I cannot get HelloWorld to work. Now most people would not
> have bothered any further
> but I will persist for a while.
>
> Whats wrong here? The instructions, maven, the application or me?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Hello world problems

2009-11-18 Thread Naftoli Gugenheim
What did you do to create the project?

-
jimmy wrote:

I am trying to try out lift/scala and I must say I am not getting a
warm cosy feeling about this!

First after following the instructions on the "mvn jetty:run" step I
get--
 "mortbay.jetty. etc etc not found message.

A quick web search revelas this to be a ubiquitous apache/maven
problem
but after adding the mortbay group  to the plugins in hte pom I can
carry on.

The next problem is however:-
"Webapp source directory C:\lift\helloworld\src\main\webapp does not
exist"

and its true what it says the direcctory does not exist
I have a "C:\lift\helloworld\src\main\java\demo\helloworld"  directory
but not a Webapp directory.

Now remember this is my first try with lift I and was seriously
considering it as against Grails.
With grails I got all the way through to defineing a many to many
relationship with GORM before I encountered
a problem I had to work at.
With lift I cannot get HelloWorld to work. Now most people would not
have bothered any further
but I will persist for a while.

Whats wrong here? The instructions, maven, the application or me?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.


--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Model field validation

2009-11-18 Thread Ferdinand Chan
If I have a model "Item" as follows,

class Item extends LongKeyedMapper[Item] with IdPK{

  def getSingleton = Item

  object chiBrandName extends MappedPoliteString(this,255)

  object engBrandName extends MappedPoliteString(this,255)
}


An item is valid if and only if at least one of the brand name is non-
empty.

But from the lift example, field validation is done by overriding the
validations method of each field and the validate method of the
LongKeyedMetaMapper will invoke all validations method of its fields
and return the list of FieldError if any.

Is there anyway to implement my requirement in lift Mapper with
something like (Sorry for my bad lift syntax, still learning :) )

  def isValidItem = {
 if ( (chiBrandName eq null) || chiBrandName.length == 0) &&
(engBrandName eq null) || engBrandName.length == 0) )
 // show the field error
 else Nil
  }

Thanks

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] H2 foreign keys

2009-11-18 Thread Naftoli Gugenheim
I don't think I ended up creating the ticket, but do you want to volunteer to 
fix this?
IIRC the H2 syntax was like the currently used syntax but without the firsy to 
words or so. Search the H2 SQL Grammar page.
Thanks.
P.S. I wonder which other DBs use H2's syntax.

-
Derek Chen-Becker wrote:

That's what I've been doing as we have to make changes. For instance, we
needed to change how schemifier creates index columns to accomodate Oracle
sequences, so I moved that to DriverType.

On Sun, Nov 15, 2009 at 10:24 AM, Naftoli Gugenheim wrote:

>
> The H2 DriverType does not indicate H2 supports foreign key constraints.
> However it does, albeit with a different syntax than Schemifier uses.
> I'll try to file a ticket later. If I decide to work on it, what would be
> the best way? Refactor the SQL in Schemifier to be generated by the
> DriverType?
>
>
> --~--~-~--~~~---~--~~
> 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
> -~--~~~~--~~--~--~---
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.


--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: Possible lift error in tag

2009-11-18 Thread Derek Chen-Becker
This was my fault when I added the post-submit ajax handling. It had worked
fine on my test app, so I'm not sure what happened here, but I'm sorry for
the hassle.

On Sun, Nov 15, 2009 at 12:50 PM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

> Marius,
>
> Thanks for turning this fix around so quickly!
>
> David
>
>
> On Sun, Nov 15, 2009 at 7:58 AM, Marius  wrote:
>
>>
>> Pushed a fix to master. Please let me if there are other issues here.
>>
>> On Nov 15, 2:38 pm, Marius  wrote:
>> > Pushed a suggested fix on reviewboard
>> >
>> > Br's,
>> > Marius
>> >
>> > On Nov 15, 2:24 pm, Marius  wrote:
>> >
>> > > What is the exact JS error?
>> >
>> > > On Nov 15, 2:04 pm, Marius  wrote:
>> >
>> > > > I don't think my commits may have caused this.
>> >
>> > > > Derek ?
>> >
>> > > > Br's,
>> > > > Marius
>> >
>> > > > On Nov 14, 11:36 pm, David Pollak 
>> > > > wrote:
>> >
>> > > > > Looks like a bug.  Please open a ticket athttp://
>> github.com/dpp/liftweb/issues
>> >
>> > > > > Marius & Derek: could this have anything to do with your recent
>> changes?  If
>> > > > > so, could you get a fix into the repo, asap?
>> >
>> > > > > On Sat, Nov 14, 2009 at 1:31 PM, Richard Hirsch <
>> hirsch.d...@gmail.com>wrote:
>> >
>> > > > > > I think I might have found a lift bug in the   tag
>> >
>> > > > > > I just did a update and certain HTML buttons (for example, "Add"
>> in
>> > > > > > creating a new action, etc.) no longer work. A javascript syntax
>> error
>> > > > > > is thrown.
>> >
>> > > > > > The file in question is
>> > > > > > \trunk\server\src\main\webapp\action_view\index.html. The code
>> is
>> > > > > > here:
>> >
>> > > > > > 
>> > > > > >  
>> > > > > >
>> > > > > >
>> >
>> > > > > > This is code currently generated and which causes the syntax
>> error.
>> > > > > > > >
>> > > > > >
>> onsubmit="liftAjax.lift_ajaxHandler(jQuery('#'+"F1008082309036RKD").serialize(),
>> > > > > > , null, "javascript");return false;">
>> >
>> > > > > > This older generated code is currently deployed on stax are
>> works
>> > > > > > correctly.
>> >
>> > > > > > > >
>> > > > > >
>> onsubmit="liftAjax.lift_ajaxHandler(jQuery('#'+"F444961682037I0I").serialize(),
>> > > > > > null, null, null);return false;">
>> >
>> > > > > > Notice the difference in the onsubmit value.
>> >
>> > > > > > D.
>> >
>> > > > > --
>> > > > > Lift, the simply functional web frameworkhttp://liftweb.net
>> > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
>> > > > > Follow me:http://twitter.com/dpp
>> > > > > Surf the harmonics
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
>
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --~--~-~--~~~---~--~~
> 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
> -~--~~~~--~~--~--~---
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] MetaMapper trying to open Empty Box - best practice?

2009-11-18 Thread David Pollak
This is a  bug, but in order to debug it, I need a complete, runnable
application.  Please create one and put it up on GitHub and then open a
ticket at http://github.com/dpp/liftweb/issues

On Wed, Nov 18, 2009 at 5:37 AM, opyate  wrote:

> Hello Lifters,
>
> I'm overriding my model's primary key like so, because the "id" field
> is non-autoincrement:
>
> (taken from Derek's suggestion on
>
> http://groups.google.com/group/liftweb/browse_thread/thread/41650fc1eb0098bd/cd93612309878979?lnk=gst&q=primary+key#
> )
>
> --START--
> override def primaryKeyField = id
>
>  object id extends MappedLongIndex(this) {
>override def dbDisplay_? = true
>override def writePermission_? = true
>override def dbAutogenerated_? = false
>private var myDirty = false
>override def dirty_? = myDirty
>override def dirty_?(b : Boolean) = { myDirty = b; super.dirty_?
> (b) }
>  }
> --END--
>
> In my form I also make the id editable as a text field.
>
> However, when I save (click submit on the form), I get a stack trace:
>
> Message: java.lang.NullPointerException: Trying to open an empty Box
>net.liftweb.common.EmptyBox.open_$bang(Box.scala:370)
>net.liftweb.common.EmptyBox.open_$bang(Box.scala:366)
>net.liftweb.mapper.MetaMapper$$anonfun$runAppliers$1$1.apply
> (MetaMapper.scala:617)
>
> Line 617 is:
> findApplier(indexMap.open_!, rs.getObject(1)) match {
>
> Could someone please shed some light? If I want to override the
> primary key, do I need to do extra house-keeping? (e.g. managing
> indexMap ?)
>
> I enabled query logging by using the code on
>
> http://groups.google.com/group/liftweb/browse_thread/thread/7d5daf78a7e52275/ff9b6f80e19a999b?lnk=gst&q=addLogFunc#ff9b6f80e19a999b
> but I can't see the "insert" SQL code in the logs/console - line 618
> probably takes care of that.
>
> Thank you,
> Juan
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] H2 foreign keys

2009-11-18 Thread Derek Chen-Becker
That's what I've been doing as we have to make changes. For instance, we
needed to change how schemifier creates index columns to accomodate Oracle
sequences, so I moved that to DriverType.

On Sun, Nov 15, 2009 at 10:24 AM, Naftoli Gugenheim wrote:

>
> The H2 DriverType does not indicate H2 supports foreign key constraints.
> However it does, albeit with a different syntax than Schemifier uses.
> I'll try to file a ticket later. If I decide to work on it, what would be
> the best way? Refactor the SQL in Schemifier to be generated by the
> DriverType?
>
>
> --~--~-~--~~~---~--~~
> 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
> -~--~~~~--~~--~--~---
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] MetaMapper trying to open Empty Box - best practice?

2009-11-18 Thread opyate
Hello Lifters,

I'm overriding my model's primary key like so, because the "id" field
is non-autoincrement:

(taken from Derek's suggestion on
http://groups.google.com/group/liftweb/browse_thread/thread/41650fc1eb0098bd/cd93612309878979?lnk=gst&q=primary+key#)

--START--
override def primaryKeyField = id

  object id extends MappedLongIndex(this) {
override def dbDisplay_? = true
override def writePermission_? = true
override def dbAutogenerated_? = false
private var myDirty = false
override def dirty_? = myDirty
override def dirty_?(b : Boolean) = { myDirty = b; super.dirty_?
(b) }
  }
--END--

In my form I also make the id editable as a text field.

However, when I save (click submit on the form), I get a stack trace:

Message: java.lang.NullPointerException: Trying to open an empty Box
net.liftweb.common.EmptyBox.open_$bang(Box.scala:370)
net.liftweb.common.EmptyBox.open_$bang(Box.scala:366)
net.liftweb.mapper.MetaMapper$$anonfun$runAppliers$1$1.apply
(MetaMapper.scala:617)

Line 617 is:
findApplier(indexMap.open_!, rs.getObject(1)) match {

Could someone please shed some light? If I want to override the
primary key, do I need to do extra house-keeping? (e.g. managing
indexMap ?)

I enabled query logging by using the code on
http://groups.google.com/group/liftweb/browse_thread/thread/7d5daf78a7e52275/ff9b6f80e19a999b?lnk=gst&q=addLogFunc#ff9b6f80e19a999b
but I can't see the "insert" SQL code in the logs/console - line 618
probably takes care of that.

Thank you,
Juan

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: scala eclipse plugin with lift

2009-11-18 Thread Miles Sabin
On Wed, Nov 18, 2009 at 12:17 PM, Marius  wrote:
> It interpreted my scala code as java out of the sudden. I tried the
> JDT weving trick and nothing.

If you had JDT weaving enabled then only way you would see Scala code
interpreted as Java is if the .project file included the Java builder.
That only happens when you use Maven to generate your project
metadata.

So please report this issue to whoever is responsible for that Maven behaviour.

Cheers,


Miles

-- 
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: scala eclipse plugin with lift

2009-11-18 Thread Marius
Glad to hear that Miles. 2.7.7 eclipse plugin made me switch to emacs.
It interpreted my scala code as java out of the sudden. I tried the
JDT weving trick and nothing.

I'm quite pleased with emacs the only thing I miss is the auto-
completion for class methods but that never worked consistently for me
in the Eclipse Scala plugin either.

Of course I'll come back to eclipse when it is in a better shape.

Br's,
Marius

On Nov 18, 1:54 pm, Miles Sabin  wrote:
> On Wed, Nov 18, 2009 at 7:25 AM, Francois Armand  wrote:
> > What plugin version are you using ? There is a 2.7 version of the plugin
> > that has to be used with Lift. This version is notoriously buggy, slow
> > and not maintained.
>
> > The new Eclipse plugin version, which only target Scala 2.8, is far far
> > better (and is become better days after days). It is not production
> > ready yet (compared to say the Java editor of Eclipse), but I begin to
> > think that it will be good (from usable today) in a near future.
>
> There's only one Eclipse IDE and it's very much maintained ... that
> 2.8 branch that you're getting such good results from is precisely the
> result of that work.
>
> It's clearly come on a long way since 2.7.x, but many people are
> working with 2.7.x very successfully.
>
> Cheers,
>
> Miles
>
> --
> Miles Sabin
> tel: +44 (0)7813 944 528
> skype:  milessabinhttp://www.chuusai.com/http://twitter.com/milessabin

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: How to execute client-side js from ajax callback?

2009-11-18 Thread jhonig
Dear Eros,

I had hoped to avoid reading the source code to get something done :-)

Indeed I noticed that the argument was a String.   I just hoped that
it
would be evaluated :-)

Your code is working now; next step was to try to assemble a
Javascript
string from some bits and pieces, including data gathered from client-
side
calls.  That's also a non-trivial undertaking, I've found by now.

Thanks a lot,

Job H.



On Nov 18, 12:17 pm, Eros Candelaresi  wrote:
> Hi,
>
> as a rule of thumb: when the Lift class expects a String as parameter,
> this will also be a String on JavaScript side. Alert expects a String,
> so it does not matter if the string is "Hello World!",
> "getAvailableWidth()" or anything else. By the time it reaches the
> client, Lift has already made sure that it is a plain text string. I
> guess, Run() is one of very little exceptions.
>
> On the other hand, when a Lift class takes a JsExp as parameter, the
> expression will be sent to the client as JavaScript code and then be
> executed there.
> Example:
> Stringify(getWidth())
> would result in the following JavaScript code:
> JSON.stringify(getAvailableWidth)
>
> It got pretty clear to me when I started looking at the source code.
> Most of those JavaScript wrapper classes are simply one-liners that
> create a small piece of JavaScript code.
>
> Btw, I found a nicer solution for your alert problem:
> def alert(what: JsExp) = {
>   JsFunc("alert", what)
>
> }
>
> Regards,
> Eros
>
> jhonig wrote:
> > Hi Eros,
>
> > Thanks for your reply!
>
> >> I ran into the same problem. The Alert case class takes only a string.
> >> |case class Alert(val text : String
> >> )| |
>
> >> |I.e. the result of getWidth is quoted such that it remains a plain
> >> string when it is evaluated on client side. Best thing would be if Alert
> >> was changed to accept a JsExp as parameter, then your code would work.
>
> > I will try your workaround, but I still don't understand how
> > "Javascript"
> > expressions are evaluated.  From what you say, the result of getWidth
> > would be converted to "getAvailableWidth ()" and never actually run.
> > But then "Alert (Run (what))" should work, shouldn't it?  But the
> > results
> > are exactly the same!
>
> > Do you know of any comprehensive description of how such expressions
> > are evaluated by Lift?
>
> > Job
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Hello world problems

2009-11-18 Thread jimmy
I am trying to try out lift/scala and I must say I am not getting a
warm cosy feeling about this!

First after following the instructions on the "mvn jetty:run" step I
get--
 "mortbay.jetty. etc etc not found message.

A quick web search revelas this to be a ubiquitous apache/maven
problem
but after adding the mortbay group  to the plugins in hte pom I can
carry on.

The next problem is however:-
"Webapp source directory C:\lift\helloworld\src\main\webapp does not
exist"

and its true what it says the direcctory does not exist
I have a "C:\lift\helloworld\src\main\java\demo\helloworld"  directory
but not a Webapp directory.

Now remember this is my first try with lift I and was seriously
considering it as against Grails.
With grails I got all the way through to defineing a many to many
relationship with GORM before I encountered
a problem I had to work at.
With lift I cannot get HelloWorld to work. Now most people would not
have bothered any further
but I will persist for a while.

Whats wrong here? The instructions, maven, the application or me?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] scala eclipse plugin with lift

2009-11-18 Thread Miles Sabin
On Wed, Nov 18, 2009 at 7:25 AM, Francois Armand  wrote:
> What plugin version are you using ? There is a 2.7 version of the plugin
> that has to be used with Lift. This version is notoriously buggy, slow
> and not maintained.
>
> The new Eclipse plugin version, which only target Scala 2.8, is far far
> better (and is become better days after days). It is not production
> ready yet (compared to say the Java editor of Eclipse), but I begin to
> think that it will be good (from usable today) in a near future.

There's only one Eclipse IDE and it's very much maintained ... that
2.8 branch that you're getting such good results from is precisely the
result of that work.

It's clearly come on a long way since 2.7.x, but many people are
working with 2.7.x very successfully.

Cheers,


Miles

-- 
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: How to execute client-side js from ajax callback?

2009-11-18 Thread Eros Candelaresi
Hi,

as a rule of thumb: when the Lift class expects a String as parameter, 
this will also be a String on JavaScript side. Alert expects a String, 
so it does not matter if the string is "Hello World!", 
"getAvailableWidth()" or anything else. By the time it reaches the 
client, Lift has already made sure that it is a plain text string. I 
guess, Run() is one of very little exceptions.

On the other hand, when a Lift class takes a JsExp as parameter, the 
expression will be sent to the client as JavaScript code and then be 
executed there.
Example:
Stringify(getWidth())
would result in the following JavaScript code:
JSON.stringify(getAvailableWidth)

It got pretty clear to me when I started looking at the source code. 
Most of those JavaScript wrapper classes are simply one-liners that 
create a small piece of JavaScript code.

Btw, I found a nicer solution for your alert problem:
def alert(what: JsExp) = {
  JsFunc("alert", what)
}

Regards,
Eros



jhonig wrote:
> Hi Eros,
>
> Thanks for your reply!
>
>   
>> I ran into the same problem. The Alert case class takes only a string.
>> |case class Alert(val text : String
>> )| |
>>
>> |I.e. the result of getWidth is quoted such that it remains a plain
>> string when it is evaluated on client side. Best thing would be if Alert
>> was changed to accept a JsExp as parameter, then your code would work.
>> 
>
> I will try your workaround, but I still don't understand how
> "Javascript"
> expressions are evaluated.  From what you say, the result of getWidth
> would be converted to "getAvailableWidth ()" and never actually run.
> But then "Alert (Run (what))" should work, shouldn't it?  But the
> results
> are exactly the same!
>
> Do you know of any comprehensive description of how such expressions
> are evaluated by Lift?
>
> Job
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>   

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: How to execute client-side js from ajax callback?

2009-11-18 Thread jhonig
Hi Eros,

Thanks for your reply!

> I ran into the same problem. The Alert case class takes only a string.
> |case class Alert(val text : String
> )| |
>
> |I.e. the result of getWidth is quoted such that it remains a plain
> string when it is evaluated on client side. Best thing would be if Alert
> was changed to accept a JsExp as parameter, then your code would work.

I will try your workaround, but I still don't understand how
"Javascript"
expressions are evaluated.  From what you say, the result of getWidth
would be converted to "getAvailableWidth ()" and never actually run.
But then "Alert (Run (what))" should work, shouldn't it?  But the
results
are exactly the same!

Do you know of any comprehensive description of how such expressions
are evaluated by Lift?

Job

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] How to execute client-side js from ajax callback?

2009-11-18 Thread Eros Candelaresi
Hi,

I ran into the same problem. The Alert case class takes only a string.
|case class Alert(val text : String 
)| |

|I.e. the result of getWidth is quoted such that it remains a plain 
string when it is evaluated on client side. Best thing would be if Alert 
was changed to accept a JsExp as parameter, then your code would work.

A (somewhat unpleasent) workaround would be:
|/* not checked for syntax */
def alert(what: JsExp) = {
  JsRaw("alert(" + what.cmd + ");");
}
|
Maybe someone knows a more elegant way though.

Regards,
Eros

jhonig wrote:
> Hi All,
>
> I am trying to execute a local (ie: defined in the template)
> javascript function from an Ajax
> callback.  This is the callback:
>
> def testAjax2 (theXhtml : NodeSeq) : NodeSeq =
> {
> def getWidth () =
> {
> Call ("getAvailableWidth").cmd;
> }
>
> def alert (what : String) =
> {
> Alert (what);
> }
>
> bind ("fgh", theXhtml, "key" -> SHtml.a (() => {alert
> (getWidth ());}, Text ("Click me")));
> }
>
> The alert is displayed, but the text it shows is "getAvailableWidth
> ()".  I have been trying dozens
> of variations, but didn't get the result I am hoping for; it's always
> the string...
>
> What am I doing wrong?
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>   

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: XML Parsing Error: prefix not bound to a namespace

2009-11-18 Thread mr najmi
sory..it works..thank you very much..

On Nov 18, 12:57 pm, Ross Mellgren  wrote:
> You forgot to quote "branches" before -> in your bind. That is,
>
> >    bind("e",xhtml,
> >         branches -> SHtml.text(branches,branches=_)
>
> >    )
>
> Should be:
>
> >    bind("e",xhtml,
> >         "branches" -> SHtml.text(branches,branches=_)
>
> >    )
>
> As it is, the only tag that would be accepted would be "" (the empty string)
>
> -Ross
>
> On Nov 17, 2009, at 11:46 PM, mr najmi wrote:
>
> > hai,
>
> > i have a problem in liftweb that is XML Parsing Error: prefix not
> > bound to a namespace..
> > Branch : 
> > ^
> > here is the code
>
> > 
> >        
> >            
> >            Branch : 
>
> >            Search
> >        
> >    
>
> > class Appointment {
>
> >    def search(xhtml:NodeSeq):NodeSeq={
> >        var branches = ""
>
> >    bind("e",xhtml,
> >         branches -> SHtml.text(branches,branches=_)
>
> >    )
> >    }
> > }
>
> > i have try all the sugested solution but fail to solve this problem..i
> > really2 need help.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: XML Parsing Error: prefix not bound to a namespace

2009-11-18 Thread mr najmi
thanks for your reply.but unfortunately it still didn`t solve the
problem

On Nov 18, 12:57 pm, Ross Mellgren  wrote:
> You forgot to quote "branches" before -> in your bind. That is,
>
> >    bind("e",xhtml,
> >         branches -> SHtml.text(branches,branches=_)
>
> >    )
>
> Should be:
>
> >    bind("e",xhtml,
> >         "branches" -> SHtml.text(branches,branches=_)
>
> >    )
>
> As it is, the only tag that would be accepted would be "" (the empty string)
>
> -Ross
>
> On Nov 17, 2009, at 11:46 PM, mr najmi wrote:
>
> > hai,
>
> > i have a problem in liftweb that is XML Parsing Error: prefix not
> > bound to a namespace..
> > Branch : 
> > ^
> > here is the code
>
> > 
> >        
> >            
> >            Branch : 
>
> >            Search
> >        
> >    
>
> > class Appointment {
>
> >    def search(xhtml:NodeSeq):NodeSeq={
> >        var branches = ""
>
> >    bind("e",xhtml,
> >         branches -> SHtml.text(branches,branches=_)
>
> >    )
> >    }
> > }
>
> > i have try all the sugested solution but fail to solve this problem..i
> > really2 need help.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] How to make Ajax call from "onLoad"/"onResize"?

2009-11-18 Thread jhonig
Hi All,

Yet another question: I need to make Ajax calls when a page is loaded
or resized.  The call would need to pass some local client information
(browser size).  The return should be javascript code that populates a
div on that page (in particular: an image that is scaled on the server
to match the browser size).   Actually, local js code is in place that
makes the call only after the user has stopped resizing (using a
timeout).

I guess I have to use AjaxCall, providing an expression that puts the
window dimensions in an array or list, then return the javascript to
add an  tag that downloads the scaled image from a generated url.

Given the level of success I achieved so far, I thought I better ask
if this would work our before I start trying endlessly.

Thanks for any suggestions,

Job

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] How to execute client-side js from ajax callback?

2009-11-18 Thread jhonig
Hi All,

I am trying to execute a local (ie: defined in the template)
javascript function from an Ajax
callback.  This is the callback:

def testAjax2 (theXhtml : NodeSeq) : NodeSeq =
{
def getWidth () =
{
Call ("getAvailableWidth").cmd;
}

def alert (what : String) =
{
Alert (what);
}

bind ("fgh", theXhtml, "key" -> SHtml.a (() => {alert
(getWidth ());}, Text ("Click me")));
}

The alert is displayed, but the text it shows is "getAvailableWidth
()".  I have been trying dozens
of variations, but didn't get the result I am hoping for; it's always
the string...

What am I doing wrong?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.