[Lift] Re: Tail merge?

2009-05-11 Thread marius d.
On May 10, 9:35 pm, Timothy Perrett timo...@getintheloop.eu wrote: Yeah google analytics is a good use case. I think talking about smashing static files is off topic, but there is some value in having a tail merge for when you want to put stuff in just before the body tag. My only thinking

[Lift] Re: Tail merge?

2009-05-11 Thread Viktor Klang
On Sun, May 10, 2009 at 10:39 PM, marius d. marius.dan...@gmail.com wrote: On May 10, 10:08 pm, Viktor Klang viktor.kl...@gmail.com wrote: What I've been noodling about for some time is to have dependency management as a part of the framework. That could be easily obtained by having

[Lift] Re: LoanWrapper

2009-05-11 Thread Timothy Perrett
Out of interest - what is your use case? What are you trying to do that you think LoanWrapper might be appropriate for? Or are you just exploring lift? :-) Cheers, Tim On May 10, 9:03 pm, Charles F. Munat c...@munat.com wrote: It will after I review some stuff about types and look through some

[Lift] Re: LoanWrapper

2009-05-11 Thread Charles F. Munat
Just exploring in Lift. (Reading the Lift book, Chapter 7.) Chas. Timothy Perrett wrote: Out of interest - what is your use case? What are you trying to do that you think LoanWrapper might be appropriate for? Or are you just exploring lift? :-) Cheers, Tim On May 10, 9:03 pm, Charles

[Lift] Re: Write access to the id field of ProtoUser (for testing)

2009-05-11 Thread erik.karls...@iki.fi
Hi, New users are moderated to avoid spam... on weekends, it may take up to a day for postings to appear on list. Ok, sorry for the spam then ;) You should be able to do: myUserInstance.id(55L) That should set it to 55. I try to do this in my unit test: val u2 = User.create u2.id(20)

[Lift] Alternating row colors

2009-05-11 Thread Magnus Alvestad
I'm still learning lift (and scala). For my sample application I want to display a table with alternating row colors. I want to put the style in my CSS file and add a classname to every TR in my table to indicate odd and even rows. However, I don't know how to take a value from the snippet

[Lift] Re: Write access to the id field of ProtoUser (for testing)

2009-05-11 Thread David Pollak
On Mon, May 11, 2009 at 4:10 AM, erik.karls...@iki.fi erik.b.karls...@gmail.com wrote: Hi, New users are moderated to avoid spam... on weekends, it may take up to a day for postings to appear on list. Ok, sorry for the spam then ;) You should be able to do: myUserInstance.id(55L)

[Lift] Re: Alternating row colors

