[Lift] Re: Can't find Javascript files using LiftRules.resourceServerPath

2009-04-09 Thread marius d.

In your boot try this:

ResourceServer.allow {
  case jquery-tabs.js :: Nil = true
  case jquery-ui-1.7.1.custom.min.js :: Nil = true

}

On Apr 9, 12:17 am, glenn gl...@exmbly.com wrote:
 What am I doing wrong?

 I'm trying to implement tabs using the jquery-tabs.js (the JqueryTabs
 Plugin), but when I run the application, I get the following
 javascript error:

    jQuery.Tabs is undefined  http://localhost:8080/Line 34

 I'm using the following snippet to create the jquery script
 initializing the tabs.

 class HomePage {
 def tabRender(selector: String, height: String, width: String, tabs:
 List[String], ids: List[String]) : NodeSeq = {

     val onLoad = Unparsed(
                  $(document).ready(function() {
                     jQuery.Tabs.initialize('+selector+', '+height
 +', '+width+',
                         + JsArray(tabs.map(Str(_)):_*) + ,  + JsArray
 (ids.map(Str(_)):_*) +  );
                   });
                  )

     head
        script type=text/javascript src={/ +
 LiftRules.resourceServerPath + /jquery-tabs.js}/script
        script type=text/javascript src={/ +
 LiftRules.resourceServerPath + /jquery-ui-1.7.1.custom.min.js}/
 script
        script type=text/javascript charset=utf-8{onLoad}/
 script
      /head
   }

   def renderTabs(xhtml: NodeSeq): NodeSeq = {
      val ids = List(Page1, Page2, Page3)
      val tabs = List(Tab1,Tab2, Tab3)

       tabRender(MyTabbedView,300px, 150px, tabs, ids )
   }

 }

 My index.html is the following:

 lift:surround with=default at=content
    lift:HomePage.renderTabs/
    div id = MyTabbedView/div
    div id = Page1Page 1br/Description of jQuery Tabs plugin/
 div
    div id = Page2Page 2br/How to use this plugin/div
    div id = Page3Page 3br/Download plugin/div
 /lift:surround

 I put the jquery-tabs.js file in src/main/resources/toserve.

 The returned source athttp://localhost:8080contains the following
 html:

 script type=text/javascript src=/classpath/jquery-tabs.js
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 htmlbodyThe Requested URL /classpath/jquery-tabs.js was not found
 on this server/body/html

 Any help on getting this to run would be appreciated.

 Glenn Silverman
--~--~-~--~~~---~--~~
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: Can't find Javascript files using LiftRules.resourceServerPath

2009-04-09 Thread glenn

Problem solved. It seems you can't just put your js files in the path
src/main/resources/toserver.
You need to put them in a subfolder of toserve and specify the
subfolder in  ResourceServer.allow
in your Boot class.

I think improved documentation is needed in this area.

Glenn Silverman

On Apr 8, 2:17 pm, glenn gl...@exmbly.com wrote:
 What am I doing wrong?

 I'm trying to implement tabs using the jquery-tabs.js (the JqueryTabs
 Plugin), but when I run the application, I get the following
 javascript error:

    jQuery.Tabs is undefined  http://localhost:8080/Line 34

 I'm using the following snippet to create the jquery script
 initializing the tabs.

 class HomePage {
 def tabRender(selector: String, height: String, width: String, tabs:
 List[String], ids: List[String]) : NodeSeq = {

     val onLoad = Unparsed(
                  $(document).ready(function() {
                     jQuery.Tabs.initialize('+selector+', '+height
 +', '+width+',
                         + JsArray(tabs.map(Str(_)):_*) + ,  + JsArray
 (ids.map(Str(_)):_*) +  );
                   });
                  )

     head
        script type=text/javascript src={/ +
 LiftRules.resourceServerPath + /jquery-tabs.js}/script
        script type=text/javascript src={/ +
 LiftRules.resourceServerPath + /jquery-ui-1.7.1.custom.min.js}/
 script
        script type=text/javascript charset=utf-8{onLoad}/
 script
      /head
   }

   def renderTabs(xhtml: NodeSeq): NodeSeq = {
      val ids = List(Page1, Page2, Page3)
      val tabs = List(Tab1,Tab2, Tab3)

       tabRender(MyTabbedView,300px, 150px, tabs, ids )
   }

 }

 My index.html is the following:

 lift:surround with=default at=content
    lift:HomePage.renderTabs/
    div id = MyTabbedView/div
    div id = Page1Page 1br/Description of jQuery Tabs plugin/
 div
    div id = Page2Page 2br/How to use this plugin/div
    div id = Page3Page 3br/Download plugin/div
 /lift:surround

 I put the jquery-tabs.js file in src/main/resources/toserve.

 The returned source athttp://localhost:8080contains the following
 html:

 script type=text/javascript src=/classpath/jquery-tabs.js
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 htmlbodyThe Requested URL /classpath/jquery-tabs.js was not found
 on this server/body/html

 Any help on getting this to run would be appreciated.

 Glenn Silverman

--~--~-~--~~~---~--~~
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] NetBeans How-To for Lift

2009-04-09 Thread Randy Syring

