[Lift] what is the functionality of fmapFunc

2009-09-02 Thread XiaomingZheng
when i use the SHtml.link, i found lift framework add a magic string after the url, and this string is generated by fmapFunc. What exactly fmapFunc used for and why add this strange string after the url? thanks~~ --~--~-~--~~~---~--~~ You received this message

[Lift] MetaRecord fields

2009-09-02 Thread Andrea Peruffo
Hi all, I'm working on the JCR backend with Giuseppe Fogliazza and I've found that MetaRecord failed to find right fields of a KeyedRecord. It finds three primaryKey fields when the real primaryKey is implmented with an object named name. This is the solution that I've found, in the

[Lift] Re: Dependency Injection in Lift

2009-09-02 Thread Chris Lewis
Jeppe Nejsum Madsen wrote: Chris Lewis burningodzi...@gmail.com writes: Take a payment service example. I start off with PayPal and some months later I switch my processor to CyberSource. I don't want to tie the snippet to a specific processor, so my mind, transposing java, says to write

[Lift] Re: what is the functionality of fmapFunc

2009-09-02 Thread marius d.
This string acts as a function ID. calling SHtml.link you bound a function to be executed when user clicked that link. That strange string is sent back to Lift and Lift will know which function to invoke. fmapFunc facilitates binding user-function. Having this definition def fmapFunc[T](in:

[Lift] how does Lift support pagination in Postgresql?

2009-09-02 Thread surfman
I am wondering how Lift supports pagination in Postgresql? where I may find details for Postgresql support? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

[Lift] Re: Dependency Injection in Lift

2009-09-02 Thread Jeppe Nejsum Madsen
Chris Lewis burningodzi...@gmail.com writes: How can it be tested with different implementations? I change the trait being extended when I run tests, then change back for deployment (that is, change the actual source)? A spring context isn't compiled into the code, so I can simply change

[Lift] Re: Mapper and Primary Keys

2009-09-02 Thread Somindra Bhattacharya
Hi again, I just wanted to mention that I cannot override dbAutogenerated_?. I get the following error: error: method dbAutogenerated_? overrides nothing override def dbAutogenerated_? = false Looks to me that I am not using the latest framework code. How do I verify this? Thanks, Som On

[Lift] Re: Mapper and Primary Keys

2009-09-02 Thread Indrajit Raychaudhuri
Som, 1. Your source code had dbAutoGenerated_?. The actual function is dbAutogenerated_? (g is in lower case). Hope you have the right case for 'g' one :) 2. If your project model (pom.xml) has lift versions set to 1.1- SNAPSHOT, you must be on the master and thus on the latest code. FWIW,

[Lift] Snippet inside of a Snippet

2009-09-02 Thread José María
Hi. I've a snippet in one of my HTML files and inside of it I put another snippet like this: lift:myClass1.func lift:myClass2.func2 Hi /lift:myClass2.func /lift:myClass1.func If I do that I get the error: Error processing snippet myClass2:func2. Reason: Exception During Snippet

[Lift] Re: how does Lift support pagination in Postgresql?

2009-09-02 Thread José María
If you are speaking about offset 10 limit 15 you have: Product.findAll(By(Product.brand, 33), StartAt(10), MaxRows(15)) Best regards. On 2 sep, 14:18, surfman chinasmile...@gmail.com wrote: I am wondering how Lift supports pagination in Postgresql?

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread Ross Mellgren
What does your snippet code look like? It sounds like it's not having trouble with the nested snippet so much as getting at your snippet code. -Ross On Sep 2, 2009, at 12:16 PM, José María wrote: Hi. I've a snippet in one of my HTML files and inside of it I put another snippet like

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread José María
I think that I don't understand the flow, maybe the error appears because PaginaMarca can't instantiate some value (for example val id). Well myClass2 is an invented name, I'll post the real code, but not all (yes I suppose that the problem will be in the no-pasted zone :p ): class PaginaMarca

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread David Pollak
Please post the source for myClass2 On Wed, Sep 2, 2009 at 9:16 AM, José María josemariar...@gmail.com wrote: Hi. I've a snippet in one of my HTML files and inside of it I put another snippet like this: lift:myClass1.func lift:myClass2.func2 Hi /lift:myClass2.func

[Lift] Re: Great advice for startups

2009-09-02 Thread José María
I'd read it too, it's wonderful, I recomended asmartbear to a friend (MBA) and now asmartbear is his new god :) On 1 sep, 15:38, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I read this blog post this

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread David Pollak
On Wed, Sep 2, 2009 at 9:47 AM, José María josemariar...@gmail.com wrote: I think that I don't understand the flow, maybe the error appears because PaginaMarca can't instantiate some value (for example val id). Yep. An exception during instantiation of a snippet will result in: Reason:

[Lift] XML - JSON converter?

