[Lift] Re: Documentation

2008-08-31 Thread Charles F. Munat
OK, I have an idea and I think I've narrowed it down to something I can fit into my schedule. I'll work on it and hopefully will have something in the next week or so. Chas. Charles F. Munat wrote: Actually, after reviewing my schedule and reconsidering the amount of time required, I'm

[Lift] Re: Documentation

2008-09-01 Thread Charles F. Munat
they get quick answers or not. I recommend that you post your questions to this list. It might be worthwhile to identify your questions with some prefix in the subject like DocQ: ..., but I think it better that you don't fragment the list. Jim On Sun, Aug 31, 2008 at 9:09 PM, Charles F. Munat

[Lift] Re: JPA w/Scala - never mind

2008-09-02 Thread Charles F. Munat
I figured it out, I think. Should be author.name, without the parentheses. Charles F. Munat wrote: Has anyone followed the JPA tutorial using pure Scala instead of Java? I've got it very close to running, but I am getting the following error: [WARNING] /private/var/www/wsbg/webapp/src

[Lift] Re: JPA w/Scala - never mind

2008-09-03 Thread Charles F. Munat
at 8:35 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I figured it out, I think. Should be author.name http://author.name, without the parentheses. Charles F. Munat wrote: Has anyone followed the JPA tutorial using pure Scala instead of Java

[Lift] SiteMaps and multiple menus

2008-09-06 Thread Charles F. Munat
So how would one create a site map and then break it into two or more pieces and show those pieces on different parts of the page? I want one menu across the top of the page for certain pages (home, about, contact, login, etc.), then a general navigation bar down the left side of the page,

[Lift] RBAC in Lift

2008-09-07 Thread Charles F. Munat
I'm building a website for a group that wants to have different levels of access to the site. Essentially, there will be five roles, from Admin down to Guest, with each role having access to different parts of the site. Some pages will only be accessible to users with a specific role. For

[Lift] Re: SiteMaps and multiple menus

2008-09-07 Thread Charles F. Munat
+features http://groups.google.com/group/liftweb/browse_thread/thread/dbdf6a17b9704c99/30f5168e87161f74?hl=enlnk=gstq=new+sitemap%2Fmenu+features On Sat, Sep 6, 2008 at 10:54 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: So how would one create a site map

[Lift] Re: JPA w/Scala

2008-09-07 Thread Charles F. Munat
Oh, hell yeah. Please! And down the road, when the mapper becomes agnostic, would there be an archetype that used JPA as the back end for the Lift mapper? Chas. Tim Perrett wrote: Ah cool - this is quite nice actually; good work Oliver! @Derek, what are your thoughts? It certainly

[Lift] Re: RBAC in Lift

2008-09-11 Thread Charles F. Munat
, JAAS is possibility. However, I'm trying to decide whether to use Acegi (without Spring) or look at something like JSecurity. Any thoughts as to which would be a better fit with Lift? Oliver On 08/09/2008, at 9:24 AM, Charles F. Munat wrote: I'm building a website for a group that wants

[Lift] Re: Desiderata. Was: Re: [Lift] Re: RBAC in Lift

2008-09-11 Thread Charles F. Munat
Marius wrote: Also, I like the user-created pages to be accessible by URL (i.e. without a query string) with a readable URL, so: mysite.com/some_page Not: mysite.com/p123456, mysite.com?page=some_page, or mysite.com?page=123456 What is the difference between mysite.com/some_page and

[Lift] Re: Site map question

2008-09-11 Thread Charles F. Munat
- (if (loc.name != name) li id={name}{link}/li else li id={name}span class=this_page{loc.text.text()}/span/li )) yield item match { case e: Elem = e % S.prefixedAttrsToMetaData(a) case x = x } } Charles F. Munat wrote: Yeah, I've been tracking that down. I rewrote

[Lift] Snippet question

2008-09-11 Thread Charles F. Munat
I copied the Misc snippet over from the example, changed the package and import statements to fit my app, and created a users/index page. lift:surround with=default at=content a href='/simple/add'Add a User/a table width=90% lift:Misc.users / /table /lift:surround The app builds

[Lift] Re: Desiderata. Was: Re: [Lift] Re: RBAC in Lift

