Re: [Lift] Mapped(Date)(Time) formatter/parser

2010-02-14 Thread Naftoli Gugenheim
Pretty please?

On Fri, Feb 12, 2010 at 2:36 PM, Naftoli Gugenheim wrote:

> (FYI: buildSetXXValue methods are called when loading the field from the
> database in MetaMapper.scala. This question is relevant in the context of a
> Mapped(Date)(Time) that corresponds to a database column with a char-based
> type.)
>
> If the toDate calls in buildSetXXValue are to be replaced with the
> field-customized parser, then the current design of buildSetXXValue would
> require the field-level parser-customize method to take the form
>
> def parse(s: String): Box[Date]  // no side effect
>
> rather than something like say
>
> def fromString(s: String): Unit // set the value
>
> On the other hand if buildSetXXValue needs to have some more general
> parsing logic then it would be better to have the second syntax.
>
> Therefore until someone can comment, my current work for Lift is
> effectively frozen midair.
>
>
> 2010/2/10 Naftoli Gugenheim 
>
>
>>> - Until now there were two places in Mapped(Date)(Time) where parsing
>>> occurred. setFromAny used LiftRules.parseDate, while buildSetStringValue
>>> etc. used TimeHelpers.toDate.
>>> - Do we need methods like setFromAny and TimeHelpers.toDate, which take
>>> an Any and pattern match on several types of inputs? Isn't that very
>>> un-typesafe?
>>> - Why the inconsistency between setFromAny and buildSetStringValue?
>>> Should both use ConversionRules? Should both use toDate which should use
>>> ConversionRules?
>>>
>>
>> David, it would be great if you could comment on at least these points.
>> Thanks.
>>
>>
>>
>

-- 
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=en.



Re: [Lift] Back in the (Goat) Saddle

2010-02-14 Thread Naftoli Gugenheim
Real neat!
Is it possible to use Goat Rodeo for an offline distributed system? In other
words, several systems need to share a common pool of data but they are not
always connected, so they need to each hold their data locally and when they
are connected they need to push/pull updates.
Right now I'm looking at using Symmetric-DS but it's a pretty small,
tree-like data structure so if there was a more elegant solution for
synchronization it would be great.
Thanks!

2010/2/14 David Pollak 

> Back in June, I started chatting about Goat 
> Rodeo:
> a highly scalable mechanism for building distributed applications.  My first
> set of concepts for Goat Rodeo were wrong, most notably trying to do
> distributed Software Transactional Memory.  I've spent the last bunch of
> months revising the concept and code for Goat Rodeo... and today, I'm
> excitied to announce the 0.1 alpha code for Goat 
> Rodeo
> .
>
> For more info:
> http://blog.lostlake.org/index.php?/archives/98-Back-in-the-Goat-Saddle.html
>
>
>
> --
> 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 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=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=en.



Re: [Lift] Nginx, Jetty & multiple contexts

2010-02-14 Thread Timothy Perrett

The context header stuff was removed because it was tottlay broke ;-)

Check LiftRules for the context calculator - you should be able to  
dynamically set it from whatever value you want. I'll post an example  
tomorrow if you need one.


Cheers, Tim

Sent from my iPhone

On 14 Feb 2010, at 22:38, Jeppe Nejsum Madsen  wrote:


Hi,

I'm trying to host several lift apps on a single server using jetty
(one context per app) and nginx in front.

I want to have

www.domain1.com goes to lift app localhost/domain1
www.domain2.com goes to lift app localhost/domain2

It seems like what happens is that nginx correctly forwards requests,
but when lift generates links, at adds the context name.

Based on some Googling, I added the X-Lift-ContextPath header, but
this didn't seem to help.

Any examples of such a setup?

/Jeppe

--
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=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=en.



[Lift] Nginx, Jetty & multiple contexts

2010-02-14 Thread Jeppe Nejsum Madsen
Hi,

I'm trying to host several lift apps on a single server using jetty
(one context per app) and nginx in front.

I want to have

www.domain1.com goes to lift app localhost/domain1
www.domain2.com goes to lift app localhost/domain2

It seems like what happens is that nginx correctly forwards requests,
but when lift generates links, at adds the context name.

Based on some Googling, I added the X-Lift-ContextPath header, but
this didn't seem to help.