2009-05-11 Thread marius d.
Assume that in your snippet you have a List[String] that you want to render as table rows such as: val list = one :: two :: three :: Nil def render(xhtml: NodeSeq): NodeSeq = { table{ list.zipWithIndex((e, idx) = trtd{e}/td/tr % if (idx % 2 == 0) Null // Null is a MetaData

[Lift] Re: Alternating row colors

2009-05-11 Thread Viktor Klang
This is the jQuery approach: (written from head, so may not compile) CSS= .striped tr { background-color : #FF } MARKUP= tabletbody class=stripedtrtdhoho/td/trtrtdhaha/td/trtrtdhihi/td/tr/tbody/table JS= $('.striped tr:nth-child(odd)').css('background-color','#DD'); Ref:

[Lift] Re: Confusion about Lift-Core

2009-05-11 Thread David Pollak
In this case, I don't think lift-core means the same as the lift-core package. I'm also not a fan of layer diagrams in general... I think that they fail to show the interconnected nature of things... but that's just my learning style. On Sun, May 10, 2009 at 11:03 AM, Charles F. Munat

[Lift] Re: Alternating row colors

2009-05-11 Thread Alex Boisvert
Here's another approach that I used in a small project recently... I wrote a small stateful utility class, class OddOrEven { private var isEven = true def getAndToggle: String = { val s = toString isEven = (!isEven) s } override def toString = if (isEven) even else odd } and

[Lift] Re: Confusion about Lift-Core

2009-05-11 Thread David Bernard
See http://groups.google.com/group/liftweb/browse_thread/thread/957d5c8942b70a19/6fc14f442224626a the name lift-core was keep for backward compatibility and to avoid existing user to replace lift-core by lift-full or the exact list of need-jar in pom.xml. /davidB On Mon, May 11, 2009 at 16:10,

[Lift] Re: Alternating row colors

2009-05-11 Thread marius d.
Really neat, Viktor ! On May 11, 5:07 pm, Viktor Klang viktor.kl...@gmail.com wrote: This is the jQuery approach: (written from head, so may not compile) CSS= .striped tr { background-color : #FF } MARKUP= tabletbody class=stripedtrtdhoho/td/trtrtdhaha/td/trtrtdhihi/td/tr/tbody/table

[Lift] Re: Alternating row colors

2009-05-11 Thread Magnus Alvestad
Thank you for your answers. I'll try to include some more detail because I was not able to apply your suggestions to my code. My template has a section like this: lift:T.list table question.list trtdquestion:text//td/tr /question.list /table /lift:T.list while my snippet

[Lift] Re: Alternating row colors

2009-05-11 Thread Timothy Perrett
Always there with a nice solution Viktor! Kudos! On 11/05/2009 15:07, Viktor Klang viktor.kl...@gmail.com wrote: This is the jQuery approach: (written from head, so may not compile) CSS= .striped tr { background-color : #FF } MARKUP= tabletbody

[Lift] Re: Alternating row colors

2009-05-11 Thread Magnus Alvestad
Ah! Based on Viktors suggestions and some more info at: http://15daysofjquery.com/examples/zebra/ I was able to write this in a couple of lines of JQuery! -Magnus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Lift] Re: Alternating row colors

2009-05-11 Thread Magnus Alvestad
To elaborate, I added a $(document).ready function to handle this. However! Some other pages have ajax functionality. When they update html in the page, this html (and the page) will not be 'reprocessed' by JQuery. Can I handle this in a generic manner? -Magnus On May 11, 5:09 pm, Magnus

[Lift] Re: Alternating row colors

2009-05-11 Thread David Pollak
On Mon, May 11, 2009 at 8:19 AM, Magnus Alvestad magnus.alves...@gmail.comwrote: To elaborate, I added a $(document).ready function to handle this. However! Some other pages have ajax functionality. When they update html in the page, this html (and the page) will not be 'reprocessed' by

[Lift] Re: Write access to the id field of ProtoUser (for testing)

2009-05-11 Thread erik.karls...@iki.fi
That work A hah!  I had forgotten that I'd done this.  Try the following: myUser.runSafe {   myUser.id(55L) } Now it works and thanks for the explanation!! br, - Erik Mapper supports read and write access control on a field by field bases.  You can put in complex logic (e.g., a

[Lift] Re: How forms work (the life cycle of request)

2009-05-11 Thread erik.karls...@iki.fi
Hi, Scala supports true closures which means that variables in scope (including this) are bound to the function. Lift associates the function passed to SHtml.text(defaultValue, passedFunction) with a GUID and returns places that GUID in the name attribute of the generated input/ HTML

[Lift] Re: How forms work (the life cycle of request)

2009-05-11 Thread David Pollak
On Mon, May 11, 2009 at 10:28 AM, erik.karls...@iki.fi erik.b.karls...@gmail.com wrote: Hi, Scala supports true closures which means that variables in scope (including this) are bound to the function. Lift associates the function passed to SHtml.text(defaultValue, passedFunction)

[Lift] Re: Confusion about Lift-Core

2009-05-11 Thread Charles F. Munat
How would you draw the diagram? Don't be so sure that your learning style isn't mirrored by others... Chas. David Pollak wrote: In this case, I don't think lift-core means the same as the lift-core package. I'm also not a fan of layer diagrams in general... I think that they fail to

[Lift] Strange Comet Behavior

2009-05-11 Thread Bryan
This could be a result of my strange usage of comet actors, but I'm getting incosistent comet behavior. When run in windows + jetty I have no problems. In linux + jetty, subsequent requests fail. I'll explain. I have attached comet-test.tar.gz to the files page as an example. When you enter

[Lift] Re: How forms work (the life cycle of request)

2009-05-11 Thread erik.karls...@iki.fi
Give me a week or some and I think I'll have something that you'll like... basically, you can register a function that's called when stuff is added to the function table... and there'll be a why associated with the adding. When you're running in test mode, you can intercept the functions and

[Lift] Re: Strange Comet Behavior

2009-05-11 Thread David Pollak
You didn't include the code... :-( On Mon, May 11, 2009 at 12:18 PM, Bryan germ...@gmail.com wrote: This could be a result of my strange usage of comet actors, but I'm getting incosistent comet behavior. When run in windows + jetty I have no problems. In linux + jetty, subsequent requests

[Lift] Re: Strange Comet Behavior

2009-05-11 Thread Bryan.
I posted this message through the Google Groups interface and was forced to upload to http://groups.google.com/group/liftweb/files?hl=en. Sorry about the confusion. --Bryan On May 11, 4:01 pm, David Pollak feeder.of.the.be...@gmail.com wrote: You didn't include the code... :-( On Mon, May

[Lift] Lift and interoperability

2009-05-11 Thread glenn
Just some observations from a struggling lift user... Yes, I see it's utility in delivering dynamic html to the browser. But in today's world of rapidly evolving technologies for mashups and flex- like richness and gadgetization, interoperability is the key to adoption in the enterprise. It's

[Lift] Re: Lift and interoperability

2009-05-11 Thread David Pollak
On Mon, May 11, 2009 at 1:06 PM, glenn gl...@exmbly.com wrote: Just some observations from a struggling lift user... Yes, I see it's utility in delivering dynamic html to the browser. But in today's world of rapidly evolving technologies for mashups and flex- like richness and

[Lift] Re: Lift and interoperability

2009-05-11 Thread Alex Boisvert
Hi Glenn, I don't understand where you're coming from either... I've integrated Lift with a different persistence layer (home-grown), another authentication system (Tempo RBAC), integrated it with existing Java libraries and Spring MVC components without trouble. So far, I haven't run into a

[Lift] Re: Lift and interoperability

2009-05-11 Thread Timothy Perrett
Could agree more with Alex - I too have done some pretty sophisticated integrations with 3rd party systems and at every stage I found the life-cycle hooks into lift very rich and completely empowering. Cheers, Tim On May 11, 11:31 pm, Alex Boisvert boisv...@intalio.com wrote: Hi Glenn, I

[Lift] Re: Confusion about Lift-Core

2009-05-11 Thread Timothy Perrett
Chas - now I see your confusion. One can only imagine by lift core the author of that image means net.liftweb.http... Cheers, Tim On May 11, 7:28 pm, Charles F. Munat c...@munat.com wrote: How would you draw the diagram? Don't be so sure that your learning style isn't mirrored by others...

[Lift] multi-column MappedField

2009-05-11 Thread mgm
I have a legacy table that has a group of 108 columns that are really an int[6][6][3] (apologies for for the Java!). I've started writing a MappedField[Array[Int], O] subclass to represent this, but I'm wondering if the framework really supports a multi-coulmn mapped field? What should the

[Lift] Re: multi-column MappedField

2009-05-11 Thread David Pollak
Please look at the MappedPassword class for an example of a multi-column field. After writing that class and living with the repercussions, I'm not sure it was the best idea in the world... :-) Can you serialize the array and put it in a blob? On Mon, May 11, 2009 at 3:53 PM, mgm

[Lift] Re: immutable bindings

2009-05-11 Thread David Pollak
Oliver, Please create a git branch and go wild on the branch... once you're comfortable with it, please roll the changes into the main branch. Thanks, David On Thu, May 7, 2009 at 6:06 PM, Oliver Lambert olambo...@gmail.com wrote: I've attached a new version of the code. The two major

[Lift] Re: Confusion about Lift-Core

2009-05-11 Thread Charles F. Munat
Yeah. I'm hoping that David comes up with something to show how he views Lift. Then again, I am reminded of the scene in Being John Malkovich where Malkovich follows the tunnel into his own subconscious mind. Being David Pollak? This could be scary... Chas. Timothy Perrett wrote: Chas - now

[Lift] Re: Confusion about Lift-Core

2009-05-11 Thread Timothy Perrett
I have some time this week - mind if I have a go? Touch base with me offline and we'll exchange IM's... Id like to understand what exactly you don't get in order to best explain / diagram it. Cheers, Tim On 12/05/2009 00:47, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, May 11,

[Lift] Re: Unable to run unconference application from lift samples

2009-05-11 Thread David Pollak
I've updated the code. I order for it to work, you have to blow away your RDBMS so that Lift will automatically put content in for you. On Thu, May 7, 2009 at 12:08 PM, glenn gl...@exmbly.com wrote: Thanks for the info. While awaiting these changes, could you advise on the minimum data

[Lift] How does one share application logic across multiple lift applications

2009-05-11 Thread Jonathan Ferguson
We want to encapsulate our application logic as an external dependencies ( library ) , so it can be used by multiple lift applications. The sticking point is how one achieves this when the library needs to perform data access and persistence. The library could use structured types, to decouple

[Lift] Re: Strange Comet Behavior

2009-05-11 Thread Bryan.
Yes, the alerts were there just to illustrate that I am trying to push some JavaScript objects over the wire. In my project code I also have additional methods that will be called on these objects (i.e. sorting, pagination, etc...) that make it faster for the client end if I just use these

[Lift] Re: immutable bindings

2009-05-11 Thread Oliver Lambert
I've created a git branch, cloned it on my machine and built lift - built in 9 minutes with no errors (1 more tick for maven). Will go wild soon. On Tue, May 12, 2009 at 9:26 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Oliver, Please create a git branch and go wild on the branch...

[Lift] Re: Lift and interoperability

2009-05-11 Thread Meredith Gregory
Glen, i've done some really hare-brained integrations -- like chaining the Lift filter with the Jersey filter -- and a bunch of other stuff. Between Lift's architecture and Scala's brilliant interop with Java, it's definitely my weapon of choice for integration projects. That said, i would