[Lift] Re: error while SHtml.ajaxInvoke call

2009-08-24 Thread pravin

hi,
its former method i am using in my app(u mentioned it in last reply).

i have one text box and submit button.

when i click on submit button -
i have to show employee info on my GUI page.  (in text box i will
enter emp Id))

This info have to table
one table have information with ajax and other have info with normal
call.

how can i populate these two table when i click on submit button...


hope this will help u to understand my problem.


Thanks...

waiting for u reply

On Aug 21, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I still don't understand.

 Does the user do anything to get the faster table updated or do you want the
 faster table pushed from the server when something changes on the server?

 If it's the former (the user does something to get the faster table
 updated), you want to use ajaxButton... the user clicks on the button and
 the server-responds with JavaScript that updates the browser.

 If it's the latter (the user does nothing, but the server pushes changes to
 the client), see CometActor.  You can see an example in the Clock.scala code
 in the Lift sites/example project.



 On Fri, Aug 21, 2009 at 1:25 AM, pravin pravinka...@gmail.com wrote:

  Hi,
  Thanks for u r quick reply.
  Now I am explain my problem in details :

  I have normal form with one text box and one submit button.

  Also i have 2 table components(these are dynamic tables )..but these
  table are out of the from tag.These table only displays information.

  Flow of the application:

  When i click on submit button.
  i am population two Lists .

      One list get populated from DB.( Slower)
      second list get populated from hard code values (faster)

  Now i am populate above 2 tables with these two lists when i click on
  submit button.

  With the above flow i am able to populate above tables(synchronously).

  But now i want to configure Ajax into this so i can get faster
  results...(as one List get faster)
  while other list can get populated asynchronously.

  So when i click on Submit button i will populate one list ..but how
  can i populate other list with Ajax...

  i tried for following:
  i was planning when other table getting render  make ajax call with
  ajaxInvokebut i wont work...

  Please help ...

  Thanks in advance

  -Pravin

  On Aug 20, 6:56 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Wed, Aug 19, 2009 at 10:50 PM, pravin pravinka...@gmail.com wrote:

yes i have submit button.
on click event of this i am doing other tasks.

   What is the user interface (HTML) element that causes the Ajax update to
   happen?  What does the user do in order to get the Ajax thing to happen?

   ajaxInvoke is a very low level call.  If you want to have an Ajax button,
   use SHtml.ajaxButton.  If you want to have an Ajax form, use
  SHtml.ajaxForm.
    If you can describe what the user interaction should be, I'll write up
  some
   example code for you.

above data population for text is not on click submit button.

On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Are you trying to create a link/button that someone clicks on to
  cause
the
 Ajax call to be made?

 On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com
  wrote:

  Hi ,
  i am trying to configure Ajax in my application using lift.

  I have :

  lift:DisplayResults.showFeeds
               table border=0 width=100% class = resultheader
  cellpadding=10
                          t:feedsResultRows/
              /table
  /lift:DisplayResults.showFeeds

  snippet for given html code :

  def showFeeds(xhtml:NodeSeq):NodeSeq ={
        println(Inside showFeeds);
        bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke
  (updateStartDate)._2)
  }

  def updateStartDate () : JsCmd= {

      JsCmds.SetHtml(resultsRow, displayResult(List(abc,xyz)))
   }

  def displayResult(rList:List[Object]):NodeSeq={
        trtd 
                       table
                          trtdrList(0).toString()}/
  td
                          /tr
                          trtd{rList(1).toString()}/a /
  td
                          /tr
                       /table
                      /td/tr
   }

  But its not working-
  Giving out put on html page like-
                       lift_ajaxHandler('F966737512075R2E' + '=true',
  null, null)

  What is this 
  How can i use Ajax in my application.I want to give asynchronous
  call
  (Ajax) for my above html component so it can get show list that i
  get
  from Db call .

  This all  happening  on submit button click

  Appreciate any pointer regarding this

  -Pravin

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

[Lift] simple Ajax form

2009-08-24 Thread jack

I am trying to make a simple ajax form. The code is below. The
Javascript error I am getting when I hit the send button is:

uncaught exception ReferenceError: F777221462447MPT is not defined

Am I missing something?

lift:surround with=default at=content
h1Hello FormAjax/h1
lift:HelloFormAjax.show
Hello hello:who/br/
label for=whoFieldWho :/labelhello:whoField/
hello:submit/
/lift:HelloFormAjax.show
/lift:surround

create src/main/scala/sandbox/lift/hellodarwin/snippet/HelloFormAjax
package sandbox.lift.hellodarwin.snippet

import scala.xml.NodeSeq
import net.liftweb.http.S._
import net.liftweb.http.SHtml._
import net.liftweb.util.Helpers._
import net.liftweb.http.js.{JsCmd, JsCmds}

class HelloFormAjax {
  def whoNode(str: String) = span id=who{str}/span

  def updateWho(str: String): JsCmd = {
println(updateWho on  + str)
JsCmds.Run($('#who').text('+str+'))
  }

  def show(xhtml: NodeSeq): NodeSeq = {
bind(hello, xhtml,
whoField - text(world, null) % (size - 10) % (id -
 whoField),
submit - button type=button{?(Send)}/button %
(onclick - ajaxCall(JsRaw($('#whoField').attr('value')), s =
updateWho(s))),
who - whoNode(world)
)
  }
}

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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Charles F. Munat

Nope. Same error, even after blowing away m2 and rerunning the basic 
archetype to create a new app.

Chas.

Charles F. Munat wrote:
 No on blowing away m2. I did switch to the blank archetype (which is 
 what I actually wanted) and it worked fine. But I can try again with the 
 basic and blowing away m2.
 
 Chas.
 
 Derek Chen-Becker wrote:
 It looks like this is still the older archive before HttpServletRequest 
 → HTTPRequest. The code in master has the change applied, so I'm not 
 sure why it's failing. The warnings are normal (I haven't figured out 
 all of the tricks with the velocity templating), but something isn't 
 being pulled correctly. Have you tried blowing away your .m2?

 Derek

 On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:


 I found this in the lift book and used it:

 mvn archetype:generate \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-jpa-basic \
 -DarchetypeVersion=1.1-SNAPSHOT \
 -DgroupId=com.foo.jpaweb \
 -DartifactId=JPADemo \
 -Dversion=1.0-SNAPSHOT

 During the creation of the basic jpa app, I got this:

 Downloading:
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar%0A44K
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
 Downloading:
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-basic/1.1-SNAPSHOT/lift-archetype-jpa-basic-1.1-SNAPSHOT.jar%0A44K
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING

 And a bunch of warnings:

 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 37,column 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 43,column 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 85,column 25] :
 ${scala.version} is not a valid reference.
 [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 13,column
 9] : ${parent.artifactId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 24,column
 16] : ${pom.groupId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 26,column
 16] : ${pom.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/spa/pom.xml [line 14,column
 9] : ${parent.artifactId} is not a valid reference.

 The build completed successfully anyway. Afterward, I tried mvn
 compile in the top directory and got the following error:

 [WARNING]
 
 /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:70:
 error: type mismatch;
 [WARNING]  found   :
 net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]
 [WARNING]  required:
 net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]
 [WARNING]   case null =
 Full(LiftRules.defaultLocaleCalculator(request))
 [WARNING] ^
 [WARNING]
 
 /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:75:
 error: type mismatch;
 [WARNING]  found   :
 (net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]) =
 java.util.Locale
 [WARNING]  required:
 (net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]) =
 java.util.Locale
 [WARNING] LiftRules.localeCalculator = localeCalculator _
 [WARNING]  ^
 [WARNING] two errors found
 [INFO]
 

[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread marius d.



On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Sun, Aug 23, 2009 at 10:45 AM, marius d. marius.dan...@gmail.com wrote:

  Hmmm .. I'm wondering if we can write a Scala compiler plugin that
  transform functions provided to Lift's S/SHtml function etc. into a
  richer FunctionX implementation that knows how to serialize it's
  members. We could restrict the types that as LiftSerializable on top
  of primitives, Calenars, SessionVar/RequestVar etc. If users need
  their own classes to be LiftSerilizable they would have to implement
  LiftSerializable trait.

 I think we can do it without explicit traits.  I think we just need to walk
 the graph for everything that's added to the LiftSession and see where it
 leads.  Any graph we can walk is something that we can serialize... even
 without Java serialization.  Any graph that ends in globals or some class
 that refers to native stuff (e.g., IO), then we're toast.

Totally agree. The rationale for explicit LiftSerializable would be
just for user defined types. Otherwise user's won't have to use it.
Graphs may also have be cyclic paths ... it shouldn't be too big of a
pain though. Furthermore if a dependency graph path leads say to an IO
reference maybe that's unintentional user code doesn't really use that
but compiler put it for whatever reason. If such cases are possible
and could be determined maybe we could exclude that silently from the
serialization operation and add a compile time warning.

I guess we need to dig more into scala compiler plugin system.






  Thoughts?

  Br's,
  Marius

  On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
   At a first glace Java serialization is needed because of its awareness
   of the reference graph. But in the same time it does not perform well.
   One way might be the byte level instrumentation that would induce code
   to figure out the reference graph and know how to stream-ify it using
   a given efficient protocol. But that induces risks and it involves
   tons of work. I think would be doable though.

   The problem is not really the technology of propagating session
   information to other nodes. That's the easiest part, but tough one is
   figuring out the low level reference graph and serialization
   semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
   name it, are unlikely to help solving the fundamental problem.

   Br's,
   Marius

   On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:

On Sun, Aug 23, 2009 at 7:04 PM, David

Pollakfeeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
 kev.lee.wri...@googlemail.com wrote:

 I'm wondering if we can't leverage JavaSpaces to handle a lot of
  this
 stuff.  From my experience with the technology it seems to be a
  pretty good
 fit for the problem.

 Two reasons:
 - JavaSpaces is as far as I know, GPL and we will not mix any GPL
  into Lift

JavaSpaces is just the specification. There are two implementations I
know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
have hands on experience with either.

 - It doesn't solve the issue with low-level session replication which
  relies
 on serialization of the session data for transfer to another app
  server
 instance.

Arthur

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] i want sample code for ajaxForm

2009-08-24 Thread pravin

Hi,

i have one text box and one submit button on my html form...

how can i use ajaxForm method to do this,,,

i go through the sample codes from sample application that lift
provided ...but i want more details for ajaxForm


Thanks in advance...


-Pravin


--~--~-~--~~~---~--~~
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] net.liftweb.mapper.PreCache doesn't work well as my expect

2009-08-24 Thread koji

Hi all,
I want to avoid n+1 problem
so i try to write my code as
val users = User.findAll(PreCache(User.roomChoice), By(User.travel,
travelId))
and i saw the sql generated only once for querying roomChoice.
but when i using the
u.fromPlace.obj, it always become Empty(u.fromPace has correct value)

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: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread Viktor Klang
Please ignore the fact that my keyboard seems to be full of shite...

On Mon, Aug 24, 2009 at 9:39 AM, Viktor Klang viktor.kl...@gmail.comwrote:



 On Mon, Aug 24, 2009 at 8:13 AM, marius d. marius.dan...@gmail.comwrote:




 On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  On Sun, Aug 23, 2009 at 10:45 AM, marius d. marius.dan...@gmail.com
 wrote:
 
   Hmmm .. I'm wondering if we can write a Scala compiler plugin that
   transform functions provided to Lift's S/SHtml function etc. into a
   richer FunctionX implementation that knows how to serialize it's
   members. We could restrict the types that as LiftSerializable on top
   of primitives, Calenars, SessionVar/RequestVar etc. If users need
   their own classes to be LiftSerilizable they would have to implement
   LiftSerializable trait.
 
  I think we can do it without explicit traits.  I think we just need to
 walk
  the graph for everything that's added to the LiftSession and see where
 it
  leads.  Any graph we can walk is something that we can serialize... even
  without Java serialization.  Any graph that ends in globals or some
 class
  that refers to native stuff (e.g., IO), then we're toast.

 Totally agree. The rationale for explicit LiftSerializable would be
 just for user defined types. Otherwise user's won't have to use it.
 Graphs may also have be cyclic paths ... it shouldn't be too big of a
 pain though. Furthermore if a dependency graph path leads say to an IO
 reference maybe that's unintentional user code doesn't really use that
 but compiler put it for whatever reason. If such cases are possible
 and could be determined maybe we could exclude that silently from the
 serialization operation and add a compile time warning.

 I guess we need to dig more into scala compiler plugin system.



 1. Isn't there a problem with references _inside_ methods that are
 impure/sideeffecting?

 s = { Db.myCachedInfoNotInSession foo s  }

 Regarding member references, a simple check for transient
 (sca...@transient == java *transient*) to forcve people to use transient
 members for non-serializable state.

 But IMHO the serialization problem is a (negative?) sideeffect of Lifts
 rich model GUID=Func approach.
 Perhpas there is a middle way, a way where we can replicate just enough to
 survive a node crash?




 
 
 
 
 
   Thoughts?
 
   Br's,
   Marius
 
   On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
At a first glace Java serialization is needed because of its
 awareness
of the reference graph. But in the same time it does not perform
 well.
One way might be the byte level instrumentation that would induce
 code
to figure out the reference graph and know how to stream-ify it
 using
a given efficient protocol. But that induces risks and it involves
tons of work. I think would be doable though.
 
The problem is not really the technology of propagating session
information to other nodes. That's the easiest part, but tough one
 is
figuring out the low level reference graph and serialization
semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
name it, are unlikely to help solving the fundamental problem.
 
Br's,
Marius
 
On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:
 
 On Sun, Aug 23, 2009 at 7:04 PM, David
 
 Pollakfeeder.of.the.be...@gmail.com wrote:
  On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
  kev.lee.wri...@googlemail.com wrote:
 
  I'm wondering if we can't leverage JavaSpaces to handle a lot
 of
   this
  stuff.  From my experience with the technology it seems to be a
   pretty good
  fit for the problem.
 
  Two reasons:
  - JavaSpaces is as far as I know, GPL and we will not mix any
 GPL
   into Lift
 
 JavaSpaces is just the specification. There are two
 implementations I
 know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I
 don't
 have hands on experience with either.
 
  - It doesn't solve the issue with low-level session replication
 which
   relies
  on serialization of the session data for transfer to another app
   server
  instance.
 
 Arthur
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp
 



 --
 Viktor Klang

 Blog: klangism.blogspot.com
 Twttr: viktorklang

 Lift Committer - liftweb.com
 AKKA Committer - akkasource.org
 Cassidy - github.com/viktorklang/Cassidy.git
 SoftPub founder: http://groups.google.com/group/softpub




-- 
Viktor Klang

Blog: klangism.blogspot.com
Twttr: viktorklang

Lift Committer - liftweb.com
AKKA Committer - akkasource.org
Cassidy - github.com/viktorklang/Cassidy.git
SoftPub founder: http://groups.google.com/group/softpub

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.

[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread Viktor Klang
On Mon, Aug 24, 2009 at 8:13 AM, marius d. marius.dan...@gmail.com wrote:




 On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  On Sun, Aug 23, 2009 at 10:45 AM, marius d. marius.dan...@gmail.com
 wrote:
 
   Hmmm .. I'm wondering if we can write a Scala compiler plugin that
   transform functions provided to Lift's S/SHtml function etc. into a
   richer FunctionX implementation that knows how to serialize it's
   members. We could restrict the types that as LiftSerializable on top
   of primitives, Calenars, SessionVar/RequestVar etc. If users need
   their own classes to be LiftSerilizable they would have to implement
   LiftSerializable trait.
 
  I think we can do it without explicit traits.  I think we just need to
 walk
  the graph for everything that's added to the LiftSession and see where it
  leads.  Any graph we can walk is something that we can serialize... even
  without Java serialization.  Any graph that ends in globals or some class
  that refers to native stuff (e.g., IO), then we're toast.

 Totally agree. The rationale for explicit LiftSerializable would be
 just for user defined types. Otherwise user's won't have to use it.
 Graphs may also have be cyclic paths ... it shouldn't be too big of a
 pain though. Furthermore if a dependency graph path leads say to an IO
 reference maybe that's unintentional user code doesn't really use that
 but compiler put it for whatever reason. If such cases are possible
 and could be determined maybe we could exclude that silently from the
 serialization operation and add a compile time warning.

 I guess we need to dig more into scala compiler plugin system.



1. Isn't there a problem with references _inside_ methods that are
impure/sideeffecting?

s = { Db.myCachedInfoNotInSession foo s  }

Regarding member references, a simple check for transient
(sca...@transient == java *transient*) to forcve people to use transient
members for non-serializable state.

But IMHO the serialization problem is a (negative?) sideeffect of Lifts rich
model GUID=Func approach.
Perhpas there is a middle way, a way where we can replicate just enough to
survive a node crash?




 
 
 
 
 
   Thoughts?
 
   Br's,
   Marius
 
   On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
At a first glace Java serialization is needed because of its
 awareness
of the reference graph. But in the same time it does not perform
 well.
One way might be the byte level instrumentation that would induce
 code
to figure out the reference graph and know how to stream-ify it using
a given efficient protocol. But that induces risks and it involves
tons of work. I think would be doable though.
 
The problem is not really the technology of propagating session
information to other nodes. That's the easiest part, but tough one is
figuring out the low level reference graph and serialization
semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
name it, are unlikely to help solving the fundamental problem.
 
Br's,
Marius
 
On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:
 
 On Sun, Aug 23, 2009 at 7:04 PM, David
 
 Pollakfeeder.of.the.be...@gmail.com wrote:
  On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
  kev.lee.wri...@googlemail.com wrote:
 
  I'm wondering if we can't leverage JavaSpaces to handle a lot of
   this
  stuff.  From my experience with the technology it seems to be a
   pretty good
  fit for the problem.
 
  Two reasons:
  - JavaSpaces is as far as I know, GPL and we will not mix any GPL
   into Lift
 
 JavaSpaces is just the specification. There are two implementations
 I
 know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I
 don't
 have hands on experience with either.
 
  - It doesn't solve the issue with low-level session replication
 which
   relies
  on serialization of the session data for transfer to another app
   server
  instance.
 
 Arthur
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp
 



-- 
Viktor Klang

Blog: klangism.blogspot.com
Twttr: viktorklang

Lift Committer - liftweb.com
AKKA Committer - akkasource.org
Cassidy - github.com/viktorklang/Cassidy.git
SoftPub founder: http://groups.google.com/group/softpub

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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread marius d.



On Aug 24, 10:39 am, Viktor Klang viktor.kl...@gmail.com wrote:
 On Mon, Aug 24, 2009 at 8:13 AM, marius d. marius.dan...@gmail.com wrote:

  On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Sun, Aug 23, 2009 at 10:45 AM, marius d. marius.dan...@gmail.com
  wrote:

Hmmm .. I'm wondering if we can write a Scala compiler plugin that
transform functions provided to Lift's S/SHtml function etc. into a
richer FunctionX implementation that knows how to serialize it's
members. We could restrict the types that as LiftSerializable on top
of primitives, Calenars, SessionVar/RequestVar etc. If users need
their own classes to be LiftSerilizable they would have to implement
LiftSerializable trait.

   I think we can do it without explicit traits.  I think we just need to
  walk
   the graph for everything that's added to the LiftSession and see where it
   leads.  Any graph we can walk is something that we can serialize... even
   without Java serialization.  Any graph that ends in globals or some class
   that refers to native stuff (e.g., IO), then we're toast.

  Totally agree. The rationale for explicit LiftSerializable would be
  just for user defined types. Otherwise user's won't have to use it.
  Graphs may also have be cyclic paths ... it shouldn't be too big of a
  pain though. Furthermore if a dependency graph path leads say to an IO
  reference maybe that's unintentional user code doesn't really use that
  but compiler put it for whatever reason. If such cases are possible
  and could be determined maybe we could exclude that silently from the
  serialization operation and add a compile time warning.

  I guess we need to dig more into scala compiler plugin system.

 1. Isn't there a problem with references _inside_ methods that are
 impure/sideeffecting?

 s = { Db.myCachedInfoNotInSession foo s  }

 Regarding member references, a simple check for transient
 (sca...@transient == java *transient*) to forcve people to use transient
 members for non-serializable state.

 But IMHO the serialization problem is a (negative?) sideeffect of Lifts rich
 model GUID=Func approach.
 Perhpas there is a middle way, a way where we can replicate just enough to
 survive a node crash?

That's exactly it. We probably don't need everything that Java
Serialization does. Just enough to make it consistent ... the
dependency graphs that is actually used by the user's function.






Thoughts?

Br's,
Marius

On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
 At a first glace Java serialization is needed because of its
  awareness
 of the reference graph. But in the same time it does not perform
  well.
 One way might be the byte level instrumentation that would induce
  code
 to figure out the reference graph and know how to stream-ify it using
 a given efficient protocol. But that induces risks and it involves
 tons of work. I think would be doable though.

 The problem is not really the technology of propagating session
 information to other nodes. That's the easiest part, but tough one is
 figuring out the low level reference graph and serialization
 semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
 name it, are unlikely to help solving the fundamental problem.

 Br's,
 Marius

 On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:

  On Sun, Aug 23, 2009 at 7:04 PM, David

  Pollakfeeder.of.the.be...@gmail.com wrote:
   On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
   kev.lee.wri...@googlemail.com wrote:

   I'm wondering if we can't leverage JavaSpaces to handle a lot of
this
   stuff.  From my experience with the technology it seems to be a
pretty good
   fit for the problem.

   Two reasons:
   - JavaSpaces is as far as I know, GPL and we will not mix any GPL
into Lift

  JavaSpaces is just the specification. There are two implementations
  I
  know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I
  don't
  have hands on experience with either.

   - It doesn't solve the issue with low-level session replication
  which
relies
   on serialization of the session data for transfer to another app
server
   instance.

  Arthur

   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Git some:http://github.com/dpp

 --
 Viktor Klang

 Blog: klangism.blogspot.com
 Twttr: viktorklang

 Lift Committer - liftweb.com
 AKKA Committer - akkasource.org
 Cassidy - github.com/viktorklang/Cassidy.git
 SoftPub founder:http://groups.google.com/group/softpub
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this 

[Lift] Re: JPA blank archetype

2009-08-24 Thread Indrajit Raychaudhuri


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

/Indrajit

On Aug 24, 11:06 am, Charles F. Munat c...@munat.com wrote:
 Nope. Same error, even after blowing away m2 and rerunning the basic
 archetype to create a new app.

 Chas.

 Charles F. Munat wrote:
  No on blowing away m2. I did switch to the blank archetype (which is
  what I actually wanted) and it worked fine. But I can try again with the
  basic and blowing away m2.

  Chas.

  Derek Chen-Becker wrote:
  It looks like this is still the older archive before HttpServletRequest
  → HTTPRequest. The code in master has the change applied, so I'm not
  sure why it's failing. The warnings are normal (I haven't figured out
  all of the tricks with the velocity templating), but something isn't
  being pulled correctly. Have you tried blowing away your .m2?

  Derek

  On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:

      I found this in the lift book and used it:

      mvn archetype:generate \
      -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
      -DarchetypeGroupId=net.liftweb \
      -DarchetypeArtifactId=lift-archetype-jpa-basic \
      -DarchetypeVersion=1.1-SNAPSHOT \
      -DgroupId=com.foo.jpaweb \
      -DartifactId=JPADemo \
      -Dversion=1.0-SNAPSHOT

      During the creation of the basic jpa app, I got this:

      Downloading:
     http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      44K
      
  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
      [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
      '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
      '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
      Downloading:
     http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      44K
      
  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
      [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
      '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
      '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING

      And a bunch of warnings:

      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 37,column 16] 
  :
      ${scala.version} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 43,column 16] 
  :
      ${scala.version} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 85,column 25] 
  :
      ${scala.version} is not a valid reference.
      [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/web/pom.xml [line 13,column
      9] : ${parent.artifactId} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/web/pom.xml [line 24,column
      16] : ${pom.groupId} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/web/pom.xml [line 26,column
      16] : ${pom.version} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/spa/pom.xml [line 14,column
      9] : ${parent.artifactId} is not a valid reference.

      The build completed successfully anyway. Afterward, I tried mvn
      compile in the top directory and got the following error:

      [WARNING]
      
  /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:70:
      error: type mismatch;
      [WARNING]  found   :
      net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]
      [WARNING]  required:
      net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]
      [WARNING]       case null =
      Full(LiftRules.defaultLocaleCalculator(request))
      [WARNING]                                                             ^
      [WARNING]
      
  /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:75:
      error: type mismatch;
      [WARNING]  found   :
      (net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]) =
      java.util.Locale
      [WARNING]  required:
      (net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]) =
      java.util.Locale
      [WARNING]     LiftRules.localeCalculator = localeCalculator _
      [WARNING]             

