[Lift] Re: Welcome Dirk Louwers to the Lift committers

2009-10-23 Thread Michel Klijn

Welkom Dirk,
Je moet de HU ook echt te makkelijk vinden? je zit nu in de tweede?

I'll continue in english ;) . As a fellow Dutchman I couldn't resist
googlening you. I found out that we're going to the same School (HU).
I'm a third year student and doing my internship in the US atm. I'll
be back at the HU in the second semester, we should definitely meet
up!

groeten,

Michel

On Oct 23, 8:39 am, Dirk Louwers dirk.louw...@stormlantern.nl wrote:
 Hi all,

 Sorry for the late update. Had a few busy weeks business wise.

 I am a Dutch self taught software writer. I am running my own company
 from home and planning to use lift to make rich web applications.
 Meanwhile I work part time as a coder for a healthcare company to pay
 the bills. I have mainly focussed on web applications so far. I
 started with PHP, then moved to C# (.NET) and am finally looking at
 the java side of web applications through scala since recently. I have
 done some small open source contributions, like Spring.NET Db4o
 (object database) integration.

 Like David said, I am indeed planning to integrate Ext 3 Core into
 Lift, which is a modest contribution. After that I am planning to
 create an Ext Direct stack which will probably be an external module.

 Best,

 Dirk

 On 15 okt, 19:16, Timothy Perrett timo...@getintheloop.eu wrote:



  Welcome to the team dude - care to give some information about
  yourself and background?

  Cheers, Tim

  On Oct 15, 4:46 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:

   Folks,
   Please join me in welcoming Dirk to theLift committers.  Dirk is going to
   integrate Ext.Js (the MIT licensed part of it) into Lift.

   Welcome Dirk and we look forward to your contributions!

   Thanks,

   David

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



[Lift] Re: Wicket vs Tapestry vs Grails vs Lift?

2009-09-17 Thread Michel Klijn

I'm interested, atm i have a lot of free time. This is a great way to
get to know Lift and Scala better.
So the only thing is I'm still a bit of a noob, but i would like to
help and get involved.


Michel

On Sep 16, 7:08 pm, etorreborre etorrebo...@gmail.com wrote:
 Hi,

 Anyone is interested in coding the same app with Lift and have a look
 at the numbers?

 http://ptrthomas.wordpress.com/2009/09/14/perfbench-update-tapestry-5...

 Eric.
--~--~-~--~~~---~--~~
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: Some Comet questions

2009-09-02 Thread Michel Klijn

Everything works fine now, Thank you for the quick fix!

On Sep 1, 12:50 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 The problem was that JBoss was not returning the correct modified date for
 the JAR/WAR-based resource.  I've worked around the 
 issue:http://github.com/dpp/liftweb/commit/ea1fda384deb095c6d2eb247f71cb51b...

 http://github.com/dpp/liftweb/commit/ea1fda384deb095c6d2eb247f71cb51b...The
 changes are checked in and once Hudson does its thing, you'll be fine.





 On Tue, Sep 1, 2009 at 8:47 AM, Michel Klijn michel.kl...@gmail.com wrote:

  On Aug 31, 10:45 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Mon, Aug 31, 2009 at 3:06 PM, Michel Klijn michel.kl...@gmail.com
  wrote:

On Aug 31, 5:39 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Mon, Aug 31, 2009 at 2:32 PM, Michel Klijn 
  michel.kl...@gmail.com
wrote:
...
  Since i had
  JBOSS 4.2.3AG already on my system i tried this, but without
  succes...

 What's the failure?  Does the Lift examples/example app run okay on
JBoss?
 What happens in Firebug?

The table won't update because JQuery is not loaded
My javascript console tells me:
   jQuery is not defined
   http://localhost:8080/MyGame-1.0-SNAPSHOT/ajax_request/
liftAjax.js
   Line 157
and FireBugs net log:
    a 304 Not Modified for get jquery.js
