[Lift] Mapper binding Deluxe

2010-02-11 Thread tiro
Hello fellow Heavylifters, the following small utility classes could be useful for those who develop somewhat classic data-oriented applications in Lift and with Mapper: http://wiki.github.com/tromberg/Winglet/ In short: * Do more with less template and snippet code * Only execute the parts

Re: [Lift] Mapper binding Deluxe

2010-02-11 Thread David Pollak
Very cool! On Thu, Feb 11, 2010 at 6:24 AM, tiro tim.romb...@googlemail.com wrote: Hello fellow Heavylifters, the following small utility classes could be useful for those who develop somewhat classic data-oriented applications in Lift and with Mapper:

Re: [Lift] Mapper binding Deluxe

2010-02-11 Thread Jeppe Nejsum Madsen
tiro tim.romb...@googlemail.com writes: Hello fellow Heavylifters, the following small utility classes could be useful for those who develop somewhat classic data-oriented applications in Lift and with Mapper: http://wiki.github.com/tromberg/Winglet/ In short: * Do more with less

[Lift] Re: binding form fields while using jquery plugin

2010-01-13 Thread Madhav
hi marius, I tried using -% but it says value %- is not a member of java.lang.String. Actually what i am trying to achieve is to make a web page in which there are some text fields as Text1,Text2,Result so that when user types some number in Text1 and Text2 their addition appears dynamically in

[Lift] Re: binding form fields while using jquery plugin

2010-01-13 Thread Madhav
hi marius, I tried using -% but it says value -% is not a member of java.lang.String. Actually what i am trying to achieve is to make a web page in which there are some text fields as Text1,Text2,Result so that when user types some number in Text1 and Text2 their addition appears dynamically in

Re: [Lift] Re: Binding a snippet in a comet actor?

2010-01-13 Thread Felipe Rodrigues
The problem was using Google Chrome to see this page. On firefox it shows up normally. Alex Boisvert wrote: Yes.  The issue is here: http://github.com/dpp/liftweb/issues/closed/#issue/93 It was fixed in 1.1M7 and later. alex On Tue, Jan 12, 2010 at 1:47 PM, Felipe Rodrigues

[Lift] Re: binding form fields while using jquery plugin

2010-01-13 Thread Madhav
Thanks Naftoli and Marius . I got it working using both of your suggestions. Madhav On Jan 13, 2:00 pm, Madhav mail.madhavsha...@gmail.com wrote: hi marius, I tried using -% but it says value -% is not a member of java.lang.String. Actually what i am trying to achieve is to make a web page

[Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Madhav
i tried to put custom attributes in scala code but still its nt working. Auto calculation is'nt happening yet. my view source in browser shows form method=post action=/mop fieldset legendAddition/legend preptext1 :input name=F567656735301UY5 type=text value= /: 1/p/pre prepText2 :input

[Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Madhav
i tried to put custom attributes in scala code but still its nt working. Auto calculation is'nt happening yet. my view source in browser shows form method=post action=/addition fieldset legendAddition/legend preptext1 :input name=F567656735301UY5 type=text value= / : 1/p/pre prepText2 :input

Re: [Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Naftoli Gugenheim
Why are you specifying some by name and some by id? Do not use name. SHtml.text works by using an autogenerated name. If you're doing id and it doesn't work, does, say 'size' work? - Madhavmail.madhavsha...@gmail.com wrote: i tried to put custom attributes

[Lift] Re: Binding a snippet in a comet actor?

2010-01-12 Thread Felipe Rodrigues
I have a similar problem here. I didn't find this issue on github. Is this issue solved? Thanks, Felipe On Oct 9 2009, 5:17 pm, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect.  I've opened a ticket:http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix

Re: [Lift] Re: Binding a snippet in a comet actor?

2010-01-12 Thread Alex Boisvert
Yes. The issue is here: http://github.com/dpp/liftweb/issues/closed/#issue/93 It was fixed in 1.1M7 and later. alex On Tue, Jan 12, 2010 at 1:47 PM, Felipe Rodrigues felipero.maill...@gmail.com wrote: I have a similar problem here. I didn't find this issue on github. Is this issue

[Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Madhav
hi Actually i was using name for text1 and text2 and id for result because the plugin page (http://www.pengoworks.com/workshop/jquery/ calculation/calculation.plugin.htm) says to use this name syntax.I tried with using only id also but no use . But yes the size attribute works. I was initially

[Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Madhav
hi Actually i was using name for text1 and text2 and id for result because the plugin page (http://www.pengoworks.com/workshop/jquery/ calculation/calculation.plugin.htm) says to use this name syntax.I tried with using only id also but no use . But yes the size attribute works. I was initially

[Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Madhav
hi Actually i was using name for text1 and text2 and id for result because the plugin page (http://www.pengoworks.com/workshop/jquery/ calculation/calculation.plugin.htm) says to use this name syntax.I tried with using only id also but no use . But yes the size attribute works. I was initially

Re: [Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Naftoli Gugenheim
That's you're problem. SHtml.text needs to set name to its own autogenerated value. If you need a custom name then you have to handle processing it manually. Use S.param in e.g. the SHtml.submit callback to read the query params. For example, S.param(text1) returns a Box that is Full if the URL or

[Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Madhav
I got your point this makes sense and can be the cause of problem i am facing. but i have one more doubt as for example my use case of application is that user enters one number in text1 and second in text2 and immediately addition result is shown in result box without pressing submit button ,

[Lift] Re: binding form fields while using jquery plugin

2010-01-12 Thread Marius
You can get query params with JavaScript with something like: var url = window.location.toString(); and then split it up ... if that is what you're looking for. One small thing, with bind, if you want to preserve the node attributes specified in your markup and not put then from scala you can

[Lift] Re: binding form fields while using jquery plugin

2010-01-11 Thread Madhav
hi Naftoli my snippet has following code for binding bind(form, xhtml, text1 - SHtml.text(text1, text1= _), text2 - SHtml.text(text2,text2 = _), result -SHtml.text(result, result = _, ), submit -

Re: [Lift] Re: binding form fields while using jquery plugin

2010-01-11 Thread Naftoli Gugenheim
You're surrounding the input tag with the form:text1 element? If you look at View Source in the browser you'll see that the output of SHtml.text does not include your input tag, but uses its own. The simplest solution is to put your custom attributes in the scala code: SHtml.text(text1, text1 =

[Lift] Re: binding form fields while using jquery plugin

2010-01-11 Thread Madhav
Thanks Naftoli i will just try your solution and come back. Madhav -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to

[Lift] Lift binding: is ChooseTemplate always necessary with nested tags?

2009-12-23 Thread Alex Black
I've got this xhtml in my template: lift:Compare.loserAlsoKnownAs Also known as: ul alsoKnownAs:list lilist:label //li /alsoKnownAs:list /ul /lift:Compare.loserAlsoKnownAs with this snippet code: def alsoKnownAs( xhtml: NodeSeq, product: Product): NodeSeq = { def list(

[Lift] Overriding binding of numbers?

2009-10-29 Thread Jeppe Nejsum Madsen
Hi, Currently, whenever I need to bind numbers (Int, Double Decimal) I have to call a formatting method to get the correct output (ie. number of decimals, thousand separator etc.) like this bind(lc, in , avg_tco - formatNumber(res.filteredResult(lc).avgTCO)) I would like to make this

[Lift] Re: Binding enumerations with radio buttons or select list

2009-10-28 Thread Ross Mellgren
SHtml.selectObj[ExchangeMethod.Value](ExchangeMethod.elements.map(el = (el, el.toString)), Empty, selected = println(selected)) ? -Ross On Oct 28, 2009, at 2:59 PM, Strom wrote: Has anyone figure out how to bind enumerations as radio buttons or a drop down list? I have an enumeration:

[Lift] Re: Binding enumerations with radio buttons or select list

2009-10-28 Thread Strom
Hey Ross. Thanks for the tips. I found out you have to call the toList () method before you can map the enumeration elements. So it would be like this: XTHML: item:exchangeMethod / Snippet: def SnippetName(xhtml:NodeSeq): NodeSeq = { var exchangeMethod: Box[ExchangeMethod.Value] = Empty ...

[Lift] Re: Binding enumerations with radio buttons or select list

2009-10-28 Thread Ross Mellgren
(untested, uncompiled, and generally just a suggestion ;-) ) XHTML: item:exchangeMethod method:input / method:label / /item var exchangeMethod: Box[ExchangeMethod.Value] = Empty bind(item, xhtml, exchangeMethod - { (ns: NodeSeq) =

[Lift] Re: Binding enumerations with radio buttons or select list

2009-10-28 Thread Strom
Thanks again Ross! I also found out that I could use the ChoiceHolder.toForm method for a little less customization (saves a ton of code though). The following rundown is for newbies like me who are having trouble with radio buttons and enumerations. Please see the enumeration definition in my

[Lift] Re: Binding enumerations with radio buttons or select list

2009-10-28 Thread Naftoli Gugenheim
Why not put it on the wiki? :) - Stromstrommo...@gmail.com wrote: Thanks again Ross! I also found out that I could use the ChoiceHolder.toForm method for a little less customization (saves a ton of code though). The following rundown is for newbies like me

[Lift] Re: Binding enumerations with radio buttons or select list

2009-10-28 Thread Ross Mellgren
+1 -- nice detailed writeup -Ross On Oct 28, 2009, at 8:38 PM, Naftoli Gugenheim wrote: Why not put it on the wiki? :) - Stromstrommo...@gmail.com wrote: Thanks again Ross! I also found out that I could use the ChoiceHolder.toForm method for a

[Lift] Re: Binding enumerations with radio buttons or select list

2009-10-28 Thread Strom
I would post on the wiki, but I've never added content to a wiki, and I can't create an account for the LiftWiki (only admins can make new accounts?). If someone wants to post this information on there somewhere, go for it! Strom On Oct 28, 5:39 pm, Ross Mellgren dri...@gmail.com wrote: +1  --

[Lift] Re: Binding enumerations with radio buttons or select list

2009-10-28 Thread Naftoli Gugenheim
The wiki on GitHub. You probably only need a GitHub account. - Stromstrommo...@gmail.com wrote: I would post on the wiki, but I've never added content to a wiki, and I can't create an account for the LiftWiki (only admins can make new accounts?). If someone

[Lift] Re: binding bug inside of select elements

2009-10-15 Thread harryh
Not seeing how to mark it high priority, but here is the ticket: http://github.com/dpp/liftweb/issues/#issue/102 will attach additional information as I figure it out. -harryh On Oct 15, 12:37 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Weird. When you have a repro case, please

[Lift] Unused binding values for lift:bind

2009-10-12 Thread Ross Mellgren
] WARN lift - Unused binding values for lift:bind: content 20:18:53,987 [http-0.0.0.0-28543-1] WARN lift - Unused binding values for lift:bind: title This is the branch of BindHelpers that looks to be causing it: case Some(nodes) = { if (Props.devMode

[Lift] Re: Binding a snippet in a comet actor?

2009-10-10 Thread David Pollak
On Fri, Oct 9, 2009 at 7:31 PM, Somindra Bhattacharya somind...@gmail.comwrote: Thanks David! You are welcome and thanks for taking the time to put together the sample! On Oct 10, 12:17 am, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect. I've opened a ticket:

[Lift] Re: Binding a snippet in a comet actor?

2009-10-09 Thread Somindra Bhattacharya
David, Thanks for responding. I have hosted the example at http://174.129.214.150:8080/ The code is at http://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Open http://174.129.214.150:8080/ in a browser window. This starts a comet actor which listens

[Lift] Re: Binding a snippet in a comet actor?

2009-10-09 Thread David Pollak
This is a defect. I've opened a ticket: http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote: David, Thanks for responding. I have hosted the example at

[Lift] Re: Binding a snippet in a comet actor?

2009-10-09 Thread Somindra Bhattacharya
Thanks David! On Oct 10, 12:17 am, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect.  I've opened a ticket:http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote:

[Lift] Re: Binding a snippet in a comet actor?

2009-10-08 Thread David Pollak
The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya

[Lift] Re: Binding a snippet in a comet actor?

2009-10-07 Thread Somindra Bhattacharya
Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), )

[Lift] Re: Binding a snippet in a comet actor?

2009-10-07 Thread Somindra Bhattacharya
Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli.

[Lift] Re: Binding a snippet in a comet actor?

2009-10-06 Thread Naftoli Gugenheim
What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor -  lift:comet type=RCActor    Act:act /  /lift:comet When the

[Lift] Re: Binding - keepAttrs?

2009-09-18 Thread Ewan
I asked this only the day before (and got the answer) - might be worth popping it on the wiki now. On Sep 17, 9:58 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: DPP added an attribute-preserving arrow: -% Then you can use unprefixed attributes. -

[Lift] Re: Binding - keepAttrs?

2009-09-18 Thread Timothy Perrett
The wiki is open for all to edit. Can I suggest you call it How To: Preserve binding attributes Cheers, Tim On 18 Sep 2009, at 10:25, Ewan wrote: I asked this only the day before (and got the answer) - might be worth popping it on the wiki now. On Sep 17, 9:58 pm, Naftoli Gugenheim

[Lift] Re: Binding - keepAttrs?

2009-09-18 Thread Naftoli Gugenheim
Or you can maybe insert it in the main binding article. - Timothy Perretttimo...@getintheloop.eu wrote: The wiki is open for all to edit. Can I suggest you call it How To: Preserve binding attributes Cheers, Tim On 18 Sep 2009, at 10:25, Ewan wrote: I

[Lift] Re: Binding - keepAttrs?

2009-09-18 Thread Ewan
I'd be happy to do that. One thing though is that the main binding article still has examples of the old way which needs an update i.e. # label for=first_name # User name example:first_name example:id=first_name / # /label which brings me on to a related issue where by -% does

[Lift] Re: Binding - keepAttrs?

2009-09-18 Thread Ewan
Ah never mind... ahem strings are not xml and therefore trying to add an attribute to them makes no sense... On Sep 18, 12:58 pm, Ewan ehar...@gmail.com wrote: I'd be happy to do that.  One thing though is that the main binding article still has examples of the old way which needs an update

[Lift] Re: Binding - keepAttrs?

2009-09-17 Thread Naftoli Gugenheim
DPP added an attribute-preserving arrow: -% Then you can use unprefixed attributes. - Bryangerm...@gmail.com wrote: I am trying to update an old lift application I wrote using 1.1-SNAPSHOT. It looks like bind is no longer keeping the attributes I've defined

[Lift] Re: Binding based on attributes

2009-07-03 Thread Derek Chen-Becker
I would take a look at Scala's XML facilities. In particular, I think that you can use matching on the elements to filter and substitute the input. Derek On Thu, Jul 2, 2009 at 7:48 AM, Nolan Darilek no...@thewordnerd.infowrote: I'm working on an app that allows users to enter their own form

[Lift] Re: Binding based on attributes

2009-07-03 Thread David Pollak
On Thu, Jul 2, 2009 at 6:48 AM, Nolan Darilek no...@thewordnerd.infowrote: I'm working on an app that allows users to enter their own form templates, which are rendered to HTML forms and filled out. The results are then captured and encoded for later rendering. So the user might input

[Lift] Re: Binding an attribute value

2009-06-02 Thread Timothy Perrett
Try: bind(foo, chooseTemplate(foos, list, xhtml), id - divexample/div % id - foo.id.toString, . ) Without a bit more context / code its tough to help exactly - but from this example you'll see how you can create dynamic attributes. Cheers, Tim On Jun 2, 2:59 pm, Lance Walton

[Lift] Re: Binding an attribute value

2009-06-02 Thread Lance Walton
Hi. I'm still trying to grok your example :-) In the meantime, I'll try to give a bit more context. If I have this template: lift:foo.myFoos foos:list div id=foo_foo:id foo:id/ /div /foos:list /lift:foo.myFoos Then when I munge it all, given foos with ids 12, 57 and 132,

[Lift] Re: Binding an attribute value

2009-06-02 Thread David Pollak
Try: lift:foo.myFoos foos:list div foo:div_id=xxx foo:id/ /div /foos:list /lift:foo.myFoos In your bind: def doFoo(in: NodeSeq): NodeSeq = List(a, b, c).zipWithIndex.flatMap { case (str, idx) = bind(foo, id - str, AttrBindParam(div_id, Text(my_foo_+idx), id)) } bind(foos,

[Lift] Re: Binding an attribute value

2009-06-02 Thread Lance Walton
Hi David. Yes, that's perfect. Thanks. Lance On Jun 2, 6:10 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Try: lift:foo.myFoos  foos:list    div foo:div_id=xxx      foo:id/    /div  /foos:list /lift:foo.myFoos In your bind: def doFoo(in: NodeSeq): NodeSeq = List(a, b,

[Lift] Re: Binding Radio Button

2009-04-25 Thread sailormoo...@gmail.com
Oh...I think I found the reason...Thanks for the help The reason is in my code The binding to submit button is previous to binding to checkbox. if the order is changed...it would work correctly --~--~-~--~~~---~--~~ You received this message because you

[Lift] Re: Binding Radio Button

2009-04-25 Thread Derek Chen-Becker
Ah, yes. The bindings are processed in order, so the submit button has to come last or it will fire before other bindings. Derek On Sat, Apr 25, 2009 at 12:38 AM, sailormoo...@gmail.com sailormoo...@gmail.com wrote: Oh...I think I found the reason...Thanks for the help The reason is in

[Lift] Re: Binding Radio Button

2009-04-25 Thread Timothy Perrett
Glad you got it working :-) Cheers, Tim On Apr 25, 7:38 am, sailormoo...@gmail.com sailormoo...@gmail.com wrote: Oh...I think I found the reason...Thanks for the help The reason is in my code The binding to submit button is previous to binding to checkbox. if the order is

[Lift] Re: Binding Radio Button

2009-04-25 Thread marius d.
Just a small clarification if I may.The binding order do not really matter in terms of user's functions mapping. However the functions mapped are called in the HTTP parameters order sent by the browser. Br's, Marius On Apr 25, 3:53 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Ah, yes.

[Lift] Re: Binding Radio Button

2009-04-25 Thread Charles F. Munat
So if I wanted to put a submit button at the top of the form instead of (or in addition to) the bottom, how would I do that? Chas. marius d. wrote: Just a small clarification if I may.The binding order do not really matter in terms of user's functions mapping. However the functions mapped

[Lift] Re: Binding Radio Button

2009-04-25 Thread Derek Chen-Becker
If you were going to do that I would suggest a hybrid approach. Use regular HTML input tags for the submit in your form in the template and make your last bound function execute the form processing function. So the template could look like: lift:My.snippet form=POST input type=submit value=Hit

[Lift] Re: Binding Radio Button

2009-04-25 Thread Derek Chen-Becker
I just had another idea. You could add a guard field in your form using SHtml.hidden and have it set a var to true: var doForm = false bind(... guard - SHtml.hidden(() = doForm = true), submit - SHtml.submit(...)) Then the submission function *would* get called twice, but you could

[Lift] Re: Binding Radio Button

2009-04-25 Thread Derek Chen-Becker
Or a third idea. Use a hidden to execute your processing function. From the first example: lift:My.snippet form=POST input type=submit value=Hit Me! / form:name / form:desc / form:call / input type=submit value=Hit Me! / /lift:My.snippet And your snippet would look like: class My {

[Lift] Re: Binding Radio Button

2009-04-25 Thread Charles F. Munat
Clever. Derek Chen-Becker wrote: If you were going to do that I would suggest a hybrid approach. Use regular HTML input tags for the submit in your form in the template and make your last bound function execute the form processing function. So the template could look like:

[Lift] Re: Binding Radio Button

2009-04-25 Thread Charles F. Munat
My cup runneth over... Derek Chen-Becker wrote: Or a third idea. Use a hidden to execute your processing function. From the first example: lift:My.snippet form=POST input type=submit value=Hit Me! / form:name / form:desc / form:call / input type=submit value=Hit Me! /

[Lift] Re: Binding Radio Button

2009-04-24 Thread sailormoo...@gmail.com
Thanks Timothy, but can you give an example of checkbox, because no matter what I try, the binding function of checkbox doesn't seem to be called when checkbox is set. I tried some trivious binding function, but it's no effect still. --~--~-~--~~~---~--~~ You

[Lift] Re: Binding Radio Button

2009-04-24 Thread sailormoo...@gmail.com
The example from the lift book doesn't work. Listing 4.4: A checkbox example SHtml.checkbox(false, if (_) frobnicate(), Full(snazzy), class - woohoo) and mine is bind(entry, xhtml, test_mode - SHtml.checkbox(false, if (_) option_list = option_list ::: List(FlagEnum.TEST_MODE),

[Lift] Re: Binding Radio Button

2009-04-24 Thread Timothy Perrett
A checkbox should look like this: var booleanThing: Boolean = false def another(xhtml: NodeSeq): NodeSeq = { bind(c,xhtml, checkbox - SHtml.checkbox(booleanThing, booleanThing = _) % (class - myCSSclass) ) } Cheers, Tim On Apr 24, 2:16 am, sailormoo...@gmail.com

[Lift] Re: Binding Radio Button

2009-04-24 Thread Derek Chen-Becker
What doesn't work about the example? Do you get a compilation error, or it just doesn't do what you want? Derek On Thu, Apr 23, 2009 at 7:16 PM, sailormoo...@gmail.com sailormoo...@gmail.com wrote: The example from the lift book doesn't work. Listing 4.4: A checkbox example

[Lift] Re: Binding Radio Button

2009-04-24 Thread sailormoo...@gmail.com
I didn't get a compilation error, but the function in the checkbox (Boolean) = Any doesn't seem to be called bind(c,xhtml, checkbox - SHtml.checkbox(booleanThing, booleanThing = _) % (class - myCSSclass) ) As the example, booleanThing is always false no matter if I clicked the

[Lift] Re: Binding Radio Button

2009-04-23 Thread Timothy Perrett
You might find this helpful: http://is.gd/sfyT Cheers, Tim On Apr 23, 4:28 am, sailormoo...@gmail.com sailormoo...@gmail.com wrote: Hello:   And about the checkbox..  bind(entry, xhtml,       test_mode         - SHtml.checkbox(false, if (_) option_list = option_list :::

[Lift] Re: Binding Radio Button

2009-04-22 Thread Timothy Perrett
Hey, this is a classic mistake as its not well documented - radio is unlike any other bind, check out my example here: http://gist.github.com/99713 Cheers, Tim On Apr 22, 2:43 am, sailormoo...@gmail.com sailormoo...@gmail.com wrote: Hello:     var sex         = M     val sex_map =

[Lift] Re: Binding Radio Button

2009-04-22 Thread sailormoo...@gmail.com
Thanks for the help ^.^ And if I want the choices are dynamic, what should I do ? For example, there could be 3 radios, or maybe 5 radios. I still cannot understand the mechanism of lift, but may I make such binding? def example(xhtml: NodeSeq): NodeSeq = bind(entry, xhtml, radio - table{

[Lift] Re: Binding Radio Button

2009-04-22 Thread sailormoo...@gmail.com
Hello: And about the checkbox.. bind(entry, xhtml, test_mode - SHtml.checkbox(false, if (_) option_list = option_list ::: List(FlagEnum.TEST_MODE), id-test_mode)) I have a option_list of List[FlagEnum.Value] for saving the options (note : I have over 40 checkboxs), I am

[Lift] Re: Binding Problem - Help

2008-12-15 Thread David Pollak
On Sun, Dec 14, 2008 at 9:39 PM, Oliver ola...@gmail.com wrote: Thanks for all the help, it appears to all be working now - I had a feeling I was going to be fed to the lions, wolves, tigers and bears if I didn't find a fix, and quick. One question, does the name generation have to be based

[Lift] Re: Binding Problem - Help

2008-12-14 Thread David Pollak
On Sun, Dec 14, 2008 at 3:17 PM, Oliver ola...@gmail.com wrote: Hi, I've got a error on one of our Apache/Tomcat servers with binding, it works in Jetty and another Apache/Tomcat server. It looks like lift is calling some of the function setters after calling a method on a

[Lift] Re: Binding Problem - Help

2008-12-14 Thread David Pollak
Okay, The problem is that your computer is too fast. :-) Lift assigns function names based on the nano time. It turns out that the methods are getting called so fast, there's no nano tick and the order of the function creation is not reflected in the function name. I've got a fix. I'll roll it

[Lift] Re: Binding Problem - Help

2008-12-14 Thread Oliver
David Thanks for the prompt reply. I'll upgrade to the latest version of lift so I can use the fix when it comes in. Is everything relatively stable at the current snapshot? cheers Oliver On Mon, Dec 15, 2008 at 11:47 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Okay, The problem

[Lift] Re: Binding Problem - Help

2008-12-14 Thread Oliver
Thanks for all the help, it appears to all be working now - I had a feeling I was going to be fed to the lions, wolves, tigers and bears if I didn't find a fix, and quick. One question, does the name generation have to be based on a random number generator? I realize, with the length of the

[Lift] Re: binding nested groups

2008-10-24 Thread Derek Chen-Becker
You should be able to do that with a combination of bind and chooseTemplate. For instance, your template could look like: ... lift:MySnippet.categories h1Categories/h1 categories:entries category:name/ category:links link:name/ /category:links /categories:entries

[Lift] Re: binding nested groups

2008-10-24 Thread Charles F. Munat
This looks promising! Will do. Thanks, Chas. Derek Chen-Becker wrote: You should be able to do that with a combination of bind and chooseTemplate. For instance, your template could look like: ... lift:MySnippet.categories h1Categories/h1 categories:entries category:name/

[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.