[Lift] Dynamic form building powered by XML

2008-09-17 Thread Tim Perrett
Guys, Just been noodling a few things and one of them was how to create a process (kind of like Step 1, Step 2 etc) that can be variable? Some times I might have 2 steps, other times X number of steps. System wise, my thought was to have some kind of XML data-source that would possibly look

[Lift] Re: Dynamic form building powered by XML

2008-09-17 Thread David Pollak
You mean something like: https://www.lostlake.org/wizard.wmv On Wed, Sep 17, 2008 at 9:57 AM, Tim Perrett [EMAIL PROTECTED] wrote: Guys, Just been noodling a few things and one of them was how to create a process (kind of like Step 1, Step 2 etc) that can be variable? Some times I might

[Lift] Re: Dynamic form building powered by XML

2008-09-17 Thread Tim Perrett
Yeah sure - thats the kind of functionality im after. Perhaps not quite so involved with java in xml, but sure, the variable screens and validations are what i'm trying to achieve for sure. Am I crazy / re-inventing the wheel to want to do something like this with lift? Cheers Tim On Sep 17,

[Lift] Re: Dynamic form building powered by XML

2008-09-17 Thread Tim Perrett
I was one of the folks who designed and built SmartMode back in 2000/2001.  SiteMap in Lift is substantially what we built in SmartMode (but in SmartMode, we needed XML files rather than a DSL.) Wow, awesome. SiteMap is easily the dark horse of lift :-) When you say SiteMap in Lift is

[Lift] JPA demo overwrites attributes

2008-09-17 Thread Charles F. Munat
I'm trying to figure out the JPA demo by extending it to permit login. To this end, I added three attributes to the User model: validationCode, passwordHash, and passwordSalt: class User { @Id @GeneratedValue{val strategy = GenerationType.AUTO} var id : Long = _ var nameLast :

[Lift] Re: JPA demo overwrites attributes

2008-09-17 Thread Derek Chen-Becker
What I do in my code is add a member object to the session to indicate whether it's logged in: object currentUserObjVar extends SessionVar[Can[Member]](Empty) def currentUserObj = currentUserObjVar.is def currentUsername = currentUserObj map {_.userId} openOr Not logged in def

[Lift] Re: Deprecations / compilation failure on 0.10-SNAPSHOT

2008-09-17 Thread David Pollak
Kris, Jorge changed bind to accept the - stuff... please provide stand-along examples of -- working and - failing so he can do what he needs to do to fix up the code. Thanks, David On Wed, Sep 17, 2008 at 2:53 PM, Kris Nuttycombe [EMAIL PROTECTED]wrote: Hi, all, I noticed this in the

[Lift] Re: Deprecations / compilation failure on 0.10-SNAPSHOT

2008-09-17 Thread Jorge Ortiz
Kris, There were no changes to the 'bind' function. What changed was the way in which BindParams (which bind takes as arguments) are generated. The deprecated code for generating BindParams (using --) is on lines 123-156 of BindHelpers.scala The new code for generating BindParams (using -) is

[Lift] Re: Deprecations / compilation failure on 0.10-SNAPSHOT

2008-09-17 Thread Derek Chen-Becker
I stand corrected :) On Wed, Sep 17, 2008 at 4:07 PM, Jorge Ortiz [EMAIL PROTECTED] wrote: Kris, There were no changes to the 'bind' function. What changed was the way in which BindParams (which bind takes as arguments) are generated. The deprecated code for generating BindParams (using

[Lift] Re: Further adventures in Webservices, or where do you hookup the dispatch function?

2008-09-17 Thread David Pollak
In your bootstrap/liftweb/Boot.scala file, put the following line: LiftRules.addDispatchAfter(RestAPI.dispatch) That'll hook things into the Lift HTTP handling mechanism. Alan Mortensen wrote: I finally got to the point where the code hits the compiler and I've hit a snag. Where do you put

[Lift] Re: JPA demo overwrites attributes

2008-09-17 Thread Charles F. Munat
Derek, This is really helpful. That said, it doesn't answer the question I had, which was about not overwriting fields on a merge. Do you have any ideas on that? Also, where are you putting the code below? I'd like to play around with it. Finally, can you post your latest code for the

[Lift] bind and enumerations

2008-09-17 Thread Charles F. Munat
I'm using an enumeration for Gender: @serializable object Gender extends Enumeration { type Gender = Value val Male, Female = Value } import Gender._ How do I use this in bind? And is there an easy way to create a drop down list with blank, Male, and Female options? Thanks! Chas.

[Lift] Re: bind and enumerations

2008-09-17 Thread David Pollak
var g: Can[Gender] = Empty SHtml.selectObj(Gender.elements.toList.map(v = (v, v.toString)), g, v = g = Full(v)) On Wed, Sep 17, 2008 at 7:33 PM, Charles F. Munat [EMAIL PROTECTED] wrote: I'm using an enumeration for Gender: @serializable object Gender extends Enumeration { type Gender

[Lift] Re: bind and enumerations

2008-09-17 Thread Charles F. Munat
And it gives me: error: missing parameter type gender - SHtml.selectObj(Gender.elements.toList.map(v = (v, v.toString)), g, v = g = Full(v)), ^ :-( Oliver wrote: When I saw this answer, I was really hoping it would work. Unfortunately,

[Lift] Slightly newer version of JPA demo code

2008-09-17 Thread Derek Chen-Becker
See attached. Some minor tweaks. The biggest change was the refactoring and addition of some of the value-add methods on ScalaEntityManager. Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post