I have downloaded NetBeans and the Scala plugin and it is working with
a Hello World application.  I would now like to start working with
Lift in NetBeans, but I am completely lost as to how to run a Lift
project from within NetBeans.  Would it be possible for someone to
help me run this tutorial:

http://liftweb.net/docs/getting_started/mod_master.html

from within NetBeans using the scala and mavin plugins?

--~--~-~--~~~---~--~~
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: Rails - Lift

2009-04-09 Thread Warren Henning

You're proposing to scrap working code?

Isn't that trying to fix something that isn't broken?

Warren

On Wed, Apr 8, 2009 at 8:58 PM, Charles F. Munat c...@munat.com wrote:
 I'm writing a proposal for a presentation on moving from Rails to Lift.

--~--~-~--~~~---~--~~
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: Where to start

2009-04-09 Thread Darren Hague

You may also wish to have a look at ESME, an Apache Incubator project
which expands on Skittr in a number of ways. There is OpenID sign-on,
search (via Lucene/Compass), a DSL for filtering  routing messages,
an HTTP-based API, and much more.

Check out http://blog.esme.us and http://incubator.apache.org/esme for
more details. Source code links are here: 
http://incubator.apache.org/esme/community/contribute.html

Cheers,
Darren

On Apr 8, 6:10 am, David Bernard david.bernard...@gmail.com wrote:
 samples and demo code are available in the lift source under sites (bad
 name) 
 directoryhttp://github.com/dpp/liftweb/tree/c096b784c3fb43900ea0b2b10ad71df34f...

 /davidB

 On Tue, Apr 7, 2009 at 22:29, Erkki Lindpere vill...@gmail.com wrote:

  I really want to try Lift out, but I find the documentation a bit
  lacking (and on the other hand the getting started guide is too
  verbose IMHO).

  My preferred method is to take a look at the source of an example
  application that is more complex than hello world (even better if
  more complex than the hellolift archetype as well) and then I'll read
  some docs on the side. Is there such an example app? skittr-example?

  Regards,

  Erkki Lindpere
--~--~-~--~~~---~--~~
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: NetBeans How-To for Lift

2009-04-09 Thread Caoyuan

http://blogtrader.net/dcaoyuan/entry/run_debug_lift_web_app

On Thu, Apr 9, 2009 at 2:21 PM, Randy Syring rsyr...@gmail.com wrote:

 I have downloaded NetBeans and the Scala plugin and it is working with
 a Hello World application.  I would now like to start working with
 Lift in NetBeans, but I am completely lost as to how to run a Lift
 project from within NetBeans.  Would it be possible for someone to
 help me run this tutorial:

 http://liftweb.net/docs/getting_started/mod_master.html

 from within NetBeans using the scala and mavin plugins?

 


--~--~-~--~~~---~--~~
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: Rails - Lift

2009-04-09 Thread Jacob Grydholt Jensen

No, he is talking about *developers* switching from rails to lift, not projects.

/grydholt

--~--~-~--~~~---~--~~
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: Can't find Javascript files using LiftRules.resourceServerPath

2009-04-09 Thread marius d.

that to :) ... the above should also work as well if you leave your
files in toserve. ResourceServer is also discussed in the upcoming
Lift book.

If one understands how ResourceServer works there is no need for
further explanations of sub-folders etc. Relevant examples can be
found in Lift-Widgets project.

Br's,
Marius


On Apr 9, 7:59 am, glenn gl...@exmbly.com wrote:
 Problem solved. It seems you can't just put your js files in the path
 src/main/resources/toserver.
 You need to put them in a subfolder of toserve and specify the
 subfolder in  ResourceServer.allow
 in your Boot class.

 I think improved documentation is needed in this area.

 Glenn Silverman

 On Apr 8, 2:17 pm, glenn gl...@exmbly.com wrote:

  What am I doing wrong?

  I'm trying to implement tabs using the jquery-tabs.js (the JqueryTabs
  Plugin), but when I run the application, I get the following
  javascript error:

     jQuery.Tabs is undefined  http://localhost:8080/Line34

  I'm using the following snippet to create the jquery script
  initializing the tabs.

  class HomePage {
  def tabRender(selector: String, height: String, width: String, tabs:
  List[String], ids: List[String]) : NodeSeq = {

      val onLoad = Unparsed(
                   $(document).ready(function() {
                      jQuery.Tabs.initialize('+selector+', '+height
  +', '+width+',
                          + JsArray(tabs.map(Str(_)):_*) + ,  + 
  JsArray
  (ids.map(Str(_)):_*) +  );
                    });
                   )

      head
         script type=text/javascript src={/ +
  LiftRules.resourceServerPath + /jquery-tabs.js}/script
         script type=text/javascript src={/ +
  LiftRules.resourceServerPath + /jquery-ui-1.7.1.custom.min.js}/
  script
         script type=text/javascript charset=utf-8{onLoad}/
  script
       /head
    }

    def renderTabs(xhtml: NodeSeq): NodeSeq = {
       val ids = List(Page1, Page2, Page3)
       val tabs = List(Tab1,Tab2, Tab3)

        tabRender(MyTabbedView,300px, 150px, tabs, ids )
    }

  }

  My index.html is the following:

  lift:surround with=default at=content
     lift:HomePage.renderTabs/
     div id = MyTabbedView/div
     div id = Page1Page 1br/Description of jQuery Tabs plugin/
  div
     div id = Page2Page 2br/How to use this plugin/div
     div id = Page3Page 3br/Download plugin/div
  /lift:surround

  I put the jquery-tabs.js file in src/main/resources/toserve.

  The returned source athttp://localhost:8080containsthe following
  html:

  script type=text/javascript src=/classpath/jquery-tabs.js
  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  htmlbodyThe Requested URL /classpath/jquery-tabs.js was not found
  on this server/body/html

  Any help on getting this to run would be appreciated.

  Glenn Silverman
