[Lift] Localize an image

2009-05-01 Thread bradford
lift localization is going very smoothly -- thank you all for your efforts put into this. Does anyone know if it is possible to localize an image, for example have search.gif and search_fr_FR.gif? My template should be the same for all languages except for this one button image: . --~--~-

[Lift] Re: localeCalculator called multiple times?

2009-05-01 Thread bradford
s > when the locale changes mid-request (e.g., logging in) that's going to cause > confusion. > > > > On Fri, May 1, 2009 at 5:55 AM, bradford wrote: > > > Yeah, I would think so too.  I made one request and received 21 "test" > > messages.  In my t

[Lift] Re: localeCalculator called multiple times?

2009-05-01 Thread bradford
, marius d. wrote: > > > Well it is called every time a call to S.locale is made, inherently > > each time an internationalized string is needed. > > Shouldn't that be once per request? > > > > > > > Br's, > > Marius &g

[Lift] localeCalculator called multiple times?

2009-04-30 Thread bradford
I added Log.info("test") to my LiftRules.localeCalculator and saw test being printed 21 times. Is this expected? LiftRules.localeCalculator = localeCalculator _ private def localeCalculator (request : Box[HttpServletRequest]): Locale = { net.liftweb.util.Log.info("test") LiftRules.d

[Lift] Re: Do I use a view for this type of redirect?

2009-04-30 Thread bradford
"/" case _ => "/" } () => Full(TemporaryRedirectResponse(redirect, r, cookie)) } } On Apr 30, 1:38 pm, bradford wrote: > Thank you, David. > > On Apr 30, 12:05 pm, David Pollak > wrote: > > > Personally, I'd use a c

[Lift] Re: Do I use a view for this type of redirect?

2009-04-30 Thread bradford
il, _, GetRequest) if > S.param("lang").isDefined && S.param("redirect").isDefined => >   TemporaryRedirectResponse(S.param("redirect").open_!, r, new Cookie(define > cookie here)) > > } > On Thu, Apr 30, 2009 at 8:21 AM, bradford wrote: >

[Lift] Do I use a view for this type of redirect?

2009-04-30 Thread bradford
I have a link that needs to accept 2 request parameters, set a cookie according to param1, and then redirect to "/" + param2. Is this what a view is for? for example, /change_language?lang=en_US&redirect=products. This would set the lang cookie to en_US (expiring in 3 years) and then redirect m

[Lift] Re: Building lift on Windows

2009-04-30 Thread bradford
I can't get it to build on Windows XP. I get a different error though. YUI compressor complains about some invalid character at the start of some JavaScript file (which I don't see visible in the file). Unfortunately, I do not have the exact error available right now. On Apr 30, 10:41 am, Mari

[Lift] Re: Feedback on screen cast, please

2009-04-24 Thread bradford
I prefer QuickTime. Thanks, Bradford On Apr 24, 12:21 pm, "marius d." wrote: > Very very nice ... and that is something that would probably keep > audience with the mouth open for a few minutes. However it's just like > showing  the dog a bone :) ... people would inhere

[Lift] Re: Comet - Unique to each page

2009-04-23 Thread bradford
Thanks again for your help. If I call this ! ShutDown in my CometActor, it will redirect me back to the home page once ShutDown is received. Did you want me to open up a ticket for this? Thanks, Bradford On Apr 23, 10:06 am, bradford wrote: > Thanks, David.  What haven't you thoug

[Lift] Re: Comet - Unique to each page

2009-04-23 Thread bradford
Thanks, David. What haven't you thought about?! On Apr 23, 9:57 am, David Pollak wrote: > On Thu, Apr 23, 2009 at 6:45 AM, bradford wrote: > > > Thanks, David.  I will play around with this when I get home.  I'll > > open up a ticket at the same time as well,

[Lift] Re: scalar queries in Lift/JPA

