Re: [Lift] Re: Ajax and custom HTTP headers

2009-11-20 Thread Xavi Ramirez
+1

On Fri, Nov 13, 2009 at 6:33 PM, David Pollak
feeder.of.the.be...@gmail.com wrote:


 On Fri, Nov 13, 2009 at 1:37 PM, Marius marius.dan...@gmail.com wrote:

 Hi,

 Do you think it would worth having a better support for setting HTTP
 headers for Ajax requests ? I mean some REST API's may use some meta
 information in the HTTP headers and it migh be handy to set this up
 from lift code when using Ajax calls.

 Thoughts?

 Sounds great!


 Br's,
 Marius




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

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



--

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




[Lift] Canceling a ActorPing.scheduleAtFixedRate task

2009-09-23 Thread Xavi Ramirez

Hello,

Is there any way to cancel a task created with a ActorPing.scheduleAtFixedRate?

From looking at the source
(http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/util/ActorPing.scala.html)
it seem that scheduleAtFixedRate creates an actor which accepts an
UnSchedule message.  Unfortunately this actor is not returned to the
caller.

Thanks in advance,
Xavi

--~--~-~--~~~---~--~~
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: Canceling a ActorPing.scheduleAtFixedRate task

2009-09-23 Thread Xavi Ramirez

There isn't much to show... but maybe an example clarify things.

class SomeCometActor extends CometActor {
  override def localSetup() {
ActorPing.scheduleAtFixedRate(this, TaskMessage, 15 seconds, 15 seconds)
  }

  override def lowPriority = {
case TaskMessage =
  DoSomething()
  if(someCondition) { /* stop the scheduled task... What do I put here?*/ }
  }
}

If scheduleAtFixedRate returned either the Future or the Actor it
creates, then stopping the scheduled task would be fairly straight
forward.  Then again, I might be missing something.

Thanks,
Xavi


On Wed, Sep 23, 2009 at 3:54 PM, Timothy Perrett
timo...@getintheloop.eu wrote:

 Xavi,

 Can you show some code? There might be a way of doing it depending
 what you have...

 Cheers, Tim

 Sent from my iPhone

 On 23 Sep 2009, at 20:50, Xavi Ramirez xavi@gmail.com wrote:


 Hello,

 Is there any way to cancel a task created with a
 ActorPing.scheduleAtFixedRate?

 From looking at the source
 (http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/util/ActorPing.scala.html
 )
 it seem that scheduleAtFixedRate creates an actor which accepts an
 UnSchedule message.  Unfortunately this actor is not returned to the
 caller.

 Thanks in advance,
 Xavi

 


 


--~--~-~--~~~---~--~~
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: Canceling a ActorPing.scheduleAtFixedRate task

2009-09-23 Thread Xavi Ramirez

I think I figured out a way to get around this:

class SomeCometActor extends CometActor {
  private var tempActor: Actor = null

  override def localSetup() {
val cometActor = this
var tempActor = actor{ loop { react {
   case TaskMessage = cometActor ! TaskMessage
   case UnSchedule = exit
} } }
ActorPing.scheduleAtFixedRate(tempActor, TaskMessage, 15 seconds,
15 seconds)
  }

  override def lowPriority = {
case TaskMessage =
  DoSomething()
  if(someCondition) { tempActor ! UnSchedule }
  }
}