--~--~-~--~~~---~--~~
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: Rails - Lift

2009-04-09 Thread Charles F. Munat

Sorry, but I haven't got a clue what you're talking about.

Chas.

Warren Henning wrote:
 You're proposing to scrap working code?
 
 Isn't that trying to fix something that isn't broken?
 
 Warren
 
 On Wed, Apr 8, 2009 at 8:58 PM, Charles F. Munat c...@munat.com wrote:
 I'm writing a proposal for a presentation on moving from Rails to Lift.
 
  

--~--~-~--~~~---~--~~
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: Rails - Lift

2009-04-09 Thread Alexander Kellett

actually my biggest blocker (and still my blocker) is getting a
working coding environment.

there is so much contradictory information on which ide is the best.
it would be really nice to have a document that talks about the pro's
and con's of each ide.

in the rails/osx world its easy: use textmate unless you have a
predisposition for something else.

not the case for lift / scala in general.

i know, boring... but i think it really would help to have such a
document to help people decide.

On Thu, Apr 9, 2009 at 5:58 AM, Charles F. Munat c...@munat.com wrote:

 I'm writing a proposal for a presentation on moving from Rails to Lift.

 A couple of stumbling blocks that I've mentioned are:

 1. Understanding and taking advantage of immutable constructs.

 2. Getting the hang of the view-centric approach to MVC.

 Before I go much further, I'd like to poll this list for things that
 others think should be included. For former or current Rails developers
 like myself, What sorts of things gave you the most trouble when moving
 to Lift (or trying it out)? What would you like to have had someone
 explain to you to make the transition easier?

 Thanks for any help!

 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] Re: Lift AJAX and IE6

2009-04-09 Thread olambo



  Also, is the Lift AJAX script necessary for anything other than Comet?
  If I have a site that's using no AJAX or Comet, can I just turn this
  off? If so, how?

 No... it's also used for Garbage Collection. :-(

I've also noticed this running. Is this Garbage Collection of
javascript or a call to the JVM?



--~--~-~--~~~---~--~~
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] Object typecast to Mapper

2009-04-09 Thread Amit Kumar Verma

Hi All,

I am trying to type cast an scala object to its mapper object