[Lift] Re: JPA blank archetype

2009-08-24 Thread marius d.

Charles,

AFAIK I removed all dependencies to javax.servlet.* classes even from
archetypes.  Are you using master? ... I did a full search and servlet
things are not being used. The archetype looks ok to me ... Am I
missing something?

Br's,
Marius

On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
 Nope. Same error, even after blowing away m2 and rerunning the basic
 archetype to create a new app.

 Chas.

 Charles F. Munat wrote:
  No on blowing away m2. I did switch to the blank archetype (which is
  what I actually wanted) and it worked fine. But I can try again with the
  basic and blowing away m2.

  Chas.

  Derek Chen-Becker wrote:
  It looks like this is still the older archive before HttpServletRequest
  → HTTPRequest. The code in master has the change applied, so I'm not
  sure why it's failing. The warnings are normal (I haven't figured out
  all of the tricks with the velocity templating), but something isn't
  being pulled correctly. Have you tried blowing away your .m2?

  Derek

  On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:

      I found this in the lift book and used it:

      mvn archetype:generate \
      -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
      -DarchetypeGroupId=net.liftweb \
      -DarchetypeArtifactId=lift-archetype-jpa-basic \
      -DarchetypeVersion=1.1-SNAPSHOT \
      -DgroupId=com.foo.jpaweb \
      -DartifactId=JPADemo \
      -Dversion=1.0-SNAPSHOT

      During the creation of the basic jpa app, I got this:

      Downloading:
     http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      44K
      
  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
      [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
      '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
      '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
      Downloading:
     http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      44K
      
  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
      [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
      '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
      '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING

      And a bunch of warnings:

      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 37,column 16] 
  :
      ${scala.version} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 43,column 16] 
  :
      ${scala.version} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 85,column 25] 
  :
      ${scala.version} is not a valid reference.
      [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/web/pom.xml [line 13,column
      9] : ${parent.artifactId} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/web/pom.xml [line 24,column
      16] : ${pom.groupId} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/web/pom.xml [line 26,column
      16] : ${pom.version} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/spa/pom.xml [line 14,column
      9] : ${parent.artifactId} is not a valid reference.

      The build completed successfully anyway. Afterward, I tried mvn
      compile in the top directory and got the following error:

      [WARNING]
      
  /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:70:
      error: type mismatch;
      [WARNING]  found   :
      net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]
      [WARNING]  required:
      net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]
      [WARNING]       case null =
      Full(LiftRules.defaultLocaleCalculator(request))
      [WARNING]                                                             ^
      [WARNING]
      
  /private/var/www/lift/admin/web/src/main/scala/bootstrap/liftweb/Boot.scala:75:
      error: type mismatch;
      [WARNING]  found   :
      (net.liftweb.util.Box[javax.servlet.http.HttpServletRequest]) =
      java.util.Locale
      [WARNING]  required:
      (net.liftweb.util.Box[net.liftweb.http.provider.HTTPRequest]) =
      java.util.Locale
      

[Lift] Re: JPA blank archetype

2009-08-24 Thread Charles F. Munat

Hi, Marius...

I don't know what you mean by Are you using master? What I did was use 
the Maven archetype to create a basic JPA lift app. Then I changed 
directory to the top directory and ran mvn compile. That's it. I got 
the errors you see. I didn't do anything else.

I've tried blowing away .m2 and I've tried changing the scala version to 
2.7.5 (from 2.7.4). No difference.

Does the basic JPA lift app not compile until you do something else to 
it? The blank one worked fine. Can you create and compile the Basic JPA 
app on your machine without error? Maybe it's something on my machine, 
but everything else is working fine.

The Maven command I used is reproduced below.

Chas.

marius d. wrote:
 Charles,
 
 AFAIK I removed all dependencies to javax.servlet.* classes even from
 archetypes.  Are you using master? ... I did a full search and servlet
 things are not being used. The archetype looks ok to me ... Am I
 missing something?
 
 Br's,
 Marius
 
 On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
 Nope. Same error, even after blowing away m2 and rerunning the basic
 archetype to create a new app.

 Chas.

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

[Lift] Re: JPA blank archetype

2009-08-24 Thread Indrajit Raychaudhuri

Charles,

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

/Indrajit

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

On Aug 24, 1:49 pm, Charles F. Munat c...@munat.com wrote:
 Hi, Marius...

 I don't know what you mean by Are you using master? What I did was use
 the Maven archetype to create a basic JPA lift app. Then I changed
 directory to the top directory and ran mvn compile. That's it. I got
 the errors you see. I didn't do anything else.

 I've tried blowing away .m2 and I've tried changing the scala version to
 2.7.5 (from 2.7.4). No difference.

 Does the basic JPA lift app not compile until you do something else to
 it? The blank one worked fine. Can you create and compile the Basic JPA
 app on your machine without error? Maybe it's something on my machine,
 but everything else is working fine.

 The Maven command I used is reproduced below.

 Chas.

 marius d. wrote:
  Charles,

  AFAIK I removed all dependencies to javax.servlet.* classes even from
  archetypes.  Are you using master? ... I did a full search and servlet
  things are not being used. The archetype looks ok to me ... Am I
  missing something?

  Br's,
  Marius

  On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
  Nope. Same error, even after blowing away m2 and rerunning the basic
  archetype to create a new app.

  Chas.

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

[Lift] Re: JPA blank archetype

2009-08-24 Thread marius d.

What I means is if you did a git pull from git master and ran mvn
clean:clean install. That inherently means version 1.1-SNAPSHOT

Br's,
marius

On Aug 24, 11:49 am, Charles F. Munat c...@munat.com wrote:
 Hi, Marius...

 I don't know what you mean by Are you using master? What I did was use
 the Maven archetype to create a basic JPA lift app. Then I changed
 directory to the top directory and ran mvn compile. That's it. I got
 the errors you see. I didn't do anything else.

 I've tried blowing away .m2 and I've tried changing the scala version to
 2.7.5 (from 2.7.4). No difference.

 Does the basic JPA lift app not compile until you do something else to
 it? The blank one worked fine. Can you create and compile the Basic JPA
 app on your machine without error? Maybe it's something on my machine,
 but everything else is working fine.

 The Maven command I used is reproduced below.

 Chas.

 marius d. wrote:
  Charles,

  AFAIK I removed all dependencies to javax.servlet.* classes even from
  archetypes.  Are you using master? ... I did a full search and servlet
  things are not being used. The archetype looks ok to me ... Am I
  missing something?

  Br's,
  Marius

  On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
  Nope. Same error, even after blowing away m2 and rerunning the basic
  archetype to create a new app.

  Chas.

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

[Lift] Re: JPA blank archetype

2009-08-24 Thread Indrajit Raychaudhuri

Tim,

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

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

/Indrajit

On Aug 24, 2:02 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Chas,

 Marius means are you using the *latest* 1.1-SNAPSHOT?

 I have some works to do on the maven archetypes in the next couple of days
 so I'll make sure they are all working correctly when I do the code
 refactoring.

 Cheers, Tim

 On 24/08/2009 09:49, Charles F. Munat c...@munat.com wrote:



  Hi, Marius...

  I don't know what you mean by Are you using master? What I did was use
  the Maven archetype to create a basic JPA lift app. Then I changed
  directory to the top directory and ran mvn compile. That's it. I got
  the errors you see. I didn't do anything else.

  I've tried blowing away .m2 and I've tried changing the scala version to
  2.7.5 (from 2.7.4). No difference.

  Does the basic JPA lift app not compile until you do something else to
  it? The blank one worked fine. Can you create and compile the Basic JPA
  app on your machine without error? Maybe it's something on my machine,
  but everything else is working fine.

  The Maven command I used is reproduced below.

  Chas.

  marius d. wrote:
  Charles,

  AFAIK I removed all dependencies to javax.servlet.* classes even from
  archetypes.  Are you using master? ... I did a full search and servlet
  things are not being used. The archetype looks ok to me ... Am I
  missing something?

  Br's,
  Marius

  On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
  Nope. Same error, even after blowing away m2 and rerunning the basic
  archetype to create a new app.

  Chas.

  Charles F. Munat wrote:
  No on blowing away m2. I did switch to the blank archetype (which is
  what I actually wanted) and it worked fine. But I can try again with the
  basic and blowing away m2.
  Chas.
  Derek Chen-Becker wrote:
  It looks like this is still the older archive before HttpServletRequest
  → HTTPRequest. The code in master has the change applied, so I'm not
  sure why it's failing. The warnings are normal (I haven't figured out
  all of the tricks with the velocity templating), but something isn't
  being pulled correctly. Have you tried blowing away your .m2?
  Derek
  On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
  I found this in the lift book and used it:
  mvn archetype:generate \
  -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
  -DarchetypeGroupId=net.liftweb \
  -DarchetypeArtifactId=lift-archetype-jpa-basic \
  -DarchetypeVersion=1.1-SNAPSHOT \
  -DgroupId=com.foo.jpaweb \
  -DartifactId=JPADemo \
  -Dversion=1.0-SNAPSHOT
  During the creation of the basic jpa app, I got this:
  Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
  44K

  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
  downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
  [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
  '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
  '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
  Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
  44K

  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
  downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
  [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
  '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
  '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
  And a bunch of warnings:
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template = archetype-resources/pom.xml [line 37,column 
  16]
  :
  ${scala.version} is not a valid reference.
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template = archetype-resources/pom.xml [line 43,column 
  16]
  :
  ${scala.version} is not a valid reference.
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template = archetype-resources/pom.xml [line 85,column 
  25]
  :
  ${scala.version} is not a valid reference.
  [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template = archetype-resources/web/pom.xml [line 
  13,column
  9] : ${parent.artifactId} is not a valid reference.
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template = archetype-resources/web/pom.xml [line 
  24,column
  16] : 

[Lift] why ajaxButton not submit the form

2009-08-24 Thread pravin

Hi
i have form with text box and Submit button(with ajax Submit button)

But when i submit the button form is not submitting so i am not able
to get the value of text box..
onclick function get called...

Just i want to show text value in response with ajax ...
how can i do this

--~--~-~--~~~---~--~~
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 create (meta) mapper mixin?

2009-08-24 Thread Jeppe Nejsum Madsen

Hi,

I'm trying to create some mixins to be applied to mapper/metamapper
objects to be used when objects are always owned by an account
(ie. a multi tenant db)

The mapper parts works fine:

trait OwnedEntity {
  self: BaseMapper =

  object account extends MappedLongForeignKey(this.asInstanceOf[MapperType], 
Account) {
override def dbColumnName = account_id
override def dbDisplay_? = false
override def defaultValue = Account.currentAccount
  }
}

but I can't seem to figure out the correct type bounds to create a
MetaMapper mixin that uses the above. Simple example with just a findMap
that finds all the entities owned by the current account:

trait MetaOwnedEntity[A : OwnedEntity] {
self: A with MetaMapper[A] =
  
// Find and map all entities owner by current account
def findMap[T](f: MapperType = Box[T]) : List[T] = findMap(By(account, 
Account.currentAccount))(f)
}

this fails compilation (1.1-SNAPSHOT), any clues?

EntityUtils.scala:23: error: overloaded method value apply with alternatives [O 
: net.liftweb.mapper.Mapper[O],T,Q : 
net.liftweb.mapper.KeyedMapper[T,Q]](net.liftweb.mapper.MappedForeignKey[T,O,Q],net.liftweb.util.Box[Q])net.liftweb.mapper.Cmp[O,T]
 and [O : net.liftweb.mapper.Mapper[O],T,Q : 
net.liftweb.mapper.KeyedMapper[T,Q]](net.liftweb.mapper.MappedForeignKey[T,O,Q],Q)net.liftweb.mapper.Cmp[O,T]
 and [O : 
net.liftweb.mapper.Mapper[O],T,U](net.liftweb.mapper.MappedField[T,O],U)(implicit
 (U) = T)net.liftweb.mapper.Cmp[O,T] cannot be applied to 
(MetaOwnedEntity.this.account.type,Long)
def findMap[T](f: MapperType = Box[T]) : List[T] = findMap(By(account, 
Account.currentAccount))(f)

/Jeppe






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



[Lift] Re: Include build # in LiftVersion?

2009-08-24 Thread Indrajit Raychaudhuri

Tim,

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

/Indrajit


On Aug 23, 4:15 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Indrajit,

 We actually discussed this a while back for the installers, and the
 long term plan is still that we do something like this to speed the
 getting started process if you know of any generation plugins that
 could potentially serve as a starting point that would be great!

 This stuff is certainly on the radar, but as always its a case of time
 and resources :-)

 Cheers, Tim

 On Aug 22, 2:48 pm, Indrajit Raychaudhuri indraj...@gmail.com wrote:

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

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

  /Indrajit

  On Aug 21, 11:51 pm, Timothy Perrett timo...@getintheloop.eu wrote:

   Perhaps its worth going to market (as it were) to check that there is 
   either
   no single solution, nor a number of other solutions (mojos) that we could
   string together to get what we want? Im not sure that the effort involved 
   in
   making our own is warranted given the output...

   Perhaps someone in the wider java/maven land has some existing effort in a
   repo someplace...

   Cheers, Tim

   On 21/08/2009 17:53, David Pollak feeder.of.the.be...@gmail.com wrote:

Gaacckkk... that's the first thought that comes to mind... ;-)

Looks like our choices are:
- Write our own Maven plugin and/or update the BuildNumber plugin
- Avoid the feature

We actually have the build time already in the manifest.  I'd love to 
get the
repo and the fingerprint in there as well.
 

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



[Lift] Re: How to create (meta) mapper mixin?

2009-08-24 Thread jon

Hi Jeppe,

I did something similar with the following code:

trait HasUser [T : HasUser[T]] extends KeyedMapper[Long, T]{
  self: T=
object user extends MappedLongForeignKey(this, User) {
  override def dbColumnName = user_id
}
}

trait HasUserMetaMapper[T : HasUser[T]] {
self: T with LongKeyedMetaMapper[T] =

def findAllByUserId(uid:Long) = findAll(By(user,uid))
}

On Aug 24, 5:31 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Hi,

 I'm trying to create some mixins to be applied to mapper/metamapper
 objects to be used when objects are always owned by an account
 (ie. a multi tenant db)

 The mapper parts works fine:

 trait OwnedEntity {
   self: BaseMapper =

   object account extends MappedLongForeignKey(this.asInstanceOf[MapperType], 
 Account) {
     override def dbColumnName = account_id
     override def dbDisplay_? = false
     override def defaultValue = Account.currentAccount
   }

 }

 but I can't seem to figure out the correct type bounds to create a
 MetaMapper mixin that uses the above. Simple example with just a findMap
 that finds all the entities owned by the current account:

 trait MetaOwnedEntity[A : OwnedEntity] {
     self: A with MetaMapper[A] =

     // Find and map all entities owner by current account
     def findMap[T](f: MapperType = Box[T]) : List[T] = findMap(By(account, 
 Account.currentAccount))(f)

 }

 this fails compilation (1.1-SNAPSHOT), any clues?

 EntityUtils.scala:23: error: overloaded method value apply with alternatives 
 [O : net.liftweb.mapper.Mapper[O],T,Q : 
 net.liftweb.mapper.KeyedMapper[T,Q]](net.liftweb.mapper.MappedForeignKey[T, 
 O,Q],net.liftweb.util.Box[Q])net.liftweb.mapper.Cmp[O,T] and [O : 
 net.liftweb.mapper.Mapper[O],T,Q : 
 net.liftweb.mapper.KeyedMapper[T,Q]](net.liftweb.mapper.MappedForeignKey[T, 
 O,Q],Q)net.liftweb.mapper.Cmp[O,T] and [O : 
 net.liftweb.mapper.Mapper[O],T,U](net.liftweb.mapper.MappedField[T,O],U)(im 
 plicit (U) = T)net.liftweb.mapper.Cmp[O,T] cannot be applied to 
 (MetaOwnedEntity.this.account.type,Long)
     def findMap[T](f: MapperType = Box[T]) : List[T] = findMap(By(account, 
 Account.currentAccount))(f)

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



[Lift] Re: why ajaxButton not submit the form

2009-08-24 Thread Ryan Donahue

The problem you are encountering may be related to this (see David's
response):
http://groups.google.com/group/liftweb/browse_thread/thread/f8c6a2a4cee52dc6/

On Aug 24, 5:16 am, pravin pravinka...@gmail.com wrote:
 Hi
 i have form with text box and Submit button(with ajax Submit button)

 But when i submit the button form is not submitting so i am not able
 to get the value of text box..
 onclick function get called...

 Just i want to show text value in response with ajax ...
 how can i do this
--~--~-~--~~~---~--~~
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 Core Missing on mvn install

2009-08-24 Thread Peter Robinett

Ahh, I see, my snapshots repository was incorrect and had the same id,
scala-tools.org, as the releases repository and so was being ignored.
It's all working now.

Thanks,
Peter

On Aug 23, 3:52 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 You need to put the snapshots repository in your repository listing:
   repositories
     repository
       idscala-tools.org/id
       nameScala-Tools Maven2 Repository/name
       urlhttp://scala-tools.org/repo-releases/url
     /repository
     repository
       idscala-tools.org.snapshots/id
       nameScala-Tools Maven2 Repository for Snapshots/name
       urlhttp://scala-tools.org/repo-snapshots/url
       snapshots /
     /repository
   /repositories

 On Sun, Aug 23, 2009 at 3:48 PM, Peter Robinett 
 pe...@bubblefoundry.comwrote:





  Hi Derek,

  I hadn't tried deleting my .m2 directory but unfortunately that didn't
  help:http://gist.github.com/173501

  Peter

  On Aug 22, 5:46 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
   I don't see anything in the pom.xml that should be causing an issue. Have
   you tried wiping your .m2 repository? Sometimes Maven gets stuck. If you
  do
   that and you still get the issue, could you post the full output from
  mvn
   -e clean install?

   Derek

   On Fri, Aug 21, 2009 at 6:42 PM, Peter Robinett pe...@bubblefoundry.com
  wrote:

Hi all,

I think I have a problem with my pom.xml file, as when I run 'mvn
install' I get an error saying that Lift Core is missing. 'mvn
jetty:run' works fine. My pom.xml is here:
 http://gist.github.com/172540

I'd appreciate any tips. Thanks!

Peter Robinett

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [Lift committers] Documentation

2009-08-24 Thread Naftoli Gugenheim

Anyone want to make a list of questions that need to be documented? :)

-
Tim Perretttimo...@getintheloop.eu wrote:


Folks,

Im sure others have noticed, but there are a serious amount of n00b
questions in and around mapper recently - this indicates to me that
people are not finding the information elsewhere (i.e. on our wiki).
Whilst I can document stuff I know about, there are a lot of stuff
people are asking about Mapper in particular that is outside of my
realm and therefore im not able to document...

Can we just club together and all take a slice of the documenting pie?
It strikes me this would slash the volume of repetitive questions on
list (as it seems like most people just ask without googling the
archives)

Cheers, Tim


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



[Lift] Re: How to create (meta) mapper mixin?

2009-08-24 Thread Jeppe Nejsum Madsen

jon jonhoff...@gmail.com writes:

 Hi Jeppe,

 I did something similar with the following code:

 trait HasUser [T : HasUser[T]] extends KeyedMapper[Long, T]{
   self: T=
 object user extends MappedLongForeignKey(this, User) {
 override def dbColumnName = user_id
 }
 }

 trait HasUserMetaMapper[T : HasUser[T]] {
 self: T with LongKeyedMetaMapper[T] =

 def findAllByUserId(uid:Long) = findAll(By(user,uid))
 }

Thanks for this example. One difference is that you extend
KeyedMapper. I think it could be nice to avoid this (like what I have
below) to make the user/account mixin independent of the actual mapper
(and to enable several such traits to be mixed in. Not sure what happens
if several traits, each extending KeyedMapper, get mixed in??)

But now my head hurts from trying to figure out the correct type
declaration in MetaMapper to make this happen :-) 

