[Lift] Re: Deployment questions and little Java web dev experience

2009-06-23 Thread Timothy Perrett
Yes thats pretty much right - examples of context are: / /something/ /yet/another/ Cheers, Tim On Jun 23, 4:59 am, Naftoli Gugenheim naftoli...@gmail.com wrote: When you deploy a web app I think you specify a context path (at least in jetty) which I think is what you're looking for -- the

[Lift] Best method to protect most menu items?

2009-06-23 Thread Jeppe Nejsum Madsen
Hi, Our app is private, which means only the signin and related pages are visible without authentication. I've made this Loc to protect menu items, val loggedIn = Loc.EarlyResponse(() = Full(RedirectResponse(/profile/login?returnTo=+S.uri)).filter(ignore = !User.loggedIn_?)) and while

[Lift] Managed child entities

2009-06-23 Thread Naftoli Gugenheim
I was working on something to help make it easier to deal with one to many relationships. I'm attaching it (OneToMany.scala) along with a class that uses it (partially work in progress), although it's a bit verbose (partially because my class names are very long).Advantages include access to the

[Lift] Re: Is there any eclipse setup that actually works for lift?

2009-06-23 Thread Rudi Engelbrecht
Hi Dano I am using the debugger in IntelliJ IDEA and it works seamlessly - stepping through Scala code - I find stepping through code helps learning the Lift framework. If you are not committed to using a specific IDE, then trying IntelliJ will be a useful investment - you can download a

[Lift] Re: Managed child entities

2009-06-23 Thread David Pollak
Wow! On Mon, Jun 22, 2009 at 9:30 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I was working on something to help make it easier to deal with one to many relationships. I'm attaching it (OneToMany.scala) along with a class that uses it (partially work in progress), although it's a bit

[Lift] Re: Best method to protect most menu items?

2009-06-23 Thread David Pollak
I'll enhance sitemap to support global additions of parameters. On Tue, Jun 23, 2009 at 1:21 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, Our app is private, which means only the signin and related pages are visible without authentication. I've made this Loc to protect menu items,

[Lift] Re: Best method to protect most menu items?

2009-06-23 Thread Jeppe Nejsum Madsen
On 23 Jun 2009, David Pollak wrote: I'll enhance sitemap to support global additions of parameters. Cool. Looking forward to this :-) Just out of curiosity: Is it possible to fall through in a DispatchPF, ie. do the default processing, even if the function is defined at the request? /Jeppe

[Lift] Using Mapper outside Lift?

2009-06-23 Thread Joe Wass
Good afternoon (at least in England), I'm writing an application which has a significant Lift manifestation, but also some stand-alone Scala (maybe even Java but I'll exclude this from the conversation). The stand-alone code is a set of tools that hang off the database and do some heavy-lifting

[Lift] Re: Using Mapper outside Lift?

