Re: [Lift] Re: Lift 2.0 on Scala 2.8 update

2010-01-27 Thread Jeppe Nejsum Madsen
Indrajit Raychaudhuri writes: > Some more awesomeness - 280_port_refresh of Lift has moved to > Scala-2.8.0.Beta1. > > Cheers, Indrajit Awesome. How much is supported? Someone running anything substantial on 2.8 yet? I really (really!) want to ditch the 2.7 Eclipse plugin for 2.8 /Jeppe

Re: [Lift] Re: jQuery 1.4

2010-01-27 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim writes: > Is there any way to get maven to decide? If there was some way to set JQuery > as a dependency in the pom and have Lift locate it at runtime that may make > the most sense, if such a thing is remotely possible. Indrajit, any comment? I don't think this is optimal fo

[Lift] Re: Mapper CamelCase vs snake_case

2010-01-27 Thread Jeppe Nejsum Madsen
On Jan 26, 8:04 pm, Jeppe Nejsum Madsen wrote: I'v implemented this: > In MapperRules add >   var columnName: String => String = s => s.toLowerCase > > (and perhaps tableName, indexName etc. if we want full flexibility) > > - name: object name unchanged (ie not

[Lift] Mapper CamelCase vs snake_case

2010-01-26 Thread Jeppe Nejsum Madsen
Hi, I'm looking at http://github.com/dpp/liftweb/issues#issue/155 and have a few ideas that I thought I would run by the list Here's how I think naming is currently handled (I've only looked at fields, my guess is tables are/should be similar): - name: always the object name lowercased. Cannot b

Re: [Lift] New ticketing system

2010-01-26 Thread Jeppe Nejsum Madsen
David Pollak writes: > Folks, > > We switched to GitHub's ticketing system a bunch of months ago and, well, > it's not making the grade. It's slow. It's limited (no unclosing tickets, > no attachments, weak discussion capaibilities). It doesn't allow easy > planning/prioritization. > > I'd lik

Re: [Lift] Best way to integrate custom lift version in workflow?

2010-01-25 Thread Jeppe Nejsum Madsen
On Mon, Jan 25, 2010 at 4:17 PM, Indrajit Raychaudhuri wrote: > -- Deploy your artifacts to an internal server (all that you need is an http > server where you can 'deploy' the artifact via webdav/ssh etc.) This is the step I would like to avoid :-) We don't currently have any internal servers,

[Lift] Best way to integrate custom lift version in workflow?

2010-01-25 Thread Jeppe Nejsum Madsen
Hi, Now that I'm able to commit code into Lift (evil grin :-) I would like to adapt a workflow that works for me. I think I'll be more productive if I can hack Lift together alongside my project and not have to switch context all the time. I've previously added some of the lift modules (e.g mappe

Re: [Lift] Welcome Jeppe to the Lift committers

2010-01-24 Thread Jeppe Nejsum Madsen
On Fri, Jan 22, 2010 at 5:25 PM, David Pollak wrote: > Folks, > > Please join me in welcoming Jeppe as a Lift Committer.  He's been helping > people on the Lift list and contributing his thoughts to the Lift community > for a while... now it's time for him to contribute code to Lift. > Hooorraaayy

Re: [Lift] buildr?

2010-01-22 Thread Jeppe Nejsum Madsen
Raoul Duke writes: > whatever came of buildr for lift? i haven't stumbled across the answer > googling yet, but i'm still checking... > > thanks. Don't know about buildr, but we've been using Gradle for a while. It comes with a Scala plugin. It doesn't have the nice interactive features as sbt,

Re: [Lift] Ideas for how to inject QueryParams into find() and findAll()

2010-01-21 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim writes: > Why not define a new method? > def findByCurUser(params: QueryParam*) = User.currentUser.flatMap(user=> > find((Seq(By(User.username, user.username.is)) ++ params): _*)) > find returns a Box and currentUser does too, so flatMap flattens them into > one. Basically fin

Re: [Lift] How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Jeppe Nejsum Madsen
"Neil.Lv" writes: > Hi all, > > I use two db connections in my app, and I want to use > DB.prepareStatement to select > the records from the second db. > > It failed, Here is the code: > ### > def getHotByTid(id : Long) = > DB.use(bootstrap.liftweb.TwoDB) { > conn => > DB.

Re: [Lift] Database Default for MappedDateTime

2010-01-19 Thread Jeppe Nejsum Madsen
aw writes: > I have an Oracle table that has a timestamp column with a default > value (current_timestamp). Mapper doesn't allow a save operation > unless I specifically specify a value for the timestamp column. I > would prefer to leverage the database's timestamp vs. the middle > tier's. Is

Re: [Lift] Re: An experience report using Scala & Lift