Instead of registering the comet actors for the scheduled task, I
register a temporary actor.  During its execution, scheduleAtFixedRate
creates an actor. Let's call this the Scheduled Task Actor.  The
scheduled task actor is then linked(see
http://www.scala-lang.org/docu/files/api/scala/actors/Actor.html#link%28scala.actors.AbstractActor%29)
to the temporary actor i passed in.  So now, when I need to stop the
scheduled task actor, I can shutdown the temporary actor.  This works
because when an actor is shutdown, all actors it's linked to are shut
down as well.

This is kinda nuts, but I guess it works.

I'm just sharing in case someone else runs into this problem.

Thanks,
Xavi

On Wed, Sep 23, 2009 at 4:13 PM, Xavi Ramirez xavi@gmail.com wrote:
 There isn't much to show... but maybe an example clarify things.

 class SomeCometActor extends CometActor {
  override def localSetup() {
    ActorPing.scheduleAtFixedRate(this, TaskMessage, 15 seconds, 15 seconds)
  }

  override def lowPriority = {
    case TaskMessage =
      DoSomething()
      if(someCondition) { /* stop the scheduled task... What do I put here?*/ }
  }
 }

 If scheduleAtFixedRate returned either the Future or the Actor it
 creates, then stopping the scheduled task would be fairly straight
 forward.  Then again, I might be missing something.

 Thanks,
 Xavi


 On Wed, Sep 23, 2009 at 3:54 PM, Timothy Perrett
 timo...@getintheloop.eu wrote:

 Xavi,

 Can you show some code? There might be a way of doing it depending
 what you have...

 Cheers, Tim

 Sent from my iPhone

 On 23 Sep 2009, at 20:50, Xavi Ramirez xavi@gmail.com wrote:


 Hello,

 Is there any way to cancel a task created with a
 ActorPing.scheduleAtFixedRate?

 From looking at the source
 (http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/util/ActorPing.scala.html
 )
 it seem that scheduleAtFixedRate creates an actor which accepts an
 UnSchedule message.  Unfortunately this actor is not returned to the
 caller.

 Thanks in advance,
 Xavi

 


 



--~--~-~--~~~---~--~~
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: Turning off garbage collection

2009-09-21 Thread Xavi Ramirez

No use case.  Just curious...

On Mon, Sep 21, 2009 at 10:04 AM, David Pollak
feeder.of.the.be...@gmail.com wrote:


 On Mon, Sep 21, 2009 at 6:34 AM, Xavi Ramirez xavi@gmail.com wrote:

 Doesn't that disable garbage collection for the whole site?

 Is it possible to turn off on specific pages?

 It's currently not possible to turn of Lift's GUID - Function GC on a page
 by page basis.
 What's the use case for this?  Why is a once every 75 second ajax request to
 the server causing issues?


 Thanks,
 Xavi

 On Mon, Sep 21, 2009 at 4:41 AM, Timothy Perrett
 timo...@getintheloop.eu wrote:
 
  Chas,
 
  This has been asked a million times on list - did you not try
  searching one of the many archives?
 
  LiftRules.enableLiftGC = false;
 
  Tim
 
 
  On 21 Sep 2009, at 08:37, Charles F. Munat wrote:
 
 
  Is it possible to turn off garbage collection on an individual page if
  there's nothing to be garbage collected on that page? If so, how does
  one do it?
 
  Is it possible to turn off garbage collection completely? If so, how?
 
  I can't seem to find this anywhere.
 
  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: Comet Actors - single browser, multiple tabs, same URL - out of control GET problem

2009-09-16 Thread Xavi Ramirez

I vaguely remember reading a thread that claimed Lift would
auto-increase the 2 connection limit for sessions using more modern
browsers.  Is this feature in M5?

Random Idea:
Would it be possible to get around the 2 connection limit by sending
each comet request to a unique sub-domain?

For example, current lift webapps send comet requests to:
http://www.[your-domain].com/comet_request/96624280773/vhbz24xby3vm

Could lift instead send comet requests to
comet[uniqueId].[your-domain].com/[params]?

Thanks,
Xavi

On Wed, Sep 16, 2009 at 7:49 PM, David Pollak
feeder.of.the.be...@gmail.com wrote:


 On Wed, Sep 16, 2009 at 4:18 PM, Dano olearydani...@gmail.com wrote:

 We have a lift app (innovationgames.com) which has a page (actually
 several) with comet actors.  When we go to the same URL in two tabs in
 the same browser, we see that the long polls (GET requests) return
 immediately in rapid fire succession and this behavior continues until
 we exit one of the tabs.

 We thought maybe we did something wrong in our code, so we tried the
 same thing using demo.liftweb.net.  We saw the same behavior in the
 demo site that we see in our site.

 If you try this with something else like Gmail, it does not show this
 behavior.

 It's not a bug.
 There is a 2 connection per server per browser limit (in most browsers
 although Chrome and FF 3.5 apparently have relaxed this limit).  If there is
 a long polling operation in progress and a second request comes into the
 same session, Lift will immediately end the long polling operation in order
 not to starve the connections.

 I thought I would post to this group and get some feedback before
 submitting a bug.



 Thanks in advance.


 Dano




 --
 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: Lift deal breakers

2009-09-13 Thread Xavi Ramirez

If I understand everything correctly, the proposal is to dynamically
create a js file for each page request to add event handlers?

If this is true, then I'm against the proposal for the following two reasons:

1. Every page will load slower

Since the js file is dynamically create on each request, the js file
will be un-cacheable.  This means the browser be will forced to make
an addition HTTP request to the server to render each page.  This adds
roughly 150ms to the page load time (50ms to 200ms for network lag,
50ms for download, 10ms for js execution).

2. Each page will be more fragile

Requiring the synthetic js file will add another point of failure.
Even now-a-days with the ubiquity of broadband, connects still get
lost and files still get corrupted.

It's true that most modern web pages already depend a number of
external JS and CSS files, but typically these files are static and
easily cached.

Just adding my 2 cents.

-Xavi

On Sun, Sep 13, 2009 at 5:41 PM, marius d. marius.dan...@gmail.com wrote:

 I think so too. Does anyone have an opinion against this? I'll
 probably have some time this week or next weekend to work on it.

 Br's,
 Marius

 On Sep 13, 2:59 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 A synthetic file sounds good to me and would probably be preferable.

 Cheers, Tim

 On 13 Sep 2009, at 20:31, marius d. wrote:

  That looks a little cleaner but we'll have to look more into it if
  we'd want to go on this path. Perhaps accumulate those function into
  synthetic js file .. we'll see
 


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

2009-09-13 Thread Xavi Ramirez

Hi Marius,

Ahh yes I see.  That's very different from what I originally
understood.  Your implementation makes sense.

Thanks,
Xavi

On Sun, Sep 13, 2009 at 8:43 PM, marius d. marius.dan...@gmail.com wrote:

 I kinda used the term js file a bit too loosely. It is true that each
 page would likely have different functions there and even the same
 page on subsequent load would have different content so the file can
 not really be cached.

 I'm thinking that instead of:

 button onclick=liftAjax.lift_ajaxHandler
 ('F1029758482780OTA=true',null, null, null); return false;Press me/
 button

 We could have:

 button onclick=liftAjax('F1029758482780OTA')Press me/button

 ...

 .. and at the end of the page:

 script type=text/javascript

 function liftAjax(id) {
   liftAjax.lift_ajaxHandler(id + '=true',null, null, null); return
 false;
 }
 ...

 /script

 Likely there will be more synthetic functions that would need to be
 generated depending on specific cases. This approach would result in a
 slightly larger markup but I'm not sure if the impact is negligible or
 not. In essence we are replacing a function call with another one more
 concise which helps just in having a more concise function calls in
 the markup.

 BUT most likely for functions like liftAjax above we should put them
 in liftAjax.js that lift generates and those would just be helper
 function. This means that the script block above will not be needed
 anymore. Thoughts?

 Thanks Xavi for the good points.

 Br's,
 Marius

 On Sep 13, 7:03 pm, Xavi Ramirez xavi@gmail.com wrote:
 If I understand everything correctly, the proposal is to dynamically
 create a js file for each page request to add event handlers?

 If this is true, then I'm against the proposal for the following two reasons:

 1. Every page will load slower

 Since the js file is dynamically create on each request, the js file
 will be un-cacheable.  This means the browser be will forced to make
 an addition HTTP request to the server to render each page.  This adds
 roughly 150ms to the page load time (50ms to 200ms for network lag,
 50ms for download, 10ms for js execution).

 2. Each page will be more fragile

 Requiring the synthetic js file will add another point of failure.
 Even now-a-days with the ubiquity of broadband, connects still get
 lost and files still get corrupted.

 It's true that most modern web pages already depend a number of
 external JS and CSS files, but typically these files are static and
 easily cached.

 Just adding my 2 cents.

 -Xavi

 On Sun, Sep 13, 2009 at 5:41 PM, marius d. marius.dan...@gmail.com wrote:

  I think so too. Does anyone have an opinion against this? I'll
  probably have some time this week or next weekend to work on it.

  Br's,
  Marius

  On Sep 13, 2:59 pm, Timothy Perrett timo...@getintheloop.eu wrote:
  A synthetic file sounds good to me and would probably be preferable.

  Cheers, Tim

  On 13 Sep 2009, at 20:31, marius d. wrote:

   That looks a little cleaner but we'll have to look more into it if
   we'd want to go on this path. Perhaps accumulate those function into
   synthetic js file .. we'll see
 


--~--~-~--~~~---~--~~
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 / where to set the runmode of a lift application?

2009-09-12 Thread Xavi Ramirez

One way is it to use the run.mode parameter and start your webapp
using this command:

mvn jetty:run -Drun.mode=production

I believe you can also modify web.xml in some way, but I'm not really sure.

-Xavi

On Sat, Sep 12, 2009 at 5:00 PM, george geo...@mattandgeorge.com wrote:

 can anyone tell me how I can change the runmode of my application to
 production?

 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: Milestone 5 now available!

2009-09-10 Thread Xavi Ramirez

Thanks for the quick reply.

It seems I have three lift dependencies: lift-util, lift-webkit, lift-mapper

Do I upgrade all them to 1.1-M5?

Thanks,
Xavi

On Wed, Sep 9, 2009 at 11:41 AM, Timothy Perrett
timo...@getintheloop.eu wrote:

 Change:

 version1.1-M4/version

 to

 version1.1-M5/version

 Cheers, Tim

 On 9 Sep 2009, at 16:22, Xavi Ramirez wrote:


 Please excuse my ignorance, but how do you upgrade to the latest
 milestone?

 I assume it involves updating my POM.xml file, but that's all I know.

 Thanks,
 Xavi

 On Wed, Sep 9, 2009 at 11:15 AM, Timothy Perretttimo...@getintheloop.eu
  wrote:

 Yes it does, it provides a fixed point in time so that users who are
 developing against HEAD can have stability if they are going into
 production for instance, or just want a fixed reference point (as we
 are far away from 1.0 now)

 Cheers, Tim

 On 9 Sep 2009, at 16:02, glenn wrote:


 Does this milestone incorporate what's in 1.1-Snapshot?

 Glenn

 On Sep 8, 9:57 pm, Charles F. Munat c...@munat.com wrote:
 The Lift team proudly announces Milestone 5! Some text here that I
 forgot to copy and paste.

 Go get it!

 Chas. Munat







 



 


--~--~-~--~~~---~--~~
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: Milestone 5 now available!

2009-09-09 Thread Xavi Ramirez

Please excuse my ignorance, but how do you upgrade to the latest milestone?

I assume it involves updating my POM.xml file, but that's all I know.

Thanks,
Xavi

On Wed, Sep 9, 2009 at 11:15 AM, Timothy Perretttimo...@getintheloop.eu wrote:

 Yes it does, it provides a fixed point in time so that users who are
 developing against HEAD can have stability if they are going into
 production for instance, or just want a fixed reference point (as we
 are far away from 1.0 now)

 Cheers, Tim

 On 9 Sep 2009, at 16:02, glenn wrote:


 Does this milestone incorporate what's in 1.1-Snapshot?

 Glenn

 On Sep 8, 9:57 pm, Charles F. Munat c...@munat.com wrote:
 The Lift team proudly announces Milestone 5! Some text here that I
 forgot to copy and paste.

 Go get it!

 Chas. Munat
 



 


--~--~-~--~~~---~--~~
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: Legacy database and column name with spaces

2009-09-09 Thread Xavi Ramirez

I believe it's something like this:

select * from [table with spaces]
where [column spaces] = 18


On Wed, Sep 9, 2009 at 12:46 PM, David
Pollakfeeder.of.the.be...@gmail.com wrote:


 On Wed, Sep 9, 2009 at 9:21 AM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:

 I don't think that Mapper will handle that correctly unless the JDBC
 drivers do some strange magic on the prepared statements.

 Yeah... that's an issue.  What's the SQL syntax for accessing tables/columns
 that have spaces in their names?  I can update Mapper to do the right thing.


 On Wed, Sep 9, 2009 at 5:34 AM, Marcin Jurczuk mjurc...@gmail.com wrote:

 One solution I found is to create object with name without spaces and
 override dbColumnName.
 I don't know however (right now I don't have access to DB) does db
 driver will handle such column names..


 On Sep 9, 10:23 am, Marcin Jurczuk mjurc...@gmail.com wrote:
  Hello everybody,
 
  I have strange problem. We have legacy database (MS SQL) where some of
  colums contains spaces in their names like Company email. There is a
  plan to create some web interface to this DB with lift framework. I
  tryed initial setup but is there a way to  create DataMapper schema
  with columns with spaces ?
 
  object Company email extends ...doesn't work :(
 
  Can You suggest some solution ?
  I can't change column name - there are another apps using this
  database.
 
  Regards,







 --
 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: rewrite problem