1 def getJSONString(anyObject :Object):NodeSeq = {

2 var obj = anyObject.asInstanceOf[anyObject.getClass
().getName()];

3 obj.findAll.map(userdetails = {
// some code will go here
 }
 Text(any string)
  }


but i am getting erroe as expected [ but found ( on line 2.

please help me to typecast the object to its mapper object.

Thanks
Amit Kumar Verma

--~--~-~--~~~---~--~~
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: Rails - Lift

2009-04-09 Thread David Pollak
On Thu, Apr 9, 2009 at 2:38 AM, Alexander Kellett lypa...@gmail.com wrote:


 actually my biggest blocker (and still my blocker) is getting a
 working coding environment.

 there is so much contradictory information on which ide is the best.
 it would be really nice to have a document that talks about the pro's
 and con's of each ide.

 in the rails/osx world its easy: use textmate unless you have a
 predisposition for something else.


I spent a lot of time coding Scala and Lift with emacs and Textmate.  They
work fine.

While my current IDE of choice is NetBeans, I'm not convinced that an IDE is
better than a good text editor.




 not the case for lift / scala in general.

 i know, boring... but i think it really would help to have such a
 document to help people decide.

 On Thu, Apr 9, 2009 at 5:58 AM, Charles F. Munat c...@munat.com wrote:
 
  I'm writing a proposal for a presentation on moving from Rails to Lift.
 
  A couple of stumbling blocks that I've mentioned are:
 
  1. Understanding and taking advantage of immutable constructs.
 
  2. Getting the hang of the view-centric approach to MVC.
 
  Before I go much further, I'd like to poll this list for things that
  others think should be included. For former or current Rails developers
  like myself, What sorts of things gave you the most trouble when moving
  to Lift (or trying it out)? What would you like to have had someone
  explain to you to make the transition easier?
 
  Thanks for any help!
 
  Chas.
 
  
 

 



-- 
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: How to use the new Record framework and Jackrabbit

2009-04-09 Thread Josh Suereth
Glenn,

Given what I know of the existing Scala OSGi bundles, I don't see any issues
with what you're attempting, but I have not tried that personally.

As Tim mentioned, the stuff Heiko and I are working on will hopefully unify
the existing OSGi solutions and provide a little bit easier integration for
you.  I'm hoping you'll see the early work show up in the scala nightlies by
next week.

In the meantime Heiko's bundlification of scala or the scala-library used
by the eclipse plugin are both good alternatives for using scala in OSGi
environments.   I've only ever used the later personally (and I would only
recommend it in equinox, as it uses eclipse specific manifest extensions).


- Josh

On Wed, Apr 8, 2009 at 7:34 PM, Timothy Perrett timo...@getintheloop.euwrote:



 Glenn, my understanding is that the OSGI stuff is *extremely* new... Check
 back on the recent conversations about it on list and that might answer
 some
 of your questions :-)

 Josh might also chime in with an appropriate answer as I think he's been
 working on the OSGI stuff.

 Cheers, Tim

 On 08/04/2009 22:27, glenn gl...@exmbly.com wrote:

 
  Has anyone tried to use the Scala OSGI bundle, say in Sling, to
  persist data to Jackrabbit? Any attempt at an implementation, at this
  stage, would be welcome.
 
  Glenn Silverman
 
  
 



 


--~--~-~--~~~---~--~~
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 AJAX and IE6

2009-04-09 Thread David Pollak
On Thu, Apr 9, 2009 at 4:35 AM, olambo olambo...@gmail.com wrote:



 
   Also, is the Lift AJAX script necessary for anything other than Comet?
   If I have a site that's using no AJAX or Comet, can I just turn this
   off? If so, how?
 
  No... it's also used for Garbage Collection. :-(

 I've also noticed this running. Is this Garbage Collection of
 javascript or a call to the JVM?


Lift stores a mapping between GUIDs it assigns to HTML elements on the
client to functions to execute when those elements are processed by the
server.  For example:

SHtml.text(, s = println(The text box was +s))

The function (s = println(The text box was +s)) is stored on the server.
 The input type=text .../ tag has a GUID that binds the HTML element to
the function.  If the HTML element is not on the client any more, the
reference to the function should be dropped so it's not using resources.
 This is garbage collection.  It is not JVM garbage collection, but it is
removal of unused references.






 



-- 
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: Rails - Lift

2009-04-09 Thread Timothy Perrett


On the contrary... Im coding in TextMate right now: it works perfect!

I run scala:cc in a terminal window and just code away in TextMate. Job
done.

Tim

On 09/04/2009 10:38, Alexander Kellett lypa...@gmail.com wrote:
 in the rails/osx world its easy: use textmate unless you have a
 predisposition for something else.
 
 not the case for lift / scala in general.
 
 i know, boring... but i think it really would help to have such a
 document to help people decide.



--~--~-~--~~~---~--~~
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: Object typecast to Mapper

2009-04-09 Thread David Pollak
Howdy,
Scala is a static language, so the class for casting must be known at
compile time.  It's not possible to construct a String at runtime and cast
an object into a class represented by that String.

However, casting to a known class is easy in Scala... and it's done
primarily using pattern matching.  The following code:

  def foo(in: Any) = in match {
case mm: MetaMapper[_] =
  mm.findAll.map(
(m: Mapper[_]) =
m.asJs
  )
case _ =
  }


Does what I think you want.  It takes an incoming instance, in and matches
it against being an instance of MetaMapper[_].  This means its some type of
MetaMapper (we don't know or care what the type parameter is).  If it is a
MetaMapper, it's assigned to the mm variable.  We can then call findAll on
that variable and we have a bunch of Mapper[_] instances.  Note that I
explicitly called out the type of m in the function, but that line could be
re-written mm.findAll.map(m = m.asJs) because the compiler infers the type
of m.

Does this help?

Thanks,

David


On Thu, Apr 9, 2009 at 3:55 AM, Amit Kumar Verma cdac.a...@gmail.comwrote:


 Hi All,

 I am trying to type cast an scala object to its mapper object

 1 def getJSONString(anyObject :Object):NodeSeq = {

 2 var obj = anyObject.asInstanceOf[anyObject.getClass
 ().getName()];

 3 obj.findAll.map(userdetails = {
// some code will go here
 }
 Text(any string)
  }


 but i am getting erroe as expected [ but found ( on line 2.

 please help me to typecast the object to its mapper object.

 Thanks
 Amit Kumar Verma

 



-- 
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: Rails - Lift

2009-04-09 Thread Clemens Oertel

I don't think it's necessary to make a final decision about your IDE  
at any time. AFAIK, all major IDEs work quite well with Maven's pom  
files, so it's very easy to switch IDEs at any time.

I for instance used NetBeans until last month, when JetBrains updated  
their Scala plugin - then I switched to IntelliJ. The transition was  
very smooth.

So start with any one of the IDEs, and once you've figured out what do  
don't like about that very IDE, you can look around whether another  
IDE might do it better.

And anyways, if there really was a best IDE, it would probably be  
the only IDE (the causality goes both ways). It's always a matter of  
needs, prior experience, taste ...

Best,
Clemens

On 9-Apr-09, at 5:38 AM, Alexander Kellett wrote:


 actually my biggest blocker (and still my blocker) is getting a
 working coding environment.

 there is so much contradictory information on which ide is the best.
 it would be really nice to have a document that talks about the pro's
 and con's of each ide.

 in the rails/osx world its easy: use textmate unless you have a
 predisposition for something else.

 not the case for lift / scala in general.

 i know, boring... but i think it really would help to have such a
 document to help people decide.

 On Thu, Apr 9, 2009 at 5:58 AM, Charles F. Munat c...@munat.com  
 wrote:

 I'm writing a proposal for a presentation on moving from Rails to  
 Lift.

 A couple of stumbling blocks that I've mentioned are:

 1. Understanding and taking advantage of immutable constructs.

 2. Getting the hang of the view-centric approach to MVC.

 Before I go much further, I'd like to poll this list for things that
 others think should be included. For former or current Rails  
 developers
 like myself, What sorts of things gave you the most trouble when  
 moving
 to Lift (or trying it out)? What would you like to have had someone
 explain to you to make the transition easier?

 Thanks for any help!

 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] Re: Rails - Lift

2009-04-09 Thread Josh Suereth
On Thu, Apr 9, 2009 at 9:42 AM, Clemens Oertel clemens.oer...@gmail.comwrote:


 I don't think it's necessary to make a final decision about your IDE
 at any time. AFAIK, all major IDEs work quite well with Maven's pom
 files, so it's very easy to switch IDEs at any time.


WOAAAH  I beg to differ.   Actually some IDEs work much better with
Maven pom's than others.  It depends on how you like to arrange your
projects and work on them.  (At work, the IntelliJ users get a much
different feel for multi-module projects than Eclipse users).

As you said in the lower portion, choosing an IDE is more about what you're
comfortable with.   As I know Eclipse the best I am most productive in it
(being a plugin contributor helps here ;) ).  I have coded scala in a text
editor (and sometimes resort to that at times), but in general I am more
efficient in eclipse as I began to think in eclipse when I code.  I'm
positive this is different for different users.

--~--~-~--~~~---~--~~
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: NetBeans How-To for Lift

2009-04-09 Thread Randy Syring

Thank you for the reply.  Unfortunately, that post assumes one already
has the project setup in NetBeans and they just want to debug it.  I
am not even sure how to get the project setup in NetBeans.  The quick
start tutorial says I should run a (very long) mvn command to setup
the project structure and then goes on to say that I should use 'mvn
jetty:run'.  But how do I do those things in NetBeans?

On Apr 9, 4:39 am, Caoyuan dcaoy...@gmail.com wrote:
 http://blogtrader.net/dcaoyuan/entry/run_debug_lift_web_app

 On Thu, Apr 9, 2009 at 2:21 PM, Randy Syring rsyr...@gmail.com wrote:

  I have downloaded NetBeans and the Scala plugin and it is working with
  a Hello World application.  I would now like to start working with
  Lift in NetBeans, but I am completely lost as to how to run a Lift
  project from within NetBeans.  Would it be possible for someone to
  help me run this tutorial:

 http://liftweb.net/docs/getting_started/mod_master.html

  from within NetBeans using the scala and mavin plugins?

--~--~-~--~~~---~--~~
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: NetBeans How-To for Lift

2009-04-09 Thread bradford

Step 1:  Create the project via mvn archetype:create or mvn
archetype:generate.  The wiki is still down, but you can see the lift
book for more information about this.  The tutorial you are looking at
says to generate the lift-archetype-blank.

Step 2:  In NetBeans go to file - open - and select the project you
just created (it should have a maven icon next to it).

Step 3:  Go to the command prompt and type mvn jetty:run.  You can
also execute this through NetBeans, but I like using the command
prompt.

Step 4:  Go to http://localhost:8080/

On Apr 9, 9:55 am, Randy Syring rsyr...@gmail.com wrote:
 Thank you for the reply.  Unfortunately, that post assumes one already
 has the project setup in NetBeans and they just want to debug it.  I
 am not even sure how to get the project setup in NetBeans.  The quick
 start tutorial says I should run a (very long) mvn command to setup
 the project structure and then goes on to say that I should use 'mvn
 jetty:run'.  But how do I do those things in NetBeans?

 On Apr 9, 4:39 am, Caoyuan dcaoy...@gmail.com wrote:

 http://blogtrader.net/dcaoyuan/entry/run_debug_lift_web_app

  On Thu, Apr 9, 2009 at 2:21 PM, Randy Syring rsyr...@gmail.com wrote:

   I have downloaded NetBeans and the Scala plugin and it is working with
   a Hello World application.  I would now like to start working with
   Lift in NetBeans, but I am completely lost as to how to run a Lift
   project from within NetBeans.  Would it be possible for someone to
   help me run this tutorial:

  http://liftweb.net/docs/getting_started/mod_master.html

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



[Lift] Re: How to use the new Record framework and Jackrabbit

2009-04-09 Thread Heiko Seeberger
Glenn,

We have just started OSGi-fying Scala and Lift and there is still some  
way to go ...

If you need a properly OSGi-fied Scala library right now then take a  
look at ScalaModules (www.scalamodules.org). But as Josh mentioned we  
will hopefully soon see the official Scala JARs being OSGi bundles ...

Regarding persistence: OSGi class loading sometimes is a little  
tricky, especially when dealing with code not designed for OSGi. I  
guess we will have to work on that a little. I will post progress to  
this list.

Heiko

On 09.04.2009, at 14:25, Josh Suereth wrote:

 Glenn,

 Given what I know of the existing Scala OSGi bundles, I don't see  
 any issues with what you're attempting, but I have not tried that  
 personally.

 As Tim mentioned, the stuff Heiko and I are working on will  
 hopefully unify the existing OSGi solutions and provide a little bit  
 easier integration for you.  I'm hoping you'll see the early work  
 show up in the scala nightlies by next week.

 In the meantime Heiko's bundlification of scala or the scala- 
 library used by the eclipse plugin are both good alternatives for  
 using scala in OSGi environments.   I've only ever used the later  
 personally (and I would only recommend it in equinox, as it uses  
 eclipse specific manifest extensions).


 - Josh

 On Wed, Apr 8, 2009 at 7:34 PM, Timothy Perrett timo...@getintheloop.eu 
  wrote:


 Glenn, my understanding is that the OSGI stuff is *extremely* new...  
 Check
 back on the recent conversations about it on list and that might  
 answer some
 of your questions :-)

 Josh might also chime in with an appropriate answer as I think he's  
 been
 working on the OSGI stuff.

 Cheers, Tim

 On 08/04/2009 22:27, glenn gl...@exmbly.com wrote:

 
  Has anyone tried to use the Scala OSGI bundle, say in Sling, to
  persist data to Jackrabbit? Any attempt at an implementation, at  
 this
  stage, would be welcome.
 
  Glenn Silverman
 
  
 






 



--~--~-~--~~~---~--~~
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: NetBeans How-To for Lift

2009-04-09 Thread Randy Syring

Bradford,

Thanks, that helps.  Note, on Step 2 it should be File - Open
Project...

On Apr 9, 10:33 am, bradford fingerm...@gmail.com wrote:
 Step 1:  Create the project via mvn archetype:create or mvn
 archetype:generate.  The wiki is still down, but you can see the lift
 book for more information about this.  The tutorial you are looking at
 says to generate the lift-archetype-blank.

 Step 2:  In NetBeans go to file - open - and select the project you
 just created (it should have a maven icon next to it).

 Step 3:  Go to the command prompt and type mvn jetty:run.  You can
 also execute this through NetBeans, but I like using the command
 prompt.

 Step 4:  Go tohttp://localhost:8080/

 On Apr 9, 9:55 am, Randy Syring rsyr...@gmail.com wrote:

  Thank you for the reply.  Unfortunately, that post assumes one already
  has the project setup in NetBeans and they just want to debug it.  I
  am not even sure how to get the project setup in NetBeans.  The quick
  start tutorial says I should run a (very long) mvn command to setup
  the project structure and then goes on to say that I should use 'mvn
  jetty:run'.  But how do I do those things in NetBeans?

  On Apr 9, 4:39 am, Caoyuan dcaoy...@gmail.com wrote:

  http://blogtrader.net/dcaoyuan/entry/run_debug_lift_web_app

   On Thu, Apr 9, 2009 at 2:21 PM, Randy Syring rsyr...@gmail.com wrote:

I have downloaded NetBeans and the Scala plugin and it is working with
a Hello World application.  I would now like to start working with
Lift in NetBeans, but I am completely lost as to how to run a Lift
project from within NetBeans.  Would it be possible for someone to
help me run this tutorial:

   http://liftweb.net/docs/getting_started/mod_master.html

from within NetBeans using the scala and mavin plugins?

--~--~-~--~~~---~--~~
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: Rails - Lift

2009-04-09 Thread Charles F. Munat

Ah, I get it now.

Jacob Grydholt Jensen wrote:
 No, he is talking about *developers* switching from rails to lift, not 
 projects.
 
 /grydholt
 
  

--~--~-~--~~~---~--~~
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: Rails - Lift

2009-04-09 Thread Charles F. Munat

This is interesting. I'll think about this. Thanks.

Chas.

Alexander Kellett wrote:
 actually my biggest blocker (and still my blocker) is getting a
 working coding environment.
 
 there is so much contradictory information on which ide is the best.
 it would be really nice to have a document that talks about the pro's
 and con's of each ide.
 
 in the rails/osx world its easy: use textmate unless you have a
 predisposition for something else.
 
 not the case for lift / scala in general.
 
 i know, boring... but i think it really would help to have such a
 document to help people decide.
 
 On Thu, Apr 9, 2009 at 5:58 AM, Charles F. Munat c...@munat.com wrote:
 I'm writing a proposal for a presentation on moving from Rails to Lift.

 A couple of stumbling blocks that I've mentioned are:

 1. Understanding and taking advantage of immutable constructs.

 2. Getting the hang of the view-centric approach to MVC.

 Before I go much further, I'd like to poll this list for things that
 others think should be included. For former or current Rails developers
 like myself, What sorts of things gave you the most trouble when moving
 to Lift (or trying it out)? What would you like to have had someone
 explain to you to make the transition easier?

 Thanks for any help!

 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] Re: Rails - Lift

2009-04-09 Thread Charles F. Munat

I was thinking that I'd start with Textmate, since I've used that the 
most and it's what most Rails developers use, and then move to NetBeans, 
since that seems to be pretty popular. But I could take a quick look at 
Eclipse, too.

David Pollak wrote:
 
 
 On Thu, Apr 9, 2009 at 2:38 AM, Alexander Kellett lypa...@gmail.com 
 mailto:lypa...@gmail.com wrote:
 
 
 actually my biggest blocker (and still my blocker) is getting a
 working coding environment.
 
 there is so much contradictory information on which ide is the best.
 it would be really nice to have a document that talks about the pro's
 and con's of each ide.
 
 in the rails/osx world its easy: use textmate unless you have a
 predisposition for something else.
 
 
 I spent a lot of time coding Scala and Lift with emacs and Textmate. 
  They work fine.
 
 While my current IDE of choice is NetBeans, I'm not convinced that an 
 IDE is better than a good text editor.
  
 
 
 
 not the case for lift / scala in general.
 
 i know, boring... but i think it really would help to have such a
 document to help people decide.
 
 On Thu, Apr 9, 2009 at 5:58 AM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
  
   I'm writing a proposal for a presentation on moving from Rails to
 Lift.
  
   A couple of stumbling blocks that I've mentioned are:
  
   1. Understanding and taking advantage of immutable constructs.
  
   2. Getting the hang of the view-centric approach to MVC.
  
   Before I go much further, I'd like to poll this list for things that
   others think should be included. For former or current Rails
 developers
   like myself, What sorts of things gave you the most trouble when
 moving
   to Lift (or trying it out)? What would you like to have had someone
   explain to you to make the transition easier?
  
   Thanks for any help!
  
   Chas.
  
   
  
 
 
 
 
 
 -- 
 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: Rails - Lift

2009-04-09 Thread TylerWeir

It's not an editor/IDE war unless someone brings up Vim or Emacs,
so...

I've been using Vim+Scala+Ctags since I started.

I'd recommend not getting hung-up on which editor is the best  just
start coding.


On Apr 9, 3:01 pm, Charles F. Munat c...@munat.com wrote:
 I was thinking that I'd start with Textmate, since I've used that the
 most and it's what most Rails developers use, and then move to NetBeans,
 since that seems to be pretty popular. But I could take a quick look at
 Eclipse, too.



 David Pollak wrote:

  On Thu, Apr 9, 2009 at 2:38 AM, Alexander Kellett lypa...@gmail.com
  mailto:lypa...@gmail.com wrote:

      actually my biggest blocker (and still my blocker) is getting a
      working coding environment.

      there is so much contradictory information on which ide is the best.
      it would be really nice to have a document that talks about the pro's
      and con's of each ide.

      in the rails/osx world its easy: use textmate unless you have a
      predisposition for something else.

  I spent a lot of time coding Scala and Lift with emacs and Textmate.
   They work fine.

  While my current IDE of choice is NetBeans, I'm not convinced that an
  IDE is better than a good text editor.

      not the case for lift / scala in general.

      i know, boring... but i think it really would help to have such a
      document to help people decide.

      On Thu, Apr 9, 2009 at 5:58 AM, Charles F. Munat c...@munat.com
      mailto:c...@munat.com wrote:

        I'm writing a proposal for a presentation on moving from Rails to
      Lift.

        A couple of stumbling blocks that I've mentioned are:

        1. Understanding and taking advantage of immutable constructs.

        2. Getting the hang of the view-centric approach to MVC.

        Before I go much further, I'd like to poll this list for things that
        others think should be included. For former or current Rails
      developers
        like myself, What sorts of things gave you the most trouble when
      moving
        to Lift (or trying it out)? What would you like to have had someone
        explain to you to make the transition easier?

        Thanks for any help!

        Chas.

  --
  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] Is the demo supposed to be not working?

