[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: [Lift] method call from out of nowhere

2009-12-01 Thread David Pollak
On Mon, Nov 30, 2009 at 11:26 PM, Hannes hannes.flo...@gmx.li wrote: Hi David, On Mon, Nov 30, 2009 at 12:11 AM, Hannes hannes.flo...@gmx.li 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

[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

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

2009-12-01 Thread David Pollak
On Mon, Nov 30, 2009 at 11:23 PM, Indrajit Raychaudhuri 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 dri...@gmail.com mailto:dri...@gmail.com wrote: It looks like they work to me. I'm using this: ...

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 indraj...@gmail.com 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 dri...@gmail.com

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

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

2009-12-01 Thread David Pollak
Putting a body 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

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 dri...@gmail.com 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 head/tail moving stuff is done before that at

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 hannes.flo...@gmx.li mailto:hannes.flo...@gmx.li wrote: Hi David, On Mon, Nov 30, 2009 at 12:11 AM, Hannes hannes.flo...@gmx.li mailto:hannes.flo...@gmx.li wrote: Hi David, In my LimitOrder

[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

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

2009-12-01 Thread Alex Black
For example, if my html template looks like this: lift:surround with=default at=content h2foobar/h2 lift:MySnippet.render input type=checkbox/ /lift:MySnippet.render /lift:surround I'd like to render it conditionally as:

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: lift:surround with=default at=content

[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, but that

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

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 dri...@gmail.com wrote: If you file an issue on github I'll write up a patch for you tonight.

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) myElement/ else myElement myAttribute=value/)) 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 a...@alexblack.ca wrote:

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,

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 a...@alexblack.ca 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.

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 jim.barr...@gmail.com wrote: Lift is getting very large. We've got singular names as lists, and

[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: scaladocs

2009-12-01 Thread E. Biggs
hi, thanks.. i'm looking for the API documentation??? On Dec 1, 5:08 pm, Ross Mellgren dri...@gmail.com 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:

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

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

2009-12-01 Thread David Pollak
On Tue, Dec 1, 2009 at 8:03 PM, DMB combust...@gmail.com 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) =

[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 feeder.of.the.be...@gmail.com wrote: On Tue, Dec 1, 2009 at 8:03 PM, DMB combust...@gmail.com wrote: Ended up doing this:    def show(xhtml: NodeSeq)

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

[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