2009-09-08 Thread Xavi Ramirez

That's because the url post/show is being intercepted by the same
rewrite rule that matches post/id urls.  To get around this, try
adding an if statement to your rewrite rule:

LiftRules.rewrite.append {
  case RewriteRequest(ParsePath(List(post, id), _, _, _), _, _)
 if (id != show) =
RewriteResponse(List(post,show), Map(id-urlDecode(id)))

Hope this helps!

~Xavi

On Tue, Sep 8, 2009 at 12:12 AM, night_stalkerusur...@gmail.com wrote:

 I want to make RESTful urls (not REST API), for example:

  /post/123 is mapped to post/show.html with param id=123

 but the following rewrite rule seems recursive

    LiftRules.rewrite.append {
      case RewriteRequest(ParsePath(List(post, id), _, _, _), _, _)
 =
        RewriteResponse(List(post,show), Map(id-urlDecode(id)))
    }

 and loops forever ...

 


--~--~-~--~~~---~--~~
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] Retrieving the URL anchor

2009-09-08 Thread Xavi Ramirez

Hello,

I'm having trouble finding the URL anchor (e.g.
www.foo.com/test.html#this-is-the-url-anchor) while performing a URL
rewrite.  i looked through the HTTPRequest object, but I can't seem to
find it any where.

Any idea where it might be?

Thanks,
Xavi

--~--~-~--~~~---~--~~
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: Feature Request: Add S.findComet(theType: String, name: String): Option[CometActor]

2009-09-06 Thread Xavi Ramirez

I didn't realize that a list of one item could be turned into a Box directly.

Thanks for the tip.

-Xavi

On Sun, Sep 6, 2009 at 10:37 AM, marius d.marius.dan...@gmail.com wrote:

 Is this too inconvenient ?

 val myComet = Box(findComet(myType).filter(_.name == myname))

 I have nothing against your proposal except it should return a Box not
 an Option.

 Br's,
 Marius

 On Sep 6, 6:17 am, Xavi Ramirez xavi@gmail.com wrote:
 Hello,

 Would it be possible to add the following findComet override to LiftSession?

 def findComet(theType: String, name: String): Option[CometActor] =
   synchronized { asyncComponents get (theType, name) } // I'm not sure
 if this is the correct implementation, but you get the idea

 I'd like to be able to get hold of a specific CometActor without
 storing it in a session variable.

 Thanks,
 Xavi
 


--~--~-~--~~~---~--~~
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] wiki.liftweb.net to github wiki migration

2009-09-05 Thread Xavi Ramirez

Hello,

