[Lift] Two concerns about Lift

2009-08-12 Thread Yuan
I am new to Lift. I like it lot. I have great respects to the members of this open source project, specifically the committers. I want to contribute some effort to this warm community. Here I want to share my two concerns about Lift; (I know most of people in this group have way better web

[Lift] Re: Two concerns about Lift

2009-08-12 Thread Naftoli Gugenheim
Lift is not strictly MVC. Snippets are a very powerful feature but they are also very flexible. How you design your application is up to you. Lift also supports many response types. Are you asking for a JSON version of the snippet system? What exactly would you like to see and don't?

[Lift] Re: Two concerns about Lift

2009-08-12 Thread marius d.
On Aug 12, 9:12 am, Yuan yuan.w0...@gmail.com wrote: I am new to Lift. I like it lot. I have great respects to the members of this open source project, specifically the committers. I want to contribute some effort to this warm community. Here I want to share my two concerns about Lift; (I

[Lift] how to wtite scala code in dynamic table

2009-08-12 Thread pravin
Hi , i going to populate dynamic table contains. but i want to do some validation before dispaly how can i do this ... e.g .. i have one snippet with one method abc(){ ... td width=45% valign=topp class=bedSleepHeader CellNo : { emp.CellNo} ,Name :{emp.Name} ,/p br/br /td /// suppose if

[Lift] Re: how do you initialise a MappedLongForeignKey object?

2009-08-12 Thread george
I add the address to the user user.address(a) later on the user gets saved the address is inserted in the address table but in the user table, the address id is NULL On Aug 11, 11:36 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: What do you mean?

[Lift] Re: javascript error in embed.js

2009-08-12 Thread David Persons
Thank you very much David, works great now. I accidentally asked the question in the Lift group instead of the Wave user group. Glad I did :-) grtz On Aug 12, 2:12 am, David Pollak feeder.of.the.be...@gmail.com wrote: Google is not honoring XHTML. To serve the pages as text/html:

[Lift] Re: how to wtite scala code in dynamic table

2009-08-12 Thread Timothy Perrett
Pravin, Checkout my example here: http://is.gd/sfyT - the key point your looking for is chooseTemplate; you can have two NodeSeq, one with a Nothing to display type message if there is no content, and one with the content if it exists. Does that help? Cheers, Tim On Aug 12, 7:54 am, pravin

[Lift] Re: how do you initialise a MappedLongForeignKey object?

2009-08-12 Thread Naftoli Gugenheim
You have to mix it in to each foreign key field, i.e., User.address and Address.user. Or only have one field, e.g., User.address, and a method on Address that finds the user that references it (but it will only work once they're saved). -

[Lift] Re: foreign key reference that will never be null

2009-08-12 Thread Derek Chen-Becker
I think that having control over nullability would be great, although in this case we would have to make a separate MappedLongNotNullForeignKey trait or something like it, since you can't arbitrarily change the return type on the method from Box to T. Derek On Tue, Aug 11, 2009 at 6:12 PM,

[Lift] Re: bind with outer element?

2009-08-12 Thread jon
Hi, I actually solved by wrapping the node i cared about in another node, but tried the FuncBindParam and it does seem to only grab the child nodes. On Aug 11, 11:37 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Doesn't the FuncBindParam only get the element's child NodeSeq?

[Lift] Re: ajaxForm with mapped function

2009-08-12 Thread jon
Thanks Dave, I explored both of those routes. The hidden field would allow me to execute on the server, but not send back JS to execute on the client. The ajaxButton would allow me to execute code on the client, but not submit the form (unless I put the form serialize code in the button?). I

[Lift] Re: ajaxForm with mapped function

2009-08-12 Thread David Pollak
On Wed, Aug 12, 2009 at 8:14 AM, jon jonhoff...@gmail.com wrote: Thanks Dave, I explored both of those routes. The hidden field would allow me to execute on the server, but not send back JS to execute on the client. The ajaxButton would allow me to execute code on the client, but not

[Lift] Re: bind with outer element?

2009-08-12 Thread Ross Mellgren
BindHelpers.currentNode is a Box[NodeSeq] that gives you the node that bind is currently replacing. -Ross On Aug 12, 2009, at 11:02 AM, jon wrote: Hi, I actually solved by wrapping the node i cared about in another node, but tried the FuncBindParam and it does seem to only grab the

[Lift] h2 web console

2009-08-12 Thread jon
Hi, For those using h2, you can make a call to the following function from boot to start up a web console while you're running in development mode: def startH2WebConsole = { if (Props.mode == Props.RunModes.Development) { import _root_.org.h2.server.web.WebServer import

[Lift] Re: ajaxForm with mapped function

2009-08-12 Thread jon
That is surprising... revised function: def ajaxForm(body: NodeSeq,func: ()=JsCmd) = { SHtml.ajaxForm(body ++ SHtml.hidden(func)) } very cool! thanks, - jon On Aug 12, 11:51 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Aug 12, 2009 at 8:14 AM, jon

[Lift] Re: bind with outer element?

2009-08-12 Thread jon
Thanks Ross! that works. On Aug 12, 1:59 pm, Ross Mellgren dri...@gmail.com wrote: BindHelpers.currentNode is a Box[NodeSeq] that gives you the node that   bind is currently replacing. -Ross On Aug 12, 2009, at 11:02 AM, jon wrote: Hi, I actually solved by wrapping the node i

[Lift] Re: bind with outer element?

2009-08-12 Thread David Pollak
On Wed, Aug 12, 2009 at 11:31 AM, jon jonhoff...@gmail.com wrote: Thanks Ross! that works. +1 On Aug 12, 1:59 pm, Ross Mellgren dri...@gmail.com wrote: BindHelpers.currentNode is a Box[NodeSeq] that gives you the node that bind is currently replacing. -Ross On Aug 12, 2009,

[Lift] Re: More problems with CRUDify and SessionVars

2009-08-12 Thread David Pollak
On Mon, Aug 10, 2009 at 9:07 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: David Pollak feeder.of.the.be...@gmail.com writes: (1) Don't use open_! unless you have a very, very, very good reason to do so. It defeats the purpose of Box. I'm aware of this. But in this situation, most Locs

[Lift] Re: h2 web console

2009-08-12 Thread Tim Nelson
That actually starts up a webserver that serves the H2 console servlet. Alternatively, you can just use the servlet inside your existing app, without having to start a separate web server. http://gist.github.com/19 Also, if you're using H2, you might want to try their built-in connection

[Lift] Re: Need to be able to add a css class to a form input type if field error - how?

2009-08-12 Thread David Pollak
In your snippet: import scala.xml.Null SHtml.text(value, value = _) % (if (errorCondition) (class - error) else Null) On Wed, Aug 12, 2009 at 12:01 PM, Ewan ehar...@gmail.com wrote: Guys When a form field/input type is in error I would like to set the css class to something like error so

[Lift] TableEditor article

2009-08-12 Thread Naftoli Gugenheim
I just wrote a brief wiki article on GitHub about using TableEditor, but not being familiar with the formatting syntax, the code snippets are truncated. Can anyone take a look at it and fix it? Thanks. --~--~-~--~~~---~--~~ You received this message because you are

[Lift] Re: TableEditor article

2009-08-12 Thread Naftoli Gugenheim
http://wiki.github.com/dpp/liftweb/example-use-tableeditor-to-manage-simple-lists On Wed, Aug 12, 2009 at 5:48 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I just wrote a brief wiki article on GitHub about using TableEditor, but not being familiar with the formatting syntax, the code

[Lift] Re: TableEditor article

2009-08-12 Thread Naftoli Gugenheim
Apparently some less than/greater than signs aren't being converted into their entity format. On Wed, Aug 12, 2009 at 5:49 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: http://wiki.github.com/dpp/liftweb/example-use-tableeditor-to-manage-simple-lists On Wed, Aug 12, 2009 at 5:48 PM,

[Lift] Re: Need to be able to add a css class to a form input type if field error - how?

2009-08-12 Thread Ewan
Thanks that did the trick - very cool. As a matter of scala I created a method to determine if an error notice had been set (cribbed from the Msg snippet) and would have preferred to pattern match on the list itself rather than its length. How from a scala style point of view could I rewrite

[Lift] Re: Need to be able to add a css class to a form input type if field error - how?

2009-08-12 Thread David Pollak
On Wed, Aug 12, 2009 at 3:04 PM, Ewan ehar...@gmail.com wrote: Thanks that did the trick - very cool. As a matter of scala I created a method to determine if an error notice had been set (cribbed from the Msg snippet) and would have preferred to pattern match on the list itself rather than

[Lift] Re: how do you initialise a MappedLongForeignKey object?

2009-08-12 Thread george
ok. thanks for your help, i'll try out the various options and see what works best for me. On Aug 12, 1:26 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You have to mix it in to each foreign key field, i.e., User.address and Address.user. Or only have one field, e.g., User.address, and a

[Lift] Re: Need to be able to add a css class to a form input type if field error - how?

2009-08-12 Thread Ewan
Doh. Thx again. Keep it simple, keep it simple, keep it simple... On Aug 12, 11:15 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Aug 12, 2009 at 3:04 PM, Ewan ehar...@gmail.com wrote: Thanks that did the trick - very cool.  As a matter of scala I created a method to

[Lift] Re: Need to be able to add a css class to a form input type if field error - how?

2009-08-12 Thread David Pollak
On Wed, Aug 12, 2009 at 3:18 PM, Ewan ehar...@gmail.com wrote: Doh. Thx again. Keep it simple, keep it simple, keep it simple... Yes and when you use the .length method, be very afraid... it's O(n) on a List. On Aug 12, 11:15 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On

[Lift] Re: TableEditor article

2009-08-12 Thread Timothy Perrett
I just fixed the article markup - thanks for writing it up. Cheers, Tim On Aug 12, 10:51 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Apparently some less than/greater than signs aren't being converted into their entity format. On Wed, Aug 12, 2009 at 5:49 PM, Naftoli Gugenheim

[Lift] Re: TableEditor article

2009-08-12 Thread Naftoli Gugenheim
Thanks. What did you have to do to fix the markup? On Wed, Aug 12, 2009 at 6:22 PM, Timothy Perrett timo...@getintheloop.euwrote: I just fixed the article markup - thanks for writing it up. Cheers, Tim On Aug 12, 10:51 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Apparently some

[Lift] Re: TableEditor article

2009-08-12 Thread Timothy Perrett
Just tweaked the spacing mainly - there appear to be some slight oddities with the textile parser. It also doesnt like code with tabs, it prefers spaces. Cheers, Tim On Aug 12, 11:35 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Thanks. What did you have to do to fix the markup? On Wed,

[Lift] Re: Mapper nullability

2009-08-12 Thread Naftoli Gugenheim
I filed an issue: http://github.com/dpp/liftweb/issues/#issue/48There's something wrong with the code formatting. Also for NOT NULL - http://github.com/dpp/liftweb/issues#issue/47 On Tue, Aug 11, 2009 at 2:44 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, Aug 9, 2009 at 6:15

[Lift] Re: todo app., Oracle: Invalid column type

2009-08-12 Thread Derek Chen-Becker
I'm deploying a new version of 1.0.1-SNAPSHOT right now onto scala-tools.org. It should be ready in 30 minutes or so with the fixes for Oracle and PostgreSQL. Derek On Tue, Aug 11, 2009 at 9:40 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Yeah, that's basically how you do it in

[Lift] Please follow good practice when filing defects

2009-08-12 Thread David Pollak
Folks, When you file a defect (or a request a feature), please include a reproducible example... the best way to do this is to clone the http://github.com/dpp/lift_1_1_sample/tree/master project and build a simple app that shows the problem. Also, please include the expected output... even if

[Lift] primeObj

2009-08-12 Thread Naftoli Gugenheim
Why doesn't MappedLongForeignKey.apply(v: O) call primeObj? And why doesn't setting its value directly invalidate the cache? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this

[Lift] Re: primeObj

2009-08-12 Thread David Pollak
On Wed, Aug 12, 2009 at 5:53 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Why doesn't MappedLongForeignKey.apply(v: O) call primeObj? Because the caching is not the default behavior. The priming is for getting the objects precached as part of the query. And why doesn't setting its