[Lift] Re: lift-webkit-1.1-SNAPSHOT contains duplicate classes (e.g. Box.class)

2009-11-12 Thread Heiko Seeberger
OK, I spotted the problem and will work on the issue ...

Heiko

2009/11/13 Heiko Seeberger 

> maven-bundle-plugin? Well, that's my business, I guess. I will take a look
> ...
>
> Heiko
>
> 2009/11/12 Alex Boisvert 
>
> Can one of our resident Maven experts quickly look at:
>> http://github.com/dpp/liftweb/issues/#issue/166
>>
>> I took a brief look at the poms but couldn't figure why Maven was
>> including classes from lift-common and lift-actor into lift-webkit.  It is a
>> feature of the maven-bundle-plugin?
>>
>> I can take care of fixing the issue if pointed towards the right
>> direction.
>>
>> thanks!
>> alex
>>
>>
>> >>
>>
>
>
> --
> 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
>



-- 
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: lift-webkit-1.1-SNAPSHOT contains duplicate classes (e.g. Box.class)

2009-11-12 Thread Heiko Seeberger
maven-bundle-plugin? Well, that's my business, I guess. I will take a look
...

Heiko

2009/11/12 Alex Boisvert 

> Can one of our resident Maven experts quickly look at:
> http://github.com/dpp/liftweb/issues/#issue/166
>
> I took a brief look at the poms but couldn't figure why Maven was including
> classes from lift-common and lift-actor into lift-webkit.  It is a feature
> of the maven-bundle-plugin?
>
> I can take care of fixing the issue if pointed towards the right direction.
>
> thanks!
> alex
>
>
> >
>


-- 
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Problem cloning lift repo.

2009-11-12 Thread ivan

I am trying to clone git lift repo and keep getting this error:

git clone http://github.com/dpp/liftweb.git

Initialized empty Git repository in /home/ivan/Dokumenti/Projects/
scala/lift/liftweb/.git/
got 38024d4c9cdf764c6d5c8350c78a64ff233b7f05
walk 38024d4c9cdf764c6d5c8350c78a64ff233b7f05
Getting alternates list for http://github.com/dpp/liftweb.git
Getting pack list for http://github.com/dpp/liftweb.git
Getting index for pack e107de95ba6e027dbdf6c0a2579c57730b8d4dfd
got 3090feee6cdeb344fe3d94137ba175c68c400f39
Getting index for pack 320b9931ea32d90ae87a12ecd43238843aee9eba
Getting pack e107de95ba6e027dbdf6c0a2579c57730b8d4dfd
 which contains a5a70794c6ad5d414c5778bd450f21fda50135cb
got 579d28493a4dede0eba92521b954f575cf947532
got d9e584740f3e10e95df3b1edc1d7bb093128e922
error: Unable to get pack file
http://github.com/dpp/liftweb.git/objects/pack/pack-e107de95ba6e027dbdf6c0a2579c57730b8d4dfd.pack
The requested URL returned error: 502
error: Unable to find a5a70794c6ad5d414c5778bd450f21fda50135cb under
http://github.com/dpp/liftweb.git
Cannot obtain needed object a5a70794c6ad5d414c5778bd450f21fda50135cb
while processing commit 38024d4c9cdf764c6d5c8350c78a64ff233b7f05.
fatal: Fetch failed.

If I try clone over git protocol I get another error:

git clone git://github.com/dpp/liftweb.git
Initialized empty Git repository in /home/ivan/Dokumenti/Projects/
scala/lift/liftweb/.git/
... after some time
github.com[0: 207.97.227.239]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)


I think that this other error could have something to do with a
firewall blocking git protocol port, but shouldn't clone work over
http? I can clone my repos from github without problems.

Any ideas?


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



[Lift] Re: CometListener

2009-11-12 Thread Jack Widman
David,

I'm using lift 1.1 and scala 2.5 now and the compiler says it cant find
CometListener when I import net.liftweb.http._

Jack

On Fri, Nov 13, 2009 at 12:01 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Thu, Nov 12, 2009 at 8:54 PM, Jack Widman wrote:
>
>> C:\work\widman\src\main\scala\com\widman\comet\PackComet.scala:20: error:
>> type CometListener is not a member of package net.liftweb.http
>>
>> I got this compile error.
>>
>> I must be missing something obvious.
>
>
> It's part of Lift 1.1, not Lift 1.0
>
>
>>
>>
>>  On Thu, Nov 12, 2009 at 11:42 PM, Ross Mellgren wrote:
>>
>>>
>>> It is in net.liftweb.http.
>>>
>>>
>>> http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html
>>>
>>>
>>> By the way, the link you gave only indicates it's in either
>>> net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple
>>> other packages, since scala implicitly imports superpackages).
>>>
>>> -Ross
>>>
>>> On Nov 12, 2009, at 11:38 PM, jack wrote:
>>>
>>> >
>>> > I also tried net.liftweb.http
>>> >
>>> > On Nov 12, 11:35 pm, jack  wrote:
>>> >> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
>>> >> it is in the package net.liftweb._ but compiler says it can't be
>>> >> found. Is this the wrong package?
>>> > >
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Jack Widman
>>
>> co-founder / cto,  Authoritude, Inc.
>>
>> 203-641-9355
>>
>>
>>
>>
>
>
> --
> 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
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

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



[Lift] Re: Empty Box exception in MetaMapper

2009-11-12 Thread Jim McBeath

Assuming I prune it down to an example that requires only a few
files, which would probably include an SQL script for creating a test
database that has the appropriate schema in it, is there a procedure
for submitting such a test case?  Should I just post source code
to this group?  Make a jar file with sources and put it somewhere?
If someone can point me to a wiki page or some other reference to clue
me in as to standard procedure for doing this, that would be nice.

--
Jim

On Thu, Nov 12, 2009 at 07:28:24PM -0800, David Pollak wrote:
> Date: Thu, 12 Nov 2009 19:28:24 -0800
> From: David Pollak 
> To: liftweb@googlegroups.com
> Subject: [Lift] Re: Empty Box exception in MetaMapper
> 
>If you can create a reproducible case, we're look into it.
> 
>On Thu, Nov 12, 2009 at 5:43 PM, Jim McBeath 
>wrote:
> 
>  When I try to save a record in my table from the Create form built
>  by
>  CRUDify, I am getting a "Trying to open an empty Box" exception from
>  within MetaMapper.scala, line 617 (in 1.1M7), which is this line:
>  Â  Â findApplier(indexMap.open_!, rs.getObject(1)) match {
>  It appears that indexMap is initialized to Empty at line 888
>  and is set to Full at line 985, but the latter happens only if
>  dbPrimaryKey_? and dbAutogenerated? are both true. Â In my case I
>  have set dbAutogenerated_? = false for my primary key, so indexMap
>  will always be Empty, and the code at line 617 will always throw
>  an exception.
>  Is this a bug, or am I misunderstanding or misusing something?
>  My primary field in my KeyedMapper class looks essentially like
>  this:
>  Â  Â object pk extends MappedStringIndex(this,1) {
>  Â  Â  Â  Â override def dbColumnName = "TABLENAME_PK"
>  Â  Â  Â  Â override def dbDisplay_? = true
>  Â  Â  Â  Â override def writePermission_? = true
>  Â  Â  Â  Â override def dbAutogenerated_? = false
>  Â  Â  Â  Â override lazy val defaultValue = ""
>  Â  Â }
>  --
>  Jim
>  P.S. Thanks for the OracleDriver fix, Dave.
> 
>--
>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
-~--~~~~--~~--~--~---



[Lift] Re: scala version

2009-11-12 Thread David Pollak
Lift 1.1-M6 -> Scala 2.7.5
Lift 1.1-M7 & SNAPSHOT -> Scala 2.7.7

On Thu, Nov 12, 2009 at 9:01 PM, jack  wrote:

>
> I'm using lift version 1.1-M6. Which version of scala do I need? In
> general, how do I know which version of Scala to use?
> >
>


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



[Lift] scala version

2009-11-12 Thread jack

I'm using lift version 1.1-M6. Which version of scala do I need? In
general, how do I know which version of Scala to use?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: CometListener

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 8:54 PM, Jack Widman  wrote:

> C:\work\widman\src\main\scala\com\widman\comet\PackComet.scala:20: error:
> type CometListener is not a member of package net.liftweb.http
>
> I got this compile error.
>
> I must be missing something obvious.


It's part of Lift 1.1, not Lift 1.0


>
>
> On Thu, Nov 12, 2009 at 11:42 PM, Ross Mellgren  wrote:
>
>>
>> It is in net.liftweb.http.
>>
>>
>> http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html
>>
>>
>> By the way, the link you gave only indicates it's in either
>> net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple
>> other packages, since scala implicitly imports superpackages).
>>
>> -Ross
>>
>> On Nov 12, 2009, at 11:38 PM, jack wrote:
>>
>> >
>> > I also tried net.liftweb.http
>> >
>> > On Nov 12, 11:35 pm, jack  wrote:
>> >> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
>> >> it is in the package net.liftweb._ but compiler says it can't be
>> >> found. Is this the wrong package?
>> > >
>>
>>
>>
>>
>
>
> --
> Jack Widman
>
> co-founder / cto,  Authoritude, Inc.
>
> 203-641-9355
>
>
> >
>


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



[Lift] Re: Problem with BlazeDS and LiftFilter 1.0+

2009-11-12 Thread David Pollak
Oshyshki,

Your call to Service.say is outside the scope of the Lift HTTP request, so
it's not wrapped with the transaction management stuff.  You could insert:

DB.use(
DefaultConnectionIdentifier) {
  ignore =>
  (0 to 5).foreach(i => User.findAll)
}

Inside your say method and all of the requests would be part of the same
transaction.

But to demonstrate that the DB.buildLoanWrapper stuff works correctly, I
added a standard HTML form to the page.  This form is serviced within the
Lift scope, so the Mapper transaction stuff is done correctly.  Please apply
the enclosed diff to your Git project.

Thanks,

David


On Thu, Nov 12, 2009 at 5:16 PM, oshyshko  wrote:

>
> Hello David,
>
> I have added some DB stuff + added "S.addAround(DB.buildLoanWrapper)"
> But the code produces separate transactions.
>
> For example, this code:
> =
> class Service {
>  def say(message: String) {
>println(message)
>
>(0 to 5).foreach( i => User.findAll )
>  }
> }
> =
>
>
> Produces this SQL:
> =
> 091113  2:59:24 6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
> =
>
> Basically it behaves like when LiftFilter url mapping was commented in
> "web.xml".
>
> I have updated http://github.com/oshyshko/lift_vs_blazeds
>
> To reproduce it:
>
> 1. mysql -> create database demo;
>
> 2. Enable MySQL query logging by editing "my.ini" + restart MySQL
> daemon:
> [mysqld]
> log=mysql-log.log
>
> 3. Open separate console to watch what's going on
> $ tail -f mysql-log.log
>
> 4. mvn jetty:run-exploded
>
> 5. Open http://localhost:8080/ + click "Say it"
>
> 6. Observe 7 transactions instead of 1 in the log
>  should =>
> 6. Observe all queries inside 1 transaction in the log
>
> On Nov 13, 2:29 am, David Pollak 
> wrote:
> > the issue is the new debugging help screen in dev mode got in the way of
> the
> > passing not found... so...
> >
>
> >
>


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

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..8bb6c96
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,42 @@
+# use glob syntax.
+syntax: glob
+*.ser
+*.class
+*~
+*.bak
+*.off
+*.old
+.DS_Store
+
+# logs
+derby.log
+lift_proto.db*
+
+# eclipse conf file
+.settings
+.classpath
+.project
+.manager
+
+# building
+target
+build
+null
+tmp*
+dist
+test-output
+
+# other scm
+.svn
+.CVS
+.hg*
+
+# switch to regexp syntax.
+#  syntax: regexp
+#  ^\.pc/
+
+
+# IntelliJ
+*.iml
+*.ipr
+*.iws
diff --git a/pom.xml b/pom.xml
index dbf1bdf..2f73ce7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,8 +9,8 @@
 1.0-SNAPSHOT
 
 
-2.7.5
-1.1-M6
+2.7.7
+1.1-M7
 UTF-8
 
 
@@ -22,10 +22,11 @@
 
 
 
-mysql
-mysql-connector-java
-5.1.10
+com.h2database
+h2
+1.2.121
 
+
 
 
 
diff --gi

[Lift] Re: Problem with BlazeDS and LiftFilter 1.0+

2009-11-12 Thread David Pollak
Oshyshki,

Your call to Service.say is outside the scope of the Lift HTTP request, so
it's not wrapped with the transaction management stuff.  You could insert:

DB.use(DefaultConnectionIdentifier) {
  ignore =>


On Thu, Nov 12, 2009 at 5:16 PM, oshyshko  wrote:

>
> Hello David,
>
> I have added some DB stuff + added "S.addAround(DB.buildLoanWrapper)"
> But the code produces separate transactions.
>
> For example, this code:
> =
> class Service {
>  def say(message: String) {
>println(message)
>
>(0 to 5).foreach( i => User.findAll )
>  }
> }
> =
>
>
> Produces this SQL:
> =
> 091113  2:59:24 6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
>6 Query SET autocommit=0
>6 Query SET autocommit=0
>6 Query SELECT user_t.id FROM user_t
>6 Query commit
> =
>
> Basically it behaves like when LiftFilter url mapping was commented in
> "web.xml".
>
> I have updated http://github.com/oshyshko/lift_vs_blazeds
>
> To reproduce it:
>
> 1. mysql -> create database demo;
>
> 2. Enable MySQL query logging by editing "my.ini" + restart MySQL
> daemon:
> [mysqld]
> log=mysql-log.log
>
> 3. Open separate console to watch what's going on
> $ tail -f mysql-log.log
>
> 4. mvn jetty:run-exploded
>
> 5. Open http://localhost:8080/ + click "Say it"
>
> 6. Observe 7 transactions instead of 1 in the log
>  should =>
> 6. Observe all queries inside 1 transaction in the log
>
> On Nov 13, 2:29 am, David Pollak 
> wrote:
> > the issue is the new debugging help screen in dev mode got in the way of
> the
> > passing not found... so...
> >
>
> >
>


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



[Lift] Re: CometListener

2009-11-12 Thread Jack Widman
C:\work\widman\src\main\scala\com\widman\comet\PackComet.scala:20: error:
type CometListener is not a member of package net.liftweb.http

I got this compile error.

I must be missing something obvious.

On Thu, Nov 12, 2009 at 11:42 PM, Ross Mellgren  wrote:

>
> It is in net.liftweb.http.
>
>
> http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html
>
>
> By the way, the link you gave only indicates it's in either
> net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple
> other packages, since scala implicitly imports superpackages).
>
> -Ross
>
> On Nov 12, 2009, at 11:38 PM, jack wrote:
>
> >
> > I also tried net.liftweb.http
> >
> > On Nov 12, 11:35 pm, jack  wrote:
> >> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
> >> it is in the package net.liftweb._ but compiler says it can't be
> >> found. Is this the wrong package?
> > >
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

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



[Lift] Re: CometListener

2009-11-12 Thread Ross Mellgren

It is in net.liftweb.http.

http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html


By the way, the link you gave only indicates it's in either  
net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple  
other packages, since scala implicitly imports superpackages).

-Ross

On Nov 12, 2009, at 11:38 PM, jack wrote:

>
> I also tried net.liftweb.http
>
> On Nov 12, 11:35 pm, jack  wrote:
>> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
>> it is in the package net.liftweb._ but compiler says it can't be
>> found. Is this the wrong package?
> >


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



[Lift] Re: CometListener

2009-11-12 Thread jack

I also tried net.liftweb.http

On Nov 12, 11:35 pm, jack  wrote:
> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
> it is in the package net.liftweb._ but compiler says it can't be
> found. Is this the wrong package?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] CometListener

2009-11-12 Thread jack

I am trying to use CometListener. According to http://bit.ly/1Wnxt4 ,
it is in the package net.liftweb._ but compiler says it can't be
found. Is this the wrong package?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: ManyToMany decision

2009-11-12 Thread Naftoli Gugenheim
http://reviewboard.liftweb.net/r/101/
From my the end of my description:

Please advise me as to what testing is appropriate.
Also, when it finds broken joins should it log them?



On Thu, Nov 12, 2009 at 9:28 PM, Naftoli Gugenheim wrote:

> In any case, the major problem with silently dropping children not in the
> join table is that it becomes necessary to take indexes into the children
> table and convert them to indexes into the join table. Any ideas how to go
> about doing so, without scanning the join table for broken entries each
> time?
>
>
> On Thu, Nov 12, 2009 at 12:16 PM, Naftoli Gugenheim 
> wrote:
>
>> Interesting. Did you see mapper.view.ItemsList?
>>
>> -
>> glenn wrote:
>>
>>
>> There is a related issue that if implemented, would certainly make the
>> Mapper framework more robust - that of marking table rows for
>> deletion,
>> rather than deleting them directly.  Some RDBMS's have a built-in
>> marking
>> function, and another function that actually removes rows that have
>> been
>> so marked.
>>
>> Glenn
>>
>> On Nov 12, 8:35 am, glenn  wrote:
>> > Naftoli,
>> >
>> > Isn't this really a cascading delete issue and not one isolated to
>> > ManyToMany situations? Most ORM solutions allow for cascading deletes.
>> > Such a feature could be added to the Mapper class, itself, and hold a
>> > list of foreign key assignments that the delete function could iterate
>> > over, if turned on.
>> >
>> > Glenn
>> >
>> > On Nov 11, 9:31 am, Naftoli Gugenheim  wrote:
>> >
>> >
>> >
>> >
>> >
>> > > To clarify: The fundamental purpose of ManyToMany, like OneToMany, is
>> that rather than dealing with "children" of an entity as they are in the
>> database at a given moment, instead, they should have similar semantics to a
>> MappedField: You load it from the database, modify it to your hearts
>> content, and then decide whether you want to save it or not. For example,
>> calling set() on a MappedField does not write immediately to the database,
>> and it's a good thing too--imagine a multi-page form where you can go back
>> and forth to different screens, or a single page form that uses submit
>> buttons that perform some action but you stay on the same page. You don't
>> want the user's changes to go the database unless he clicks "Save." So too,
>> one often wants to edit a list on one screen. There should be submit buttons
>> to add records, etc., but if you don't click save it shouldn't go to the
>> database.
>> > > So MappedOneToMany and MappedManyToMany act as collections, internally
>> keeping track of which records were inserted or removed, but not performing
>> a create or delete until the "field" is saved. So in other words they act as
>> multi-valued fields.
>> > > There are two ways MappedManyToMany can do this. It can hold a list of
>> join table records, or child table records. Either way it will have to look
>> up the other at times.
>> > > Now in order for saves and deletes on the ManyToMany Mapper to be
>> propagated to the MappedManyToMany fields, it has to have a list of them.
>> The list only gets populated when code references the field, causing it to
>> be initialized and add itself to the list of m-n fields.
>> > > So we make all of these proposed changes?
>> >
>> > > -
>> >
>> > > Jim Barrows wrote:
>> >
>> > > On Tue, Nov 10, 2009 at 2:16 PM, Naftoli Gugenheim <
>> naftoli...@gmail.com>wrote:
>> >
>> > > > Hello.
>> > > > When I wrote ManyToMany a couple of months ago, I designed it to
>> internally
>> > > > hold a collection of join table records, and to act as a collection
>> of
>> > > > elements of the child table.
>> > > > For example, given Volunteer and VolunteerGroup where volunteers can
>> be in
>> > > > multiple groups, Volunteer.volunteerGroups implements a collection
>> of
>> > > > VolunteerGroups, but internally it's actually managing a collection
>> of
>> > > > VolunteerVolunteerGroups (the join table).
>> >
>> > > I don't think you really need to maintain the pivot table list
>> > > (VolunteerVolunteerGroups) at all.  If you maintain the Many-to-Many
>> as part
>> > > of the object, and use a standard naming convention then you don't
>> really
>> > > need this extra list running around.  You can still build the SQL
>> correctly
>> > > knowing only the objects involved.
>> >
>> > > > The current implementation throws an error (Predef.error) when it
>> tries to
>> > > > get the child element via the join record and it doesn't exist. Thus
>> any
>> > > > page accessing corrupted data will not display if the error is not
>> caught. I
>> > > > plan, G-d willing, to change the implementation to silently skip
>> such
>> > > > records.
>> > > > But the occurrence that reminded me of the defect also brought
>> another
>> > > > point to my attention. To my knowledge Lift's schemifier does not
>> correctly
>> > > > generate foreign key constraints for all databases (at 

[Lift] Re: Minor Bug? MappedString.valUnique should return one FieldError

2009-11-12 Thread jon

http://github.com/dpp/liftweb/issues/#issue/179

On Nov 12, 6:16 pm, David Pollak 
wrote:
> Could you open a ticket for it?
>
> On Wed, Nov 11, 2009 at 11:53 AM, jon  wrote:
>
> > Hi,
>
> > I'm currently adding a uniqueness requirement to a field, but there
> > are duplicate entries (for empty string) in my database already.
> > Currently valUnique maps each match it found to a FieldError, but
> > should probably return one FieldError regardless of how many matches
> > it finds.
>
> > - Jon
>
> --
> 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
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Empty Box exception in MetaMapper

2009-11-12 Thread David Pollak
If you can create a reproducible case, we're look into it.

On Thu, Nov 12, 2009 at 5:43 PM, Jim McBeath  wrote:

>
> When I try to save a record in my table from the Create form built by
> CRUDify, I am getting a "Trying to open an empty Box" exception from
> within MetaMapper.scala, line 617 (in 1.1M7), which is this line:
>
>findApplier(indexMap.open_!, rs.getObject(1)) match {
>
> It appears that indexMap is initialized to Empty at line 888
> and is set to Full at line 985, but the latter happens only if
> dbPrimaryKey_? and dbAutogenerated? are both true.  In my case I
> have set dbAutogenerated_? = false for my primary key, so indexMap
> will always be Empty, and the code at line 617 will always throw
> an exception.
>
> Is this a bug, or am I misunderstanding or misusing something?
>
> My primary field in my KeyedMapper class looks essentially like this:
>
>object pk extends MappedStringIndex(this,1) {
>override def dbColumnName = "TABLENAME_PK"
>override def dbDisplay_? = true
>override def writePermission_? = true
>override def dbAutogenerated_? = false
>override lazy val defaultValue = ""
>}
>
> --
> Jim
>
> P.S. Thanks for the OracleDriver fix, Dave.
>
> >
>


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



[Lift] Re: jetty/actors performance question tangentially related to lift

2009-11-12 Thread Lincoln

Thanks David, I will give Lift Actors a try.  Mongodb is supposedly
using a connection pool behind the scenes so it isn't supposed to
matter whether I create 1 or many connection objects, but I will check
the source as I'm not 100% sure.

Thanks,
Lincoln

On Thu, Nov 12, 2009 at 8:05 PM, David Pollak
 wrote:
> This is getting off-topic but...
>
> I think the issue is that there's a single connection or a single thread
> accessing MongoDB.  I'd suggest trying a connection pool to MongoDB or to
> otherwise see why the MongoDB stuff is not getting parallelized.
>
> Also, Scala Actors do a lot of fancy stuff in terms of scheduling... you
> might want to try the same benchmarks with Lift Actors and see if there's a
> difference.
>
> On Thu, Nov 12, 2009 at 4:48 PM, Lincoln  wrote:
>>
>> Hi, thank you very much for your help so far I really appreciate it.
>>  Apologies in advance if this thread has become inappropriate since it's not
>> directly related to Lift.  Just let me know if that's the case and I will
>> attempt to solve this problem another way.  But, I'm hoping you can help me
>> some more...
>> Warning: Long email ahead...
>> Here's the summary of my load testing results:
>> Each request in my load test consists of a single save() to mongodb,
>> followed by a findOne() for the record just written and then an arbitrary
>> find() for 1000 docs.
>>
>> I've been experimenting with 3 scenarios:
>>
>> A single actor processing all requests (this effectively makes things
>> single-threaded)
>> A pool of 50 actors handling requests that are dispatched to via a round
>> robin scheduler
>> Create a new actor on demand for every request.
>>
>> The load I've been using for all tests is 2000 requests at a concurrency
>> level of 75.  All the results I'm reporting are averages over 3 executions.
>> As a benchmark, I ran all these scenarios with the worker stubbed out to
>> simply sleep for 100ms and then return.  Here are the results when I ran the
>> benchmark:
>>
>> Single shared worker: 7534.439 ms
>> Shared Pool of 50 workers: 156.190 ms
>> On-demand actor for each request: 127.066 ms
>>
>> These results are about what I expected.  In the single worker case the
>> queue quickly backed up and stayed at 74 requests, thus the results were
>> about the concurrency level (75) multiplied by the work length (100 ms).
>>  The shared pool was obviously a huge improvement, but the actor on demand
>> was even better because the concurrency level (75) was greater than the
>> number of actors in the shared pool (50) and thus there was still some
>> queueing in that case.
>> I expected when I ran the tests with the mongodb work plugged in that I
>> would see results that were roughly proportional to the benchmark.  However,
>> here's what I got:
>>
>> Single shared worker: 1968.113 ms
>> Shared Pool of 50 workers: 1955.218 ms
>> On-demand actor for each request: 1951.352 ms
>>
>> For the vast majority of these requests, most of the time for the request
>> is spent waiting for the actor to receive the work job.  This is the case
>> regardless of whether I'm using a single actor, a pool, or creating actors
>> on demand.  In most cases, the mongo work takes 0 - 100 ms but with a
>> meaningful minority in the 100 - 300ms range.  I think this means the JVM
>> must be busy with something else while that waiting is happening.
>> I guess it makes sense that the single-threaded case goes faster since
>> most of the time the mongodb operations take far less than 100 ms.  However,
>> I don't understand why I'm not seeing proportional improvement in the pooled
>> and on-demand scenarios.
>> Here is the method I'm using to create my actors, whether it be 1, the
>> pool of 50, or a new one on demand every time:
>> def worker(n: Int) = actor {
>> loop {
>> react {
>> case msg @ LoadReq(timer, stats, cont) =>
>> timer.split("react")
>> stats("mailboxSize") = mailboxSize.toLong
>> val coll = staticColl
>> val dbo = (
>> _msg -> "blah blah blah" <<
>> _event -> "blah blah blah" <<
>> _user -> "blah blah blah" <<
>> _name -> "Lincoln"
>> )
>> coll.save(dbo)
>> timer.split("save")
>> coll.findOne(_name -> "Lincoln")
>> timer.split("findOne")
>> val res = coll.find().limit(1000).toArray
>> timer.split("findAll")
>> // timer.split("sleep")
>> cont.setAttribute(Base.CONTINUATION_RESP, LoadResp(timer, stats))
>> cont.resume
>> case other => trace("worker discarded: "+other)
>> }
>> }
>> }
>> I took a kill -3 while my load test was running and I saw a lot of these:
>> "qtp1491907201-104" prio=5 tid=0x000102278800 nid=0x153199000 runnable
>> [0x000153198000]
>>    java.lang.Thread.State: TIMED_WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000108bca370> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos

[Lift] Re: ManyToMany decision

2009-11-12 Thread Naftoli Gugenheim
In any case, the major problem with silently dropping children not in the
join table is that it becomes necessary to take indexes into the children
table and convert them to indexes into the join table. Any ideas how to go
about doing so, without scanning the join table for broken entries each
time?


On Thu, Nov 12, 2009 at 12:16 PM, Naftoli Gugenheim wrote:

> Interesting. Did you see mapper.view.ItemsList?
>
> -
> glenn wrote:
>
>
> There is a related issue that if implemented, would certainly make the
> Mapper framework more robust - that of marking table rows for
> deletion,
> rather than deleting them directly.  Some RDBMS's have a built-in
> marking
> function, and another function that actually removes rows that have
> been
> so marked.
>
> Glenn
>
> On Nov 12, 8:35 am, glenn  wrote:
> > Naftoli,
> >
> > Isn't this really a cascading delete issue and not one isolated to
> > ManyToMany situations? Most ORM solutions allow for cascading deletes.
> > Such a feature could be added to the Mapper class, itself, and hold a
> > list of foreign key assignments that the delete function could iterate
> > over, if turned on.
> >
> > Glenn
> >
> > On Nov 11, 9:31 am, Naftoli Gugenheim  wrote:
> >
> >
> >
> >
> >
> > > To clarify: The fundamental purpose of ManyToMany, like OneToMany, is
> that rather than dealing with "children" of an entity as they are in the
> database at a given moment, instead, they should have similar semantics to a
> MappedField: You load it from the database, modify it to your hearts
> content, and then decide whether you want to save it or not. For example,
> calling set() on a MappedField does not write immediately to the database,
> and it's a good thing too--imagine a multi-page form where you can go back
> and forth to different screens, or a single page form that uses submit
> buttons that perform some action but you stay on the same page. You don't
> want the user's changes to go the database unless he clicks "Save." So too,
> one often wants to edit a list on one screen. There should be submit buttons
> to add records, etc., but if you don't click save it shouldn't go to the
> database.
> > > So MappedOneToMany and MappedManyToMany act as collections, internally
> keeping track of which records were inserted or removed, but not performing
> a create or delete until the "field" is saved. So in other words they act as
> multi-valued fields.
> > > There are two ways MappedManyToMany can do this. It can hold a list of
> join table records, or child table records. Either way it will have to look
> up the other at times.
> > > Now in order for saves and deletes on the ManyToMany Mapper to be
> propagated to the MappedManyToMany fields, it has to have a list of them.
> The list only gets populated when code references the field, causing it to
> be initialized and add itself to the list of m-n fields.
> > > So we make all of these proposed changes?
> >
> > > -
> >
> > > Jim Barrows wrote:
> >
> > > On Tue, Nov 10, 2009 at 2:16 PM, Naftoli Gugenheim <
> naftoli...@gmail.com>wrote:
> >
> > > > Hello.
> > > > When I wrote ManyToMany a couple of months ago, I designed it to
> internally
> > > > hold a collection of join table records, and to act as a collection
> of
> > > > elements of the child table.
> > > > For example, given Volunteer and VolunteerGroup where volunteers can
> be in
> > > > multiple groups, Volunteer.volunteerGroups implements a collection of
> > > > VolunteerGroups, but internally it's actually managing a collection
> of
> > > > VolunteerVolunteerGroups (the join table).
> >
> > > I don't think you really need to maintain the pivot table list
> > > (VolunteerVolunteerGroups) at all.  If you maintain the Many-to-Many as
> part
> > > of the object, and use a standard naming convention then you don't
> really
> > > need this extra list running around.  You can still build the SQL
> correctly
> > > knowing only the objects involved.
> >
> > > > The current implementation throws an error (Predef.error) when it
> tries to
> > > > get the child element via the join record and it doesn't exist. Thus
> any
> > > > page accessing corrupted data will not display if the error is not
> caught. I
> > > > plan, G-d willing, to change the implementation to silently skip such
> > > > records.
> > > > But the occurrence that reminded me of the defect also brought
> another
> > > > point to my attention. To my knowledge Lift's schemifier does not
> correctly
> > > > generate foreign key constraints for all databases (at least not at
> the
> > > > point in time it schemified my H2 database... :) ) so we need a way
> for
> > > > ManyToMany to keep things in sync. ManyToMany helps, to an extent,
> because
> > > > when its MappedManyToMany members are initialized, it puts them in a
> list,
> > > > and it propagates saves and deletes. So if you have a ManyToMany
> Mapper
> > > > instance that contains a MappedManyToMany tha

[Lift] Empty Box exception in MetaMapper

2009-11-12 Thread Jim McBeath

When I try to save a record in my table from the Create form built by
CRUDify, I am getting a "Trying to open an empty Box" exception from
within MetaMapper.scala, line 617 (in 1.1M7), which is this line:

findApplier(indexMap.open_!, rs.getObject(1)) match {

It appears that indexMap is initialized to Empty at line 888
and is set to Full at line 985, but the latter happens only if
dbPrimaryKey_? and dbAutogenerated? are both true.  In my case I
have set dbAutogenerated_? = false for my primary key, so indexMap
will always be Empty, and the code at line 617 will always throw
an exception.

Is this a bug, or am I misunderstanding or misusing something?

My primary field in my KeyedMapper class looks essentially like this:

object pk extends MappedStringIndex(this,1) {
override def dbColumnName = "TABLENAME_PK"
override def dbDisplay_? = true
override def writePermission_? = true
override def dbAutogenerated_? = false
override lazy val defaultValue = ""
}

--
Jim

P.S. Thanks for the OracleDriver fix, Dave.

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



[Lift] Re: Problem with BlazeDS and LiftFilter 1.0+

2009-11-12 Thread oshyshko

Hello David,

I have added some DB stuff + added "S.addAround(DB.buildLoanWrapper)"
But the code produces separate transactions.

For example, this code:
=
class Service {
  def say(message: String) {
println(message)

(0 to 5).foreach( i => User.findAll )
  }
}
=


Produces this SQL:
=
091113  2:59:24 6 Query SET autocommit=0
6 Query SET autocommit=0
6 Query commit
6 Query SET autocommit=0
6 Query SET autocommit=0
6 Query commit
6 Query SET autocommit=0
6 Query SET autocommit=0
6 Query SELECT user_t.id FROM user_t
6 Query commit
6 Query SET autocommit=0
6 Query SET autocommit=0
6 Query SELECT user_t.id FROM user_t
6 Query commit
6 Query SET autocommit=0
6 Query SET autocommit=0
6 Query SELECT user_t.id FROM user_t
6 Query commit
6 Query SET autocommit=0
6 Query SET autocommit=0
6 Query SELECT user_t.id FROM user_t
6 Query commit
6 Query SET autocommit=0
6 Query SET autocommit=0
6 Query SELECT user_t.id FROM user_t
6 Query commit
6 Query SET autocommit=0
6 Query SET autocommit=0
6 Query SELECT user_t.id FROM user_t
6 Query commit
=

Basically it behaves like when LiftFilter url mapping was commented in
"web.xml".

I have updated http://github.com/oshyshko/lift_vs_blazeds

To reproduce it:

1. mysql -> create database demo;

2. Enable MySQL query logging by editing "my.ini" + restart MySQL
daemon:
[mysqld]
log=mysql-log.log

3. Open separate console to watch what's going on
$ tail -f mysql-log.log

4. mvn jetty:run-exploded

5. Open http://localhost:8080/ + click "Say it"

6. Observe 7 transactions instead of 1 in the log
  should =>
6. Observe all queries inside 1 transaction in the log

On Nov 13, 2:29 am, David Pollak 
wrote:
> the issue is the new debugging help screen in dev mode got in the way of the
> passing not found... so...
>

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



[Lift] Re: jetty/actors performance question tangentially related to lift

2009-11-12 Thread David Pollak
This is getting off-topic but...

I think the issue is that there's a single connection or a single thread
accessing MongoDB.  I'd suggest trying a connection pool to MongoDB or to
otherwise see why the MongoDB stuff is not getting parallelized.

Also, Scala Actors do a lot of fancy stuff in terms of scheduling... you
might want to try the same benchmarks with Lift Actors and see if there's a
difference.

On Thu, Nov 12, 2009 at 4:48 PM, Lincoln  wrote:

> Hi, thank you very much for your help so far I really appreciate it.
>  Apologies in advance if this thread has become inappropriate since it's not
> directly related to Lift.  Just let me know if that's the case and I will
> attempt to solve this problem another way.  But, I'm hoping you can help me
> some more...
>
> Warning: Long email ahead...
>
> Here's the summary of my load testing results:
>
> Each request in my load test consists of a single save() to mongodb,
> followed by a findOne() for the record just written and then an arbitrary
> find() for 1000 docs.
>
> I've been experimenting with 3 scenarios:
>
>1. A single actor processing all requests (this effectively makes
>things single-threaded)
>2. A pool of 50 actors handling requests that are dispatched to via a
>round robin scheduler
>3. Create a new actor on demand for every request.
>
> The load I've been using for all tests is 2000 requests at a concurrency
> level of 75.  All the results I'm reporting are averages over 3 executions.
>
> As a benchmark, I ran all these scenarios with the worker stubbed out to
> simply sleep for 100ms and then return.  Here are the results when I ran the
> benchmark:
>
>- Single shared worker: 7534.439 ms
>- Shared Pool of 50 workers: 156.190 ms
>- On-demand actor for each request: 127.066 ms
>
> These results are about what I expected.  In the single worker case the
> queue quickly backed up and stayed at 74 requests, thus the results were
> about the concurrency level (75) multiplied by the work length (100 ms).
>  The shared pool was obviously a huge improvement, but the actor on demand
> was even better because the concurrency level (75) was greater than the
> number of actors in the shared pool (50) and thus there was still some
> queueing in that case.
>
> I expected when I ran the tests with the mongodb work plugged in that I
> would see results that were roughly proportional to the benchmark.  However,
> here's what I got:
>
>- Single shared worker: 1968.113 ms
>- Shared Pool of 50 workers: 1955.218 ms
>- On-demand actor for each request: 1951.352 ms
>
> For the vast majority of these requests, most of the time for the request
> is spent waiting for the actor to receive the work job.  This is the case
> regardless of whether I'm using a single actor, a pool, or creating actors
> on demand.  In most cases, the mongo work takes 0 - 100 ms but with a
> meaningful minority in the 100 - 300ms range.  I think this means the JVM
> must be busy with something else while that waiting is happening.
>
> I guess it makes sense that the single-threaded case goes faster since most
> of the time the mongodb operations take far less than 100 ms.  However, I
> don't understand why I'm not seeing proportional improvement in the pooled
> and on-demand scenarios.
>
> Here is the method I'm using to create my actors, whether it be 1, the pool
> of 50, or a new one on demand every time:
>
> def worker(n: Int) = actor {
> loop {
>  react {
> case msg @ LoadReq(timer, stats, cont) =>
> timer.split("react")
>  stats("mailboxSize") = mailboxSize.toLong
>  val coll = staticColl
>  val dbo = (
> _msg -> "blah blah blah" <<
> _event -> "blah blah blah" <<
>  _user -> "blah blah blah" <<
> _name -> "Lincoln"
> )
>  coll.save(dbo)
> timer.split("save")
>  coll.findOne(_name -> "Lincoln")
>  timer.split("findOne")
>  val res = coll.find().limit(1000).toArray
>  timer.split("findAll")
>
> // timer.split("sleep")
> cont.setAttribute(Base.CONTINUATION_RESP, LoadResp(timer, stats))
>  cont.resume
>  case other => trace("worker discarded: "+other)
>  }
> }
> }
>
> I took a kill -3 while my load test was running and I saw a lot of these:
>
> "qtp1491907201-104" prio=5 tid=0x000102278800 nid=0x153199000 runnable
> [0x000153198000]
>java.lang.Thread.State: TIMED_WAITING (parking)
> at sun.misc.Unsafe.park(Native Method)
>  - parking to wait for  <0x000108bca370> (a
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
> at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
>  at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
> at
> org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:319)
>  at
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
> at java.lang.Thread.run(Thread.java:637)
>
> I also used jstat throughout:
>
> Timestamp S0 S1 E  O  

[Lift] Re: Changes to transaction handling since M6?

2009-11-12 Thread David Pollak
Kris,

There was a bunch of changes in the net.liftweb.mapper.DB code for
transaction management, but I don't think that would impact JPA.

Also, in M7, there were changes in how RequestVars are handled during Ajax
requests... basically, state is snapshotted when the Ajax request is created
and then that snapshot state is restored during the servicing of the Ajax
request.  If the RequestVarEM stuff is being snapshotted, that could cause
issues.

Thanks,

David

On Thu, Nov 12, 2009 at 4:49 PM, Kris Nuttycombe
wrote:

>
> Hi, all (Derek! :),
>
> Have there been significant changes in how transactions are handled by
> lift-jpa since M6? Due to the rearrangement of the repository, I'm
> having a hard time figuring out if the code has changed.
>
> I have a repeatable issue that shows up when changing between M6 and
> SNAPSHOT wherein I now get
> javax.persistence.TransactionRequiredExceptions when doing a merge
> using a JndiEMF with RequestVarEM in an AJAX callback.
>
> Has anything major changed in this timeframe?
>
> Kris
>
> >
>


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



[Lift] Changes to transaction handling since M6?

2009-11-12 Thread Kris Nuttycombe

Hi, all (Derek! :),

Have there been significant changes in how transactions are handled by
lift-jpa since M6? Due to the rearrangement of the repository, I'm
having a hard time figuring out if the code has changed.

I have a repeatable issue that shows up when changing between M6 and
SNAPSHOT wherein I now get
javax.persistence.TransactionRequiredExceptions when doing a merge
using a JndiEMF with RequestVarEM in an AJAX callback.

Has anything major changed in this timeframe?

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



[Lift] Re: jetty/actors performance question tangentially related to lift

2009-11-12 Thread Lincoln
Hi, thank you very much for your help so far I really appreciate it.
 Apologies in advance if this thread has become inappropriate since it's not
directly related to Lift.  Just let me know if that's the case and I will
attempt to solve this problem another way.  But, I'm hoping you can help me
some more...

Warning: Long email ahead...

Here's the summary of my load testing results:

Each request in my load test consists of a single save() to mongodb,
followed by a findOne() for the record just written and then an arbitrary
find() for 1000 docs.

I've been experimenting with 3 scenarios:

   1. A single actor processing all requests (this effectively makes things
   single-threaded)
   2. A pool of 50 actors handling requests that are dispatched to via a
   round robin scheduler
   3. Create a new actor on demand for every request.

The load I've been using for all tests is 2000 requests at a concurrency
level of 75.  All the results I'm reporting are averages over 3 executions.

As a benchmark, I ran all these scenarios with the worker stubbed out to
simply sleep for 100ms and then return.  Here are the results when I ran the
benchmark:

   - Single shared worker: 7534.439 ms
   - Shared Pool of 50 workers: 156.190 ms
   - On-demand actor for each request: 127.066 ms

These results are about what I expected.  In the single worker case the
queue quickly backed up and stayed at 74 requests, thus the results were
about the concurrency level (75) multiplied by the work length (100 ms).
 The shared pool was obviously a huge improvement, but the actor on demand
was even better because the concurrency level (75) was greater than the
number of actors in the shared pool (50) and thus there was still some
queueing in that case.

I expected when I ran the tests with the mongodb work plugged in that I
would see results that were roughly proportional to the benchmark.  However,
here's what I got:

   - Single shared worker: 1968.113 ms
   - Shared Pool of 50 workers: 1955.218 ms
   - On-demand actor for each request: 1951.352 ms

For the vast majority of these requests, most of the time for the request is
spent waiting for the actor to receive the work job.  This is the case
regardless of whether I'm using a single actor, a pool, or creating actors
on demand.  In most cases, the mongo work takes 0 - 100 ms but with a
meaningful minority in the 100 - 300ms range.  I think this means the JVM
must be busy with something else while that waiting is happening.

I guess it makes sense that the single-threaded case goes faster since most
of the time the mongodb operations take far less than 100 ms.  However, I
don't understand why I'm not seeing proportional improvement in the pooled
and on-demand scenarios.

Here is the method I'm using to create my actors, whether it be 1, the pool
of 50, or a new one on demand every time:

def worker(n: Int) = actor {
loop {
 react {
case msg @ LoadReq(timer, stats, cont) =>
timer.split("react")
 stats("mailboxSize") = mailboxSize.toLong
 val coll = staticColl
 val dbo = (
_msg -> "blah blah blah" <<
_event -> "blah blah blah" <<
 _user -> "blah blah blah" <<
_name -> "Lincoln"
)
 coll.save(dbo)
timer.split("save")
 coll.findOne(_name -> "Lincoln")
 timer.split("findOne")
 val res = coll.find().limit(1000).toArray
 timer.split("findAll")

// timer.split("sleep")
cont.setAttribute(Base.CONTINUATION_RESP, LoadResp(timer, stats))
 cont.resume
 case other => trace("worker discarded: "+other)
 }
}
}

I took a kill -3 while my load test was running and I saw a lot of these:

"qtp1491907201-104" prio=5 tid=0x000102278800 nid=0x153199000 runnable
[0x000153198000]
   java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
 - parking to wait for  <0x000108bca370> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
 at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
at
org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:319)
 at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:637)

I also used jstat throughout:

Timestamp S0 S1 E  O  P YGC YGCTFGC
 FGCT GCT
  161.8 100.00   0.00   0.00  68.15  60.181029.215 2
 0.0229.237
  166.8 100.00   0.00  10.04  28.97  60.32134   12.083 4
 0.049   12.132
  171.8 100.00   0.00  60.79  68.23  60.06172   14.904 4
 0.049   14.952
  176.8   0.00 100.00 100.00   4.04  59.87191   17.437 7
 1.362   18.799
  181.8 100.00   0.00   2.12   4.56  59.88196   18.363 8
 1.712   20.075
  186.8 100.00   0.00   4.62   4.56  59.88196   18.363 8
 1.712   20.075
  191.8 100.00   0.00   4.65   4.56  59.88196   18.363 8
 1.712   20.075

[Lift] Re: 503 for url: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

2009-11-12 Thread David Pollak
On Wed, Nov 11, 2009 at 4:07 PM, ctrlspace  wrote:

>
> Sorry for what may seem like a stupid question, but I am very new to
> scala/lift.
>
> PCDataXmlParser solved my issue with w3 dtd but I am now getting a
> parse error when I get a http stream.
>

It's looking like what you are trying to parse is not XML, but HTML.  You'd
be best off using an HTML parser:
http://java-source.net/open-source/html-parsers


>
> :96:5: '<' not allowed in attrib valuegoogle_ad_type =
> "text_image";^
> Exception in thread "main" java.lang.ExceptionInInitializerError
>at ca.ctrlspace.loveItHateItWeb.xml.UpcDatabaseFeed.main
> (UpcDatabaseFeed.scala)
> Caused by: java.lang.IllegalArgumentException: line 97 does not exist
>at scala.io.Source.getLine(Source.scala:280)
>at scala.io.Source.report(Source.scala:368)
>at scala.io.Source.reportError(Source.scala:355)
>at scala.io.Source.reportError(Source.scala:344)
>at scala.xml.parsing.MarkupParser$class.reportSyntaxError
> (MarkupParser.scala:1113)
>at net.liftweb.util.PCDataXmlParser.reportSyntaxError
> (PCDataMarkupParser.scala:91)
>
> it looks like the following is causing this:
>
>  
>
> Is it possible to ask PCDataXmlParser not to grab certain xml
> elements?
> What is the proper way to use PCDataXmlParser?
>
> As an aside why does PCDataXmlParser not give the w3 dtd exception?
>

Because it's not trying to do any validation, so it's not looking at the
DOCTYPE and thus not trying to load the dtd.