2009-04-23 Thread bradford
Are you referring to Constructor Expressions? On Apr 23, 9:23 am, Oliver Lambert wrote: > Is there anything to stop you defining an class/entity {answer: String, > countAnswer: Int} and to directly create it from JPA (of course, it's read > only). > > On Wed, Apr 22, 2009 at 9:36 AM, Charles F.

[Lift] Re: Comet - Unique to each page

2009-04-23 Thread bradford
s like would be possible to do with a shutdown function. Something I stumbled upon in my search: http://cometdproject.dojotoolkit.org/documentation/FAQs/multipleTabs Thanks On Apr 23, 9:12 am, David Pollak wrote: > On Wed, Apr 22, 2009 at 6:53 PM, bradford wrote: > > > I noticed i

[Lift] Comet - Unique to each page

2009-04-22 Thread bradford
n? Thanks, Bradford --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr

[Lift] Re: Stuck at "Getting started"

2009-04-21 Thread bradford
Hi Ann, I believe the is a problem with the document converting quotes to tildas. You will need to manually go through the code and replace ~ with ". Hope this helps, Bradford On Apr 21, 9:16 am, Ann wrote: > I've got these errors when tried examples from getting started, whe

[Lift] Re: developing Scala/Lift using Eclipse

2009-04-20 Thread bradford
I think developing lift apps in Eclipse deserves a screencast. There seems to be popular demand for these two. I would do the screencast myself, but I can't figure it out either. NetBeans is very simple. With Eclipse I get a bunch of syntax errors with this nested Maven module project I'm worki

[Lift] Re: StatefulSnippet Beginner

2009-04-18 Thread bradford
quot;/newPage", () => myVar(currentMyVar)) > >   } > >   ... > > } > > > Notice that we need to introduce a "capture" val to hold the current value > > so that the closure function can re-set it when the redirect is processed. > > We briefl

[Lift] Re: StatefulSnippet Beginner

2009-04-18 Thread bradford
t("Add", doSubmit)) } def show (xhtml : NodeSeq) : NodeSeq = { bind("display", xhtml, "name" -> Text(name.is)) } } On Apr 18, 2:18 pm, Timothy Perrett wrote: > Its talking about Hibernate session, not lift session. Perhaps you have a > detached m

[Lift] Re: Turn off

2009-04-18 Thread bradford
rors? Or are you trying to eliminate messages entirely? Or > just trying to restyle them? > > Chas. > > bradford wrote: > > How can I get rid of the ?  I know I can use my own > > message, but I can't figure out how to hi

[Lift] Re: StatefulSnippet Beginner

2009-04-18 Thread bradford
Apr 18, 2009 at 8:41 PM, bradford wrote: > > > I have "changed class Products {"  to read "class Products extends > > StatefulSnippet {" > > > Instead of S.redirectTo, I now have this.redirectTo and it still > > doesn't seem to be saving the st

[Lift] Turn off

2009-04-18 Thread bradford
How can I get rid of the ? I know I can use my own message, but I can't figure out how to hide it. I've tried the following: error-red --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to

[Lift] Re: StatefulSnippet Beginner