/Jeppe


 On Aug 24, 5:31 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Hi,

 I'm trying to create some mixins to be applied to mapper/metamapper
 objects to be used when objects are always owned by an account
 (ie. a multi tenant db)

 The mapper parts works fine:

 trait OwnedEntity {
   self: BaseMapper =

   object account extends MappedLongForeignKey(this.asInstanceOf[MapperType], 
 Account) {
     override def dbColumnName = account_id
     override def dbDisplay_? = false
     override def defaultValue = Account.currentAccount
   }

 }

 but I can't seem to figure out the correct type bounds to create a
 MetaMapper mixin that uses the above. Simple example with just a findMap
 that finds all the entities owned by the current account:

 trait MetaOwnedEntity[A : OwnedEntity] {
     self: A with MetaMapper[A] =

     // Find and map all entities owner by current account
     def findMap[T](f: MapperType = Box[T]) : List[T] = findMap(By(account, 
 Account.currentAccount))(f)

 }

 this fails compilation (1.1-SNAPSHOT), any clues?

 EntityUtils.scala:23: error: overloaded method value apply with alternatives 
 [O : net.liftweb.mapper.Mapper[O],T,Q : 
 net.liftweb.mapper.KeyedMapper[T,Q]](net.liftweb.mapper.MappedForeignKey[T, 
 O,Q],net.liftweb.util.Box[Q])net.liftweb.mapper.Cmp[O,T] and [O : 
 net.liftweb.mapper.Mapper[O],T,Q : 
 net.liftweb.mapper.KeyedMapper[T,Q]](net.liftweb.mapper.MappedForeignKey[T, 
 O,Q],Q)net.liftweb.mapper.Cmp[O,T] and [O : 
 net.liftweb.mapper.Mapper[O],T,U](net.liftweb.mapper.MappedField[T,O],U)(im 
 plicit (U) = T)net.liftweb.mapper.Cmp[O,T] cannot be applied to 
 (MetaOwnedEntity.this.account.type,Long)
     def findMap[T](f: MapperType = Box[T]) : List[T] = findMap(By(account, 
 Account.currentAccount))(f)

 /Jeppe
 

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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Derek Chen-Becker
Looking at the latest sources jar for the JPA basic archetype, it has the
proper changes:

http://hudson.scala-tools.org/job/Lift/1152/net.liftweb$lift-archetype-jpa-basic/

But I can confirm that something is not right with the JAR on there. I'm
going to try to do a local build and see if something isn't working
correctly in the archetype generation.

Derek

2009/8/24 Indrajit Raychaudhuri indraj...@gmail.com


 Tim,

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

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

 /Indrajit

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

[Lift] Comet Chat

2009-08-24 Thread Bjarte Stien Karlsen

Hello lifted,

I am playing around with the 50ish line based comet example that dpp
has talked about in several talks and that is written more about here:
http://m.3wa.com/?p=304

Today I showed this to a friend and it looks like the focus of the
input box is lost when an update is received. Does anybody have a clue
on how this can be fixed? Is it not possible to just update part of
the DOM without having to steal the focus from the input field?

-- 
Bjarte Stien Karlsen
Ronatoppen 6a, 4638 Kristiansand
95219547
MSN: m...@ibjarte.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] Looking for web hosting company for Lift

2009-08-24 Thread jack

I am looking for a web hosting company for my Lift project. I figure
anyone who does Java would work. Is this true? Can anyone recommend a
company?

--~--~-~--~~~---~--~~
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: Looking for web hosting company for Lift

2009-08-24 Thread David Pollak
On Mon, Aug 24, 2009 at 9:44 AM, jack jack.wid...@gmail.com wrote:


 I am looking for a web hosting company for my Lift project. I figure
 anyone who does Java would work. Is this true? Can anyone recommend a
 company?



Supercheap: http://prgmr.com/xen/
Cheap and scalable: http://calpop.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
Git some: http://github.com/dpp

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



[Lift] Re: Comet Chat

2009-08-24 Thread David Pollak
On Mon, Aug 24, 2009 at 9:05 AM, Bjarte Stien Karlsen 
bjarte.stien.karl...@gmail.com wrote:


 Hello lifted,

 I am playing around with the 50ish line based comet example that dpp
 has talked about in several talks and that is written more about here:
 http://m.3wa.com/?p=304

 Today I showed this to a friend and it looks like the focus of the
 input box is lost when an update is received. Does anybody have a clue
 on how this can be fixed? Is it not possible to just update part of
 the DOM without having to steal the focus from the input field?


Actually, the input field is being removed from the DOM by the rendering of
the chat text.

You can see a more complete Comet chat example at
http://demo.liftweb.net/chat

The code separates the input box from the chats so that the input box is not
destroyed each time the comet update happens.




 --
 Bjarte Stien Karlsen
 Ronatoppen 6a, 4638 Kristiansand
 95219547
 MSN: m...@ibjarte.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
Git some: http://github.com/dpp

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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Charles F. Munat

Incidentally, I got that Maven command string straight out of the Lift book.

Chas.

Derek Chen-Becker wrote:
 Looking at the latest sources jar for the JPA basic archetype, it has 
 the proper changes:
 
 http://hudson.scala-tools.org/job/Lift/1152/net.liftweb$lift-archetype-jpa-basic/
 
 But I can confirm that something is not right with the JAR on there. I'm 
 going to try to do a local build and see if something isn't working 
 correctly in the archetype generation.
 
 Derek
 
 2009/8/24 Indrajit Raychaudhuri indraj...@gmail.com 
 mailto:indraj...@gmail.com
 
 
 Tim,
 
 Quite likely he is effectively on *latest* 1.1-SNAPSHOT as he used -
 DarchetypeVersion=1.1-SNAPSHOT during archetype:create.
 
 Would look forward to the archetype refactoring.
 Meanwhile, I have created an issue summarizing the observations in
 http://github.com/dpp/liftweb/issues/#issue/52. Would be great if they
 can be addressed.
 
 /Indrajit
 
 On Aug 24, 2:02 pm, Timothy Perrett timo...@getintheloop.eu wrote:
   Chas,
  
   Marius means are you using the *latest* 1.1-SNAPSHOT?
  
   I have some works to do on the maven archetypes in the next
 couple of days
   so I'll make sure they are all working correctly when I do the code
   refactoring.
  
   Cheers, Tim
  
   On 24/08/2009 09:49, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
  
  
  
Hi, Marius...
  
I don't know what you mean by Are you using master? What I
 did was use
the Maven archetype to create a basic JPA lift app. Then I changed
directory to the top directory and ran mvn compile. That's
 it. I got
the errors you see. I didn't do anything else.
  
I've tried blowing away .m2 and I've tried changing the scala
 version to
2.7.5 (from 2.7.4). No difference.
  
Does the basic JPA lift app not compile until you do something
 else to
it? The blank one worked fine. Can you create and compile the
 Basic JPA
app on your machine without error? Maybe it's something on my
 machine,
but everything else is working fine.
  
The Maven command I used is reproduced below.
  
Chas.
  
marius d. wrote:
Charles,
  
AFAIK I removed all dependencies to javax.servlet.* classes
 even from
archetypes.  Are you using master? ... I did a full search and
 servlet
things are not being used. The archetype looks ok to me ... Am I
missing something?
  
Br's,
Marius
  
On Aug 24, 9:06 am, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
Nope. Same error, even after blowing away m2 and rerunning
 the basic
archetype to create a new app.
  
Chas.
  
Charles F. Munat wrote:
No on blowing away m2. I did switch to the blank archetype
 (which is
what I actually wanted) and it worked fine. But I can try
 again with the
basic and blowing away m2.
Chas.
Derek Chen-Becker wrote:
It looks like this is still the older archive before
 HttpServletRequest
→ HTTPRequest. The code in master has the change applied,
 so I'm not
sure why it's failing. The warnings are normal (I haven't
 figured out
all of the tricks with the velocity templating), but
 something isn't
being pulled correctly. Have you tried blowing away your .m2?
Derek
On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat
 c...@munat.com mailto:c...@munat.com
mailto:c...@munat.com mailto:c...@munat.com wrote:
I found this in the lift book and used it:
mvn archetype:generate \
   
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-jpa-basic \
-DarchetypeVersion=1.1-SNAPSHOT \
-DgroupId=com.foo.jpaweb \
-DartifactId=JPADemo \
-Dversion=1.0-SNAPSHOT
During the creation of the basic jpa app, I got this:
Downloading:
  
  
  
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
44K
  
   
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
[WARNING] *** CHECKSUM FAILED - Checksum failed on
 download: local =
'66b831a190e2e072816e5b2acc8064287d94b371'; remote =
'023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
Downloading:
  
  
  
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
44K
  
   
 

[Lift] Re: Looking for web hosting company for Lift

2009-08-24 Thread Naftoli Gugenheim
Also Rackspace Cloud Servers (Mosso) offers for about $10 full root access
to 256Mb RAM and 10Gb disk, which you can resize later. You pay by bandwidth
on top.

On Mon, Aug 24, 2009 at 1:32 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Mon, Aug 24, 2009 at 9:44 AM, jack jack.wid...@gmail.com wrote:


 I am looking for a web hosting company for my Lift project. I figure
 anyone who does Java would work. Is this true? Can anyone recommend a
 company?



 Supercheap: http://prgmr.com/xen/
 Cheap and scalable: http://calpop.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
 Git some: http://github.com/dpp


 


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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Charles F. Munat

Yes, it compiles successfully when the lift-core dependency in the web 
pom.xml file is set to version 1.1-M4.

Chas.

Indrajit Raychaudhuri wrote:
 Charles,
 
 Sorry for the false noise, setting lift-core dependency to
 version1.1-M4/version instead of  version1.1-SNAPSHOT/version
 in web/pom.xml quite likely would help better.
 
 /Indrajit
 
 NB: I have had created a lift jpa project internally and played with
 it for sometime. It took a while to filter out the exact delta wrt the
 barebone archetype. Hope this helps.
 
 On Aug 24, 1:49 pm, Charles F. Munat c...@munat.com wrote:
 Hi, Marius...

 I don't know what you mean by Are you using master? What I did was use
 the Maven archetype to create a basic JPA lift app. Then I changed
 directory to the top directory and ran mvn compile. That's it. I got
 the errors you see. I didn't do anything else.

 I've tried blowing away .m2 and I've tried changing the scala version to
 2.7.5 (from 2.7.4). No difference.

 Does the basic JPA lift app not compile until you do something else to
 it? The blank one worked fine. Can you create and compile the Basic JPA
 app on your machine without error? Maybe it's something on my machine,
 but everything else is working fine.

 The Maven command I used is reproduced below.

 Chas.

 marius d. wrote:
 Charles,
 AFAIK I removed all dependencies to javax.servlet.* classes even from
 archetypes.  Are you using master? ... I did a full search and servlet
 things are not being used. The archetype looks ok to me ... Am I
 missing something?
 Br's,
 Marius
 On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
 Nope. Same error, even after blowing away m2 and rerunning the basic
 archetype to create a new app.
 Chas.
 Charles F. Munat wrote:
 No on blowing away m2. I did switch to the blank archetype (which is
 what I actually wanted) and it worked fine. But I can try again with the
 basic and blowing away m2.
 Chas.
 Derek Chen-Becker wrote:
 It looks like this is still the older archive before HttpServletRequest
 → HTTPRequest. The code in master has the change applied, so I'm not
 sure why it's failing. The warnings are normal (I haven't figured out
 all of the tricks with the velocity templating), but something isn't
 being pulled correctly. Have you tried blowing away your .m2?
 Derek
 On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
 I found this in the lift book and used it:
 mvn archetype:generate \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-jpa-basic \
 -DarchetypeVersion=1.1-SNAPSHOT \
 -DgroupId=com.foo.jpaweb \
 -DartifactId=JPADemo \
 -Dversion=1.0-SNAPSHOT
 During the creation of the basic jpa app, I got this:
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
 And a bunch of warnings:
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 37,column 
 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 43,column 
 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 85,column 
 25] :
 ${scala.version} is not a valid reference.
 [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 
 13,column
 9] : ${parent.artifactId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 
 24,column
 16] : ${pom.groupId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 
 26,column
 16] : 

[Lift] Re: JPA blank archetype

2009-08-24 Thread Charles F. Munat

How would I know that? I presume that if I blew m2 away and then ran it, 
I'd get the latest snapshot. Wouldn't I?

Chas.

Timothy Perrett wrote:
 Chas,
 
 Marius means are you using the *latest* 1.1-SNAPSHOT?
 
 I have some works to do on the maven archetypes in the next couple of days
 so I'll make sure they are all working correctly when I do the code
 refactoring.
 
 Cheers, Tim
 
 On 24/08/2009 09:49, Charles F. Munat c...@munat.com wrote:
 
 Hi, Marius...

 I don't know what you mean by Are you using master? What I did was use
 the Maven archetype to create a basic JPA lift app. Then I changed
 directory to the top directory and ran mvn compile. That's it. I got
 the errors you see. I didn't do anything else.

 I've tried blowing away .m2 and I've tried changing the scala version to
 2.7.5 (from 2.7.4). No difference.

 Does the basic JPA lift app not compile until you do something else to
 it? The blank one worked fine. Can you create and compile the Basic JPA
 app on your machine without error? Maybe it's something on my machine,
 but everything else is working fine.

 The Maven command I used is reproduced below.

 Chas.

 marius d. wrote:
 Charles,

 AFAIK I removed all dependencies to javax.servlet.* classes even from
 archetypes.  Are you using master? ... I did a full search and servlet
 things are not being used. The archetype looks ok to me ... Am I
 missing something?

 Br's,
 Marius

 On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
 Nope. Same error, even after blowing away m2 and rerunning the basic
 archetype to create a new app.

 Chas.

 Charles F. Munat wrote:
 No on blowing away m2. I did switch to the blank archetype (which is
 what I actually wanted) and it worked fine. But I can try again with the
 basic and blowing away m2.
 Chas.
 Derek Chen-Becker wrote:
 It looks like this is still the older archive before HttpServletRequest
 → HTTPRequest. The code in master has the change applied, so I'm not
 sure why it's failing. The warnings are normal (I haven't figured out
 all of the tricks with the velocity templating), but something isn't
 being pulled correctly. Have you tried blowing away your .m2?
 Derek
 On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
 I found this in the lift book and used it:
 mvn archetype:generate \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-jpa-basic \
 -DarchetypeVersion=1.1-SNAPSHOT \
 -DgroupId=com.foo.jpaweb \
 -DartifactId=JPADemo \
 -Dversion=1.0-SNAPSHOT
 During the creation of the basic jpa app, I got this:
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
 And a bunch of warnings:
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 37,column 
 16]
 :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 43,column 
 16]
 :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 85,column 
 25]
 :
 ${scala.version} is not a valid reference.
 [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 
 13,column
 9] : ${parent.artifactId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 
 24,column
 16] : ${pom.groupId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 
 26,column
 16] : ${pom.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = 

[Lift] Re: JPA blank archetype

2009-08-24 Thread Charles F. Munat

I'm on a new laptop. I didn't do any git pulls of Lift stuff. I just 
installed Scala with the IZ installer and then Maven, then I ran the 
archetype command to create a basic JPA app and let it build the m2 
repository on my machine. When that didn't work, I blew away m2 and 
tried it again.

Changing the lift-core dependency worked. So the problem is definitely 
with 1.1-SNAPSHOT -- at least the one I ended up with.

Does this make sense? Do you see why I was confused by your reference to 
master?

Chas.

marius d. wrote:
 What I means is if you did a git pull from git master and ran mvn
 clean:clean install. That inherently means version 1.1-SNAPSHOT
 
 Br's,
 marius
 
 On Aug 24, 11:49 am, Charles F. Munat c...@munat.com wrote:
 Hi, Marius...

 I don't know what you mean by Are you using master? What I did was use
 the Maven archetype to create a basic JPA lift app. Then I changed
 directory to the top directory and ran mvn compile. That's it. I got
 the errors you see. I didn't do anything else.

 I've tried blowing away .m2 and I've tried changing the scala version to
 2.7.5 (from 2.7.4). No difference.

 Does the basic JPA lift app not compile until you do something else to
 it? The blank one worked fine. Can you create and compile the Basic JPA
 app on your machine without error? Maybe it's something on my machine,
 but everything else is working fine.

 The Maven command I used is reproduced below.

 Chas.

 marius d. wrote:
 Charles,
 AFAIK I removed all dependencies to javax.servlet.* classes even from
 archetypes.  Are you using master? ... I did a full search and servlet
 things are not being used. The archetype looks ok to me ... Am I
 missing something?
 Br's,
 Marius
 On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
 Nope. Same error, even after blowing away m2 and rerunning the basic
 archetype to create a new app.
 Chas.
 Charles F. Munat wrote:
 No on blowing away m2. I did switch to the blank archetype (which is
 what I actually wanted) and it worked fine. But I can try again with the
 basic and blowing away m2.
 Chas.
 Derek Chen-Becker wrote:
 It looks like this is still the older archive before HttpServletRequest
 → HTTPRequest. The code in master has the change applied, so I'm not
 sure why it's failing. The warnings are normal (I haven't figured out
 all of the tricks with the velocity templating), but something isn't
 being pulled correctly. Have you tried blowing away your .m2?
 Derek
 On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
 I found this in the lift book and used it:
 mvn archetype:generate \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-jpa-basic \
 -DarchetypeVersion=1.1-SNAPSHOT \
 -DgroupId=com.foo.jpaweb \
 -DartifactId=JPADemo \
 -Dversion=1.0-SNAPSHOT
 During the creation of the basic jpa app, I got this:
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
 And a bunch of warnings:
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 37,column 
 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 43,column 
 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 85,column 
 25] :
 ${scala.version} is not a valid reference.
 [WARNING] PT Don't override file /private/var/www/lift/admin/pom.xml
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 
 13,column
 9] : ${parent.artifactId} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/web/pom.xml [line 
 24,column
 16] : ${pom.groupId} is not a valid reference.
 [WARNING] 

[Lift] Re: JPA blank archetype

2009-08-24 Thread Indrajit Raychaudhuri

Chas,

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

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

Cheers, Indrajit