2009-06-23 Thread Timothy Perrett
Hi Joe, Mapper does not work standalone, its not like ActiveRecord in that sense - its tied to lift-webkit. Your best bet would be to go with JPA; I think that will serve you better anyway. Cheers, Tim On Jun 23, 4:47 pm, Joe Wass j...@folktunefinder.com wrote: Good afternoon (at least in

[Lift] Re: Best method to protect most menu items?

2009-06-23 Thread David Pollak
Jeppe, I just checked in code (it'll take 45 minutes to hit the Maven repo) that has global LocParams for each SiteMap. The SiteMap constructor is now: SiteMap(globalParamFuncs: List[PartialFunction[Box[Req], Loc.LocParam]], kids: Menu*) You can put your Redirect stuff in like: List({ case _

[Lift] Submenus for model-generated views

2009-06-23 Thread Nolan Darilek
This is something I asked in a subthread, but maybe it deserves its own thread in case someone might have the answer but chose to stop reading the original, whose subject line isn't really accurate for this question anyhow. :) I have a model that I'm using CRUDify for. I'd like to link the

[Lift] Re: Trouble with menus and CRUDify

2009-06-23 Thread Andrew Scherpbier
Hi Nolan, I had the same requirements. What I ended up doing is something along these lines: // // For the brand maintenance, we'll use the standard CRUDify stuff from the Brand model. // The menus created by CRUDify will be plucked apart. The view menu will be the main brand

[Lift] Re: Using Mapper outside Lift?

2009-06-23 Thread Naftoli Gugenhem
I used mapper in an offline (demo) app. You have to include the util and http jars IIRC but it's a desktop app. If you're subcribed to scala-user, I posted it (I think last week) in the thread about a scala SWT DSL. - Timothy Perretttimo...@getintheloop.eu

[Lift] Re: Using Mapper outside Lift?

2009-06-23 Thread Jorge Ortiz
I've used Mapper in desktop apps too. It works fine. --j On Tue, Jun 23, 2009 at 9:56 AM, Naftoli Gugenhem naftoli...@gmail.comwrote: I used mapper in an offline (demo) app. You have to include the util and http jars IIRC but it's a desktop app. If you're subcribed to scala-user, I posted

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
Derek, i completely concur. i wanted to give it a serious go, however, before i abandoned it. The issue is that so much of the incumbent technology goes across this object-relational boundary, i needed a simple case to justify walking away from this technology. This example provides it. To see

[Lift] Re: Using Mapper outside Lift?

2009-06-23 Thread Timothy Perrett
I didn¹t say that it *wouldn¹t* work, just that its tied to lift-webkit... Besides, he says that he will be doing a lot of data intensive processing - seems like JPA would play better there as Mapper is usually has a ceiling of functionality and then it becomes necessary to move to JPA anyway.

[Lift] Re: Using Mapper outside Lift?

2009-06-23 Thread Jorge Ortiz
The OP claims his data model is simple enough for Mapper. If he doesn't mind adding the lift-webkit jar to his classpath, I don't see a problem with using Mapper. --j On Tue, Jun 23, 2009 at 10:46 AM, Timothy Perrett timo...@getintheloop.euwrote: I didn¹t say that it *wouldn¹t* work, just

[Lift] lift and mysql

2009-06-23 Thread Rogelio
Hi All, I'm new to Lift so forgive me if this is old news -- I did not see this info in a search of the group archive. I've been trying to get Lift to work with MySQL following the instructions on the wiki: http://wiki.liftweb.net/index.php/HowTo_configure_lift_with_MySQL I kept getting an

[Lift] Deployment questions and little Java web dev experience

2009-06-23 Thread Naftoli Gugenhem
What's the difference between an application server and a servlet container? - Timothy Perretttimo...@getintheloop.eu wrote: Yes thats pretty much right - examples of context are: / /something/ /yet/another/ Cheers, Tim On Jun 23, 4:59 am, Naftoli

[Lift] Re: Using Mapper outside Lift?

2009-06-23 Thread Joe Wass
Thanks for all advice. The non-lift apps aren't particularly complicated at the database end (they take stuff out, run some algorithms and put stuff back), but I would need quick insertion. So far I've done it with native SQL but would happily go ORM. I would consider either (I don't mind extra

[Lift] Re: Deployment questions and little Java web dev experience

2009-06-23 Thread David Pollak
On Tue, Jun 23, 2009 at 11:07 AM, Naftoli Gugenhem naftoli...@gmail.comwrote: What's the difference between an application server and a servlet container? App servers do everything that servlet containers do and more (LDAP, JNDI, blah blah blah). If you're running a big enterprise system,

[Lift] Re: lift and mysql

2009-06-23 Thread David Pollak
Rog, Thanks for pointing to this old wiki page. I've changed Can - Box. I've updated the wiki. And, yes, it should work. Thanks, David On Tue, Jun 23, 2009 at 11:01 AM, Rogelio rogbo...@gmail.com wrote: Hi All, I'm new to Lift so forgive me if this is old news -- I did not see this

[Lift] Re: [scala] JPA question

2009-06-23 Thread Kris Nuttycombe
Oops, forgot a member of the hierarchy, inline below: On Tue, Jun 23, 2009 at 3:19 PM, Kris Nuttycombekris.nuttyco...@gmail.com wrote: I'm just so puzzled by this thread because I have the following entity hierarchy in my app: @Entity @Inheritance(strategy = InheritanceType.JOINED)

[Lift] Re: [scala] JPA question

2009-06-23 Thread Kris Nuttycombe
I'm just so puzzled by this thread because I have the following entity hierarchy in my app: @Entity @Inheritance(strategy = InheritanceType.JOINED) @Table(name = payment_source_transaction) public abstract class PaymentSourceTransactionT extends PaymentSourceT extends

[Lift] Basic Question

2009-06-23 Thread Ishkhor
Hello, all. I'm just getting started with Lift and am having trouble pulling some of the basic ideas together. I've never worked with Rails, but come from a Struts/Spring background. I'm just learning Scala now also. I'm having trouble seeing how the application flow works, specifically, I do

[Lift] Re: Basic Question

2009-06-23 Thread David Pollak
Please see the ARC challenge code: http://demo.liftweb.net/arc It's a bit more complex than you were asking as there's an intermediate screen, but there's the user input to output in this example. On Tue, Jun 23, 2009 at 3:34 PM, Ishkhor ishk...@gmail.com wrote: Hello, all. I'm just getting

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
Kris, Thanks for this code sample. i will study and see if it offers a way around the conundrum. In the meantime, here's a code samplehttp://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate/hbex/illustrating exactly what i'm talking about. Best wishes, --greg On Tue, Jun 23, 2009 at

[Lift] Re: Misleading error: The Requested URL /admin/orders/new was not found on this server

2009-06-23 Thread David Pollak
I hate it when Lift lies... it sucks rubber donkey lungs!! I've just checked in code that should make this kind of error much more obvious. I'm sorry for your frustration, but thanks to you and your error report, future Lift users will have a much better time. On Tue, Jun 23, 2009 at 3:31 PM,

[Lift] Re: [scala] JPA question

2009-06-23 Thread Oliver Lambert
I don't understand from the code sample why AbstractContainer has to be an entity or have a table or id annotation. I'd be looking at just using the @MappedSuperclass annotation. On Wed, Jun 24, 2009 at 9:27 AM, Meredith Gregory lgreg.mered...@gmail.comwrote: Kris, Thanks for this code

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
Kris, Do you have a self-contained, compilable sample i could compare to the one i made? i can craft one from your snippet below, but it'd be a better comparison if you had one already. Best wishes, --greg On Tue, Jun 23, 2009 at 2:21 PM, Kris Nuttycombe kris.nuttyco...@gmail.comwrote:

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
Oliver, Thanks. This proposal has been put forward before. - The code is generated. If the top class is annotated @MappedSuperclass, why not label every abstract class that is top of its hierarchy @MappedSuperclass. That's the simplest change to the compilation strategy that

[Lift] Re: [scala] JPA question

2009-06-23 Thread Oliver Lambert
Actually, I don't think I would be looking at @MappedSuperclass either. Whats your database schema? Is it always a Legacy database or are you creating it new? Are the java entities you are trying to create, read only? Why aren't you using Scala's JPA? If you are creating a complex parent-child

[Lift] Can't embed a snippet

2009-06-23 Thread Nolan Darilek
OK, finally introducing the first bit of user dynamicity into my app. I want my homepage to contain a bit of homepagy-type intro stuff for logged-out users, but a dashboard-like interface when someone is logged in. So I have this in index.html: lift:surround with=default at=content lift:Home

[Lift] Re: Can't embed a snippet

2009-06-23 Thread David Pollak
On Tue, Jun 23, 2009 at 5:52 PM, Nolan Darilek no...@thewordnerd.infowrote: OK, finally introducing the first bit of user dynamicity into my app. I want my homepage to contain a bit of homepagy-type intro stuff for logged-out users, but a dashboard-like interface when someone is logged in.

[Lift] Re: Can't embed a snippet

2009-06-23 Thread David Pollak
I just implemented the code at: http://github.com/dpp/lift_1_1_sample/tree/master Also, please do an mvn test which will make sure all your templates are well formed XML On Tue, Jun 23, 2009 at 8:37 PM, Nolan Darilek no...@thewordnerd.infowrote: On 06/23/2009 09:43 PM, David Pollak wrote:

[Lift] Re: Can't embed a snippet

2009-06-23 Thread Nolan Darilek
Cool deal, mvn test showed me the issue. Apparently, templates can only have a single element, I had an h2/ and a p/. The book called it a fragment, so this wasn't entirely clear. In any case, I put a div#welcome around it and now it works fine. Thanks for the pointer.

[Lift] Re: Can't embed a snippet

2009-06-23 Thread David Pollak
On Tue, Jun 23, 2009 at 9:09 PM, Nolan Darilek no...@thewordnerd.infowrote: Cool deal, mvn test showed me the issue. Apparently, templates can only have a single element, I had an h2/ and a p/. The book called it a fragment, so this wasn't entirely clear. In any case, I put a div#welcome

[Lift] Error shutting down Jetty instance

2009-06-23 Thread Nolan Darilek
I've been getting this huge backtrace when shutting down Jetty. This probably isn't as much of an issue on mvn, but I'm using SBT, and it'd be nice to not need to restart the SBT instance to restart Jetty. I also just tried mvn jetty:run and saw nearly identical behavior, so it doesn't appear

[Lift] Re: Error shutting down Jetty instance

2009-06-23 Thread David Pollak
Just checked in a patch. Please let me know if it works. On Tue, Jun 23, 2009 at 9:23 PM, Nolan Darilek no...@thewordnerd.infowrote: I've been getting this huge backtrace when shutting down Jetty. This probably isn't as much of an issue on mvn, but I'm using SBT, and it'd be nice to not