2009-04-18 Thread bradford
> Derek > > On Fri, Apr 17, 2009 at 7:45 PM, bradford wrote: > > > I'm trying to play around with the StatefulSnippets and can't get it > > to hold state.  This is what I have for a test: > > > class Products { > >  object productVar extends RequestVar(new

[Lift] Re: StatefulSnippet Beginner

2009-04-17 Thread bradford
I guess it would help to mention that is on index.html and is on select.html. On Apr 17, 9:45 pm, bradford wrote: > I'm trying to play around with the StatefulSnippets and can't get it > to hold state.  This is what I have for a test: > > class Products { >  

[Lift] StatefulSnippet Beginner

2009-04-17 Thread bradford
I'm trying to play around with the StatefulSnippets and can't get it to hold state. This is what I have for a test: class Products { object productVar extends RequestVar(new Product()) def selectedProduct = productVar.is def search(xhtml: Group): NodeSeq = { var query = ""; def p

[Lift] ANN: Mercurial liftweb mirror

2009-04-16 Thread bradford
Lift's GitHub code is now mirrored on bitbucket.org here: http://bitbucket.org/mirror/liftweb/. It will sync every hour. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email

[Lift] Re: NetBeans How-To for Lift

2009-04-09 Thread bradford
Step 1: Create the project via mvn archetype:create or mvn archetype:generate. The wiki is still down, but you can see the lift book for more information about this. The tutorial you are looking at says to generate the lift-archetype-blank. Step 2: In NetBeans go to file -> open -> and select

[Lift] Re: DB Localization Standards?

2009-04-07 Thread bradford
I don't want you to waste your time on this, Derek. This error is caused by hibernate expecting a java.util.Map and getting scala's version instead. Thanks, Bradford On Apr 7, 9:41 pm, bradford wrote: > Ok, with some help on IRC I see what it's doing now. > > &

[Lift] Re: DB Localization Standards?

2009-04-07 Thread bradford
eToMany, @ManyToMany or @CollectionOfElement On Apr 7, 9:14 pm, bradford wrote: > Hi Derek, > > I'm still very new to JPA, so I apologize for my "slowness".  I don't > understand what's going on in this example with MapKey.  What exactly > is it doing?

[Lift] Re: DB Localization Standards?

2009-04-07 Thread bradford
ot;product_id"} >   @MapKey{val name = "locale_id"} >   var localizedDescriptions : Map[String,ProductLocale] = ... > >   def name = { >     localizedDescriptions.get(S.locale.toString).getOrElse(defaultName) >   } > > } > > Let us know if you run into

[Lift] Re: Hidden field in form

2009-04-07 Thread bradford
Thanks, Marius. I will need this functionality as well. On Apr 7, 12:32 pm, "marius d." wrote: > Ok ... I took the liberty to overload it. Here is the signature: > > def hidden(func: (String) => Any, defaultlValue: String, attrs: > (String, String)*): Elem > > Br's, > Marius > > On Apr 7, 7:08 

[Lift] Re: Date Picker JQuery bug

2009-04-06 Thread bradford
Yeah. If you could, replace this file: liftweb/lift-archetype-jpa- basic/src/main/resources/archetype-resources/web/src/main/webapp/ jquery.datePicker.js with the version in the trunk (or just manually apply the diff for r57 -- which is what I did before it was fixed). Thanks, Bradford On Apr

[Lift] DB Localization Standards?

2009-04-05 Thread bradford
oing to use the resource properties files. Any help on this would be appreciated. Thanks, Bradford --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@google

[Lift] Date Picker JQuery bug

2009-04-05 Thread bradford
This bug killed me the other day and I just now noticed it was fixed: http://code.google.com/p/jquery-datepicker/issues/detail?id=49&can=1&q=class. This is just something to keep an eye so that lift can update this resource as soon as possible. The JPA demo reminded me of this bug when I saw that

[Lift] Re: Unit tests for views & snippets

2009-04-04 Thread bradford
Hi Erik, I've been looking for answer to this question myself and have not yet had a chance to dig into it. This could be a good starting point: ./ sites/example/src/test/scala/net/liftweb/example/snippet/ WikiSpec.scala On Apr 4, 5:45 pm, "erik.karls...@iki.fi" wrote: > Hi, > > First thanks

[Lift] Re: Need for lightweight JPA archetype

2009-04-04 Thread bradford
I pasted it here: http://pastebin.com/m1da32b3 Thanks, Bradford On Apr 4, 5:25 pm, Derek Chen-Becker wrote: > If you have a second, could you send the stack trace for the NPE? That's > definitely not something that should be happening. > > Derek > > On Sat, Apr 4, 20

[Lift] Re: Need for lightweight JPA archetype

2009-04-04 Thread bradford
. Thanks a lot for the demo and your help. Thanks, Bradford On Apr 4, 3:26 pm, Derek Chen-Becker wrote: > Hmmm. Does maven complain if you try to compile, or is it just NetBeans? > > Derek > > On Sat, Apr 4, 2009 at 9:31 AM, bradford wrote: > > > Hi, > > > I thi

[Lift] Re: Need for lightweight JPA archetype

2009-04-04 Thread bradford
ains on 'import org.scala_libs.jpa._' in jpatest-web's Model.scala. Thanks, Bradford On Apr 3, 4:45 am, "Charles F. Munat" wrote: > No, I meant there were a few candidates for a first commit, not that > someone else should do it. I have my fingers in a bunch of things

[Lift] Re: autocomplete - options

2009-04-01 Thread bradford
w it had a chance of being accepted ahead of time. Thanks, Bradford On Mar 31, 8:24 pm, bradford wrote: > The autocomplete widget is very cool, but I can't figure out how to > use it to change some of the JQuery autocomplete options such as the > "delay" and "minChars

[Lift] Re: The Lift 1.1 list

2009-04-01 Thread bradford
iable. So, ?minificationOff=true would mean that it serves the normal JS and CSS. I am not sure if this should be offered by the framework or just controlled by the user in his build process. Thanks, Bradford On Apr 1, 12:53 pm, David Pollak wrote: > On Wed, Apr 1, 2009 at 9:37 AM, TylerWeir wrote: >

[Lift] autocomplete - options

2009-03-31 Thread bradford
The autocomplete widget is very cool, but I can't figure out how to use it to change some of the JQuery autocomplete options such as the "delay" and "minChars". Also, how could I modify the JQuery autocomplete result h

[Lift] Re: lift:Menu.group

2009-03-31 Thread bradford
So, how would I test this function in specs? I would need to create a mock object of S, right? Thanks, Bradford On Mar 29, 8:02 pm, bradford wrote: > This can probably be improved (and I've done little testing on it), > but I've come up with something to satisfy my d

[Lift] Re: Derek's #1

2009-03-30 Thread bradford
Yes, very helpful! Thanks so much. On Mar 30, 12:58 pm, TylerWeir wrote: > > Wow. I can't guarantee that I'll always be helpful, but I'll keep trying :) > > You've been super helpful. > > On Mar 30, 12:39 pm, Derek Chen-Becker wrote: > > > > > On Mon, Mar 30, 2009 at 10:15 AM, David Pollak < >

[Lift] Re: importing model - permanently hidden?

2009-03-30 Thread bradford
> > On Sun, Mar 29, 2009 at 12:23 PM, bradford wrote: > > > I have two models in separate .scala files.  One of them is a > > ForeignKey to the other.  The problem I'm having is that it won't let > > me import the Foreign model, since I have not defined a compani

[Lift] Re: scala:console and then boot call hangs

2009-03-30 Thread bradford
for > windows yet.  DavidB will be able to give you a better estimate of when this > will be fixed, or what the exact cause may be. > > -Josh > > On Sun, Mar 29, 2009 at 4:30 PM, bradford wrote: > > > I feel like I'm spamming the mailing list with all of my questions

[Lift] Re: lift:Menu.group

2009-03-29 Thread bradford
ua.key -> ua.value.first.toString) case _ => Nil } case _ => Nil }) S.mapToAttrs(amap) } On Mar 28, 11:59 am, bradford wrote: > Hi Derek, > > Cool.  I will still use your changes, but for this tas

[Lift] Mapper, defaults, and not null

2009-03-29 Thread bradford
Is there a way to specify the default value on a table column with Mapper? And is there a way to specify that the table column is not null with the Mapper? Thanks, Bradford --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Lift] scala:console and then boot call hangs