Any examples of such a setup?

/Jeppe

-- 
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=en.



[Lift] Re: File Download

2010-02-14 Thread Gang
Thanks Tim, that's exactly what I'm looking for!


On Feb 14, 11:27 am, Timothy Perrett  wrote:
> See:
>
> http://blog.getintheloop.eu/2009/3/19/understanding-lift-s-streamingr...
>
> Construct the CSV in memory and just then stuff it into a streaming response 
> as a byte array.
>
> Cheers, Tim
>
> On 14 Feb 2010, at 16:18, Gang wrote:
>
>
>
> > Hi,
>
> > I have a question and it may not be a pure Lift one.  But since I'm
> > working on a Lift app and this group is the most responsive one I have
> > seen, might just try it here.
>
> > I need to download data from database in CSV format.  What is the best
> > approach within Lift framework?  Do I have to write the data on the
> > server somewhere and then provide user with a link?  I have tried to
> > google "scala, lift, file download...", but could not come up with
> > what I'm looking for.  Maybe I didn't use the right key words in
> > search?  Thanks in advance!
>
> > Brs
> > Gang
>
> > --
> > 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 
> > athttp://groups.google.com/group/liftweb?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
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=en.



[Lift] [lift] presentation only equivalent of toForm

2010-02-14 Thread Channing Walton

Hi,
I am using toForm to create forms for crud operations on my mappers, but I
cannot see an equivalent method for presentation purposes. That is, no form
elements, just text presented in the same tabular format as the form.

Is there one ?

Channing
-- 
View this message in context: 
http://old.nabble.com/presentation-only-equivalent-of-toForm-tp27586473p27586473.html
Sent from the liftweb mailing list archive at Nabble.com.

-- 
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=en.



[Lift] Re: Improvements to Lift-Json

2010-02-14 Thread John A. De Goes
Just also fixed a bug for None option of tuples (or any other case
where java.lang.Object's no arg constructor is a match for empty JSON
specifications) and added support for arrays, which also utilizes JSON
array syntax.

-- 
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=en.



[Lift] Re: Improvements to Lift-Json

2010-02-14 Thread John A. De Goes
Sorry, git newbie here. :-)

-- 
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=en.



Re: [Lift] New logging code

2010-02-14 Thread Jeppe Nejsum Madsen
On Sun, Feb 14, 2010 at 5:59 PM, Heiko Seeberger
 wrote:
> On 14 February 2010 14:40, Jeppe Nejsum Madsen  wrote:
>>
>> Hi,
>>
>> I've tried to keep it as simple as possible, really just a Scala layer
>> on top of the SLF4J api.
>
> I think that's a very good decision!
>
>>
>> Note that no backend (log4j or logback) configuration is included. This
>> has to go into lift-util to use runmode etc.
>>
>> You can have your choice of a nested logger:
>>
>>  object MyObj extends Logging {
>>   logger.info("nested Hello")
>>  }
>>
>> or direct access:
>>
>>  object MyObj extends Loggable {
>>   info("direct Hello")
>>  }
>>
>> Thoughts?
>
> I really like to have Logging and Loggable, but I would call them vice versa
> and change Logging to Logger. As an example think of Iterable and Iterator.
> In general an Xable gives you access to an X. Hence we should have Loggable
> with a method logger that returns a Logger and we should have Logger to mix
> in all the logging methods. Why change from Logging to Logger? Because we
> should call it what it is, not what it does.

Makes sense, and that was actually close to what I had initially: The
Logger trait was called LiftLogger, but this clashed with the current
LiftLogger.

This name (Logger in current code) probably doesn't matter too much as
it's usually not needed in client code. But AbstractLogger doesn't
sound very nice :-)

/Jeppe

-- 
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=en.



Re: [Lift] Re: Page transition using location.replace

2010-02-14 Thread Timothy Perrett
Im confused with how lift is stopping you providing this within your 
application? It seems like you could do what you wanted with client side 
javascript? 

Cheers, Tim

On 14 Feb 2010, at 17:16, aw wrote:

> Because I don't like how my back button can return me back to a state
> that is no longer true.
> 
> In my particular use-case, I am drilling into an item and either want
> to do an action or cancel.
> Completing an Action, or hitting Cancel, will put me back on the
> viewItem page, after possibly executing an action.
> I really don't like the Back button functioning in this case because
> if the user hits the back button, then the user can resubmit the
> action.  Sometimes, that could be dangerous or confusing.
> 
> On Feb 14, 4:14 am, Timothy Perrett  wrote:
>> Why? What would be a good reason for doing this...?
>> 
>> On 14 Feb 2010, at 08:06, aw wrote:
>>> Is there a way to do a page transition using location.replace?
>>> In some cases, I am interested in not having the back button function.
>>> I think I am looking for an SHtml.link variation that leverages
>>> location.replace.
>>> Perhaps an S.redirectTo variation too.
> 
> -- 
> 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=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=en.



Re: [Lift] Improvements to Lift-Json

2010-02-14 Thread Timothy Perrett
I dont mean to be overly pedantic, but that would be a fork - not a branch ;-)

Cheers, Tim

On 14 Feb 2010, at 17:19, John A. De Goes wrote:

> 
> You can find the branch here:
> 
>   http://github.com/jdegoes/liftweb

-- 
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=en.



[Lift] Improvements to Lift-Json

2010-02-14 Thread John A. De Goes
I have a branch of liftweb in which I've modified lift-json.

I added more tests, support for composite type hints (e.g. typeHints1
+ typeHints2), support for polymorphic case classes with no type
arguments (e.g. case class Foo()), and fixed one bug.

In addition, I added support for serialization of Sets, which should
generalize to other collection types. Sets are serialized in the most
obvious fashion: ["foo", "bar"]. Thus JSON arrays can deserialize into
either sets or lists, depending on their target type.

I matched the existing code style.

You can find the branch here:

   http://github.com/jdegoes/liftweb

-- 
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=en.



[Lift] Re: Page transition using location.replace

2010-02-14 Thread aw
Because I don't like how my back button can return me back to a state
that is no longer true.

In my particular use-case, I am drilling into an item and either want
to do an action or cancel.
Completing an Action, or hitting Cancel, will put me back on the
viewItem page, after possibly executing an action.
I really don't like the Back button functioning in this case because
if the user hits the back button, then the user can resubmit the
action.  Sometimes, that could be dangerous or confusing.

On Feb 14, 4:14 am, Timothy Perrett  wrote:
> Why? What would be a good reason for doing this...?
>
> On 14 Feb 2010, at 08:06, aw wrote:
> > Is there a way to do a page transition using location.replace?
> > In some cases, I am interested in not having the back button function.
> > I think I am looking for an SHtml.link variation that leverages
> > location.replace.
> > Perhaps an S.redirectTo variation too.

-- 
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=en.



Re: [Lift] New logging code

2010-02-14 Thread Heiko Seeberger
On 14 February 2010 14:40, Jeppe Nejsum Madsen  wrote:

> Hi,
>
> I've tried to keep it as simple as possible, really just a Scala layer
> on top of the SLF4J api.
>

I think that's a very good decision!


> Note that no backend (log4j or logback) configuration is included. This
> has to go into lift-util to use runmode etc.
>
> You can have your choice of a nested logger:
>
>  object MyObj extends Logging {
>   logger.info("nested Hello")
>  }
>
> or direct access:
>
>  object MyObj extends Loggable {
>   info("direct Hello")
>  }
>
> Thoughts?
>

I really like to have Logging and Loggable, but I would call them vice versa
and change Logging to Logger. As an example think of Iterable and Iterator.
In general an Xable gives you access to an X. Hence we should have Loggable
with a method logger that returns a Logger and we should have Logger to mix
in all the logging methods. Why change from Logging to Logger? Because we
should call it what it is, not what it does.

Cheers,

Heiko

Work: weiglewilczek.com
Blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to 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=en.



[Lift] Re: serializing and deserializing a json object through Lift-JSON

2010-02-14 Thread Joni Freeman
Hi,

I just added Array support and fixed the bug 341. It is now waiting on
review board for others to comment. You can checkout branch
'joni_issue_341' if you want to try it immediately.

This test case now passes (Please note the verbose assertions in
second test case. Those are needed because scala.Array's equals is
reference comparison, Array(1, 2) == Array(1, 2) -> false):

http://github.com/dpp/liftweb/blob/joni_issue_341/framework/lift-base/lift-json/src/test/scala/net/liftweb/json/SerializationBugs.scala