2010-01-18 Thread Jeppe Nejsum Madsen
On Mon, Jan 18, 2010 at 10:48 PM, Timothy Perrett wrote: > Jeppe, > > Very interesting stuff - agree with most of your points, however, this > statement: > > "While you can’t get code into your templates, it’s easy to get UI > into your code, which is (almost) just as bad. The dynamic part of the

[Lift] An experience report using Scala & Lift

2010-01-18 Thread Jeppe Nejsum Madsen
Hi, A while ago, I started writing an experience report on using Scala & Lift. I finally finished this (it has been a little more than 6 months now, time is flying :-) http://jeppenejsum.wordpress.com/2010/01/18/scala-and-lift-status-after-six-months/ /Jeppe -- You received this message because

Re: [Lift] Missing poms for 2.0-SNAPSHOT?

2010-01-18 Thread Jeppe Nejsum Madsen
On Mon, Jan 18, 2010 at 3:56 PM, Indrajit Raychaudhuri wrote: > Jeppe, > > Good find! This happens because the new top level pom.xml hasn't been > deployed in the scala-tools repo. > > Have fixed in master, give it a try in half an hour or so. Works now, thanks! /Jeppe -- You received this mess

[Lift] Missing poms for 2.0-SNAPSHOT?

2010-01-18 Thread Jeppe Nejsum Madsen
Hi, Just tried an mvn -U clean test and got this: [INFO] Unable to find resource 'net.liftweb:lift:pom:2.0-SNAPSHOT' in repository scala-tools.org.snapshots (http://scala-tools.org/repo- snapshots) [INFO] [ERROR] BUILD ERROR

Re: [Lift] HashMap to JsArray

2010-01-14 Thread Jeppe Nejsum Madsen
"martinsema...@googlemail.com" writes: > Hi > i need some help with a conversation from HashMap to JsArray. > > I have something like: > > var m = new HashMap[String, (Int,Int)] > > and i want to use it in JE.Call as an argument. I think it has to be > converted to a JsArray. Some kind of map or

Re: [Lift] How to write test case involving Mapper

2010-01-14 Thread Jeppe Nejsum Madsen
Ferdinand Chan writes: > Hi, > > I'm writing a unit test for a utility class that will make use of > information of a Model class. Here is the sample code for the model > class > > class Category extends LongKeyedMapper[Category] with IdPK{ > > def getSingleton = Category > > object parentCat

Re: [Lift] Loc id

2010-01-13 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim writes: > The first argument to Loc is a unique id for the menu. Is it used anywhere? /Jeppe -- 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 gr

Re: [Lift] TimeHelpers and SimpleDateFormat

2010-01-11 Thread Jeppe Nejsum Madsen
Timothy Perrett writes: > The whole Date class in Java is not thread safe. We considered swapping to > JodaTime and I know DCB was working on it, but im not sure from the top of my > head if he ever committed / merged what he was working on... > > Cheers, Tim > > On 11 Jan 2010, at 20:10, aw wr

Re: [Lift] LiftRules organization

2010-01-11 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim writes: > A while ago I started working on having separate parsers and formatters in > LiftRules for date, date-time, and time values. These could then be used by > Mapped(Date)(Time). Great! > I would like to continue working on it, and I would appreciate feedback on > the

Re: [Lift] Mapper: Hook into owner lifecycle from field

2010-01-10 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim writes: > How would this be implemented in terms of database table structure? Something like this: CREATE TABLE person (name VARCHAR(20) , id BIGINT NOT NULL AUTO_INCREMENT) CREATE TABLE address (id BIGINT NOT NULL AUTO_INCREMENT , street VARCHAR(20) , valid_to DATE , valid_

Re: [Lift] Mapper: Hook into owner lifecycle from field

2010-01-08 Thread Jeppe Nejsum Madsen
On Thu, Jan 7, 2010 at 6:34 PM, David Pollak wrote: > Can you post some example code of your current thinking as a GitHub project > and we can work on refining it and tuning Mapper/MetaMapper to suit your > needs? I realize the original mail wasn't that informative. What can I say, I was in a hur

Re: [Lift] Re: QueryParams and joins

2010-01-06 Thread Jeppe Nejsum Madsen
Mads Hartmann writes: > Again, I really appreciate you guys helping me out :) > > @Indrajit I just tried with the dependency you declared as the only > lift related dependency. I get the following error. > > > net.liftweb > lift-mapper > 1.1-M8 > Note, Lift 1.1 is not source compatible w

[Lift] Mapper: Hook into owner lifecycle from field

2010-01-05 Thread Jeppe Nejsum Madsen
Hi, I'm trying to extend Mapper with a new MappedField type (basically same as OneToMany, with date/time interval) So the mapped field in the owner object holds a collection of child objects. When I save the owner, the childs should be updated/inserted/deleted as well. The owner can contain seve

[Lift] Status of DB backend for record?

2009-12-21 Thread Jeppe Nejsum Madsen
Hi, What's the status of the DB backend for Record? I'm asking because, I'm about to start adding temporal object support to mapper but would hate to repeat this exercise soon if mapper is going to be superseded by record ;-) Alternatively, can somebody in the know enlighten me how mapper fits (i

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

2009-12-21 Thread Jeppe Nejsum Madsen
tommycli writes: > 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

Re: [Lift] Make it possible to add LocParams to MetaMegaProtoUser's menus

2009-12-18 Thread Jeppe Nejsum Madsen
Heiko Seeberger writes: > Hi, > > I created an issue (#251) to "Make it possible to add LocParams to > MetaMegaProtoUser's menus": > The various user related menus are created by methods xxxMenuLoc (e.g. > loginMenuLoc) which give us no flexibility to add LocParams. Why would there > be a need fo

Re: [Lift] Confused about validation

2009-12-18 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim writes: > What would such an abstraction do? > What code would you like to write (including templates) and what should it do? I had some input here: http://groups.google.com/group/liftweb/browse_thread/thread/814de5be30410925/4a327d21cf4cc123?lnk=gst&q=jeppe+wizard+forms#4a327

Re: [Lift] Re: (Maven problem?) Char encoding problem using S.?

2009-12-13 Thread Jeppe Nejsum Madsen
Indrajit Raychaudhuri writes: [...] > FWIW, PropertyResourceBundle uses properties.load(InputStream) which > assumes ISO-8859-1 (Latin1) encoded stream. In Java 6, however, you have > properties.load(Reader) which does not have this limitation. Oh didn't know about that, thanks. Maybe Lift c

Re: [Lift] Re: (Maven problem?) Char encoding problem using S.?

2009-12-12 Thread Jeppe Nejsum Madsen
Indrajit Raychaudhuri writes: > On 11/12/09 5:28 PM, Jeppe Nejsum Madsen wrote: >> Jean-Adrien writes: >> >> >> [...] >> >> I have the same issues with the localized properties >> >>> = Conclusion = >>> >>> The problem

Re: [Lift] Strange Mapper behaviour

2009-12-12 Thread Jeppe Nejsum Madsen
David Pollak writes: [...] >> I did some digging and it seem an exception is being swallowed at line >> 984 in MetaMapper.scala. So if some code in a mapped field throws during >> boot, it is not included in the mappedFieldList. >> >> So I suggest just logging a warning here. Now that I know th

Re: [Lift] Strange Mapper behaviour

2009-12-11 Thread Jeppe Nejsum Madsen
David Pollak writes: > On Fri, Dec 11, 2009 at 5:58 AM, Jeppe Nejsum Madsen wrote: > >> Hi, >> >> Just spend a few hours tracing down an issue with mapped objects. >> >> Background: >> >> I have trait that I mixin to several Mapper objects to alwa

Re: [Lift] Lift returns http 304 on cached /ajax_request/liftAjax.js with mime type text/plain

2009-12-11 Thread Jeppe Nejsum Madsen
David Pollak writes: > On Fri, Dec 11, 2009 at 12:14 AM, Vesa wrote: > >> When the actual javascript is being sent the mime type is correct. >> This only happens with 304. I don't know if this is a real problem, >> but just noticed that google chrome generates a warning about the mime >> type. >

[Lift] Strange Mapper behaviour

2009-12-11 Thread Jeppe Nejsum Madsen
Hi, Just spend a few hours tracing down an issue with mapped objects. Background: I have trait that I mixin to several Mapper objects to always record the owner of an entity: trait OwnedEntity { self: BaseMapper => object account extends MappedLongForeignKey(this.asInstanceOf[MapperType],

Re: [Lift] Re: (Maven problem?) Char encoding problem using S.?

2009-12-11 Thread Jeppe Nejsum Madsen
Jean-Adrien writes: [...] I have the same issues with the localized properties > = Conclusion = > > The problem here comes from my initial configuration. But in my sense > it is not a good idea to store i18n data in another format than UTF-8. Agreed > Maybe lift should not use java.util.

Re: [Lift] rest service

2009-12-09 Thread Jeppe Nejsum Madsen
Niels Boldt writes: > Hi, > > What is the best way to create a rest service in lift that support both xml > and json. > > Are there any tools to use besides lift-json. The end result of my service > call will be a pojo object that is grabbed from a database and should be > transformed to the appr

Re: [Lift] Re: Multi-Database Transactions

2009-12-09 Thread Jeppe Nejsum Madsen
On Wed, Dec 9, 2009 at 5:05 AM, David Pollak wrote: > I think what you want is the Lift JTA module: > > http://github.com/dpp/liftweb/tree/master/lift-modules/lift-jta/ I think the OP wanted to avoid XA transactions. But of course, if data integriity is important this is the right way to go. I h

Re: [Lift] Re: Fwd: Watch Foursquare Lift talk live from NY

2009-12-08 Thread Jeppe Nejsum Madsen
DMB writes: >>> cherry-pick from a relatively small, tremendously talented pool of >>> developers > > Startups never get to "cherry pick" from anything since they don't > have the dough to pay for best work. If I'm a kick ass dev, why would > I trade my six figure salary for a five figure one wi

Re: [Lift] Re: Race conditions / database transaction isolation levels

2009-12-08 Thread Jeppe Nejsum Madsen
cody koeninger writes: > On Dec 8, 2:19 am, Jeppe Nejsum Madsen wrote: > >> record will not be unlocked until the session times out > > I thought it was stated above that the transaction is scoped to the > request by default, not the session? It is. But even if it

Re: [Lift] By default DB.buildLoanWrapper is eager (Jeppe, please read)

2009-12-08 Thread Jeppe Nejsum Madsen
David Pollak writes: > Folks, > > A month or so ago, I made the DB.buildLoanWrapper lazy. While it provided a > request-duration transaction, it did not actually pull the JDBC connection > from the pool until the first request for the JDBC connection. This led to > some problems. Basically: >

Re: [Lift] Re: Multi-Database Transactions

2009-12-08 Thread Jeppe Nejsum Madsen
deadfolk writes: > Hi Jeppe - thanks for your response. > > So, am I correct in saying that I just need to do something like > this? (not tested code - just an approximation) > > //Assuming fooDb and barDb are some form of connection wrapper... > > S.addAround(List(new LoanWrapper { > def

Re: [Lift] Re: Race conditions / database transaction isolation levels

2009-12-08 Thread Jeppe Nejsum Madsen
cody koeninger writes: > On Dec 6, 9:16 pm, Alex Boisvert wrote: >> Lift's mapper doesn't change the default isolation level of your >> connections, nor does it make explicit use of pessimistic concurrency >> control. >> Anything beyond that we can probably implement, we just need a good >> reas

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

2009-12-06 Thread Jeppe Nejsum Madsen
Alex Black writes: >> If you output null for theattributevalue, theattributeis not >> rendered: > > I've just upgraded from 1.0 to 1.1-M6, and this doesn't seem to work > any more - could this be a bug in M6? Maybe. The code I wrote worked in 1.1-SNAPSHOT at the time.you could try this just

Re: [Lift] A second rewrite phase

2009-12-02 Thread Jeppe Nejsum Madsen
David Pollak writes: > On Wed, Dec 2, 2009 at 2:23 AM, Jeppe Nejsum Madsen wrote: > >> David Pollak writes: >> >> > Folks (especially Jeppe), >> > >> > I've added a second rewrite phase to Lift. The second phase takes place >> > wit

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

2009-12-02 Thread Jeppe Nejsum Madsen
David Pollak writes: > null... shudder. :-) Yeaah, somehow it doesn't look nice anymore :-) Your idea with an Option/Box for attribute binding seems nice & clean /Jeppe > > On Wed, Dec 2, 2009 at 12:32 AM, Jeppe Nejsum Madsen wrote: > >> Alex Black writes: >>

Re: [Lift] Multi-Database Transactions

2009-12-02 Thread Jeppe Nejsum Madsen
deadfolk writes: [...] > I'll likely be using plain JDBC or JPA. What would be my options in > Lift? Can I get a list of connections and just use a filter (or > equivalent) to begin/commit/rollback on each within every request? > I've done some searching, but I've not found anything relating

Re: [Lift] A second rewrite phase

2009-12-02 Thread Jeppe Nejsum Madsen
David Pollak writes: > 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/ Cool stuff. > Anyone who cares about what is acces

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

2009-12-02 Thread Jeppe Nejsum Madsen
Alex Black writes: > Is there a good/reasonable way to conditionally output > checked="checked" or output nothing? If you output null for the attribute value, the attribute is not rendered: scala> bind("stuff", , AttrBindParam("s",Text("checked"),"checked")) res11: scala.xml.NodeSeq = scala>

Re: [Lift] Multipage wizards

2009-11-30 Thread Jeppe Nejsum Madsen
David Pollak writes: [...] >> Thoughts? >> > > Yeah this all sounds good. > > I'm trying to unify most of the pieces of single form inputs, validation, > mapper, record and wizard. It's generally slow going. Good news (about the unification :-) Let me know if there's anything I can do to spee

Re: [Lift] More on bind and preserving attributes

2009-11-29 Thread Jeppe Nejsum Madsen
Ross Mellgren writes: > Okay, I wrote an implicit + operator combo that scraps most of the > boilerplate. > > Snippet code: > > def howdy(in: NodeSeq): NodeSeq = > bind("foobar", in, "foobaz" -%%> FocusOnLoad( name="username" id="email" class="text" input:attrs="" />)) > > (input:attrs=

Re: [Lift] Re: How to get the servlet context

2009-11-29 Thread Jeppe Nejsum Madsen
"Neil.Lv" writes: > Hi Jeppe, > > I have the same question about the image folder. > > Can you paste come example code ( or link ) that the Nginx how to > configure the mapping URL for images ? Have a look at the nginx example: http://wiki.nginx.org/NginxFullExample specifically # serve

Re: [Lift] Re: How to get the servlet context

2009-11-28 Thread Jeppe Nejsum Madsen
jhonig writes: > Dear Tim and Heiko, > > I tested a few things under mvn jetty:run...: > > getRealPath gives me "./src/main/webapp" > the temp attribute is set to "./target/work" > and the location is "./target/classes" > > While the war contains "classes/work" which is again di

Re: [Lift] More on bind and preserving attributes

2009-11-28 Thread Jeppe Nejsum Madsen
Ross Mellgren writes: > I'm not sure if this addresses your points, but I figured I'd throw > out what I've been doing in case it helps. It's always nice to see how others approach a problem! > I don't use -%>, but I do use something similar along with another > implicit so I can place the

Re: [Lift] Building war for production mode.

2009-11-27 Thread Jeppe Nejsum Madsen
Marcin Jurczuk writes: > Hello, > > I'm trying to first test deploy of my app :) > > I created package (mvn package), uploaded created war as root.war in > webapp folder of jetty server and when running app it looks that lift > app is running in development mode (no 404 is showed but: > "The requ

[Lift] More on bind and preserving attributes

2009-11-27 Thread Jeppe Nejsum Madsen
Hi, I know this has been discussed somewhat at length (e.g. here http://groups.google.com/group/liftweb/browse_thread/thread/27aed5f45faf759/a261a2dfe0ae7207?lnk=gst&q=attributes+bind#a261a2dfe0ae7207) but I still think the default behaviour of -> should be reconsidered if at all possible. Here's

Re: [Lift] Re: Access do Database objects from scala:console

2009-11-26 Thread Jeppe Nejsum Madsen
Marcin Jurczuk writes: > Thanks .. read that ...and look and dmap implementation however it > doesn't work like I expected: > > > scala> r.dmap("application/octet-stream")(_.contentType.is) > res49: java.lang.String = null This is (probably) because contentType is null. The dmap only opens the B

Re: [Lift] Access do Database objects from scala:console

2009-11-26 Thread Jeppe Nejsum Madsen
Marcin Jurczuk writes: > Hello, > > Can someone point me how to access data from Box object return by > mapper query: [...] > scala> var r = RejDocBin.find(By(RejDocBin.DocBinId,4)) > r: net.liftweb.common.Box[pl.com.company.model.RejDocBin] = Full > (pl.com.company.model.RejDocBin= > {docbin..

Re: [Lift] Multipage wizards

2009-11-25 Thread Jeppe Nejsum Madsen
David Pollak writes: > Folks, > > I've completed the first pass at multi-page input Wizards in Lift. You can > see an example at: http://demo.liftweb.net/wiz Great news! [...] > The building of HTML forms from the given field type is based on the type > (currently, there's support for String

Re: [Lift] Problem with issue 182

2009-11-24 Thread Jeppe Nejsum Madsen
Derek Chen-Becker writes: > I was thinking something along the lines of: > > override def menus = super[MegaMetaProtoUser].menus ::: super[CRUDify].menus Ahh yes, didn't think of this "super" syntax > if you need both, but I suppose it's simpler to just remove it. I'll code up > the change and

Re: [Lift] Problem with issue 182

2009-11-24 Thread Jeppe Nejsum Madsen
Derek Chen-Becker writes: > OK, thinking about this a little further, technically it would be a breaking > change to remove the menus method from MetaMegaProtoUser. Yes, but is that really an issue here? > Would it be better to simply introduce a MenuGenerator trait, a la > > trait MenuGenera

Re: [Lift] Improving lift-flot

2009-11-24 Thread Jeppe Nejsum Madsen
Peter Robinett writes: > I've been working with lift-flot a lot recently and I'd like to share > some thoughts and suggest some improvements. It's a very useful > interface to a great Javascript plotting library, so consider these as > small suggestions from a fan. > I had some of the same conce

Re: [Lift] Re: Where are the dragons hiding?

2009-11-23 Thread Jeppe Nejsum Madsen
Marius writes: > It should be just fine. > > You can tell lift to not use Ajax or any JS at all. There are some > flags in LiftRules to do that. > > LiftRules.setAutoIncludeComet = false; > LiftRules.setAutoIncludeAjax = false; > > > Besides that just don't use JS in your markup or don't use Lift

Re: [Lift] Mapper vs. Record vs. JPA

2009-11-22 Thread Jeppe Nejsum Madsen
Oscar Picasso writes: > I am starting to (re)learn lift and wondering which persistence mechanism I > should use: Mapper, Record or JPA? Depending on your choice of backend, Record may not be an option (yet). AFAIK, the RDBMS backend is not there yet /Jeppe -- You received this message b

Re: [Lift] A sensible AJAX approach

2009-11-19 Thread Jeppe Nejsum Madsen
Chris Lewis writes: > Thanks for the feedback Jeppe. I can't completely infer the context of > your example, Seems to happen a lot to me lately. :-) This was just a quick paste from our codebase > but I get the idea (and I hadn't known about TemplateFinder). Here's > what I've hacked toget

Re: [Lift] How can one bind attribute values in a snippet?

2009-11-19 Thread Jeppe Nejsum Madsen
Alex Black writes: > For example, if my html template looks like this: > > > foobar > > > > > > In my snippet I'd like to replace "dummy" (in img src) with a real > value. I'm sure there are other ways to output img tags with > a

Re: [Lift] Problem with issue 182

2009-11-19 Thread Jeppe Nejsum Madsen
Derek Chen-Becker writes: > I hadn't though about mixing in CRUDify with users. I suppose we should just > pull it out and leave sitemap as the sole menuing method. Jeppe, can you > open a ticket? Sure: http://github.com/dpp/liftweb/issues/#issue/200 /Jeppe -- You received this message becaus

Re: [Lift] A sensible AJAX approach

2009-11-19 Thread Jeppe Nejsum Madsen
Chris Lewis writes: > Classic use case: a user chooses to view/edit and object by clicking on > a link. This causes the app to fetch an edit view (form) and render it > asynchronously, probably rendering it as a modal dialog. To specify the > case a bit more, consider a table of like objects t

[Lift] Re: odd ajax issue (works every other time)

2009-11-19 Thread Jeppe Nejsum Madsen
On Nov 19, 8:16 pm, David Pollak wrote: > On Wed, Nov 18, 2009 at 10:28 PM, Marius wrote: > > That makes two of us David ... > > > The thing is that during my debugging there was no session destruction > > and I traced this right in the guts of SessionMaster. > > I went further and it seemed th

Re: [Lift] Re: Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Jeppe Nejsum Madsen
Kris Nuttycombe writes: > On Wed, Nov 18, 2009 at 1:51 PM, Jeppe Nejsum Madsen wrote: >> Kris Nuttycombe writes: >> >>> On Wed, Nov 18, 2009 at 12:31 PM, glenn wrote: >>>> Kris, >>>> >>>> Don't want to clone the GitHub

Re: [Lift] Re: Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Jeppe Nejsum Madsen
Kris Nuttycombe writes: > On Wed, Nov 18, 2009 at 12:31 PM, glenn wrote: >> Kris, >> >> Don't want to clone the GitHub repo, as I need a Maven repo. >> >> Glenn >> > > Out of curiosity, is this because you have a Maven tool that helps > automate interaction with a debugger? If so I'd be interest

Re: [Lift] Missing source files in 1.1-SNAPSHOT

2009-11-18 Thread Jeppe Nejsum Madsen
glenn writes: > Where are all the java source files in > http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNAPSHOT/lift-webkit-1.1-SNAPSHOT-sources.jar? > > It's kind of hard to debug without them. FWIW, http://github.com/dpp/liftweb/issues#issue/167 /Jeppe -- You received th

[Lift] Re: *** BREAKING CHANGES *** to Loc & LocParam

2009-11-17 Thread Jeppe Nejsum Madsen
On Nov 17, 3:37 pm, Jeppe Nejsum Madsen wrote: > On Nov 17, 12:11 am, David Pollak > wrote: [...] > Did this ever get resolved? I'm still seeing this after an update to > latest. This is pretty major, so I looked into it and found this: > > 1) The Template LocParam def

[Lift] Problem with issue 182

2009-11-17 Thread Jeppe Nejsum Madsen
Hi, Just updated to latest snapshot and noticed http://github.com/dpp/liftweb/issues/closed/#issue/182 Imo, this is a bad idea since it makes it impossible to mixin Crudify to get easy user editing/listing. It's not a big problem for me since I have made my own Crudifyjust noticed it since

[Lift] Re: *** BREAKING CHANGES *** to Loc & LocParam

2009-11-17 Thread Jeppe Nejsum Madsen
On Nov 17, 12:11 am, David Pollak wrote: > On Mon, Nov 16, 2009 at 3:10 PM, Kris Nuttycombe > wrote: > > > > > > > On Mon, Nov 16, 2009 at 4:02 PM, David Pollak > > wrote: > > > > On Mon, Nov 16, 2009 at 2:20 PM, Kris Nuttycombe < > > kris.nuttyco...@gmail.com> > > > wrote: > > > >> On Mon, Nov 1

Re: [Lift] replay prevention tokens

2009-11-17 Thread Jeppe Nejsum Madsen
opyate writes: [...] > I'm bleeding edge at the moment (1.1-SNAPSHOT and "mvn -U clean" > always) and since about an hour ago my login form doesn't render with > new tokens, and subsequent login attempts are ignored. > > I am overriding a few of the login methods in ProtoUser and want to > inves

Re: [Lift] Re: Hitting a compiler bug (it seems)

2009-11-17 Thread Jeppe Nejsum Madsen
DMB writes: > Hmm, apparently all generators must be of the same type or down-cast > to the same type. So > > def masters = for { > sy <- selectedYear > sm <- selectedMonth > m = Master.getMastersWithTags(sy, sm) > } yield m > > m.get //

[Lift] Re: Database handling during rewrite

2009-11-17 Thread Jeppe Nejsum Madsen
On Nov 16, 7:46 pm, David Pollak wrote: > On Mon, Nov 16, 2009 at 2:24 AM, Jeppe Nejsum Madsen wrote: > > > > > Hi, > > > I've solved my issues with using SessionVars during rewrite, but during > > this, I noted that quite a few DB connections are created

[Lift] Re: How to use Box

2009-11-16 Thread Jeppe Nejsum Madsen
Jean-Luc writes: > *open_!* can be very convenient, but it can throw unexpected exceptions. > Better to avoid its use whenever possible. > > And what about something like that : > > val username = User.find(id).map(_.name) getOrElse "User not found" > > or > > val username = (for(user <- User.f

[Lift] Database handling during rewrite

2009-11-16 Thread Jeppe Nejsum Madsen
Hi, I've solved my issues with using SessionVars during rewrite, but during this, I noted that quite a few DB connections are created during the rewrite phase: It seems every Mapper query opens a connection, executes the query and then closes the connection. Question: Is this needed? I have two

[Lift] Re: How do I guarantee that logic will execute before render?

2009-11-15 Thread Jeppe Nejsum Madsen
DMB writes: > Here's a simple problem. I have a web page which is supposed to > display a gallery. > > The page has two snippets in it. One of the snippets is month/year > selector, which takes (in the order of priority) URL parameters or > cookies and renders year/month selections accordingly.

[Lift] Re: Problem with rewriting and SessionVar

2009-11-13 Thread Jeppe Nejsum Madsen
David Pollak writes: [...] > Yes. The rewrite phase takes place very early in the HTTP request/response > cycle. It takes place before the statelessDispatch call. The > statelessDispatch call is very important for REST style APIs as it does > *not* cause the creation of a session, thus for l

[Lift] Problem with rewriting and SessionVar

2009-11-13 Thread Jeppe Nejsum Madsen
Hi, I seem to have a problem with SessionVars which I try to initialize in a LocRewrite. This is an entry point url to the app. It receives some parameters from the url, picks out the parameters and puts them in SessionVars and rewrites the request. I have problems setting the SessionVar when I

[Lift] Re: lift-webkit-1.1-SNAPSHOT contains duplicate classes (e.g. Box.class)

2009-11-13 Thread Jeppe Nejsum Madsen
Heiko Seeberger writes: > I cannot see, how the maven-bundle-plugin should affect the creation of the > source jar, but who knows ... My bad..not knowing maven, I assumed the bundle plugin is the one that creates jars. From a cursory look, I can see it seems to only bundle class files > Locall

[Lift] Re: lift-webkit-1.1-SNAPSHOT contains duplicate classes (e.g. Box.class)

2009-11-13 Thread Jeppe Nejsum Madsen
Heiko Seeberger writes: > I fixed it and it is on review board ... Does this by any chance also fix http://github.com/dpp/liftweb/issues#issue/167 They both seem to be related to the maven bundle config /Jeppe --~--~-~--~~~---~--~~ You received this messa

[Lift] Re: Wizard at BASE

2009-11-10 Thread Jeppe Nejsum Madsen
David Pollak writes: > On Tue, Nov 10, 2009 at 1:12 PM, Peter Robinett > wrote: > >> >> Thanks, Naftoli, it sounds like the solution you describe is what I >> thought Wizard would (or could) be. >> > > Wizard is a conceptual descendant of SmartMode Wizard (see > http://tunaforcats.com/wizard.wm

[Lift] Re: form input tag name values changed when moving from M6 to M7

2009-11-10 Thread Jeppe Nejsum Madsen
Timothy Perrett writes: > If Lift is running in test mode the element names should be static, right? Only for the same version of Lift. As David wrote in a (this?) thread, when in test mode, the id is basically a hash of the stack trace. So when lift is updated, the ids (most likely) change and

[Lift] Re: Working with database views

2009-11-08 Thread Jeppe Nejsum Madsen
GA writes: > Hello guys, > > I need to create a database view to create a very specific query from > an API. I am planning the following steps: > > 1. Create the view in the database directly > 2. Create a model without a primary key extending Mapper instead of > Keymapper > 3. I am not goin

[Lift] Re: About the localization with lift:loc !

2009-11-07 Thread Jeppe Nejsum Madsen
Timothy Perrett writes: > You should always be working with UTF-8 files for properties / > localisation - I think the encoding reported by jetty is something > different (that it reads from the system)... ensure your props files > are UTF-8 and go from there. Careful now :-) Property files that

[Lift] Re: Rendering a "template bit"

2009-11-05 Thread Jeppe Nejsum Madsen
DFectuoso writes: > The thing is that i want the NodeSeq to reside in a html file, not > inside the model. Have a look at TemplateFinder.findAnyTemplate, it will load the template from file. If you want to process a complete template, look at S.runTemplate /Jeppe --~--~-~--~~--

[Lift] Re: record framework questions

2009-11-05 Thread Jeppe Nejsum Madsen
David Pollak writes: > > The most important driver of Record is people using it. Tim has been doing > some stuff with it. If you start using it actively, you'll be the guy > driving a lot of the changes. I think a big blocker for more people starting to use Record is the RDBMS backend (I know

[Lift] Re: ajax-loader not showing?

2009-11-03 Thread Jeppe Nejsum Madsen
Works :-) Thanks. /Jeppe On Tue, Nov 3, 2009 at 12:20 AM, David Pollak wrote: > Fixed > > On Sat, Oct 31, 2009 at 9:04 AM, Jeppe Nejsum Madsen > wrote: >> >> David Pollak writes: >> > >> > It's a bug.  Please file a ticket. >> >

[Lift] Re: camelCase to snake_case

2009-11-01 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim writes: > Probably not too hard to do on your own via a trait: the trait should extend > MappedField, override dbColumnName, and calculate it based on getClass. While this works, I think it is too tedious to do on all classes and fields. I think a better approach would be to

[Lift] Re: ajax-loader not showing?

2009-10-31 Thread Jeppe Nejsum Madsen
David Pollak writes: > > It's a bug. Please file a ticket. Done. http://github.com/dpp/liftweb/issues/#issue/152 /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send em

[Lift] Re: ajax-loader not showing?

2009-10-31 Thread Jeppe Nejsum Madsen
Timothy Perrett writes: > Jeppe, did you get any further with this? Nope. Don't really know how it's supposed to work, so haven't filed a ticket (yet :-) I took a cursory look at the javascript generated by Lift for ajax handling and to me it looks like the functionality to show the image is n

[Lift] Re: How can call server 'ajax' function by my ajax code?

2009-10-30 Thread Jeppe Nejsum Madsen
Xuefeng Wu writes: > I want call function on the server side form client. > such as: > HTML client: > $.("#myLink").click(function{ > //call server function > }); > > Server side: > def myFunction() :JsCmd = { >JsRaw("alert("Ah~ you could call me from client directly!")") > } It looks

[Lift] Re: How can call server 'ajax' function by my ajax code?

2009-10-30 Thread Jeppe Nejsum Madsen
Xuefeng Wu writes: > Or can I register ajax event at server side? > > On Oct 30, 10:24 am, Xuefeng Wu wrote: >> Hi, >> >> There're many ajax* control in SHtml such as ajaxButton and they can >> call server function by 'liftAjax.lift_ajaxHandler >> ("F900890988391MRF=true", null, null, null);

[Lift] Re: How to hidden the Menu Loc? This hidden attr doesn't work!

2009-10-29 Thread Jeppe Nejsum Madsen
"Neil.Lv" writes: > Hi all, > >I have a question about the Loc , and How to hidden the Menu if the > user is not a superuser ? > >The code is : > The Edit book 1 always shows in the home page if the user doesn't > login. > The Edit book 2 doesn't work both login in or not . > #

[Lift] Re: Overriding binding of numbers?

2009-10-29 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim writes: > Is there already a BindParam implicit for String -> Double? Because if not > maybe you can create one. No there isn't, but I also need Int for which there is one, so probably my attempt is futile. I've solved it for now with a BindNumber method, but it breaks the n

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

<    1   2   3   4   5   6   >