In an effort to help move from wiki.liftweb.net to the github wiki
(http://wiki.github.com/dpp/liftweb), I've combed through the
wiki.liftweb.net site and found a handful of articles that might be
worth migrating to the github wiki:

http://wiki.liftweb.net/index.php/FAQ
http://wiki.liftweb.net/index.php/Cheat_Sheet
http://wiki.liftweb.net/index.php/HowTo_use_Lift_with_YUI
http://wiki.liftweb.net/index.php/Cookies
http://wiki.liftweb.net/index.php/HowTo_style_the_error/warning/notice_messages
http://wiki.liftweb.net/index.php/Boot_Example
http://wiki.liftweb.net/index.php/HowTo_configure_a_JNDI_data_source_for_lift_and_Jetty
http://wiki.liftweb.net/index.php/HowTo_configure_a_JNDI_data_source_for_lift_and_Tomcat
http://wiki.liftweb.net/index.php/HowTo_configure_lift_with_MySQL
http://wiki.liftweb.net/index.php/How_to_configure_lift_with_PostgreSQL
http://wiki.liftweb.net/index.php/HowTo_deploy_lift_artifacts
http://wiki.liftweb.net/index.php/HowTo_Log_DB_queries
http://wiki.liftweb.net/index.php/How_lift_processes_HTTP_requests
http://wiki.liftweb.net/index.php/HowTo_hook_into_the_lift%27s_request_processing_cycle
http://wiki.liftweb.net/index.php/HowTo_setup_composite_keys
http://wiki.liftweb.net/index.php/HowTo_to_dynamically_*fix*_CSS_resources
http://wiki.liftweb.net/index.php/HowTo_use_JSON_forms
http://wiki.liftweb.net/index.php/HowTo_use_redirect_with_state

I'm not sure how up-to-date they are. Would someone more knowledgeable
look them over and let me know which ones are worth keeping?

Thanks,
Xavi

P.S.  The overall goal is to fully migrate to the github wiki by Oct 1st.

P.P.S.S. I'll be migrating these two articles over the upcoming week.
http://wiki.liftweb.net/index.php/Contribute
http://wiki.liftweb.net/index.php/HowTo_use_error_pages

--~--~-~--~~~---~--~~
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 schedule a job?

2009-09-05 Thread Xavi Ramirez

I'd use ActorPing also.  Here's a quick example of the code I'd write:

import net.liftweb._
import http._
import util._
import Helpers._

import scala.actors._
import scala.actors.Actor._

case class UpdateUsers()

object UserManager extends Actor {
  this.start
  ActorPing.scheduleAtFixedRate(this, UpdateUsers, 10 minutes, 10 minutes)

  def act = loop {
react {
  case UpdateUsers = //Do something with the DB
}
  }
}

Hope this helps,
Xavi

On Fri, Sep 4, 2009 at 12:47 PM, georgegeo...@mattandgeorge.com wrote:

 If I needed to schedule a job say for example to do a database query
 that returned a set of users matching some criteria and send them an
 email. How would I do that in Lift?

 I started looking through the API and noticed that we have
 net.liftweb.util.Scheduled in ActorPing.scala is this what I need?
 Anyone have any examples?

 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] Feature Request: Add S.findComet(theType: String, name: String): Option[CometActor]

2009-09-05 Thread Xavi Ramirez

Hello,

Would it be possible to add the following findComet override to LiftSession?

def findComet(theType: String, name: String): Option[CometActor] =
  synchronized { asyncComponents get (theType, name) } // I'm not sure
if this is the correct implementation, but you get the idea

I'd like to be able to get hold of a specific CometActor without
storing it in a session variable.

Thanks,
Xavi

--~--~-~--~~~---~--~~
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] Syntax Highlighting On Wiki

2009-09-01 Thread Xavi Ramirez

Hello,

I've recently discovered how to add syntax highlighting to the wiki
(http://wiki.github.com/dpp/liftweb).

First, you simply added this to the top of the article:
link 
href='http://scala-tools.org/scaladocs/liftweb/1.0/_highlighter/SyntaxHighlighter.css'
rel='stylesheet' type='text/css'/

Next, you added these two lines to the bottom of the page:
script 
src='http://scala-tools.org/scaladocs/liftweb/1.0/_highlighter/shAll.js'/script
scriptdp.SyntaxHighlighter.HighlightAll('code');/script

Finally, just surround and code snippets with:
pre name=code class=scala:nocontrolsYour scala code.../pre

FYI: Enabling syntax highlighting on github basically boils down to
importing a JS syntax highlighter into the page.  Currently, the wiki
is directly referencing the js highlighter on scala-tools.  Is that
okay?

Thanks,
Xavi

--~--~-~--~~~---~--~~
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] Redirecting wiki.liftweb.net to github starting Oct1

2009-08-30 Thread Xavi Ramirez

Hello,

In an effort to consolidate the lift wiki information, we are planning
to permanently redirecting wiki.liftweb.net to
http://wiki.github.com/dpp/liftweb.

However before the switch is made, we are going grab various bits of
content off wiki.liftweb and move it over to github.

If you have any suggestions for which articles should be migrate,
please let me know.

Thanks,
Xavi

--~--~-~--~~~---~--~~
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: Question about Lift/Scala Lift Discussion Board

2009-08-29 Thread Xavi Ramirez

I applaud Artem's initiative!

The mailing list has undoubtedly been an extremely helpful resource.
That said, a mailing lists in general have several short comings:

- Hard to search through
- Many duplicate questions
- No stickies
- No syntax highlighting and few formatting options
- Little to no message organization
- Few moderation tools

A forum could be a nice way to address these issues, so it might be
worth a try.  Also I think introducing a forum is anymore likely to
splinter than an IRC chat room.

Just my two cents.

-Xavi

On Sat, Aug 29, 2009 at 8:22 PM, Timothy Perretttimo...@getintheloop.eu wrote:


 Agreed (and +1) - Personally I actually prefer mailing lists full stop
 because it involves no web site trawling to get to the topics one is
 after...

 Cheers, Tim

 On 30/08/2009 01:20, TylerWeir tyler.w...@gmail.com wrote:


 I'm not really sure how splintering the community is going to help.
 I feel the google group has been fine.

 On Aug 29, 6:59 pm, Artem art...@gmail.com wrote:
 Hey!

 I stumbled on Lift a couple weeks ago and have been messing around
 with it a lot!  I am a Ruby on Rails programmer and it seems like Ruby
 is doing a fine job serving the web programmers community.  Recently,
 I read an article about Twitter running RoR and it crashing after a
 while.  They decided to switch to Scala because it's scalable unlike
 Ruby.  I am planning on developing a large website that will require
 lots of CPU/Database usage and I was wondering if Scala/Lift is the
 way to do it?

 I'm not a fan of Google Groups, they are not very user friendly, so I
 created a forum specially for Lift developers that like to discuss
 topics about the Scala/Lift programming language.  If you want to help
 start the forum and post a couple topics I would greatly appreciate
 it.  The link ishttp://www.liftforum.com.  It's a new forum so there
 isn't much content on it yet.

 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: Getting started not starting.

2009-08-02 Thread Xavi Ramirez

In your pom.xml file, make sure you have the following two XML nodes
under dependencies and plugins:

Under dependencies:
dependency
  groupIdorg.mortbay.jetty/groupId
  artifactIdjetty/artifactId
  version[6.1.6,)/version
  scopetest/scope
/dependency

Under plugins:
plugin
  groupIdorg.mortbay.jetty/groupId
  artifactIdmaven-jetty-plugin/artifactId
  configuration
  contextPath//contextPath
  scanIntervalSeconds5/scanIntervalSeconds
  /configuration
/plugin

Hope this helps,
Xavi