On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com wrote:
 I'm on a new laptop. I didn't do any git pulls of Lift stuff. I just
 installed Scala with the IZ installer and then Maven, then I ran the
 archetype command to create a basic JPA app and let it build the m2
 repository on my machine. When that didn't work, I blew away m2 and
 tried it again.

 Changing the lift-core dependency worked. So the problem is definitely
 with 1.1-SNAPSHOT -- at least the one I ended up with.

 Does this make sense? Do you see why I was confused by your reference to
 master?

 Chas.

 marius d. wrote:
  What I means is if you did a git pull from git master and ran mvn
  clean:clean install. That inherently means version 1.1-SNAPSHOT

  Br's,
  marius

  On Aug 24, 11:49 am, Charles F. Munat c...@munat.com wrote:
  Hi, Marius...

  I don't know what you mean by Are you using master? What I did was use
  the Maven archetype to create a basic JPA lift app. Then I changed
  directory to the top directory and ran mvn compile. That's it. I got
  the errors you see. I didn't do anything else.

  I've tried blowing away .m2 and I've tried changing the scala version to
  2.7.5 (from 2.7.4). No difference.

  Does the basic JPA lift app not compile until you do something else to
  it? The blank one worked fine. Can you create and compile the Basic JPA
  app on your machine without error? Maybe it's something on my machine,
  but everything else is working fine.

  The Maven command I used is reproduced below.

  Chas.

  marius d. wrote:
  Charles,
  AFAIK I removed all dependencies to javax.servlet.* classes even from
  archetypes.  Are you using master? ... I did a full search and servlet
  things are not being used. The archetype looks ok to me ... Am I
  missing something?
  Br's,
  Marius
  On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
  Nope. Same error, even after blowing away m2 and rerunning the basic
  archetype to create a new app.
  Chas.
  Charles F. Munat wrote:
  No on blowing away m2. I did switch to the blank archetype (which is
  what I actually wanted) and it worked fine. But I can try again with the
  basic and blowing away m2.
  Chas.
  Derek Chen-Becker wrote:
  It looks like this is still the older archive before HttpServletRequest
  → HTTPRequest. The code in master has the change applied, so I'm not
  sure why it's failing. The warnings are normal (I haven't figured out
  all of the tricks with the velocity templating), but something isn't
  being pulled correctly. Have you tried blowing away your .m2?
  Derek
  On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
      I found this in the lift book and used it:
      mvn archetype:generate \
      -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
      -DarchetypeGroupId=net.liftweb \
      -DarchetypeArtifactId=lift-archetype-jpa-basic \
      -DarchetypeVersion=1.1-SNAPSHOT \
      -DgroupId=com.foo.jpaweb \
      -DartifactId=JPADemo \
      -Dversion=1.0-SNAPSHOT
      During the creation of the basic jpa app, I got this:
      Downloading:
     
  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      44K
      
  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
      [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local 
  =
      '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
      '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
      Downloading:
     
  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      44K
      
  http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
      downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
      [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local 
  =
      '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
      '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
      And a bunch of warnings:
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 37,column 
  16] :
      ${scala.version} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 43,column 
  16] :
      ${scala.version} is not a valid reference.
      [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
      reference : template = archetype-resources/pom.xml [line 85,column 
  25] :
      ${scala.version} is not a valid reference.
      

[Lift] Re: Comet Chat

2009-08-24 Thread Wilson MacGyver

Hi Bjarte,

I am the one who wrote that post. It came out of a 1 hour presentation
that I did for my local java user group to show what lift can do. So it
was very minimal. Since most people attending are new to both
Scala and Lift.

I second David's suggestion. For a more full featured version
check out

http://demo.liftweb.net/chat

In fact http://demo.liftweb.net/ has quite a bit of example.
And I believe all the code are also available from David Pollak's
github repo.

Thanks,
Mac

On Mon, Aug 24, 2009 at 12:05 PM, Bjarte Stien
Karlsenbjarte.stien.karl...@gmail.com wrote:

 Hello lifted,

 I am playing around with the 50ish line based comet example that dpp
 has talked about in several talks and that is written more about here:
 http://m.3wa.com/?p=304

 Today I showed this to a friend and it looks like the focus of the
 input box is lost when an update is received. Does anybody have a clue
 on how this can be fixed? Is it not possible to just update part of
 the DOM without having to steal the focus from the input field?

 --
 Bjarte Stien Karlsen
 Ronatoppen 6a, 4638 Kristiansand
 95219547
 MSN: m...@ibjarte.com

 




-- 
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: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread marius d.

Just a FYI. I briefly talked with Martin and he said this idea is
possible but quite tricky. Stephane Micheloud did something similar
and he may share some of his work. I'm waiting some feedback from him.

Br's,
Marius

On Aug 24, 10:46 am, marius d. marius.dan...@gmail.com wrote:
 On Aug 24, 10:39 am, Viktor Klang viktor.kl...@gmail.com wrote:



  On Mon, Aug 24, 2009 at 8:13 AM, marius d. marius.dan...@gmail.com wrote:

   On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
   wrote:
On Sun, Aug 23, 2009 at 10:45 AM, marius d. marius.dan...@gmail.com
   wrote:

 Hmmm .. I'm wondering if we can write aScalacompilerpluginthat
 transform functions provided to Lift's S/SHtml function etc. into a
 richer FunctionX implementation that knows how to serialize it's
 members. We could restrict the types that as LiftSerializable on top
 of primitives, Calenars, SessionVar/RequestVar etc. If users need
 their own classes to be LiftSerilizable they would have to implement
 LiftSerializable trait.

I think we can do it without explicit traits.  I think we just need to
   walk
the graph for everything that's added to the LiftSession and see where 
it
leads.  Any graph we can walk is something that we can serialize... even
without Java serialization.  Any graph that ends in globals or some 
class
that refers to native stuff (e.g., IO), then we're toast.

   Totally agree. The rationale for explicit LiftSerializable would be
   just for user defined types. Otherwise user's won't have to use it.
   Graphs may also have be cyclic paths ... it shouldn't be too big of a
   pain though. Furthermore if a dependency graph path leads say to an IO
   reference maybe that's unintentional user code doesn't really use that
   but compiler put it for whatever reason. If such cases are possible
   and could be determined maybe we could exclude that silently from the
   serialization operation and add a compile time warning.

   I guess we need to dig more intoscalacompilerpluginsystem.

  1. Isn't there a problem with references _inside_ methods that are
  impure/sideeffecting?

  s = { Db.myCachedInfoNotInSession foo s  }

  Regarding member references, a simple check for transient
  (sca...@transient == java *transient*) to forcve people to use transient
  members for non-serializable state.

  But IMHO the serialization problem is a (negative?) sideeffect of Lifts rich
  model GUID=Func approach.
  Perhpas there is a middle way, a way where we can replicate just enough to
  survive a node crash?

 That's exactly it. We probably don't need everything that Java
 Serialization does. Just enough to make it consistent ... the
 dependency graphs that is actually used by the user's function.



 Thoughts?

 Br's,
 Marius

 On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
  At a first glace Java serialization is needed because of its
   awareness
  of the reference graph. But in the same time it does not perform
   well.
  One way might be the byte level instrumentation that would induce
   code
  to figure out the reference graph and know how to stream-ify it 
  using
  a given efficient protocol. But that induces risks and it involves
  tons of work. I think would be doable though.

  The problem is not really the technology of propagating session
  information to other nodes. That's the easiest part, but tough one 
  is
  figuring out the low level reference graph and serialization
  semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
  name it, are unlikely to help solving the fundamental problem.

  Br's,
  Marius

  On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:

   On Sun, Aug 23, 2009 at 7:04 PM, David

   Pollakfeeder.of.the.be...@gmail.com wrote:
On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
kev.lee.wri...@googlemail.com wrote:

I'm wondering if we can't leverage JavaSpaces to handle a lot 
of
 this
stuff.  From my experience with the technology it seems to be a
 pretty good
fit for the problem.

Two reasons:
- JavaSpaces is as far as I know, GPL and we will not mix any 
GPL
 into Lift

   JavaSpaces is just the specification. There are two 
   implementations
   I
   know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I
   don't
   have hands on experience with either.

- It doesn't solve the issue with low-level session replication
   which
 relies
on serialization of the session data for transfer to another app
 server
instance.

   Arthur

--
Lift, the simply functional web frameworkhttp://liftweb.net
BeginningScalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Git some:http://github.com/dpp

  --
  Viktor Klang

  Blog: klangism.blogspot.com

[Lift] Re: Comet Chat

2009-08-24 Thread David Pollak
On Mon, Aug 24, 2009 at 12:20 PM, Wilson MacGyver wmacgy...@gmail.comwrote:


 Hi Bjarte,

 I am the one who wrote that post. It came out of a 1 hour presentation
 that I did for my local java user group to show what lift can do. So it
 was very minimal. Since most people attending are new to both
 Scala and Lift.

 I second David's suggestion. For a more full featured version
 check out

 http://demo.liftweb.net/chat

 In fact http://demo.liftweb.net/ has quite a bit of example.
 And I believe all the code are also available from David Pollak's
 github repo.


All the demo.liftweb.net code is part of the Lift source distribution found
at http://github.com/dpp/liftweb/tree/master




 Thanks,
 Mac

 On Mon, Aug 24, 2009 at 12:05 PM, Bjarte Stien
 Karlsenbjarte.stien.karl...@gmail.com wrote:
 
  Hello lifted,
 
  I am playing around with the 50ish line based comet example that dpp
  has talked about in several talks and that is written more about here:
  http://m.3wa.com/?p=304
 
  Today I showed this to a friend and it looks like the focus of the
  input box is lost when an update is received. Does anybody have a clue
  on how this can be fixed? Is it not possible to just update part of
  the DOM without having to steal the focus from the input field?
 
  --
  Bjarte Stien Karlsen
  Ronatoppen 6a, 4638 Kristiansand
  95219547
  MSN: m...@ibjarte.com
 
  
 



 --
 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
Git some: http://github.com/dpp

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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Derek Chen-Becker
FYI, I did a local build and it's correct here, so something is going on in
Hudson land. I'm going to push a minor change to the pom for
lift-archetype-jpa-basic and see if that fixes it (remove the version for
the archetype plugin).

Derek

On Mon, Aug 24, 2009 at 12:23 PM, Indrajit Raychaudhuri indraj...@gmail.com
 wrote:


 Chas,

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

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

 Cheers, Indrajit

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

[Lift] Re: Structuring Web Application

2009-08-24 Thread greekscala

Hello,

ok. I know that I can compose my logic together.
But I dont know how to configure my parts and where to do it.

David says to create objects that do extend my traits?
How do you guys do it, so that you have a seperation of
Lift and application layer...?

I am getting better :D

thanks a lot

On 24 Aug., 00:19, greekscala hellectro...@gmail.com wrote:
 Hello David,

 thanks for helping.
 Do you mean by composing my business logic with traits
 like the example of Jonas 
 Bonerhttp://jonasboner.com/2008/10/06/real-world-scala-dependency-injectio...
 ?
 I understand the example.

 What do you mean by objects? The object Scala keyword?

 It would be great if you can give me a little example. How to glue it
 with a Lift Snippet.

 Thanks
 kind regards

 On 23 Aug., 19:23, David Pollak feeder.of.the.be...@gmail.com wrote:

  On Sun, Aug 23, 2009 at 5:15 AM, greekscala hellectro...@gmail.com wrote:

   Hello Timothy,

   thank you.
   I know that I do not need Spring for Scala.
   I dont expressed it well. How do I glue my app parts
   together. And how do I glue the lift part with a facade or
   application service of my domain layer.

  Use traits to describe the pieces of your business logic rather than
  classes.  Traits can be composed very easily.

  Don't use new, but use object's as factories that make run-time decisions
  about how to compose traits and vend them.

   Thanks for your help

   On 23 Aug., 13:12, Timothy Perrett timo...@getintheloop.eu wrote:
Can you please be more specific about your app tier that you wish to
access - im unfortunately not seeing what hurdle stops you from
accessing it just as you would from Java?

Cheers, Tim

On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:

 Hello Lift Community,

 I want to implement a new Project in Scala with Lift. I am new to
 Scala/Lift.
 Scala looks great and it expanded my horizon. FP is a new concept to
 me.

 My background is Java and a little bit of Spring. I read three Scala
 books
 and a lot on blogs. But there is a missing part for me on how to
 combine
 my classes. I read the Scalable Components Paper and I dont get it
 100%.
 I need a little bit more input on structuring a web app and I hope to
 get the 100%
 with you guys.
 With Spring you let the container manage the classes. ok.
 I think my problem is, I dont know how you structured a web app in
 days
 without Spring.

 I would like to have Lift access my domain logic over an application
 layer (Domain
 Driven Design).
 In Wicket I would have my SpringBean annotation.

 So I hope to understand, how
 - can I access my app layer?
 - how could I organize my domain logic. I want to use DDD. I know I
 have to use
 object and class in a bigger sense...?

 I hope you guys can give me some hints.

 Thanks a lot

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

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



[Lift] Re: MappedDateTime losing time?

2009-08-24 Thread Derek Chen-Becker
Yes, that should be fixed in both 1.1 and 1.0.1, really. I didn't even see
that issue. The code freeze for 1.0.1 was yesterday, so if I want to get
this fix in (which I think should be in there) then we'll need to push back
1.0.1. Let me send out a vote email.

On Sun, Aug 23, 2009 at 12:27 PM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:


 Derek Chen-Becker dchenbec...@gmail.com writes:

  It should be very safe to use 1.0.1-SNAPSHOT. I'm planning on spinning
 the
  release of 1.0.1 GA next Wednesday, so we're in a code freeze starting
  Sunday. Really, the 1.0 line is strictly bug-fix at this point
 (1.1-SNAPSHOT
  is where new features make it in). So far, the things that have made it
 into
  1.0.1 are:
 
  1. Proper Oracle support
  2. Fix for PostgreSQL double type
  3. The DateTime fix
  4. Some fixes for the Textile parser
  5. Some minor XML parsing fixes (PCDataMarkupParser)
  6. Some Actor fixes

 Derek, with the flurry of changes you're doing to the Db code (which is
 nice :-), it's increasingly difficult to maintain my own copy which
 fixes http://github.com/dpp/liftweb/issues#issue/36

 Any chance to get this included in 1.1 soon? (It's a two line fix :-)?

 /Jeppe

 


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



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread David Pollak
On Mon, Aug 24, 2009 at 12:36 PM, marius d. marius.dan...@gmail.com wrote:


 Just a FYI. I briefly talked with Martin and he said this idea is
 possible but quite tricky. Stephane Micheloud did something similar
 and he may share some of his work. I'm waiting some feedback from him.


I think we can do it at runtime in development mode.  This is just for data
gathering, not for actual implementation.  We just need to calculate whether
a given class is serializable once... so we don't have to worry about cyclic
graphs or anything else... just... are the slots (instance variables) for
each class serializable.




 Br's,
 Marius

 On Aug 24, 10:46 am, marius d. marius.dan...@gmail.com wrote:
  On Aug 24, 10:39 am, Viktor Klang viktor.kl...@gmail.com wrote:
 
 
 
   On Mon, Aug 24, 2009 at 8:13 AM, marius d. marius.dan...@gmail.com
 wrote:
 
On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Sun, Aug 23, 2009 at 10:45 AM, marius d. 
 marius.dan...@gmail.com
wrote:
 
  Hmmm .. I'm wondering if we can write aScalacompilerpluginthat
  transform functions provided to Lift's S/SHtml function etc. into
 a
  richer FunctionX implementation that knows how to serialize
 it's
  members. We could restrict the types that as LiftSerializable on
 top
  of primitives, Calenars, SessionVar/RequestVar etc. If users need
  their own classes to be LiftSerilizable they would have to
 implement
  LiftSerializable trait.
 
 I think we can do it without explicit traits.  I think we just need
 to
walk
 the graph for everything that's added to the LiftSession and see
 where it
 leads.  Any graph we can walk is something that we can serialize...
 even
 without Java serialization.  Any graph that ends in globals or some
 class
 that refers to native stuff (e.g., IO), then we're toast.
 
Totally agree. The rationale for explicit LiftSerializable would be
just for user defined types. Otherwise user's won't have to use it.
Graphs may also have be cyclic paths ... it shouldn't be too big of a
pain though. Furthermore if a dependency graph path leads say to an
 IO
reference maybe that's unintentional user code doesn't really use
 that
but compiler put it for whatever reason. If such cases are possible
and could be determined maybe we could exclude that silently from the
serialization operation and add a compile time warning.
 
I guess we need to dig more intoscalacompilerpluginsystem.
 
   1. Isn't there a problem with references _inside_ methods that are
   impure/sideeffecting?
 
   s = { Db.myCachedInfoNotInSession foo s  }
 
   Regarding member references, a simple check for transient
   (sca...@transient == java *transient*) to forcve people to use
 transient
   members for non-serializable state.
 
   But IMHO the serialization problem is a (negative?) sideeffect of Lifts
 rich
   model GUID=Func approach.
   Perhpas there is a middle way, a way where we can replicate just enough
 to
   survive a node crash?
 
  That's exactly it. We probably don't need everything that Java
  Serialization does. Just enough to make it consistent ... the
  dependency graphs that is actually used by the user's function.
 
 
 
  Thoughts?
 
  Br's,
  Marius
 
  On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com wrote:
   At a first glace Java serialization is needed because of its
awareness
   of the reference graph. But in the same time it does not
 perform
well.
   One way might be the byte level instrumentation that would
 induce
code
   to figure out the reference graph and know how to stream-ify it
 using
   a given efficient protocol. But that induces risks and it
 involves
   tons of work. I think would be doable though.
 
   The problem is not really the technology of propagating session
   information to other nodes. That's the easiest part, but tough
 one is
   figuring out the low level reference graph and serialization
   semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA,
 you
   name it, are unlikely to help solving the fundamental problem.
 
   Br's,
   Marius
 
   On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:
 
On Sun, Aug 23, 2009 at 7:04 PM, David
 
Pollakfeeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
 kev.lee.wri...@googlemail.com wrote:
 
 I'm wondering if we can't leverage JavaSpaces to handle a
 lot of
  this
 stuff.  From my experience with the technology it seems to
 be a
  pretty good
 fit for the problem.
 
 Two reasons:
 - JavaSpaces is as far as I know, GPL and we will not mix
 any GPL
  into Lift
 
JavaSpaces is just the specification. There are two
 implementations
I
know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?).
 I
don't
have 

[Lift] Re: Menu builder group and li_item

2009-08-24 Thread Derek Chen-Becker
I think that that's a bug. I don't have time to look at it today, so please
file an issue.

Derek

On Sat, Aug 22, 2009 at 12:47 PM, george geo...@mattandgeorge.com wrote:


 I'm trying to work with a SiteMap which has some different LocGroups.

 When I do:

 lift:Menu.builder li_item:class=selected /

 I can render a menu for the whole sitemap and the selected item has
 the class attribute applied.

 But, when I do:

 lift:Menu.builder group=site li_item:class=selected /

 I would expect the same behavior with a subset of items, but it just
 doesn't work. The selected item doesn't get the class attribute.

 However, if I do:

 lift:Menu.builder group=site li:class=hello /

 Every item gets the class attribute.

 To me this seems like a bug, or am I missing something?

 


--~--~-~--~~~---~--~~
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: why ajaxButton not submit the form

2009-08-24 Thread David Pollak
On Mon, Aug 24, 2009 at 2:16 AM, pravin pravinka...@gmail.com wrote:


 Hi
 i have form with text box and Submit button(with ajax Submit button)

 But when i submit the button form is not submitting so i am not able
 to get the value of text box..
 onclick function get called...


SHtml.ajaxButton is just that... a button that, when clicked by the user,
performs an ajax call to the server.




 Just i want to show text value in response with ajax ...
 how can i do this


Use SHtml.ajaxForm:


class Form2 {
  def render(xhtml: NodeSeq): NodeSeq = {
var user = 
def doAjaxThing(): JsCmd = {
  SetHtml(updated,
  spanHey Dude... I'm Form2 and the user is {user}/span)
}

SHtml.ajaxForm(
  bind(form, xhtml,
   user - SHtml.text(user, user = _),
   submit - (SHtml.hidden(doAjaxThing _) ++
input type=submit value=Click Me/)
 ))
  }
}


Or, if you use the lift:form tag in your view:

  div
Ajax Form v1: br/
lift:form
  lift:Form1
User: form:user/ br/
Okay? form:submit/
  /lift:Form1
/lift:form
  /div

You can do:

class Form1 {
  def render(xhtml: NodeSeq): NodeSeq = {
var user = 
def doAjaxThing(): JsCmd = {
  SetHtml(updated,
  spanHey Dude... I'm Form1 and the user is {user}/span)
}

bind(form, xhtml,
 user - SHtml.text(user, user = _),
 submit - (SHtml.hidden(doAjaxThing _) ++
 input type=submit value=Click Me/)
 )
  }
}

In enclosing running code that demonstrates both.

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
Git some: http://github.com/dpp

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



ajaxform.tgz
Description: GNU Zip compressed data


[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread Meredith Gregory
David,

Can one leave proxies in place for things that are not actually
serializable?

Best wishes,

--greg

On Mon, Aug 24, 2009 at 12:55 PM, David Pollak 
feeder.of.the.be...@gmail.com wrote:



 On Mon, Aug 24, 2009 at 12:36 PM, marius d. marius.dan...@gmail.comwrote:


 Just a FYI. I briefly talked with Martin and he said this idea is
 possible but quite tricky. Stephane Micheloud did something similar
 and he may share some of his work. I'm waiting some feedback from him.


 I think we can do it at runtime in development mode.  This is just for data
 gathering, not for actual implementation.  We just need to calculate whether
 a given class is serializable once... so we don't have to worry about cyclic
 graphs or anything else... just... are the slots (instance variables) for
 each class serializable.




 Br's,
 Marius

 On Aug 24, 10:46 am, marius d. marius.dan...@gmail.com wrote:
  On Aug 24, 10:39 am, Viktor Klang viktor.kl...@gmail.com wrote:
 
 
 
   On Mon, Aug 24, 2009 at 8:13 AM, marius d. marius.dan...@gmail.com
 wrote:
 
On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Sun, Aug 23, 2009 at 10:45 AM, marius d. 
 marius.dan...@gmail.com
wrote:
 
  Hmmm .. I'm wondering if we can write aScalacompilerpluginthat
  transform functions provided to Lift's S/SHtml function etc.
 into a
  richer FunctionX implementation that knows how to serialize
 it's
  members. We could restrict the types that as LiftSerializable on
 top
  of primitives, Calenars, SessionVar/RequestVar etc. If users
 need
  their own classes to be LiftSerilizable they would have to
 implement
  LiftSerializable trait.
 
 I think we can do it without explicit traits.  I think we just
 need to
walk
 the graph for everything that's added to the LiftSession and see
 where it
 leads.  Any graph we can walk is something that we can
 serialize... even
 without Java serialization.  Any graph that ends in globals or
 some class
 that refers to native stuff (e.g., IO), then we're toast.
 
Totally agree. The rationale for explicit LiftSerializable would be
just for user defined types. Otherwise user's won't have to use it.
Graphs may also have be cyclic paths ... it shouldn't be too big of
 a
pain though. Furthermore if a dependency graph path leads say to an
 IO
reference maybe that's unintentional user code doesn't really use
 that
but compiler put it for whatever reason. If such cases are possible
and could be determined maybe we could exclude that silently from
 the
serialization operation and add a compile time warning.
 
I guess we need to dig more intoscalacompilerpluginsystem.
 
   1. Isn't there a problem with references _inside_ methods that are
   impure/sideeffecting?
 
   s = { Db.myCachedInfoNotInSession foo s  }
 
   Regarding member references, a simple check for transient
   (sca...@transient == java *transient*) to forcve people to use
 transient
   members for non-serializable state.
 
   But IMHO the serialization problem is a (negative?) sideeffect of
 Lifts rich
   model GUID=Func approach.
   Perhpas there is a middle way, a way where we can replicate just
 enough to
   survive a node crash?
 
  That's exactly it. We probably don't need everything that Java
  Serialization does. Just enough to make it consistent ... the
  dependency graphs that is actually used by the user's function.
 
 
 
  Thoughts?
 
  Br's,
  Marius
 
  On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com
 wrote:
   At a first glace Java serialization is needed because of its
awareness
   of the reference graph. But in the same time it does not
 perform
well.
   One way might be the byte level instrumentation that would
 induce
code
   to figure out the reference graph and know how to stream-ify
 it using
   a given efficient protocol. But that induces risks and it
 involves
   tons of work. I think would be doable though.
 
   The problem is not really the technology of propagating
 session
   information to other nodes. That's the easiest part, but tough
 one is
   figuring out the low level reference graph and serialization
   semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA,
 you
   name it, are unlikely to help solving the fundamental problem.
 
   Br's,
   Marius
 
   On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:
 
On Sun, Aug 23, 2009 at 7:04 PM, David
 
Pollakfeeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
 kev.lee.wri...@googlemail.com wrote:
 
 I'm wondering if we can't leverage JavaSpaces to handle a
 lot of
  this
 stuff.  From my experience with the technology it seems
 to be a
  pretty good
 fit for the problem.
 
 Two reasons:
 - JavaSpaces is as far as I know, GPL and we will not mix
 

[Lift] Re: i want sample code for ajaxForm

2009-08-24 Thread David Pollak
Provided in a separate thread.

On Sun, Aug 23, 2009 at 11:47 PM, pravin pravinka...@gmail.com wrote:


 Hi,

 i have one text box and one submit button on my html form...

 how can i use ajaxForm method to do this,,,

 i go through the sample codes from sample application that lift
 provided ...but i want more details for ajaxForm


 Thanks in advance...


 -Pravin


 



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

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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Charles F. Munat

Thanks for all your help, Indrajit. I'm using the blank JPA app anyway, 
so it didn't affect me, but I thought Derek, et al should know. 
Especially since I was using the Maven command from his book...

Chas.

Indrajit Raychaudhuri wrote:
 Chas,
 
 The problem is quite likely with the archetype jar in the scala-tools
 repo. Derek is probably looking into it.
 Yes, your being confused about the master reference is
 understandable :)
 
 Good that it compiles through. For now, you can set the dependencies
 to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
 
 Cheers, Indrajit
 
 On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com wrote:
 I'm on a new laptop. I didn't do any git pulls of Lift stuff. I just
 installed Scala with the IZ installer and then Maven, then I ran the
 archetype command to create a basic JPA app and let it build the m2
 repository on my machine. When that didn't work, I blew away m2 and
 tried it again.

 Changing the lift-core dependency worked. So the problem is definitely
 with 1.1-SNAPSHOT -- at least the one I ended up with.

 Does this make sense? Do you see why I was confused by your reference to
 master?

 Chas.

 marius d. wrote:
 What I means is if you did a git pull from git master and ran mvn
 clean:clean install. That inherently means version 1.1-SNAPSHOT
 Br's,
 marius
 On Aug 24, 11:49 am, Charles F. Munat c...@munat.com wrote:
 Hi, Marius...
 I don't know what you mean by Are you using master? What I did was use
 the Maven archetype to create a basic JPA lift app. Then I changed
 directory to the top directory and ran mvn compile. That's it. I got
 the errors you see. I didn't do anything else.
 I've tried blowing away .m2 and I've tried changing the scala version to
 2.7.5 (from 2.7.4). No difference.
 Does the basic JPA lift app not compile until you do something else to
 it? The blank one worked fine. Can you create and compile the Basic JPA
 app on your machine without error? Maybe it's something on my machine,
 but everything else is working fine.
 The Maven command I used is reproduced below.
 Chas.
 marius d. wrote:
 Charles,
 AFAIK I removed all dependencies to javax.servlet.* classes even from
 archetypes.  Are you using master? ... I did a full search and servlet
 things are not being used. The archetype looks ok to me ... Am I
 missing something?
 Br's,
 Marius
 On Aug 24, 9:06 am, Charles F. Munat c...@munat.com wrote:
 Nope. Same error, even after blowing away m2 and rerunning the basic
 archetype to create a new app.
 Chas.
 Charles F. Munat wrote:
 No on blowing away m2. I did switch to the blank archetype (which is
 what I actually wanted) and it worked fine. But I can try again with the
 basic and blowing away m2.
 Chas.
 Derek Chen-Becker wrote:
 It looks like this is still the older archive before HttpServletRequest
 → HTTPRequest. The code in master has the change applied, so I'm not
 sure why it's failing. The warnings are normal (I haven't figured out
 all of the tricks with the velocity templating), but something isn't
 being pulled correctly. Have you tried blowing away your .m2?
 Derek
 On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
 I found this in the lift book and used it:
 mvn archetype:generate \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-jpa-basic \
 -DarchetypeVersion=1.1-SNAPSHOT \
 -DgroupId=com.foo.jpaweb \
 -DartifactId=JPADemo \
 -Dversion=1.0-SNAPSHOT
 During the creation of the basic jpa app, I got this:
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local 
 =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - RETRYING
 Downloading:

 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 44K
 
 http://scala-tools.org/repo-snapshots/net/liftweb/lift-archetype-jpa-...
 downloaded  (lift-archetype-jpa-basic-1.1-SNAPSHOT.jar)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local 
 =
 '66b831a190e2e072816e5b2acc8064287d94b371'; remote =
 '023a3bb1cf2994e837b18394a2eb3975c8735552' - IGNORING
 And a bunch of warnings:
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 37,column 
 16] :
 ${scala.version} is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template = archetype-resources/pom.xml [line 43,column 
 16] :
 ${scala.version} is not a valid reference.
 [WARNING] 

[Lift] Re: error while SHtml.ajaxInvoke call

2009-08-24 Thread David Pollak
I've provided sample code on a separate thread.

On Sun, Aug 23, 2009 at 10:29 PM, pravin pravinka...@gmail.com wrote:


 hi,
 its former method i am using in my app(u mentioned it in last reply).

 i have one text box and submit button.

 when i click on submit button -
 i have to show employee info on my GUI page.  (in text box i will
 enter emp Id))

 This info have to table
 one table have information with ajax and other have info with normal
 call.

 how can i populate these two table when i click on submit button...


 hope this will help u to understand my problem.


 Thanks...

 waiting for u reply

 On Aug 21, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  I still don't understand.
 
  Does the user do anything to get the faster table updated or do you want
 the
  faster table pushed from the server when something changes on the
 server?
 
  If it's the former (the user does something to get the faster table
  updated), you want to use ajaxButton... the user clicks on the button and
  the server-responds with JavaScript that updates the browser.
 
  If it's the latter (the user does nothing, but the server pushes changes
 to
  the client), see CometActor.  You can see an example in the Clock.scala
 code
  in the Lift sites/example project.
 
 
 
  On Fri, Aug 21, 2009 at 1:25 AM, pravin pravinka...@gmail.com wrote:
 
   Hi,
   Thanks for u r quick reply.
   Now I am explain my problem in details :
 
   I have normal form with one text box and one submit button.
 
   Also i have 2 table components(these are dynamic tables )..but these
   table are out of the from tag.These table only displays information.
 
   Flow of the application:
 
   When i click on submit button.
   i am population two Lists .
 
   One list get populated from DB.( Slower)
   second list get populated from hard code values (faster)
 
   Now i am populate above 2 tables with these two lists when i click on
   submit button.
 
   With the above flow i am able to populate above tables(synchronously).
 
   But now i want to configure Ajax into this so i can get faster
   results...(as one List get faster)
   while other list can get populated asynchronously.
 
   So when i click on Submit button i will populate one list ..but how
   can i populate other list with Ajax...
 
   i tried for following:
   i was planning when other table getting render  make ajax call with
   ajaxInvokebut i wont work...
 
   Please help ...
 
   Thanks in advance
 
   -Pravin
 
   On Aug 20, 6:56 pm, David Pollak feeder.of.the.be...@gmail.com
   wrote:
On Wed, Aug 19, 2009 at 10:50 PM, pravin pravinka...@gmail.com
 wrote:
 
 yes i have submit button.
 on click event of this i am doing other tasks.
 
What is the user interface (HTML) element that causes the Ajax update
 to
happen?  What does the user do in order to get the Ajax thing to
 happen?
 
ajaxInvoke is a very low level call.  If you want to have an Ajax
 button,
use SHtml.ajaxButton.  If you want to have an Ajax form, use
   SHtml.ajaxForm.
 If you can describe what the user interaction should be, I'll write
 up
   some
example code for you.
 
 above data population for text is not on click submit button.
 
 On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Are you trying to create a link/button that someone clicks on to
   cause
 the
  Ajax call to be made?
 
  On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com
   wrote:
 
   Hi ,
   i am trying to configure Ajax in my application using lift.
 
   I have :
 
   lift:DisplayResults.showFeeds
table border=0 width=100% class =
 resultheader
   cellpadding=10
   t:feedsResultRows/
   /table
   /lift:DisplayResults.showFeeds
 
   snippet for given html code :
 
   def showFeeds(xhtml:NodeSeq):NodeSeq ={
 println(Inside showFeeds);
 bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke
   (updateStartDate)._2)
   }
 
   def updateStartDate () : JsCmd= {
 
   JsCmds.SetHtml(resultsRow,
 displayResult(List(abc,xyz)))
}
 
   def displayResult(rList:List[Object]):NodeSeq={
 trtd 
table
   trtdrList(0).toString()}/
   td
   /tr
   trtd{rList(1).toString()}/a /
   td
   /tr
/table
   /td/tr
}
 
   But its not working-
   Giving out put on html page like-
lift_ajaxHandler('F966737512075R2E' +
 '=true',
   null, null)
 
   What is this 
   How can i use Ajax in my application.I want to give
 asynchronous
   call
   (Ajax) for my above html component so it can get show list that
 i
   get
   from Db call .
 
  

[Lift] Re: JPA blank archetype

2009-08-24 Thread Derek Chen-Becker
OK, I think I've found an issue here. The sha1 checksum file for the
archetype was last updated on August 1st, and haven't been updated since
then. That's what your original error was, and it's why it's grabbing an
older version of the jar :(. Let me see if I can figure out why hudson won't
recalculate the checksums.

Derek

On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com wrote:


 Thanks for all your help, Indrajit. I'm using the blank JPA app anyway,
 so it didn't affect me, but I thought Derek, et al should know.
 Especially since I was using the Maven command from his book...

 Chas.

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

[Lift] Re: Menu builder group and li_item

2009-08-24 Thread george

Issue is filed here:

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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Charles F. Munat

Ah, so the errors were connected after all. I was curious about the 
checksum, but I didn't realize that would make it grab an earlier version.

Derek Chen-Becker wrote:
 OK, I think I've found an issue here. The sha1 checksum file for the 
 archetype was last updated on August 1st, and haven't been updated since 
 then. That's what your original error was, and it's why it's grabbing an 
 older version of the jar :(. Let me see if I can figure out why hudson 
 won't recalculate the checksums.
 
 Derek
 
 On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 Thanks for all your help, Indrajit. I'm using the blank JPA app anyway,
 so it didn't affect me, but I thought Derek, et al should know.
 Especially since I was using the Maven command from his book...
 
 Chas.
 
 Indrajit Raychaudhuri wrote:
   Chas,
  
   The problem is quite likely with the archetype jar in the scala-tools
   repo. Derek is probably looking into it.
   Yes, your being confused about the master reference is
   understandable :)
  
   Good that it compiles through. For now, you can set the dependencies
   to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
  
   Cheers, Indrajit
  
   On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
   I'm on a new laptop. I didn't do any git pulls of Lift stuff. I just
   installed Scala with the IZ installer and then Maven, then I ran the
   archetype command to create a basic JPA app and let it build the m2
   repository on my machine. When that didn't work, I blew away m2 and
   tried it again.
  
   Changing the lift-core dependency worked. So the problem is
 definitely
   with 1.1-SNAPSHOT -- at least the one I ended up with.
  
   Does this make sense? Do you see why I was confused by your
 reference to
   master?
  
   Chas.
  
   marius d. wrote:
   What I means is if you did a git pull from git master and ran mvn
   clean:clean install. That inherently means version 1.1-SNAPSHOT
   Br's,
   marius
   On Aug 24, 11:49 am, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
   Hi, Marius...
   I don't know what you mean by Are you using master? What I
 did was use
   the Maven archetype to create a basic JPA lift app. Then I changed
   directory to the top directory and ran mvn compile. That's
 it. I got
   the errors you see. I didn't do anything else.
   I've tried blowing away .m2 and I've tried changing the scala
 version to
   2.7.5 (from 2.7.4). No difference.
   Does the basic JPA lift app not compile until you do something
 else to
   it? The blank one worked fine. Can you create and compile the
 Basic JPA
   app on your machine without error? Maybe it's something on my
 machine,
   but everything else is working fine.
   The Maven command I used is reproduced below.
   Chas.
   marius d. wrote:
   Charles,
   AFAIK I removed all dependencies to javax.servlet.* classes
 even from
   archetypes.  Are you using master? ... I did a full search
 and servlet
   things are not being used. The archetype looks ok to me ... Am I
   missing something?
   Br's,
   Marius
   On Aug 24, 9:06 am, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
   Nope. Same error, even after blowing away m2 and rerunning
 the basic
   archetype to create a new app.
   Chas.
   Charles F. Munat wrote:
   No on blowing away m2. I did switch to the blank archetype
 (which is
   what I actually wanted) and it worked fine. But I can try
 again with the
   basic and blowing away m2.
   Chas.
   Derek Chen-Becker wrote:
   It looks like this is still the older archive before
 HttpServletRequest
   → HTTPRequest. The code in master has the change applied,
 so I'm not
   sure why it's failing. The warnings are normal (I haven't
 figured out
   all of the tricks with the velocity templating), but
 something isn't
   being pulled correctly. Have you tried blowing away your .m2?
   Derek
   On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat
 c...@munat.com mailto:c...@munat.com
   mailto:c...@munat.com mailto:c...@munat.com wrote:
   I found this in the lift book and used it:
   mvn archetype:generate \
  
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
   -DarchetypeGroupId=net.liftweb \
   -DarchetypeArtifactId=lift-archetype-jpa-basic \
   -DarchetypeVersion=1.1-SNAPSHOT \
   -DgroupId=com.foo.jpaweb \
   -DartifactId=JPADemo \
   -Dversion=1.0-SNAPSHOT
   During the creation of the basic jpa app, I got this:
   Downloading:

[Lift] Re: JPA blank archetype

2009-08-24 Thread Derek Chen-Becker
Well. Bad news. I fixed the checksums only to find that somehow hudson is
still generating archetypes with old sources. I'm at a loss as to how this
is happening at this point...

Derek

On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com wrote:


 Ah, so the errors were connected after all. I was curious about the
 checksum, but I didn't realize that would make it grab an earlier version.

 Derek Chen-Becker wrote:
  OK, I think I've found an issue here. The sha1 checksum file for the
  archetype was last updated on August 1st, and haven't been updated since
  then. That's what your original error was, and it's why it's grabbing an
  older version of the jar :(. Let me see if I can figure out why hudson
  won't recalculate the checksums.
 
  Derek
 
  On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  Thanks for all your help, Indrajit. I'm using the blank JPA app
 anyway,
  so it didn't affect me, but I thought Derek, et al should know.
  Especially since I was using the Maven command from his book...
 
  Chas.
 
  Indrajit Raychaudhuri wrote:
Chas,
   
The problem is quite likely with the archetype jar in the
 scala-tools
repo. Derek is probably looking into it.
Yes, your being confused about the master reference is
understandable :)
   
Good that it compiles through. For now, you can set the
 dependencies
to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
   
Cheers, Indrajit
   
On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
I'm on a new laptop. I didn't do any git pulls of Lift stuff. I
 just
installed Scala with the IZ installer and then Maven, then I ran
 the
archetype command to create a basic JPA app and let it build the
 m2
repository on my machine. When that didn't work, I blew away m2
 and
tried it again.
   
Changing the lift-core dependency worked. So the problem is
  definitely
with 1.1-SNAPSHOT -- at least the one I ended up with.
   
Does this make sense? Do you see why I was confused by your
  reference to
master?
   
Chas.
   
marius d. wrote:
What I means is if you did a git pull from git master and ran
 mvn
clean:clean install. That inherently means version 1.1-SNAPSHOT
Br's,
marius
On Aug 24, 11:49 am, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
Hi, Marius...
I don't know what you mean by Are you using master? What I
  did was use
the Maven archetype to create a basic JPA lift app. Then I
 changed
directory to the top directory and ran mvn compile. That's
  it. I got
the errors you see. I didn't do anything else.
I've tried blowing away .m2 and I've tried changing the scala
  version to
2.7.5 (from 2.7.4). No difference.
Does the basic JPA lift app not compile until you do something
  else to
it? The blank one worked fine. Can you create and compile the
  Basic JPA
app on your machine without error? Maybe it's something on my
  machine,
but everything else is working fine.
The Maven command I used is reproduced below.
Chas.
marius d. wrote:
Charles,
AFAIK I removed all dependencies to javax.servlet.* classes
  even from
archetypes.  Are you using master? ... I did a full search
  and servlet
things are not being used. The archetype looks ok to me ... Am
 I
missing something?
Br's,
Marius
On Aug 24, 9:06 am, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
Nope. Same error, even after blowing away m2 and rerunning
  the basic
archetype to create a new app.
Chas.
Charles F. Munat wrote:
No on blowing away m2. I did switch to the blank archetype
  (which is
what I actually wanted) and it worked fine. But I can try
  again with the
basic and blowing away m2.
Chas.
Derek Chen-Becker wrote:
It looks like this is still the older archive before
  HttpServletRequest
→ HTTPRequest. The code in master has the change applied,
  so I'm not
sure why it's failing. The warnings are normal (I haven't
  figured out
all of the tricks with the velocity templating), but
  something isn't
being pulled correctly. Have you tried blowing away your
 .m2?
Derek
On Sun, Aug 23, 2009 at 9:45 PM, Charles F. Munat
  c...@munat.com mailto:c...@munat.com
mailto:c...@munat.com mailto:c...@munat.com wrote:
I found this in the lift book and used it:
mvn archetype:generate \
   
  

[Lift] Re: Looking for web hosting company for Lift

2009-08-24 Thread Chris Richardson
Checkout SpringSource Cloud Foundry: www.cloudfoundry.com



On Mon, Aug 24, 2009 at 9:44 AM, jack jack.wid...@gmail.com wrote:


 I am looking for a web hosting company for my Lift project. I figure
 anyone who does Java would work. Is this true? Can anyone recommend a
 company?

 



-- 
Build better software faster with our consulting and training services -
http://www.chrisrichardson.net
Author, POJOs in Action - http://www.manning.com/crichardson
Rapid deployment on Amazon EC2 with CloudTools.org and CloudFoundry.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: JPA blank archetype

2009-08-24 Thread Derek Chen-Becker
OK, anyone with some maven-fu know what's going on here? It looks like the
build is fine, but the jar is being copied to a .archetype file instead of
.jar:

[INFO] Installing
/home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blank/target/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar
to
/home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb/lift-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHOT.maven-archetype


Is this a problem with the pom packaging maybe?

Derek


On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Well. Bad news. I fixed the checksums only to find that somehow hudson is
 still generating archetypes with old sources. I'm at a loss as to how this
 is happening at this point...

 Derek


 On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com wrote:


 Ah, so the errors were connected after all. I was curious about the
 checksum, but I didn't realize that would make it grab an earlier version.

 Derek Chen-Becker wrote:
  OK, I think I've found an issue here. The sha1 checksum file for the
  archetype was last updated on August 1st, and haven't been updated since
  then. That's what your original error was, and it's why it's grabbing an
  older version of the jar :(. Let me see if I can figure out why hudson
  won't recalculate the checksums.
 
  Derek
 
  On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  Thanks for all your help, Indrajit. I'm using the blank JPA app
 anyway,
  so it didn't affect me, but I thought Derek, et al should know.
  Especially since I was using the Maven command from his book...
 
  Chas.
 
  Indrajit Raychaudhuri wrote:
Chas,
   
The problem is quite likely with the archetype jar in the
 scala-tools
repo. Derek is probably looking into it.
Yes, your being confused about the master reference is
understandable :)
   
Good that it compiles through. For now, you can set the
 dependencies
to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
   
Cheers, Indrajit
   
On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
I'm on a new laptop. I didn't do any git pulls of Lift stuff. I
 just
installed Scala with the IZ installer and then Maven, then I ran
 the
archetype command to create a basic JPA app and let it build the
 m2
repository on my machine. When that didn't work, I blew away m2
 and
tried it again.
   
