[Lift] Re: Help with the eclipse plugin

2009-07-09 Thread Jeppe Nejsum Madsen
Ellis ellis.whiteh...@gmail.com writes: Hi Dan, I don't have an answer to your question, but maybe a suggestion. Eclipse does not work well with maven/scala/lift, and I really doubt it will anytime soon. I don't know about the Maven part, but Eclipse works with Scala Lift. It's not nearly

[Lift] Re: Help with the eclipse plugin

2009-07-09 Thread Jeppe Nejsum Madsen
Miles Sabin mi...@milessabin.com writes: On Thu, Jul 9, 2009 at 5:45 PM, David Pollakfeeder.of.the.be...@gmail.com wrote: But, until Martin's magic brain has yielded code for us, I would recommend avoiding Eclipse for Scala and Lift related development. Unsurprisingly I disagree. Bug

[Lift] Typesafe JSON builder?

2009-07-09 Thread Jeppe Nejsum Madsen
Hi, Has anyone made a typesafe JSON builder? Many Javascript libraries provides support for extensive customization, usually via a JSON object (eg. http://www.jqplot.com/docs/files/optionsTutorial-txt.html#Options_Tutorial It would be nice to generate this from Scala which would then give you

[Lift] Re: Help with the eclipse plugin

2009-07-09 Thread Jeppe Nejsum Madsen
Naftoli Gugenhem naftoli...@gmail.com writes: Completion works for me, when there are no basic syntax errors in the file (mismatched bracketd etc.). Also, I use lift without running maven from the command line. I create the project with m2eclipse, and I don't recall having to set M2_REPO.

[Lift] Re: NPE Problem with User.current in CRUDify action

2009-07-07 Thread Jeppe Nejsum Madsen
)? On Tue, Jul 7, 2009 at 5:53 AM, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, I get an Empty box when using the value of User.current when trying to populate the valid select values for use in a CRUDify edit form: I have this mapped object which I'm trying to edit using CRUDify: class

[Lift] Re: MappedDecimal and nulls

2009-07-07 Thread Jeppe Nejsum Madsen
Derek Chen-Becker dchenbec...@gmail.com writes: Done. Hudson should build it and have it in the repo soon. Thanks! /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send

[Lift] Re: How to test/TDD lift apps?

2009-07-06 Thread Jeppe Nejsum Madsen
On Fri, Jul 3, 2009 at 6:43 PM, David Pollakfeeder.of.the.be...@gmail.com wrote: Jeppe, Once I check in some code (in about 20 minutes), if you run Lift in Test mode (-Drun.mode=test), forms, etc. will have stable names which makes testing easier. Thanks. I just tried this, and it seem

[Lift] Mapper: How to clone object fields?

2009-07-06 Thread Jeppe Nejsum Madsen
Hi, What is the best way to copy values from one mapped object to another (of the same type). The code below seems to work but I was wondering if there's a better way? def insertOrUpdate(v:Vehicle) = Vehicle.find(By(vin, v.vin.is)) match { case Full(existing) = {

[Lift] How to test/TDD lift apps?

2009-07-02 Thread Jeppe Nejsum Madsen
Hi, Having taken the first baby steps and gotten a Lift app running, it's time to bring back some of the old engineering practices to make sure things keep running when new features are added at a rapid pace :-) I'm interested in how people are testing their Lift apps, both at the unit test

[Lift] Re: Thoughts on file streaming

2009-06-30 Thread Jeppe Nejsum Madsen
Derek Chen-Becker dchenbec...@gmail.com writes: Well, as usual something that seemed simple at first glance is now looking somewhat complex. I'm thinking of reworking the fileUpload handling to allow a user to register either a (String, String, Array[Byte]) ⇒ Any or (String, String,

[Lift] Re: Anyone working on the flot widget?

2009-06-28 Thread Jeppe Nejsum Madsen
On Sat, Jun 27, 2009 at 5:46 PM, Timothy Perretttimo...@getintheloop.eu wrote: Guys, If you want changes made to the flot widgets, please let us know what exactly needs changing and we'll get it done. By all means, please don't feel you are out in the cold! Hi Tim, Personally, I don't