2009-04-09 Thread d...@felstar.com

i.e.

http://demo.liftweb.net/

Gives

Bad gateway.


--~--~-~--~~~---~--~~
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] Big Domain Model - Lift and Persistence

2009-04-09 Thread Tim P

Hi
I'm embarking on a web project with a big domain model (50+ classes -
supply chain application).
I was all set to go using a combination of Java domain classes, a bit
of mixin via ClassFileTransformer, Hibernate and Grails as a web
framework.
Someone said if you're looking at mixin look at Scala, and it's got a
web framework too
so I arrived here about 2 hours ago (still printing out the book).

Is anyone using Lift for a project like this? Any comments on
applicability? And would you use the native mapper mechanism or jpa as
in the book if you did?

Grails is clearly miles ahead in terms of documentation and community
size, but the lack of type safety in groovy really irritates me (hence
the class files in Java).

any comments?

also my quick scan of the book shows a mix of hibernate validators and
scala. Any reason why using annotations is good for this, if it could
be done in parent classes instead?

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: Is the demo supposed to be not working?

2009-04-09 Thread TylerWeir

Can you give it another shot?

It looks fine to me.  The server is recovering from a bit of
unpleasantness, so this may be transient.

On Apr 9, 2:19 pm, d...@felstar.com d...@felstar.com wrote:
 i.e.

 http://demo.liftweb.net/

 Gives

 Bad gateway.