2009-03-29 Thread bradford
but, mvn jetty:run always works) Any ideas why? Thanks, Bradford --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe fro

[Lift] importing model - permanently hidden?

2009-03-29 Thread bradford
I have two models in separate .scala files. One of them is a ForeignKey to the other. The problem I'm having is that it won't let me import the Foreign model, since I have not defined a companion object. And if I do define a companion object, I get a NetBeans warning saying, "imported `Courses`

[Lift] Re: lift:Menu.group

2009-03-28 Thread bradford
d movies. If I am on music, I want to set a selected class or style on it. But if I embed movies into home, there will be no matches so I want it to default to movies. Thanks for your help and work, Bradford On Mar 28, 11:53 am, Derek Chen-Becker wrote: > Argh, stupid mistake on not ca

[Lift] Re: lift:Menu.group

2009-03-28 Thread bradford
roup(bind(nodes)) case s : Elem => Elem(node.prefix, node.label, node.attributes,node.scope, bind(node.child) : _*) case n => node } } } bind(template) } def main(args: Array[String]) = { val template: NodeSeq = ; println(templ

[Lift] Re: lift:Menu.group

2009-03-28 Thread bradford
instead since I could probably just call bind straight up on them, but I couldn't figure out how to extract these sub-elements since they are prefixed. Regards, Bradford On Mar 27, 1:57 am, Derek Chen-Becker wrote: > It's in trunk now. Add the "donthide" attribute to yo

[Lift] Re: mixinAttributes help

2009-03-27 Thread bradford
ld BindHelpers.mixinAttributes(SHtml.text(query, query = _))(node)) > open_! }, >      "submit" -> SHtml.submit("Submit", processSearch) > ) > > > Query: > > > > the difference is that we passed the id directly to f:query without > duplicating

[Lift] Re: mixinAttributes help

2009-03-27 Thread bradford
, I'm aware that you can set the attributes that way, but I prefer to set it in the HTML. I just find it easier to work with CSS that way. I guess it's a personal preference. Anyway, mixinAttributes is very cool. Thanks for your help, Bradford On Mar 27, 6:10 am, Timothy Perrett w

[Lift] mixinAttributes help

2009-03-27 Thread bradford
I'm trying to use mixinAttributes, but get a scala.MatchError: (full error below). I'm using the 1.1 snapshot. bind("f", xhtml, "query" -> mixinAttributes(SHtml.text(query, query = _)) _, "submit" -> SHtml.submit("Submit", processSearch) ) Query: Can someone please let me know