On Sun, Aug 2, 2009 at 2:29 AM, Jeff McKennaagile.act...@gmail.com wrote:

 Thanks for the suggestion.
 I tried it.
 Now I get a error on mvn jetty:run or mvn jetty:run -U
 The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not
 exist or no valid version could be found

 Checking the mvn -version
 I get the JavaRebel license noise and

 JavaRebel: A newer version '2.0.2b' is available for download
 JavaRebel: from http://www.zeroturnaround.com/download.

 Maven version: 2.0.9
 Java version: 1.6.0_13
 OS name: mac os x version: 10.5.7 arch: x86_64 Family: mac

 I tried both the new interactive mode and the non-interactive style.
 Next steps?
 Jeff


 On Aug 1, 6:50 pm, TylerWeir tyler.w...@gmail.com wrote:
 This is probably the best way to do it:

 mvn archetype:generate -DarchetypeCatalog=http://scala-tools.org/

 Tim has been updating the GitHub wiki, and there is a maven page here:

 http://wiki.github.com/dpp/liftweb/about-maven-mini-guide

 On Aug 1, 6:01 pm, Jeff McKenna agile.act...@gmail.com wrote:

  I have been trying the getting started tutorial.  I have gotten it to
  work in the past but not for a while.

  Currently my error message is
   The desired archetype does not exist (net.lifweb:lift-archetype-blank:
  1.0)

  My maven (2.0.9) command is

  mvn archetype:generate -U \
  -DarchetypeGroupId=net.lifweb \
  -DarchetypeArtifactId=lift-archetype-blank \
  -DarchetypeVersion=1.0 \
  -DremoteRepositories=http://scala-tools.org/repo-releases\
  -DgroupId=demo.helloworld \
  -DartifactId=helloworld \
  -Dversion=1.0-SNAPSHOT

  Any suggestions?

 


--~--~-~--~~~---~--~~
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: Weekly Article Request

2009-07-30 Thread Xavi Ramirez

Awesome! Thanks for the hard work guys.

Sorry, I haven't sent another list out.  I moved last weekend and I
still don't have internet in my house.  I'll try to send another list
in the next couple of days.

-Xavi

On Thu, Jul 30, 2009 at 12:51 AM, David
Pollakfeeder.of.the.be...@gmail.com wrote:
 Mine articles are done.

 On Wed, Jul 22, 2009 at 8:37 AM, David Pollak
 feeder.of.the.be...@gmail.com wrote:


 On Wed, Jul 22, 2009 at 3:22 AM, Xavi Ramirez xavi@gmail.com wrote:

 Hello,

 My name is Xavi and I've volunteered as the wiki garden.  Every week
 I'll post a couple of articles topics that we should work on.  Here
 are my picks for this week.

 Articles we should write:
 How to parse and create JSON
 How to use to create a login system using OpenID
 How to hide and show Admin content
 HowTo get/store session data

 dpp owns the above


 Lift's Rendering Pipeline (here's helpful post
 http://groups.google.com/group/liftweb/msg/1f156eeec71da397)

 Articles we should update:
 http://wiki.liftweb.net/index.php/SetUp_jEdit
 http://wiki.liftweb.net/index.php/HowTo_start_a_new_liftwebapp

 dpp owns the above


 http://wiki.liftweb.net/index.php/How_to_localize

 Please don't feel limited to the pages I mentioned above.  Feel free
 to edit/create any page you like.  If you need an account, just ask
 and I'll create one for you.

 Also if there's an article you'd like to see written or improved,
 please let us know!

 Thanks,
 Xavi





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



 --
 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 DispatchPF - RestfulCometActor?

2009-07-29 Thread Xavi Ramirez

Hello,

I don't quite understand what a more REST orientated approach.  Do you
mean purely client-side comet actor interface?  I personally would
love to write javascript like this:

lift.comet.MyActor.listeners.add(myListener);
lift.comet.MyActor.send(myJSObj);

I've been emulating this type of interface by wrapping this.jsonCall
(where this refers to a comet actor instance) with javascript
function.  Unfortunately, I had to jump through a number of hoops to
get this method to work correctly.

Thanks,
Xavi

On Sun, Jul 26, 2009 at 12:05 PM, Timothy
Perretttimo...@getintheloop.eu wrote:

 Hey folks,

 As you may or may not know, i'm currently working on integrating lift
 with objective-j... One of the things i'm keen to integrate is lifts
 comet support. The current implementation of CometActor is pretty much
 based around javascript and manipulating the DOM. This is great for
 the vast majority of use cases however its not so great when you want
 a a more REST orientated approach.

 Id like to have a comet option that could mean i could push data back
 down the wire, but with dispatchPF, not with lift:comet.

 What are peoples thoughts? I took a look at this but its so deep
 inside the lift internals its a bit deep for me to delve without more
 information on how i could go about implementing this.

 Thoughts?

 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: Weekly Article Request

2009-07-22 Thread Xavi Ramirez

Thanks for the kind words, but it was really David P. who suggested
the weekly article request.

Also, thank you for lending a helping hand.

-Xavi

On Wed, Jul 22, 2009 at 9:51 AM, Timothy Perretttimo...@getintheloop.eu wrote:

 Xavi,

 I'll do the one on localization - think im the only committer doing
 any heavy duty localization work so probably best placed to write an
 example / how-to. I'll try and churn something out onto my blog then
 just convert it wholesale onto the lift wiki.

 Cheers, Tim

 PS: You deserve a medal for your initiative here, it truly is most
 welcome... the commit team need someone externally to kick us into
 writing documentation... you are doing good work, keep it up.

 On Jul 22, 4:22 am, Xavi Ramirez xavi@gmail.com wrote:
 Hello,

 My name is Xavi and I've volunteered as the wiki garden.  Every week
 I'll post a couple of articles topics that we should work on.  Here
 are my picks for this week.

 Articles we should write:
 How to parse and create JSON
 How to use to create a login system using OpenID
 How to hide and show Admin content
 HowTo get/store session data
 Lift's Rendering Pipeline (here's helpful 
 posthttp://groups.google.com/group/liftweb/msg/1f156eeec71da397)

 Articles we should 
 update:http://wiki.liftweb.net/index.php/SetUp_jEdithttp://wiki.liftweb.net/index.php/HowTo_start_a_new_liftwebapphttp://wiki.liftweb.net/index.php/How_to_localize

 Please don't feel limited to the pages I mentioned above.  Feel free
 to edit/create any page you like.  If you need an account, just ask
 and I'll create one for you.

 Also if there's an article you'd like to see written or improved,
 please let us know!

 Thanks,
 Xavi
 


--~--~-~--~~~---~--~~
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: Wiki Articles

2009-07-14 Thread Xavi Ramirez

Thanks Alex!  That exactly what we need.  Over the next couple of
days, I'm going to start organizing the existing wiki articles around
this outline.

In the mean time, is there a chance someone could help me get any of
the following done?
- Replace the wiki logo with the lift logo
- Add syntax highlighting
- Open up registration (I'll monitor the recently modified page daily
to keep the spam down)