all works fine in Jetty

   This is very, very strange.  A 304 means that the file hasn't changed and
   the browser should use the cached version.  I'm downloading JBoss and
  will
   run some stuff tomorrow.  In the mean time, try clearing the browser
  cache
   and see what happens.

  Ok. I tried to clear the cache, but didn't work. I found out some
  other thing though.
  I'm using this firefox add-in called web developer. It allows you to
  turn off cashing here are the results:
  without cache:
   GET JQuery.js - 304
   GET LiftAjax.js - 200
   GET cometAjAX.js -  200

  with chache:
   GET JQuery.js - 304
   GET LiftAjax.js - 304
   GET cometAjAX.js -  304

  I also tried debugging Javascript in safari 4 and i get the same Java
  script exception: ReferenceError: Can't find variable:
  jQuery .Though I can't find the status codes for the requests in
  safari's debugger. I can look at the contents of the responses of the
  GETs. When I look at the resources right after loading the page,
  Safari is unable to load all three of the JS files. Then I pick one of
  the js files and specially reload it (right mouse then reload) after
  the reload JQuery.js is the only GET with an empty response (first
  time all three had empty responses).

...
  3. The three case classes: NewGame(g: Game),RemoveGame(g:
  Game),UpdateGame(g: Game) all extend GameMsg. In the partial
  function
  highPriority i have tried to match: NewGame(g), RemoveGame(g) and
  UpdateGame(g) that doesn't seem to work, but why?

 Because you're not matching UpdateGame(g), you're matching (g: Game,
 NewGame()) = ...

Yes, because that seemed to work ;). What I meant is: that i was
trying it this way before:
case NewGame(g) = partialUpdate etc..
case RemoveGame(g) = partialUpdate etc..
case UpdateGame(g) = partialUpdate etc..