[Lift] Re: lift:Menu.group

2009-03-26 Thread bradford
Derek, that'll work :) Thanks, Bradford On Mar 25, 6:13 pm, Derek Chen-Becker wrote: > That seems reasonable to me. That's actually what the Menu.builder does, > essentially. I don't think we want to modify the default behavior, but I > could make it a "donthide&

[Lift] Re: lift:Menu.group

2009-03-25 Thread bradford
hich, on foo2, would render as _foo1_ | | _foo3_ or For a good time click here. For a not so good time click here. which, on foo2, would render as For a good time _click here_. For a not so good time . Regards, Bradford On Mar 25, 7:53 am, bradford wrote: > David, you're right that nee

[Lift] Re: lift:Menu.group

2009-03-25 Thread bradford
would suffice as well. Thanks for the tips, Chas. Derek, if you do add "always" can you please let me know so that I can update my code. Thanks, Bradford On Mar 24, 10:37 pm, Derek Chen-Becker wrote: > The general case is that a page won't link to itself, I think, which is why

[Lift] Re: lift:Menu.group

2009-03-24 Thread bradford
ms. For the time being I will just hard code it as follows (which is not a big deal to me at this time): Foo1 Foo2 Foo3 Thanks again for the great support :) Bradford On Mar 24, 12:08 pm, David Pollak wrote: > On Tue, Mar 24, 2009 at 9:02 AM, Charles F. Munat wrote: > > > > &

[Lift] Re: lift:Menu.group

2009-03-24 Thread bradford
up, you can provide your own template for each > menu item that's rendered: > > >   >     >   > > > I could see adding an "always" attribute to the Menu.item snippet such that > when it's defined the Menu item is always rendered. > > D

[Lift] Re: lift:Menu.group

2009-03-23 Thread bradford
I apologize for all of the messages. I got a little hasty with this email. This is what I'm looking for: Foo1 Foo2 Foo3 On Mar 23, 8:41 pm, bradford wrote: > The idea of LocGroup is great.  I have a few Menu's with LocGroup > ("group1").  I want to generate:

[Lift] Re: lift:Menu.group

2009-03-23 Thread bradford
Also, I'm using 1.1-snapshot and will always show except when i am on /foo1. For this case it doesn't even render. On Mar 23, 8:41 pm, bradford wrote: > The idea of LocGroup is great.  I have a few Menu's with LocGroup > ("group1").  I want to generate: >

[Lift] lift:Menu.group

2009-03-23 Thread bradford
The idea of LocGroup is great. I have a few Menu's with LocGroup ("group1"). I want to generate: Foo1 Foo1 Foo1 for just group1. It appears that does not print ul and li, and lift:Menu.builder won't recognize group. What are my alternatives? Also, I need to surround the item text with .

[Lift] Re: Slash and burn

2009-03-23 Thread bradford
ts of /foo.html to /index.html? Thanks, Bradford On Mar 14, 4:02 am, David Pollak wrote: > On Fri, Mar 13, 2009 at 10:21 PM, Charles F. Munat wrote: > > > > > > > Sorry, I've missed most of this discussion, but thank you for your > > responses. Hopefully, I'll

[Lift] Re: NetBeans Scala plugin running Maven and lift

2008-09-04 Thread bradford
Sorry for yet another post, but I meant "mvn eclipse:eclipse - DdownloadSources" will download the sources. Just in case anyone else needed that info. On Sep 4, 11:43 am, bradford <[EMAIL PROTECTED]> wrote: > It's been reported that mvn eclipse:eclipse works for getting

[Lift] Re: NetBeans Scala plugin running Maven and lift

2008-09-04 Thread bradford
It's been reported that mvn eclipse:eclipse works for getting the source to show up in Netbeans. Would it be possible to create a mvn netbeans:netbeans so this would be a little more intuitive, though I am not quite sure what else mvn eclipse:eclipse does. On Sep 4, 11:16 am, bradford &l

[Lift] Re: NetBeans Scala plugin running Maven and lift

2008-09-04 Thread bradford
tory near the lift jar. > > (works with eclipse, not tested withnetbeans) > > /davidB > > On Sat, Aug 2, 2008 at 10:37 PM, Caoyuan <[EMAIL PROTECTED]> wrote: > > > On Aug 3, 4:26 am, bradford <[EMAIL PROTECTED]> wrote: > >> When I left click the import sta