[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Derek Chen-Becker
I agree that it's an issue. In my own defense, what I meant was not that I didn't think people would use more than one DB. I actually have several apps (not yet converted to Lift) that use 4 or more persistence units that represent various legacy databases. Rather, I failed to realize the problem

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Jorge Ortiz
In Derek's defense, it's not how objects in classes work but how Lift RequestVars work. Scala objects in classes aren't global singletons, just per-class-instance singletons. But a Lift ReuqestVar object in a class is pretty much a global singleton (unless you do some hacking like Derek did). --j

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Oliver Lambert
You made an assumption and programmed a solution based on the knowledge you had at the time. Thats fine and there is nothing wrong with it - start with the simplest solution that fits. If it need to be changed due to changing requirements, thats fine too. There is a tradeoff in creating a overly

[Lift] Scaladoc Generation

2009-06-17 Thread Makeable
This is probably more of a maven question, but I searched through the maven docs and the closest I could find is the site plugin - although this appears to generate a whole load of cruft, so I was wondering if someone could shed some light. I have managed to generate the API docs using mvn

[Lift] Scala learning tool

2009-06-17 Thread g-man
All the Scala books and tutorials recommend using the Scala interactive shell to set up scenarios and learn how Scala works. I agree, but my problem was the (apparent) lack of something like Python's dir(object) call, which gives you all the 'names' available; Ruby and Erlang have similar

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread TSP
In my own defense ... failed to realize the problem that would arise from defining the EM factory as a singleton Are you being honest here Derek? Was not the real problem that you failed to truly embrace the shape of the paradoxical combinator?

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Viktor Klang
Read this and join me in having your brains implode: http://www.mail-archive.com/everything-l...@googlegroups.com/msg05959.html On Wed, Jun 17, 2009 at 11:07 AM, TSP tim.pig...@optrak.co.uk wrote: In my own defense ... failed to realize the problem that would arise from defining the EM

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Jean-Luc
Hi Derek, I had issues with the http proxy, so I checked building from source code (scalajpa + lift-jpa) . It's perfect, just what I need ! Thank you very much ;-) Jean-Luc 2009/6/16 Derek Chen-Becker dchenbec...@gmail.com OK, I just checked in code that should allow this to work. Could you

[Lift] Re: Hiring Lift Developers

2009-06-17 Thread Christian Helmbold
Hi Dived, the just opened http://scala-forum.org has a sub forum for scala job openings: http://scala-forum.org/list.php?6 Feel free to post your vacancy there. Regards, Christian On Jun 15, 7:32 pm, David LaPalomento dlapalome...@novell.com wrote: Hi all, My team has recently started a

[Lift] Re: Firebug error message for AJAX

2009-06-17 Thread marius d.
On Jun 17, 12:53 am, Charles F. Munat c...@munat.com wrote: I have the import statment and the LiftRules.jsArtifacts = YUIArtifacts in Boot, but the script tag for the liftYUI.js script is not being inserted. I guess I could add it manually, but isn't Lift supposed to insert it? Nope it

[Lift] Re: David and Lift @ QCon

2009-06-17 Thread marius d.
Really enjoined ! ... Thank David and congrats ! Br's, Marius On Jun 17, 5:41 pm, Viktor Klang viktor.kl...@gmail.com wrote: For those of us who weren't there:http://www.infoq.com/interviews/Lift-Scala-David-Pollack Awesome interview Dave! Cheers, -- Viktor Klang Scala Loudmouth

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Eric Bowman
Oliver Lambert wrote: Do we need to do some sort of course to understand this language? This could help: http://www.mitadmissions.org/topics/apply/the_freshman_application/index.shtml :) -- Eric Bowman Boboco Ltd ebow...@boboco.ie http://www.boboco.ie/ebowman/pubkey.pgp

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Andrew Scherpbier
Isn't this just the result of JIT development? Don't need something right now, don't implement it. If you need it later, refactor. I'm probably looking at this too much from a low level grunt developer. I understand that when developing a framework or anything with a public API these are

[Lift] simple syntax question

2009-06-17 Thread DavidV
I would like to include a variable value in an input tag in my .html file. I have defined a tag as follows: def upload(xhtml: Group): NodeSeq = if (S.get_?) { bind(ul, chooseTemplate(choose, get, xhtml), file_upload - fileUpload(ul = theUpload(Full (ul))),

[Lift] Re: David and Lift @ QCon

2009-06-17 Thread Kevin Wright
I do wish they'd make their videos downloadable... On Wed, Jun 17, 2009 at 5:22 PM, marius d. marius.dan...@gmail.com wrote: Really enjoined ! ... Thank David and congrats ! Br's, Marius On Jun 17, 5:41 pm, Viktor Klang viktor.kl...@gmail.com wrote: For those of us who weren't there:

[Lift] Re: David and Lift @ QCon

2009-06-17 Thread David Pollak
On Wed, Jun 17, 2009 at 7:41 AM, Viktor Klang viktor.kl...@gmail.comwrote: For those of us who weren't there: http://www.infoq.com/interviews/Lift-Scala-David-Pollack Awesome interview Dave! Thanks. Cheers, -- Viktor Klang Scala Loudmouth -- Lift, the simply functional web

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Matt Williams
JIT development ;) In all serious though, its better to have a minimal set of features that work well and can be refactored effortlessly, than to define an entire API and have everything need to change in an updated release. And at the speed this particular fix went in, its hardly hindering

[Lift] Trivially Set Mapper Scope

2009-06-17 Thread Matt Williams
Is there a simple way that I can set the record scope on a mapper. For example, if I want to specify a WHERE clause for every query to the database, how would I do this? In my particular case, I want to set the scope based upon the hostname used to service the request, but other usages may

[Lift] Re: simple syntax question

2009-06-17 Thread DavidV
For now I have fixed the problem by calling a new method in my snippet that accesses the variable with { } in the input tag. I would be interested to know if there is a way to do this with a bind tag directly in the input tag in the .html file, because I feel like my current solution is a bit of

[Lift] Thoughts on separation of display from logic

2009-06-17 Thread Matt Williams
I wholeheartedly agree with the philosophy of separating the display from the program logic, and am currently getting to grips with the generators, but am finding that now I end up with a degree of markup within my code. Can you think of any caveats to infering the node type passed, and

[Lift] Re: Trivially Set Mapper Scope

2009-06-17 Thread David Pollak
Matt, There's no way to do this right now. I have an idea... lemme see if I can knock something together for you. Thanks, David On Wed, Jun 17, 2009 at 10:05 AM, Matt Williams m...@makeable.co.uk wrote: Is there a simple way that I can set the record scope on a mapper. For example, if I

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Meredith Gregory
Oliver, The short answer is no. The longer answer is - i worked this all out on my own; so, you guys -- who can program lift on top of scala on top of JVM and are therefore about 20X smarter than i am -- can too. - And also, help is always available, if there is something specific

[Lift] Re: directory structure

2009-06-17 Thread Derek Chen-Becker
The default behavior is to look at for a snippets sub-package to any packages you've configured for snippets, so yes, that's required if you're using snippets. If you're not using a particular feature (i.e. snippets, views, or comet) then the directory can be missing, I think. I can't remember if

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread David Pollak
On Wed, Jun 17, 2009 at 12:04 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Argh, that's what I was trying to say. No more posting after Midnight for me :( Folks, We are all on the path to doing better development... but it's a journey, not a destination. I like Greg's suggestion of

[Lift] Re: Scala learning tool

2009-06-17 Thread Derek Chen-Becker
I think that there's talk in 2.8 of having tab completion or something similar in the REPL. Derek On Tue, Jun 16, 2009 at 9:23 PM, g-man gregor...@gmail.com wrote: All the Scala books and tutorials recommend using the Scala interactive shell to set up scenarios and learn how Scala works. I

[Lift] Re: Thoughts on separation of display from logic

2009-06-17 Thread Kris Nuttycombe
This reminds me somewhat of the Wicket approach, which would use a namespaced attribute of the textarea tag to inform the binding logic. I've been wanting to keep the styling of my lift-generated tags in the markup as well, so maybe I'll toy a bit with creating a version of bind() and the form

[Lift] Re: Scala learning tool

2009-06-17 Thread David Pollak
On Wed, Jun 17, 2009 at 1:41 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I think that there's talk in 2.8 of having tab completion or something similar in the REPL. It's far more than talk. Paul has it nailed. 2.8 will offer a much better REPL experience. Derek On Tue, Jun 16,

[Lift] Re: Thoughts on separation of display from logic

2009-06-17 Thread David Pollak
I can see a set of methods that look like: textarea(f: String = Unit)(n: NodeSeq) that will slurp the values and attributes out of the NodeSeq... so you'd bind like: biography - textarea(s = setBio(s)) _ On Wed, Jun 17, 2009 at 10:22 AM, Matt Williams m...@makeable.co.uk wrote: I

[Lift] Re: Lift + Javeline

2009-06-17 Thread marius d.
Just 2.1 version ... we'll try that out. It's still a mystery because offline example works but wen putting it in lift fails only on FF. So far there is no indication that Lift is doing anything wrong. Br's, Marius On Jun 17, 4:14 pm, Matt Williams m...@makeable.co.uk wrote: Are you using the

[Lift] Re: Thoughts on separation of display from logic

2009-06-17 Thread Kris Nuttycombe
We'd still need some attribute to disambiguate in the case of multiple textarea tags, wouldn't we? Kris On Wed, Jun 17, 2009 at 2:51 PM, David Pollakfeeder.of.the.be...@gmail.com wrote: I can see a set of methods that look like: textarea(f: String = Unit)(n: NodeSeq) that will slurp the

[Lift] Re: Lift + Javeline

2009-06-17 Thread Matt Williams
Maybe an issue with the compressor? (although i dont see why that would just affect firefox) On Wed, 2009-06-17 at 14:00 -0700, marius d. wrote: Just 2.1 version ... we'll try that out. It's still a mystery because offline example works but wen putting it in lift fails only on FF. So far

[Lift] Re: Thoughts on separation of display from logic

2009-06-17 Thread David Pollak
On Wed, Jun 17, 2009 at 2:07 PM, Kris Nuttycombe kris.nuttyco...@gmail.comwrote: We'd still need some attribute to disambiguate in the case of multiple textarea tags, wouldn't we? I don't think so. The only NodeSeq being passed to the function is the NodeSeq inside the tag that's getting

[Lift] Sitemap Base URL

2009-06-17 Thread Matt Williams
Im currently working on porting a CMS built in rails over to lift. Im finding the sitemap very handy for use in the administration area, which will be located at /admin/, but for the rest of the site, we will be using a dynamic navigation constructed from the database on a requested hostname

[Lift] Re: Sitemap Base URL

2009-06-17 Thread David Pollak
Matt, I posted some code a week or so ago in response to Glenn's request to have menu items dynamically built from RDBMS queries. Please take a look at http://groups.google.com/group/liftweb/browse_thread/thread/3b0e3611bc316f71# Thanks, David PS -- This should not be construed as an RTFM

[Lift] Re: Trivially Set Mapper Scope

2009-06-17 Thread David Pollak
User.addlQueryParams.set(By(User.firstname, david) :: User.addlQueryParams.is) It's a request var so it's set on a request by request basis. On Wed, Jun 17, 2009 at 10:05 AM, Matt Williams m...@makeable.co.uk wrote: Is there a simple way that I can set the record scope on a mapper. For

[Lift] Re: Trivially Set Mapper Scope

2009-06-17 Thread Matt Williams
Thank you VERY much! Kind Regards, Matt On Wed, 2009-06-17 at 14:42 -0700, David Pollak wrote: User.addlQueryParams.set(By(User.firstname, david) :: User.addlQueryParams.is) It's a request var so it's set on a request by request basis.

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Meredith Gregory
Tim, LOL! Derek, i'm amazed at all the good work you've done on lift. You're unstoppable! i trust that all understood i was having good fun. Best wishes, --greg On Wed, Jun 17, 2009 at 2:07 AM, TSP tim.pig...@optrak.co.uk wrote: In my own defense ... failed to realize the problem that

[Lift] what does 'S' stand for?

2009-06-17 Thread Eric Bowman
In the files S.scala and SHtml.scala, it's kind of hard to figure out what S means. Session? Simple? Structured? Scala? SomethingElse? Thanks, Eric -- Eric Bowman Boboco Ltd ebow...@boboco.ie http://www.boboco.ie/ebowman/pubkey.pgp +35318394189/+353872801532

[Lift] Re: Thoughts on separation of display from logic

2009-06-17 Thread Kevin Wright
One possibility I already considered is something like: bind(nodeseq, prefix, suffix - Text(matched an element), @suffix - Text(matched an attribute), @suffix=value - Text(matched an attribute with specified value)); the bindings here would respectively match the elements:

[Lift] Re: what does 'S' stand for?

2009-06-17 Thread David Pollak
It stands for State. When I first started coding Lift, I was using emacs and wanted to have short names for everything... especially the commonly used stuff. I wanted to isolate state into a single place so every time you dealt with S, you know you were doing something stateful (rather than

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Matt Williams
i trust that all understood i was having good fun. The only thing I understood is that there are some people out there vastly more knowledgeable than myself! :D Brgds, Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Lift] Re: Thoughts on separation of display from logic

2009-06-17 Thread David Pollak
Crud... adding xpathisms to bind... where will it end? :-) On Wed, Jun 17, 2009 at 3:41 PM, Kevin Wright kev.lee.wri...@googlemail.com wrote: One possibility I already considered is something like: bind(nodeseq, prefix, suffix - Text(matched an element), @suffix - Text(matched an

[Lift] Re: what does 'S' stand for?

2009-06-17 Thread Eric Bowman
David Pollak wrote: It stands for State. When I first started coding Lift, I was using emacs and wanted to have short names for everything... especially the commonly used stuff. I wanted to isolate state into a single place so every time you dealt with S, you know you were doing something

[Lift] Combined Lift/Servlet and initialization

2009-06-17 Thread Andreas B
Given the combination of a lift powered webapp and an existing servlet I like to use lift's marvellous mapper in the latter. Do I need to ensure that lift (i.e. db and Schemifier) is initialized before the servlet starts serving requests, or is this implied by some servlet specification? If it

[Lift] QA, before merging code

2009-06-17 Thread Oliver Lambert
Hi, Seems theres been a little bit of discussion about methodologies of coding and development processes in the latest threads which is cool and makes me think about my current coding efforts. I created a branch a while ago where I put in my take on a slightly alternative (or complementary?)

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Oliver Lambert
2009/6/18 Meredith Gregory lgreg.mered...@gmail.com Oliver, The short answer is no. The longer answer is - i worked this all out on my own; so, you guys -- who can program lift on top of scala on top of JVM and are therefore about 20X smarter than i am -- can too. I think if we

[Lift] MEMDEBUG failure

2009-06-17 Thread glenn
I don't know whether this is a Scala problem or a Llift one, so I'll post this problem here with apologies if it's a Scala issue. I keep getting the following error message since I upgraded to Scala 1.7.5. This pops up in my console every 5 seconds, the default jetty scan interval in the pom.

[Lift] Re: MEMDEBUG failure

2009-06-17 Thread David Pollak
Glenn, We have not moved Lift to Scala 2.7.5. It's about a day's worth of work for me to verify that the Actor fixes actually fix things. Please stick with Scala 2.7.4. Thanks, David On Wed, Jun 17, 2009 at 5:13 PM, glenn gl...@exmbly.com wrote: I don't know whether this is a Scala

[Lift] SOME FAMOUS COLLECTIONS

2009-06-17 Thread cubramanian mugsan
SOME FAMOUS COLLECTIONS http://nicesubramani.blogspot.com http://nicesubramani.blogspot.com http://nicesubramani.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group,

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Meredith Gregory
Oliver, Objects and monads are really not the same. At it's heart the concept of monad is an appropriately parametric notion of composition. If you have any experience with abstract algebra, you might recognize that the notion of a group http://en.wikipedia.org/wiki/Symmetry_group is an

[Lift] Re: Mapper record deletion

2009-06-17 Thread g-man
Thanks, I'm working on it. It seems, after reading the Lift book, since we have 'Alert' in the list of basic JsCmds in Table 8.2, a companion 'Confirm' (and perhaps even 'Prompt') command would be logical to have, since these are basic and popular user interface elements. On Jun 16, 6:46 am,

[Lift] Re: Combined Lift/Servlet and initialization

2009-06-17 Thread David Pollak
Andreas, As long as the LiftServlet is in your web.xml file, all should work correctly. Thanks, David On Wed, Jun 17, 2009 at 4:53 PM, Andreas B and...@gmx.net wrote: Given the combination of a lift powered webapp and an existing servlet I like to use lift's marvellous mapper in the latter.

[Lift] Re: QA, before merging code

2009-06-17 Thread David Pollak
On Wed, Jun 17, 2009 at 5:00 PM, Oliver Lambert olambo...@gmail.com wrote: Hi, Seems theres been a little bit of discussion about methodologies of coding and development processes in the latest threads which is cool and makes me think about my current coding efforts. I created a branch a

[Lift] Re: simple syntax question

2009-06-17 Thread David Pollak
If you have XML like: input my:id=foo/ you can: bind(my, xml, FuncAttrBindParam(id, nodeseq = nodeseq ++ Text(bar), id)) And you get: input id=foobar/ On Wed, Jun 17, 2009 at 10:21 AM, DavidV david.v.villa...@gmail.com wrote: For now I have fixed the problem by calling a new method in my