[Lift] Re: Anyone working on the flot widget?

2009-06-27 Thread Jeppe Nejsum Madsen
dflemstr david.flemst...@gmail.com writes: Hello everyone involved, I am having a very annoying problem with the Flot widget: The automatically generated legend's auto-sizing feature is broken (it grows horizontally to the max allowed space while still adhering to the margin values

[Lift] Re: Anyone working on the flot widget?

2009-06-27 Thread Jeppe Nejsum Madsen
On Sat, Jun 27, 2009 at 11:10 AM, dflemstrdavid.flemst...@gmail.com wrote: As can be seen here: http://bit.ly/13EEnw , the bug isn't present in the vanilla Flot library. Make sure you're trying to plot the same data with the same plot options. I am at a loss to find the bug causing all

[Lift] Re: Anyone working on the flot widget?

2009-06-26 Thread Jeppe Nejsum Madsen
On 26 Jun 2009, Peter Robinett wrote: Hi flot users, I am trying to copy the basic Flot example into my own code. I have no compile errors but the graph isn't rendered because /classpath/flot/ jquery.flot.js isn't found. Since I get no errors with the flot methods in my snippet, I assume

[Lift] Re: Including jars into a liftweb project

2009-06-26 Thread Jeppe Nejsum Madsen
On 26 Jun 2009, fbettag wrote: Hey guys, i was wondering how (and where) i have to put jars in my liftweb project to get them included. i know it's a beginners question, but i've been playing around all night and i couldn't get it to work. Normally, you would put jars in the WEB-INF/lib

[Lift] Re: New mapper class: MappedEnumString

2009-06-26 Thread Jeppe Nejsum Madsen
Oliver Lambert olambo...@gmail.com writes: [...] No this isn't what I'm suggesting, I don't think MappedEnum should be made flexible. I know this wasn't your suggestion, but any reason not to make MappedEnum flexible (if possible and backwards compatibility could be maintained) ? I was

[Lift] Re: Anyone working on the flot widget?

2009-06-26 Thread Jeppe Nejsum Madsen
Peter Robinett pe...@bubblefoundry.com writes: Thanks, Jeppe, that's what I was missing. To continue to hijack this thread with my own questions, I'm having a problem creating the data List[(Double, Double)] that FlotSerie wants. I have: override val data = MyModel.findAll(By(MyMode.id,

[Lift] Re: Anyone working on the flot widget?

2009-06-25 Thread Jeppe Nejsum Madsen
On 25 Jun 2009, Francois Bertrand wrote: Hi Jeppe Great to see you are interested in the flot widget. My current to-do list for the flot widget, is: - create more Lift JsExp and JsCmd to modify a already displayed flot graph. They should be used in AJAX and Comet applications -

[Lift] Re: New mapper class: MappedEnumString

2009-06-25 Thread Jeppe Nejsum Madsen
On Thu, Jun 25, 2009 at 1:12 AM, Oliver Lambert olambo...@gmail.com wrote: Looks very nice. One thing I'm wondering, what if I wanted the displayed value outside of the mapper, such as TestTypes.Item1.displayValue. Would you use an implicit conversion to provide this or is the display

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

2009-06-24 Thread Jeppe Nejsum Madsen
On 23 Jun 2009, David Pollak wrote: 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

[Lift] Anyone working on the flot widget?

2009-06-24 Thread Jeppe Nejsum Madsen
Hi, We need to do quite a lot of charting in our app and after evaluating several libraries we've settled on Flot (for now at least :-) So I was happy to discover there was already some Flot integrations in Lift. After having looked a bit at this, it seems there are some things missing that we

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

2009-06-24 Thread Jeppe Nejsum Madsen
On Wed, Jun 24, 2009 at 3:25 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Oh... I get why you did the Hidden thing... I'd do the following: case Full(Req(path, _, _)) if !User.loggedIn_? path != List(profile, login)  path != path != List(profile, lost_password) =

[Lift] Re: Modify CRUDify XHTML

2009-06-24 Thread Jeppe Nejsum Madsen
On 24 Jun 2009, Peter Robinett wrote: Hi all, I'm using CRUDify on one of my models and I'd like to display some additional data on the view template. I believe that I need to override one of the model definitions with some sort of reference to my own XHTML file. Which one?

[Lift] New mapper class: MappedEnumString

2009-06-24 Thread Jeppe Nejsum Madsen
Hi, A while ago, I asked if it was possible to use something like MappedEnum and have some sensible values inserted into the database instead of integers. I got the feeling this was not the case, so I've created MappedEnumString (attached) which maps Enumerations into string values. Example:

[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] 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] Best way to create enum-like custom field mapping

2009-06-19 Thread Jeppe Nejsum Madsen
Hi, Using mapper I have this: object FuelTypes extends Enumeration { val Diesel = new Val(1, Diesel) val Petrol = new Val(2, Benzin) } object fuelType extends MappedEnum(this, FuelTypes) This works, but the database value then becomes a meaningless number What is the best

[Lift] Re: Mapper or Record?

2009-06-16 Thread Jeppe Nejsum Madsen
On 16 Jun 2009, marius d. wrote: Lift Record currently is not implemented for DB interaction but it's targeted for 1.1 release. That probably explains why I couldn't find much when looking through the source :-) I'd say to start development using the Mapper and when Record is ready