2009-09-02 Thread harryh
Is there anything built into lift that will do XML - JSON conversion? For example: foos foo id1/id nameHarry/name /foo foo id2/id nameDavid/name /foo /foos to: { foos: { foo: [{ id: 1, name: Harry }, { id: 2, name: David

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread José María
SOLVED I'd a value that was computed using the val id, I've turned it to def and all works now. As id can't be retrieved from URL parameters this val generated an exception. I think that the error message is a bit misleading :-/ Thanks! On 2 sep, 16:47, José María josemariar...@gmail.com

[Lift] How do you organize/use snippets?

2009-09-02 Thread José María
Hi. I'd a hard time trying to solve a bug in a snippet. The bug appeared when I moved a method from a snippet to other so the code will be more organized. At first I tried to assign snippets to pages, so page Product.html will have a ProductPage snippet. In this snippet I'd values based in

[Lift] Re: Some Comet questions

2009-09-02 Thread Michel Klijn
Everything works fine now, Thank you for the quick fix! On Sep 1, 12:50 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The problem was that JBoss was not returning the correct modified date for the JAR/WAR-based resource.  I've worked around the

[Lift] Re: Syntax Highlighting On Wiki

2009-09-02 Thread Timothy Perrett
+1 this is super and a great addition. How's it going porting content from wiki.liftweb.net? Cheers, Tim On Sep 2, 6:42 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Great stuff!  Please post this to the wiki so it's right there for everyone. On Tue, Sep 1, 2009 at 5:10 PM, Xavi

[Lift] Re: Syntax Highlighting On Wiki

2009-09-02 Thread David Pollak
Great stuff! Please post this to the wiki so it's right there for everyone. On Tue, Sep 1, 2009 at 5:10 PM, Xavi Ramirez xavi@gmail.com wrote: Hello, I've recently discovered how to add syntax highlighting to the wiki (http://wiki.github.com/dpp/liftweb). First, you simply added this

[Lift] Re: Dependency Injection in Lift

2009-09-02 Thread Timothy Perrett
Chris, I read your comments with interest - just to clarify, are you against changing code / would prefer a configuration file? I sort of got that vibe from some of your posts... Personally, im not down with configuration files and prefer code that configures code. Some of the systems i've got

[Lift] Schemify from command line

2009-09-02 Thread Naftoli Gugenheim
Is there some way to set things up to run a maven command that will Schemify? 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

[Lift] Unlinked menu

2009-09-02 Thread Naftoli Gugenheim
How do you have an entry in the sitemap that's a parent to other Locs but doesn't link anywhere? It should display in the menu, but not be hyperlinked. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread José María
On 2 sep, 17:27, David Pollak feeder.of.the.be...@gmail.com wrote: Try: lazy val id = S.param(id).flatMap(Helpers.asLong) openOr -1L I get: Exception occured while processing /marca/162 Message: java.lang.IncompatibleClassChangeError net.liftweb.util.Full.flatMap(Box.scala:332)

[Lift] Re: Dependency Injection in Lift

2009-09-02 Thread Kris Nuttycombe
I think that the following really misses the point of dependency injection: On Wed, Sep 2, 2009 at 11:39 AM, David Pollakfeeder.of.the.be...@gmail.com wrote: Let's say we're running in test mode, in Boot.scala: if (Props.testMode) {   MyAppRules.paymentGateway = () = MockPaymentGateway }

[Lift] Re: Schemify from command line

2009-09-02 Thread Timothy Perrett
You could possibly configure something with scala:run perhaps... check my blog on how to create launchers: http://is.gd/2OhTl Just a thought :-) Cheers, Tim On 2 Sep 2009, at 20:45, Naftoli Gugenheim wrote: Is there some way to set things up to run a maven command that will Schemify?

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread Timothy Perrett
Are you using JavaRebel? Try doing a clean before jetty:run Cheers, Tim On 2 Sep 2009, at 20:57, José María wrote: On 2 sep, 17:27, David Pollak feeder.of.the.be...@gmail.com wrote: Try: lazy val id = S.param(id).flatMap(Helpers.asLong) openOr -1L I get: Exception occured while

[Lift] Re: XML - JSON converter?

2009-09-02 Thread Joni Freeman
Hi, I just quickly spiked this and following works on my local branch: scala val xml = foos foo id1/id nameHarry/name /foo foo id2/id nameDavid/name /foo /foos scala val json = toJson(xml) scala compact(render(json))

[Lift] Re: Dependency Injection in Lift

2009-09-02 Thread David Pollak
On Wed, Sep 2, 2009 at 1:27 PM, Kris Nuttycombe kris.nuttyco...@gmail.comwrote: I think that the following really misses the point of dependency injection: On Wed, Sep 2, 2009 at 11:39 AM, David Pollakfeeder.of.the.be...@gmail.com wrote: Let's say we're running in test mode, in

[Lift] Wizard code in master

2009-09-02 Thread Timothy Perrett
Hey all, Just taking a look through the wizard code... it looks pretty awesome :-) Just so im clear, this is a work in progress / first pass right? Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift

[Lift] Re: Wizard code in master

2009-09-02 Thread David Pollak
On Wed, Sep 2, 2009 at 12:54 PM, Timothy Perrett timo...@getintheloop.euwrote: Hey all, Just taking a look through the wizard code... it looks pretty awesome :-) Just so im clear, this is a work in progress / first pass right? Right now, I think it's vomit in process, but later it will

[Lift] Re: Unlinked menu

2009-09-02 Thread Naftoli Gugenheim
Thanks. Will it still be visible though? - David Pollakfeeder.of.the.be...@gmail.com wrote: Add Loc.PlaceHolder to the Loc params. On Wed, Sep 2, 2009 at 12:18 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: How do you have an entry in the sitemap that's

[Lift] Re: Unlinked menu

2009-09-02 Thread David Pollak
On Wed, Sep 2, 2009 at 5:14 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Thanks. Will it still be visible though? Yes. - David Pollakfeeder.of.the.be...@gmail.com wrote: Add Loc.PlaceHolder to the Loc params. On Wed, Sep 2, 2009 at 12:18 PM,

[Lift] Re: Tiered class factories in Lift

2009-09-02 Thread Ross Mellgren
On Sep 2, 2009, at 7:56 PM, David Pollak wrote: snip Personally, I think that explicitly named functions that vend instances are a much better choice, but if you want to have anonymous instance vendors, here you are. Giving them plenty of rope to hang themselves? ;-) -Ross

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread José María
SOLVED lazy val id = S.param(id).flatMap(Helpers.asLong) openOr -1L I changed it to: lazy val pagina = S.param(numero).openOr(1).toInt Yes, I'm using JavaRebel On 2 sep, 20:58, Timothy Perrett timo...@getintheloop.eu wrote: Are you using JavaRebel? Try doing a clean before jetty:run

[Lift] Re: XML - JSON converter?

2009-09-02 Thread David Pollak
Cool... I'd be interested in you pushing this to master and letting people use it and give feedback. On Wed, Sep 2, 2009 at 2:40 PM, Joni Freeman freeman.j...@gmail.com wrote: Hi, I just quickly spiked this and following works on my local branch: scala val xml = foos foo

[Lift] Re: Unlinked menu

2009-09-02 Thread David Pollak
Add Loc.PlaceHolder to the Loc params. On Wed, Sep 2, 2009 at 12:18 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: How do you have an entry in the sitemap that's a parent to other Locs but doesn't link anywhere? It should display in the menu, but not be hyperlinked. -- Lift, the

[Lift] Tiered class factories in Lift

2009-09-02 Thread David Pollak
Folks, I added about 50 lines of code to Lift to give you most of the functionality of Guice (except autodiscovery via annotations.) Two basic traits: trait Injector { implicit def inject[T](implicit man: Manifest[T]): Box[T] } trait SimpleInjector extends Injector { private val diHash:

[Lift] Re: How do you organize/use snippets?

2009-09-02 Thread David Pollak
Organize functionality into traits. So, you can have your ProductId trait that contains logic to extract the product id from the params and then compose your traits together into a concrete class. trait ProductId { lazy val id = S.param(id).flatMap(Helpers.asLong) openOr -1L } class MySnippet

[Lift] Mapper subclasses

2009-09-02 Thread Naftoli Gugenheim
In general, I find that Mapper doesn't seem to like being used in scenarios that require a class hierarchy. For example, if I need to store many kinds of Fields, but some Fields have different data than others, it would be nice to have an abstract base mapper that defines most of the fields,

[Lift] Re: Mapper subclasses

2009-09-02 Thread harryh
I've been handling this with traits, for example I have something like so: trait Timestamp[MapperType : Mapper[MapperType]] { object xdatetime extends MappedDateTime[MapperType](this.asInstanceOf [MapperType]) // all sorts of utility functions for dealing with timestamps } Then I can do

[Lift] Re: Snippet inside of a Snippet

2009-09-02 Thread David Pollak
On Wed, Sep 2, 2009 at 3:55 PM, José María josemariar...@gmail.com wrote: SOLVED lazy val id = S.param(id).flatMap(Helpers.asLong) openOr -1L I changed it to: lazy val pagina = S.param(numero).openOr(1).toInt This is a bad pattern. It will lead to an exception is the parameter numero

Fwd: [Lift] Re: Dependency Injection in Lift

2009-09-02 Thread Kris Nuttycombe
On Wed, Sep 2, 2009 at 4:30 PM, David Pollakfeeder.of.the.be...@gmail.com wrote: On Wed, Sep 2, 2009 at 1:27 PM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: I think that the following really misses the point of dependency injection: On Wed, Sep 2, 2009 at 11:39 AM, David

[Lift] Re: Dependency Injection in Lift

2009-09-02 Thread Chris Lewis
Timothy Perrett wrote: Chris, I read your comments with interest - just to clarify, are you against changing code / would prefer a configuration file? I sort of got that vibe from some of your posts... Personally, im not down with configuration files and prefer code that configures code.

[Lift] Re: Mapper subclasses

2009-09-02 Thread Naftoli Gugenheim
So I guess you can't escape the asInstanceOf. Can you successfully give the trait a self-type of this: MapperType =, or declare it to extend Mapper[MapperType], without running into problems elsewhere? - harryhhar...@gmail.com wrote: I've been handling