Thanks,
Xavi

On Tue, Jul 14, 2009 at 1:47 PM, Alex Cruisea...@cluonflux.com wrote:

 Jeremy Day wrote:
 1. Logging in using various methods, i.e. basic authentication,
 OpenID, etc.
 2. Displaying or hiding information based on user credentials.
 3. Setting up simple AJAX calls, such as getting a list of search
 results based on and entered keyword.
 These are great suggestions for Examples that we'd like someone to
 build/identify; we can wire them up to Features as required.

 What's the feature tree?  Here's a strawman that will hopefully prompt
 further discussion.

 - Templating
  * Snippets etc.

 - Sitemap/Menus
  * Conditional display
  * Access control (does authn/authz belong in its own topic?)

 - Client-side interactivity
  * Comet
  * AJAX

 - Forms
  * Security
  * Callback validation
  * File upload

 - ORM
  * Mapper
  * Record

 - Services
  * REST
    ^ XML
    ^ JSON

 - I18n/L10n
  * In templates
  * ?

 - ...?

 -0xe1a

 


--~--~-~--~~~---~--~~
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: Google Analytics

2009-07-14 Thread Xavi Ramirez

Sorry, I didn't replay earlier, but it turns out that the operation
is not supported code: 9 error is related to the fact that the
default Google Analytics snippet uses document.write().  It turns out
that XHTML does not support document.write(), which causes Firefox to
chock.

Ultimately, I replaced the default Google Analytics snippet with this one:
script src=http://www.google-analytics.com/ga.js; type=text/javascript /
script type=text/javascript
//![CDATA[
try { var pageTracker = _gat._getTracker(UA-4384857-1);
pageTracker._trackPageview(); } catch(err) {}
//]]
/script

A full write up of my experiences with Google Analytics and Lift can
be found here:
http://www.the-xavi.com/articles/operation-is-not-supported-code-9

~Xavi

On Tue, Jul 7, 2009 at 4:34 PM, Xavi Ramirezxavi@gmail.com wrote:
 Thanks!  I ran into this exact problem.  Is there any way to get rid
 of it?  Is there a lift:production tag?

 Thanks,
 Xavi

 On Tue, Mar 17, 2009 at 5:22 PM, Charles F. Munatc...@munat.com wrote:

 OK, I have to stop posting this crap when it's 5:30 AM, I've been
 working for 18 hours straight, and my brain is fried.

 The problem was that I was looking at it on my development machine, not
 the production server. The Google Analytics code is tied to the URL. If
 the URL is wrong, it doesn't serve the script, so Firebug reports the
 error. I are dumb.

 Hopefully, though, my posting this will save some other person a hassle
 and a little public embarrassment.

 Chas.

 Derek Chen-Becker wrote:
 Can you send the beginning of the XHTML output, up to and including the
 GA script?

 Derek

 On Tue, Mar 17, 2009 at 6:31 AM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:


     Is anyone else using Google Analytics? I am getting this strange
     JavaScript error:

     operation is not supported code: 9
      var pageTracker = _gat._getTracker(UA-5774043-2);

     The Google scripts are supposed to be placed right before the closing
     body tag, but Lift inserts its own script in there. I can't imagine how
     that would make a difference, but it is the only thing different from
     what Google recommends.

     Also, the analytics are not working.

     Any ideas?

     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: Google Analytics

2009-07-07 Thread Xavi Ramirez

Thanks!  I ran into this exact problem.  Is there any way to get rid
of it?  Is there a lift:production tag?

Thanks,
Xavi

On Tue, Mar 17, 2009 at 5:22 PM, Charles F. Munatc...@munat.com wrote:

 OK, I have to stop posting this crap when it's 5:30 AM, I've been
 working for 18 hours straight, and my brain is fried.

 The problem was that I was looking at it on my development machine, not
 the production server. The Google Analytics code is tied to the URL. If
 the URL is wrong, it doesn't serve the script, so Firebug reports the
 error. I are dumb.

 Hopefully, though, my posting this will save some other person a hassle
 and a little public embarrassment.

 Chas.

 Derek Chen-Becker wrote:
 Can you send the beginning of the XHTML output, up to and including the
 GA script?

 Derek

 On Tue, Mar 17, 2009 at 6:31 AM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:


     Is anyone else using Google Analytics? I am getting this strange
     JavaScript error:

     operation is not supported code: 9
      var pageTracker = _gat._getTracker(UA-5774043-2);

     The Google scripts are supposed to be placed right before the closing
     body tag, but Lift inserts its own script in there. I can't imagine how
     that would make a difference, but it is the only thing different from
     what Google recommends.

     Also, the analytics are not working.

     Any ideas?

     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: is there a name for this pattern?

2009-06-19 Thread Xavi Ramirez

This is also a common technique in C# too.  Unfortunately, I'm not
sure of the pattern's name either.  I usually just google for
non-generic inheritance from generic class

On Fri, Jun 19, 2009 at 10:31 AM, Jeremy Dayjeremy@gmail.com wrote:
 Eric,

 I believe that something like that, in C++ at least, is referred to as the
 curiously recurring template pattern.

 Jeremy

 On Fri, Jun 19, 2009 at 1:18 AM, Eric Bowman ebow...@boboco.ie wrote:

 The basic trick where a superclass has its subclass as a type parameter,
 e.g.

 class User extends MegaProtoUser[User]

 I've run into this before, I remember struggling to get it, then
 getting it, but I can't recall the epiphany.  But obviously this is a
 relatively common technique, so something to google is much appreciated.

 Thanks,
 Eric

 --
 Eric Bowman
 Boboco Ltd
 ebow...@boboco.ie
 http://www.boboco.ie/ebowman/pubkey.pgp
 +35318394189/+353872801532





 


--~--~-~--~~~---~--~~
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: Future of the Lift wiki

2009-06-03 Thread Xavi Ramirez

That's a great way of putting.

In my opinion, here's how lift's current documentation fits into those
three categories:
the Guidebook: the Get Started Guided and the Exploring Lift book
the Cookbook: blogs and various git repositories
the Encyclopedia: the mailing list, scala docs, and of course the source code

I think the lift wiki can quickly (6 months) become the repository for
cookbook/recipe articles.  Eventually (1.5+ years) it could even
become the lift encyclopedia.  Are these worthwhile goals?

Please don't view these e-mail as just a bunch of noobs complaining
about documentation.  I'm just trying to align my expectation with the
community's ideals.

Thanks,
Xavi