>
> Thanks,
>
> Chris.
>
> On Nov 9, 11:33 pm, David Pollak 
> wrote:
> > It's not an issue of Lift's output working with XML.load, it's an issue
> of
> > the W3C blocking the Java libraries.  This has nothing to do with Lift or
> > the XML Lift emits.
> >
> > If you want to parse XML and not run into that problem, use
> > net.liftweb.util.PCDataXmlParser
> >
> >
> >
> >
> >
> > On Mon, Nov 9, 2009 at 7:11 PM, Alex Black  wrote:
> >
> > > I read these two:
> >
> > >http://old.nabble.com/Exception-loading-XML-with-DTD-td25213294.html
> >
> > >http://stackoverflow.com/questions/1096285/is-scala-java-not-respecti.
> ..
> >
> > > Not sure what the answer is, some ugly work arounds are presented...
> >
> > > Presumably Lift's XML output *should* work with XML.Load?
> >
> > > - Alex
> >
> > > On Nov 9, 10:01 pm, Naftoli Gugenheim  wrote:
> > > > Don't know but it's been asked so you should be able to search for
> it;
> > > I'm not sure whether on this list or scala-user or both.
> >
> > > > -
> >
> > > > Alex Black wrote:
> >
> > > > Exception:
> >
> > > > java.io.IOException: Server returned HTTP response code: 503 for URL:
> > >http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
> > > > at sun.net.www.protocol.http.HttpURLConnection.getInputStream
> > > > (HttpURLConnection.java:1313)
> > > > at
> >
> > >
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity
> > > > (XMLEntityManager.java:677)
> > > > at
> > > > com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity
> > > > (XMLEntityManager.java:1315)
> > > > at
> > > >
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity
> > > > (XMLEntityManager.java:1282)
> > > > at
> > > >
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource
> > > > (XMLDTDScannerImpl.java:283)
> > > > at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
> > > > $DTDDriver.dispatch(XMLDocumentScannerImpl.java:1193)
> > > > at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
> > > > $DTDDriver.next(XMLDocumentScannerImpl.java:1090)
> > > > at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
> > > > $PrologDriver.next(XMLDocumentScannerImpl.java:1003)
> > > > at
> > > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next
> > > > (XMLDocumentScannerImpl.java:648)
> > > > at
> >
> > >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scan
> Document
> > > > (XMLDocumentFragmentScannerImpl.java:510)
> > > > at
> > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> > > > (XML11Configuration.java:807)
> > > > at
> > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> > > > (XML11Configuration.java:737)
> > > > at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse
> > > > (XMLParser.java:107)
> > > > at
> > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
> > > > (AbstractSAXPars

[Lift] Re: Problem with BlazeDS and LiftFilter 1.0+

2009-11-12 Thread David Pollak
the issue is the new debugging help screen in dev mode got in the way of the
passing not found... so...

package services

import net.liftweb.http._
import net.liftweb.mapper._
import net.liftweb.util._
import java.sql.{Connection, DriverManager}

class Boot extends Bootable {
  def boot {
*LiftRules.liftRequest.append {**
  case Req("messagebroker" :: _, _, _) =>false
}*

LiftRules.passNotFoundToChain = true
  }
}

What the code does is it looks for calls to /messagebroker/* and ensures
these are not Lift calls.

You can find working code at http://github.com/dpp/lift_vs_blazeds

Thanks,

David


On Thu, Nov 12, 2009 at 2:14 PM, oshyshko  wrote:

>
> Hello David,
>
> Here is source code.
>
> http://github.com/oshyshko/lift_vs_blazeds
>
> 1. Run it via:
> $ mvn jetty:run-exploded
>
> 2. Go to http://localhost:8080/
> You should see a SWF with a text field and a button (you will need
> Flash Player 10):
> [Kaboom!] (Say it)
>
> 3. Press "Say it"
>
> 4. Watch Jetty's reply in console:
> Kaboom!
>
> 5. Stop Jetty, open web.xml, find this snipped and uncomment
> LiftFilter mapping:
>
> 
>
> 6. Run Jetty
> $ mvn jetty:run-exploded
>
> 7. Go to http://localhost:8080/
> 8. Press "Say it"
> 9. Watch Jetty's console - message "Kaboom!" will not appear
>
> On Nov 11, 2:32 am, David Pollak 
> wrote:
> > ...
> >
>


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



[Lift] Re: Minor Bug? MappedString.valUnique should return one FieldError

2009-11-12 Thread David Pollak
Could you open a ticket for it?

On Wed, Nov 11, 2009 at 11:53 AM, jon  wrote:

>
> Hi,
>
> I'm currently adding a uniqueness requirement to a field, but there
> are duplicate entries (for empty string) in my database already.
> Currently valUnique maps each match it found to a FieldError, but
> should probably return one FieldError regardless of how many matches
> it finds.
>
> - Jon
> >
>


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



[Lift] Re: Props filename hazzle

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 3:57 AM, Cornelius  wrote:

>
> Hi all,
>
> this may be somewhat outdated but I spent some time to figure out how
> to specify different properties with java-properties files:
>
> The doc at http://scala-tools.org/scaladocs/liftweb/1.0/ says, that
> the filename should be somewhat of this:
>
>  modeName.hostName.userName.filename.extension
>
> But (after hours of renaming files under src/main/resources/ and src/
> main/resources/props I finally looked at the code in Props.scala and
> saw this:
>
> # val toTry: List[() => String] = List(
> #  () => "/props/" + modeName + userName + hostName,
> #() => "/props/" + modeName + userName,
> #() => "/props/" + modeName + hostName,
> #  () => "/props/" + modeName + "default.",
> #() => "/" + modeName + userName +
> hostName,
> #() => "/" + modeName + userName,
> #() => "/" + modeName + hostName,
> #  () => "/" + modeName + "default.")
>
> As for my understanding (just beginning with scala and lift) it works
> just the other ways as the docs suggest:
>
> (bumblebee == hostName, dave == userName and kpo == fileName)
>
> doesn't work:
>  production.bumblebee.dave.kpo.props
>
> works:
>  production.dave.bumblee.props
>

Yep... that's the right combo.

I'll update the docs.


>
> I didn't test all combinations and all places, but it would be great
> if someone could confirm this (or - indeed - guide me in the correct
> direction for the case missed something)
>
> Cornelius
>
> PS.: Nice idea for implementing this kind of run.mode-switching...
> help alot
>
> >
>


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



[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
got it. I was mixing metaphors.

On Thu, Nov 12, 2009 at 5:41 PM, David Pollak  wrote:

>
>
> On Thu, Nov 12, 2009 at 2:25 PM, Jack Widman wrote:
>
>> Is it that I am putting things on a Queue from within an the Calculator
>> Actor and having the CometActor retrieve them from the Queue? Is that the
>> problem?  I will read up on actors but it would help if you could tell me
>> (if only briefly) what you saw about my actor code that is wrong.
>>
>
> The act method in an actor sets up the receive/react loop.  It is not a
> "background thread" in and of itself.  Actors are not "background threads"
> they are things that process messages sent to them with the ! method.  You
> set up the message handling in the receive/react loop.
>
> Further, mixing method calls and Actor message handling is wicked dangerous
> (especially without synchronized blocks).  Choose either a traditional
> threading model or an Actor-based model, but not both.
>
>
>>  Thanks.
>>
>>
>>
>> On Thu, Nov 12, 2009 at 5:12 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>> Jack,
>>>
>>> The issues you're seeing are not Lift related.  You are not using Actors
>>> correctly.  Please see Philipp Haller's preso on Actors:
>>> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf
>>>
>>> Please also look at the Actor chapters in Beginning Scala or Programming
>>> in Scala.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>>>
 David,

 I have attached my code. It runs but does not behave as I intended it
 to. The code does a web search on the term "scala" and displays a list of
 URLs of the results. Next to each URL it says "Page Length : -1". A process
 is running in the background which takes each URL, goes out and gets the
 page and takes the length of the page. The length of that page is then
 supposed to immediately appear on the page next to that URL. I put the
 lengths on a queue, as they come in, and I have the Comet page poll the
 queue and display the results. It would probably be better to have the
 results send a message to the Comet class so the page is only re-rendered
 when there is a change but for now I am polling.

 I can see the lengths coming in and being put on the queue, but the
 Comet page is not getting them till they are all retrieved. (This takes way
 too long and nothing changes on the screen till its too late). I need them
 to appear as they come in. Occasionally I can see a length being retrieved
 and the Comet page finds it but even then it is not displayed until all the
 lengths are in.   I know this is not very clear but I think it will be 
 clear
 from the code.

 I also know there are a lot of places in the code which can be improved
 and I welcome all of your input but what I would love is to have these
 numbers appear on the page as they they are retrieved. I have been stumped
 by this for a while and I suspect that somebody who knows Lift well might
 see the problem right away.

 The class that retrieves the page lengths is called Calculator and the
 queue is called SourceQueue. The classes are pretty small so hopefully it
 will be clear what is going on. I want you to know I think it is incredible
 how responsive you and the group are and I look forward to using Lift in 
 the
 future.

 Thanks so much.

 Jack


 On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

>
>
> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>
>> The only difference between your working code and mine is that mine
>> has a process in the background that is always running and puts Foo 
>> objects
>> on a queue whenever they are ready. Where can I start this long running
>> process so that it doesn't interfere with the lowPriority method that 
>> takes
>> things off the queue and rerenders the page. I tried starting the 
>> process in
>> its own Actor that I start in localSetup but it seems somehow to be 
>> blocking
>> the lowPriority method from doing its thing.
>>
>
> I have no idea what this means... sorry.
>
> Please post actual runnable code and we can help you debug.
>
>
>>
>> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>> Jack,
>>>
>>> I reproduced your code and it seems to work fine.  I've enclosed a
>>> working copy.
>>>
>>> Some comments about your code:
>>>
>>>- The foos variable and the foo variable may be getting confused
>>>in the code... the render method may be rendering the same thing 
>>> based on
>>>the unchanging foos variable.
>>>- Doing null testing is a sign that you have logic errors in 

[Lift] lift-webkit-1.1-SNAPSHOT contains duplicate classes (e.g. Box.class)

2009-11-12 Thread Alex Boisvert
Can one of our resident Maven experts quickly look at:
http://github.com/dpp/liftweb/issues/#issue/166

I took a brief look at the poms but couldn't figure why Maven was including
classes from lift-common and lift-actor into lift-webkit.  It is a feature
of the maven-bundle-plugin?

I can take care of fixing the issue if pointed towards the right direction.

thanks!
alex

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



[Lift] Re: CometActor and render

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 2:25 PM, Jack Widman  wrote:

> Is it that I am putting things on a Queue from within an the Calculator
> Actor and having the CometActor retrieve them from the Queue? Is that the
> problem?  I will read up on actors but it would help if you could tell me
> (if only briefly) what you saw about my actor code that is wrong.
>

The act method in an actor sets up the receive/react loop.  It is not a
"background thread" in and of itself.  Actors are not "background threads"
they are things that process messages sent to them with the ! method.  You
set up the message handling in the receive/react loop.

Further, mixing method calls and Actor message handling is wicked dangerous
(especially without synchronized blocks).  Choose either a traditional
threading model or an Actor-based model, but not both.


>  Thanks.
>
>
>
> On Thu, Nov 12, 2009 at 5:12 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> Jack,
>>
>> The issues you're seeing are not Lift related.  You are not using Actors
>> correctly.  Please see Philipp Haller's preso on Actors:
>> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf
>>
>> Please also look at the Actor chapters in Beginning Scala or Programming
>> in Scala.
>>
>> Thanks,
>>
>> David
>>
>>
>> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>>
>>> David,
>>>
>>> I have attached my code. It runs but does not behave as I intended it to.
>>> The code does a web search on the term "scala" and displays a list of URLs
>>> of the results. Next to each URL it says "Page Length : -1". A process is
>>> running in the background which takes each URL, goes out and gets the page
>>> and takes the length of the page. The length of that page is then supposed
>>> to immediately appear on the page next to that URL. I put the lengths on a
>>> queue, as they come in, and I have the Comet page poll the queue and display
>>> the results. It would probably be better to have the results send a message
>>> to the Comet class so the page is only re-rendered when there is a change
>>> but for now I am polling.
>>>
>>> I can see the lengths coming in and being put on the queue, but the Comet
>>> page is not getting them till they are all retrieved. (This takes way too
>>> long and nothing changes on the screen till its too late). I need them to
>>> appear as they come in. Occasionally I can see a length being retrieved and
>>> the Comet page finds it but even then it is not displayed until all the
>>> lengths are in.   I know this is not very clear but I think it will be clear
>>> from the code.
>>>
>>> I also know there are a lot of places in the code which can be improved
>>> and I welcome all of your input but what I would love is to have these
>>> numbers appear on the page as they they are retrieved. I have been stumped
>>> by this for a while and I suspect that somebody who knows Lift well might
>>> see the problem right away.
>>>
>>> The class that retrieves the page lengths is called Calculator and the
>>> queue is called SourceQueue. The classes are pretty small so hopefully it
>>> will be clear what is going on. I want you to know I think it is incredible
>>> how responsive you and the group are and I look forward to using Lift in the
>>> future.
>>>
>>> Thanks so much.
>>>
>>> Jack
>>>
>>>
>>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>


 On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:

> The only difference between your working code and mine is that mine has
> a process in the background that is always running and puts Foo objects 
> on a
> queue whenever they are ready. Where can I start this long running process
> so that it doesn't interfere with the lowPriority method that takes things
> off the queue and rerenders the page. I tried starting the process in its
> own Actor that I start in localSetup but it seems somehow to be blocking 
> the
> lowPriority method from doing its thing.
>

 I have no idea what this means... sorry.

 Please post actual runnable code and we can help you debug.


>
> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> Jack,
>>
>> I reproduced your code and it seems to work fine.  I've enclosed a
>> working copy.
>>
>> Some comments about your code:
>>
>>- The foos variable and the foo variable may be getting confused
>>in the code... the render method may be rendering the same thing 
>> based on
>>the unchanging foos variable.
>>- Doing null testing is a sign that you have logic errors in your
>>code.  I strongly recommend using either Box or Option for everything 
>> that
>>can logically not contain a value/reference.  If you're bridging out 
>> to Java
>>code and are expecting null from the Java 

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Thanks.

On Thu, Nov 12, 2009 at 5:32 PM, David Pollak  wrote:

>
>
> On Thu, Nov 12, 2009 at 2:16 PM, Jack Widman wrote:
>
>> Will do. One more small question How do I send a message to the Comet
>> Actor from another class? Can the CometActor be an object instead of a
>> class? In the code
>>
>
> Lift instantiates a new CometActor each time it needs one.  If you have a
> singleton CometActor, you'd be sharing state across all sessions and that
> would be impossible to manage.
>
>
>>
>> X ! messageToCometActor,   what is X? I don't have a variable that holds
>> the instance of the CometActor.
>
>
> If the CometActor is a listener to another service, you can register the
> instance of the CometActor as a listener during localSetup and unregister
> during localShutdown.
>
> See that Chat example in lift-examples/example
>
>
>>
>>
>> On Thu, Nov 12, 2009 at 5:12 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>> Jack,
>>>
>>> The issues you're seeing are not Lift related.  You are not using Actors
>>> correctly.  Please see Philipp Haller's preso on Actors:
>>> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf
>>>
>>> Please also look at the Actor chapters in Beginning Scala or Programming
>>> in Scala.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>>>
 David,

 I have attached my code. It runs but does not behave as I intended it
 to. The code does a web search on the term "scala" and displays a list of
 URLs of the results. Next to each URL it says "Page Length : -1". A process
 is running in the background which takes each URL, goes out and gets the
 page and takes the length of the page. The length of that page is then
 supposed to immediately appear on the page next to that URL. I put the
 lengths on a queue, as they come in, and I have the Comet page poll the
 queue and display the results. It would probably be better to have the
 results send a message to the Comet class so the page is only re-rendered
 when there is a change but for now I am polling.

 I can see the lengths coming in and being put on the queue, but the
 Comet page is not getting them till they are all retrieved. (This takes way
 too long and nothing changes on the screen till its too late). I need them
 to appear as they come in. Occasionally I can see a length being retrieved
 and the Comet page finds it but even then it is not displayed until all the
 lengths are in.   I know this is not very clear but I think it will be 
 clear
 from the code.

 I also know there are a lot of places in the code which can be improved
 and I welcome all of your input but what I would love is to have these
 numbers appear on the page as they they are retrieved. I have been stumped
 by this for a while and I suspect that somebody who knows Lift well might
 see the problem right away.

 The class that retrieves the page lengths is called Calculator and the
 queue is called SourceQueue. The classes are pretty small so hopefully it
 will be clear what is going on. I want you to know I think it is incredible
 how responsive you and the group are and I look forward to using Lift in 
 the
 future.

 Thanks so much.

 Jack


 On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

>
>
> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>
>> The only difference between your working code and mine is that mine
>> has a process in the background that is always running and puts Foo 
>> objects
>> on a queue whenever they are ready. Where can I start this long running
>> process so that it doesn't interfere with the lowPriority method that 
>> takes
>> things off the queue and rerenders the page. I tried starting the 
>> process in
>> its own Actor that I start in localSetup but it seems somehow to be 
>> blocking
>> the lowPriority method from doing its thing.
>>
>
> I have no idea what this means... sorry.
>
> Please post actual runnable code and we can help you debug.
>
>
>>
>> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>> Jack,
>>>
>>> I reproduced your code and it seems to work fine.  I've enclosed a
>>> working copy.
>>>
>>> Some comments about your code:
>>>
>>>- The foos variable and the foo variable may be getting confused
>>>in the code... the render method may be rendering the same thing 
>>> based on
>>>the unchanging foos variable.
>>>- Doing null testing is a sign that you have logic errors in your
>>>code.  I strongly recommend using either Box or Option for 
>>> everything that
>>>can logically not c

[Lift] Re: CometActor and render

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 2:16 PM, Jack Widman  wrote:

> Will do. One more small question How do I send a message to the Comet Actor
> from another class? Can the CometActor be an object instead of a class? In
> the code
>

Lift instantiates a new CometActor each time it needs one.  If you have a
singleton CometActor, you'd be sharing state across all sessions and that
would be impossible to manage.


>
> X ! messageToCometActor,   what is X? I don't have a variable that holds
> the instance of the CometActor.


If the CometActor is a listener to another service, you can register the
instance of the CometActor as a listener during localSetup and unregister
during localShutdown.

See that Chat example in lift-examples/example


>
>
> On Thu, Nov 12, 2009 at 5:12 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> Jack,
>>
>> The issues you're seeing are not Lift related.  You are not using Actors
>> correctly.  Please see Philipp Haller's preso on Actors:
>> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf
>>
>> Please also look at the Actor chapters in Beginning Scala or Programming
>> in Scala.
>>
>> Thanks,
>>
>> David
>>
>>
>> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>>
>>> David,
>>>
>>> I have attached my code. It runs but does not behave as I intended it to.
>>> The code does a web search on the term "scala" and displays a list of URLs
>>> of the results. Next to each URL it says "Page Length : -1". A process is
>>> running in the background which takes each URL, goes out and gets the page
>>> and takes the length of the page. The length of that page is then supposed
>>> to immediately appear on the page next to that URL. I put the lengths on a
>>> queue, as they come in, and I have the Comet page poll the queue and display
>>> the results. It would probably be better to have the results send a message
>>> to the Comet class so the page is only re-rendered when there is a change
>>> but for now I am polling.
>>>
>>> I can see the lengths coming in and being put on the queue, but the Comet
>>> page is not getting them till they are all retrieved. (This takes way too
>>> long and nothing changes on the screen till its too late). I need them to
>>> appear as they come in. Occasionally I can see a length being retrieved and
>>> the Comet page finds it but even then it is not displayed until all the
>>> lengths are in.   I know this is not very clear but I think it will be clear
>>> from the code.
>>>
>>> I also know there are a lot of places in the code which can be improved
>>> and I welcome all of your input but what I would love is to have these
>>> numbers appear on the page as they they are retrieved. I have been stumped
>>> by this for a while and I suspect that somebody who knows Lift well might
>>> see the problem right away.
>>>
>>> The class that retrieves the page lengths is called Calculator and the
>>> queue is called SourceQueue. The classes are pretty small so hopefully it
>>> will be clear what is going on. I want you to know I think it is incredible
>>> how responsive you and the group are and I look forward to using Lift in the
>>> future.
>>>
>>> Thanks so much.
>>>
>>> Jack
>>>
>>>
>>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>


 On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:

> The only difference between your working code and mine is that mine has
> a process in the background that is always running and puts Foo objects 
> on a
> queue whenever they are ready. Where can I start this long running process
> so that it doesn't interfere with the lowPriority method that takes things
> off the queue and rerenders the page. I tried starting the process in its
> own Actor that I start in localSetup but it seems somehow to be blocking 
> the
> lowPriority method from doing its thing.
>

 I have no idea what this means... sorry.

 Please post actual runnable code and we can help you debug.


>
> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> Jack,
>>
>> I reproduced your code and it seems to work fine.  I've enclosed a
>> working copy.
>>
>> Some comments about your code:
>>
>>- The foos variable and the foo variable may be getting confused
>>in the code... the render method may be rendering the same thing 
>> based on
>>the unchanging foos variable.
>>- Doing null testing is a sign that you have logic errors in your
>>code.  I strongly recommend using either Box or Option for everything 
>> that
>>can logically not contain a value/reference.  If you're bridging out 
>> to Java
>>code and are expecting null from the Java code, write a small bridge 
>> that
>>will wrapper the Java return values in Box/Option.
>>   

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Is it that I am putting things on a Queue from within an the Calculator
Actor and having the CometActor retrieve them from the Queue? Is that the
problem?  I will read up on actors but it would help if you could tell me
(if only briefly) what you saw about my actor code that is wrong.
 Thanks.


On Thu, Nov 12, 2009 at 5:12 PM, David Pollak  wrote:

> Jack,
>
> The issues you're seeing are not Lift related.  You are not using Actors
> correctly.  Please see Philipp Haller's preso on Actors:
> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf
>
> Please also look at the Actor chapters in Beginning Scala or Programming in
> Scala.
>
> Thanks,
>
> David
>
>
> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>
>> David,
>>
>> I have attached my code. It runs but does not behave as I intended it to.
>> The code does a web search on the term "scala" and displays a list of URLs
>> of the results. Next to each URL it says "Page Length : -1". A process is
>> running in the background which takes each URL, goes out and gets the page
>> and takes the length of the page. The length of that page is then supposed
>> to immediately appear on the page next to that URL. I put the lengths on a
>> queue, as they come in, and I have the Comet page poll the queue and display
>> the results. It would probably be better to have the results send a message
>> to the Comet class so the page is only re-rendered when there is a change
>> but for now I am polling.
>>
>> I can see the lengths coming in and being put on the queue, but the Comet
>> page is not getting them till they are all retrieved. (This takes way too
>> long and nothing changes on the screen till its too late). I need them to
>> appear as they come in. Occasionally I can see a length being retrieved and
>> the Comet page finds it but even then it is not displayed until all the
>> lengths are in.   I know this is not very clear but I think it will be clear
>> from the code.
>>
>> I also know there are a lot of places in the code which can be improved
>> and I welcome all of your input but what I would love is to have these
>> numbers appear on the page as they they are retrieved. I have been stumped
>> by this for a while and I suspect that somebody who knows Lift well might
>> see the problem right away.
>>
>> The class that retrieves the page lengths is called Calculator and the
>> queue is called SourceQueue. The classes are pretty small so hopefully it
>> will be clear what is going on. I want you to know I think it is incredible
>> how responsive you and the group are and I look forward to using Lift in the
>> future.
>>
>> Thanks so much.
>>
>> Jack
>>
>>
>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>>
 The only difference between your working code and mine is that mine has
 a process in the background that is always running and puts Foo objects on 
 a
 queue whenever they are ready. Where can I start this long running process
 so that it doesn't interfere with the lowPriority method that takes things
 off the queue and rerenders the page. I tried starting the process in its
 own Actor that I start in localSetup but it seems somehow to be blocking 
 the
 lowPriority method from doing its thing.

>>>
>>> I have no idea what this means... sorry.
>>>
>>> Please post actual runnable code and we can help you debug.
>>>
>>>

 On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

> Jack,
>
> I reproduced your code and it seems to work fine.  I've enclosed a
> working copy.
>
> Some comments about your code:
>
>- The foos variable and the foo variable may be getting confused in
>the code... the render method may be rendering the same thing based on 
> the
>unchanging foos variable.
>- Doing null testing is a sign that you have logic errors in your
>code.  I strongly recommend using either Box or Option for everything 
> that
>can logically not contain a value/reference.  If you're bridging out 
> to Java
>code and are expecting null from the Java code, write a small bridge 
> that
>will wrapper the Java return values in Box/Option.
>- You have a case class (Tick) that contains no parameters.  Please
>use a case object instead.
>- Your Tick look is a spin loop.  You fire a Tick message as part
>of processing the Tick message.  I would suggest that if you're 
> polling,
>that you have a reasonable poll interval, otherwise you'll starve your 
> CPU.
>Further, having reRender on each loop through means that you're 
> forcing a
>lot of bytes over the wire rather than only doing a reRender on changed
>values.
>
> Thanks,
>
> 

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Will do. One more small question How do I send a message to the Comet Actor
from another class? Can the CometActor be an object instead of a class? In
the code

X ! messageToCometActor,   what is X? I don't have a variable that holds the
instance of the CometActor.

On Thu, Nov 12, 2009 at 5:12 PM, David Pollak  wrote:

> Jack,
>
> The issues you're seeing are not Lift related.  You are not using Actors
> correctly.  Please see Philipp Haller's preso on Actors:
> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf
>
> Please also look at the Actor chapters in Beginning Scala or Programming in
> Scala.
>
> Thanks,
>
> David
>
>
> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>
>> David,
>>
>> I have attached my code. It runs but does not behave as I intended it to.
>> The code does a web search on the term "scala" and displays a list of URLs
>> of the results. Next to each URL it says "Page Length : -1". A process is
>> running in the background which takes each URL, goes out and gets the page
>> and takes the length of the page. The length of that page is then supposed
>> to immediately appear on the page next to that URL. I put the lengths on a
>> queue, as they come in, and I have the Comet page poll the queue and display
>> the results. It would probably be better to have the results send a message
>> to the Comet class so the page is only re-rendered when there is a change
>> but for now I am polling.
>>
>> I can see the lengths coming in and being put on the queue, but the Comet
>> page is not getting them till they are all retrieved. (This takes way too
>> long and nothing changes on the screen till its too late). I need them to
>> appear as they come in. Occasionally I can see a length being retrieved and
>> the Comet page finds it but even then it is not displayed until all the
>> lengths are in.   I know this is not very clear but I think it will be clear
>> from the code.
>>
>> I also know there are a lot of places in the code which can be improved
>> and I welcome all of your input but what I would love is to have these
>> numbers appear on the page as they they are retrieved. I have been stumped
>> by this for a while and I suspect that somebody who knows Lift well might
>> see the problem right away.
>>
>> The class that retrieves the page lengths is called Calculator and the
>> queue is called SourceQueue. The classes are pretty small so hopefully it
>> will be clear what is going on. I want you to know I think it is incredible
>> how responsive you and the group are and I look forward to using Lift in the
>> future.
>>
>> Thanks so much.
>>
>> Jack
>>
>>
>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>>
 The only difference between your working code and mine is that mine has
 a process in the background that is always running and puts Foo objects on 
 a
 queue whenever they are ready. Where can I start this long running process
 so that it doesn't interfere with the lowPriority method that takes things
 off the queue and rerenders the page. I tried starting the process in its
 own Actor that I start in localSetup but it seems somehow to be blocking 
 the
 lowPriority method from doing its thing.

>>>
>>> I have no idea what this means... sorry.
>>>
>>> Please post actual runnable code and we can help you debug.
>>>
>>>

 On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

> Jack,
>
> I reproduced your code and it seems to work fine.  I've enclosed a
> working copy.
>
> Some comments about your code:
>
>- The foos variable and the foo variable may be getting confused in
>the code... the render method may be rendering the same thing based on 
> the
>unchanging foos variable.
>- Doing null testing is a sign that you have logic errors in your
>code.  I strongly recommend using either Box or Option for everything 
> that
>can logically not contain a value/reference.  If you're bridging out 
> to Java
>code and are expecting null from the Java code, write a small bridge 
> that
>will wrapper the Java return values in Box/Option.
>- You have a case class (Tick) that contains no parameters.  Please
>use a case object instead.
>- Your Tick look is a spin loop.  You fire a Tick message as part
>of processing the Tick message.  I would suggest that if you're 
> polling,
>that you have a reasonable poll interval, otherwise you'll starve your 
> CPU.
>Further, having reRender on each loop through means that you're 
> forcing a
>lot of bytes over the wire rather than only doing a reRender on changed
>values.
>
> Thanks,
>
> David
>
> On Sun, Nov 

[Lift] Re: Problem with BlazeDS and LiftFilter 1.0+

2009-11-12 Thread oshyshko

Hello David,

Here is source code.

http://github.com/oshyshko/lift_vs_blazeds

1. Run it via:
$ mvn jetty:run-exploded

2. Go to http://localhost:8080/
You should see a SWF with a text field and a button (you will need
Flash Player 10):
[Kaboom!] (Say it)

3. Press "Say it"

4. Watch Jetty's reply in console:
Kaboom!

5. Stop Jetty, open web.xml, find this snipped and uncomment
LiftFilter mapping:



6. Run Jetty
$ mvn jetty:run-exploded

7. Go to http://localhost:8080/
8. Press "Say it"
9. Watch Jetty's console - message "Kaboom!" will not appear

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



[Lift] Re: CometActor and render

2009-11-12 Thread David Pollak
Jack,

The issues you're seeing are not Lift related.  You are not using Actors
correctly.  Please see Philipp Haller's preso on Actors:
http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf

Please also look at the Actor chapters in Beginning Scala or Programming in
Scala.

Thanks,

David

On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman  wrote:

> David,
>
> I have attached my code. It runs but does not behave as I intended it to.
> The code does a web search on the term "scala" and displays a list of URLs
> of the results. Next to each URL it says "Page Length : -1". A process is
> running in the background which takes each URL, goes out and gets the page
> and takes the length of the page. The length of that page is then supposed
> to immediately appear on the page next to that URL. I put the lengths on a
> queue, as they come in, and I have the Comet page poll the queue and display
> the results. It would probably be better to have the results send a message
> to the Comet class so the page is only re-rendered when there is a change
> but for now I am polling.
>
> I can see the lengths coming in and being put on the queue, but the Comet
> page is not getting them till they are all retrieved. (This takes way too
> long and nothing changes on the screen till its too late). I need them to
> appear as they come in. Occasionally I can see a length being retrieved and
> the Comet page finds it but even then it is not displayed until all the
> lengths are in.   I know this is not very clear but I think it will be clear
> from the code.
>
> I also know there are a lot of places in the code which can be improved and
> I welcome all of your input but what I would love is to have these numbers
> appear on the page as they they are retrieved. I have been stumped by this
> for a while and I suspect that somebody who knows Lift well might see the
> problem right away.
>
> The class that retrieves the page lengths is called Calculator and the
> queue is called SourceQueue. The classes are pretty small so hopefully it
> will be clear what is going on. I want you to know I think it is incredible
> how responsive you and the group are and I look forward to using Lift in the
> future.
>
> Thanks so much.
>
> Jack
>
>
> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>
>>> The only difference between your working code and mine is that mine has a
>>> process in the background that is always running and puts Foo objects on a
>>> queue whenever they are ready. Where can I start this long running process
>>> so that it doesn't interfere with the lowPriority method that takes things
>>> off the queue and rerenders the page. I tried starting the process in its
>>> own Actor that I start in localSetup but it seems somehow to be blocking the
>>> lowPriority method from doing its thing.
>>>
>>
>> I have no idea what this means... sorry.
>>
>> Please post actual runnable code and we can help you debug.
>>
>>
>>>
>>> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>
 Jack,

 I reproduced your code and it seems to work fine.  I've enclosed a
 working copy.

 Some comments about your code:

- The foos variable and the foo variable may be getting confused in
the code... the render method may be rendering the same thing based on 
 the
unchanging foos variable.
- Doing null testing is a sign that you have logic errors in your
code.  I strongly recommend using either Box or Option for everything 
 that
can logically not contain a value/reference.  If you're bridging out to 
 Java
code and are expecting null from the Java code, write a small bridge 
 that
will wrapper the Java return values in Box/Option.
- You have a case class (Tick) that contains no parameters.  Please
use a case object instead.
- Your Tick look is a spin loop.  You fire a Tick message as part of
processing the Tick message.  I would suggest that if you're polling, 
 that
you have a reasonable poll interval, otherwise you'll starve your CPU.
Further, having reRender on each loop through means that you're forcing 
 a
lot of bytes over the wire rather than only doing a reRender on changed
values.

 Thanks,

 David

 On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman wrote:

> Sorry. Here it is:   As I said, I know that when render is called,
> foo.getValue has the right value. But it does not show on the screen, 
> unless
> I refresh the browser.
>
> package com.foo.comet
>
> import net.liftweb._
> import http._
> import js._
> import JsCmds._
> import net.liftweb.util._
> import net.liftweb.http._
> import _root_.scala.xml._
> import scala.actors._
> import com.authoritude.

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Ok. I actually had this problem before I upgraded to M6.

On Thu, Nov 12, 2009 at 5:03 PM, David Pollak  wrote:

> Jack,
>
> Your pom.xml file mixes Scala 2.7.3, Lift 1.0 and Lift 1.1-M6... this
> doesn't work.
>
> You have to be running with the same version of Lift.
>
> I'll look at the actual code and report more in a little while.
>
> Thanks,
>
> David
>
>
> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>
>> David,
>>
>> I have attached my code. It runs but does not behave as I intended it to.
>> The code does a web search on the term "scala" and displays a list of URLs
>> of the results. Next to each URL it says "Page Length : -1". A process is
>> running in the background which takes each URL, goes out and gets the page
>> and takes the length of the page. The length of that page is then supposed
>> to immediately appear on the page next to that URL. I put the lengths on a
>> queue, as they come in, and I have the Comet page poll the queue and display
>> the results. It would probably be better to have the results send a message
>> to the Comet class so the page is only re-rendered when there is a change
>> but for now I am polling.
>>
>> I can see the lengths coming in and being put on the queue, but the Comet
>> page is not getting them till they are all retrieved. (This takes way too
>> long and nothing changes on the screen till its too late). I need them to
>> appear as they come in. Occasionally I can see a length being retrieved and
>> the Comet page finds it but even then it is not displayed until all the
>> lengths are in.   I know this is not very clear but I think it will be clear
>> from the code.
>>
>> I also know there are a lot of places in the code which can be improved
>> and I welcome all of your input but what I would love is to have these
>> numbers appear on the page as they they are retrieved. I have been stumped
>> by this for a while and I suspect that somebody who knows Lift well might
>> see the problem right away.
>>
>> The class that retrieves the page lengths is called Calculator and the
>> queue is called SourceQueue. The classes are pretty small so hopefully it
>> will be clear what is going on. I want you to know I think it is incredible
>> how responsive you and the group are and I look forward to using Lift in the
>> future.
>>
>> Thanks so much.
>>
>> Jack
>>
>>
>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>>
 The only difference between your working code and mine is that mine has
 a process in the background that is always running and puts Foo objects on 
 a
 queue whenever they are ready. Where can I start this long running process
 so that it doesn't interfere with the lowPriority method that takes things
 off the queue and rerenders the page. I tried starting the process in its
 own Actor that I start in localSetup but it seems somehow to be blocking 
 the
 lowPriority method from doing its thing.

>>>
>>> I have no idea what this means... sorry.
>>>
>>> Please post actual runnable code and we can help you debug.
>>>
>>>

 On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

> Jack,
>
> I reproduced your code and it seems to work fine.  I've enclosed a
> working copy.
>
> Some comments about your code:
>
>- The foos variable and the foo variable may be getting confused in
>the code... the render method may be rendering the same thing based on 
> the
>unchanging foos variable.
>- Doing null testing is a sign that you have logic errors in your
>code.  I strongly recommend using either Box or Option for everything 
> that
>can logically not contain a value/reference.  If you're bridging out 
> to Java
>code and are expecting null from the Java code, write a small bridge 
> that
>will wrapper the Java return values in Box/Option.
>- You have a case class (Tick) that contains no parameters.  Please
>use a case object instead.
>- Your Tick look is a spin loop.  You fire a Tick message as part
>of processing the Tick message.  I would suggest that if you're 
> polling,
>that you have a reasonable poll interval, otherwise you'll starve your 
> CPU.
>Further, having reRender on each loop through means that you're 
> forcing a
>lot of bytes over the wire rather than only doing a reRender on changed
>values.
>
> Thanks,
>
> David
>
> On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman wrote:
>
>> Sorry. Here it is:   As I said, I know that when render is called,
>> foo.getValue has the right value. But it does not show on the screen, 
>> unless
>> I refresh the browser.
>>
>> package com.foo.comet
>>
>> import net.liftweb._
>> im

[Lift] Re: CometActor and render

2009-11-12 Thread David Pollak
Jack,

Your pom.xml file mixes Scala 2.7.3, Lift 1.0 and Lift 1.1-M6... this
doesn't work.

You have to be running with the same version of Lift.

I'll look at the actual code and report more in a little while.

Thanks,

David

On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman  wrote:

> David,
>
> I have attached my code. It runs but does not behave as I intended it to.
> The code does a web search on the term "scala" and displays a list of URLs
> of the results. Next to each URL it says "Page Length : -1". A process is
> running in the background which takes each URL, goes out and gets the page
> and takes the length of the page. The length of that page is then supposed
> to immediately appear on the page next to that URL. I put the lengths on a
> queue, as they come in, and I have the Comet page poll the queue and display
> the results. It would probably be better to have the results send a message
> to the Comet class so the page is only re-rendered when there is a change
> but for now I am polling.
>
> I can see the lengths coming in and being put on the queue, but the Comet
> page is not getting them till they are all retrieved. (This takes way too
> long and nothing changes on the screen till its too late). I need them to
> appear as they come in. Occasionally I can see a length being retrieved and
> the Comet page finds it but even then it is not displayed until all the
> lengths are in.   I know this is not very clear but I think it will be clear
> from the code.
>
> I also know there are a lot of places in the code which can be improved and
> I welcome all of your input but what I would love is to have these numbers
> appear on the page as they they are retrieved. I have been stumped by this
> for a while and I suspect that somebody who knows Lift well might see the
> problem right away.
>
> The class that retrieves the page lengths is called Calculator and the
> queue is called SourceQueue. The classes are pretty small so hopefully it
> will be clear what is going on. I want you to know I think it is incredible
> how responsive you and the group are and I look forward to using Lift in the
> future.
>
> Thanks so much.
>
> Jack
>
>
> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>
>>> The only difference between your working code and mine is that mine has a
>>> process in the background that is always running and puts Foo objects on a
>>> queue whenever they are ready. Where can I start this long running process
>>> so that it doesn't interfere with the lowPriority method that takes things
>>> off the queue and rerenders the page. I tried starting the process in its
>>> own Actor that I start in localSetup but it seems somehow to be blocking the
>>> lowPriority method from doing its thing.
>>>
>>
>> I have no idea what this means... sorry.
>>
>> Please post actual runnable code and we can help you debug.
>>
>>
>>>
>>> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>
 Jack,

 I reproduced your code and it seems to work fine.  I've enclosed a
 working copy.

 Some comments about your code:

- The foos variable and the foo variable may be getting confused in
the code... the render method may be rendering the same thing based on 
 the
unchanging foos variable.
- Doing null testing is a sign that you have logic errors in your
code.  I strongly recommend using either Box or Option for everything 
 that
can logically not contain a value/reference.  If you're bridging out to 
 Java
code and are expecting null from the Java code, write a small bridge 
 that
will wrapper the Java return values in Box/Option.
- You have a case class (Tick) that contains no parameters.  Please
use a case object instead.
- Your Tick look is a spin loop.  You fire a Tick message as part of
processing the Tick message.  I would suggest that if you're polling, 
 that
you have a reasonable poll interval, otherwise you'll starve your CPU.
Further, having reRender on each loop through means that you're forcing 
 a
lot of bytes over the wire rather than only doing a reRender on changed
values.

 Thanks,

 David

 On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman wrote:

> Sorry. Here it is:   As I said, I know that when render is called,
> foo.getValue has the right value. But it does not show on the screen, 
> unless
> I refresh the browser.
>
> package com.foo.comet
>
> import net.liftweb._
> import http._
> import js._
> import JsCmds._
> import net.liftweb.util._
> import net.liftweb.http._
> import _root_.scala.xml._
> import scala.actors._
> import com.authoritude.snippet._
> import scala.collection.mutable.Queue
>

[Lift] Re: How do you set disabled/readonly attributes from a snippet?

2009-11-12 Thread Ross Mellgren
Oh I didn't mean that you need to import the implicit, just that  
inside SHtml, the implicit called pairToUnprefixed is being called.

David's solution is correct using Box like I exampled. I didn't check  
the type signature for SHtml.text, so didn't realize it only took  
(String, String), not (String, Any) like pairToUnprefixed that it's  
calling under the covers does -- my apologies :-/

-Ross

On Nov 12, 2009, at 2:49 PM, Jim Barrows wrote:

> I'm importing HttpHelpers, and the implicit is not there.
> Did this change for M7?
>
> On Mon, Nov 9, 2009 at 6:41 PM, Ross Mellgren   
> wrote:
>
> Use None (Option) or Empty (Box) as the value of the attribute -- this
> will cause the pairToUnprefixed implicit that is being used inside
> SHtml to not generate an attribute.
>
> e.g.:
>
> val disableAttr: Box[String] = if (disableAll) Full("disabled") else
> Empty
>
> bind("person", xhtml,
>  ...
>  "firstName" -> SHtml.text(person.firstName, person.firstName =
> _, "id" -> "firstName", "disabled" -> disableAttr),
>  ...)
>
> -Ross
>
>
> On Nov 9, 2009, at 6:51 PM, Jim Barrows wrote:
>
> > I found this answer on nabble but it's regarding setting the values
> > client side.  I want to set them in the snippet, depending on data.
> > This doesn't work, but will give you a better idea of what I'm
> > trying to do:
> >  def bindPerson(xhtml: NodeSeq, action: () => Unit,
> > submitButtonName: String, disableAll: boolean): NodeSeq = {
> > // Hold a val here so that the "id" closure holds it when we re-
> > enter this method
> > val currentId = person.id
> > val disableString :String = disableAll match {
> >   case true => "disabled"
> >   case false => ""
> > }
> > bind("person", xhtml,
> >   "id" -> SHtml.hidden(() => person.id = currentId),
> >   //  "version" -> SHtml.hidden(() => person.version),
> >   "firstName" -> SHtml.text(person.firstName, person.firstName =
> > _, "id" -> "firstName", "disabled" -> disableString),
> >   "middleName" -> SHtml.text(person.middleName,
> > person.middleName = _, "id" -> "middleName", "disabled" ->
> > disableString),
> >   "lastName" -> SHtml.text(person.lastName, person.lastName = _,
> > "id" -> "lastName", "disabled" -> disableString),
> >   "submit" -> SHtml.submit(?(submitButtonName), action))
> >   }
> >
> > --
> > James A Barrows
> >
> >
> > >
>
>
>
>
>
>
> -- 
> 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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: problems with tomcat

2009-11-12 Thread David Pollak
Scala is very, very, super ultra mega version fragile.  This means that code
compiled with 2.7.5 will not work with code compiled with 2.7.7 and vice
versa.

So, in your pom.xml file, please set your scala version to 2.7.5 (nothing
else... not 2.7.4, not 2.7.7) and lift to 1.0.2

Then mvn clean tomcat:run -- does it work?

Then mvn clean install -- does the WAR file work in Tomcat?

On Thu, Nov 12, 2009 at 1:10 PM, DavidV  wrote:

>
> Another potentially helpful detail is that I get the same liftFilter
> error when running on a local jetty server through maven as I do when
> running on tomcat (also through maven).  I am executing a clean
> command before running the web app each and every time.
>
> ...
> 2009-11-12 16:10:05.833::WARN:  failed LiftFilter:
> java.lang.AbstractMethodError
>
> 2009-11-12 16:10:05.834::WARN:  failed
> org.mortbay.jetty.plugin.Jetty6PluginWebA
> ppcont...@14c0275{/,C:\Source\trunk\eclipse\testLift\src\main\webapp}:
> java.lang
> .AbstractMethodError
> ...
>
>
>
> On Nov 12, 3:40 pm, DavidV  wrote:
> > I just tried to run the same code that used to work with Lift-1.0.1
> > and Scala 2.7.5 with my updates to Lift 1.0.1 and Scala 2.7.7 and I
> > got the following error:
> >
> > [INFO] [tomcat:run {execution: default-cli}]
> > [INFO] Running war onhttp://localhost:8080/portal
> > [INFO] Creating Tomcat server configuration at c:\Source\trunk\eclipse
> > \testLift\
> > target\tomcat
> > Nov 12, 2009 3:36:51 PM org.apache.catalina.startup.Embedded start
> > INFO: Starting tomcat server
> > Nov 12, 2009 3:36:51 PM org.apache.catalina.core.StandardEngine start
> > INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
> > Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext
> > filterStart
> > SEVERE: Exception starting filterLiftFilter
> > java.lang.AbstractMethodError
> > at scala.actors.Scheduler$.impl(Scheduler.scala:35)
> > at scala.actors.Scheduler$.execute(Scheduler.scala:101)
> > at scala.actors.Actor$class.start(Actor.scala:783)
> > at net.liftweb.http.PointlessActorToWorkAroundBug$.start
> > (LiftServlet.sca
> > la:702)
> > at net.liftweb.http.PointlessActorToWorkAroundBug$.ctor
> > (LiftServlet.scal
> > a:767)
> > at net.liftweb.http.PointlessActorToWorkAroundBug$.
> > (LiftServlet.sc
> > ala:776)
> > at net.liftweb.http.PointlessActorToWorkAroundBug$.
> > (LiftServlet.
> > scala)
> > at net.liftweb.http.LiftFilter.init(LiftServlet.scala:563)
> > at org.apache.catalina.core.ApplicationFilterConfig.getFilter
> > (Applicatio
> > nFilterConfig.java:275)
> > at
> > org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica
> > tionFilterConfig.java:397)
> > at org.apache.catalina.core.ApplicationFilterConfig.
> > (ApplicationFi
> > lterConfig.java:108)
> > at org.apache.catalina.core.StandardContext.filterStart
> > (StandardContext.
> > java:3709)
> > at org.apache.catalina.core.StandardContext.start
> > (StandardContext.java:4
> > 356)
> > at org.apache.catalina.core.ContainerBase.start
> > (ContainerBase.java:1045)
> >
> > at org.apache.catalina.core.StandardHost.start
> > (StandardHost.java:719)
> > at org.apache.catalina.core.ContainerBase.start
> > (ContainerBase.java:1045)
> >
> > at org.apache.catalina.core.StandardEngine.start
> > (StandardEngine.java:443
> > )
> > at org.apache.catalina.startup.Embedded.start(Embedded.java:
> > 825)
> > at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer
> > (AbstractRunMo
> > jo.java:385)
> > at org.codehaus.mojo.tomcat.AbstractRunMojo.execute
> > (AbstractRunMojo.java
> > :144)
> > at org.apache.maven.plugin.DefaultPluginManager.executeMojo
> > (DefaultPlugi
> > nManager.java:490)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> > ultLifecycleExecutor.java:694)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> > Goal(DefaultLifecycleExecutor.java:569)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> > ltLifecycleExecutor.java:539)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> > dleFailures(DefaultLifecycleExecutor.java:387)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> > ts(DefaultLifecycleExecutor.java:348)
> > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> > (DefaultLi
> > fecycleExecutor.java:180)
> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
> > 328)
> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
> > 138)
> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> > at org.apache.maven.cli.compat.CompatibleMain.main
> > (CompatibleMain.java:6
> > 0)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >   

[Lift] Re: How do you set disabled/readonly attributes from a snippet?

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 11:49 AM, Jim Barrows  wrote:

> I'm importing HttpHelpers, and the implicit is not there.
> Did this change for M7?


I think what you want is:

"firstName" -> (SHtml.text(person.firstName, person.firstName = _) % ("id"
-> "firstName") % ("disabled" -> disabledAttr))




>
>
> On Mon, Nov 9, 2009 at 6:41 PM, Ross Mellgren  wrote:
>
>>
>> Use None (Option) or Empty (Box) as the value of the attribute -- this
>> will cause the pairToUnprefixed implicit that is being used inside
>> SHtml to not generate an attribute.
>>
>> e.g.:
>>
>> val disableAttr: Box[String] = if (disableAll) Full("disabled") else
>> Empty
>>
>> bind("person", xhtml,
>>  ...
>>   "firstName" -> SHtml.text(person.firstName, person.firstName =
>> _, "id" -> "firstName", "disabled" -> disableAttr),
>>  ...)
>>
>> -Ross
>>
>>
>> On Nov 9, 2009, at 6:51 PM, Jim Barrows wrote:
>>
>> > I found this answer on nabble but it's regarding setting the values
>> > client side.  I want to set them in the snippet, depending on data.
>> > This doesn't work, but will give you a better idea of what I'm
>> > trying to do:
>> >  def bindPerson(xhtml: NodeSeq, action: () => Unit,
>> > submitButtonName: String, disableAll: boolean): NodeSeq = {
>> > // Hold a val here so that the "id" closure holds it when we re-
>> > enter this method
>> > val currentId = person.id
>> > val disableString :String = disableAll match {
>> >   case true => "disabled"
>> >   case false => ""
>> > }
>> > bind("person", xhtml,
>> >   "id" -> SHtml.hidden(() => person.id = currentId),
>> >   //  "version" -> SHtml.hidden(() => person.version),
>> >   "firstName" -> SHtml.text(person.firstName, person.firstName =
>> > _, "id" -> "firstName", "disabled" -> disableString),
>> >   "middleName" -> SHtml.text(person.middleName,
>> > person.middleName = _, "id" -> "middleName", "disabled" ->
>> > disableString),
>> >   "lastName" -> SHtml.text(person.lastName, person.lastName = _,
>> > "id" -> "lastName", "disabled" -> disableString),
>> >   "submit" -> SHtml.submit(?(submitButtonName), action))
>> >   }
>> >
>> > --
>> > James A Barrows
>> >
>> >
>> > >
>>
>>
>>
>>
>
>
> --
> James A Barrows
>
>
> >
>


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



[Lift] Re: New Milestone coming soon

2009-11-12 Thread David Pollak
On Wed, Nov 11, 2009 at 3:40 PM, Jim McBeath  wrote:

>
> OracleDriver doesn't work with CRUDify when attempting to view a
> list of entries, it gets an SQL error due to use of LIMIT/OFFSET,
> which Oracle does not support.  Defining brokenLimit_? = true
> in OracleDriver makes it work for me.  I can do this myself by including
> my own copy of Driver.scala, so I don't know if it counts as critical,
> but it seems like a pretty localized (and thus low-risk) change.
>

Okay... change made


>
> --
> Jim
>
> On Wed, Nov 11, 2009 at 11:54:46AM -0800, David Pollak wrote:
> > Date: Wed, 11 Nov 2009 11:54:46 -0800
> > From: David Pollak 
> > To: liftweb 
> > Subject: [Lift] New Milestone coming soon
> >
> >Folks,
> >
> >There are two critical issues with M7:
> >
> >  * Issue 164Â http://github.com/dpp/liftweb/issues#issue/164
> >Â JSON/Ajax messages do not carry Notices back to the client.
> >  * The Session manager is not initialized properly. Â Basically, this
> >means that sessions will be expired by the web container, but not
> >by Lift and GUIDs that map to functions on the server side are not
> >removed until the session is terminated.
> >
> >We're planning to do an M7.1 release later this week (probably
> Friday).
> >If there are other *critical* defects (stuff that means you can't use
> >M7 in production), please speak now.
> >Thanks,
> >David
> >--
> >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
> >
> >
>
> >
>


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



[Lift] Re: CometActor and render

2009-11-12 Thread jack

David,

I hope its clear from the code what the problem is. If you want me to,
I will give a more detailed description of how the code is supposed to
work.

Jack

On Nov 11, 11:26 pm, Jack Widman  wrote:
> David,
>
> I have attached my code. It runs but does not behave as I intended it to.
> The code does a web search on the term "scala" and displays a list of URLs
> of the results. Next to each URL it says "Page Length : -1". A process is
> running in the background which takes each URL, goes out and gets the page
> and takes the length of the page. The length of that page is then supposed
> to immediately appear on the page next to that URL. I put the lengths on a
> queue, as they come in, and I have the Comet page poll the queue and display
> the results. It would probably be better to have the results send a message
> to the Comet class so the page is only re-rendered when there is a change
> but for now I am polling.
>
> I can see the lengths coming in and being put on the queue, but the Comet
> page is not getting them till they are all retrieved. (This takes way too
> long and nothing changes on the screen till its too late). I need them to
> appear as they come in. Occasionally I can see a length being retrieved and
> the Comet page finds it but even then it is not displayed until all the
> lengths are in.   I know this is not very clear but I think it will be clear
> from the code.
>
> I also know there are a lot of places in the code which can be improved and
> I welcome all of your input but what I would love is to have these numbers
> appear on the page as they they are retrieved. I have been stumped by this
> for a while and I suspect that somebody who knows Lift well might see the
> problem right away.
>
> The class that retrieves the page lengths is called Calculator and the queue
> is called SourceQueue. The classes are pretty small so hopefully it will be
> clear what is going on. I want you to know I think it is incredible how
> responsive you and the group are and I look forward to using Lift in the
> future.
>
> Thanks so much.
>
> Jack
>
> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak 
> > wrote:
>
> > On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>
> >> The only difference between your working code and mine is that mine has a
> >> process in the background that is always running and puts Foo objects on a
> >> queue whenever they are ready. Where can I start this long running process
> >> so that it doesn't interfere with the lowPriority method that takes things
> >> off the queue and rerenders the page. I tried starting the process in its
> >> own Actor that I start in localSetup but it seems somehow to be blocking 
> >> the
> >> lowPriority method from doing its thing.
>
> > I have no idea what this means... sorry.
>
> > Please post actual runnable code and we can help you debug.
>
> >> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
> >> feeder.of.the.be...@gmail.com> wrote:
>
> >>> Jack,
>
> >>> I reproduced your code and it seems to work fine.  I've enclosed a
> >>> working copy.
>
> >>> Some comments about your code:
>
> >>>    - The foos variable and the foo variable may be getting confused in
> >>>    the code... the render method may be rendering the same thing based on 
> >>> the
> >>>    unchanging foos variable.
> >>>    - Doing null testing is a sign that you have logic errors in your
> >>>    code.  I strongly recommend using either Box or Option for everything 
> >>> that
> >>>    can logically not contain a value/reference.  If you're bridging out 
> >>> to Java
> >>>    code and are expecting null from the Java code, write a small bridge 
> >>> that
> >>>    will wrapper the Java return values in Box/Option.
> >>>    - You have a case class (Tick) that contains no parameters.  Please
> >>>    use a case object instead.
> >>>    - Your Tick look is a spin loop.  You fire a Tick message as part of
> >>>    processing the Tick message.  I would suggest that if you're polling, 
> >>> that
> >>>    you have a reasonable poll interval, otherwise you'll starve your CPU.
> >>>    Further, having reRender on each loop through means that you're 
> >>> forcing a
> >>>    lot of bytes over the wire rather than only doing a reRender on changed
> >>>    values.
>
> >>> Thanks,
>
> >>> David
>
> >>> On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman wrote:
>
>  Sorry. Here it is:   As I said, I know that when render is called,
>  foo.getValue has the right value. But it does not show on the screen, 
>  unless
>  I refresh the browser.
>
>  package com.foo.comet
>
>  import net.liftweb._
>  import http._
>  import js._
>  import JsCmds._
>  import net.liftweb.util._
>  import net.liftweb.http._
>  import _root_.scala.xml._
>  import scala.actors._
>  import com.authoritude.snippet._
>  import scala.collection.mutable.Queue
>  import net.liftweb.http.SessionVar
>
>  class MyComet extends CometActor {
>
>    overrid

[Lift] Re: URL in PlainMailBodyType to BlackBerry

2009-11-12 Thread Naftoli Gugenheim
What's the advantage/purpose over they method I chose?

On Thu, Nov 12, 2009 at 4:36 PM, Naftoli Gugenheim wrote:

> Have you ever used Dumbster?
>
>
> On Thu, Nov 12, 2009 at 2:59 PM, Derek Chen-Becker 
> wrote:
>
>> I would like to see an integrated dumbster test. You can pick an arbitrary
>> port to run the test on just by attempting to bind and iterating until you
>> succeed. Something (roughly) like this:
>>
>> def openSmtpServer (startPort : Int, endPort : Int) :
>> (Int,SimpleSmtpServer) = {
>>   var port = startPort
>>   var server : SimpleSmtpServer = null
>>
>>   while (port <= endPort && (server eq null)) {
>> try {
>>   server = SimpleSmtpServer.start(port)
>> } catch {
>>   case _ => port += 1
>> }
>>   }
>>   return (port,server)
>> }
>>
>> Then you can configure Lift's mailer to send to that port on localhost and
>> go from there.
>>
>> Derek
>>
>>
>> On Fri, Nov 6, 2009 at 11:54 AM, Naftoli Gugenheim 
>> wrote:
>>
>>> Can someone confirm or give other feedback? Are my tests good?
>>> http://reviewboard.liftweb.net/r/83/
>>>
>>>
>>>
>>> On Wed, Nov 4, 2009 at 8:45 PM, Naftoli Gugenheim 
>>> wrote:
>>>
 Okay. Unit test are now on Review Board too (and they pass).
 I'm hoping someone will be able to confirm my work so that my client, a
 medical assistance volunteer-based charity organization, will have email
 working properly along with the rest of Lift's great features, so that the
 volunteer dispatchers will be able to click the links and help sick people.


 On Wed, Nov 4, 2009 at 2:04 AM, Naftoli Gugenheim >>> > wrote:

> I thought of a smarter way to test it. Please tell me if you have any
> objections.
> I noticed that some of the specs extend the class they test. The idea
> is to refactor the call to actually send the email into an outside method.
> Then, after making some private members of Mailer protected, the spec can
> override the behavior of the method that sends it, to instead check the
> message object.
> This has the advantages of not adding another dependency to Lift, or
> relying on a given port being available to run an SMTP server on whoever
> builds Lift's computer.
>
> -
> David Pollak wrote:
>
> On Tue, Nov 3, 2009 at 3:00 PM, Naftoli Gugenheim <
> naftoli...@gmail.com>wrote:
>
> >
> > I verified locally via dumbster that the content type is test/plain;
> > charset=us-ascii for a single PlainMailBodyType. For two, or an
> > XHTMLMailBodyType, it's multipart/alternative.
> > Do I still need to contribute a test to Lift?
> >
>
> Yes.  This is the last time I will state this criteria or otherwise
> engage
> on this subject.
>
>
> >
> > -
> > David Pollak wrote:
> >
> > On Tue, Nov 3, 2009 at 1:47 PM, Naftoli Gugenheim <
> naftoli...@gmail.com
> > >wrote:
> >
> > >
> > > Wait a minute. You want me to test that my change works--that
> simple
> > > messages are not multipart--or that other messages still are
> multipart?
> >
> >
> > Both.
> >
> > Test that mail sent as plain text is not multipart and that all other
> mail
> > is multipart and that all the mail actually makes it through the
> system.
> > It's 2 or 3 tests.
> >
> > Why am I imposing this burden on you?  Almost every site that uses
> Lift
> > uses
> > the Mailer.  I have given my cell phone number to some of these sites
> with
> > the message "I stand behind Lift... if you're experiencing a problem,
> > please
> > call me any time day or night."   So, I'm on the hook if something
> goes
> > wrong.  My gut says, "there could be more problems with this
> apparently
> > simple change than meet the eye," so I'm asking you to write the
> tests.
> >
> >
> >
> >
> > > Or something else?
> > >
> > > -
> > > David Pollak wrote:
> > >
> > > On Tue, Nov 3, 2009 at 1:30 PM, Naftoli Gugenheim <
> naftoli...@gmail.com
> > > >wrote:
> > >
> > > > I asked you how to write one. I have no clue how to unit test
> email, or
> > > > what content type an email is. And the test has to not fail on
> > computers
> > > > that don't have an SMTP server, I presume?
> > >
> > >
> > > I don't know how to write tests against mailers, but you're the one
> that
> > > made a change, so you have to figure out how to test it.  I know no
> more
> > > about testing mailers than you do, so it's one of us that has to do
> the
> > > work.
> > >
> > >
> > > > As I mentioned on review board, I did test it manually though and
> it
> > > works
> > > > fine. Do most commits include a unit test?
> > > >
>

[Lift] Re: URL in PlainMailBodyType to BlackBerry

2009-11-12 Thread Naftoli Gugenheim
Have you ever used Dumbster?

On Thu, Nov 12, 2009 at 2:59 PM, Derek Chen-Becker wrote:

> I would like to see an integrated dumbster test. You can pick an arbitrary
> port to run the test on just by attempting to bind and iterating until you
> succeed. Something (roughly) like this:
>
> def openSmtpServer (startPort : Int, endPort : Int) :
> (Int,SimpleSmtpServer) = {
>   var port = startPort
>   var server : SimpleSmtpServer = null
>
>   while (port <= endPort && (server eq null)) {
> try {
>   server = SimpleSmtpServer.start(port)
> } catch {
>   case _ => port += 1
> }
>   }
>   return (port,server)
> }
>
> Then you can configure Lift's mailer to send to that port on localhost and
> go from there.
>
> Derek
>
>
> On Fri, Nov 6, 2009 at 11:54 AM, Naftoli Gugenheim 
> wrote:
>
>> Can someone confirm or give other feedback? Are my tests good?
>> http://reviewboard.liftweb.net/r/83/
>>
>>
>>
>> On Wed, Nov 4, 2009 at 8:45 PM, Naftoli Gugenheim 
>> wrote:
>>
>>> Okay. Unit test are now on Review Board too (and they pass).
>>> I'm hoping someone will be able to confirm my work so that my client, a
>>> medical assistance volunteer-based charity organization, will have email
>>> working properly along with the rest of Lift's great features, so that the
>>> volunteer dispatchers will be able to click the links and help sick people.
>>>
>>>
>>> On Wed, Nov 4, 2009 at 2:04 AM, Naftoli Gugenheim 
>>> wrote:
>>>
 I thought of a smarter way to test it. Please tell me if you have any
 objections.
 I noticed that some of the specs extend the class they test. The idea is
 to refactor the call to actually send the email into an outside method.
 Then, after making some private members of Mailer protected, the spec can
 override the behavior of the method that sends it, to instead check the
 message object.
 This has the advantages of not adding another dependency to Lift, or
 relying on a given port being available to run an SMTP server on whoever
 builds Lift's computer.

 -
 David Pollak wrote:

 On Tue, Nov 3, 2009 at 3:00 PM, Naftoli Gugenheim >>> >wrote:

 >
 > I verified locally via dumbster that the content type is test/plain;
 > charset=us-ascii for a single PlainMailBodyType. For two, or an
 > XHTMLMailBodyType, it's multipart/alternative.
 > Do I still need to contribute a test to Lift?
 >

 Yes.  This is the last time I will state this criteria or otherwise
 engage
 on this subject.


 >
 > -
 > David Pollak wrote:
 >
 > On Tue, Nov 3, 2009 at 1:47 PM, Naftoli Gugenheim <
 naftoli...@gmail.com
 > >wrote:
 >
 > >
 > > Wait a minute. You want me to test that my change works--that simple
 > > messages are not multipart--or that other messages still are
 multipart?
 >
 >
 > Both.
 >
 > Test that mail sent as plain text is not multipart and that all other
 mail
 > is multipart and that all the mail actually makes it through the
 system.
 > It's 2 or 3 tests.
 >
 > Why am I imposing this burden on you?  Almost every site that uses
 Lift
 > uses
 > the Mailer.  I have given my cell phone number to some of these sites
 with
 > the message "I stand behind Lift... if you're experiencing a problem,
 > please
 > call me any time day or night."   So, I'm on the hook if something
 goes
 > wrong.  My gut says, "there could be more problems with this
 apparently
 > simple change than meet the eye," so I'm asking you to write the
 tests.
 >
 >
 >
 >
 > > Or something else?
 > >
 > > -
 > > David Pollak wrote:
 > >
 > > On Tue, Nov 3, 2009 at 1:30 PM, Naftoli Gugenheim <
 naftoli...@gmail.com
 > > >wrote:
 > >
 > > > I asked you how to write one. I have no clue how to unit test
 email, or
 > > > what content type an email is. And the test has to not fail on
 > computers
 > > > that don't have an SMTP server, I presume?
 > >
 > >
 > > I don't know how to write tests against mailers, but you're the one
 that
 > > made a change, so you have to figure out how to test it.  I know no
 more
 > > about testing mailers than you do, so it's one of us that has to do
 the
 > > work.
 > >
 > >
 > > > As I mentioned on review board, I did test it manually though and
 it
 > > works
 > > > fine. Do most commits include a unit test?
 > > >
 > >
 > > If this change breaks the mailer, the break impacts lots and lots of
 > > people.  The mailer code has been stable and untouched for a long
 time
 > > (except for the change to LiftActors).  So, my criteria for
 accepting
 > this
 > > change is to have a test as

[Lift] Re: New Milestone coming soon

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 11:37 AM, Hannes  wrote:

>  Hi David,
>
> I wrote you a message about the "CometActor received shutdown" thing. I'm
> almost sure, that this is related to M7, but I've no idea, why or what.
>

Did you read my response?  This message is normal and expected.


>
> kind regards
> Tobias
>
> Folks,
>
>  There are two critical issues with M7:
>
>- Issue 164 http://github.com/dpp/liftweb/issues#issue/164  JSON/Ajax
>messages do not carry Notices back to the client.
>- The Session manager is not initialized properly.  Basically, this
>means that sessions will be expired by the web container, but not by Lift
>and GUIDs that map to functions on the server side are not removed until 
> the
>session is terminated.
>
> We're planning to do an M7.1 release later this week (probably Friday).
>
>  If there are other *critical* defects (stuff that means you can't use M7
> in production), please speak now.
>
>  Thanks,
>
>  David
>
> --
> 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
>
>
>
>
> >
>


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



[Lift] Re: form input tag name values changed when moving from M6 to M7

2009-11-12 Thread Alex Boisvert
Wouldn't it be better to provide a unique identifier directly in the source
for all elements that require testing?

And I don't mean somebody inputting a unique id manually everywhere but
instead using a text processing tool on your codebase that would
automatically inject unique ids where desired.

Low tech but I think it would work better in the long run than hashing stack
frames.

alex


On Wed, Nov 11, 2009 at 12:40 PM, ben  wrote:

>
> Thanks for the reply David. Below is some code which might suit both
> our requirements ...
>
>  def locateFirstUserStackElement(stack: Array[StackTraceElement]) :
> StackTraceElement = {
>  stack.foreach(element => {
>  if (!element.toString.startsWith("net.liftweb")) return
> element
>  })
>  stack(0)
>   }
>
>  def formFuncName: String = if (Props.testMode) {
>val bump: Long = ((_formGroup.is openOr 0) + 1000L) * 1L
>val num: Int = formItemNumber.is
>formItemNumber.set(num + 1)
>import _root_.java.text._
> val prefix: String = new DecimalFormat("0").format
> (bump + num)
> //M7 - "f" + prefix + "_" + Helpers.hashHex((new
> Exception).getStackTrace.toList.take(10).map(_.toString).mkString
> (",")))
>"f" + prefix + "_" +Helpers.hashHex(locateFirstUserStackElement
> (new Exception().getStackTrace).getClassName)
>   } else {
>_formGroup.is match {
>  case Full(x) => Helpers.nextFuncName(x.toLong * 1L)
>  case _ => Helpers.nextFuncName
>}
>  }
>
> >
>

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



[Lift] Re: problems with tomcat

2009-11-12 Thread DavidV

Another potentially helpful detail is that I get the same liftFilter
error when running on a local jetty server through maven as I do when
running on tomcat (also through maven).  I am executing a clean
command before running the web app each and every time.

...
2009-11-12 16:10:05.833::WARN:  failed LiftFilter:
java.lang.AbstractMethodError

2009-11-12 16:10:05.834::WARN:  failed
org.mortbay.jetty.plugin.Jetty6PluginWebA
ppcont...@14c0275{/,C:\Source\trunk\eclipse\testLift\src\main\webapp}:
java.lang
.AbstractMethodError
...



On Nov 12, 3:40 pm, DavidV  wrote:
> I just tried to run the same code that used to work with Lift-1.0.1
> and Scala 2.7.5 with my updates to Lift 1.0.1 and Scala 2.7.7 and I
> got the following error:
>
> [INFO] [tomcat:run {execution: default-cli}]
> [INFO] Running war onhttp://localhost:8080/portal
> [INFO] Creating Tomcat server configuration at c:\Source\trunk\eclipse
> \testLift\
> target\tomcat
> Nov 12, 2009 3:36:51 PM org.apache.catalina.startup.Embedded start
> INFO: Starting tomcat server
> Nov 12, 2009 3:36:51 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
> Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext
> filterStart
> SEVERE: Exception starting filterLiftFilter
> java.lang.AbstractMethodError
>         at scala.actors.Scheduler$.impl(Scheduler.scala:35)
>         at scala.actors.Scheduler$.execute(Scheduler.scala:101)
>         at scala.actors.Actor$class.start(Actor.scala:783)
>         at net.liftweb.http.PointlessActorToWorkAroundBug$.start
> (LiftServlet.sca
> la:702)
>         at net.liftweb.http.PointlessActorToWorkAroundBug$.ctor
> (LiftServlet.scal
> a:767)
>         at net.liftweb.http.PointlessActorToWorkAroundBug$.
> (LiftServlet.sc
> ala:776)
>         at net.liftweb.http.PointlessActorToWorkAroundBug$.
> (LiftServlet.
> scala)
>         at net.liftweb.http.LiftFilter.init(LiftServlet.scala:563)
>         at org.apache.catalina.core.ApplicationFilterConfig.getFilter
> (Applicatio
> nFilterConfig.java:275)
>         at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica
> tionFilterConfig.java:397)
>         at org.apache.catalina.core.ApplicationFilterConfig.
> (ApplicationFi
> lterConfig.java:108)
>         at org.apache.catalina.core.StandardContext.filterStart
> (StandardContext.
> java:3709)
>         at org.apache.catalina.core.StandardContext.start
> (StandardContext.java:4
> 356)
>         at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1045)
>
>         at org.apache.catalina.core.StandardHost.start
> (StandardHost.java:719)
>         at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1045)
>
>         at org.apache.catalina.core.StandardEngine.start
> (StandardEngine.java:443
> )
>         at org.apache.catalina.startup.Embedded.start(Embedded.java:
> 825)
>         at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer
> (AbstractRunMo
> jo.java:385)
>         at org.codehaus.mojo.tomcat.AbstractRunMojo.execute
> (AbstractRunMojo.java
> :144)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo
> (DefaultPlugi
> nManager.java:490)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:694)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:569)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:539)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:387)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:348)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> (DefaultLi
> fecycleExecutor.java:180)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
> 328)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
> 138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at org.apache.maven.cli.compat.CompatibleMain.main
> (CompatibleMain.java:6
> 0)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.
> java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced
> (Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode
> (Launcher.java:430)
>
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error filt

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
I did and its actually in the code I attached. In one place I use Dispatch
and in another place I use httpclient directly. I intend to use Dispatch for
everything.

On Thu, Nov 12, 2009 at 4:05 PM, Randinn  wrote:

>
> I'm not trying to change the subject but I was wondering if you looked
> at Databinder Dispatch http://databinder.net/dispatch/About for your
> url calls?
>
> On Nov 12, 3:26 pm, Jack Widman  wrote:
> > David,
> >
> > I have attached my code. It runs but does not behave as I intended it to.
> > The code does a web search on the term "scala" and displays a list of
> URLs
> > of the results. Next to each URL it says "Page Length : -1". A process is
> > running in the background which takes each URL, goes out and gets the
> page
> > and takes the length of the page. The length of that page is then
> supposed
> > to immediately appear on the page next to that URL. I put the lengths on
> a
> > queue, as they come in, and I have the Comet page poll the queue and
> display
> > the results. It would probably be better to have the results send a
> message
> > to the Comet class so the page is only re-rendered when there is a change
> > but for now I am polling.
> >
> > I can see the lengths coming in and being put on the queue, but the Comet
> > page is not getting them till they are all retrieved. (This takes way too
> > long and nothing changes on the screen till its too late). I need them to
> > appear as they come in. Occasionally I can see a length being retrieved
> and
> > the Comet page finds it but even then it is not displayed until all the
> > lengths are in.   I know this is not very clear but I think it will be
> clear
> > from the code.
> >
> > I also know there are a lot of places in the code which can be improved
> and
> > I welcome all of your input but what I would love is to have these
> numbers
> > appear on the page as they they are retrieved. I have been stumped by
> this
> > for a while and I suspect that somebody who knows Lift well might see the
> > problem right away.
> >
> > The class that retrieves the page lengths is called Calculator and the
> queue
> > is called SourceQueue. The classes are pretty small so hopefully it will
> be
> > clear what is going on. I want you to know I think it is incredible how
> > responsive you and the group are and I look forward to using Lift in the
> > future.
> >
> > Thanks so much.
> >
> > Jack
> >
> > On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
> feeder.of.the.be...@gmail.com
> >
> > > wrote:
> >
> > > On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman  >wrote:
> >
> > >> The only difference between your working code and mine is that mine
> has a
> > >> process in the background that is always running and puts Foo objects
> on a
> > >> queue whenever they are ready. Where can I start this long running
> process
> > >> so that it doesn't interfere with the lowPriority method that takes
> things
> > >> off the queue and rerenders the page. I tried starting the process in
> its
> > >> own Actor that I start in localSetup but it seems somehow to be
> blocking the
> > >> lowPriority method from doing its thing.
> >
> > > I have no idea what this means... sorry.
> >
> > > Please post actual runnable code and we can help you debug.
> >
> > >> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
> > >> feeder.of.the.be...@gmail.com> wrote:
> >
> > >>> Jack,
> >
> > >>> I reproduced your code and it seems to work fine.  I've enclosed a
> > >>> working copy.
> >
> > >>> Some comments about your code:
> >
> > >>>- The foos variable and the foo variable may be getting confused
> in
> > >>>the code... the render method may be rendering the same thing
> based on the
> > >>>unchanging foos variable.
> > >>>- Doing null testing is a sign that you have logic errors in your
> > >>>code.  I strongly recommend using either Box or Option for
> everything that
> > >>>can logically not contain a value/reference.  If you're bridging
> out to Java
> > >>>code and are expecting null from the Java code, write a small
> bridge that
> > >>>will wrapper the Java return values in Box/Option.
> > >>>- You have a case class (Tick) that contains no parameters.
>  Please
> > >>>use a case object instead.
> > >>>- Your Tick look is a spin loop.  You fire a Tick message as part
> of
> > >>>processing the Tick message.  I would suggest that if you're
> polling, that
> > >>>you have a reasonable poll interval, otherwise you'll starve your
> CPU.
> > >>>Further, having reRender on each loop through means that you're
> forcing a
> > >>>lot of bytes over the wire rather than only doing a reRender on
> changed
> > >>>values.
> >
> > >>> Thanks,
> >
> > >>> David
> >
> > >>> On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman  >wrote:
> >
> >  Sorry. Here it is:   As I said, I know that when render is called,
> >  foo.getValue has the right value. But it does not show on the
> screen, unless
> >  I refresh the browser.
>

[Lift] Re: CometActor and render

2009-11-12 Thread Randinn

I'm not trying to change the subject but I was wondering if you looked
at Databinder Dispatch http://databinder.net/dispatch/About for your
url calls?

On Nov 12, 3:26 pm, Jack Widman  wrote:
> David,
>
> I have attached my code. It runs but does not behave as I intended it to.
> The code does a web search on the term "scala" and displays a list of URLs
> of the results. Next to each URL it says "Page Length : -1". A process is
> running in the background which takes each URL, goes out and gets the page
> and takes the length of the page. The length of that page is then supposed
> to immediately appear on the page next to that URL. I put the lengths on a
> queue, as they come in, and I have the Comet page poll the queue and display
> the results. It would probably be better to have the results send a message
> to the Comet class so the page is only re-rendered when there is a change
> but for now I am polling.
>
> I can see the lengths coming in and being put on the queue, but the Comet
> page is not getting them till they are all retrieved. (This takes way too
> long and nothing changes on the screen till its too late). I need them to
> appear as they come in. Occasionally I can see a length being retrieved and
> the Comet page finds it but even then it is not displayed until all the
> lengths are in.   I know this is not very clear but I think it will be clear
> from the code.
>
> I also know there are a lot of places in the code which can be improved and
> I welcome all of your input but what I would love is to have these numbers
> appear on the page as they they are retrieved. I have been stumped by this
> for a while and I suspect that somebody who knows Lift well might see the
> problem right away.
>
> The class that retrieves the page lengths is called Calculator and the queue
> is called SourceQueue. The classes are pretty small so hopefully it will be
> clear what is going on. I want you to know I think it is incredible how
> responsive you and the group are and I look forward to using Lift in the
> future.
>
> Thanks so much.
>
> Jack
>
> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak 
> > wrote:
>
> > On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>
> >> The only difference between your working code and mine is that mine has a
> >> process in the background that is always running and puts Foo objects on a
> >> queue whenever they are ready. Where can I start this long running process
> >> so that it doesn't interfere with the lowPriority method that takes things
> >> off the queue and rerenders the page. I tried starting the process in its
> >> own Actor that I start in localSetup but it seems somehow to be blocking 
> >> the
> >> lowPriority method from doing its thing.
>
> > I have no idea what this means... sorry.
>
> > Please post actual runnable code and we can help you debug.
>
> >> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
> >> feeder.of.the.be...@gmail.com> wrote:
>
> >>> Jack,
>
> >>> I reproduced your code and it seems to work fine.  I've enclosed a
> >>> working copy.
>
> >>> Some comments about your code:
>
> >>>    - The foos variable and the foo variable may be getting confused in
> >>>    the code... the render method may be rendering the same thing based on 
> >>> the
> >>>    unchanging foos variable.
> >>>    - Doing null testing is a sign that you have logic errors in your
> >>>    code.  I strongly recommend using either Box or Option for everything 
> >>> that
> >>>    can logically not contain a value/reference.  If you're bridging out 
> >>> to Java
> >>>    code and are expecting null from the Java code, write a small bridge 
> >>> that
> >>>    will wrapper the Java return values in Box/Option.
> >>>    - You have a case class (Tick) that contains no parameters.  Please
> >>>    use a case object instead.
> >>>    - Your Tick look is a spin loop.  You fire a Tick message as part of
> >>>    processing the Tick message.  I would suggest that if you're polling, 
> >>> that
> >>>    you have a reasonable poll interval, otherwise you'll starve your CPU.
> >>>    Further, having reRender on each loop through means that you're 
> >>> forcing a
> >>>    lot of bytes over the wire rather than only doing a reRender on changed
> >>>    values.
>
> >>> Thanks,
>
> >>> David
>
> >>> On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman wrote:
>
>  Sorry. Here it is:   As I said, I know that when render is called,
>  foo.getValue has the right value. But it does not show on the screen, 
>  unless
>  I refresh the browser.
>
>  package com.foo.comet
>
>  import net.liftweb._
>  import http._
>  import js._
>  import JsCmds._
>  import net.liftweb.util._
>  import net.liftweb.http._
>  import _root_.scala.xml._
>  import scala.actors._
>  import com.authoritude.snippet._
>  import scala.collection.mutable.Queue
>  import net.liftweb.http.SessionVar
>
>  class MyComet extends CometActor {
>
>    override def defaul

[Lift] Re: problems with tomcat

2009-11-12 Thread DavidV

I just tried to run the same code that used to work with Lift-1.0.1
and Scala 2.7.5 with my updates to Lift 1.0.1 and Scala 2.7.7 and I
got the following error:

[INFO] [tomcat:run {execution: default-cli}]
[INFO] Running war on http://localhost:8080/portal
[INFO] Creating Tomcat server configuration at c:\Source\trunk\eclipse
\testLift\
target\tomcat
Nov 12, 2009 3:36:51 PM org.apache.catalina.startup.Embedded start
INFO: Starting tomcat server
Nov 12, 2009 3:36:51 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext
filterStart
SEVERE: Exception starting filter LiftFilter
java.lang.AbstractMethodError
at scala.actors.Scheduler$.impl(Scheduler.scala:35)
at scala.actors.Scheduler$.execute(Scheduler.scala:101)
at scala.actors.Actor$class.start(Actor.scala:783)
at net.liftweb.http.PointlessActorToWorkAroundBug$.start
(LiftServlet.sca
la:702)
at net.liftweb.http.PointlessActorToWorkAroundBug$.ctor
(LiftServlet.scal
a:767)
at net.liftweb.http.PointlessActorToWorkAroundBug$.
(LiftServlet.sc
ala:776)
at net.liftweb.http.PointlessActorToWorkAroundBug$.
(LiftServlet.
scala)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:563)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter
(Applicatio
nFilterConfig.java:275)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica
tionFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.
(ApplicationFi
lterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart
(StandardContext.
java:3709)
at org.apache.catalina.core.StandardContext.start
(StandardContext.java:4
356)
at org.apache.catalina.core.ContainerBase.start
(ContainerBase.java:1045)

at org.apache.catalina.core.StandardHost.start
(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start
(ContainerBase.java:1045)

at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:443
)
at org.apache.catalina.startup.Embedded.start(Embedded.java:
825)
at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer
(AbstractRunMo
jo.java:385)
at org.codehaus.mojo.tomcat.AbstractRunMojo.execute
(AbstractRunMojo.java
:144)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPlugi
nManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLi
fecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main
(CompatibleMain.java:6
0)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced
(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode
(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Nov 12, 2009 3:36:53 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/portal] startup failed due to previous errors
Nov 12, 2009 3:36:53 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 12, 2009 3:36:54 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080

This seems more consistent with whatever is happening on the external
tomcat server...
Thoughts?  Also, any ideas about the test failures during the mvn
clean package command?

Thanks, I finally feel like I'm getting somewhere now!
-David

On Nov 12, 3:21 pm, DavidV  wrote:
> On a side note, while I'm installing Lift 1.0.2 with Scala2.7.5, I
> always execute a "clean" command before the mvn package.  However, I
>

[Lift] Re: Lift under 2.8 timeframe ?

2009-11-12 Thread Francois Armand

Wilson MacGyver a écrit :
> You feel this confident about Scala 2.8 release by Jan?
> 
> I'm curious because Scala 2.8 schedule seem to be
> a fairly moving target.

My finger is telling me that we are going to see a "release candidate 
for the release candidate" hummm tomorrow ;)


-- 
Francois Armand
http://fanf42.blogspot.com

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



[Lift] Re: Lift under 2.8 timeframe ?

2009-11-12 Thread Francois Armand

David Pollak a écrit :

> I'm going to get the "in earnest" Lift -> 2.8 port rolling tomorrow.  
> Hopefully, I'll have a branch that tracks the current Lift code running 
> by mid next week.

That's so a great new :)

> We are *very* serious and *VERY* (lots of emphasis) committed to Scala 
> 2.8.  I'm expecting that Lift 1.1 ships (currently plans for early Jan) 
> as Scala 2.8 only or as two flavors (2.7.x and 2.8)

I never doubted that, it was just that as long as 2.8 wasn't released, I 
didn't know how much time you will to spend on it.

So, that's a really interesting new, it will have it's weight in the 
choice :)

-- 
Francois Armand
http://fanf42.blogspot.com

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



[Lift] Re: problems with tomcat

2009-11-12 Thread DavidV

On a side note, while I'm installing Lift 1.0.2 with Scala2.7.5, I
always execute a "clean" command before the mvn package.  However, I
also need to execute a "clean" in eclipse before the mvn package works
properly.  Otherwise, I get this error:

---
 T E S T S
---
Running net.genomas.lift.test.AppTest
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.258
sec <<< FA
ILURE!

Results :

Tests in error:
  testXml(net.genomas.lift.test.AppTest)

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0

[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] There are test failures.

Please refer to c:\Source\trunk\eclipse\testLift\target\surefire-
reports for the
 individual test results.
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 32 seconds
[INFO] Finished at: Thu Nov 12 15:21:06 EST 2009
[INFO] Final Memory: 29M/53M
[INFO]



I now have Lift-1.0.2 and Scala 2.7.7 and am testing with tomcat.



On Nov 12, 2:43 pm, David Pollak 
wrote:
> On Thu, Nov 12, 2009 at 11:36 AM, DavidV  wrote:
>
> > I don't appear to have any conflicting jars in my TOMCAT_HOME/common/
> > lib folder, however, I am now realizing that I have a postgres
> > jdbc3 .jar file in there and I am using a jdbc4 .jar postres file in
> > my webapp.  Perhaps that is the problem?  I'll check that out.
>
> > I am using Lift 1.0.1 with Scala version 2.7.5
>
> Please use Lift 1.0.2
>
> Please delete ~/.m2 (or whereever your Maven repository is)
>
> Please do a "mvn clean install"
>
> Then test locally (mvn tomcat:run)  If it works, copy to your other Tomcat
> instance and see how things work.
>
>
>
> > It does work with the tomcat on my computer, which leads me to believe
> > that it should be compatible with the current versions of Lift/Scala
> > that I'm using.  Maybe that's an incorrect assumption though, as I'm
> > not very familiar with tomcat.
>
> > On Nov 12, 2:15 pm, David Pollak 
> > wrote:
> > > What version of Lift are you using?
>
> > > If it's Lift 1.1-M7 or 1.1-SNAPSHOT, please make sure you've got the
> > Scala
> > > version set to 2.7.7
>
> > > If you're using Eclipse for development, please make sure to do a mvn
> > *clean
> > > * package to build your WAR file.  The clean phase is super important.
>
> > > On Thu, Nov 12, 2009 at 11:07 AM, DavidV 
> > wrote:
>
> > > > I am having some issues deploying my Lift web application to a tomcat
> > > > server.
> > > > When I run tomcat through maven (mvn tomcat:run), the web application
> > > > works properly and connects to my postgres database.  However, when I
> > > > use mvn package to create a war file which I then deploy to a local
> > > > tomcat server (on my computer) only the HTML of the web application
> > > > appears and the snippets with the application's content fail.  It
> > > > appears to be a problem with the sitemap loading properly, because I
> > > > changed the sitemap by deleting one of many Loc.If parameters and the
> > > > web application then worked as expected.  However, when I then tried
> > > > to deploy the same .war file to a tomcat server on a different
> > > > computer, the web app failed again, showing only the HTML and not the
> > > > snippets.  I suspect that perhaps this is because I need to change my
> > > > url to the postgres database, but I've tried many permutations of the
> > > > url and none seem to work.
> > > > To make things worse, the logging doesn't seem to be working properly
> > > > making it difficult to diagnose the exact problem.  I can't locate a
> > > > stdout.log file anywhere.  In my catalina.out file I get the following
> > > > error:
>
> > > > java.lang.NullPointerException
> > > >        at scala.runtime.BoxesRunTime.boxToInteger(Unknown Source)
> > > >        at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
> > > > (Actor.scala:800)
> > > >        at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
> > > > (Actor.scala:794)
> > > >        at scala.actors.Reaction.run(Reaction.scala:82)
> > > >        at net.liftweb.http.ActorSchedulerFixer$$anon$1$$anon$3.run
> > > > (LiftServlet.scala:673)
> > > >        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
> > > > (ThreadPoolExecutor.java:650)
> > > >        at java.util.concurrent.ThreadPoolExecutor$Worker.run
> > > > (ThreadPoolExecutor.java:675)
> > > >        at java.lang.Thread.run(Thread.java:595)
>
> > > > I also get an error that says:
> > > > log4j:WARN Please initialize the log4j system properly.
>
> > > > Do I need to configure log4j in ord

[Lift] Re: URL in PlainMailBodyType to BlackBerry

2009-11-12 Thread Derek Chen-Becker
I would like to see an integrated dumbster test. You can pick an arbitrary
port to run the test on just by attempting to bind and iterating until you
succeed. Something (roughly) like this:

def openSmtpServer (startPort : Int, endPort : Int) : (Int,SimpleSmtpServer)
= {
  var port = startPort
  var server : SimpleSmtpServer = null

  while (port <= endPort && (server eq null)) {
try {
  server = SimpleSmtpServer.start(port)
} catch {
  case _ => port += 1
}
  }
  return (port,server)
}

Then you can configure Lift's mailer to send to that port on localhost and
go from there.

Derek

On Fri, Nov 6, 2009 at 11:54 AM, Naftoli Gugenheim wrote:

> Can someone confirm or give other feedback? Are my tests good?
> http://reviewboard.liftweb.net/r/83/
>
>
>
> On Wed, Nov 4, 2009 at 8:45 PM, Naftoli Gugenheim wrote:
>
>> Okay. Unit test are now on Review Board too (and they pass).
>> I'm hoping someone will be able to confirm my work so that my client, a
>> medical assistance volunteer-based charity organization, will have email
>> working properly along with the rest of Lift's great features, so that the
>> volunteer dispatchers will be able to click the links and help sick people.
>>
>>
>> On Wed, Nov 4, 2009 at 2:04 AM, Naftoli Gugenheim 
>> wrote:
>>
>>> I thought of a smarter way to test it. Please tell me if you have any
>>> objections.
>>> I noticed that some of the specs extend the class they test. The idea is
>>> to refactor the call to actually send the email into an outside method.
>>> Then, after making some private members of Mailer protected, the spec can
>>> override the behavior of the method that sends it, to instead check the
>>> message object.
>>> This has the advantages of not adding another dependency to Lift, or
>>> relying on a given port being available to run an SMTP server on whoever
>>> builds Lift's computer.
>>>
>>> -
>>> David Pollak wrote:
>>>
>>> On Tue, Nov 3, 2009 at 3:00 PM, Naftoli Gugenheim >> >wrote:
>>>
>>> >
>>> > I verified locally via dumbster that the content type is test/plain;
>>> > charset=us-ascii for a single PlainMailBodyType. For two, or an
>>> > XHTMLMailBodyType, it's multipart/alternative.
>>> > Do I still need to contribute a test to Lift?
>>> >
>>>
>>> Yes.  This is the last time I will state this criteria or otherwise
>>> engage
>>> on this subject.
>>>
>>>
>>> >
>>> > -
>>> > David Pollak wrote:
>>> >
>>> > On Tue, Nov 3, 2009 at 1:47 PM, Naftoli Gugenheim <
>>> naftoli...@gmail.com
>>> > >wrote:
>>> >
>>> > >
>>> > > Wait a minute. You want me to test that my change works--that simple
>>> > > messages are not multipart--or that other messages still are
>>> multipart?
>>> >
>>> >
>>> > Both.
>>> >
>>> > Test that mail sent as plain text is not multipart and that all other
>>> mail
>>> > is multipart and that all the mail actually makes it through the
>>> system.
>>> > It's 2 or 3 tests.
>>> >
>>> > Why am I imposing this burden on you?  Almost every site that uses Lift
>>> > uses
>>> > the Mailer.  I have given my cell phone number to some of these sites
>>> with
>>> > the message "I stand behind Lift... if you're experiencing a problem,
>>> > please
>>> > call me any time day or night."   So, I'm on the hook if something goes
>>> > wrong.  My gut says, "there could be more problems with this apparently
>>> > simple change than meet the eye," so I'm asking you to write the tests.
>>> >
>>> >
>>> >
>>> >
>>> > > Or something else?
>>> > >
>>> > > -
>>> > > David Pollak wrote:
>>> > >
>>> > > On Tue, Nov 3, 2009 at 1:30 PM, Naftoli Gugenheim <
>>> naftoli...@gmail.com
>>> > > >wrote:
>>> > >
>>> > > > I asked you how to write one. I have no clue how to unit test
>>> email, or
>>> > > > what content type an email is. And the test has to not fail on
>>> > computers
>>> > > > that don't have an SMTP server, I presume?
>>> > >
>>> > >
>>> > > I don't know how to write tests against mailers, but you're the one
>>> that
>>> > > made a change, so you have to figure out how to test it.  I know no
>>> more
>>> > > about testing mailers than you do, so it's one of us that has to do
>>> the
>>> > > work.
>>> > >
>>> > >
>>> > > > As I mentioned on review board, I did test it manually though and
>>> it
>>> > > works
>>> > > > fine. Do most commits include a unit test?
>>> > > >
>>> > >
>>> > > If this change breaks the mailer, the break impacts lots and lots of
>>> > > people.  The mailer code has been stable and untouched for a long
>>> time
>>> > > (except for the change to LiftActors).  So, my criteria for accepting
>>> > this
>>> > > change is to have a test associated with it.
>>> > >
>>> > >
>>> > > >
>>> > > >
>>> > > > On Tue, Nov 3, 2009 at 4:18 PM, David Pollak <
>>> > > > feeder.of.the.be...@gmail.com> wrote:
>>> > > >
>>> > > >>
>>> > > >>
>>> > > >> On Tue, Nov 3, 2009 at 1:08 PM, Naftoli Gugenheim <
>>> > naftoli...@gmail.com
>>> > 

[Lift] Re: How do you set disabled/readonly attributes from a snippet?

2009-11-12 Thread Jim Barrows
I'm importing HttpHelpers, and the implicit is not there.
Did this change for M7?

On Mon, Nov 9, 2009 at 6:41 PM, Ross Mellgren  wrote:

>
> Use None (Option) or Empty (Box) as the value of the attribute -- this
> will cause the pairToUnprefixed implicit that is being used inside
> SHtml to not generate an attribute.
>
> e.g.:
>
> val disableAttr: Box[String] = if (disableAll) Full("disabled") else
> Empty
>
> bind("person", xhtml,
>  ...
>   "firstName" -> SHtml.text(person.firstName, person.firstName =
> _, "id" -> "firstName", "disabled" -> disableAttr),
>  ...)
>
> -Ross
>
>
> On Nov 9, 2009, at 6:51 PM, Jim Barrows wrote:
>
> > I found this answer on nabble but it's regarding setting the values
> > client side.  I want to set them in the snippet, depending on data.
> > This doesn't work, but will give you a better idea of what I'm
> > trying to do:
> >  def bindPerson(xhtml: NodeSeq, action: () => Unit,
> > submitButtonName: String, disableAll: boolean): NodeSeq = {
> > // Hold a val here so that the "id" closure holds it when we re-
> > enter this method
> > val currentId = person.id
> > val disableString :String = disableAll match {
> >   case true => "disabled"
> >   case false => ""
> > }
> > bind("person", xhtml,
> >   "id" -> SHtml.hidden(() => person.id = currentId),
> >   //  "version" -> SHtml.hidden(() => person.version),
> >   "firstName" -> SHtml.text(person.firstName, person.firstName =
> > _, "id" -> "firstName", "disabled" -> disableString),
> >   "middleName" -> SHtml.text(person.middleName,
> > person.middleName = _, "id" -> "middleName", "disabled" ->
> > disableString),
> >   "lastName" -> SHtml.text(person.lastName, person.lastName = _,
> > "id" -> "lastName", "disabled" -> disableString),
> >   "submit" -> SHtml.submit(?(submitButtonName), action))
> >   }
> >
> > --
> > James A Barrows
> >
> >
> > >
>
>
> >
>


-- 
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: problems with tomcat

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 11:36 AM, DavidV  wrote:

>
> I don't appear to have any conflicting jars in my TOMCAT_HOME/common/
> lib folder, however, I am now realizing that I have a postgres
> jdbc3 .jar file in there and I am using a jdbc4 .jar postres file in
> my webapp.  Perhaps that is the problem?  I'll check that out.
>
> I am using Lift 1.0.1 with Scala version 2.7.5
>

Please use Lift 1.0.2

Please delete ~/.m2 (or whereever your Maven repository is)

Please do a "mvn clean install"

Then test locally (mvn tomcat:run)  If it works, copy to your other Tomcat
instance and see how things work.


> It does work with the tomcat on my computer, which leads me to believe
> that it should be compatible with the current versions of Lift/Scala
> that I'm using.  Maybe that's an incorrect assumption though, as I'm
> not very familiar with tomcat.
>
> On Nov 12, 2:15 pm, David Pollak 
> wrote:
> > What version of Lift are you using?
> >
> > If it's Lift 1.1-M7 or 1.1-SNAPSHOT, please make sure you've got the
> Scala
> > version set to 2.7.7
> >
> > If you're using Eclipse for development, please make sure to do a mvn
> *clean
> > * package to build your WAR file.  The clean phase is super important.
> >
> >
> >
> > On Thu, Nov 12, 2009 at 11:07 AM, DavidV 
> wrote:
> >
> > > I am having some issues deploying my Lift web application to a tomcat
> > > server.
> > > When I run tomcat through maven (mvn tomcat:run), the web application
> > > works properly and connects to my postgres database.  However, when I
> > > use mvn package to create a war file which I then deploy to a local
> > > tomcat server (on my computer) only the HTML of the web application
> > > appears and the snippets with the application's content fail.  It
> > > appears to be a problem with the sitemap loading properly, because I
> > > changed the sitemap by deleting one of many Loc.If parameters and the
> > > web application then worked as expected.  However, when I then tried
> > > to deploy the same .war file to a tomcat server on a different
> > > computer, the web app failed again, showing only the HTML and not the
> > > snippets.  I suspect that perhaps this is because I need to change my
> > > url to the postgres database, but I've tried many permutations of the
> > > url and none seem to work.
> > > To make things worse, the logging doesn't seem to be working properly
> > > making it difficult to diagnose the exact problem.  I can't locate a
> > > stdout.log file anywhere.  In my catalina.out file I get the following
> > > error:
> >
> > > java.lang.NullPointerException
> > >at scala.runtime.BoxesRunTime.boxToInteger(Unknown Source)
> > >at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
> > > (Actor.scala:800)
> > >at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
> > > (Actor.scala:794)
> > >at scala.actors.Reaction.run(Reaction.scala:82)
> > >at net.liftweb.http.ActorSchedulerFixer$$anon$1$$anon$3.run
> > > (LiftServlet.scala:673)
> > >at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
> > > (ThreadPoolExecutor.java:650)
> > >at java.util.concurrent.ThreadPoolExecutor$Worker.run
> > > (ThreadPoolExecutor.java:675)
> > >at java.lang.Thread.run(Thread.java:595)
> >
> > > I also get an error that says:
> > > log4j:WARN Please initialize the log4j system properly.
> >
> > > Do I need to configure log4j in order to get the stdout.log file?
> >
> > > Any ideas of what might be going on here?
> >
> > > Thanks,
> > > David
> >
> > --
> > 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
-~--~~~~--~~--~--~---



[Lift] Re: New Milestone coming soon

2009-11-12 Thread Hannes
Hi David,

I wrote you a message about the "CometActor received shutdown" thing. 
I'm almost sure, that this is related to M7, but I've no idea, why or what.

kind regards
Tobias
> Folks,
>
> There are two critical issues with M7:
>
> * Issue 164 http://github.com/dpp/liftweb/issues#issue/164
>JSON/Ajax messages do not carry Notices back to the client.
> * The Session manager is not initialized properly.  Basically,
>   this means that sessions will be expired by the web container,
>   but not by Lift and GUIDs that map to functions on the server
>   side are not removed until the session is terminated.
>
> We're planning to do an M7.1 release later this week (probably Friday).
>
> If there are other *critical* defects (stuff that means you can't use 
> M7 in production), please speak now.
>
> Thanks,
>
> David
>
> -- 
> 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
-~--~~~~--~~--~--~---



[Lift] Re: problems with tomcat

2009-11-12 Thread DavidV

I don't appear to have any conflicting jars in my TOMCAT_HOME/common/
lib folder, however, I am now realizing that I have a postgres
jdbc3 .jar file in there and I am using a jdbc4 .jar postres file in
my webapp.  Perhaps that is the problem?  I'll check that out.

I am using Lift 1.0.1 with Scala version 2.7.5
It does work with the tomcat on my computer, which leads me to believe
that it should be compatible with the current versions of Lift/Scala
that I'm using.  Maybe that's an incorrect assumption though, as I'm
not very familiar with tomcat.

On Nov 12, 2:15 pm, David Pollak 
wrote:
> What version of Lift are you using?
>
> If it's Lift 1.1-M7 or 1.1-SNAPSHOT, please make sure you've got the Scala
> version set to 2.7.7
>
> If you're using Eclipse for development, please make sure to do a mvn *clean
> * package to build your WAR file.  The clean phase is super important.
>
>
>
> On Thu, Nov 12, 2009 at 11:07 AM, DavidV  wrote:
>
> > I am having some issues deploying my Lift web application to a tomcat
> > server.
> > When I run tomcat through maven (mvn tomcat:run), the web application
> > works properly and connects to my postgres database.  However, when I
> > use mvn package to create a war file which I then deploy to a local
> > tomcat server (on my computer) only the HTML of the web application
> > appears and the snippets with the application's content fail.  It
> > appears to be a problem with the sitemap loading properly, because I
> > changed the sitemap by deleting one of many Loc.If parameters and the
> > web application then worked as expected.  However, when I then tried
> > to deploy the same .war file to a tomcat server on a different
> > computer, the web app failed again, showing only the HTML and not the
> > snippets.  I suspect that perhaps this is because I need to change my
> > url to the postgres database, but I've tried many permutations of the
> > url and none seem to work.
> > To make things worse, the logging doesn't seem to be working properly
> > making it difficult to diagnose the exact problem.  I can't locate a
> > stdout.log file anywhere.  In my catalina.out file I get the following
> > error:
>
> > java.lang.NullPointerException
> >        at scala.runtime.BoxesRunTime.boxToInteger(Unknown Source)
> >        at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
> > (Actor.scala:800)
> >        at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
> > (Actor.scala:794)
> >        at scala.actors.Reaction.run(Reaction.scala:82)
> >        at net.liftweb.http.ActorSchedulerFixer$$anon$1$$anon$3.run
> > (LiftServlet.scala:673)
> >        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
> > (ThreadPoolExecutor.java:650)
> >        at java.util.concurrent.ThreadPoolExecutor$Worker.run
> > (ThreadPoolExecutor.java:675)
> >        at java.lang.Thread.run(Thread.java:595)
>
> > I also get an error that says:
> > log4j:WARN Please initialize the log4j system properly.
>
> > Do I need to configure log4j in order to get the stdout.log file?
>
> > Any ideas of what might be going on here?
>
> > Thanks,
> > David
>
> --
> 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
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift under 2.8 timeframe ?

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 11:16 AM, Wilson MacGyver wrote:

>
> You feel this confident about Scala 2.8 release by Jan?
>

Maybe Scala 2.8 gets pushed back a little and we push Lift 1.1 back a
little.

If Scala 2.8 beta (which is coming very soon) is a complete disaster (I give
this a < 10% probability), yeah we'll re-think things.  But in any case,
there will be a 2.8 tracking branch of Lift.


>
> I'm curious because Scala 2.8 schedule seem to be
> a fairly moving target.
>
> On Thu, Nov 12, 2009 at 2:13 PM, David Pollak
>  wrote:
> >
> > We are *very* serious and *VERY* (lots of emphasis) committed to Scala
> 2.8.
> > I'm expecting that Lift 1.1 ships (currently plans for early Jan) as
> Scala
> > 2.8 only or as two flavors (2.7.x and 2.8)
>
>
> --
> Omnem crede diem tibi diluxisse supremum.
>
> >
>


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



[Lift] Re: problems with tomcat

2009-11-12 Thread David Pollak
What version of Lift are you using?

If it's Lift 1.1-M7 or 1.1-SNAPSHOT, please make sure you've got the Scala
version set to 2.7.7

If you're using Eclipse for development, please make sure to do a mvn *clean
* package to build your WAR file.  The clean phase is super important.

On Thu, Nov 12, 2009 at 11:07 AM, DavidV  wrote:

>
> I am having some issues deploying my Lift web application to a tomcat
> server.
> When I run tomcat through maven (mvn tomcat:run), the web application
> works properly and connects to my postgres database.  However, when I
> use mvn package to create a war file which I then deploy to a local
> tomcat server (on my computer) only the HTML of the web application
> appears and the snippets with the application's content fail.  It
> appears to be a problem with the sitemap loading properly, because I
> changed the sitemap by deleting one of many Loc.If parameters and the
> web application then worked as expected.  However, when I then tried
> to deploy the same .war file to a tomcat server on a different
> computer, the web app failed again, showing only the HTML and not the
> snippets.  I suspect that perhaps this is because I need to change my
> url to the postgres database, but I've tried many permutations of the
> url and none seem to work.
> To make things worse, the logging doesn't seem to be working properly
> making it difficult to diagnose the exact problem.  I can't locate a
> stdout.log file anywhere.  In my catalina.out file I get the following
> error:
>
> java.lang.NullPointerException
>at scala.runtime.BoxesRunTime.boxToInteger(Unknown Source)
>at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
> (Actor.scala:800)
>at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
> (Actor.scala:794)
>at scala.actors.Reaction.run(Reaction.scala:82)
>at net.liftweb.http.ActorSchedulerFixer$$anon$1$$anon$3.run
> (LiftServlet.scala:673)
>at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
> (ThreadPoolExecutor.java:650)
>at java.util.concurrent.ThreadPoolExecutor$Worker.run
> (ThreadPoolExecutor.java:675)
>at java.lang.Thread.run(Thread.java:595)
>
> I also get an error that says:
> log4j:WARN Please initialize the log4j system properly.
>
> Do I need to configure log4j in order to get the stdout.log file?
>
> Any ideas of what might be going on here?
>
> Thanks,
> David
> >
>


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



[Lift] Re: problems with tomcat

2009-11-12 Thread ben

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



[Lift] Re: Lift under 2.8 timeframe ?

2009-11-12 Thread Timothy Perrett

Its been a moving target since June ;-) Its gotta stop sometime, right? 

Cheers, Tim

On 12 Nov 2009, at 19:16, Wilson MacGyver wrote:

> 
> You feel this confident about Scala 2.8 release by Jan?
> 
> I'm curious because Scala 2.8 schedule seem to be
> a fairly moving target.
> 
> On Thu, Nov 12, 2009 at 2:13 PM, David Pollak
>  wrote:
>> 
>> We are *very* serious and *VERY* (lots of emphasis) committed to Scala 2.8.
>> I'm expecting that Lift 1.1 ships (currently plans for early Jan) as Scala
>> 2.8 only or as two flavors (2.7.x and 2.8)
> 
> 
> -- 
> Omnem crede diem tibi diluxisse supremum.
> 
> > 
> 


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



[Lift] Re: Lift under 2.8 timeframe ?

2009-11-12 Thread Wilson MacGyver

You feel this confident about Scala 2.8 release by Jan?

I'm curious because Scala 2.8 schedule seem to be
a fairly moving target.

On Thu, Nov 12, 2009 at 2:13 PM, David Pollak
 wrote:
>
> We are *very* serious and *VERY* (lots of emphasis) committed to Scala 2.8.
> I'm expecting that Lift 1.1 ships (currently plans for early Jan) as Scala
> 2.8 only or as two flavors (2.7.x and 2.8)


-- 
Omnem crede diem tibi diluxisse supremum.

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



[Lift] Re: Lift under 2.8 timeframe ?

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 10:37 AM, Francois Armand  wrote:

>
> Hello guys,
>
> I'm on the process of choosing a web framework for one of my (scala 2.8)
> project. I know Tapestry 5, but as we are likely to have a lot of AJAX
> to deal with, and T5 is not the best tool for that. I looked at gwt, but
> I'm not sure I like what I'm seeing.
>
> So, Lift could be a great option, but as I said, the project is in Scala
> 2.8, and so I would need to now if a time frame is broadly known for
> Lift port to that version.
> My problem is that I need to be able to start developping the web ui as
> soon as possible (I'm quite under pressure for that), even if it means
> living with a beta version of Lift for the next 3 months (or more).
>
> So, my question is: does a branch for Lift with Scala 2.8 is expected
> pretty soon (even if the final comes only in months, it's obvious that
> it will be after Scala 2.8 final, and we do know that it is not yet
> here), or does that seem pretty unlikely ?
>

I'm going to get the "in earnest" Lift -> 2.8 port rolling tomorrow.
Hopefully, I'll have a branch that tracks the current Lift code running by
mid next week.

We are *very* serious and *VERY* (lots of emphasis) committed to Scala 2.8.
I'm expecting that Lift 1.1 ships (currently plans for early Jan) as Scala
2.8 only or as two flavors (2.7.x and 2.8)


>
> Thanks in advance for the help,
>
> --
> Francois Armand
> http://fanf42.blogspot.com
>
> >
>


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



[Lift] problems with tomcat

2009-11-12 Thread DavidV

I am having some issues deploying my Lift web application to a tomcat
server.
When I run tomcat through maven (mvn tomcat:run), the web application
works properly and connects to my postgres database.  However, when I
use mvn package to create a war file which I then deploy to a local
tomcat server (on my computer) only the HTML of the web application
appears and the snippets with the application's content fail.  It
appears to be a problem with the sitemap loading properly, because I
changed the sitemap by deleting one of many Loc.If parameters and the
web application then worked as expected.  However, when I then tried
to deploy the same .war file to a tomcat server on a different
computer, the web app failed again, showing only the HTML and not the
snippets.  I suspect that perhaps this is because I need to change my
url to the postgres database, but I've tried many permutations of the
url and none seem to work.
To make things worse, the logging doesn't seem to be working properly
making it difficult to diagnose the exact problem.  I can't locate a
stdout.log file anywhere.  In my catalina.out file I get the following
error:

java.lang.NullPointerException
at scala.runtime.BoxesRunTime.boxToInteger(Unknown Source)
at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
(Actor.scala:800)
at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
(Actor.scala:794)
at scala.actors.Reaction.run(Reaction.scala:82)
at net.liftweb.http.ActorSchedulerFixer$$anon$1$$anon$3.run
(LiftServlet.scala:673)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

I also get an error that says:
log4j:WARN Please initialize the log4j system properly.

Do I need to configure log4j in order to get the stdout.log file?

Any ideas of what might be going on here?

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



[Lift] Re: Lift under 2.8 timeframe ?

2009-11-12 Thread Timothy Perrett

DPP has a local branch running a crippled version of lift that builds with 2.8

Is there any reason you could not work with 2.7.7 for your dev - it would get 
you most of the way there until 2.8 is released. 

Cheers, Tim

On 12 Nov 2009, at 18:37, Francois Armand wrote:

> 
> Hello guys,
> 
> I'm on the process of choosing a web framework for one of my (scala 2.8) 
> project. I know Tapestry 5, but as we are likely to have a lot of AJAX 
> to deal with, and T5 is not the best tool for that. I looked at gwt, but 
> I'm not sure I like what I'm seeing.
> 
> So, Lift could be a great option, but as I said, the project is in Scala 
> 2.8, and so I would need to now if a time frame is broadly known for 
> Lift port to that version.
> My problem is that I need to be able to start developping the web ui as 
> soon as possible (I'm quite under pressure for that), even if it means 
> living with a beta version of Lift for the next 3 months (or more).
> 
> So, my question is: does a branch for Lift with Scala 2.8 is expected 
> pretty soon (even if the final comes only in months, it's obvious that 
> it will be after Scala 2.8 final, and we do know that it is not yet 
> here), or does that seem pretty unlikely ?
> 
> Thanks in advance for the help,
> 
> -- 
> Francois Armand
> http://fanf42.blogspot.com
> 
> > 
> 


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



[Lift] Lift under 2.8 timeframe ?

2009-11-12 Thread Francois Armand

Hello guys,

I'm on the process of choosing a web framework for one of my (scala 2.8) 
project. I know Tapestry 5, but as we are likely to have a lot of AJAX 
to deal with, and T5 is not the best tool for that. I looked at gwt, but 
I'm not sure I like what I'm seeing.

So, Lift could be a great option, but as I said, the project is in Scala 
2.8, and so I would need to now if a time frame is broadly known for 
Lift port to that version.
My problem is that I need to be able to start developping the web ui as 
soon as possible (I'm quite under pressure for that), even if it means 
living with a beta version of Lift for the next 3 months (or more).

So, my question is: does a branch for Lift with Scala 2.8 is expected 
pretty soon (even if the final comes only in months, it's obvious that 
it will be after Scala 2.8 final, and we do know that it is not yet 
here), or does that seem pretty unlikely ?

Thanks in advance for the help,

-- 
Francois Armand
http://fanf42.blogspot.com

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



[Lift] Re: ManyToMany decision

2009-11-12 Thread Naftoli Gugenheim

Interesting. Did you see mapper.view.ItemsList?

-
glenn wrote:


There is a related issue that if implemented, would certainly make the
Mapper framework more robust - that of marking table rows for
deletion,
rather than deleting them directly.  Some RDBMS's have a built-in
marking
function, and another function that actually removes rows that have
been
so marked.

Glenn

On Nov 12, 8:35 am, glenn  wrote:
> Naftoli,
>
> Isn't this really a cascading delete issue and not one isolated to
> ManyToMany situations? Most ORM solutions allow for cascading deletes.
> Such a feature could be added to the Mapper class, itself, and hold a
> list of foreign key assignments that the delete function could iterate
> over, if turned on.
>
> Glenn
>
> On Nov 11, 9:31 am, Naftoli Gugenheim  wrote:
>
>
>
>
>
> > To clarify: The fundamental purpose of ManyToMany, like OneToMany, is that 
> > rather than dealing with "children" of an entity as they are in the 
> > database at a given moment, instead, they should have similar semantics to 
> > a MappedField: You load it from the database, modify it to your hearts 
> > content, and then decide whether you want to save it or not. For example, 
> > calling set() on a MappedField does not write immediately to the database, 
> > and it's a good thing too--imagine a multi-page form where you can go back 
> > and forth to different screens, or a single page form that uses submit 
> > buttons that perform some action but you stay on the same page. You don't 
> > want the user's changes to go the database unless he clicks "Save." So too, 
> > one often wants to edit a list on one screen. There should be submit 
> > buttons to add records, etc., but if you don't click save it shouldn't go 
> > to the database.
> > So MappedOneToMany and MappedManyToMany act as collections, internally 
> > keeping track of which records were inserted or removed, but not performing 
> > a create or delete until the "field" is saved. So in other words they act 
> > as multi-valued fields.
> > There are two ways MappedManyToMany can do this. It can hold a list of join 
> > table records, or child table records. Either way it will have to look up 
> > the other at times.
> > Now in order for saves and deletes on the ManyToMany Mapper to be 
> > propagated to the MappedManyToMany fields, it has to have a list of them. 
> > The list only gets populated when code references the field, causing it to 
> > be initialized and add itself to the list of m-n fields.
> > So we make all of these proposed changes?
>
> > -
>
> > Jim Barrows wrote:
>
> > On Tue, Nov 10, 2009 at 2:16 PM, Naftoli Gugenheim 
> > wrote:
>
> > > Hello.
> > > When I wrote ManyToMany a couple of months ago, I designed it to 
> > > internally
> > > hold a collection of join table records, and to act as a collection of
> > > elements of the child table.
> > > For example, given Volunteer and VolunteerGroup where volunteers can be in
> > > multiple groups, Volunteer.volunteerGroups implements a collection of
> > > VolunteerGroups, but internally it's actually managing a collection of
> > > VolunteerVolunteerGroups (the join table).
>
> > I don't think you really need to maintain the pivot table list
> > (VolunteerVolunteerGroups) at all.  If you maintain the Many-to-Many as part
> > of the object, and use a standard naming convention then you don't really
> > need this extra list running around.  You can still build the SQL correctly
> > knowing only the objects involved.
>
> > > The current implementation throws an error (Predef.error) when it tries to
> > > get the child element via the join record and it doesn't exist. Thus any
> > > page accessing corrupted data will not display if the error is not 
> > > caught. I
> > > plan, G-d willing, to change the implementation to silently skip such
> > > records.
> > > But the occurrence that reminded me of the defect also brought another
> > > point to my attention. To my knowledge Lift's schemifier does not 
> > > correctly
> > > generate foreign key constraints for all databases (at least not at the
> > > point in time it schemified my H2 database... :) ) so we need a way for
> > > ManyToMany to keep things in sync. ManyToMany helps, to an extent, because
> > > when its MappedManyToMany members are initialized, it puts them in a list,
> > > and it propagates saves and deletes. So if you have a ManyToMany Mapper
> > > instance that contains a MappedManyToMany that has been initialized, and 
> > > you
> > > call delete_! on the Mapper, it will delete all the associated join table
> > > entries. But it's not enough.
>
> > >    1. That can only happen if both sides of the relationship use
> > >    MappedManyToMany. Is there some way to enforce this? I was thinking of 
> > > using
> > >    a combination of (a) requiring the foreign MetaMapper to extends 
> > > ManyToMany,
> > >    and (b) when a MappedManyToMany is initialized, it shou

[Lift] Re: ManyToMany decision

2009-11-12 Thread Naftoli Gugenheim

I guess it's about two separate things: cascading delete, as you said; and that 
it should silently skip dead-end joins rather than throwing an error. Note that 
I'm not aware of an issue with OneToMany cascading deletes (although in order 
to tell it to, you have to mix in Cascade).
What we have is three possible ways to support cascading deletes.
 1. Schemifier should tell the database to cascade deletes. This doesn't seem 
to be fully implemented, and anyway wouldn't help for MySQL MyISAM tables.
 2. As you suggest, implement it on the Mapper level. That means that a given 
MetaMapper must know about what other foreign keys in other mappers link to it. 
It could be implemented as follows: MetaMapper will contain a list of say 
MappedForeignKeys to notify when it's deleted (or PK edited). Then you can mix 
in a trait to the MappedForeignKey like "CascadeDelete" or "CascadeSetNull." 
Either the MappedForeignKey or its MetaMapper would have to add it to the PK's 
MetaMapper's list. Then when the PK Mapper is deleted, it should delegate to 
the FK to perform some action. I like this approach. It would require the join 
table FKs to implement the traits, but would take some responsibility of 
ManyToMany's shoulders, obviating the need to require bothe sides to use it.
 3. My approach.



-
glenn wrote:


Naftoli,

Isn't this really a cascading delete issue and not one isolated to
ManyToMany situations? Most ORM solutions allow for cascading deletes.
Such a feature could be added to the Mapper class, itself, and hold a
list of foreign key assignments that the delete function could iterate
over, if turned on.

Glenn

On Nov 11, 9:31 am, Naftoli Gugenheim  wrote:
> To clarify: The fundamental purpose of ManyToMany, like OneToMany, is that 
> rather than dealing with "children" of an entity as they are in the database 
> at a given moment, instead, they should have similar semantics to a 
> MappedField: You load it from the database, modify it to your hearts content, 
> and then decide whether you want to save it or not. For example, calling 
> set() on a MappedField does not write immediately to the database, and it's a 
> good thing too--imagine a multi-page form where you can go back and forth to 
> different screens, or a single page form that uses submit buttons that 
> perform some action but you stay on the same page. You don't want the user's 
> changes to go the database unless he clicks "Save." So too, one often wants 
> to edit a list on one screen. There should be submit buttons to add records, 
> etc., but if you don't click save it shouldn't go to the database.
> So MappedOneToMany and MappedManyToMany act as collections, internally 
> keeping track of which records were inserted or removed, but not performing a 
> create or delete until the "field" is saved. So in other words they act as 
> multi-valued fields.
> There are two ways MappedManyToMany can do this. It can hold a list of join 
> table records, or child table records. Either way it will have to look up the 
> other at times.
> Now in order for saves and deletes on the ManyToMany Mapper to be propagated 
> to the MappedManyToMany fields, it has to have a list of them. The list only 
> gets populated when code references the field, causing it to be initialized 
> and add itself to the list of m-n fields.
> So we make all of these proposed changes?
>
> -
>
> Jim Barrows wrote:
>
> On Tue, Nov 10, 2009 at 2:16 PM, Naftoli Gugenheim 
> wrote:
>
> > Hello.
> > When I wrote ManyToMany a couple of months ago, I designed it to internally
> > hold a collection of join table records, and to act as a collection of
> > elements of the child table.
> > For example, given Volunteer and VolunteerGroup where volunteers can be in
> > multiple groups, Volunteer.volunteerGroups implements a collection of
> > VolunteerGroups, but internally it's actually managing a collection of
> > VolunteerVolunteerGroups (the join table).
>
> I don't think you really need to maintain the pivot table list
> (VolunteerVolunteerGroups) at all.  If you maintain the Many-to-Many as part
> of the object, and use a standard naming convention then you don't really
> need this extra list running around.  You can still build the SQL correctly
> knowing only the objects involved.
>
>
>
> > The current implementation throws an error (Predef.error) when it tries to
> > get the child element via the join record and it doesn't exist. Thus any
> > page accessing corrupted data will not display if the error is not caught. I
> > plan, G-d willing, to change the implementation to silently skip such
> > records.
> > But the occurrence that reminded me of the defect also brought another
> > point to my attention. To my knowledge Lift's schemifier does not correctly
> > generate foreign key constraints for all databases (at least not at the
> > point in time it schemified my H2 database... :) ) so we need a way for
> > M

[Lift] Re: ManyToMany decision

2009-11-12 Thread glenn

There is a related issue that if implemented, would certainly make the
Mapper framework more robust - that of marking table rows for
deletion,
rather than deleting them directly.  Some RDBMS's have a built-in
marking
function, and another function that actually removes rows that have
been
so marked.

Glenn

On Nov 12, 8:35 am, glenn  wrote:
> Naftoli,
>
> Isn't this really a cascading delete issue and not one isolated to
> ManyToMany situations? Most ORM solutions allow for cascading deletes.
> Such a feature could be added to the Mapper class, itself, and hold a
> list of foreign key assignments that the delete function could iterate
> over, if turned on.
>
> Glenn
>
> On Nov 11, 9:31 am, Naftoli Gugenheim  wrote:
>
>
>
>
>
> > To clarify: The fundamental purpose of ManyToMany, like OneToMany, is that 
> > rather than dealing with "children" of an entity as they are in the 
> > database at a given moment, instead, they should have similar semantics to 
> > a MappedField: You load it from the database, modify it to your hearts 
> > content, and then decide whether you want to save it or not. For example, 
> > calling set() on a MappedField does not write immediately to the database, 
> > and it's a good thing too--imagine a multi-page form where you can go back 
> > and forth to different screens, or a single page form that uses submit 
> > buttons that perform some action but you stay on the same page. You don't 
> > want the user's changes to go the database unless he clicks "Save." So too, 
> > one often wants to edit a list on one screen. There should be submit 
> > buttons to add records, etc., but if you don't click save it shouldn't go 
> > to the database.
> > So MappedOneToMany and MappedManyToMany act as collections, internally 
> > keeping track of which records were inserted or removed, but not performing 
> > a create or delete until the "field" is saved. So in other words they act 
> > as multi-valued fields.
> > There are two ways MappedManyToMany can do this. It can hold a list of join 
> > table records, or child table records. Either way it will have to look up 
> > the other at times.
> > Now in order for saves and deletes on the ManyToMany Mapper to be 
> > propagated to the MappedManyToMany fields, it has to have a list of them. 
> > The list only gets populated when code references the field, causing it to 
> > be initialized and add itself to the list of m-n fields.
> > So we make all of these proposed changes?
>
> > -
>
> > Jim Barrows wrote:
>
> > On Tue, Nov 10, 2009 at 2:16 PM, Naftoli Gugenheim 
> > wrote:
>
> > > Hello.
> > > When I wrote ManyToMany a couple of months ago, I designed it to 
> > > internally
> > > hold a collection of join table records, and to act as a collection of
> > > elements of the child table.
> > > For example, given Volunteer and VolunteerGroup where volunteers can be in
> > > multiple groups, Volunteer.volunteerGroups implements a collection of
> > > VolunteerGroups, but internally it's actually managing a collection of
> > > VolunteerVolunteerGroups (the join table).
>
> > I don't think you really need to maintain the pivot table list
> > (VolunteerVolunteerGroups) at all.  If you maintain the Many-to-Many as part
> > of the object, and use a standard naming convention then you don't really
> > need this extra list running around.  You can still build the SQL correctly
> > knowing only the objects involved.
>
> > > The current implementation throws an error (Predef.error) when it tries to
> > > get the child element via the join record and it doesn't exist. Thus any
> > > page accessing corrupted data will not display if the error is not 
> > > caught. I
> > > plan, G-d willing, to change the implementation to silently skip such
> > > records.
> > > But the occurrence that reminded me of the defect also brought another
> > > point to my attention. To my knowledge Lift's schemifier does not 
> > > correctly
> > > generate foreign key constraints for all databases (at least not at the
> > > point in time it schemified my H2 database... :) ) so we need a way for
> > > ManyToMany to keep things in sync. ManyToMany helps, to an extent, because
> > > when its MappedManyToMany members are initialized, it puts them in a list,
> > > and it propagates saves and deletes. So if you have a ManyToMany Mapper
> > > instance that contains a MappedManyToMany that has been initialized, and 
> > > you
> > > call delete_! on the Mapper, it will delete all the associated join table
> > > entries. But it's not enough.
>
> > >    1. That can only happen if both sides of the relationship use
> > >    MappedManyToMany. Is there some way to enforce this? I was thinking of 
> > > using
> > >    a combination of (a) requiring the foreign MetaMapper to extends 
> > > ManyToMany,
> > >    and (b) when a MappedManyToMany is initialized, it should check that 
> > > the
> > >    foreign MetaMapper/ManyToMany actually contains a MappedManyToMany 

[Lift] Re: ManyToMany decision

2009-11-12 Thread glenn

Naftoli,

Isn't this really a cascading delete issue and not one isolated to
ManyToMany situations? Most ORM solutions allow for cascading deletes.
Such a feature could be added to the Mapper class, itself, and hold a
list of foreign key assignments that the delete function could iterate
over, if turned on.

Glenn

On Nov 11, 9:31 am, Naftoli Gugenheim  wrote:
> To clarify: The fundamental purpose of ManyToMany, like OneToMany, is that 
> rather than dealing with "children" of an entity as they are in the database 
> at a given moment, instead, they should have similar semantics to a 
> MappedField: You load it from the database, modify it to your hearts content, 
> and then decide whether you want to save it or not. For example, calling 
> set() on a MappedField does not write immediately to the database, and it's a 
> good thing too--imagine a multi-page form where you can go back and forth to 
> different screens, or a single page form that uses submit buttons that 
> perform some action but you stay on the same page. You don't want the user's 
> changes to go the database unless he clicks "Save." So too, one often wants 
> to edit a list on one screen. There should be submit buttons to add records, 
> etc., but if you don't click save it shouldn't go to the database.
> So MappedOneToMany and MappedManyToMany act as collections, internally 
> keeping track of which records were inserted or removed, but not performing a 
> create or delete until the "field" is saved. So in other words they act as 
> multi-valued fields.
> There are two ways MappedManyToMany can do this. It can hold a list of join 
> table records, or child table records. Either way it will have to look up the 
> other at times.
> Now in order for saves and deletes on the ManyToMany Mapper to be propagated 
> to the MappedManyToMany fields, it has to have a list of them. The list only 
> gets populated when code references the field, causing it to be initialized 
> and add itself to the list of m-n fields.
> So we make all of these proposed changes?
>
> -
>
> Jim Barrows wrote:
>
> On Tue, Nov 10, 2009 at 2:16 PM, Naftoli Gugenheim 
> wrote:
>
> > Hello.
> > When I wrote ManyToMany a couple of months ago, I designed it to internally
> > hold a collection of join table records, and to act as a collection of
> > elements of the child table.
> > For example, given Volunteer and VolunteerGroup where volunteers can be in
> > multiple groups, Volunteer.volunteerGroups implements a collection of
> > VolunteerGroups, but internally it's actually managing a collection of
> > VolunteerVolunteerGroups (the join table).
>
> I don't think you really need to maintain the pivot table list
> (VolunteerVolunteerGroups) at all.  If you maintain the Many-to-Many as part
> of the object, and use a standard naming convention then you don't really
> need this extra list running around.  You can still build the SQL correctly
> knowing only the objects involved.
>
>
>
> > The current implementation throws an error (Predef.error) when it tries to
> > get the child element via the join record and it doesn't exist. Thus any
> > page accessing corrupted data will not display if the error is not caught. I
> > plan, G-d willing, to change the implementation to silently skip such
> > records.
> > But the occurrence that reminded me of the defect also brought another
> > point to my attention. To my knowledge Lift's schemifier does not correctly
> > generate foreign key constraints for all databases (at least not at the
> > point in time it schemified my H2 database... :) ) so we need a way for
> > ManyToMany to keep things in sync. ManyToMany helps, to an extent, because
> > when its MappedManyToMany members are initialized, it puts them in a list,
> > and it propagates saves and deletes. So if you have a ManyToMany Mapper
> > instance that contains a MappedManyToMany that has been initialized, and you
> > call delete_! on the Mapper, it will delete all the associated join table
> > entries. But it's not enough.
>
> >    1. That can only happen if both sides of the relationship use
> >    MappedManyToMany. Is there some way to enforce this? I was thinking of 
> > using
> >    a combination of (a) requiring the foreign MetaMapper to extends 
> > ManyToMany,
> >    and (b) when a MappedManyToMany is initialized, it should check that the
> >    foreign MetaMapper/ManyToMany actually contains a MappedManyToMany 
> > referring
> >    to the current MappedManyToMany. (a) is not sufficient without (b), and 
> > (b)
> >    has the same problem as #2 below, that objects are lazy.
>
> I think you're right here.  Both sides have to have the mapping.. however I
> don't think there is a good clean way to detect this without a compiler
> plugin of some kind.
>
>
>
> >    1. There is a basic problem, which is that since objects are lazy, if
> >    you haven't referenced the MappedManyToMany field, delete_! will not be 
> > able
> >    to propagate

[Lift] Re: Changes to scala-tools.org Hudson

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 7:58 AM, Derek Chen-Becker wrote:

> Should I make these changes for the ScalaJPA project as well?


Yes.


> Do we need to notify all of the people who are hosting projects on
> scala-tools.org, or is everyone pretty much on this list?
>

I think Josh has been talking to folks.


>
> Derek
>
>
> On Fri, Nov 6, 2009 at 11:23 AM, Josh Suereth wrote:
>
>> Great, Thanks!
>>
>>
>> On Fri, Nov 6, 2009 at 11:23 AM, Indrajit Raychaudhuri <
>> indraj...@gmail.com> wrote:
>>
>>>
>>> Done. Hudson build triggered, we're good if no build fail mail comes in
>>> next half an hour.
>>>
>>> Cheers, Indrajit
>>>
>>> On 06/11/09 8:10 PM, Josh Suereth wrote:
>>> > Anytime soon would be good.  I"m leaving the other option open for now
>>> > (because there's a lot more work to fully disable) but I'm trying to
>>> > move all projects into a state where they won't break before that
>>> > change.   SO once you're done, I'll send out the email scheduling when
>>> > hudson is going into maintenance.
>>> >
>>> >
>>> > Thanks!
>>> > -Josh
>>> >
>>> > On Fri, Nov 6, 2009 at 2:11 AM, Indrajit Raychaudhuri
>>> > mailto:indraj...@gmail.com>> wrote:
>>> >
>>> >
>>> > Josh, thank you for driving us do the 'right thing' :)
>>> >
>>> > Hudson build would trigger when the pom.xml changes.
>>> > So do you want your fork (b9588f...) to be applied right away. Or
>>> do you
>>> > want us to wait for a pre-set time for the transition?
>>> >
>>> > Committers, do you insist a ticket/reviewboard for this. If yes,
>>> I'll do
>>> > the needful?
>>> >
>>> > Cheers, Indrajit
>>> >
>>> > On 06/11/09 6:28 AM, Josh Suereth wrote:
>>> >  > Scala-tools.org's Hudson server will no longer allow local
>>> > deployment to
>>> >  > the repository.  You *must* submit all snapshot/release
>>> artifacts
>>> >  > through the nexus webapp.   The hudson server will provide a
>>> > server id
>>> >  > (nexus.scala-tools.org 
>>> > ) that will have
>>> >  > appropriate (and appropriately hidden) credentials for nightly
>>> >  > deployments of snapshots.
>>> >  >
>>> >  > As such, the following changes should be made to lift's pom.xml
>>> (I'm
>>> >  > trying to update your hudson lift configuration to cause the
>>> least
>>> >  > amount of disruption):
>>> >  >
>>> >  > I have a forked repo (jsuereth/liftweb) with the changes as well
>>> > (if you
>>> >  > want to use github's "fork queue" feature):
>>> >  >
>>> >  > --- a/pom.xml
>>> >  > +++ b/pom.xml
>>> >  > @@ -806,16 +806,16 @@
>>> >  > hudson
>>> >  > 
>>> >  > 
>>> >  > - hudson.scala-tools.org 
>>> > 
>>> >  > - file:///home/scala-tools.org/www/repo-snapshots
>>> > 
>>> >  > 
>>> >  > + nexus.scala-tools.org 
>>> > 
>>> >  > +
>>> > http://nexus.scala-tools.org/content/repositories/releases
>>> 
>>> >  > 
>>> >  > 
>>> >  > - hudson.scala-tools.org 
>>> > 
>>> >  > - file:///home/scala-tools.org/www/repo-snapshots
>>> > 
>>> >  > 
>>> >  > + nexus.scala-tools.org 
>>> > 
>>> >  > +
>>> > http://nexus.scala-tools.org/content/repositories/snapshots
>>> 
>>> >  > false
>>> >  > 
>>> >  > 
>>> >  > - hudson.scala-tools.org 
>>> > 
>>> >  > + nexus.scala-tools.org 
>>> > 
>>> >  > file:///home/
>>> scala-tools.org/www/mvnsites-snapshots/liftweb
>>> > 
>>> >  > 
>>> >  > 
>>> >  > 
>>> >  >
>>> >  >
>>> >  > >
>>> >
>>> >
>>> >
>>> >
>>> > >
>>>
>>>
>>>
>>
>>
>>
>
> >
>


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



[Lift] Re: Changes to scala-tools.org Hudson

2009-11-12 Thread Derek Chen-Becker
Should I make these changes for the ScalaJPA project as well? Do we need to
notify all of the people who are hosting projects on scala-tools.org, or is
everyone pretty much on this list?

Derek

On Fri, Nov 6, 2009 at 11:23 AM, Josh Suereth wrote:

> Great, Thanks!
>
>
> On Fri, Nov 6, 2009 at 11:23 AM, Indrajit Raychaudhuri <
> indraj...@gmail.com> wrote:
>
>>
>> Done. Hudson build triggered, we're good if no build fail mail comes in
>> next half an hour.
>>
>> Cheers, Indrajit
>>
>> On 06/11/09 8:10 PM, Josh Suereth wrote:
>> > Anytime soon would be good.  I"m leaving the other option open for now
>> > (because there's a lot more work to fully disable) but I'm trying to
>> > move all projects into a state where they won't break before that
>> > change.   SO once you're done, I'll send out the email scheduling when
>> > hudson is going into maintenance.
>> >
>> >
>> > Thanks!
>> > -Josh
>> >
>> > On Fri, Nov 6, 2009 at 2:11 AM, Indrajit Raychaudhuri
>> > mailto:indraj...@gmail.com>> wrote:
>> >
>> >
>> > Josh, thank you for driving us do the 'right thing' :)
>> >
>> > Hudson build would trigger when the pom.xml changes.
>> > So do you want your fork (b9588f...) to be applied right away. Or do
>> you
>> > want us to wait for a pre-set time for the transition?
>> >
>> > Committers, do you insist a ticket/reviewboard for this. If yes,
>> I'll do
>> > the needful?
>> >
>> > Cheers, Indrajit
>> >
>> > On 06/11/09 6:28 AM, Josh Suereth wrote:
>> >  > Scala-tools.org's Hudson server will no longer allow local
>> > deployment to
>> >  > the repository.  You *must* submit all snapshot/release artifacts
>> >  > through the nexus webapp.   The hudson server will provide a
>> > server id
>> >  > (nexus.scala-tools.org 
>> > ) that will have
>> >  > appropriate (and appropriately hidden) credentials for nightly
>> >  > deployments of snapshots.
>> >  >
>> >  > As such, the following changes should be made to lift's pom.xml
>> (I'm
>> >  > trying to update your hudson lift configuration to cause the
>> least
>> >  > amount of disruption):
>> >  >
>> >  > I have a forked repo (jsuereth/liftweb) with the changes as well
>> > (if you
>> >  > want to use github's "fork queue" feature):
>> >  >
>> >  > --- a/pom.xml
>> >  > +++ b/pom.xml
>> >  > @@ -806,16 +806,16 @@
>> >  > hudson
>> >  > 
>> >  > 
>> >  > - hudson.scala-tools.org 
>> > 
>> >  > - file:///home/scala-tools.org/www/repo-snapshots
>> > 
>> >  > 
>> >  > + nexus.scala-tools.org 
>> > 
>> >  > +
>> > http://nexus.scala-tools.org/content/repositories/releases
>> 
>> >  > 
>> >  > 
>> >  > - hudson.scala-tools.org 
>> > 
>> >  > - file:///home/scala-tools.org/www/repo-snapshots
>> > 
>> >  > 
>> >  > + nexus.scala-tools.org 
>> > 
>> >  > +
>> > http://nexus.scala-tools.org/content/repositories/snapshots
>> 
>> >  > false
>> >  > 
>> >  > 
>> >  > - hudson.scala-tools.org 
>> > 
>> >  > + nexus.scala-tools.org 
>> > 
>> >  > file:///home/scala-tools.org/www/mvnsites-snapshots/liftweb
>> > 
>> >  > 
>> >  > 
>> >  > 
>> >  >
>> >  >
>> >  > >
>> >
>> >
>> >
>> >
>> > >
>>
>>
>>
>
> >
>

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



[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Neil.Lv

Tim,

   It can be shown correctly now!

   It's so cool and easy to use.

   Thank you very much !

Cheers,
  Neil

On Nov 12, 9:08 pm, Timothy Perrett  wrote:
> Its a string because you havent properly escapped it... note that the code i 
> sent used the """CONTENT""" markers, thus you need to escape them properly.
>
> Cheers, Tim
>
> On 12 Nov 2009, at 12:02, Neil.Lv wrote:
>
> >  Why the " flashSrc" is a string in the Script ? Maybe it should be "/
> > flash/test.swf" ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [TIP] Customizing output

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 3:44 AM, Eduardo Costa wrote:

>
> I published this tip on my blog (http://extremejava.tpk.com.br/
> 2009/11/12/customizing-liftwebs-errorwarningnotice-messages/),
> but,
> I'll put here as a quick reference for other liftweb users: just
> create a snippet named "msgs". It can be like this one:
>

Thanks!


>
> package mypkg.snippet
> class Msgs {
>  def msgs(cls : String, ms : List[NodeSeq]) = ms match {
>case Nil => Nil
>case x => { ms.flatMap(m => { m }) } ul>
>  }
>  def render(xml : NodeSeq) : NodeSeq =
>
>  { msgs("msgError", noIdMessages(errors)) }
>  { msgs("msgWarning", noIdMessages(warnings)) }
>  { msgs("msgNotice", noIdMessages(notices)) }
>
> }
>
> >
>


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



[Lift] Re: How to use Box

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 5:53 AM, Ferdinand Chan  wrote:

>
> David,
>
> Thanks for the blog entry and it does a great job in explaining how
> Option works and how to use it.
>
> May I suggest that we add a link to this blog post on Lift Wiki???
> Correct me if I'm wrong but I think most newbie to Scala / Lift may
> wonder and puzzle how Box / Option works.
>
> I know you're very busy and with your permission, I'm willing to add
> this to the wiki
>

No permission required.  Please add whatever valuable things to the Lift
wiki (the one at http://wiki.github.com/dpp/liftweb )


>
> Oh, and I think I really need to tweak my mind a bit and start to
> think in a more functional / scala way
>

Yeah... it's a change in mindset, but I think you'll find the change to be
welcome in terms of your own productivity, your ability to read others'
code, and overall code stability.

Thanks,

David


>
> Cheers,
>
> Ferdinand
>
> On Nov 12, 6:55 am, David Pollak 
> wrote:
> > http://blog.lostlake.org/index.php?/archives/50-The-Scala-Option-clas...
> >
> > The for comprehension is your friend.
> >
> >
> >
> >
> >
> > On Wed, Nov 11, 2009 at 2:40 PM, Ferdinand Chan 
> wrote:
> >
> > > Wondering what's the normal practice of using a Box. As a Java
> > > developer, I always want to get the boxed value by a method named
> > > "Value" like
> >
> > > val optionalContent = Full("This is optional")
> >
> > > Log.info( " The optional content is " + optionalContent.value)
> >
> > > But I know its not a valid way to do so in lift ( same for Option in
> > > Scala)
> >
> > > From the book programming in Scala , there's an example
> >
> > > val withDefault: Option[Int] => Int = {
> > > case Some(x) => x
> > > case None => 0
> > > }
> >
> > > which suggest the use of match to retrieve the value of the boxed
> > > content. It make sense to me and I'm totally agree with the advantage
> > > of using match + option (Box) combination.
> >
> > > However, as a newbie to Scala, I'm so tempted to use something
> > > like .Value to retrieve the box value .
> >
> > > So, what's the normal way to use Box ?? Could someone kindly provide
> > > some example on how to use ? I tried to look through some source code
> > > of Lift but its not easy for a newbie :)
> >
> > > Thanks
> >
> > --
> > 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
-~--~~~~--~~--~--~---



[Lift] Re: How to use Box

2009-11-12 Thread Ferdinand Chan

Opyate,

Thanks for the example. But my scala knowledge seems not good enough
to understand it.

Will try to re-read it couple of times and try to understand it

Cheers,

Ferdinand

On Nov 12, 8:06 pm, opyate  wrote:
> Hey Ferdinand,
>
> Here are a couple of examples:
>
> import _root_.net.liftweb.common._
>
>   val boxExample: Box[Int] => Int = {
>     case Full(x) => x
>     case Empty => 0
>   }
>
>   def boxExample2(boxedInt: Box[Int]): Int = {
>     boxedInt.map({i =>
>       i
>     }) openOr 0
>   }
>
> On Nov 12, 12:28 am, Naftoli Gugenheim  wrote:
>
>
>
> > What do you want to happen if you call "value" on an Empty?
>
> > -
>
> > Ferdinand Chan wrote:
>
> > Wondering what's the normal practice of using a Box. As a Java
> > developer, I always want to get the boxed value by a method named
> > "Value" like
>
> > val optionalContent = Full("This is optional")
>
> > Log.info( " The optional content is " + optionalContent.value)
>
> > But I know its not a valid way to do so in lift ( same for Option in
> > Scala)
>
> > From the book programming in Scala , there's an example
>
> > val withDefault: Option[Int] => Int = {
> > case Some(x) => x
> > case None => 0
>
> > }
>
> > which suggest the use of match to retrieve the value of the boxed
> > content. It make sense to me and I'm totally agree with the advantage
> > of using match + option (Box) combination.
>
> > However, as a newbie to Scala, I'm so tempted to use something
> > like .Value to retrieve the box value .
>
> > So, what's the normal way to use Box ?? Could someone kindly provide
> > some example on how to use ? I tried to look through some source code
> > of Lift but its not easy for a newbie :)
>
> > Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: How to use Box

2009-11-12 Thread Ferdinand Chan

David,

Thanks for the blog entry and it does a great job in explaining how
Option works and how to use it.

May I suggest that we add a link to this blog post on Lift Wiki???
Correct me if I'm wrong but I think most newbie to Scala / Lift may
wonder and puzzle how Box / Option works.

I know you're very busy and with your permission, I'm willing to add
this to the wiki

Oh, and I think I really need to tweak my mind a bit and start to
think in a more functional / scala way

Cheers,

Ferdinand

On Nov 12, 6:55 am, David Pollak 
wrote:
> http://blog.lostlake.org/index.php?/archives/50-The-Scala-Option-clas...
>
> The for comprehension is your friend.
>
>
>
>
>
> On Wed, Nov 11, 2009 at 2:40 PM, Ferdinand Chan  wrote:
>
> > Wondering what's the normal practice of using a Box. As a Java
> > developer, I always want to get the boxed value by a method named
> > "Value" like
>
> > val optionalContent = Full("This is optional")
>
> > Log.info( " The optional content is " + optionalContent.value)
>
> > But I know its not a valid way to do so in lift ( same for Option in
> > Scala)
>
> > From the book programming in Scala , there's an example
>
> > val withDefault: Option[Int] => Int = {
> > case Some(x) => x
> > case None => 0
> > }
>
> > which suggest the use of match to retrieve the value of the boxed
> > content. It make sense to me and I'm totally agree with the advantage
> > of using match + option (Box) combination.
>
> > However, as a newbie to Scala, I'm so tempted to use something
> > like .Value to retrieve the box value .
>
> > So, what's the normal way to use Box ?? Could someone kindly provide
> > some example on how to use ? I tried to look through some source code
> > of Lift but its not easy for a newbie :)
>
> > Thanks
>
> --
> 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
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Timothy Perrett

Its a string because you havent properly escapped it... note that the code i 
sent used the """CONTENT""" markers, thus you need to escape them properly.

Cheers, Tim

On 12 Nov 2009, at 12:02, Neil.Lv wrote:

>  Why the " flashSrc" is a string in the Script ? Maybe it should be "/
> flash/test.swf" ?


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



[Lift] Props filename hazzle

2009-11-12 Thread Cornelius

Hi all,

this may be somewhat outdated but I spent some time to figure out how
to specify different properties with java-properties files:

The doc at http://scala-tools.org/scaladocs/liftweb/1.0/ says, that
the filename should be somewhat of this:

 modeName.hostName.userName.filename.extension

But (after hours of renaming files under src/main/resources/ and src/
main/resources/props I finally looked at the code in Props.scala and
saw this:

# val toTry: List[() => String] = List(
#  () => "/props/" + modeName + userName + hostName,
#() => "/props/" + modeName + userName,
#() => "/props/" + modeName + hostName,
#  () => "/props/" + modeName + "default.",
#() => "/" + modeName + userName +
hostName,
#() => "/" + modeName + userName,
#() => "/" + modeName + hostName,
#  () => "/" + modeName + "default.")

As for my understanding (just beginning with scala and lift) it works
just the other ways as the docs suggest:

(bumblebee == hostName, dave == userName and kpo == fileName)

doesn't work:
  production.bumblebee.dave.kpo.props

works:
  production.dave.bumblee.props

I didn't test all combinations and all places, but it would be great
if someone could confirm this (or - indeed - guide me in the correct
direction for the case missed something)

Cornelius

PS.: Nice idea for implementing this kind of run.mode-switching...
help alot

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



[Lift] [TIP] Customizing output

2009-11-12 Thread Eduardo Costa

I published this tip on my blog (http://extremejava.tpk.com.br/
2009/11/12/customizing-liftwebs-errorwarningnotice-messages/), but,
I'll put here as a quick reference for other liftweb users: just
create a snippet named "msgs". It can be like this one:

package mypkg.snippet
class Msgs {
  def msgs(cls : String, ms : List[NodeSeq]) = ms match {
case Nil => Nil
case x => { ms.flatMap(m => { m }) }
  }
  def render(xml : NodeSeq) : NodeSeq =

  { msgs("msgError", noIdMessages(errors)) }
  { msgs("msgWarning", noIdMessages(warnings)) }
  { msgs("msgNotice", noIdMessages(notices)) }

}

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



[Lift] Re: How to use Box

2009-11-12 Thread opyate

Hey Ferdinand,

Here are a couple of examples:

import _root_.net.liftweb.common._

  val boxExample: Box[Int] => Int = {
case Full(x) => x
case Empty => 0
  }

  def boxExample2(boxedInt: Box[Int]): Int = {
boxedInt.map({i =>
  i
}) openOr 0
  }

On Nov 12, 12:28 am, Naftoli Gugenheim  wrote:
> What do you want to happen if you call "value" on an Empty?
>
> -
>
> Ferdinand Chan wrote:
>
> Wondering what's the normal practice of using a Box. As a Java
> developer, I always want to get the boxed value by a method named
> "Value" like
>
> val optionalContent = Full("This is optional")
>
> Log.info( " The optional content is " + optionalContent.value)
>
> But I know its not a valid way to do so in lift ( same for Option in
> Scala)
>
> From the book programming in Scala , there's an example
>
> val withDefault: Option[Int] => Int = {
> case Some(x) => x
> case None => 0
>
> }
>
> which suggest the use of match to retrieve the value of the boxed
> content. It make sense to me and I'm totally agree with the advantage
> of using match + option (Box) combination.
>
> However, as a newbie to Scala, I'm so tempted to use something
> like .Value to retrieve the box value .
>
> So, what's the normal way to use Box ?? Could someone kindly provide
> some example on how to use ? I tried to look through some source code
> of Lift but its not easy for a newbie :)
>
> Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Neil.Lv

Tim,

  Here is the html code when i use the code in my Snippet, but it
doesn't work.

### Code in the Snippet ###
  var flashSrc = "/flash/test.swf"
  var flashVar = "{name1=hello&name2=world&name3=foobar}"
  val script = """swfobject.embedSWF('" + flashSrc + "', 'myContent',
'300', '120', '9.0.0', 'expressInstall.swf', '" + flashVar + "');"""

  def whatever(xhtml: NodeSeq): NodeSeq = bind("flash", xhtml,
"flashVar" -> Text("/flash/focus.swf"),
"object" -> Script(Run(script))
  )
### Code in the Snippet ###

### Code in the index.html ###

  
  

  


  Alternative content
  http://www.adobe.com/go/getflashplayer";>

### Code in the index.html ###

  This is the source html code when i use this code.



//
swfobject.embedSWF('" + flashSrc + "', 'myContent', '300', '120',
'9.0.0', 'expressInstall.swf', '" + flashVar + "');
//






  Why the " flashSrc" is a string in the Script ? Maybe it should be "/
flash/test.swf" ?

  Thanks very much!

Cheers,
  Neil



On Nov 12, 5:39 pm, Timothy Perrett  wrote:
> Neil,
>
> Try this:
>
>   import net.liftweb.http.js._
>   import net.liftweb.http.js.JE._
>   import net.liftweb.http.js.JsCmds._
>
>   val script = """swfobject.embedSWF('" + flashSrc + "','myContent', '300', 
> '120', '9.0.0', 'expressInstall.swf', '" + flashVar + "');"""
>
>   def whatever(xhtml: NodeSeq): NodeSeq = bind("flash", xhtml,
>     "object" -> Script(Run(script))
>   )
>
> That should give you enough to work out what it is you need to do.
>
> Cheers, Tim
>
> On 12 Nov 2009, at 09:04, Neil.Lv wrote:
>
>
>
> > Hi all,
>
> >  How to Embed the flash dynamic in Snippet in the Lift?
>
> >  I use the swfobject to embed my flash and want to specify the
> > flashVar dynamic, but this is doesn't work!
>
> >  Here is the code in the Snippet:
>
> >  The flashSrc  can shown correctly in the index page, but the
> > falshvar doesn't work!
>
> > ###
> >  var flashSrc = "/flash/test.swf"
> >  var flashVar = "{name1=hello&name2=world&name3=foobar}"
> >  def initFlash(in: NodeSeq) : NodeSeq = {
> >    bind("init", in,
> >    "flash" -> Text("swfobject.embedSWF('" + {flashSrc} + "',
> > 'myContent', '300', '120', '9.0.0', 'expressInstall.swf', '" +
> > {flashVar} + "');")
> >    )
> >  }
> > ###
>
> >  Any help would be much appreciated!
>
> > Cheers,
> >  Neil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: "Content is not allowed in prolog" Parsing an XML

2009-11-12 Thread GA

Sorry I've sent this email to the wrong list. 


On Nov 12, 2009, at 12:24 PM, GA wrote:

> 
> Hello guys,
> 
> I have the following scala code line:
> 
> XML.load(new java.io.InputStreamReader(conn.getInputStream, "UTF-8"))
> 
> I am downloading and parsing RSS feeds. This line parses most of the sites 
> without problems but some sites give the following error:
> 
> Content is not allowed in prolog
> 
> Any ideas on how to solve this problem?
> 
> Thanks in advance,
> 
> GA
> 
> 
> > 


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



[Lift] "Content is not allowed in prolog" Parsing an XML

2009-11-12 Thread GA

Hello guys,

I have the following scala code line:

XML.load(new java.io.InputStreamReader(conn.getInputStream, "UTF-8"))

I am downloading and parsing RSS feeds. This line parses most of the sites 
without problems but some sites give the following error:

Content is not allowed in prolog

Any ideas on how to solve this problem?

Thanks in advance,

GA


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



[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Timothy Perrett

Neil,

Try this:
  
  import net.liftweb.http.js._
  import net.liftweb.http.js.JE._
  import net.liftweb.http.js.JsCmds._
  
  val script = """swfobject.embedSWF('" + flashSrc + "','myContent', '300', 
'120', '9.0.0', 'expressInstall.swf', '" + flashVar + "');"""

  def whatever(xhtml: NodeSeq): NodeSeq = bind("flash", xhtml,
"object" -> Script(Run(script))
  )

That should give you enough to work out what it is you need to do. 

Cheers, Tim


On 12 Nov 2009, at 09:04, Neil.Lv wrote:

> 
> Hi all,
> 
>  How to Embed the flash dynamic in Snippet in the Lift?
> 
>  I use the swfobject to embed my flash and want to specify the
> flashVar dynamic, but this is doesn't work!
> 
>  Here is the code in the Snippet:
> 
>  The flashSrc  can shown correctly in the index page, but the
> falshvar doesn't work!
> 
> ###
>  var flashSrc = "/flash/test.swf"
>  var flashVar = "{name1=hello&name2=world&name3=foobar}"
>  def initFlash(in: NodeSeq) : NodeSeq = {
>   bind("init", in,
>   "flash" -> Text("swfobject.embedSWF('" + {flashSrc} + "',
> 'myContent', '300', '120', '9.0.0', 'expressInstall.swf', '" +
> {flashVar} + "');")
>   )
>  }
> ###
> 
>  Any help would be much appreciated!
> 
> Cheers,
>  Neil
> > 
> 


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



[Lift] Re: XmlResponse with cookies

2009-11-12 Thread Timothy Perrett

Right, I agree that named arguments would be preferable but thats a 2.8 feature 
and the current idiom implemented by other HttpResponse classes is to have 
overloaded apply methods - hence the suggestion :)

If its functionality that you want right now, then sure, go for the apply route 
- otherwise its a case of sitting tight. 

Cheers, Tim

On 12 Nov 2009, at 02:01, Atsuhiko Yamanaka wrote:

> 
> Hi,
> 
> On Wed, Nov 11, 2009 at 7:30 PM, Timothy Perrett
>  wrote:
>> 
>> Wouldn't a more appropriate idiom be to use overloaded apply methods in a 
>> companion object?
>> 
>> That is:
>> 
>> def apply(node: NodeSeq): XmlResponse
>> def apply(node: NodeSeq, cookies: List[HTTPCookie]): XmlResponse
>> 
>> Thoughts?
> 
> As for further enhancements, I prefer named and default arguments to
> several apply methods.  For example,
> 
> case class XmlResponse(xml: Node,
> docType:Box[String] = Empty,
> code:Int = 200,
> cookies:List[HTTPCookie] = Nil)
> extends NodeResponse {
>  def headers = List("Content-Type" -> "text/xml; charset=utf-8"
>  def out = xml
> }
> 
> and we will have
>  XmlResponse(, cookies = S.responseCookies)
> 
> Of course, it must wait for Liftweb 1.1 release.
> 
> 
> Sincerely,
> --
> Atsuhiko Yamanaka
> JCraft,Inc.
> 1-14-20 HONCHO AOBA-KU,
> SENDAI, MIYAGI 980-0014 Japan.
> Tel +81-22-723-2150
>+1-415-578-3454
> Skype callto://jcraft/
> Twitter: http://twitter.com/ymnk
> 
> > 
> 


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



[Lift] How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Neil.Lv

Hi all,

  How to Embed the flash dynamic in Snippet in the Lift?

  I use the swfobject to embed my flash and want to specify the
flashVar dynamic, but this is doesn't work!

  Here is the code in the Snippet:

  The flashSrc  can shown correctly in the index page, but the
falshvar doesn't work!

###
  var flashSrc = "/flash/test.swf"
  var flashVar = "{name1=hello&name2=world&name3=foobar}"
  def initFlash(in: NodeSeq) : NodeSeq = {
bind("init", in,
"flash" -> Text("swfobject.embedSWF('" + {flashSrc} + "',
'myContent', '300', '120', '9.0.0', 'expressInstall.swf', '" +
{flashVar} + "');")
)
  }
###

  Any help would be much appreciated!

Cheers,
  Neil
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---