[Lift] Re: Difference between running from command line and from Eclipse

2009-06-16 Thread Jeppe Nejsum Madsen
On 16 Jun 2009, ph wrote: I've created a test hello-world lift project and it runs fine. http://wiki.liftweb.net/index.php/HowTo_start_a_new_liftwebapp also I've imported this project to Eclipse (mvn eclipse:eclipse) and import from Eclipse. I'm currently using m2eclipse (http://

[Lift] Re: Difference between running from command line and from Eclipse

2009-06-16 Thread Jeppe Nejsum Madsen
On 16 Jun 2009, Philippe Kirsanov wrote: Thank you for the reply, however I don't think this is the issue (I tried and that didn't work).Seems like issue in which version of Jetty is used. Maven generates pom file with jetty version [6.1.16,) and this works from command line, in Eclipse

[Lift] Re: How to remove leading text in Msgs.error

2009-06-07 Thread Jeppe Nejsum Madsen
On Fri, Jun 5, 2009 at 6:05 PM, marius d.marius.dan...@gmail.com wrote: Committed. Let me know if that works for you. Works perfectly. Thanks /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group.

[Lift] How to remove leading text in Msgs.error

2009-06-05 Thread Jeppe Nejsum Madsen
Hi, I'm trying to remove the Notice, Error lead in text that is displayed when using the Msgs snippet, like this: lift:snippet type=msgs lift:notice_msg class=success/lift:notice_msg lift:error_msg class=error/lift:error_msg lift:warning_msg

[Lift] Re: Problem with Menu.builder li_path/li_item

2009-06-03 Thread Jeppe Nejsum Madsen
On 3 Jun 2009, marius d. wrote: attribute with the same name but different prefixes should be ok as long as the prefixes are bound to namespace URL's. But the problem here is that the attributes are in an inner template, which, I presume, will be read before the outer template (with the

[Lift] Useless error messages if template parsing fails?

2009-06-03 Thread Jeppe Nejsum Madsen
I'm curious: Am I the only one getting rather useless error messages in the browser when Lift fails to parse the templates? Something a long these lines: Exception occured while processing / Message: java.lang.IllegalArgumentException: line 15 does not exist

[Lift] Re: Problem with Menu.builder li_path/li_item