Changing the lift-core dependency worked. So the problem is
  definitely
with 1.1-SNAPSHOT -- at least the one I ended up with.
   
Does this make sense? Do you see why I was confused by your
  reference to
master?
   
Chas.
   
marius d. wrote:
What I means is if you did a git pull from git master and ran
 mvn
clean:clean install. That inherently means version 1.1-SNAPSHOT
Br's,
marius
On Aug 24, 11:49 am, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
Hi, Marius...
I don't know what you mean by Are you using master? What I
  did was use
the Maven archetype to create a basic JPA lift app. Then I
 changed
directory to the top directory and ran mvn compile. That's
  it. I got
the errors you see. I didn't do anything else.
I've tried blowing away .m2 and I've tried changing the scala
  version to
2.7.5 (from 2.7.4). No difference.
Does the basic JPA lift app not compile until you do something
  else to
it? The blank one worked fine. Can you create and compile the
  Basic JPA
app on your machine without error? Maybe it's something on my
  machine,
but everything else is working fine.
The Maven command I used is reproduced below.
Chas.
marius d. wrote:
Charles,
AFAIK I removed all dependencies to javax.servlet.* classes
  even from
archetypes.  Are you using master? ... I did a full search
  and servlet
things are not being used. The archetype looks ok to me ...
 Am I
missing something?
Br's,
Marius
On Aug 24, 9:06 am, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
Nope. Same error, even after blowing away m2 and rerunning
  the basic
archetype to create a new app.
Chas.
Charles F. Munat wrote:
No on blowing away m2. I did switch to the blank archetype
  (which is
what I actually wanted) and it worked fine. But I can try
  again with the
basic and blowing away m2.
Chas.
Derek Chen-Becker wrote:
It looks like this is still the older archive before
  HttpServletRequest
→ 

[Lift] Re: Menu builder group and li_item

2009-08-24 Thread David Pollak
A fix is pushed to the GitHub repo.  Hudson is chewing through a new build.

On Mon, Aug 24, 2009 at 1:41 PM, george geo...@mattandgeorge.com wrote:


 Issue is filed here:

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



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

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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Timothy Perrett

Derek,

Im currently reorganizing the lift archetype codebase as we speak, so I’ll
look at it now...

Cheers, Tim

On 24/08/2009 23:03, Derek Chen-Becker dchenbec...@gmail.com wrote:

 OK, anyone with some maven-fu know what's going on here? It looks like the
 build is fine, but the jar is being copied to a .archetype file instead of
 .jar:
 
 [INFO] Installing
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blank/t
 arget/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar to
 
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb/li
 ft-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHOT.mave
 n-archetype
 
 
 Is this a problem with the pom packaging maybe?
 
 
 Derek
 
 On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:
 Well. Bad news. I fixed the checksums only to find that somehow hudson is
 still generating archetypes with old sources. I'm at a loss as to how this is
 happening at this point...
 
 Derek
 
 
 On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com wrote:
 
 Ah, so the errors were connected after all. I was curious about the
 checksum, but I didn't realize that would make it grab an earlier version.
 
 Derek Chen-Becker wrote:
  OK, I think I've found an issue here. The sha1 checksum file for the
  archetype was last updated on August 1st, and haven't been updated since
  then. That's what your original error was, and it's why it's grabbing an
  older version of the jar :(. Let me see if I can figure out why hudson
  won't recalculate the checksums.
 
  Derek
 
  On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  ? ? Thanks for all your help, Indrajit. I'm using the blank JPA app
 anyway,
  ? ? so it didn't affect me, but I thought Derek, et al should know.
  ? ? Especially since I was using the Maven command from his book...
 
  ? ? Chas.
 
  ? ? Indrajit Raychaudhuri wrote:
  ? ? ? Chas,
  ? ? ?
  ? ? ? The problem is quite likely with the archetype jar in the
 scala-tools
  ? ? ? repo. Derek is probably looking into it.
  ? ? ? Yes, your being confused about the master reference is
  ? ? ? understandable :)
  ? ? ?
  ? ? ? Good that it compiles through. For now, you can set the
 dependencies
  ? ? ? to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
  ? ? ?
  ? ? ? Cheers, Indrajit
  ? ? ?
  ? ? ? On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com
  ? ? mailto:c...@munat.com wrote:
  ? ? ? I'm on a new laptop. I didn't do any git pulls of Lift stuff. I
 just
  ? ? ? installed Scala with the IZ installer and then Maven, then I ran
 the
  ? ? ? archetype command to create a basic JPA app and let it build the
 m2
  ? ? ? repository on my machine. When that didn't work, I blew away m2
 and
  ? ? ? tried it again.
  ? ? ?
  ? ? ? Changing the lift-core dependency worked. So the problem is
  ? ? definitely
  ? ? ? with 1.1-SNAPSHOT -- at least the one I ended up with.
  ? ? ?
  ? ? ? Does this make sense? Do you see why I was confused by your
  ? ? reference to
  ? ? ? master?
  ? ? ?
  ? ? ? Chas.
  ? ? ?
  ? ? ? marius d. wrote:
  ? ? ? What I means is if you did a git pull from git master and ran
 mvn
  ? ? ? clean:clean install. That inherently means version 1.1-SNAPSHOT
  ? ? ? Br's,
  ? ? ? marius
  ? ? ? On Aug 24, 11:49 am, Charles F. Munat c...@munat.com
  ? ? mailto:c...@munat.com wrote:
  ? ? ? Hi, Marius...
  ? ? ? I don't know what you mean by Are you using master? What I
  ? ? did was use
  ? ? ? the Maven archetype to create a basic JPA lift app. Then I
 changed
  ? ? ? directory to the top directory and ran mvn compile. That's
  ? ? it. I got
  ? ? ? the errors you see. I didn't do anything else.
  ? ? ? I've tried blowing away .m2 and I've tried changing the scala
  ? ? version to
  ? ? ? 2.7.5 (from 2.7.4). No difference.
  ? ? ? Does the basic JPA lift app not compile until you do something
  ? ? else to
  ? ? ? it? The blank one worked fine. Can you create and compile the
  ? ? Basic JPA
  ? ? ? app on your machine without error? Maybe it's something on my
  ? ? machine,
  ? ? ? but everything else is working fine.
  ? ? ? The Maven command I used is reproduced below.
  ? ? ? Chas.
  ? ? ? marius d. wrote:
  ? ? ? Charles,
  ? ? ? AFAIK I removed all dependencies to javax.servlet.* classes
  ? ? even from
  ? ? ? archetypes. ?Are you using master? ... I did a full search
  ? ? and servlet
  ? ? ? things are not being used. The archetype looks ok to me ... Am
I
  ? ? ? missing something?
  ? ? ? Br's,
  ? ? ? Marius
  ? ? ? On Aug 24, 9:06 am, Charles F. Munat c...@munat.com
  ? ? mailto:c...@munat.com wrote:
  ? ? ? Nope. Same error, even after blowing away m2 and rerunning
  ? ? the basic
  ? ? ? archetype to create a new app.
  ? ? ? Chas.
  ? ? ? Charles F. Munat wrote:
  ? ? ? No on blowing away m2. I did switch to the blank archetype
  ? ? (which is
  ? ? ? what I actually wanted) and it worked fine. But I can 

[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread David Pollak
On Mon, Aug 24, 2009 at 12:58 PM, Meredith Gregory lgreg.mered...@gmail.com
 wrote:

 David,

 Can one leave proxies in place for things that are not actually
 serializable?


Anything that's marked serializable should be... and it's up to the thing
that marks itself as serialiable to create a proxy.  Things that are not
marked as serializable may or may not be... the issue is what kind of
instance variables they have to determine if they could be serialized.




 Best wishes,

 --greg

 On Mon, Aug 24, 2009 at 12:55 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Mon, Aug 24, 2009 at 12:36 PM, marius d. marius.dan...@gmail.comwrote:


 Just a FYI. I briefly talked with Martin and he said this idea is
 possible but quite tricky. Stephane Micheloud did something similar
 and he may share some of his work. I'm waiting some feedback from him.


 I think we can do it at runtime in development mode.  This is just for
 data gathering, not for actual implementation.  We just need to calculate
 whether a given class is serializable once... so we don't have to worry
 about cyclic graphs or anything else... just... are the slots (instance
 variables) for each class serializable.




 Br's,
 Marius

 On Aug 24, 10:46 am, marius d. marius.dan...@gmail.com wrote:
  On Aug 24, 10:39 am, Viktor Klang viktor.kl...@gmail.com wrote:
 
 
 
   On Mon, Aug 24, 2009 at 8:13 AM, marius d. marius.dan...@gmail.com
 wrote:
 
On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Sun, Aug 23, 2009 at 10:45 AM, marius d. 
 marius.dan...@gmail.com
wrote:
 
  Hmmm .. I'm wondering if we can write aScalacompilerpluginthat
  transform functions provided to Lift's S/SHtml function etc.
 into a
  richer FunctionX implementation that knows how to serialize
 it's
  members. We could restrict the types that as LiftSerializable
 on top
  of primitives, Calenars, SessionVar/RequestVar etc. If users
 need
  their own classes to be LiftSerilizable they would have to
 implement
  LiftSerializable trait.
 
 I think we can do it without explicit traits.  I think we just
 need to
walk
 the graph for everything that's added to the LiftSession and see
 where it
 leads.  Any graph we can walk is something that we can
 serialize... even
 without Java serialization.  Any graph that ends in globals or
 some class
 that refers to native stuff (e.g., IO), then we're toast.
 
Totally agree. The rationale for explicit LiftSerializable would be
just for user defined types. Otherwise user's won't have to use it.
Graphs may also have be cyclic paths ... it shouldn't be too big of
 a
pain though. Furthermore if a dependency graph path leads say to an
 IO
reference maybe that's unintentional user code doesn't really use
 that
but compiler put it for whatever reason. If such cases are possible
and could be determined maybe we could exclude that silently from
 the
serialization operation and add a compile time warning.
 
I guess we need to dig more intoscalacompilerpluginsystem.
 
   1. Isn't there a problem with references _inside_ methods that are
   impure/sideeffecting?
 
   s = { Db.myCachedInfoNotInSession foo s  }
 
   Regarding member references, a simple check for transient
   (sca...@transient == java *transient*) to forcve people to use
 transient
   members for non-serializable state.
 
   But IMHO the serialization problem is a (negative?) sideeffect of
 Lifts rich
   model GUID=Func approach.
   Perhpas there is a middle way, a way where we can replicate just
 enough to
   survive a node crash?
 
  That's exactly it. We probably don't need everything that Java
  Serialization does. Just enough to make it consistent ... the
  dependency graphs that is actually used by the user's function.
 
 
 
  Thoughts?
 
  Br's,
  Marius
 
  On Aug 23, 8:30 pm, marius d. marius.dan...@gmail.com
 wrote:
   At a first glace Java serialization is needed because of its
awareness
   of the reference graph. But in the same time it does not
 perform
well.
   One way might be the byte level instrumentation that would
 induce
code
   to figure out the reference graph and know how to stream-ify
 it using
   a given efficient protocol. But that induces risks and it
 involves
   tons of work. I think would be doable though.
 
   The problem is not really the technology of propagating
 session
   information to other nodes. That's the easiest part, but
 tough one is
   figuring out the low level reference graph and serialization
   semantics. This is why JINI, JavaSpaces, JGroups, CORBA,
 JXTA, you
   name it, are unlikely to help solving the fundamental
 problem.
 
   Br's,
   Marius
 
   On Aug 23, 8:16 pm, Arthur avand...@gmail.com wrote:
 
On Sun, Aug 23, 2009 at 7:04 PM, David
 
Pollakfeeder.of.the.be...@gmail.com wrote:
 On Sun, 

[Lift] Re: JPA blank archetype

2009-08-24 Thread Derek Chen-Becker
I think I may have found the issue. I had a packaging element in the pom
(none of the other archetypes do, as far as I can tell), so I've removed
that and I'm doing a local build to see if that fixes it.

Derek

2009/8/24 Timothy Perrett timo...@getintheloop.eu


 Derek,

 Im currently reorganizing the lift archetype codebase as we speak, so I’ll
 look at it now...

 Cheers, Tim


 On 24/08/2009 23:03, Derek Chen-Becker dchenbec...@gmail.com wrote:

 OK, anyone with some maven-fu know what's going on here? It looks like the
 build is fine, but the jar is being copied to a .archetype file instead of
 .jar:

 [INFO] Installing
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blank/target/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar
 to


 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb/lift-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHOT.maven-archetype


 Is this a problem with the pom packaging maybe?


 Derek

 On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:

 Well. Bad news. I fixed the checksums only to find that somehow hudson is
 still generating archetypes with old sources. I'm at a loss as to how this
 is happening at this point...

 Derek


 On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com wrote:


 Ah, so the errors were connected after all. I was curious about the
 checksum, but I didn't realize that would make it grab an earlier version.

 Derek Chen-Becker wrote:
  OK, I think I've found an issue here. The sha1 checksum file for the
  archetype was last updated on August 1st, and haven't been updated since
  then. That's what your original error was, and it's why it's grabbing an
  older version of the jar :(. Let me see if I can figure out why hudson
  won't recalculate the checksums.
 
  Derek
 
  On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com c...@munat.com%3e wrote:
 
 
  ? ? Thanks for all your help, Indrajit. I'm using the blank JPA app
 anyway,
  ? ? so it didn't affect me, but I thought Derek, et al should know.
  ? ? Especially since I was using the Maven command from his book...
 
  ? ? Chas.
 
  ? ? Indrajit Raychaudhuri wrote:
  ? ? ? Chas,
  ? ? ?
  ? ? ? The problem is quite likely with the archetype jar in the
 scala-tools
  ? ? ? repo. Derek is probably looking into it.
  ? ? ? Yes, your being confused about the master reference is
  ? ? ? understandable :)
  ? ? ?
  ? ? ? Good that it compiles through. For now, you can set the
 dependencies
  ? ? ? to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
  ? ? ?
  ? ? ? Cheers, Indrajit
  ? ? ?
  ? ? ? On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com
  ? ? mailto:c...@munat.com c...@munat.com%3e wrote:
  ? ? ? I'm on a new laptop. I didn't do any git pulls of Lift stuff. I
 just
  ? ? ? installed Scala with the IZ installer and then Maven, then I ran
 the
  ? ? ? archetype command to create a basic JPA app and let it build the
 m2
  ? ? ? repository on my machine. When that didn't work, I blew away m2
 and
  ? ? ? tried it again.
  ? ? ?
  ? ? ? Changing the lift-core dependency worked. So the problem is
  ? ? definitely
  ? ? ? with 1.1-SNAPSHOT -- at least the one I ended up with.
  ? ? ?
  ? ? ? Does this make sense? Do you see why I was confused by your
  ? ? reference to
  ? ? ? master?
  ? ? ?
  ? ? ? Chas.
  ? ? ?
  ? ? ? marius d. wrote:
  ? ? ? What I means is if you did a git pull from git master and ran
 mvn
  ? ? ? clean:clean install. That inherently means version 1.1-SNAPSHOT
  ? ? ? Br's,
  ? ? ? marius
  ? ? ? On Aug 24, 11:49 am, Charles F. Munat c...@munat.com
  ? ? mailto:c...@munat.com c...@munat.com%3e wrote:
  ? ? ? Hi, Marius...
  ? ? ? I don't know what you mean by Are you using master? What I
  ? ? did was use
  ? ? ? the Maven archetype to create a basic JPA lift app. Then I
 changed
  ? ? ? directory to the top directory and ran mvn compile. That's
  ? ? it. I got
  ? ? ? the errors you see. I didn't do anything else.
  ? ? ? I've tried blowing away .m2 and I've tried changing the scala
  ? ? version to
  ? ? ? 2.7.5 (from 2.7.4). No difference.
  ? ? ? Does the basic JPA lift app not compile until you do something
  ? ? else to
  ? ? ? it? The blank one worked fine. Can you create and compile the
  ? ? Basic JPA
  ? ? ? app on your machine without error? Maybe it's something on my
  ? ? machine,
  ? ? ? but everything else is working fine.
  ? ? ? The Maven command I used is reproduced below.
  ? ? ? Chas.
  ? ? ? marius d. wrote:
  ? ? ? Charles,
  ? ? ? AFAIK I removed all dependencies to javax.servlet.* classes
  ? ? even from
  ? ? ? archetypes. ?Are you using master? ... I did a full search
  ? ? and servlet
  ? ? ? things are not being used. The archetype looks ok to me ... Am
 I
  ? ? ? missing something?
  ? ? ? Br's,
  ? ? ? Marius
  ? ? ? On Aug 24, 9:06 am, Charles F. Munat c...@munat.com
  ? ? mailto:c...@munat.com 

[Lift] Multiple sites, same login

2009-08-24 Thread Charles F. Munat

I'm building two Lift applications that access the same back end 
database -- one is for the public site, and the other, which will use a 
subdomain, is for administration of the public site.

A third application will access a separate database, but will be related 
to the previous two sites.

Any suggestions as to how I might have one login that keeps the user 
logged in across all these sites? Obviously, OpenID would work, and 
there's complex stuff involving LDAP servers, etc., but I'd like to keep 
it fairly simple.

Ideas?

Thanks!
Chas.

--~--~-~--~~~---~--~~
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] ANNOUNCEMENT: 1.0.1 release delayed

2009-08-24 Thread Derek Chen-Becker
I'm going to merge in the fix for issue #36 (
http://github.com/dpp/liftweb/issues/closed/#issue/36) to 1.0.1, so I'll be
pushing the release date back. Next week we're doing a milestone on 1.1, so
I'll wait a week and do the 1.0.1 release on Sep 9th. Code freeze will be on
Sunday, Sep 6th.

Derek

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



[Lift] Re: JPA blank archetype

2009-08-24 Thread Derek Chen-Becker
OK, that seems to have been it. I just pushed a commit and I'll verify once
hudson builds it that it's working.

Derek

On Mon, Aug 24, 2009 at 4:36 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 I think I may have found the issue. I had a packaging element in the pom
 (none of the other archetypes do, as far as I can tell), so I've removed
 that and I'm doing a local build to see if that fixes it.

 Derek

 2009/8/24 Timothy Perrett timo...@getintheloop.eu


 Derek,

 Im currently reorganizing the lift archetype codebase as we speak, so I’ll
 look at it now...

 Cheers, Tim


 On 24/08/2009 23:03, Derek Chen-Becker dchenbec...@gmail.com wrote:

 OK, anyone with some maven-fu know what's going on here? It looks like the
 build is fine, but the jar is being copied to a .archetype file instead of
 .jar:

 [INFO] Installing
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blank/target/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar
 to


 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb/lift-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHOT.maven-archetype


 Is this a problem with the pom packaging maybe?


 Derek

 On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:

 Well. Bad news. I fixed the checksums only to find that somehow hudson is
 still generating archetypes with old sources. I'm at a loss as to how this
 is happening at this point...

 Derek


 On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com wrote:


 Ah, so the errors were connected after all. I was curious about the
 checksum, but I didn't realize that would make it grab an earlier version.

 Derek Chen-Becker wrote:
  OK, I think I've found an issue here. The sha1 checksum file for the
  archetype was last updated on August 1st, and haven't been updated since
  then. That's what your original error was, and it's why it's grabbing an
  older version of the jar :(. Let me see if I can figure out why hudson
  won't recalculate the checksums.
 
  Derek
 
  On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com c...@munat.com%3e wrote:
 
 
  ? ? Thanks for all your help, Indrajit. I'm using the blank JPA app
 anyway,
  ? ? so it didn't affect me, but I thought Derek, et al should know.
  ? ? Especially since I was using the Maven command from his book...
 
  ? ? Chas.
 
  ? ? Indrajit Raychaudhuri wrote:
  ? ? ? Chas,
  ? ? ?
  ? ? ? The problem is quite likely with the archetype jar in the
 scala-tools
  ? ? ? repo. Derek is probably looking into it.
  ? ? ? Yes, your being confused about the master reference is
  ? ? ? understandable :)
  ? ? ?
  ? ? ? Good that it compiles through. For now, you can set the
 dependencies
  ? ? ? to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
  ? ? ?
  ? ? ? Cheers, Indrajit
  ? ? ?
  ? ? ? On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com
  ? ? mailto:c...@munat.com c...@munat.com%3e wrote:
  ? ? ? I'm on a new laptop. I didn't do any git pulls of Lift stuff. I
 just
  ? ? ? installed Scala with the IZ installer and then Maven, then I ran
 the
  ? ? ? archetype command to create a basic JPA app and let it build the
 m2
  ? ? ? repository on my machine. When that didn't work, I blew away m2
 and
  ? ? ? tried it again.
  ? ? ?
  ? ? ? Changing the lift-core dependency worked. So the problem is
  ? ? definitely
  ? ? ? with 1.1-SNAPSHOT -- at least the one I ended up with.
  ? ? ?
  ? ? ? Does this make sense? Do you see why I was confused by your
  ? ? reference to
  ? ? ? master?
  ? ? ?
  ? ? ? Chas.
  ? ? ?
  ? ? ? marius d. wrote:
  ? ? ? What I means is if you did a git pull from git master and ran
 mvn
  ? ? ? clean:clean install. That inherently means version 1.1-SNAPSHOT
  ? ? ? Br's,
  ? ? ? marius
  ? ? ? On Aug 24, 11:49 am, Charles F. Munat c...@munat.com
  ? ? mailto:c...@munat.com c...@munat.com%3e wrote:
  ? ? ? Hi, Marius...
  ? ? ? I don't know what you mean by Are you using master? What I
  ? ? did was use
  ? ? ? the Maven archetype to create a basic JPA lift app. Then I
 changed
  ? ? ? directory to the top directory and ran mvn compile. That's
  ? ? it. I got
  ? ? ? the errors you see. I didn't do anything else.
  ? ? ? I've tried blowing away .m2 and I've tried changing the scala
  ? ? version to
  ? ? ? 2.7.5 (from 2.7.4). No difference.
  ? ? ? Does the basic JPA lift app not compile until you do something
  ? ? else to
  ? ? ? it? The blank one worked fine. Can you create and compile the
  ? ? Basic JPA
  ? ? ? app on your machine without error? Maybe it's something on my
  ? ? machine,
  ? ? ? but everything else is working fine.
  ? ? ? The Maven command I used is reproduced below.
  ? ? ? Chas.
  ? ? ? marius d. wrote:
  ? ? ? Charles,
  ? ? ? AFAIK I removed all dependencies to javax.servlet.* classes
  ? ? even from
  ? ? ? archetypes. ?Are you using master? ... I did a full search
  ? ? and servlet
  ? ? ? things are not 