2008-09-12 Thread Charles F. Munat
portion available for your handlers. Derek On Thu, Sep 11, 2008 at 4:09 PM, Charles F. Munat [EMAIL PROTECTED] wrote: Marius wrote: Also, I like the user-created pages to be accessible by URL (i.e. without a query string) with a readable URL, so: mysite.com/some_page Not: mysite.com

[Lift] Re: JPA Table annotation

2008-09-16 Thread Charles F. Munat
Sep 2008, at 23:43, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: When I use the @Table annotation to set the table name for JPA, thus: @Entity @Table(name=ROLES) class Role It belches out that Table does not have

[Lift] JPA demo overwrites attributes

2008-09-17 Thread Charles F. Munat
I'm trying to figure out the JPA demo by extending it to permit login. To this end, I added three attributes to the User model: validationCode, passwordHash, and passwordSalt: class User { @Id @GeneratedValue{val strategy = GenerationType.AUTO} var id : Long = _ var nameLast :

[Lift] Re: JPA demo overwrites attributes

2008-09-17 Thread Charles F. Munat
(Save changes, doEdit)) Derek On Wed, Sep 17, 2008 at 2:41 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm trying to figure out the JPA demo by extending it to permit login. To this end, I added three attributes to the User model: validationCode

[Lift] bind and enumerations

2008-09-17 Thread Charles F. Munat
I'm using an enumeration for Gender: @serializable object Gender extends Enumeration { type Gender = Value val Male, Female = Value } import Gender._ How do I use this in bind? And is there an easy way to create a drop down list with blank, Male, and Female options? Thanks! Chas.

[Lift] Re: bind and enumerations

2008-09-17 Thread Charles F. Munat
, v.toString)), g, v = g = Full(v)) On Wed, Sep 17, 2008 at 7:33 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm using an enumeration for Gender: @serializable object Gender extends Enumeration { type Gender

[Lift] Re: bind and enumerations

2008-09-18 Thread Charles F. Munat
Pollak wrote: Please post the part of the code where you define the g var. On Wed, Sep 17, 2008 at 9:45 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: And it gives me: error: missing parameter type gender - SHtml.selectObj

[Lift] JPA and enumerations

2008-09-19 Thread Charles F. Munat
I'm still trying to get a Gender enumeration to work with JPA. The problem now seems to be on the JPA end (I'm using the JPADemo code that Derek provided). I get the following error: javax.persistence.PersistenceException: org.hibernate.MappingException: Could not determine type for:

[Lift] Re: JPA and enumerations

2008-09-19 Thread Charles F. Munat
: Gender = Gender(genderInt) def gender_=(what: Gender.Value) = Charles F. Munat wrote: I'm still trying to get a Gender enumeration to work with JPA. The problem now seems to be on the JPA end (I'm using the JPADemo code that Derek provided). I get the following error

[Lift] Lift Wiki search issues

2008-09-21 Thread Charles F. Munat
There are some things that are impossible to find on the wiki because the words are too common and are apparently on the stop-words list. Example: the following page discusses many-to-many relationships (and includes those words on the page):

[Lift] Re: Lift Wiki search issues

2008-09-21 Thread Charles F. Munat
, 2008 at 9:33 AM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Good point. I'm a little dismayed that I didn't think of this considering that I use it on many other sites. Doh. Google does do a much better job. I wonder how easy it would be to switch

[Lift] Current Loc

2008-09-21 Thread Charles F. Munat
I seem to remember asking this before, but I can't seem to find the answer anywhere and a review of the source code hasn't helped. Is there a quick way in a snippet to determine which Loc in the SiteMap has been requested? One thing I need this for is to tell when I'm on the home page.

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Charles F. Munat
http://liftweb.net/index.php/RequirementsForForms David Pollak wrote: Charles F. Munat wrote: Oliver Lambert wrote: Do/should validations stop at the first error message on the field, at least by default? I much prefer that they do not. It really irritates me when I'm using

[Lift] not binding

