[Lift] Re: What is purpose of RequestVar/StatefulSnipplet for forms?

2010-01-28 Thread tommycli
instance for the > next request, thus eliminating the problem. > > - > > tommycli wrote: > > What do you mean these functions are called only on submit? Is that > when the POST goes through and the page is rendered again? > > On Jan 27, 1:57 am, Adam

[Lift] Re: What is purpose of RequestVar/StatefulSnipplet for forms?

2010-01-28 Thread tommycli
What do you mean these functions are called only on submit? Is that when the POST goes through and the page is rendered again? On Jan 27, 1:57 am, Adam Warski wrote: > Hello, > > > What's the purpose of RequestVars and StatefulSnippet? I thought the > > values were retained anyway through POST. T

[Lift] What is purpose of RequestVar/StatefulSnipplet for forms?

2010-01-26 Thread tommycli
Hi, I'm reading the lift book about forms, and in reference to this code: def add (xhtml : NodeSeq) : NodeSeq = { var desc = "" var amount = "0" def processEntryAdd () { ... } bind("entry", xhtml, "description" -> SHtml.text(desc, desc = _), "amount" -> SHtml.text(amount, amount = _), "submit"

[Lift] Re: Two new issues for TextileParser

2010-01-22 Thread tommycli
My mistake. The last time I brought a bug up, you told me to file a bug on github - so I assumed it was general procedure. On Jan 18, 9:07 pm, David Pollak wrote: > Please don't open tickets unless you discuss them on this list first. > > > > On Sun, Jan 17, 2010 at 6:45

[Lift] Two new issues for TextileParser

2010-01-17 Thread tommycli
I created two new issues for TextileParser. 290. TextileParser molests divs 291. TextileParser does not support notextile Additionally, it'd be nice if TextileParser were implemented in a way such that it was extensible. The main issue is that it's just a singleton object, which cannot be extend

[Lift] Sending a File back in custom dispatch

2010-01-08 Thread tommycli
Hi, What's the preferred way of sending back a static file (that lives on the host filesystem) through lift? I'm using lift's custom dispatch. I'm currently putting a FileInputStream into StreamingResponse. I'm not setting a Content-Type in the StreamingResponse constructor, but Jetty seems to be

[Lift] Sending malformed HTML in custom dispatch

2009-12-25 Thread tommycli
I'm using custom dispatch (to handle both XML & media files). Often, I will want to send a page that contains user-inputted (X)HTML. This will often be malformed HTML that is nevertheless rendered fine by a modern browser. How would I send this through? I tried PlainTextResponse, but it sends the

[Lift] Re: Validation errors shown on CRUDify models?

2009-12-21 Thread tommycli
Thanks guys. On Dec 21, 11:59 am, David Pollak wrote: > On Mon, Dec 21, 2009 at 1:53 AM, Jeppe Nejsum Madsen wrote: > > > > > tommycli writes: > > > > Are validation errors shown on CRUDify create/edit pages? > > > > I have validators set up lik

[Lift] Validation errors shown on CRUDify models?

2009-12-20 Thread tommycli
Are validation errors shown on CRUDify create/edit pages? I have validators set up like this: object subdomain extends MappedString(this,64) { override def validations = List(valUnique("Subdomain taken.")_, valRegex(Pattern.compile("""^[A-Za-z0-9-]*$""")

[Lift] lift-textile misprocesses a list without a preceding empty line

2009-12-13 Thread tommycli
The below example fails to render a list in lift-textile, but works in the reference implementation (http://textism.com/tools/textile/ index.php). Lists work in lift-textile only if there is an empty line preceding it, but this is a deviation from the reference implementation. Example follows: --

[Lift] Re: Feature Request: Header offset in lift-textile

2009-12-13 Thread tommycli
le notation?! > > If you want a then just use h2. > > Cheers, Tim > > On 12 Dec 2009, at 20:39, tommycli wrote: > > > It'd be nice to have a header-offset feature in lift-textile. > > > That is, if header_offset=1 gets passed in as an argument, > > > h1

[Lift] Feature Request: Header offset in lift-textile

2009-12-12 Thread tommycli
It'd be nice to have a header-offset feature in lift-textile. That is, if header_offset=1 gets passed in as an argument, h1. => h2. => etc. -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.co

[Lift] Re: NPE when deploying WAR to Jetty

2009-12-05 Thread tommycli
> > Br's > Marius > > On Dec 5, 11:05 pm, Marius wrote: > > > What Lift version are you using? Can you attach a zip with a > > minimalistic example of your app when this occurs? > > > Br's, > > Marius > > > On Dec 5, 10:08 pm, to

[Lift] NPE when deploying WAR to Jetty

2009-12-05 Thread tommycli
Hi, I have a project that works fine when I do: mvn jetty:run, however, fails with a 500 error when I mvn:package and upload the jar to my Jetty server. Here is the error I get: 20:04:52.801 ERROR! [SocketListener0-9] org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 593) >11>

[Lift] Re: Feature Request: deleteMenuLocParams in CRUDify

2009-11-24 Thread tommycli
iftweb.net/r/121/ > > So it will (probably) be in 1.1-SNAPSHOT in a day or two, assuming the change > isn't unacceptable for whatever reason. > > -Ross > > On Nov 23, 2009, at 11:50 PM, tommycli wrote: > > > Add deleteMenuLocParams to CRUDify. > > > Patc

[Lift] Feature Request: deleteMenuLocParams in CRUDify

2009-11-23 Thread tommycli
Add deleteMenuLocParams to CRUDify. Patch below. (I tried github, but you guys don't pull apparently). diff --git a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/ mapper/CRUDify.scala b/lift-persistence/lift-mapper/src/main/scala/net/ liftweb/mapper/CR index 21e5a3b..5aae123 100644 ---

[Lift] Allowing only 'owners' to access objects

2009-11-23 Thread tommycli
Say we have a "Poll" object with an "owner" field that's CRUDified. For urls such as: /polls/view/41 How would I restrict access to the user who matches the "owner" field. 1. Would I do this through SiteMap? How would I test the currentUser against the object? 2. Or would I allow access on Sit

[Lift] Overriding superclass member objects (specifically mapped fields)

2009-10-04 Thread tommycli
In reference to this problem: http://www.nabble.com/-scala--Overriding-superclass-object-member...-td15344451.html This use case in specific: trait Bar { self: Mapper => object barField extends StringField } class Foo extends Mapper with Bar { override barField { override def dbTabl

[Lift] Using plain usernames for authentication

2009-10-01 Thread tommycli
Looking through the book and source for MegaProtoUser, it looks like the email address is used as the primary identifier for users in the built-in user system. What if you want to use plain usernames instead of emails? What do other people do - do they write their own user system from scratch? -