On Mon, Jun 1, 2009 at 10:36 PM, g-man gregor...@gmail.com wrote:

 Having gone through Rails, the Google App Engine with Django, and
 web2py over the last four years, I have seen it all as far as learning
 new frameworks goes, and I have posted a few ideas on that subject
 both here and on the book group.

 For those of us spoiled by the wealth of learning material on Rails,
 and to a lesser degree Django and web2py, all I can say is: 'Lift is a
 new framework, and a sophisticated one at that, which uses a new
 language derived from a convoluted one, and is at a relatively early
 stage of development, so therefore the designers are forging ahead to
 completion of the foundation, and thus there are few who can devote
 the time to creating the documentation we newcomers need.'

 My post on the book group defined the three classes of useful
 documents to be the Guidebook, the Encyclopedia, and the Cookbook. My
 role for the wiki is to hold Cookbook recipes which answer the most
 common 'how to' questions we encounter when building a website.

 In my personal learning quest, I am extending the 'ToDo' app by adding
 pieces of functionality, like many-to-many tagging, date manipulation,
 deletion, an admin interface, etc.

 As I come across solutions or questions, I post those on the group in
 order to help others and to get improvements and refinements from the
 members.

 David is right... Lift and Scala together are taking web applications
 to a whole new level of performance, so naturally it will take a
 little time to make things happen.

 By the way, today my copies of David's and Martin's Scala books
 arrived, and I urge all to purchase them yourselves!


 On Jun 1, 3:35 pm, Charles F. Munat c...@munat.com wrote:
 Hi, Xavi,

 One of my tasks is to come up with a good organization for the wiki and
 a site map, as well as a list of things we'd like to add to it.
 Unfortunately, with the coming Scala/Liftoff and OSB conferences, I've
 been swamped with other things. But I am working on it, albeit slowly.
 If you have any specific recommendations, please post them.

 Thanks!

 Chas.

 Xavi Ramirez wrote:
  Hello,

  I'm a bit confused about the future of the lift wiki.  What's the end
  goal?  In an ideal world is it supposed to be the main repository of
  lift knowledge, or just another documentation source?

  I personally feel that having one repository of knowledge is much more
  noob friendly.  Currently new members have to navigate through started
  guides, books, e-mail threads, scala docs, and personal blogs to find
  relative information.  Though the get started guided and book provide
  a good introduction, it's hard to progress from novice to intermediate
  with these fragmented resources.

  Thanks,
  Xavi

 


--~--~-~--~~~---~--~~
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] Future of the Lift wiki

2009-06-01 Thread Xavi Ramirez

Hello,

I'm a bit confused about the future of the lift wiki.  What's the end
goal?  In an ideal world is it supposed to be the main repository of
lift knowledge, or just another documentation source?

I personally feel that having one repository of knowledge is much more
noob friendly.  Currently new members have to navigate through started
guides, books, e-mail threads, scala docs, and personal blogs to find
relative information.  Though the get started guided and book provide
a good introduction, it's hard to progress from novice to intermediate
with these fragmented resources.

Thanks,
Xavi

--~--~-~--~~~---~--~~
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: JavaScript interface to Comet

2009-06-01 Thread Xavi Ramirez

Ahh thanks.  I forget to wrap my script with ![CDATA[]].

Also, thanks for the working example. =]

Adding the session variable did fix the echoing issue I was seeing,
for the most part.

As for my second problem, I still saw performance issues even when
using a chrome/firefox combination.  I've since added some simple
throttling functionality.  This seems to have fixed the majority of my
performance problems.

Thanks,
Xavi

On Mon, Jun 1, 2009 at 5:16 AM, Marius Danciu marius.dan...@gmail.com wrote:
 Xavi,

 I took the liebrty of doing some little changes to your code so that you
 won't get the echo. It is just an example (no elaborated design). It works
 for me, but let me know if this is suitable for you.


 Oh BTW, I've noticed that IE complains about some JS code.

 Br's,
 Marius


--~--~-~--~~~---~--~~
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: JavaScript interface to Comet

2009-05-30 Thread Xavi Ramirez

I'm trying add some comet features to an existing JS app. Essentially,
I want to drag/drop a widget and have my movements reflected on other
user's browsers.

You mentioned that a CometActor can cause JsExp to be executed.  This
might be what I'm looking for.  How does that work?

Thanks,
Xavi


On Sat, May 30, 2009 at 5:02 PM, marius d. marius.dan...@gmail.com wrote:

 Lift generates the JavaScript for Comet so you essentially don't have
 to worry about it. From a CometActor you just provide the markup that
 you need to render asynchronously or just the JsExp to be executed by
 browser.

 However could you please provide an overview of what you're trying to
 achieve?

 P.S.
 By default Lift's Ajax/Comet support works against JavaScript content
 type responses and not JSON. However you can use JSON as well.

 Br's,
 Marius

 On May 30, 3:12 pm, Xavi Ramirez xavi@gmail.com wrote:
 Hello,

 I was wondering if Lift provides a javascript interface to comet?
 Ideally it would look something like this:

 lift.getComet(comet-name).addListener(callback); // callback takes a
 json object
 lift.getComet(comet-name).postMessage(jsonObj);

 Thanks,
 Xavi
 


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

2009-05-30 Thread Xavi Ramirez

The value is that Yoryos version is a valid HTML page and can be
easily viewed without having lift/jetty running.  This could be handy
for designs, for example.

I'm personally not 100% sold (I hate boilerplate), but it's an interesting idea.

-Xavi

On Sat, May 30, 2009 at 7:44 PM, Timothy Perrett
timo...@getintheloop.eu wrote:

 There really is no benifit in this IMO - the only difference is that
 you have more redundant code?

 You can set the head from any page file like so:

 lift:surround with=default at=content
  head
    titlemy lovely title/title
  /head
  h2Welcome to your project!/h2
  plift:helloWorld.howdy //p
 /lift:surround

 Lift automatically consolidates the head elements into a single one
 before presenting the resulting html output to the browser. Other than
 that, your proposistion adds no value right? Its still well formed xml
 with a single node, it just happens to be that your is html.

 Do note however, that if you really wanted to use your way, then lift
 would not get in your way

 Cheers, Tim

 On May 30, 10:57 pm, valotas valo...@gmail.com wrote:
 Hi all!
 Just a proposal: wouldn't be better to have the views look like more
 an html page. I mean for the basic project created, instead of having
 an index.html look like

 lift:surround with=default2 at=content
   h2Welcome to your project!/h2
   plift:helloWorld.howdy //p
 /lift:surround

 have something like:

 html
 lift:surround with=default2 at=content
 head
   titleA better title than the one in default.html/title
 /head
 body
   h2Welcome to your project!/h2
   plift:helloWorld.howdy //p
 /body
 /lift:surround
 /html

 Yes we have more boilerplate code but with that way it would be much
 more easier the edditing of the page.

 Yoryos
 


--~--~-~--~~~---~--~~
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] Error with tictac example

2009-05-17 Thread Xavi Ramirez

Hello,

There seems to be an error in the tictac on the following line:
registerCleanupFunc(() = is.foreach(who = LobbyServer ! RemoveLurker(who)))

I've changed the code to this:
override protected def onShutdown(session: CleanUpParam) {
  is.foreach(who = LobbyServer ! RemoveLurker(who))
}