--~--~-~--~~~---~--~~
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: Big Domain Model - Lift and Persistence

2009-04-09 Thread Derek Chen-Becker
The Hibernate Validations section is in there to show one approach. Given
the breadth of people's requirements for validation it would be hard to say
that one way is always preferable over the other.

On you original question, my experience with Mapper says that for a schema
that big (and, I'm assuming, correspondingly complex in terms of joins and
relations) then JPA will be easier to work with. The tradeoff is that you'll
have to do the validation and form handling yourself.

Derek

On Thu, Apr 9, 2009 at 12:56 PM, Tim P tim.pig...@optrak.co.uk wrote:


 Hi
 I'm embarking on a web project with a big domain model (50+ classes -
 supply chain application).
 I was all set to go using a combination of Java domain classes, a bit
 of mixin via ClassFileTransformer, Hibernate and Grails as a web
 framework.
 Someone said if you're looking at mixin look at Scala, and it's got a
 web framework too
 so I arrived here about 2 hours ago (still printing out the book).

 Is anyone using Lift for a project like this? Any comments on
 applicability? And would you use the native mapper mechanism or jpa as
 in the book if you did?

 Grails is clearly miles ahead in terms of documentation and community
 size, but the lack of type safety in groovy really irritates me (hence
 the class files in Java).

 any comments?

 also my quick scan of the book shows a mix of hibernate validators and
 scala. Any reason why using annotations is good for this, if it could
 be done in parent classes instead?

 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: Is the demo supposed to be not working?