[Lift] Re: net.liftweb.mapper.PreCache doesn't work well as my expect

2009-08-24 Thread Derek Chen-Becker
Maybe I'm missing something, but you're telling Mapper to pre-cache
User.roomChoice, but then you're accessing User.fromPlace. Are those two
fields related somehow?

Derek

On Mon, Aug 24, 2009 at 12:25 AM, koji koji@gmail.com wrote:


 Hi all,
 I want to avoid n+1 problem
 so i try to write my code as
 val users = User.findAll(PreCache(User.roomChoice), By(User.travel,
 travelId))
 and i saw the sql generated only once for querying roomChoice.
 but when i using the
 u.fromPlace.obj, it always become Empty(u.fromPace has correct value)

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

2009-08-24 Thread Timothy Perrett

There are several issues with the archetypes that I’ve found and I’ll be
checking in fixes soon... If you find this packaging issue please post what
it is and I’ll incorporate that with my commit shortly...

Cheers, Tim

On 24/08/2009 23:36, Derek Chen-Becker dchenbec...@gmail.com wrote:

 I think I may have found the issue. I had a packaging element in the pom
 (none of the other archetypes do, as far as I can tell), so I've removed that
 and I'm doing a local build to see if that fixes it.
 
 Derek
 
 2009/8/24 Timothy Perrett timo...@getintheloop.eu
 
 Derek,
 
 Im currently reorganizing the lift archetype codebase as we speak, so I’ll
 look at it now...
 
 Cheers, Tim
 
 
 On 24/08/2009 23:03, Derek Chen-Becker dchenbec...@gmail.com
 http://dchenbec...@gmail.com  wrote:
 
 OK, anyone with some maven-fu know what's going on here? It looks like the
 build is fine, but the jar is being copied to a .archetype file instead of
 .jar:
 
 [INFO] Installing
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blank
 /target/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar to
 
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb/
 lift-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHOT.
 maven-archetype
 
 
 Is this a problem with the pom packaging maybe?
 
 
 Derek
 
 On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker dchenbec...@gmail.com
 http://dchenbec...@gmail.com  wrote:
 Well. Bad news. I fixed the checksums only to find that somehow hudson is
 still generating archetypes with old sources. I'm at a loss as to how this
 is happening at this point...
 
 Derek
 
 
 On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com
 http://c...@munat.com  wrote:
 
 Ah, so the errors were connected after all. I was curious about the
 checksum, but I didn't realize that would make it grab an earlier version.
 
 Derek Chen-Becker wrote:
  OK, I think I've found an issue here. The sha1 checksum file for the
  archetype was last updated on August 1st, and haven't been updated
 since
  then. That's what your original error was, and it's why it's grabbing
 an
  older version of the jar :(. Let me see if I can figure out why hudson
  won't recalculate the checksums.
 
  Derek
 
  On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com
 http://c...@munat.com
  mailto:c...@munat.com mailto:c...@munat.com%3e  wrote:
 
 
  ? ? Thanks for all your help, Indrajit. I'm using the blank JPA app
 anyway,
  ? ? so it didn't affect me, but I thought Derek, et al should know.
  ? ? Especially since I was using the Maven command from his book...
 
  ? ? Chas.
 
  ? ? Indrajit Raychaudhuri wrote:
  ? ? ? Chas,
  ? ? ?
  ? ? ? The problem is quite likely with the archetype jar in the
 scala-tools
  ? ? ? repo. Derek is probably looking into it.
  ? ? ? Yes, your being confused about the master reference is
  ? ? ? understandable :)
  ? ? ?
  ? ? ? Good that it compiles through. For now, you can set the
 dependencies
  ? ? ? to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
  ? ? ?
  ? ? ? Cheers, Indrajit
  ? ? ?
  ? ? ? On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com
 http://c...@munat.com
  ? ? mailto:c...@munat.com mailto:c...@munat.com%3e  wrote:
  ? ? ? I'm on a new laptop. I didn't do any git pulls of Lift stuff. I
 just
  ? ? ? installed Scala with the IZ installer and then Maven, then I
 ran the
  ? ? ? archetype command to create a basic JPA app and let it build
 the m2
  ? ? ? repository on my machine. When that didn't work, I blew away m2
 and
  ? ? ? tried it again.
  ? ? ?
  ? ? ? Changing the lift-core dependency worked. So the problem is
  ? ? definitely
  ? ? ? with 1.1-SNAPSHOT -- at least the one I ended up with.
  ? ? ?
  ? ? ? Does this make sense? Do you see why I was confused by your
  ? ? reference to
  ? ? ? master?
  ? ? ?
  ? ? ? Chas.
  ? ? ?
  ? ? ? marius d. wrote:
  ? ? ? What I means is if you did a git pull from git master and ran
 mvn
  ? ? ? clean:clean install. That inherently means version
 1.1-SNAPSHOT
  ? ? ? Br's,
  ? ? ? marius
  ? ? ? On Aug 24, 11:49 am, Charles F. Munat c...@munat.com
 http://c...@munat.com
  ? ? mailto:c...@munat.com mailto:c...@munat.com%3e  wrote:
  ? ? ? Hi, Marius...
  ? ? ? I don't know what you mean by Are you using master? What I
  ? ? did was use
  ? ? ? the Maven archetype to create a basic JPA lift app. Then I
 changed
  ? ? ? directory to the top directory and ran mvn compile. That's
  ? ? it. I got
  ? ? ? the errors you see. I didn't do anything else.
  ? ? ? I've tried blowing away .m2 and I've tried changing the scala
  ? ? version to
  ? ? ? 2.7.5 (from 2.7.4). No difference.
  ? ? ? Does the basic JPA lift app not compile until you do
 something
  ? ? else to
  ? ? ? it? The blank one worked fine. Can you create and compile the
  ? ? Basic JPA
  ? ? ? app on your machine without error? Maybe it's something on my
  ? ? machine,
  ? ? ? but everything else is working fine.
  ? ? ? 

[Lift] Re: JPA blank archetype

2009-08-24 Thread Timothy Perrett

Doh... I see you already committed it... (obviously didn’t see my other
post); I’ll attempt to do a merge with my local reorganized and fixed
archetypes.

Tim

On 24/08/2009 23:43, Derek Chen-Becker dchenbec...@gmail.com wrote:

 OK, that seems to have been it. I just pushed a commit and I'll verify once
 hudson builds it that it's working.
 
 Derek
 
 On Mon, Aug 24, 2009 at 4:36 PM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:
 I think I may have found the issue. I had a packaging element in the pom
 (none of the other archetypes do, as far as I can tell), so I've removed that
 and I'm doing a local build to see if that fixes it.
 
 Derek
 
 2009/8/24 Timothy Perrett timo...@getintheloop.eu
 
 
 Derek,
 
 Im currently reorganizing the lift archetype codebase as we speak, so I’ll
 look at it now...
 
 Cheers, Tim
 
 
 On 24/08/2009 23:03, Derek Chen-Becker dchenbec...@gmail.com
 http://dchenbec...@gmail.com  wrote:
 
 OK, anyone with some maven-fu know what's going on here? It looks like the
 build is fine, but the jar is being copied to a .archetype file instead of
 .jar:
 
 [INFO] Installing
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blan
 k/target/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar to
 
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb
 /lift-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHO
 T.maven-archetype
 
 
 Is this a problem with the pom packaging maybe?
 
 
 Derek
 
 On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker dchenbec...@gmail.com
 http://dchenbec...@gmail.com  wrote:
 Well. Bad news. I fixed the checksums only to find that somehow hudson is
 still generating archetypes with old sources. I'm at a loss as to how this
 is happening at this point...
 
 Derek
 
 
 On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com
 http://c...@munat.com  wrote:
 
 Ah, so the errors were connected after all. I was curious about the
 checksum, but I didn't realize that would make it grab an earlier
 version.
 
 Derek Chen-Becker wrote:
  OK, I think I've found an issue here. The sha1 checksum file for the
  archetype was last updated on August 1st, and haven't been updated
 since
  then. That's what your original error was, and it's why it's grabbing
 an
  older version of the jar :(. Let me see if I can figure out why hudson
  won't recalculate the checksums.
 
  Derek
 
  On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com
 http://c...@munat.com
  mailto:c...@munat.com mailto:c...@munat.com%3e  wrote:
 
 
  ? ? Thanks for all your help, Indrajit. I'm using the blank JPA app
 anyway,
  ? ? so it didn't affect me, but I thought Derek, et al should know.
  ? ? Especially since I was using the Maven command from his book...
 
  ? ? Chas.
 
  ? ? Indrajit Raychaudhuri wrote:
  ? ? ? Chas,
  ? ? ?
  ? ? ? The problem is quite likely with the archetype jar in the
 scala-tools
  ? ? ? repo. Derek is probably looking into it.
  ? ? ? Yes, your being confused about the master reference is
  ? ? ? understandable :)
  ? ? ?
  ? ? ? Good that it compiles through. For now, you can set the
 dependencies
  ? ? ? to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
  ? ? ?
  ? ? ? Cheers, Indrajit
  ? ? ?
  ? ? ? On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com
 http://c...@munat.com
  ? ? mailto:c...@munat.com mailto:c...@munat.com%3e  wrote:
  ? ? ? I'm on a new laptop. I didn't do any git pulls of Lift stuff.
 I just
  ? ? ? installed Scala with the IZ installer and then Maven, then I
 ran the
  ? ? ? archetype command to create a basic JPA app and let it build
 the m2
  ? ? ? repository on my machine. When that didn't work, I blew away
 m2 and
  ? ? ? tried it again.
  ? ? ?
  ? ? ? Changing the lift-core dependency worked. So the problem is
  ? ? definitely
  ? ? ? with 1.1-SNAPSHOT -- at least the one I ended up with.
  ? ? ?
  ? ? ? Does this make sense? Do you see why I was confused by your
  ? ? reference to
  ? ? ? master?
  ? ? ?
  ? ? ? Chas.
  ? ? ?
  ? ? ? marius d. wrote:
  ? ? ? What I means is if you did a git pull from git master and ran
 mvn
  ? ? ? clean:clean install. That inherently means version
 1.1-SNAPSHOT
  ? ? ? Br's,
  ? ? ? marius
  ? ? ? On Aug 24, 11:49 am, Charles F. Munat c...@munat.com
 http://c...@munat.com
  ? ? mailto:c...@munat.com mailto:c...@munat.com%3e  wrote:
  ? ? ? Hi, Marius...
  ? ? ? I don't know what you mean by Are you using master? What I
  ? ? did was use
  ? ? ? the Maven archetype to create a basic JPA lift app. Then I
 changed
  ? ? ? directory to the top directory and ran mvn compile. That's
  ? ? it. I got
  ? ? ? the errors you see. I didn't do anything else.
  ? ? ? I've tried blowing away .m2 and I've tried changing the
 scala
  ? ? version to
  ? ? ? 2.7.5 (from 2.7.4). No difference.
  ? ? ? Does the basic JPA lift app not compile until you do
 something
  ? ? else to
  ? ? ? it? The blank one worked fine. Can you create and compile
 the
  

[Lift] id selectors discouraged?

2009-08-24 Thread Meredith Gregory
Lifted,

At the pixillion master
http://github.com/leithaus/pixillion/tree/masteri've an example
where it appears that id selectors are not working
correctly... Or, maybe i just don't know how to use CSS. The site map (after
login) will show three pages of interest: paint, chat, combo. Paint is raw
js without lift intervention and works as intended (for now). Chat is
cribbed from the lift chat example. Combo attempts to put the two on the
same page with lift tags in the drivers seat. As you can see the style is
not being governed in the same way on the combo page, causing erroneous
behavior in the paint rendering. Any help would be greatly appreciated.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.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: JPA blank archetype

2009-08-24 Thread Derek Chen-Becker
Sorry about that. It's a one line commit, so hopefully Git will be able to
figure out a sane merge.

Derek

2009/8/24 Timothy Perrett timo...@getintheloop.eu


 Doh... I see you already committed it... (obviously didn’t see my other
 post); I’ll attempt to do a merge with my local reorganized and fixed
 archetypes.

 Tim

 On 24/08/2009 23:43, Derek Chen-Becker dchenbec...@gmail.com wrote:

 OK, that seems to have been it. I just pushed a commit and I'll verify once
 hudson builds it that it's working.

 Derek

 On Mon, Aug 24, 2009 at 4:36 PM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:

 I think I may have found the issue. I had a packaging element in the pom
 (none of the other archetypes do, as far as I can tell), so I've removed
 that and I'm doing a local build to see if that fixes it.

 Derek

 2009/8/24 Timothy Perrett timo...@getintheloop.eu


 Derek,

 Im currently reorganizing the lift archetype codebase as we speak, so I’ll
 look at it now...

 Cheers, Tim


 On 24/08/2009 23:03, Derek Chen-Becker dchenbec...@gmail.com 
 http://dchenbec...@gmail.com  wrote:

 OK, anyone with some maven-fu know what's going on here? It looks like the
 build is fine, but the jar is being copied to a .archetype file instead of
 .jar:

 [INFO] Installing
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blank/target/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar
 to


 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb/lift-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHOT.maven-archetype


 Is this a problem with the pom packaging maybe?


 Derek

 On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker dchenbec...@gmail.com
 http://dchenbec...@gmail.com  wrote:

 Well. Bad news. I fixed the checksums only to find that somehow hudson is
 still generating archetypes with old sources. I'm at a loss as to how this
 is happening at this point...

 Derek


 On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com 
 http://c...@munat.com  wrote:


 Ah, so the errors were connected after all. I was curious about the
 checksum, but I didn't realize that would make it grab an earlier version.

 Derek Chen-Becker wrote:
  OK, I think I've found an issue here. The sha1 checksum file for the
  archetype was last updated on August 1st, and haven't been updated since
  then. That's what your original error was, and it's why it's grabbing an
  older version of the jar :(. Let me see if I can figure out why hudson
  won't recalculate the checksums.
 
  Derek
 
  On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com 
 http://c...@munat.com
  mailto:c...@munat.com c...@munat.com 
  mailto:c...@munat.com%3ec...@munat.com%3e
  wrote:
 
 
  ? ? Thanks for all your help, Indrajit. I'm using the blank JPA app
 anyway,
  ? ? so it didn't affect me, but I thought Derek, et al should know.
  ? ? Especially since I was using the Maven command from his book...
 
  ? ? Chas.
 
  ? ? Indrajit Raychaudhuri wrote:
  ? ? ? Chas,
  ? ? ?
  ? ? ? The problem is quite likely with the archetype jar in the
 scala-tools
  ? ? ? repo. Derek is probably looking into it.
  ? ? ? Yes, your being confused about the master reference is
  ? ? ? understandable :)
  ? ? ?
  ? ? ? Good that it compiles through. For now, you can set the
 dependencies
  ? ? ? to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
  ? ? ?
  ? ? ? Cheers, Indrajit
  ? ? ?
  ? ? ? On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com 
 http://c...@munat.com
  ? ? mailto:c...@munat.com c...@munat.com 
  mailto:c...@munat.com%3ec...@munat.com%3e
  wrote:
  ? ? ? I'm on a new laptop. I didn't do any git pulls of Lift stuff. I
 just
  ? ? ? installed Scala with the IZ installer and then Maven, then I ran
 the
  ? ? ? archetype command to create a basic JPA app and let it build the
 m2
  ? ? ? repository on my machine. When that didn't work, I blew away m2
 and
  ? ? ? tried it again.
  ? ? ?
  ? ? ? Changing the lift-core dependency worked. So the problem is
  ? ? definitely
  ? ? ? with 1.1-SNAPSHOT -- at least the one I ended up with.
  ? ? ?
  ? ? ? Does this make sense? Do you see why I was confused by your
  ? ? reference to
  ? ? ? master?
  ? ? ?
  ? ? ? Chas.
  ? ? ?
  ? ? ? marius d. wrote:
  ? ? ? What I means is if you did a git pull from git master and ran
 mvn
  ? ? ? clean:clean install. That inherently means version 1.1-SNAPSHOT
  ? ? ? Br's,
  ? ? ? marius
  ? ? ? On Aug 24, 11:49 am, Charles F. Munat c...@munat.com 
 http://c...@munat.com
  ? ? mailto:c...@munat.com c...@munat.com 
  mailto:c...@munat.com%3ec...@munat.com%3e
  wrote:
  ? ? ? Hi, Marius...
  ? ? ? I don't know what you mean by Are you using master? What I
  ? ? did was use
  ? ? ? the Maven archetype to create a basic JPA lift app. Then I
 changed
  ? ? ? directory to the top directory and ran mvn compile. That's
  ? ? it. I got
  ? ? ? the errors you see. I didn't do anything else.
  ? ? ? I've tried blowing away .m2 and 

[Lift] multiselect example in Liftbook problem

2009-08-24 Thread glenn

There seems to be a problem with  SHtml.multiSelect following the
example in the Lift book (Listing 4.10: Using multiselect). The
example shows the last parameter to be a List, while the source for
multiSelect shows it to be
(String) = Any.

When I tried to implement in my own code, I get the compiler error:
type mismatch found; List[String], required: String.

The book example even states that the function takes a String
representing a
Category’s primary key and returns the category.

The example goes further to explain:

We then use this helper method to update the
Set that we created earlier. Note that the callback function will be
executed for each selected item
in the multiselect, which is why the callback takes a String argument
instead of a Set[String].

But where is this callback function? Is it the same helper mentioned
earlier. There's no other callback function parameter on the
multiSelect constructor.

This is all very confusing.

Glenn...


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

2009-08-24 Thread Timothy Perrett

Guys,

As promised, i've re-factored the archetypes (now in their own
submodule and building as part of master) however their maven group
and artifactId's are the same, so all commands etc will continue to
work (its purely a code base organization change)

