[Lift] How to use SHtml.ajaxCall?

2009-07-23 Thread Lance Zheng
Hi, I try the example Hello Darwin(http://wiki.liftweb.net/index.php/ Hello_Darwin), but ajax form can't work correctly. I try bind submit button: submit - button type=button onclick={ajaxCall($ ('#whoField').attr('value'), updateWho _)._2}{?(send)}/button but IDE tell me the first param of

[Lift] Re: HadoopDB

2009-07-23 Thread Viktor Klang
On Wed, Jul 22, 2009 at 11:52 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Alex, Viktor, i think write semantics could get complicated quickly, actually. However, i was initially responding to the idea that trad business object models don't give way to analytics. Being able to make

[Lift] Re: OSGi support for Lift

2009-07-23 Thread Kjetil Valstadsve
The paxers (in the link above) seem to suggest that a compliant war will work with their WAR watchdog extender bundle, combined with (preferrably) the Pax Web HTTP Service. Has anyone tried this with a Lift app and succeeded? I don't feel like it's quite Spring-time on my projects yet, but if

[Lift] Bug in Darwin

2009-07-23 Thread Dorinel
I'm trying now to run Darwin and I have a problem with second form, it doesn't compile: http://wiki.liftweb.net/index.php/Hello_Darwin#add_form import scala.xml.NodeSeq import net.liftweb.http.S._ import net.liftweb.http.SHtml._ import net.liftweb.util.Helpers._ class HelloForm2 { var who =

[Lift] how to create a dynamic form in lift?

2009-07-23 Thread JanWillem Tulp
Hi community, I was wondering: what is a nice and efficient way to do the following in Lift: I would like to create a form where users can dynamically add fields for a specific type of data. For instance, say I have a form with the fields name, display name and date of birth. Of course, I can

[Lift] Re: OSGi support for Lift

2009-07-23 Thread Heiko Seeberger
If you pack everything into one bundle, this approach will work. But then there is no real benefit from running on OSGi. What we really need is Lift apps made up from several bundles. And that will be still some work ... Heiko 2009/7/23 Kjetil Valstadsve valstad...@gmail.com The paxers (in

[Lift] Re: how to create a dynamic form in lift?

2009-07-23 Thread Timothy Perrett
Hey, Take a read of: http://is.gd/sfyT Does that help understanding how you can use bind with forms? Cheers, Tim On 23/07/2009 08:34, JanWillem Tulp janwillem.t...@gmail.com wrote: Hi community, I was wondering: what is a nice and efficient way to do the following in Lift: I would

[Lift] Re: how to create a dynamic form in lift?

2009-07-23 Thread marius d.
There are several ways of doing it: 1. Use JSONForm (http://wiki.liftweb.net/index.php/ HowTo_use_JSON_forms) in conjunction with JSONHandler and create new Input fields purely from JavaScript and adhere to your own naming conversion. 2. Before submitting the form start an Ajax request to add a

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

2009-07-23 Thread Jon Kleiser
Hi, I just tried to run the todo app. (http://liftweb.net/docs/getting_started/mod_master.html) against our Oracle (10something) database. The two tables got created like this: INFO - CREATE TABLE users (id ROWID , firstname VARCHAR(32) , lastname VARCHAR(32) , email VARCHAR(48) , locale

[Lift] Re: Bug in Darwin

2009-07-23 Thread Dorinel
I've been able to compile this example by changing: submit - submit(?(Send), ignore = {println(value: + who + :: + param(whoField))}), to submit - submit(?(Send), () = {println(value: + who + :: + param(whoField))}), --~--~-~--~~~---~--~~ You received

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

2009-07-23 Thread Timothy Perrett
Hey Jon, Sounds like Mapper is not quite sure what to do with one of the types it created - If memory serves Derek is looking after the DB drivers these days (the fellow who wrote oracle driver isn't active anymore), so my advice would be log a issue here so that it doesn't get missed:

[Lift] Re: How to use SHtml.ajaxCall?

2009-07-23 Thread Lance Zheng
thank u, that works for me. On Jul 23, 2:59 pm, marius d. marius.dan...@gmail.com wrote: Try: button type=button onclick={ajaxCall(JsRaw($('#whoField').attr ('value')), updateWho _)._2}{?(send)}/button or import net.liftweb.js.jquery._ import JqJE._ button type=button

[Lift] Re: Bug in Darwin

2009-07-23 Thread Dorinel
But I've stubled upon another bug when tried to implement the form with Ajax: import scala.xml.NodeSeq import net.liftweb.http.S._ import net.liftweb.http.SHtml._ import net.liftweb.util.Helpers._ import net.liftweb.http.js.{JsCmd, JsCmds} class HelloFormAjax { def whoNode(str: String) =

[Lift] Re: Bug in Darwin

2009-07-23 Thread Lance Zheng
haha, see my post here https://groups.google.com/group/liftweb/browse_thread/thread/3a84814431e7ff94 submit - button type=button onclick={ajaxCall(JsRaw($ ('#whoField').attr ('value')), updateWho _)._2}{?(send)}/button and submit - button type=button onclick={ajaxCall(JqId(Str (whoField))

[Lift] Re: how to create a dynamic form in lift?

2009-07-23 Thread Naftoli Gugenheim
You don't need javascript. Just use submit buttons for add field etc. actions. If you need relationships to be kept track of but not actually created, store the delta in your StatefulSnippet -- current, added, and removed children lists; then display a list of actual items by concatening

[Lift] Re: Bug in Darwin

2009-07-23 Thread Dorinel
Lance, my problem is that it doesn't compile when I try mvn jetty:run there is a compile error. On Jul 23, 5:04 pm, Lance Zheng lanc...@gmail.com wrote: haha, see my post herehttps://groups.google.com/group/liftweb/browse_thread/thread/3a848144... submit - button type=button

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

2009-07-23 Thread Jon
I've now logged it as an issue. /Jon --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to

[Lift] Re: How to use SHtml.ajaxCall?

2009-07-23 Thread Dorinel
marius d. wrote: Try: button type=button onclick={ajaxCall(JsRaw($('#whoField').attr ('value')), updateWho _)._2}{?(send)}/button This still is not working for me, it's what I get: use java command with args in file forced : false

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

2009-07-23 Thread Derek Chen-Becker
Based on this line: oracle.jdbc.driver. OraclePreparedStatement.setObject(OraclePreparedStatement.java:9316) I have a feeling that we're handing an Object to the driver that doesn't map correctly to the type of the column. For instance, we could be handing a Long to something with type DOUBLE.

[Lift] Re: How to use SHtml.ajaxCall?

2009-07-23 Thread Timothy Perrett
Couldn't agree more, just gist it... http://gist.github.com/ Cheers, Tim On 23/07/2009 16:09, Lance Zheng lanc...@gmail.com wrote: (google group is not a good place to show code, no syntax highlight) --~--~-~--~~~---~--~~ You received this message because

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

2009-07-23 Thread Jon
I'm using Lift 1.0. /Jon On Jul 23, 5:08 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Based on this line: oracle.jdbc.driver. OraclePreparedStatement.setObject(OraclePreparedStatement.java:9316) I have a feeling that we're handing an Object to the driver that doesn't map correctly

[Lift] SQL dumping in log?

2009-07-23 Thread Jon
Hi, Is it possible to dump/log all SQL statements going to the database, so that one can see all the SELECTs, INSERTs etc.? /Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group,

[Lift] Re: HadoopDB

2009-07-23 Thread Meredith Gregory
Viktor, Yes. For example, in the biotech case the data is coming in from a device-based origin. Best wishes, --greg On Thu, Jul 23, 2009 at 2:35 AM, Viktor Klang viktor.kl...@gmail.comwrote: On Wed, Jul 22, 2009 at 11:52 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Alex,

[Lift] Re: SQL dumping in log?

2009-07-23 Thread Jeppe Nejsum Madsen
Jon jon.klei...@usit.uio.no writes: Hi, Is it possible to dump/log all SQL statements going to the database, so that one can see all the SELECTs, INSERTs etc.? Look into DB.addLogFunc /Jeppe --~--~-~--~~~---~--~~ You received this message because you are

[Lift] Re: HadoopDB

2009-07-23 Thread Viktor Klang
On Thu, Jul 23, 2009 at 6:46 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Viktor, Yes. For example, in the biotech case the data is coming in from a device-based origin. This is interesting. Analyzing the AST of the query for the data, then identify the different data sources and

[Lift] Re: HadoopDB

2009-07-23 Thread Meredith Gregory
Viktor, Yep. Best wishes, --greg On Thu, Jul 23, 2009 at 10:08 AM, Viktor Klang viktor.kl...@gmail.comwrote: On Thu, Jul 23, 2009 at 6:46 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, Yes. For example, in the biotech case the data is coming in from a device-based

[Lift] Re: How to use SHtml.ajaxCall?

2009-07-23 Thread marius d.
Oops typo: import net.liftweb.js.jquery._ should be import net.liftweb.http.js.jquery._ I just wrote the code in the mail (no IDE) to highlight the concept not necessarily copy-paste-able :) Br's, Marius On Jul 23, 5:29 pm, Dorinel dorinel.munte...@gmail.com wrote: marius d. wrote:

[Lift] Re: how to create a dynamic form in lift?

2009-07-23 Thread JanWillem Tulp
Thanks all for your helpful replies. Timothy, your blog post is very helpful. It definitely gives me a better understanding of dynamic binding! Thanks! On Jul 23, 4:39 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You don't need javascript. Just use submit buttons for add field etc.

[Lift] Re: SQL dumping in log?

2009-07-23 Thread marius d.
I'm not sure if that logs the statements with the actual values. Does it ? Br's, Marius On Jul 23, 7:48 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Jon jon.klei...@usit.uio.no writes: Hi, Is it possible to dump/log all SQL statements going to the database, so that one can see all

[Lift] Re: SQL dumping in log?

2009-07-23 Thread Jeppe Nejsum Madsen
marius d. marius.dan...@gmail.com writes: I'm not sure if that logs the statements with the actual values. Does it ? Strange, just tried it because I definitely remember seeing values being logged, but turns out not all statements have values logged and it seem just queries are logged.

[Lift] Re: SQL dumping in log?

2009-07-23 Thread Jon
On Jul 23, 8:56 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: marius d. marius.dan...@gmail.com writes: I'm not sure if that logs the statements with the actual values. Does it ? Strange, just tried it because I definitely remember seeing values being logged, but turns out not all

[Lift] Re: SQL dumping in log?

2009-07-23 Thread marius d.
Looking a the code looks to me that the query is just a toString call for a Statement reference which won't yield what we'd expect. Just spoke with Derek about this. He'll take a look on it and eventually add this support soon enough. Br's, Marius On Jul 23, 10:01 pm, Jon

[Lift] Re: how to create a dynamic form in lift?

2009-07-23 Thread marius d.
Naftoli, take a look on JsonForm JsonHandler. It provides is A WAY of allowing adding arbitrary fields to a form and process it on server side in any way desired. Why? ... because with this mechanism you don't need Lift's functions binding and inherently field naming generation. My notes are NOT

[Lift] Re: how to create a dynamic form in lift?

2009-07-23 Thread Naftoli Gugenheim
I guess we understood his question differently. I certainly didn't mean to invalidate your approach.I was only using mapper as an example. My main point was that the form could change dynamically without using javascript as long as the page is reloaded every time you click add field. I am doing

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

2009-07-23 Thread Derek Chen-Becker
OK, I think that this is happening because when we use the JDBC setObject call, we explicitly send the type. As far as I can tell the Oracle driver doesn't like java.sql.Types.BOOLEAN *at all*, so I'm trying to determine the best way to compensate. I'm not sure how common something like this might

[Lift] Re: SQL dumping in log?

2009-07-23 Thread Derek Chen-Becker
Well, I'm looking at the code in DB and what we may have to do is write wrappers for Statement and PreparedStatement that would allow us to do the logging. The functions in DB mostly take user-provided functions like PreparedStatement ⇒ T, so there's no way to get at the parameters that are being

[Lift] Re: SQL dumping in log?

2009-07-23 Thread Derek Chen-Becker
Well, that was quick. After a few minutes of searching, I found this: http://code.google.com/p/log4jdbc/ This seems like a much cleaner way to do the logging than to hook it into Lift directly. Thoughts? Derek On Thu, Jul 23, 2009 at 2:33 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

[Lift] Spelling error?

2009-07-23 Thread Naftoli Gugenheim
HttpResponse.scala:279 override def toString=StreamingResponse( steaming_data , +headers+, +cookies+, +code+) Should that be streaming with an r? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] Re: Spelling error?

2009-07-23 Thread Derek Chen-Becker
Most likely, but I wonder how that could have possibly compiled. I just built all of Lift earlier this morning after a minor mod and it didn't complain. Is that misspelled in multiple places? Derek On Thu, Jul 23, 2009 at 2:42 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:

[Lift] Re: SQL dumping in log?

2009-07-23 Thread Jeppe Nejsum Madsen
Jon jon.klei...@usit.uio.no writes: On Jul 23, 8:56 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: marius d. marius.dan...@gmail.com writes: I'm not sure if that logs the statements with the actual values. Does it ? Strange, just tried it because I definitely remember seeing values

[Lift] Re: Spelling error?

2009-07-23 Thread Ross Mellgren
It's in a string constant. -Ross On Jul 23, 2009, at 5:54 PM, Derek Chen-Becker wrote: Most likely, but I wonder how that could have possibly compiled. I just built all of Lift earlier this morning after a minor mod and it didn't complain. Is that misspelled in multiple places? Derek

[Lift] Re: Do 1.1 milestones get announced on the mailing list ?

2009-07-23 Thread David Pollak
We have not been announcing the milestone releases. By and large, the milestones have been uneventful and the trunk-head snapshot is the place to be. But, we can start announcing them as we spin them. On Thu, Jul 23, 2009 at 4:09 PM, Jonathan Ferguson j...@spiralarm.comwrote: I was wondering

[Lift] Re: Spelling error?

2009-07-23 Thread David Pollak
On Thu, Jul 23, 2009 at 3:02 PM, Ross Mellgren dri...@gmail.com wrote: It's in a string constant. It's a string constant because the data is streamed in from an IO source... trying to load the data would defeat the purpose. I'll fix the string type-o. -Ross On Jul 23, 2009, at 5:54 PM,

[Lift] Do 1.1 milestones get announced on the mailing list ?

2009-07-23 Thread Jonathan Ferguson
I was wondering how often they are released? I noticed Milestone 3 is out and was thinking of switching to that rather than the snapshots as if I build without -o using snapshots I seem to download the dependencies about 6 times per module, which is a little annoying. Cheers Jono

Re: Lift + Scala 2.8 (Was: Re: [Lift] Re: Is there any eclipse setup that actually works for lift?)

2009-07-23 Thread Naftoli Gugenheim
Any update on this? On Mon, Jun 22, 2009 at 10:55 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Jun 22, 2009 at 7:51 PM, Jorge Ortiz jorge.or...@gmail.comwrote: I just spent all afternoon trying to get stuff to compile with Scala 2.8. Since Lift depends on Specs, and