[Lift] Re: Creating calculated fields in mapper

2009-10-19 Thread Jeppe Nejsum Madsen
On Thu, Oct 15, 2009 at 9:14 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Have you made any progress? Sorry for the late reply. No, I've been sidetracked, but hope to look into it this week /Jeppe --~--~-~--~~~---~--~~ You received this message

[Lift] Why the liftweb doesn't use mysql as the default database ?

2009-10-19 Thread Neil.Lv
Hi all, Why the liftweb doesn't use MySQL as the default database ? Thanks very much ! Cheers, Neil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

[Lift] Re: Why the liftweb doesn't use mysql as the default database ?

2009-10-19 Thread Timothy Perrett
Because MySQL is not embedable - with derby its a true out of the box experience. Switching to mysql is easy and in the examples... Cheers, Tim On 19 Oct 2009, at 09:10, Neil.Lv wrote: Hi all, Why the liftweb doesn't use MySQL as the default database ? Thanks very much ! Cheers,

[Lift] Re: Why the liftweb doesn't use mysql as the default database ?

2009-10-19 Thread Margaret
GPL - mawei...@gmail.com 13585201588 http://maweis.com On Mon, Oct 19, 2009 at 4:10 PM, Neil.Lv anim...@gmail.com wrote: Hi all,   Why the liftweb doesn't use MySQL as the default database ?   Thanks very much ! Cheers,  Neil

[Lift] Re: Why the liftweb doesn't use mysql as the default database ?

2009-10-19 Thread opyate
Hi Neil, Lift as a web framework is agnostic of the underlying database type. That allows you, the developer, to choose which database type to use, e.g. PostgresQL (far superior ;-) or even Oracle, MSSQL. Thanks, Juan On Oct 19, 9:10 am, Neil.Lv anim...@gmail.com wrote: Hi all,    Why the

[Lift] reverse-Schemifier: generating BaseMapper instances from schema/SQL/JPA

2009-10-19 Thread opyate
Hello Lifters, Related: http://groups.google.com/group/liftweb/browse_thread/thread/20051762b58f0083/b3329f33e8f3dc73?lnk=gstq=existing+database#b3329f33e8f3dc73 I would like to generate (at run-time) BaseMapper instances of a schema. I know I can generate the JPA beans from a schema (using

[Lift] Re: Why the liftweb doesn't use mysql as the default database ?

2009-10-19 Thread Viktor Klang
Hi Neil, I'd also like to add that MySQL is GPL. On Mon, Oct 19, 2009 at 10:10 AM, Neil.Lv anim...@gmail.com wrote: Hi all, Why the liftweb doesn't use MySQL as the default database ? Thanks very much ! Cheers, Neil -- Viktor Klang Blog: klangism.blogspot.com Twttr:

[Lift] Re: Including the class name in the JSON field

2009-10-19 Thread Joni Freeman
Added a way to change how 'type hints' are processed. The default is NoTypeHints which will never output 'jsonClass' field. Then there's ShortTypeHints and FullTypeHints. implicit val formats = Serialization.formats(ShortTypeHints(classOf [Fish] :: classOf[Dog] :: Nil)) - { jsonClass:Fish, ...

[Lift] Re: Nested 'react'

2009-10-19 Thread Philipp
so when I'm running load test I see that number of threads that used by dispatcher is growing (so far up to 200) and performance is going down. Most of them are always in blocked state Dispatcher's Actor queue never should be more that few messages as I'm using QoS = 5 on channel and sending

[Lift] Re: edit: What happened to JsonCmd?

2009-10-19 Thread Chris
So I'm all fixed now wrt JsonCmd's new location. I noticed that this change isn't documented on the github wiki. Is there a process for doing that, or can I just edit the page? Thanks On Oct 15, 8:16 pm, Ross Mellgren dri...@gmail.com wrote: The class file names in the jar are determined by

[Lift] Re: edit: What happened to JsonCmd?

2009-10-19 Thread David Pollak
On Mon, Oct 19, 2009 at 9:04 AM, Chris coldfusio...@gmail.com wrote: So I'm all fixed now wrt JsonCmd's new location. I noticed that this change isn't documented on the github wiki. Is there a process for doing that, or can I just edit the page? You can edit the page Thanks On Oct

[Lift] Re: Why the liftweb doesn't use mysql as the default database ?