Moreover, i've fixed the various issues with velocity in the jpa-basic
archetype (its late here, i'll fix the others 2mro) and i've also
fixed the Jetty version in all the pom.xml to a sensible range.

Enjoy...

Cheers, Tim


On Aug 25, 12:02 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
 Sorry about that. It's a one line commit, so hopefully Git will be able to
 figure out a sane merge.

 Derek

 2009/8/24 Timothy Perrett timo...@getintheloop.eu





  Doh... I see you already committed it... (obviously didn’t see my other
  post); I’ll attempt to do a merge with my local reorganized and fixed
  archetypes.

  Tim

  On 24/08/2009 23:43, Derek Chen-Becker dchenbec...@gmail.com wrote:

  OK, that seems to have been it. I just pushed a commit and I'll verify once
  hudson builds it that it's working.

  Derek

  On Mon, Aug 24, 2009 at 4:36 PM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

  I think I may have found the issue. I had a packaging element in the pom
  (none of the other archetypes do, as far as I can tell), so I've removed
  that and I'm doing a local build to see if that fixes it.

  Derek

  2009/8/24 Timothy Perrett timo...@getintheloop.eu

  Derek,

  Im currently reorganizing the lift archetype codebase as we speak, so I’ll
  look at it now...

  Cheers, Tim

  On 24/08/2009 23:03, Derek Chen-Becker dchenbec...@gmail.com 
  http://dchenbec...@gmail.com  wrote:

  OK, anyone with some maven-fu know what's going on here? It looks like the
  build is fine, but the jar is being copied to a .archetype file instead of
  .jar:

  [INFO] Installing
  /home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blan 
  k/target/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar
  to

  /home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb 
  /lift-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHO 
  T.maven-archetype

  Is this a problem with the pom packaging maybe?

  Derek

  On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker dchenbec...@gmail.com
  http://dchenbec...@gmail.com  wrote:

  Well. Bad news. I fixed the checksums only to find that somehow hudson is
  still generating archetypes with old sources. I'm at a loss as to how this
  is happening at this point...

  Derek

  On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com 
  http://c...@munat.com  wrote:

  Ah, so the errors were connected after all. I was curious about the
  checksum, but I didn't realize that would make it grab an earlier version.

  Derek Chen-Becker wrote:
   OK, I think I've found an issue here. The sha1 checksum file for the
   archetype was last updated on August 1st, and haven't been updated since
   then. That's what your original error was, and it's why it's grabbing an
   older version of the jar :(. Let me see if I can figure out why hudson
   won't recalculate the checksums.

   Derek

   On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com 
  http://c...@munat.com
   mailto:c...@munat.com c...@munat.com 
   mailto:c...@munat.com%3ec...@munat.com%3e
   wrote:

   ? ? Thanks for all your help, Indrajit. I'm using the blank JPA app
  anyway,
   ? ? so it didn't affect me, but I thought Derek, et al should know.
   ? ? Especially since I was using the Maven command from his book...

   ? ? Chas.

   ? ? Indrajit Raychaudhuri wrote:
   ? ? ? Chas,
   ? ? ?
   ? ? ? The problem is quite likely with the archetype jar in the
  scala-tools
   ? ? ? repo. Derek is probably looking into it.
   ? ? ? Yes, your being confused about the master reference is
   ? ? ? understandable :)
   ? ? ?
   ? ? ? Good that it compiles through. For now, you can set the
  dependencies
   ? ? ? to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
   ? ? ?
   ? ? ? Cheers, Indrajit
   ? ? ?
   ? ? ? On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com 
  http://c...@munat.com
   ? ? mailto:c...@munat.com c...@munat.com 
   mailto:c...@munat.com%3ec...@munat.com%3e
   wrote:
   ? ? ? I'm on a new laptop. I didn't do any git pulls of Lift stuff. I
  just
   ? ? ? installed Scala with the IZ installer and then Maven, then I ran
  the
   ? ? ? archetype command to create a basic JPA app and let it build the
  m2
   ? ? ? repository on my machine. When that didn't work, I blew away m2
  and
   ? ? ? tried it again.
   ? ? ?
   ? ? ? Changing the lift-core dependency worked. So the problem is
   ? ? definitely
   ? ? ? with 1.1-SNAPSHOT -- at least the one I ended up with.
   ? ? ?
   ? ? ? Does this make sense? Do you see why I was confused by your
   ? ? reference to
   ? ? ? master?
   ? ? ?
   ? ? ? Chas.
   ? ? ?
   ? ? ? marius d. wrote:
   ? ? ? What I means is if you did a git pull from git master 

[Lift] Re: multiselect example in Liftbook problem

2009-08-24 Thread glenn

I found that the example is out-of-sync with the latest code in 1.1-
Snapshot.
I was able to get the example (in my application, at least) to compile
and run, by
defining the function as loadCategory(List[String]) = ...,
and creating a separate submit function to handle the actual save
chores.

Glenn...



On Aug 24, 3:37 pm, glenn gl...@exmbly.com wrote:
 There seems to be a problem with  SHtml.multiSelect following the
 example in the Lift book (Listing 4.10: Using multiselect). The
 example shows the last parameter to be a List, while the source for
 multiSelect shows it to be
 (String) = Any.

 When I tried to implement in my own code, I get the compiler error:
 type mismatch found; List[String], required: String.

 The book example even states that the function takes a String
 representing a
 Category’s primary key and returns the category.

 The example goes further to explain:

 We then use this helper method to update the
 Set that we created earlier. Note that the callback function will be
 executed for each selected item
 in the multiselect, which is why the callback takes a String argument
 instead of a Set[String].

 But where is this callback function? Is it the same helper mentioned
 earlier. There's no other callback function parameter on the
 multiSelect constructor.

 This is all very confusing.

 Glenn...
--~--~-~--~~~---~--~~
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: multiselect example in Liftbook problem

2009-08-24 Thread Derek Chen-Becker
I've added this to my TODO to update the docs. Thanks for the report!

On Mon, Aug 24, 2009 at 5:30 PM, glenn gl...@exmbly.com wrote:


 I found that the example is out-of-sync with the latest code in 1.1-
 Snapshot.
 I was able to get the example (in my application, at least) to compile
 and run, by
 defining the function as loadCategory(List[String]) = ...,
 and creating a separate submit function to handle the actual save
 chores.

 Glenn...



 On Aug 24, 3:37 pm, glenn gl...@exmbly.com wrote:
  There seems to be a problem with  SHtml.multiSelect following the
  example in the Lift book (Listing 4.10: Using multiselect). The
  example shows the last parameter to be a List, while the source for
  multiSelect shows it to be
  (String) = Any.
 
  When I tried to implement in my own code, I get the compiler error:
  type mismatch found; List[String], required: String.
 
  The book example even states that the function takes a String
  representing a
  Category’s primary key and returns the category.
 
  The example goes further to explain:
 
  We then use this helper method to update the
  Set that we created earlier. Note that the callback function will be
  executed for each selected item
  in the multiselect, which is why the callback takes a String argument
  instead of a Set[String].
 
  But where is this callback function? Is it the same helper mentioned
  earlier. There's no other callback function parameter on the
  multiSelect constructor.
 
  This is all very confusing.
 
  Glenn...
 


--~--~-~--~~~---~--~~
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: Re-factored Archetypes

2009-08-24 Thread Derek Chen-Becker
Rockstar!

On Mon, Aug 24, 2009 at 5:17 PM, Timothy Perrett timo...@getintheloop.euwrote:


 Guys,

 As promised, i've re-factored the archetypes (now in their own
 submodule and building as part of master) however their maven group
 and artifactId's are the same, so all commands etc will continue to
 work (its purely a code base organization change)

 Moreover, i've fixed the various issues with velocity in the jpa-basic
 archetype (its late here, i'll fix the others 2mro) and i've also
 fixed the Jetty version in all the pom.xml to a sensible range.

 Enjoy...

 Cheers, Tim


 On Aug 25, 12:02 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
  Sorry about that. It's a one line commit, so hopefully Git will be able
 to
  figure out a sane merge.
 
  Derek
 
  2009/8/24 Timothy Perrett timo...@getintheloop.eu
 
 
 
 
 
   Doh... I see you already committed it... (obviously didn’t see my other
   post); I’ll attempt to do a merge with my local reorganized and fixed
   archetypes.
 
   Tim
 
   On 24/08/2009 23:43, Derek Chen-Becker dchenbec...@gmail.com
 wrote:
 
   OK, that seems to have been it. I just pushed a commit and I'll verify
 once
   hudson builds it that it's working.
 
   Derek
 
   On Mon, Aug 24, 2009 at 4:36 PM, Derek Chen-Becker 
 dchenbec...@gmail.com
   wrote:
 
   I think I may have found the issue. I had a packaging element in the
 pom
   (none of the other archetypes do, as far as I can tell), so I've
 removed
   that and I'm doing a local build to see if that fixes it.
 
   Derek
 
   2009/8/24 Timothy Perrett timo...@getintheloop.eu
 
   Derek,
 
   Im currently reorganizing the lift archetype codebase as we speak, so
 I’ll
   look at it now...
 
   Cheers, Tim
 
   On 24/08/2009 23:03, Derek Chen-Becker dchenbec...@gmail.com 
   http://dchenbec...@gmail.com  wrote:
 
   OK, anyone with some maven-fu know what's going on here? It looks like
 the
   build is fine, but the jar is being copied to a .archetype file instead
 of
   .jar:
 
   [INFO] Installing
  
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/lift-archetype-jpa-blan
 k/target/lift-archetype-jpa-blank-1.1-SNAPSHOT.jar
   to
 
  
 /home/scalatools/hudson/.hudson/jobs/Lift/workspace/.repository/net/liftweb
 /lift-archetype-jpa-blank/1.1-SNAPSHOT/lift-archetype-jpa-blank-1.1-SNAPSHO
 T.maven-archetype
 
   Is this a problem with the pom packaging maybe?
 
   Derek
 
   On Mon, Aug 24, 2009 at 3:14 PM, Derek Chen-Becker 
 dchenbec...@gmail.com
   http://dchenbec...@gmail.com  wrote:
 
   Well. Bad news. I fixed the checksums only to find that somehow hudson
 is
   still generating archetypes with old sources. I'm at a loss as to how
 this
   is happening at this point...
 
   Derek
 
   On Mon, Aug 24, 2009 at 2:47 PM, Charles F. Munat c...@munat.com 
   http://c...@munat.com  wrote:
 
   Ah, so the errors were connected after all. I was curious about the
   checksum, but I didn't realize that would make it grab an earlier
 version.
 
   Derek Chen-Becker wrote:
OK, I think I've found an issue here. The sha1 checksum file for the
archetype was last updated on August 1st, and haven't been updated
 since
then. That's what your original error was, and it's why it's grabbing
 an
older version of the jar :(. Let me see if I can figure out why
 hudson
won't recalculate the checksums.
 
Derek
 
On Mon, Aug 24, 2009 at 2:13 PM, Charles F. Munat c...@munat.com 
   http://c...@munat.com
mailto:c...@munat.com c...@munat.com mailto:c...@munat.com%3e
 c...@munat.com%3e
wrote:
 
? ? Thanks for all your help, Indrajit. I'm using the blank JPA app
   anyway,
? ? so it didn't affect me, but I thought Derek, et al should know.
? ? Especially since I was using the Maven command from his book...
 
? ? Chas.
 
? ? Indrajit Raychaudhuri wrote:
? ? ? Chas,
? ? ?
? ? ? The problem is quite likely with the archetype jar in the
   scala-tools
? ? ? repo. Derek is probably looking into it.
? ? ? Yes, your being confused about the master reference is
? ? ? understandable :)
? ? ?
? ? ? Good that it compiles through. For now, you can set the
   dependencies
? ? ? to lift-core and lift-jpa to 1.1-M4 and proceed merrily.
? ? ?
? ? ? Cheers, Indrajit
? ? ?
? ? ? On Aug 24, 11:09 pm, Charles F. Munat c...@munat.com 
   http://c...@munat.com
? ? mailto:c...@munat.com c...@munat.com mailto:c...@munat.com
 %3Ec...@munat.com%3e
wrote:
? ? ? I'm on a new laptop. I didn't do any git pulls of Lift stuff.
 I
   just
? ? ? installed Scala with the IZ installer and then Maven, then I
 ran
   the
? ? ? archetype command to create a basic JPA app and let it build
 the
   m2
? ? ? repository on my machine. When that didn't work, I blew away
 m2
   and
? ? ? tried it again.
? ? ?
? ? ? Changing the lift-core dependency worked. So the problem is
? ? definitely
? ? ? with 1.1-SNAPSHOT -- at least the one I ended up 

[Lift] Re: MappedDateTime losing time?

2009-08-24 Thread Derek Chen-Becker
OK, the fix has been pushed to 1.0.1-SNAPSHOT and it's in master
(1.1-SNAPSHOT).

Derek

On Mon, Aug 24, 2009 at 1:30 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Yes, that should be fixed in both 1.1 and 1.0.1, really. I didn't even see
 that issue. The code freeze for 1.0.1 was yesterday, so if I want to get
 this fix in (which I think should be in there) then we'll need to push back
 1.0.1. Let me send out a vote email.


 On Sun, Aug 23, 2009 at 12:27 PM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:


 Derek Chen-Becker dchenbec...@gmail.com writes:

  It should be very safe to use 1.0.1-SNAPSHOT. I'm planning on spinning
 the
  release of 1.0.1 GA next Wednesday, so we're in a code freeze starting
  Sunday. Really, the 1.0 line is strictly bug-fix at this point
 (1.1-SNAPSHOT
  is where new features make it in). So far, the things that have made it
 into
  1.0.1 are:
 
  1. Proper Oracle support
  2. Fix for PostgreSQL double type
  3. The DateTime fix
  4. Some fixes for the Textile parser
  5. Some minor XML parsing fixes (PCDataMarkupParser)
  6. Some Actor fixes

 Derek, with the flurry of changes you're doing to the Db code (which is
 nice :-), it's increasingly difficult to maintain my own copy which
 fixes http://github.com/dpp/liftweb/issues#issue/36

 Any chance to get this included in 1.1 soon? (It's a two line fix :-)?

 /Jeppe

 



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



[Lift] Re: id selectors discouraged?

2009-08-24 Thread David Pollak
Please make sure you're using Scala 2.7.5 in your pom.xml

Please make sure that List(paint) is in lower case in your sitemap.

On Mon, Aug 24, 2009 at 3:53 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Lifted,

 At the pixillion master 
 http://github.com/leithaus/pixillion/tree/masteri've an example where it 
 appears that id selectors are not working
 correctly... Or, maybe i just don't know how to use CSS. The site map (after
 login) will show three pages of interest: paint, chat, combo. Paint is raw
 js without lift intervention and works as intended (for now). Chat is
 cribbed from the lift chat example. Combo attempts to put the two on the
 same page with lift tags in the drivers seat. As you can see the style is
 not being governed in the same way on the combo page, causing erroneous
 behavior in the paint rendering. Any help would be greatly appreciated.


If you remove the:

   lift:CSS.blueprint /
lift:CSS.fancyType /

lines from /templates-hidden/default.html, you'll get a much better result.
The CSS in Blueprint CSS is munging the CSS used by the paint program.

Please take a look at Firebug... it's a debugger for browsers... you can see
exactly how the browser applies style to each element.  It's mighty helpful.

On other notes, any JavaScript on the page *must* be escaped in ![CDATA[
blocks:

script type=text/javascript
$(document).ready(function() {

   /script

becomes:

  script type=text/javascript
// ![CDATA[
$(document).ready(function() {
...
   // ]]
   /script

The change set I sent out the last time you used the pixillion stuff as an
example should be applied to your project.  It fixes the Scala version issue
as well as the script escaping issue.



 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117

 +1 206.650.3740

 http://biosimilarity.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
Git some: http://github.com/dpp

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



[Lift] Re: Structuring Web Application

2009-08-24 Thread David Pollak
object MyVendor {
  def apply(in: Params): MyThing = (in, runMode) match {
 case (p, Test) = new BusinessLogic(p) with MockStorage
 case (p, Development) = new BusinessLogic(p) with H2Storage with
Debugging
 case (p, Production) if Amazon.running_? = new BusinessLogic(p) with
S3Storage
 case (p, Production) = new BusinessLogic(p) with PostgreSQLStorage
  }
}

I'm not sure I would change how snippets are dispatched based on run mode or
other parameters.  They are ostensibly business logic that is independent
from runtime constraints.

On Mon, Aug 24, 2009 at 12:49 PM, greekscala hellectro...@gmail.com wrote:


 Hello,

 ok. I know that I can compose my logic together.
 But I dont know how to configure my parts and where to do it.

 David says to create objects that do extend my traits?
 How do you guys do it, so that you have a seperation of
 Lift and application layer...?

 I am getting better :D

 thanks a lot

 On 24 Aug., 00:19, greekscala hellectro...@gmail.com wrote:
  Hello David,
 
  thanks for helping.
  Do you mean by composing my business logic with traits
  like the example of Jonas Bonerhttp://
 jonasboner.com/2008/10/06/real-world-scala-dependency-injectio...
  ?
  I understand the example.
 
  What do you mean by objects? The object Scala keyword?
 
  It would be great if you can give me a little example. How to glue it
  with a Lift Snippet.
 
  Thanks
  kind regards
 
  On 23 Aug., 19:23, David Pollak feeder.of.the.be...@gmail.com wrote:
 
   On Sun, Aug 23, 2009 at 5:15 AM, greekscala hellectro...@gmail.com
 wrote:
 
Hello Timothy,
 
thank you.
I know that I do not need Spring for Scala.
I dont expressed it well. How do I glue my app parts
together. And how do I glue the lift part with a facade or
application service of my domain layer.
 
   Use traits to describe the pieces of your business logic rather than
   classes.  Traits can be composed very easily.
 
   Don't use new, but use object's as factories that make run-time
 decisions
   about how to compose traits and vend them.
 
Thanks for your help
 
On 23 Aug., 13:12, Timothy Perrett timo...@getintheloop.eu wrote:
 Can you please be more specific about your app tier that you wish
 to
 access - im unfortunately not seeing what hurdle stops you from
 accessing it just as you would from Java?
 
 Cheers, Tim
 
 On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:
 
  Hello Lift Community,
 
  I want to implement a new Project in Scala with Lift. I am new to
  Scala/Lift.
  Scala looks great and it expanded my horizon. FP is a new concept
 to
  me.
 
  My background is Java and a little bit of Spring. I read three
 Scala
  books
  and a lot on blogs. But there is a missing part for me on how to
  combine
  my classes. I read the Scalable Components Paper and I dont get
 it
  100%.
  I need a little bit more input on structuring a web app and I
 hope to
  get the 100%
  with you guys.
  With Spring you let the container manage the classes. ok.
  I think my problem is, I dont know how you structured a web app
 in
  days
  without Spring.
 
  I would like to have Lift access my domain logic over an
 application
  layer (Domain
  Driven Design).
  In Wicket I would have my SpringBean annotation.
 
  So I hope to understand, how
  - can I access my app layer?
  - how could I organize my domain logic. I want to use DDD. I know
 I
  have to use
  object and class in a bigger sense...?
 
  I hope you guys can give me some hints.
 
  Thanks a lot
 
   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Git some:http://github.com/dpp

 



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

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



[Lift] Mapper with custom id

2009-08-24 Thread Naftoli Gugenheim

I'm trying to import data from a non-mapper-based database to one that is. I'm 
reading data with DB.exec and trying to save it using Mapper, but it's not 
getting saved. I'm guessing that since I'm setting the id (in runSafe) it 
thinks it needs to do an update, not an insert.  Is there a workaround? Also, 
doesn't this scenario break the logic of MetaMapper.saved_?() ? Wouldn't it 
make more sense to have a saved flag that is cleared by default and set when 
it's created as a result of a find, and after it's saved?

--~--~-~--~~~---~--~~
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: simple Ajax form

2009-08-24 Thread Jack Widman
Excellent. Thanks David.

On Mon, Aug 24, 2009 at 8:08 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Sun, Aug 23, 2009 at 10:40 PM, jack jack.wid...@gmail.com wrote:


 I am trying to make a simple ajax form. The code is below. The
 Javascript error I am getting when I hit the send button is:

 uncaught exception ReferenceError: F777221462447MPT is not defined

 Am I missing something?

 lift:surround with=default at=content
h1Hello FormAjax/h1
lift:HelloFormAjax.show
Hello hello:who/br/
label for=whoFieldWho :/labelhello:whoField/
hello:submit/
/lift:HelloFormAjax.show
 /lift:surround

 create src/main/scala/sandbox/lift/hellodarwin/snippet/HelloFormAjax
 package sandbox.lift.hellodarwin.snippet

 import scala.xml.NodeSeq
 import net.liftweb.http.S._
 import net.liftweb.http.SHtml._
 import net.liftweb.util.Helpers._
 import net.liftweb.http.js.{JsCmd, JsCmds}

 class HelloFormAjax {
  def whoNode(str: String) = span id=who{str}/span

  def updateWho(str: String): JsCmd = {
println(updateWho on  + str)
JsCmds.Run($('#who').text('+str+'))


 This will fail if str contains any non-printables or '.  Please use:

 str.encJs

 To encode a Scala String into a JavaScript friendly String.

 But better, you could use:

 SetHtml(who, scala.xml.Text(str))



  }






  def show(xhtml: NodeSeq): NodeSeq = {
bind(hello, xhtml,
whoField - text(world, null) % (size - 10) % (id -
  whoField),
submit - button type=button{?(Send)}/button %
 (onclick - ajaxCall(JsRaw($('#whoField').attr('value')), s =
 updateWho(s))),



 ajaxCall returns a tuple of (String, JsExp).  I'm not sure why the compiler
 is letting that get converted into the second half of a pair for
 UnparsedAttribute purposes... but... in order to use it, you must do:
 ajaxCall(JsRaw($('#whoField').attr('value')), s =updateWho(s))._2

 But... it'd be better to ValById:

 ajaxCall(ValById(whoField), , s =updateWho(s))._2

 I've added a few helpers to ajaxButton, so you can do:

 submit - ajaxButton(Text(?(Send)), ValById(whoField), s =
 updateWho(s))



who - whoNode(world)
)
  }
 }





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


 


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



[Lift] Re: id selectors discouraged?

2009-08-24 Thread Meredith Gregory
David,

Thanks! i've no idea why you guys put up with me, but i'm glad you do!

Best wishes,

--greg

On Mon, Aug 24, 2009 at 5:22 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Please make sure you're using Scala 2.7.5 in your pom.xml

 Please make sure that List(paint) is in lower case in your sitemap.

 On Mon, Aug 24, 2009 at 3:53 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 At the pixillion 
 masterhttp://github.com/leithaus/pixillion/tree/masteri've an example 
 where it appears that id selectors are not working
 correctly... Or, maybe i just don't know how to use CSS. The site map (after
 login) will show three pages of interest: paint, chat, combo. Paint is raw
 js without lift intervention and works as intended (for now). Chat is
 cribbed from the lift chat example. Combo attempts to put the two on the
 same page with lift tags in the drivers seat. As you can see the style is
 not being governed in the same way on the combo page, causing erroneous
 behavior in the paint rendering. Any help would be greatly appreciated.


 If you remove the:

lift:CSS.blueprint /
 lift:CSS.fancyType /

 lines from /templates-hidden/default.html, you'll get a much better
 result.  The CSS in Blueprint CSS is munging the CSS used by the paint
 program.

 Please take a look at Firebug... it's a debugger for browsers... you can
 see exactly how the browser applies style to each element.  It's mighty
 helpful.

 On other notes, any JavaScript on the page *must* be escaped in ![CDATA[
 blocks:

 script type=text/javascript
 $(document).ready(function() {
 
/script

 becomes:

   script type=text/javascript
 // ![CDATA[
 $(document).ready(function() {
 ...
// ]]
/script

 The change set I sent out the last time you used the pixillion stuff as an
 example should be applied to your project.  It fixes the Scala version issue
 as well as the script escaping issue.



 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117

 +1 206.650.3740

 http://biosimilarity.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
 Git some: http://github.com/dpp

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.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
-~--~~~~--~~--~--~---