2008-09-23 Thread Charles F. Munat
I'm still not clear on what causes this type of error: XML Parsing Error: prefix not bound to a namespace Location: http://localhost:8081/ Line Number 37, Column 10: limenu:bind //li ^ Can anyone explain? Thanks, Chas.

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Charles F. Munat
Oliver wrote: I like them to be validated as well, and to short circuit the remainder of the field validation. Feel free to set your validation up that way. Personally, I'd like my validation code to be smart enough to note when two non-redundant validation problems occur and to mention

[Lift] Re: not binding

2008-09-23 Thread Charles F. Munat
processed. So, what's the page source (the stuff that's getting delivered to the browser)? Charles F. Munat wrote: I'm still not clear on what causes this type of error: XML Parsing Error: prefix not bound to a namespace Location: http://localhost:8081/ Line Number 37, Column 10

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-24 Thread Charles F. Munat
Charles F. Munat wrote: Running Ajax calls between fields for validation is pretty ugly, javascript validation would be better That's what I said. Sorry, Oliver. On re-reading, that sounds a little snippy, but I didn't mean it that way. I just meant that we agree -- after mentioning

[Lift] Re: ExtLink not working

2008-09-24 Thread Charles F. Munat
Pollak wrote: And how did you convert the Loc to an URL? Marius wrote: Looks to me like a bug. I mean it appears to render the random string generated instead of what createLink returns. Br's, Marius On Sep 24, 12:15 pm, Charles F. Munat [EMAIL PROTECTED] wrote: When I create

[Lift] Re: lift:surround and multiple templates

2008-09-25 Thread Charles F. Munat
rather than admin.html and change your 'with=admin' to 'with=admin2' and it'll work. Thanks, David Charles F. Munat wrote: I changed the calling template to (exactly): lift:surround with=admin at=content/ I changed admin.html to (exactly): html/ I did mvn clean and mvn jetty:run -U

[Lift] Re: Image Submit Buttons fail to Submit (in IE)

2008-09-26 Thread Charles F. Munat
Browser detection is a really bad idea, and I would recommend avoiding it at all costs. A much better solution is object detection. Here's one pretty good description about why this is so: http://developer.apple.com/internet/webcontent/objectdetection.html Here's another:

[Lift] mysterious script

2008-09-26 Thread Charles F. Munat
In my HTML output there is a script that begins: // ![CDATA[ var lift_ajaxQueue = []; var lift_ajaxInProcess = null; var lift_ajaxShowing = false; var lift_ajaxRetryCount = 3 Is there an easy way to make this download as a separate .js file instead of inline? Or to suppress it if I'm not using

[Lift] Re: mysterious script

2008-09-26 Thread Charles F. Munat
Daniel Green wrote: Is there an easy way to make this download as a separate .js file instead of inline? Or to suppress it if I'm not using AJAX at all? Having it inline decreases the number of requests the browser must make. True. But that's one hit and then it's cached. Putting it in the

[Lift] Re: lift:surround and multiple templates

2008-09-26 Thread Charles F. Munat
Done. http://liftweb.net/index.php/LiftTags#surround Chas. Mateusz Fiołka wrote: I also lost half a day with this error. Is this rule at least documented anywhere? Regards, Mateusz On Thu, Sep 25, 2008 at 9:38 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote

[Lift] Re: mysterious script

2008-09-26 Thread Charles F. Munat
David Pollak wrote: BTW, the script element on this script needs a type=text/javascript attribute or it fails validation. What validator? The W3C validator for XHTML: http://validator.w3.org/ BTW, if you use Firefox you can add the Web Developer Plugin:

[Lift] Re: Change and New Features

2008-10-01 Thread Charles F. Munat
Wow. That's a lot of work. Nice job. Chas. David Pollak wrote: Folks, I've moved the JavaScript for Comet and Ajax to separately loaded JS files rather than putting them on the page. LiftRules.autoIncludeComet allows you to determine if the Comet stuff will be automatically included

[Lift] booleans in fieldOrder cause infinite list?