2009-10-19 Thread David Pollak
On Mon, Oct 19, 2009 at 1:10 AM, Neil.Lv anim...@gmail.com wrote: Hi all, Why the liftweb doesn't use MySQL as the default database ? In addition to the reasons listed in this thread (most importantly, Lift default apps just work with just Java and Maven installed), I recommend against

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread rstradling
Take my input or vote of confidence with a grain of salt... I had to use java.util.Calendar recently and noticed some of the issues with it that you mention. For my case, I created a light wrapper for my use of java.util.Calendar that redefined the relevant statics (Monday, Tuesday, etc) as

[Lift] javascript with an ajaxbutton

2009-10-19 Thread caw1461
I figured this was a simple problem, but have spent way too much time on this issue. $.saveFunc = function() { saveT(); }; function saveT () { print(save function executing) tinyMCE.activeEditor.save() print(save completed) }; button id=Save

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Jim Barrows
I've been thinking a lot about the issue of backwards compatibility, and the trade off with good architecture. I've come to the conclusion that the only real answer is that you have to take each instance on a case by case basis and ask yourself this question: Do you want to write a thunking layer

[Lift] maintaining logged in user longer outside of SessionVar

2009-10-19 Thread harryh
I want users to stay logged into my site for extended periods of time (through server restarts, and browser restarts). By default Lift stores a User in a SessionVar so this doesn't get me there. I've configured jetty so the session cookie doesn't time out for 30 days, and I have a database

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread Ross Mellgren
Why not use a SessionVar that initializes from the database? object myVar extends SessionVar[MyObj] (loadValueFromDatabaseOrMakeANewOne) -Ross On Oct 19, 2009, at 2:12 PM, harryh wrote: I want users to stay logged into my site for extended periods of time (through server restarts, and

[Lift] Re: javascript with an ajaxbutton

2009-10-19 Thread Marius
I think you can simply return JsRaw($.saveFunc();) without using JsRaw($.saveFunc();).cmd Do you see any errors in the browser? ... try using firebug addon in firefox and see if it complains about anything. What does saveClaimStatus(EDITED) do? Regarding I'm just trying to run a javascript

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread David Pollak
See ProtoExtendedSession We use it in ESME and it's worked flawlessly for us. If you need a link to the ESME code (it's Apache 2.0 licensed, so use it all you want, we'll write more), lemme know. On Mon, Oct 19, 2009 at 11:12 AM, harryh har...@gmail.com wrote: I want users to stay logged

[Lift] Re: javascript with an ajaxbutton

2009-10-19 Thread caw1461
My saveClaimSatus() function saves the passed value to the database. Firebug is not giving me any errors and prints the line to the console. The order in which the two updates happen is important because I need the status updated before the form is saved. I am using two different versions of

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread harryh
See ProtoExtendedSession Ah, this is perfect! Just hadn't noticed it before. Thx. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Jim Barrows
On Mon, Oct 19, 2009 at 10:53 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: That's pretty much my take. The whole Java Calendar/Date/Timezone impl is poorly designed, hence Joda Time. Now I've run into another wall, this time with the TimeSpanBuilder. I can't mask the implicits from

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Jeppe Nejsum Madsen
Derek Chen-Becker dchenbec...@gmail.com writes: That's pretty much my take. The whole Java Calendar/Date/Timezone impl is poorly designed, hence Joda Time. Now I've run into another wall, this time with the TimeSpanBuilder. I can't mask the implicits from long/int to TimeSpanBuilder, so I

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread Jeppe Nejsum Madsen
harryh har...@gmail.com writes: I want users to stay logged into my site for extended periods of time (through server restarts, and browser restarts). By default Lift stores a User in a SessionVar so this doesn't get me there. I've configured jetty so the session cookie doesn't time out

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread David Pollak
I've just looked at the code. There's nothing that's going to be incompatible moving to JodaTime. Sure, the month method will have a different result if you pass it a JodaTime instance than in you pass it a Date instance. If this is documented, then it's not a problem. Existing methods don't

[Lift] Re: javascript with an ajaxbutton

2009-10-19 Thread Marius
I think with an import net.liftweb.http.js._ import JsCmds._ the compile problem should go away as there is an implicit defined there. But this is not important. Can you send a minimalistic code example that reflects the problem? ... including the template and Scala code. Br's, Marius On Oct

[Lift] Re: javascript with an ajaxbutton

2009-10-19 Thread caw1461
edit.html: script type=text/javascript tinyMCE.init({ // General options mode : textareas, theme : advanced, plugins :

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Derek Chen-Becker
The major issue is the time DSL. Everything else works fine by masking the definitions with a later import, e.g. import Helpers._ import JodaTimeHelpers._ The problem is that implicit defs (views) don't mask, so I can't override or mask it so that 3 seconds returns a Joda Time Duration, which is

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Derek Chen-Becker
I spoke too soon. If I try to do masking imports, I get errors about ambiguous defs: [WARNING] /home/software/liftweb/lift-util/src/test/scala/net/liftweb/util/JodaTimeHelpersSpec.scala:71: error: reference to now is ambiguous; [WARNING] it is imported twice in the same scope by [WARNING] import

[Lift] Re: does this look ok?

2009-10-19 Thread Derek Chen-Becker
Just my 2 cents, but if you're having a problem with some code it helps to explain what the problem is along with the code that you're sending. Otherwise, it's like an interview question :) On Sun, Oct 18, 2009 at 5:12 PM, jack jack.wid...@gmail.com wrote: Does this code look ok? def

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread David Pollak
What branch is the code on? On Mon, Oct 19, 2009 at 1:25 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I spoke too soon. If I try to do masking imports, I get errors about ambiguous defs: [WARNING]

[Lift] Problem with default Connection pool/CP for use with lift?

2009-10-19 Thread Jeppe Nejsum Madsen
Hi, We ran into an issue today. Basically, our postgres volume went into readonly mode, making database access...hmmm lets say less than perfect :-) We quickly revived the db server, but this surfaced a problem which I think is in the default connection pool of the generated Lift archetypes

[Lift] Re: Problem with default Connection pool/CP for use with lift?

2009-10-19 Thread David Pollak
At least the most recent version of Boot.scala has reasonable testing of connection validity: case x :: xs = try { x.setAutoCommit(false) Full(x) } catch { case e = try { pool = xs poolSize = poolSize - 1 x.close

[Lift] Re: reverse-Schemifier: generating BaseMapper instances from schema/SQL/JPA

2009-10-19 Thread Derek Chen-Becker
As far as I know, nothing like this exists. I wouldn't say that it's trivial, but I would expect that writing something to generate it would be relatively straightforward in design terms. On Mon, Oct 19, 2009 at 2:17 AM, opyate opy...@gmail.com wrote: Hello Lifters, Related:

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Derek Chen-Becker
wip-dcb-issue-89-jodatime. I just checked in everything I have, which means that branch currently doesn't compile. Maybe I'm overthinking it, but TimeHelpers does define some nice convenience methods and my goal is to replicate and extend that with Joda Time. Derek On Mon, Oct 19, 2009 at 3:13

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread David Pollak
Please take a look at http://github.com/dpp/liftweb/commit/8b5ad6d7fac428886a74356150b332443e4443e7 I think I've got JodaTime and the existing code playing nicely together. On Mon, Oct 19, 2009 at 2:23 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: wip-dcb-issue-89-jodatime. I just checked

[Lift] Re: reverse-Schemifier: generating BaseMapper instances from schema/SQL/JPA

2009-10-19 Thread Naftoli Gugenheim
Actuall I think someone mentioned a while ago that he had a limited tool to generate source code for Mappers from SQL. Maybe such source code could be compiled using a technique like the REPL uses. - Derek Chen-Beckerdchenbec...@gmail.com wrote: As far as I

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread Naftoli Gugenheim
Is it more dangerous to store the user's uniqueId in a cookie than to store another uniqueId that's associated with the user's uniqueId? - Jeppe Nejsum Madsenje...@ingolfs.dk wrote: harryh har...@gmail.com writes: I want users to stay logged into my site

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread Naftoli Gugenheim
MetaMegaProtoUser has hooks -- onLogIn, onLogOut, and autologinFunc -- that you can use. autologinFunc is called when loggedIn_? is called and no user is logged in, to give you a chance to log one in. So you can create a cookie in onLogIn, delete it in onLogOut, and read it in autologinFunc.

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread harryh
Is it more dangerous to store the user's uniqueId in a cookie than to store another uniqueId that's associated with the user's uniqueId? It is if your site has URLs like http://harryh.org/user/[uid] -harryh --~--~-~--~~~---~--~~ You received this message

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Derek Chen-Becker
Well, yes. I actually had similar code working, but what I was trying to avoid is a situation where someone has code like: import Helpers._ .. val someTime = now + ( 3 minutes) and then to use this code with JodaTime they need to change it to val someTime = jtNow + (3 minutes) and then when

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread David Pollak
On Mon, Oct 19, 2009 at 5:02 PM, harryh har...@gmail.com wrote: Is it more dangerous to store the user's uniqueId in a cookie than to store another uniqueId that's associated with the user's uniqueId? An opaque identifier that can be revoked and is not exposed outside of a given user's

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread David Pollak
We'll deprecate the Date/Calendar stuff. I'm not sure we're going to remove it any time soon (in the next year +). Personally, I don't see a compelling reason to remove it from the code base (there may be people who would prefer not to use JodaTime). So, we might need better names than jtNow,

[Lift] how to use JqKeypress?

2009-10-19 Thread harryh
It seems like I ought to be able to use JqKeypress so that if a user presses enter when a text input has focus an associated ajaxButton is submitted. I can't get it to work though. Help? Basically I have a bunch of little form like so [ text input ] [go!] that I want to submit

[Lift] Setting Table Border

2009-10-19 Thread sunanda
Hi, I need to display the table with border. Following is the sample code. But it is not displaying the border.Is this the correct way of setting the border. Sunanda def displayColDef(selectedname:String):NodeSeq={ val coldef = getColDef(selectedname) table border=2

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Derek Chen-Becker
What I was thinking earlier is that we can simply make a JodaHelpers object that mixes in JodaTimeHelpers instead of TimeHelpers. That way, code changes to move to Joda Time would mostly just be an import change instead of having to alter every instance of now ⇒ jtNow. Derek On Mon, Oct 19, 2009

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Derek Chen-Becker
Along those same lines, maybe there should be a common trait that doesn't define an impl, and then have separate Joda and java.util impl traits that don't mix directly into Helpers. On Mon, Oct 19, 2009 at 6:57 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: What I was thinking earlier is

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Naftoli Gugenheim
Since there are anyway minor breaking changes in 1.1, maybe it's worth it to take TimeHelpers out of Helpers. This way, it will simply require an extra import, of either TimeHelpers or JodaHelpers, which can be chosen by the individual developer. Whenever someone is ready to migrate, they will

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread harryh
See ProtoExtendedSession It might be kind of annoying to change at this point, but experation is a misspelling in this trait. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Derek Chen-Becker
That was pretty much what I was trying to communicate with my last email, just not very effectively. Derek On Mon, Oct 19, 2009 at 7:14 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Since there are anyway minor breaking changes in 1.1, maybe it's worth it to take TimeHelpers out of

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread Naftoli Gugenheim
It shouldn't be such a problem. All that's needed is to rename it, and add a def with the misspelling that points to it, deprecated. Something like @deprecated def experation = expiration I guess you could file a ticket and someone will eventually get to it.

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread Derek Chen-Becker
Oh, that was a sidetrack. I was thinking that it could help enforce the common contract, but return types are different for the same method names so that really wouldn't work. I really just want to try and separate them out, or provide a different Helpers that provides JodaTime stuff under the

[Lift] Re: Setting Table Border

2009-10-19 Thread Ross Mellgren
That looks right to me -- it should show a border with a default stylesheet. When I throw that table.../table into a HTML file by itself, I get a border. -Ross On Oct 19, 2009, at 8:47 PM, sunanda wrote: Hi, I need to display the table with border. Following is the sample code. But it

[Lift] Re: Setting Table Border

2009-10-19 Thread sunanda
Thats what I wonder. It should work. When I refer to a css file with the border setting it works, but not with the setting from the snippet. I need to figure it out. Thanks for your reply. Sunanda. On Oct 20, 2:35 pm, Ross Mellgren dri...@gmail.com wrote: That looks right to me -- it should

[Lift] Re: Are we willing to make a breaking change for Joda Time?

2009-10-19 Thread David Pollak
I have a strong preference not to break the TimeHelpers out of Helpers. I'm not seeing the problem with additional methods on TimeHelpers that do the JodaTime thing. Can you guys help me understand your point of view. On Mon, Oct 19, 2009 at 8:16 PM, Derek Chen-Becker

[Lift] Re: edit: What happened to JsonCmd?

2009-10-19 Thread Chris
Done! On Oct 19, 9:09 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Oct 19, 2009 at 9:04 AM, Chris coldfusio...@gmail.com wrote: So I'm all fixed now wrt JsonCmd's new location.  I noticed that this change isn't documented on the github wiki.  Is there a process for doing

[Lift] How to disable a textfield

2009-10-19 Thread sunanda
Hi, I need to disable all the textfield and then want to enable the fields for editing on click of a button. How can i do this with the following sample code. Thanks Regards, Sunanda. bind(add,html, displayname-coldef.displayname.toForm,