In the Game Object the createUpdate method returns one of these three
GameMsg types

   What is the declaration of your case classes?  How are you sending the
   message to the Actor?

  Message is send trough the ListenerManger.

  class GameMsg
  case class NewGame(g:Game) extends GameMsg
  case class NewGame(g:Game) extends GameMsg
  case class NewGame(g:Game) extends GameMsg

  object Game extends Actor with ListenerManager{
     private var games: List[Game] = Nil
     def getGames(): List[Game] = games
     private var newMsgs: GameMsg

     protected def createUpdate: GameMsg = newMsgs

     ...

    case class Create(s:String,ss:String,i:Int)
    case class Delete(g:Game)
    case class Update(g:Game)

     override def highPriority = {
         case Create(a,b,c) = createGame(a,b,c)
                                                  updateListeners()
         case Delete(g) = removeGame(g)
                                                  updateListeners()
         case Update(g) = updateGame(g)
                                                  updateListeners()
        }

  }

  Cheers,

  Michel

  class GameList extends CometActor with CometListenee{
         override def defaultPrefix = Full(entry)
         override def parentTag = tbody/tbody
         override def devMode = false
         override def hasOuter = false

     protected def registerWith = Game
         override def render = new RenderOut( (Game.getGames.flatMap
  (bindGameRow(_))).toSeq )

         override def highPriority: PartialFunction[Any,Unit] = {
                 case (g:Game, NewGame()) =
  partialUpdate(PrependHtml
  (this.uniqueId,bindGameRow(g

[Lift] Re: Some Comet questions

2009-09-01 Thread Michel Klijn



On Aug 31, 10:45 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Mon, Aug 31, 2009 at 3:06 PM, Michel Klijn michel.kl...@gmail.comwrote:







  On Aug 31, 5:39 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Mon, Aug 31, 2009 at 2:32 PM, Michel Klijn michel.kl...@gmail.com
  wrote:
  ...
Since i had
JBOSS 4.2.3AG already on my system i tried this, but without succes...

   What's the failure?  Does the Lift examples/example app run okay on
  JBoss?
   What happens in Firebug?

  The table won't update because JQuery is not loaded
  My javascript console tells me:
     jQuery is not defined
     http://localhost:8080/MyGame-1.0-SNAPSHOT/ajax_request/
  liftAjax.js
     Line 157
  and FireBugs net log:
      a 304 Not Modified for get jquery.js
  all works fine in Jetty

 This is very, very strange.  A 304 means that the file hasn't changed and
 the browser should use the cached version.  I'm downloading JBoss and will
 run some stuff tomorrow.  In the mean time, try clearing the browser cache
 and see what happens.


Ok. I tried to clear the cache, but didn't work. I found out some
other thing though.
I'm using this firefox add-in called web developer. It allows you to
turn off cashing here are the results:
without cache:
  GET JQuery.js - 304
  GET LiftAjax.js - 200
  GET cometAjAX.js -  200

with chache:
  GET JQuery.js - 304
  GET LiftAjax.js - 304
  GET cometAjAX.js -  304

I also tried debugging Javascript in safari 4 and i get the same Java
script exception: ReferenceError: Can't find variable:
jQuery .Though I can't find the status codes for the requests in
safari's debugger. I can look at the contents of the responses of the
GETs. When I look at the resources right after loading the page,
Safari is unable to load all three of the JS files. Then I pick one of
the js files and specially reload it (right mouse then reload) after
the reload JQuery.js is the only GET with an empty response (first
time all three had empty responses).


  ...
3. The three case classes: NewGame(g: Game),RemoveGame(g:
Game),UpdateGame(g: Game) all extend GameMsg. In the partial function
highPriority i have tried to match: NewGame(g), RemoveGame(g) and
UpdateGame(g) that doesn't seem to work, but why?

   Because you're not matching UpdateGame(g), you're matching (g: Game,
   NewGame()) = ...

  Yes, because that seemed to work ;). What I meant is: that i was
  trying it this way before:
  case NewGame(g) = partialUpdate etc..
  case RemoveGame(g) = partialUpdate etc..
  case UpdateGame(g) = partialUpdate etc..

  In the Game Object the createUpdate method returns one of these three
  GameMsg types

 What is the declaration of your case classes?  How are you sending the
 message to the Actor?

Message is send trough the ListenerManger.

class GameMsg
case class NewGame(g:Game) extends GameMsg
case class NewGame(g:Game) extends GameMsg
case class NewGame(g:Game) extends GameMsg

object Game extends Actor with ListenerManager{
private var games: List[Game] = Nil
def getGames(): List[Game] = games
private var newMsgs: GameMsg

protected def createUpdate: GameMsg = newMsgs

...

   case class Create(s:String,ss:String,i:Int)
   case class Delete(g:Game)
   case class Update(g:Game)

override def highPriority = {
case Create(a,b,c) = createGame(a,b,c)
 updateListeners()
case Delete(g) = removeGame(g)
 updateListeners()
case Update(g) = updateGame(g)
 updateListeners()
  }

}


Cheers,

Michel

class GameList extends CometActor with CometListenee{
       override def defaultPrefix = Full(entry)
       override def parentTag = tbody/tbody
       override def devMode = false
       override def hasOuter = false

   protected def registerWith = Game
       override def render = new RenderOut( (Game.getGames.flatMap
(bindGameRow(_))).toSeq )

       override def highPriority: PartialFunction[Any,Unit] = {
               case (g:Game, NewGame()) = partialUpdate(PrependHtml
(this.uniqueId,bindGameRow(g)))
               case (g:Game, RemoveGame()) = partialUpdate(RemoveById
(+g.gid))
               case (g:Game, UpdateGame())  =
partialUpdate(ReplaceWithById
(+g.gid, bindGameRow(g)))
               }

       private def bindGameRow(g:Game) =
             tr id={+g.gid}
                  {bind(id - g.gid,
                          name - SHtml.link(/game, () =
CurrentGame(Full(g)),
Text(g.gname)),
                           players - g.playerStatus,
                           owner - g.creator,
                           timestamp -
  b{g.createdOn.toString}/b,
                           joinlink - SHtml.ajaxButton(Delete
  game!,

{() = Game ! Game.DeleteGame(g);Noop

[Lift] Some Comet questions

2009-08-31 Thread Michel Klijn

Hello,

I have created a simple test application to play around with comet.
it's a live CRUD table the comet updates its clients with every
change to the records( There is no database, just a List[Game] in the
Game object). I have three questions about this:

1.I know that Comets won't work with GAE-J, but which application
servers can i use? Or is there one that's recommended? Since i had
JBOSS 4.2.3AG already on my system i tried this, but without succes...
2.Is the way i'am using JQuery right way? or maybe, is there a better
way to this?
3. The three case classes: NewGame(g: Game),RemoveGame(g:
Game),UpdateGame(g: Game) all extend GameMsg. In the partial function
highPriority i have tried to match: NewGame(g), RemoveGame(g) and
UpdateGame(g) that doesn't seem to work, but why?

Cheers,

Michel

class GameList extends CometActor with CometListenee{
override def defaultPrefix = Full(entry)
override def parentTag = tbody/tbody
override def devMode = false
override def hasOuter = false

protected def registerWith = Game
override def render = new RenderOut( (Game.getGames.flatMap
(bindGameRow(_))).toSeq )

override def highPriority: PartialFunction[Any,Unit] = {
case (g:Game, NewGame()) = partialUpdate(PrependHtml
(this.uniqueId,bindGameRow(g)))
case (g:Game, RemoveGame()) = partialUpdate(RemoveById
(+g.gid))
case (g:Game, UpdateGame())  = partialUpdate(ReplaceWithById
(+g.gid, bindGameRow(g)))
}

private def bindGameRow(g:Game) =
  tr id={+g.gid}
   {bind(id - g.gid,
   name - SHtml.link(/game, () = 
CurrentGame(Full(g)),
Text(g.gname)),
players - g.playerStatus,
owner - g.creator,
timestamp - b{g.createdOn.toString}/b,
joinlink - SHtml.ajaxButton(Delete game!,
 
{() = Game ! Game.DeleteGame(g);Noop}))
   }
 /tr

}

//some javascript stuff
object RemoveById {
  def apply(uid: String) = new RemoveById(uid)
}

class RemoveById(val uid: String) extends JsCmd {
  def toJsCmd = try{jQuery(+ (#+uid).encJs + ).remove();} catch
(e) {}
}

object ReplaceWithById {
  def apply(uid: String, nsq: NodeSeq) = new ReplaceWithById(uid,
nsq.toString)
}

class ReplaceWithById(val uid: String, val content:String) extends
JsCmd {
  def toJsCmd = try{jQuery(+(#+uid).encJs+).replaceWith($('+
content.encJs +'));} catch (e) {}
}

--~--~-~--~~~---~--~~
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: Some Comet questions

2009-08-31 Thread Michel Klijn

On Aug 31, 5:39 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Mon, Aug 31, 2009 at 2:32 PM, Michel Klijn michel.kl...@gmail.comwrote:
...
  Since i had
  JBOSS 4.2.3AG already on my system i tried this, but without succes...

 What's the failure?  Does the Lift examples/example app run okay on JBoss?
 What happens in Firebug?

The table won't update because JQuery is not loaded
My javascript console tells me:
jQuery is not defined
http://localhost:8080/MyGame-1.0-SNAPSHOT/ajax_request/
liftAjax.js
Line 157
and FireBugs net log:
 a 304 Not Modified for get jquery.js
all works fine in Jetty

...
  3. The three case classes: NewGame(g: Game),RemoveGame(g:
  Game),UpdateGame(g: Game) all extend GameMsg. In the partial function
  highPriority i have tried to match: NewGame(g), RemoveGame(g) and
  UpdateGame(g) that doesn't seem to work, but why?

 Because you're not matching UpdateGame(g), you're matching (g: Game,
 NewGame()) = ...


Yes, because that seemed to work ;). What I meant is: that i was
trying it this way before:
case NewGame(g) = partialUpdate etc..
case RemoveGame(g) = partialUpdate etc..
case UpdateGame(g) = partialUpdate etc..

In the Game Object the createUpdate method returns one of these three
GameMsg types


  Cheers,

  Michel

  class GameList extends CometActor with CometListenee{
         override def defaultPrefix = Full(entry)
         override def parentTag = tbody/tbody
         override def devMode = false
         override def hasOuter = false

     protected def registerWith = Game
         override def render = new RenderOut( (Game.getGames.flatMap
  (bindGameRow(_))).toSeq )

         override def highPriority: PartialFunction[Any,Unit] = {
                 case (g:Game, NewGame()) = partialUpdate(PrependHtml
  (this.uniqueId,bindGameRow(g)))
                 case (g:Game, RemoveGame()) = partialUpdate(RemoveById
  (+g.gid))
                 case (g:Game, UpdateGame())  =
  partialUpdate(ReplaceWithById
  (+g.gid, bindGameRow(g)))
                 }

         private def bindGameRow(g:Game) =
               tr id={+g.gid}
                    {bind(id - g.gid,
                            name - SHtml.link(/game, () =
  CurrentGame(Full(g)),
  Text(g.gname)),
                             players - g.playerStatus,
                             owner - g.creator,
                             timestamp - b{g.createdOn.toString}/b,
                             joinlink - SHtml.ajaxButton(Delete game!,

  {() = Game ! Game.DeleteGame(g);Noop}))
                    }
              /tr

  }

  //some javascript stuff
  object RemoveById {
   def apply(uid: String) = new RemoveById(uid)
  }

  class RemoveById(val uid: String) extends JsCmd {
   def toJsCmd = try{jQuery(+ (#+uid).encJs + ).remove();} catch
  (e) {}
  }

  object ReplaceWithById {
   def apply(uid: String, nsq: NodeSeq) = new ReplaceWithById(uid,
  nsq.toString)
  }

  class ReplaceWithById(val uid: String, val content:String) extends
  JsCmd {
   def toJsCmd = try{jQuery(+(#+uid).encJs+).replaceWith($('+
  content.encJs +'));} catch (e) {}
  }

 --
 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: JetBrains IntelliJ IDEA integration

2009-08-26 Thread Michel Klijn

Hi Dorinel,

I had the same problem with Intellj 8.1.3 on mac osx.
In my case even though i had the Maven plugin installed, it wasn't
configured yet for some reason it never ask me to configure it.
As it turns out, the Maven settings are project specific. Configure
them like this:
File - Template Settings - search for maven - click maven - fill
out maven home dir, maven user settings, and maven repository.

To do the same for only one project go to settings instead of Template
Settings.



On Aug 26, 7:18 am, Dorinel dorinel.munte...@gmail.com wrote:
 Hi, Ilya,
 Thank you for quick answer.
 Yesterday I've upgraded to 8.1.3 yesterday and had the same problem.
 I'm running under ubuntu 8.10 and had to manually add mvn path to be
 able to compile things with maven from idea, but the libraries are
 still not in the project classpath, so the syntax highlighting for
 scala is not working (it highlights missing lift libraries)
 Will switching to EAP 9 version of idea help me?

 On Aug 26, 11:42 am, Ilya Sergey ilyas...@gmail.com wrote:



  Hello.

  Normally, there must be no problems, if you point to the existing pom.xml
  file as a project file (File - New Project etc.). All libraries should be
  fetched form the repository automatically. What build of IDEA do you use?

  Cheers,
  Ilya

  2009/8/26 Dorinel dorinel.munte...@gmail.com

   I've managed to create simple scala projects in Intellij IDEA, but
   when I try to import an existing lift pom.xml file I fail.
   It seems that all the libraries from pom.xml are not added to the
   project and all the lift classes used in project are marked as syntax
   errors.
   Have anybody managed to add pom.xml to IDEA?
   Also is there a way to download necessary liftweb jars manually to add
   them manually to the project as libraries?

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



[Lift] Invoking Views

2009-08-17 Thread Michel Klijn

Hi,

I'm new to Lift and I've been fooling around with all it's cool
features.

At the moment, I'm trying to access MyView that I have defined in the
view package. When I try to access the view via the URL:
http://localhost:8080/MyView/hi  I get the following message:
The requested page was not defined in your SiteMap, so access was
blocked.

According to the view chapter (3.7)  in the book(Exploring Lift August
12, 2009) I downloaded from Github, it should work this way.

I'm a bit lost... what is it that I'm doing wrong?

thanks,

Michel

P.S snippets,and comets do work

package net.mkl.zooloretto.view
import ...
class MyView extends LiftView{

override def dispatch = {
 case hi = doRender _
}

def doRender () : NodeSeq = {
lift:surround with=default at=content
bhai!/b
/lift:surround

}
}

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