2008-10-03 Thread Charles F. Munat
When I add a boolean to the fieldOrder list, maven runs out of heap space on compile. As far as I can tell, the fieldOrder list becomes infinite. Here is an example: object Thing extends Thing with KeyedMetaMapper[Long, Thing] { override def dbTableName = things override def fieldOrder =

[Lift] expired sessions and log in

2008-10-05 Thread Charles F. Munat
I'm working on an app in which users may spend significant time editing a form before submitting it. It's possible during this time that their session could time out. My concern is that they might submit a long edit, discover that their session has timed out, log in, and lose the edit. (They

[Lift] Re: expired sessions and log in

2008-10-05 Thread Charles F. Munat
I don't want to keep the session alive. I know how to do that. I want it to time out and force them to log in again. I just want it to remember what they were doing. Does that make sense? Thanks, Chas. Martin Ellis wrote: On Sun, Oct 5, 2008 at 7:28 PM, Charles F. Munat [EMAIL PROTECTED

[Lift] Re: expired sessions and log in

2008-10-05 Thread Charles F. Munat
So if I understand you correctly, I would keep the session open indefinitely, but implement a time-out that forced the user to log in again after a certain period of inactivity? I see how that way I could maintain the update on the server while handling the log in -- is this the recommended

[Lift] Re: expired sessions and log in

2008-10-05 Thread Charles F. Munat
Hmmm. That's an idea and I'm not averse to it. I'll think about it some more. Thanks, Chas. David Pollak wrote: On Sun, Oct 5, 2008 at 3:57 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: So if I understand you correctly, I would keep the session open

[Lift] Question about Menu.scala

2008-10-06 Thread Charles F. Munat
Can anyone explain to me what this line: loc - request.location.toList if loc.name != name; is doing in this code: def item(text: NodeSeq): NodeSeq = for (name - S.attr(name).toList; request - S.request.toList; loc - request.location.toList if loc.name != name;

[Lift] Re: JPADemo weird disappearing boot

2008-10-07 Thread Charles F. Munat
I figured this out (sort of). The problem was in the master pom.xml. Not sure what it was, though. Chas. Charles F. Munat wrote: I seem to have lost my boot. I copied the JPADemo out of the liftweb source code and changed the poms and everything else to make it the basis for a new app

[Lift] Re: JPADemo weird disappearing boot

2008-10-08 Thread Charles F. Munat
${scala.version}/scalaVersion /configuration /plugin /plugins /reporting /project Chas. Oliver wrote: I'm getting the error too :( rotten boot On Wed, Oct 8, 2008 at 4:47 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I figured this out

[Lift] Re: JPADemo weird disappearing boot

2008-10-08 Thread Charles F. Munat
strange, since what's in Git works fine for me here. Can you do me a favor and wipe your maven repository, re-pull from github, do a mvn clean and then see if it works? I just did that and it compiles (and runs) fine... Derek On Wed, Oct 8, 2008 at 1:05 AM, Charles F. Munat [EMAIL

[Lift] Log in from any page

2008-10-08 Thread Charles F. Munat
I'd like to put a log in form on site pages that allows the user to log in on a post back. I'm trying to figure out where to put the authentication method. What runs on every request? I need to log the user in before the page is processed because the log in status determines what gets

[Lift] Re: A coupel of quick questions

2008-10-09 Thread Charles F. Munat
David Pollak wrote: If you're cool with looking up the snippet by class/method name use the plain old snippet. If you want some control before the method gets invoked (e.g., changing the behavior based on current session state), use the dispatch snippet. Is there a good example of this

[Lift] Re: A coupel of quick questions

2008-10-09 Thread Charles F. Munat
) ^ ?? Chas. David Pollak wrote: On Tue, Oct 7, 2008 at 1:28 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: What is the benefit of the Dispatch Snippet over the Snippet? When would I use one and when the other? If you're cool

[Lift] Re: A coupel of quick questions

2008-10-09 Thread Charles F. Munat
Very helpful. Thanks! Tim Perrett wrote: Is there a good example of this in the example sites somewhere? I'm a bit confused but intrigued. http://github.com/dpp/liftweb/tree/master/sites/example/src/main/scala/net/liftweb/example/snippet/CountGame.scala That should help you get started

[Lift] Re: lift-paypal module

2008-10-09 Thread Charles F. Munat
Outstanding! And just in time. I need to implement PayPal functionality on a site next week. Thank you very much, Tim. Chas. Tim Perrett wrote: Guys, I've spent some time gutting my extremely boiler plate paypal code now its in master. I've only implemented the PDT data types and response

[Lift] Re: A coupel of quick questions

2008-10-09 Thread Charles F. Munat
Ah! I thought that's what the QueryParams were, but they weren't in your original post so I was confused. Excellent. Thanks a lot. Chas. David Pollak wrote: Charles F. Munat wrote: OK, I have two mapped classes: class Page extends KeyedMapper[Long, Page] { def findPageSections

[Lift] Re: lift-paypal module

2008-10-09 Thread Charles F. Munat
verification callback to confirm the post data. If you've got any suggestions or stuff you'd like to see by all means say Cheers Tim On Oct 9, 4:43 pm, Charles F. Munat [EMAIL PROTECTED] wrote: Outstanding! And just in time. I need to implement PayPal functionality on a site next week

[Lift] Re: SnippetFailure

2008-10-10 Thread Charles F. Munat
= some function here _ } See http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/index.html for more details. I also know that David has recently /strongly/ recommended not putting .html on the ends of things. Derek On Fri, Oct 10, 2008 at 3:15 PM, Charles F

[Lift] Re: SnippetFailure

2008-10-10 Thread Charles F. Munat
confusing. I can't see what's all that different from the JPADemo one except Derek's works and mine doesn't. Chas. David Pollak wrote: You have to define a package for Category.scala On Fri, Oct 10, 2008 at 4:00 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote

[Lift] Re: SnippetFailure

2008-10-10 Thread Charles F. Munat
to define a package for Category.scala On Fri, Oct 10, 2008 at 4:00 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Thanks, Derek. Actually, I don't use .html or even add (all my html files are called index.html -- I use directories to sort them

[Lift] Re: SnippetFailure - solved

2008-10-10 Thread Charles F. Munat
lift:Menu.link instead of lift:Menu.item . Whoops. Learn something new every five minutes. Sorry for bothering the list. Chas. Charles F. Munat wrote: Sorry. Too lazy to cleanse I just left the package off. There is one, and a model._ import, too. BTW, the snippet is responding, it just gives

[Lift] Re: SnippetFailure

2008-10-11 Thread Charles F. Munat
lift:CategoryOps.editor form=POST / Otherwise I don't think the action won't get correctly populated. I don't know if that would cause the form elements to not be bound as well, but let's start with that. Derek On Fri, Oct 10, 2008 at 5:36 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL

[Lift] Re: SnippetFailure

2008-10-13 Thread Charles F. Munat
than the default (new Category()). Derek On Sat, Oct 11, 2008 at 1:35 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: OK, I tried that. Still no luck. I also went back to just using bind: lift:CategoryOps.editor form=POST

[Lift] Re: Updates to sitemap.Loc

2008-10-13 Thread Charles F. Munat
Did git reset then git pull, then ran mvn jetty:run -U in liftweb/sites/example/ and got this: [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [scala:compile {execution: default}] [INFO] suggestion: remove the scalaVersion from pom.xml [INFO] Compiling 2

[Lift] Re: Updates to sitemap.Loc

2008-10-13 Thread Charles F. Munat
I thought I did (I even blew away .m2), but I guess not because after blowing away the repository it seems to be working. I'm very tired, so I probably missed it. Sorry for the false alarm. Chas. David Pollak wrote: Please always do a mvn clean after doing a pull. Charles F. Munat wrote

[Lift] Re: SnippetFailure

2008-10-13 Thread Charles F. Munat
On Mon, Oct 13, 2008 at 6:38 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Yeah, I'm really unclear on how this is being passed around and how the continuation works. For example, what does this line do: id - SHtml.hidden({category.id http

[Lift] A stupid question

2008-10-14 Thread Charles F. Munat
I must be very dense, but these cans are kicking my butt (kicking my can?). No matter what I do, I seem to end up with everything back in the can! I just... want... to get... the goodies... OUT! An example: How do I extract the URI of the current page from S.request? I am currently doing

[Lift] JPA questions (was Re: SnippetFailure)

2008-10-14 Thread Charles F. Munat
, so you're helping me see where I need to clarify and explain things better :). I also need to refine the JPA demo, since the pattern that I'm currently using is non-optimal and even wrong in cases like yours. Derek On Mon, Oct 13, 2008 at 6:38 PM, Charles F. Munat [EMAIL PROTECTED

[Lift] Re: A stupid question

2008-10-15 Thread Charles F. Munat
having c a Can[String] c match { case Full(value) = //do something with the value case _ = } 2. call open_!(if you're sure your can is not empty) or openOr Br's, Marius On Oct 15, 3:22 am, Charles F. Munat [EMAIL PROTECTED] wrote: I must be very dense, but these cans are kicking

[Lift] Tools

2008-10-15 Thread Charles F. Munat
One of the hardest parts about learning Lift and Scala is not really know what objects look like. Things get pretty complicated and it's difficult to remember what's in what. It would be very nice to be able to step through Lift and see exactly what is where in memory and how things change,

[Lift] Re: A stupid question

2008-10-15 Thread Charles F. Munat
res1: Option[Int] = Some(12) Does that help? Thanks, David Charles F. Munat wrote: Thanks. I have read everything I could find on this but I think I'm just a bit dense about it. Probably, it's just unfamiliarity with the syntax of Scala as a whole

[Lift] Re: A stupid question

2008-10-15 Thread Charles F. Munat
in Scala is the for comprehension: scala for (a - Some(3); |b - Some(4)) yield a * b res1: Option[Int] = Some(12) Does that help? Thanks, David Charles F. Munat wrote: Thanks. I have read everything I could find on this but I think I'm just a bit dense about

[Lift] Weird SessionVar behavior

2008-10-16 Thread Charles F. Munat
I've got a JPA Lift site and have set up a login in which the User's id is stored in a session variable thus, as shown below. This works just fine. The user can log in and go from page to page. But after some random number of clicks, whoops! I'm suddenly no longer logged in. Hmmm. I must be

[Lift] () = xxx... but I want to use parameters

2008-10-16 Thread Charles F. Munat
In the Loc I can do: If( () = true, ) So I can do: def isLoggedIn_?() = true If(isLoggedIn_?, ) But what if I want to pass in a list of roles? def isInRole_?(List[String]) = true Now If complains because it expects a parameterless function. There is probably some easy way around this,

[Lift] Re: Weird SessionVar behavior

2008-10-16 Thread Charles F. Munat
as: def isAuthenticated_? : CurrentUserId.map(true) openOr false Derek On Thu, Oct 16, 2008 at 5:15 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I've got a JPA Lift site and have set up a login in which the User's id is stored in a session variable thus

[Lift] Re: Weird SessionVar behavior (working now)

2008-10-16 Thread Charles F. Munat
of the URI you may be dropping it somewhere else in your code if you process the URI at all. That's just a guess. Also, I would probably write the isAuthenticated method as: def isAuthenticated_? : CurrentUserId.map(true) openOr false Derek On Thu, Oct 16, 2008 at 5:15 PM, Charles F. Munat

[Lift] Re: Multiple menus and LocStuff

2008-10-16 Thread Charles F. Munat
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Sun, Sep 21, 2008 at 5:21 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: It would be useful to me to be able to reuse the Menu.builder function

[Lift] Preview form (JPA)

2008-10-17 Thread Charles F. Munat
Derek, Have you figured out how to keep the object in the continuation instead of just the id? Also, I'm working on a form. I'd like it to have four states: 1. Initial form is blank a. Click Save to save the data b. Click Preview to preview the data 2. Preview shows what it will look

[Lift] Re: Preview form (JPA)

2008-10-18 Thread Charles F. Munat
of the entity manager and how that can be utilized. I read this book a little while ago and must say it was an eye opener. Dont be put off my the crap looking cover and informal writing style, there is some great information in there. Cheers Tim On Oct 18, 12:08 am, Charles F. Munat

[Lift] Re: Preview form (JPA)

2008-10-18 Thread Charles F. Munat
different statuses (DRAFT,LIVE) etc. There are surely other ways of doing it aswell, this is just from the top of my head. Cheers, Viktor On Sat, Oct 18, 2008 at 1:08 AM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Derek, Have you figured out

[Lift] JPA and hiberated generated fields in Lift app

2008-10-20 Thread Charles F. Munat
In my Lift app based on the JPA demo I tried this, which should work beautifully according to everything I've been able to get my hands on: @Temporal(TemporalType.TIMESTAMP) @Column{val name=CREATED_AT, val updatable = false, val insertable = false}

[Lift] Re: JPA and hiberated generated fields in Lift app

2008-10-21 Thread Charles F. Munat
... Cheers Viktor On Tue, Oct 21, 2008 at 5:06 AM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: In my Lift app based on the JPA demo I tried this, which should work beautifully according to everything I've been able to get my hands on: @Temporal

[Lift] Re: JPA and hiberated generated fields in Lift app

2008-10-21 Thread Charles F. Munat
] mailto:[EMAIL PROTECTED] wrote: But both are updatable false and insertable false? I might be daft, but that doesn't look good to me... Cheers Viktor On Tue, Oct 21, 2008 at 5:06 AM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote

[Lift] Re: Accessing SessionVars from inside a rewrite function?

2008-10-21 Thread Charles F. Munat
Minor correction. findOne in the code below should be getSingleResult(). Forgot I'd changed it... Charles F. Munat wrote: This depends on HTTP_REFERER being set. It usually is, but there's no guarantee. Another way I've found is to set a SessionVar in the addDispatchBefore (or wherever

[Lift] binding nested groups

2008-10-23 Thread Charles F. Munat
I have a group of links that are assigned to categories. I want to pull the links and categories down and output them like this: Category A Link 1 Link 2 Category B Link 3 ... Is there a way to do this with bind, or should I just build the XHTML in the snippet? Thanks! Chas.

[Lift] Re: binding nested groups

2008-10-24 Thread Charles F. Munat
On Thu, Oct 23, 2008 at 6:41 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I have a group of links that are assigned to categories. I want to pull the links and categories down and output them like this: Category A Link 1 Link 2

[Lift] Re: JPA and hiberated generated fields in Lift app

2008-10-24 Thread Charles F. Munat
, cheers, Viktor On Wed, Oct 22, 2008 at 1:41 AM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Nope. Turns out this is a really poorly explained feature of Hibernate

[Lift] Re: Friendly URL's?

2008-10-24 Thread Charles F. Munat
I stole this from the wiki, but it works for me: val profile_rewriter: LiftRules.RewritePf = { case RewriteRequest(path @ ParsePath(members :: profile :: page :: _, _, _,_), _, _) = RewriteResponse( ParsePath(profiles :: index :: Nil, , true, false), Map(member -

[Lift] Re: Dynamically adding fields to a form

2008-10-26 Thread Charles F. Munat
to a RDBMS table .. such as adding a new field to a record, that record may not correspond to the table structure ... Br's, Marius On Oct 25, 9:23 pm, Charles F. Munat [EMAIL PROTECTED] wrote: I have a Recipe form that allows for multiple Ingredients. (What's more, each Ingredient has multiple

[Lift] Re: Encrypting user passwords with Jasypt and JPA

2008-10-26 Thread Charles F. Munat
Here's everything I use, which includes the ability to reset the password. I'm sure most of this could be done better, but it's working fine for me right now. In User.scala in the perisistence layer: /** This class represents a user with login privileges on the website. */ @Entity

[Lift] Re: deployment hassles with multiple sites

2008-10-27 Thread Charles F. Munat
, 8:45 am, Charles F. Munat [EMAIL PROTECTED] wrote: I've deployed a beta version of my app to Tomcat, so it's available at localhost:8080/xxx/ Then I proxied Apache over to localhost:8080/xxx/ And it works. But all the links in my app have /xxx/ prepended to them, so they try to go to /xxx

[Lift] Re: deployment hassles with multiple sites

2008-10-27 Thread Charles F. Munat
David Pollak wrote: Is having the context path a bad thing in the URL presented to the user? http://foo.com/foo/xxx ? It might not be in all cases, but in my case it's a show-stopper. I'm going to have to figure out a way around this really quickly -- I've got to go live with this today.

[Lift] Re: deployment hassles with multiple sites

2008-10-27 Thread Charles F. Munat
to the folder of your webapp. You can alsouse context.xml but depends on your tomcat version where this should be. On tomcat 6.x context.xml should be in META-INF folder (if I remember correctly) Br's, Marius On Oct 27, 9:00 pm, Charles F. Munat [EMAIL PROTECTED] wrote: Not sure I understand

[Lift] Kaboom

2008-10-27 Thread Charles F. Munat
Anyone know what this means: [WARNING] Exception in thread main java.lang.RuntimeException: malformed Scala signature of Mailer at 5411; reference value mail of package javax refers to nonexisting symbol. [WARNING] at

[Lift] Re: Kaboom

2008-10-27 Thread Charles F. Munat
jdbc jar and the markdownj jar into the maven repository, I'd be interested.) Thanks, Chas. David Pollak wrote: This is a bug in Scala 2.7.1 Please do a mvn clean install and it'll go away. On Mon, Oct 27, 2008 at 6:53 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote

[Lift] Session problems when running the Lift sample apps and my own simultaneously

2008-11-01 Thread Charles F. Munat
I don't know if anyone else has observed this behavior, but... When I run my Lift app (mvn jetty:run) on port , and simultaneously run the Lift sample app (mvn jetty:run) on port 8080, the SessionVars in my app get hosed. I have a CurrentUserId session variable, and it just disappears,

[Lift] Re: Session problems when running the Lift sample apps and my own simultaneously

2008-11-01 Thread Charles F. Munat
I'll test this as soon as I get a chance. Chas. Tim Perrett wrote: Chas, What happens if you access one under 127.0.0.1 and the other under localhost? Do you still see this? Cheers, Tim Sent from my iPhone On 1 Nov 2008, at 23:16, Charles F. Munat [EMAIL PROTECTED] wrote: I

[Lift] Concatenating lists of nodes

2008-11-13 Thread Charles F. Munat
If I have a list thus: List(spanA/span,spanB/span,spanC/span) How can a get a NodeSeq thus from this: spanA/spanspanB/spanspanC/span I'm sure this is drop-dead simple, but it's still not obvious to me... Thanks, Chas. --~--~-~--~~~---~--~~ You received

[Lift] Output for trees

2008-11-13 Thread Charles F. Munat
If I have an entity thus: @Entity class Category { var name : String = } and another: @Entity class Example { var name : String = var exampleType : String = @ManyToOne var parent : Category = new Category() } And this data: Category A B C Example black

[Lift] Re: Concatenating lists of nodes

2008-11-13 Thread Charles F. Munat
import scala.xml.NodeSeq import scala.xml.NodeSeq scala val n: NodeSeq = List(spanA/span, spanB/span, spanC/span) n: scala.xml.NodeSeq = spanA/spanspanB/spanspanC/span --j On Thu, Nov 13, 2008 at 10:14 AM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: If I have

[Lift] Re: Output for trees

2008-11-13 Thread Charles F. Munat
That's kind of what I figured. Thanks for the code. I'll look through it. Chas. David Pollak wrote: I think you're going to have to do this one manually. Attached, please find some less than efficient code. On Thu, Nov 13, 2008 at 10:30 AM, Charles F. Munat [EMAIL PROTECTED] mailto

[Lift] Valid XHTML

2008-11-15 Thread Charles F. Munat
Is there an interest in Lift using valid XHTML, or do the Lift crew only care if it's well-formed? I ask because the current version of Lift creates XHTML that is invalid on every page unless you adjust the default settings, and even then there seems to be a lot of framework-generated HTML

[Lift] Re: Valid XHTML

2008-11-16 Thread Charles F. Munat
to XHTML and even trying to serve it with the proper mime type. So thanks for that! I'll post other issues as they come up. Chas. David Pollak wrote: On Sat, Nov 15, 2008 at 9:24 PM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Is there an interest in Lift

[Lift] SHtml form inputs and attributes/labels

2008-11-17 Thread Charles F. Munat
I spend a lot of time writing % new UnprefixedAttribute(...) to add attributes to SHtml form elements (input, textarea, select, etc.). It would be nice if the relevant SHtml methods would permit optional extra parameters in the form of tuples where contents are name-value pairs that get

  1   2   3   4   5   >