[Lift] A question on radio button

2009-12-01 Thread sunanda
Hi, I have got two radio button fields("Yes","No") In my form I need to display an input field onclick of the button "Yes" else the field needs to be hidden. How can I achieve this inside the form. Regards, Sunanda -- You received this message because you are subscribed to the Google Groups

[Lift] Is it possible to use Schemifier without DB Access?

2009-12-01 Thread Joern
Hi, I just want to see the statements Schemifier.schemify() would use to create all my tables. Right now, it only creates statements, if there is no such table in the DB. How could I avoid having it look at the existing tables and just let Schemifier give me all the create statements? Thanks, Joe

[Lift] Re: Image upload and serving example

2009-12-01 Thread DMB
You don't even need f.get in there as it turns out. "f.get" should just be "file". Beautiful. Thanks for the tip. On Dec 1, 8:07 pm, David Pollak wrote: > On Tue, Dec 1, 2009 at 8:03 PM, DMB wrote: > > Ended up doing this: > > >    def show(xhtml: NodeSeq) : NodeSeq = { > >        if(S.post_?) {

Re: [Lift] Re: Image upload and serving example

2009-12-01 Thread David Pollak
On Tue, Dec 1, 2009 at 8:03 PM, DMB wrote: > Ended up doing this: > >def show(xhtml: NodeSeq) : NodeSeq = { >if(S.post_?) { >val f : Option[FileParamHolder] = S.request match { >case Empty => Empty >case Full(req) => >req

[Lift] Re: Image upload and serving example

2009-12-01 Thread DMB
Ended up doing this: def show(xhtml: NodeSeq) : NodeSeq = { if(S.post_?) { val f : Option[FileParamHolder] = S.request match { case Empty => Empty case Full(req) => req.uploadedFiles.find(_.name == "file_upload")

Re: [Lift] Re: scaladocs

2009-12-01 Thread Ross Mellgren
It's split up by package -- here are the ones I commonly use for example: http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/index.html http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-util/scaladocs/index.html http://www.scala-tools.org/mvnsites-snapshots/liftwe

[Lift] Re: scaladocs

2009-12-01 Thread E. Biggs
hi, thanks.. i'm looking for the API documentation??? On Dec 1, 5:08 pm, Ross Mellgren wrote: > Tryhttp://scala-tools.org/mvnsites-snapshots/liftweb/instead of with > index.html > > -Ross > > On Dec 1, 2009, at 8:01 PM, E. Biggs wrote: > > > > > shouldhttp://scala-tools.org/mvnsites-snapshots/li

Re: [Lift] scaladocs

2009-12-01 Thread Ross Mellgren
Try http://scala-tools.org/mvnsites-snapshots/liftweb/ instead of with index.html -Ross On Dec 1, 2009, at 8:01 PM, E. Biggs wrote: > should http://scala-tools.org/mvnsites-snapshots/liftweb/scaladocs/index.html > be something other than nothing? > > Is there a better way to get snapshot scala

[Lift] scaladocs

2009-12-01 Thread E. Biggs
should http://scala-tools.org/mvnsites-snapshots/liftweb/scaladocs/index.html be something other than nothing? Is there a better way to get snapshot scaladocs? -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...

Re: [Lift] Open discussion on Lift Name Calling practices

2009-12-01 Thread David Pollak
Jim, Thanks for spearheading this effort! Let's do what we can to give Jim feedback on the timeline and then get the ball rolling. Thanks, David On Tue, Dec 1, 2009 at 12:43 PM, Jim Barrows wrote: > Lift is getting very large. We've got singular names as lists, and plural > names that aren'

[Lift] A second rewrite phase

2009-12-01 Thread David Pollak
Folks (especially Jeppe), I've added a second rewrite phase to Lift. The second phase takes place within S scope, so you get SessionVars, etc. The review board posting is at http://reviewboard.liftweb.net/r/132/ Anyone who cares about what is accessible during this rewrite phase should pull the

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread David Pollak
On Tue, Dec 1, 2009 at 3:59 PM, Alex Black wrote: > I appreciate the suggestion, I did think of that, but one of my goals > is to keep the XHTML out of my code..! > > This seems a tough problem in general.. Ideally in snippets there > would be no presentation, just data I think, e.g. in this case

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread Ross Mellgren
I think you are approaching it from the wrong angle. Lift is not an MVC style framework -- the template and the snippets coordinate (conspire?) to deliver XHTML. The actual tags might be in the snippet, if there's any logic being applied to their creation / modification / etc. -Ross On Dec 1,

[Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread Alex Black
I appreciate the suggestion, I did think of that, but one of my goals is to keep the XHTML out of my code..! This seems a tough problem in general.. Ideally in snippets there would be no presentation, just data I think, e.g. in this case a boolean. The XHTML template would then form the presentat

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread Alex Boisvert
Here's one way, Helpers.bind(..., "myElement" -> (if (condition) else )) I don't think there's a bind helper to conditionally output the attribute. Maybe our bind experts know. alex On Tue, Dec 1, 2009 at 3:29 PM, Alex Black wrote: > Thanks Alex. That would work, but I'm looking for a mor

Re: [Lift] Re: lift-json escaping bug

2009-12-01 Thread Ross Mellgren
Fixed: d977c95589fbd5de8bc45e43c2867097dd75a807 -Ross On Nov 30, 2009, at 8:33 PM, harryh wrote: > Done: > > http://github.com/dpp/liftweb/issues/#issue/214 > > On Nov 30, 6:33 pm, Ross Mellgren wrote: >> If you file an issue on github I'll write up a patch for you tonight. >> >> -Ross >>

[Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread Alex Black
Thanks Alex. That would work, but I'm looking for a more generic solution. Restating the problem: Based on some condition I want to generate an attribute or not generate an attribute, e.g.: OR - Alex On Dec 1, 6:23 pm, Alex Boisvert wrote: > You can use SHtml.checkbox() to easily generate

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread Alex Boisvert
You can use SHtml.checkbox() to easily generate the checkbox, bind(..., "checkbox" -> SHtml.checkbox(isChecked, checked => if (checked) doSomething()) ) The first parameter is whether the checkbox should be checked by default. The second parameter is a function to do something when form is sub

[Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread Alex Black
Is there a good/reasonable way to conditionally output checked="checked" or output nothing? My code looks like this: bind("manufacturer", xhtml, AttrBindParam("selected", Text("selected"), "selected")) I can add an if statement, and then output Text("notSelected") instead

[Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread Alex Black
Thanks, I didn't know that! On Dec 1, 5:30 pm, Ross Mellgren wrote: > Valueless attributes are prohibited by XML. The proper XHTML   > formulation is to use the name of the attribute as the value, e.g.   > checked="checked" > > -Ross > > On Dec 1, 2009, at 5:28 PM, Alex Black wrote: > > > For exa

Re: [Lift] How can one bind value-less attributes?

2009-12-01 Thread Ross Mellgren
Valueless attributes are prohibited by XML. The proper XHTML formulation is to use the name of the attribute as the value, e.g. checked="checked" -Ross On Dec 1, 2009, at 5:28 PM, Alex Black wrote: > For example, if my html template looks like this: > > >foobar >

[Lift] How can one bind value-less attributes?

2009-12-01 Thread Alex Black
For example, if my html template looks like this: foobar I'd like to render it conditionally as: foobar Is there syntax to add the "checked" to the checkbox? perhaps similar to the syntax to bi

[Lift] Open discussion on Lift Name Calling practices

2009-12-01 Thread Jim Barrows
Lift is getting very large. We've got singular names as lists, and plural names that aren't lists. We've got people calling roses red flowers, spades diamonds and other mass chaos. Well, it's not that bad, but you get the idea. This is an attempt to come up with a series of standard names to ma

Re: [Lift] method call from out of nowhere

2009-12-01 Thread Hannes
David Pollak schrieb: > > > On Mon, Nov 30, 2009 at 11:26 PM, Hannes > wrote: > > Hi David, > >> >> >> On Mon, Nov 30, 2009 at 12:11 AM, Hannes > > wrote: >> >> Hi David, >> >> In my LimitOrder Meta Object, I did

Re: [Lift] Re: Image upload and serving example

2009-12-01 Thread David Pollak
If you have the Req (request), you can do: val req: Req = ... val theFile: Option[FileParamHolder] = req.uploadedFiles.find(_.name == "my_param_name") On Tue, Dec 1, 2009 at 2:49 AM, DMB wrote: > Just what I was looking for, thanks! > > By the way, is there a way to assign a "name" attribute

Re: [Lift] Beware of using a body tag in a surrounded template, especially with nested surrounds

2009-12-01 Thread David Pollak
On Tue, Dec 1, 2009 at 9:36 AM, Ross Mellgren wrote: > Isn't XHTML schema validation turned on by default in dev mode? > It's turned off by default. > Wouldn't it detect this case? > It's applied after the rendering is complete. The / moving stuff is done before that at it's done by putting

Re: [Lift] Beware of using a body tag in a surrounded template, especially with nested surrounds

2009-12-01 Thread Ross Mellgren
Isn't XHTML schema validation turned on by default in dev mode? Wouldn't it detect this case? -Ross On Dec 1, 2009, at 12:24 PM, David Pollak wrote: > Putting a tag in templates is pretty much the only way to > go. If you don't put the body tag in the template that surrounds a > given pa

Re: [Lift] Beware of using a body tag in a surrounded template, especially with nested surrounds

2009-12-01 Thread David Pollak
Putting a tag in templates is pretty much the only way to go. If you don't put the body tag in the template that surrounds a given page's custom content, then you have significant issues related duplication in each page. It is the developer's responsibility to make sure that the HTML is valid.

[Lift] Beware of using a body tag in a surrounded template, especially with nested surrounds

2009-12-01 Thread tiro
Hi, I think it is documented somewhere in the Liftbook that one should not use body tags inside a surround tag, but Lift doesn't seem to complain. I thought I would document the phenomenon I had here since people usually look in the mailing list first. I had used two nested surround templates, w

Re: [Lift] **URGENT** Archetypes broken

2009-12-01 Thread Indrajit Raychaudhuri
On 01/12/09 7:59 PM, David Pollak wrote: > > > On Mon, Nov 30, 2009 at 11:23 PM, Indrajit Raychaudhuri > mailto:indraj...@gmail.com>> wrote: > > > > On 01/12/09 10:58 AM, David Pollak wrote: > > > > > > On Mon, Nov 30, 2009 at 8:25 PM, Ross Mellgren

Re: [Lift] **URGENT** Archetypes broken

2009-12-01 Thread David Pollak
On Mon, Nov 30, 2009 at 11:23 PM, Indrajit Raychaudhuri wrote: > > > On 01/12/09 10:58 AM, David Pollak wrote: > > > > > > On Mon, Nov 30, 2009 at 8:25 PM, Ross Mellgren > > wrote: > > > > It looks like they work to me. I'm using this: > > > > ... > > > > ... > >

[Lift] **BREAKING CHANGES**: Use "mvn archetype:generate" to generate 1.1-SNAPSHOT archetypes

2009-12-01 Thread Indrajit Raychaudhuri
Friends, Following the recent refactoring that the Lift archetypes went though, we have moved forward to the new archetype metadata format [1] for all the archetypes. So far, the JPA related archetypes were using the new metadata format while the others (esp. lift-archetype-blank and lift-archety

Re: [Lift] method call from out of nowhere

2009-12-01 Thread David Pollak
On Mon, Nov 30, 2009 at 11:26 PM, Hannes wrote: > Hi David, > > > > On Mon, Nov 30, 2009 at 12:11 AM, Hannes wrote: > >> Hi David, >> >> In my LimitOrder Meta Object, I did: >> >> override def afterCreate >> >> to inform an Actor, everytime a new Order is created. The Actor than calls >> the jo

[Lift] Re: Image upload and serving example

2009-12-01 Thread DMB
Just what I was looking for, thanks! By the way, is there a way to assign a "name" attribute to a file upload input field? The reason is I have a legacy piece of code that does HTTP uploads by simulating a form submit. This code requires that the form field name be known in advance, for obvious re