2009-04-09 Thread d...@felstar.com

Fine now, was dead a a doornail before.

Dino.

--~--~-~--~~~---~--~~
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 AJAX and IE6

2009-04-09 Thread Oliver Lambert
On Thu, Apr 9, 2009 at 11:03 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Thu, Apr 9, 2009 at 4:35 AM, olambo olambo...@gmail.com wrote:



 
   Also, is the Lift AJAX script necessary for anything other than Comet?
   If I have a site that's using no AJAX or Comet, can I just turn this
   off? If so, how?
 
  No... it's also used for Garbage Collection. :-(

 I've also noticed this running. Is this Garbage Collection of
 javascript or a call to the JVM?


 Lift stores a mapping between GUIDs it assigns to HTML elements on the
 client to functions to execute when those elements are processed by the
 server.  For example:

 SHtml.text(, s = println(The text box was +s))

 The function (s = println(The text box was +s)) is stored on the server.
  The input type=text .../ tag has a GUID that binds the HTML element to
 the function.  If the HTML element is not on the client any more, the
 reference to the function should be dropped so it's not using resources.
  This is garbage collection.  It is not JVM garbage collection, but it is
 removal of unused references.


I can see that it needs to remove unused references, but why in an ajax
call, why not as part of the lift request lifecycle? If the client has
closed the browser the ajax call isn't going to be called anyway. Why would
a single HTML element in a single client response have disappeared (heavy
use of ajax and javascript?).