Cheers Joni

On Feb 11, 12:09 pm, Ali  wrote:
> Thanks guys, Actually my problem is still there, It looks like 
> lift-jsondoesn't support scala-arrays.
>
> case class Plan(  leftOperand:Option[Action],
>                   operator:Option[String],
>                   rightOperand:Option[Action])
>
> case class Game(buy:Map[String,Plan])
>
> case class Action(
>         functionName:String,
>         symbol:String,
>         inParams: Array[Number] ,
>         subOperand : Option[Action])
>
> val game = new Game(Map("a"->new Plan(Some(new
> Action("f1","s",Array(),None)),Some("A"),Some(new
> Action("f1","s",Array(0,1,2),None)
> implicit val format =
> Serialization.formats(ShortTypeHints(List(classOf[Plan],
> classOf[Action], classOf[Game])))
> println(Serialization.write(game))
>
> The output is:
>
> {"jsonClass":"Game","buy":{"a":{"jsonClass":"Plan","rightOperand":
> {"jsonClass":"Action","symbol":"s","functionName":"f1"},"operator":"A","leftOperand":
> {"jsonClass":"Action","symbol":"s","functionName":"f1"
>
> which is not correct (missing the inParams field from the action
> class).
>
> I appreciate your comment,
>
> Cheers,
> -A
> On Feb 11, 8:44 am, Joni Freeman  wrote:
>
> > Hi,
>
> > Type hints should not be needed in this case since the Map is not used
> > in a polymorphic way. But the work-around Justin showed should work.
> > Actually it seems that it is enough to put type info just to Action to
> > make serialization work:
>
> >     implicit val format =
> > Serialization.formats(ShortTypeHints(List(classOf[Action]))
>
> > Anyway, I added a ticket for this 
> > defect:http://www.assembla.com/spaces/liftweb/tickets/341-Type-hints-are-nee...
>
> > Cheers Joni
>
> > On Feb 10, 7:49 pm, Justin Reardon  wrote:
>
> > > Sometimes the serialization code needs a helping hand, using:
>
> > >         implicit val format = 
> > > Serialization.formats(ShortTypeHints(List(classOf[Plan], classOf[Action], 
> > > classOf[Game])))
>
> > > instead of the defaults makes it work here.
>
> > > Cheers,
> > > Justin Reardon
>
> > > On 2010-02-10, at 11:42 , Ali wrote:
>
> > > > Dear All,
> > > > I am wondering would you please tell me how can I use lift-json(2.0
> > > > snapshots) to serialize and deserialize the following scala case
> > > > classes.
>
> > > > case class Plan( plan:Option[Action] )
> > > > case class Game( game:Map[String,Plan])
> > > > case class Action(id:Int, subAction : Option[Action])
>
> > > > val game = new Game(Map("a"->new Plan(new Some(new Action(1,None)
> > > > implicit val formats = net.liftweb.json.DefaultFormats
>
> > > > game must beEqualTo( Serialization.read[Game]
> > > > (Serialization.write(game)))
>
> > > > Test fails.
>
> > > > Cheers,
> > > > -A
>
> > > > --
> > > > 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 
> > > > athttp://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=en.



Re: [Lift] File Download

2010-02-14 Thread Timothy Perrett
See:

http://blog.getintheloop.eu/2009/3/19/understanding-lift-s-streamingresponse

Construct the CSV in memory and just then stuff it into a streaming response as 
a byte array.

Cheers, Tim

On 14 Feb 2010, at 16:18, Gang wrote:

> Hi,
> 
> I have a question and it may not be a pure Lift one.  But since I'm
> working on a Lift app and this group is the most responsive one I have
> seen, might just try it here.
> 
> I need to download data from database in CSV format.  What is the best
> approach within Lift framework?  Do I have to write the data on the
> server somewhere and then provide user with a link?  I have tried to
> google "scala, lift, file download...", but could not come up with
> what I'm looking for.  Maybe I didn't use the right key words in
> search?  Thanks in advance!
> 
> Brs
> Gang
> 
> -- 
> 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=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=en.



[Lift] File Download

2010-02-14 Thread Gang
Hi,

I have a question and it may not be a pure Lift one.  But since I'm
working on a Lift app and this group is the most responsive one I have
seen, might just try it here.

I need to download data from database in CSV format.  What is the best
approach within Lift framework?  Do I have to write the data on the
server somewhere and then provide user with a link?  I have tried to
google "scala, lift, file download...", but could not come up with
what I'm looking for.  Maybe I didn't use the right key words in
search?  Thanks in advance!

Brs
Gang

-- 
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=en.



Re: [Lift] Re: New logging code

2010-02-14 Thread Jeppe Nejsum Madsen
On Sun, Feb 14, 2010 at 3:49 PM, Marius  wrote:
> Overall it's looking pretty good, but why do we need both Logging and
> Loggable ?

Not sure if we need both. I prefer Loggable because it minimizes
clutter, but in some case (such as inside a Specification) there might
already be a warn etc in scope, in which case Logging can be used.

/Jeppe

-- 
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=en.



[Lift] Re: New logging code

2010-02-14 Thread Marius
Overall it's looking pretty good, but why do we need both Logging and
Loggable ?

Br's,
Marius

On 14 feb., 15:40, Jeppe Nejsum Madsen  wrote:
> Hi,
>
> I've added first shot at the new logging code:
>
> http://github.com/dpp/liftweb/blob/e7ed6c6bc013aea768bfe34a6e4eca22d2...
>
> I've tried to keep it as simple as possible, really just a Scala layer
> on top of the SLF4J api.
>
> Note that no backend (log4j or logback) configuration is included. This
> has to go into lift-util to use runmode etc.
>
> You can have your choice of a nested logger:
>
>  object MyObj extends Logging {
>    logger.info("nested Hello")
>  }
>
> or direct access:
>
>  object MyObj extends Loggable {
>    info("direct Hello")
>  }
>
> Thoughts?
>
> Next step, when this has been committed, is to update Lift internals to
> use the new code (as part of #310) and deprecate the old logging in util.
>
> /Jeppe

-- 
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=en.



[Lift] New logging code

2010-02-14 Thread Jeppe Nejsum Madsen
Hi,

I've added first shot at the new logging code:

http://github.com/dpp/liftweb/blob/e7ed6c6bc013aea768bfe34a6e4eca22d26407e8/framework/lift-base/lift-common/src/main/scala/net/liftweb/common/Logging.scala

I've tried to keep it as simple as possible, really just a Scala layer
on top of the SLF4J api.

Note that no backend (log4j or logback) configuration is included. This
has to go into lift-util to use runmode etc.

You can have your choice of a nested logger:

 object MyObj extends Logging {
   logger.info("nested Hello")
 }

or direct access:

 object MyObj extends Loggable {
   info("direct Hello")
 }

Thoughts?

Next step, when this has been committed, is to update Lift internals to
use the new code (as part of #310) and deprecate the old logging in util.

/Jeppe

-- 
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=en.



[Lift] Re: Lucene (Full text indexing and searching) and Lift

2010-02-14 Thread donfranciscodequevedo
tahgt helped me, thank you, David!

On Feb 13, 9:46 pm, David Pollak 
wrote:
> On Sat, Feb 13, 2010 at 12:21 PM, donfranciscodequevedo <
>
> donfranciscodequev...@gmail.com> wrote:
> > Hi David,
>
> > searching for lucene and Liftweb, I found this post from you
> > "Neat. Using Lucene and Hadoop was one of the driving factors for me
> > to learn Scala and write lift."
>
> Yeah... that's what started me on the path to Scala and Lift... I was
> working on FeedsLike.us, but I put that project aside.
>
> > So is there some recommended way of how to do this in Lift/Scala?
>
> None that I know of.
>
> > Or
> > is it just as simple as including the Java Lucene package in Liftweb
> > and connecting Lucene to the DB?
>
> Yes.
>
> > I am especially interested of getting
> > an index of OR Mapped Data.
>
> > Perhaps I should point out, what I would be able to do:
> > Let's say we have an Contact Class mapped to the Database, with
> > Firstname, Sirname, Telnumber, email  and Address fields (City,
> > Streetname, Zip, etc.). When I do a search, I would like to be able to
> > search all of theses fields.
>
> > What's the best approach to do this with Lift?
>
> Add a function to the MetaMapper afterSave and afterDelete methods to record
> the change to Lucene.
>
>
>
>
>
> > Best regards
>
> > Gregor
>
> > On Feb 13, 2:23 am, Randinn  wrote:
> > > There was mention about Lucene and Lift in the Ebook and the Liftbook
> > > group but I don't know how far they got into it.
>
> > > On Feb 13, 10:14 am, David Pollak 
> > > wrote:
>
> > > > On Fri, Feb 12, 2010 at 11:43 AM, donfranciscodequevedo <
>
> > > > donfranciscodequev...@gmail.com> wrote:
> > > > > Hi,
>
> > > > > I searched for this on the groups, but didn't find a clear statement.
>
> > > > > I'm new to Lift and just wanted to clear this out:  Is full text
> > > > > indexing and searching(e.g. Lucene)  already included in the Lift
> > > > > Framework or not?
>
> > > > There's no Lift/Lucene module that I know of, although at one point
> > ESME (http://incubator.apache.org/esme/) had Lift/Lucene integration.
>
> > > > > Thx
>
> > > > > Gregor
>
> > > > > --
> > > > > 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=en.
>
> > > > --
> > > > 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 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=en.
>
> --
> 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 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=en.



Re: [Lift] Page transition using location.replace

2010-02-14 Thread Timothy Perrett
Why? What would be a good reason for doing this...?

On 14 Feb 2010, at 08:06, aw wrote:

> Is there a way to do a page transition using location.replace?
> In some cases, I am interested in not having the back button function.
> I think I am looking for an SHtml.link variation that leverages
> location.replace.
> Perhaps an S.redirectTo variation too.
> 
> -- 
> 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=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=en.



Re: [Lift] Re: How do I build reusable modules for lift?

2010-02-14 Thread Timothy Perrett
Generally, the module can look after its own concerns (for instance lift rules 
dispatching). However, the main wire up must be completed by the consumer 
rather than any classpath magic. Yes, LiftRules does support multiple add to 
package calls. I would put the addToPackage call in your module, and have a 
surrounding "init" method that just gets called in your consuming boot.scala 
meaning that your consuming code only has:

MyHelpfulModule.init

in its Boot.boot method - nice and tidy.

Cheers, Tim


On 14 Feb 2010, at 11:21, Jonathan Ferguson wrote:

> I was more concerned with the package structure being different between the 
> common module and the projects consuming it.  The snippets for the common 
> module would be in, say com.mycompany.common.snippet where as the projects 
> consuming the common module would likely have the package structure 
> com.mycompany.nextbigthing.snippet 
> 
> Does LiftRules support multiple addToPackage call?  Is there a nice way to 
> have the common module look after it's own interaction with LiftRules or 
> should the consumer of the module look after it? 
> 
> Jono
> 
> 
> 
> 
> 
> On 14 February 2010 21:13, ngocdaothanh  wrote:
> I think you could install your modules into Maven's repository, then
> use them from projects as dependencies.
> 
> 
> On Feb 14, 6:32 pm, Jonathan Ferguson  wrote:
> > Sorry for a bit of a vague Sunday night question.
> >
> > We now have several lift projects floating round that have common snippets
> > and potentially model objects, which would be nice to reuse without cut &
> > paste. Is there documentation on how to do this or best practices?
> >
> > Cheers
> >
> > Jono
> 
> --
> 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=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=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=en.



Re: [Lift] Re: How do I build reusable modules for lift?

2010-02-14 Thread Jonathan Ferguson
I was more concerned with the package structure being different between the
common module and the projects consuming it.  The snippets for the common
module would be in, say com.mycompany.common.snippet where as the projects
consuming the common module would likely have the package structure
com.mycompany.nextbigthing.snippet

Does LiftRules support multiple addToPackage call?  Is there a nice way to
have the common module look after it's own interaction with LiftRules or
should the consumer of the module look after it?

Jono





On 14 February 2010 21:13, ngocdaothanh  wrote:

> I think you could install your modules into Maven's repository, then
> use them from projects as dependencies.
>
>
> On Feb 14, 6:32 pm, Jonathan Ferguson  wrote:
> > Sorry for a bit of a vague Sunday night question.
> >
> > We now have several lift projects floating round that have common
> snippets
> > and potentially model objects, which would be nice to reuse without cut &
> > paste. Is there documentation on how to do this or best practices?
> >
> > Cheers
> >
> > Jono
>
> --
> 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=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=en.



[Lift] Re: How do I build reusable modules for lift?

2010-02-14 Thread ngocdaothanh
I think you could install your modules into Maven's repository, then
use them from projects as dependencies.


On Feb 14, 6:32 pm, Jonathan Ferguson  wrote:
> Sorry for a bit of a vague Sunday night question.
>
> We now have several lift projects floating round that have common snippets
> and potentially model objects, which would be nice to reuse without cut &
> paste. Is there documentation on how to do this or best practices?
>
> Cheers
>
> Jono

-- 
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=en.



Re: [Lift] Re: Cached CSS (and Javascript?) issue

2010-02-14 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim  writes:

> May I suggest that instead of naming the tag 'css,' it be given a name
> that's more agnostic of the content it affects and more indicative of what
> it does? Technically this could be used for any type of resource.
> What about something like
> http://groups.google.com/group/liftweb?hl=en.



[Lift] How do I build reusable modules for lift?

2010-02-14 Thread Jonathan Ferguson
Sorry for a bit of a vague Sunday night question.

We now have several lift projects floating round that have common snippets
and potentially model objects, which would be nice to reuse without cut &
paste. Is there documentation on how to do this or best practices?


Cheers

Jono

-- 
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=en.



[Lift] Re: Back in the (Goat) Saddle

2010-02-14 Thread Randinn
Wow, congrats, I'm glad you jumped back in the saddle.

On Feb 14, 8:15 pm, David Pollak 
wrote:
> Back in June, I started chatting about Goat
> Rodeo:
> a highly scalable mechanism for building distributed applications.  My first
> set of concepts for Goat Rodeo were wrong, most notably trying to do
> distributed Software Transactional Memory.  I've spent the last bunch of
> months revising the concept and code for Goat Rodeo... and today, I'm
> excitied to announce the 0.1 alpha code for Goat
> Rodeo
> .
>
> For more 
> info:http://blog.lostlake.org/index.php?/archives/98-Back-in-the-Goat-Sadd...
>
> --
> 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 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=en.



[Lift] Back in the (Goat) Saddle

2010-02-14 Thread David Pollak
Back in June, I started chatting about Goat
Rodeo:
a highly scalable mechanism for building distributed applications.  My first
set of concepts for Goat Rodeo were wrong, most notably trying to do
distributed Software Transactional Memory.  I've spent the last bunch of
months revising the concept and code for Goat Rodeo... and today, I'm
excitied to announce the 0.1 alpha code for Goat
Rodeo
.

For more info:
http://blog.lostlake.org/index.php?/archives/98-Back-in-the-Goat-Saddle.html



-- 
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 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=en.



[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-14 Thread Marius
That is an option, thanks.

On 14 feb., 04:45, Naftoli Gugenheim  wrote:
> May I suggest that instead of naming the tag 'css,' it be given a name
> that's more agnostic of the content it affects and more indicative of what
> it does? Technically this could be used for any type of resource.
> What about something like
> 
>
> > > > thus Lift could generate:
>
> > > > 
>
> > > > compound_2434rfe34534.css is a synthetic name that would contain the
> > > > mycss.css, some_other.css. /classpath/baz.css concatenated. Same thing
> > > > for JS. This content could potentially be compressed.
>
> > > One thing that I think will be important (at some point :-) is to do
> > > combining of individual tags. If a page is constructed from several
> > > snippets/widgets, each emitting different js files (think jQuery
> > > plugins) and css files, these need to be combined somehow. This means
> > > that each page will get it's own unique synthetic css/js file. This
> > > probably needs to be configurable in some way :-)
>
> > Yeah that is a slightly different use-case that require more noodling.
> > But would worth considering in the future.
>
> > > > I can open a ticket and start looking into this.
>
> > > Awesome! I'll watch from the sideline!
>
> > > /Jeppe
>
> > --
> > 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=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=en.



[Lift] Page transition using location.replace

2010-02-14 Thread aw
Is there a way to do a page transition using location.replace?
In some cases, I am interested in not having the back button function.
I think I am looking for an SHtml.link variation that leverages
location.replace.
Perhaps an S.redirectTo variation too.

-- 
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=en.