I'm not sure if this is correct, but it seemed to get rid of the
error.  Just wanted to let you-all know.

Thanks,
Xavi

--~--~-~--~~~---~--~~
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] Help with PocketChange project

2009-04-12 Thread Xavi Ramirez

Hello,

I've started reading through Exploring Lift and I'm having trouble
with running the PocketChange demo.  I've ran the following commands:

git clone git://github.com/tjweir/pocketchangeapp.git
cd to PocketChange directory
mvn install
mvn jetty:run -U

When the jetty server starts, the following two errors appear:

2009-04-12 17:05:47.728::INFO:  No Transaction manager found - if your
webapp requires one, please configure one.
org.postgresql.util.PSQLException: Connection refused. Check that the
hostname and port are correct and that the postmaster is accepting
TCP/IP connections.
at 
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122)
at 
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at 
org.postgresql.jdbc2.AbstractJdbc2Connection.init(AbstractJdbc2Connection.java:116)
at 
org.postgresql.jdbc3.AbstractJdbc3Connection.init(AbstractJdbc3Connection.java:30)
...

ERROR - Failed to Boot
java.lang.NullPointerException: Looking for Connection Identifier
ConnectionIdentifier(lift) but failed to find either a JNDI data
source with the name lift or a lift connection manager with the
correct name
at net.liftweb.mapper.DB$$anonfun$3$$anonfun$apply$7.apply(DB.scala:95)
at net.liftweb.mapper.DB$$anonfun$3$$anonfun$apply$7.apply(DB.scala:95)
at net.liftweb.util.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$3.apply(DB.scala:95)
...

Is there a step I'm missing?

Thanks,
Xavi

--~--~-~--~~~---~--~~
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: The Lift 1.1 list

2009-04-02 Thread Xavi Ramirez

+10 for documentation effort.  Speaking from the noob perspective, the
documentation is the biggest barrier to entry for Lift.  Currently
there are 3 places to get lift documentation:

-Get Started Tutorial
-Lift Book
-Lift Wiki

The first two sources are excellent, but the last one is bit lacking.
I think it'd be a big win if we can clean up the wiki.  Or, at the
very least we should get rid of obsolete articles/code.

Also, I feel it would be helpful if all the documentation was in one
location, opposed to separated into various in PDFs and webpages.

Just adding my two cents.

Thanks,
Xavi

On Thu, Apr 2, 2009 at 1:23 AM, Derek Chen-Becker dchenbec...@gmail.com wrote:
 +10 on JodaTime. +1 on documentation effort, something I've got on my
 ever-growing TODO list...

 Derek

 On Wed, Apr 1, 2009 at 3:51 PM, Charles F. Munat c...@munat.com wrote:

 +1 Anything to get away from that damn Java Date/Calendar crap.

 Agreed on need to review API.

 Chas.

 Timothy Perrett wrote:
  I think your right Jorge... 2.8 brings some important changes that
  could quite possibly have some pretty significant breaking changes in
  the Lift API.
 
  I also agree with the JodaTime in record/field, sounds like perfect
  sense.
 
  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: Starting with Lift on the wiki

2009-03-16 Thread Xavi Ramirez

Thanks.

The link on liftweb.net under the Jump right in! section should
probably be updated.

On Mon, Mar 16, 2009 at 12:39 AM, Derek Chen-Becker
dchenbec...@gmail.com wrote:
 Maybe, but in any case that's the old link. The newest version is at

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

 In both PDF and HTML.

 Derek

 On Sun, Mar 15, 2009 at 1:51 PM, Xavi Ramirez xavi@gmail.com wrote:

 Hello,

 Would you guys be amenable to adding Starting with Lift
 (http://static.liftweb.net/StartingWithLift.pdf) to the lift wiki?
 It's an excellent tutorial and I think it'd benefit from things like
 easy copy-and-pasteing, hyperlinks to relevant material, and syntax
 highlighting.  It'll also make it easier to maintain as the Lift
 framework evolves.

 Thanks,
 Xavi




 


--~--~-~--~~~---~--~~
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] Starting with Lift on the wiki

2009-03-15 Thread Xavi Ramirez

Hello,

Would you guys be amenable to adding Starting with Lift
(http://static.liftweb.net/StartingWithLift.pdf) to the lift wiki?
It's an excellent tutorial and I think it'd benefit from things like
easy copy-and-pasteing, hyperlinks to relevant material, and syntax
highlighting.  It'll also make it easier to maintain as the Lift
framework evolves.

Thanks,
Xavi

--~--~-~--~~~---~--~~
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: MappedTextarea problem

2009-03-15 Thread Xavi Ramirez

For the sake of better understanding the internals of lift where is screen.css?

On Wed, Mar 11, 2009 at 6:32 PM, Joachim A.
wallaby.po...@googlemail.com wrote:

 David,
 I suggest to leave blueprint as it is and to create your own stylesheet.
 Create a directory in the webapps dir and put a new .css file into it. Link
 that file into your template .

 It should be possible to override the blueprint definitions with something
 like:

 textarea {
 width:300px !important;
 }

 It's not possible to set columns or rows in css, just the width and height in
 px, pt, etc.

 Hope that helps,
 Joachim

 As Tyler suggested, I would like to create my own style sheet for my
 webapp.  My app is currently using the blueprint CSS boss, but I can't
 find the screen.css file anywhere on my computer.  Is it being called
 from within a jar or war file?  I can access it by putting the URL in
 my web browser, but then I can't find the directory in windows
 explorer.  I used firebug and confirmed that I can fix this problem by
 altering the css style sheet.  How can I create my own and where
 should I store it in my project folder?
 Thanks,
 David




 


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



[Lift] Re: JQuery corners

2009-02-07 Thread Xavi Ramirez

Hello,

The problem seems to be in jquery.corners.js: $('.rounded').corners()
calls changeInput(e) which converts input buttons into a-tags.  During
this conversion, the name attribute on the original input button is
lost. I'm not too familiar with the internals of lift, but I'm
guessing this is the source of the error.

Hope this helps.

~Xavi

On Sat, Feb 7, 2009 at 9:25 PM, Alex Boisvert boisv...@intalio.com wrote:
 Hi David, Marius,

 Here's a small project that illustrates the issue...

 To reproduce,
 1) Unzip corners.zip
 2) Run mvn jetty:run
 3) Go to http://localhost:8080
 4) Type something in the text field and click Submit button
 = You should see Notice: * You typed: [something] appear
 5) Edit src/main/webapp/index.html and uncomment this fragment

   !-- UNCOMMENT THIS FRAGMENT TO SEE THE BUG
   script type=text/javascript
   $(document).ready(function(){
 $('.rounded').corners();
   });
   /script
   --

 6) Refresh the page
 7) Type something  in the text field and click Submit button
 = Nothing happens?!?

 Hopefully you'll get the same behavior as I do.

 alex

 


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