Now why is lift saving references - obviously to support the next request
from the current page, which might involve the back button (and
subsequently, the forward button). So in my mind, I should be able to
specify I want the last N back button calls supported and any functions
older than that get dropped from the reference map. But obviously this isn't
whats happening, because an ajax call to do it, makes no sense (assuming I
have no javascript and no ajax calls).

So what references are being removed and why ajax to remove them?










 --
 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: Rails - Lift

2009-04-09 Thread Charles F. Munat

Can't do them all, but I'd mention Emacs and Vim. Maybe show a slide of 
what they look like.

Chas.

TylerWeir wrote:
 It's not an editor/IDE war unless someone brings up Vim or Emacs,
 so...
 
 I've been using Vim+Scala+Ctags since I started.
 
 I'd recommend not getting hung-up on which editor is the best  just
 start coding.
 
 
 On Apr 9, 3:01 pm, Charles F. Munat c...@munat.com wrote:
 I was thinking that I'd start with Textmate, since I've used that the
 most and it's what most Rails developers use, and then move to NetBeans,
 since that seems to be pretty popular. But I could take a quick look at
 Eclipse, too.



 David Pollak wrote:

 On Thu, Apr 9, 2009 at 2:38 AM, Alexander Kellett lypa...@gmail.com
 mailto:lypa...@gmail.com wrote:
 actually my biggest blocker (and still my blocker) is getting a
 working coding environment.
 there is so much contradictory information on which ide is the best.
 it would be really nice to have a document that talks about the pro's
 and con's of each ide.
 in the rails/osx world its easy: use textmate unless you have a
 predisposition for something else.
 I spent a lot of time coding Scala and Lift with emacs and Textmate.
  They work fine.
 While my current IDE of choice is NetBeans, I'm not convinced that an
 IDE is better than a good text editor.
 not the case for lift / scala in general.
 i know, boring... but i think it really would help to have such a
 document to help people decide.
 On Thu, Apr 9, 2009 at 5:58 AM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:
   I'm writing a proposal for a presentation on moving from Rails to
 Lift.
   A couple of stumbling blocks that I've mentioned are:
   1. Understanding and taking advantage of immutable constructs.
   2. Getting the hang of the view-centric approach to MVC.
   Before I go much further, I'd like to poll this list for things that
   others think should be included. For former or current Rails
 developers
   like myself, What sorts of things gave you the most trouble when
 moving
   to Lift (or trying it out)? What would you like to have had someone
   explain to you to make the transition easier?
   Thanks for any help!
   Chas.
 --
 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
-~--~~~~--~~--~--~---