2009-06-03 Thread Jeppe Nejsum Madsen
On 3 Jun 2009, David Pollak wrote: I've pushed up a fix Excellent, thanks! When I finally figured out how to use the li_* attributes I thought it was a very nice way to make the snippets configurable. Great was the dismay when I found it didn't work :-( /Jeppe

[Lift] Problem with Menu.builder li_path/li_item

2009-06-02 Thread Jeppe Nejsum Madsen
Running 1.1-SNAPSHOT, the following construct lift:Menu.builder li_path:class=pathclass li_item:class=itemclass/ Seems to results in an exception when Lift processes the template. The error seems related to the fact that both li_path li_item tries to set the class. If I change one to e.g.

[Lift] Re: Problem with Menu.builder li_path/li_item

2009-06-02 Thread Jeppe Nejsum Madsen
On 2 Jun 2009, David Pollak wrote: Please post the exception The code is just the basic archetype with the above template changes and a new menu item as child of Home to show the path style. No exception on the console, but I get this in the browser: Exception occured while processing /

[Lift] Re: Problem with Menu.builder li_path/li_item

2009-06-02 Thread Jeppe Nejsum Madsen
On 2 Jun 2009, David Pollak wrote: This is an XML parsing error. Something in your XML is non-parsable. It's not Lift, but the underlying XML parsing library. Yes, it would seem so. It looks like a bug/non-implemented feature that the parser is unable to read two attributes with the same

[Lift] Re: Some questions about menu MetaMegaProtoUser

2009-05-24 Thread Jeppe Nejsum Madsen
On Sun, May 24, 2009 at 12:45 AM, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On Sat, May 23, 2009 at 5:54 PM, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On Sat, May 23, 2009 at 4:52 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Getting the secondary menu items:   def

[Lift] Re: Some questions about menu MetaMegaProtoUser

2009-05-23 Thread Jeppe Nejsum Madsen
Thanks for the rapid feedback. A few comments below On Fri, May 22, 2009 at 6:12 PM, David Pollak feeder.of.the.be...@gmail.com wrote: [...] def onLoginPage: Boolean = S.request.flatMap(_.location.map(_.name == Login)) openOr false override def screenWrap: Box[NodeSeq] = Full(if

[Lift] Problems with redirect after login and protected pages

2009-05-23 Thread Jeppe Nejsum Madsen
Hi. I want to protect all pages in the app (except login :-) so if you try to access a page, you get to the login page and after successful login, you get redirected back to the requested page. I'm combining the ideas from

[Lift] Re: Problems with redirect after login and protected pages

2009-05-23 Thread Jeppe Nejsum Madsen
On Sat, May 23, 2009 at 6:22 PM, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi. I want to protect all pages in the app (except login :-) so if you try to access a page, you get to the login page and after successful login, you get redirected back to the requested page. I'm combining

[Lift] Re: Some questions about menu MetaMegaProtoUser

2009-05-23 Thread Jeppe Nejsum Madsen
On Sat, May 23, 2009 at 5:54 PM, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On Sat, May 23, 2009 at 4:52 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Getting the secondary menu items:   def secondaryMenuItems: Seq[MenuItem] =   for {     req - S.request.toList     line

[Lift] Some questions about menu MetaMegaProtoUser

2009-05-22 Thread Jeppe Nejsum Madsen
Hi, A newbie running 1-1-SNAPSHOT with a few questions: 1) The entire app should be protected, so any unauthenticated access should show the login page. But I don't want the login page to use the same template as the other user pages. I guess I could override loginMenuLoc, but it would be nice

[Lift] Is Lift the right tool for us?

2009-04-21 Thread Jeppe Nejsum Madsen
Hello, I've been lurking on this list for a while and trying out small things with Lift/Scala but thought I would ask the more experienced people around here before digging much deeper. First some background: I've been writing webapps for well over a decade using all kind of tools/languages

[Lift] Re: Is Lift the right tool for us?

2009-04-21 Thread Jeppe Nejsum Madsen
Thanks for the swift reponse. A few comments inline On Tue, Apr 21, 2009 at 7:51 PM, David Pollak feeder.of.the.be...@gmail.com wrote: [...] I don't know Lift/Scala either but I've always liked the clean, simple syntax of SML (did a fair share of SML programming back in the CS classes :-),

[Lift] Re: Is Lift the right tool for us?

2009-04-21 Thread Jeppe Nejsum Madsen
On Tue, Apr 21, 2009 at 9:01 PM, Charles F. Munat c...@munat.com wrote: Yeah, it's always nice to get some... :-) As a former Rails developer, I'll say this: I don't think I'm yet quite as fast in Lift as I was in Rails, but I'm getting there. A lot of this has had to do with switching

<    1   2   3   4   5