[Lift] Re: jpa, emf Model and unit tests

2009-04-27 Thread Viktor Klang
Also, if you use Hibernate, you can use: *Session.createFilter*(city.getAddresses(), "where this.name like 'S%'").list(); On Tue, Apr 28, 2009 at 5:31 AM, Derek Chen-Becker wrote: > OK, for one, the bidirectional mapping adds no cost in terms of DB access > other than the time it takes you to wr

[Lift] Re: jpa, emf Model and unit tests

2009-04-27 Thread Derek Chen-Becker
OK, for one, the bidirectional mapping adds no cost in terms of DB access other than the time it takes you to write it. Collections are lazily loaded, so unless your code *retrieves* City.addresses, the database never gets hit. JPA is really not designed with the concept of entities having access t

[Lift] Re: Javascript "confirm(..)" dialog with ajaxButton

2009-04-27 Thread Chris
Hi Tim, just one addition. Wicket has something called an ajaxcall decorator (IAjaxCallDecorator) that allows you to modify the script and more specifically the "decorateScript" method allows you to prepend a char- sequence to the script. This would allow me to do exactly what I want. Is there any

[Lift] Re: Javascript "confirm(..)" dialog with ajaxButton

2009-04-27 Thread Chris
Hi Tim, not sure if I really got across what I need. I need the AJAX functionality in this case as I'm displaying a large amount of data in a table and would like to allow the user to delete individual records without the refresh problem of having the button cause a POST. I also need to make sure

[Lift] Re: jpa, emf Model and unit tests

2009-04-27 Thread TSP
There are two questions here. I don't really want to get bogged down in bidrectional mappings I was rather hoping for suggestions on how my domain objects might simply get at the right Model transparently from both application and junit (in Grails it was done with Spring injection - here perhaps a

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread Charles F. Munat
Can't it just be ? David Pollak wrote: > > > On Mon, Apr 27, 2009 at 3:25 AM, marius d. > wrote: > > > I'm not referring to something similar to lift:bind. Just that using > snippets or Loc snippets, chooseTemplate etc. gives you the ability to > t

[Lift] Re: Javascript "confirm(..)" dialog with ajaxButton

2009-04-27 Thread Timothy Perrett
Hey, Seems like you have a couple of options... 1. you could just write normal javascript irrespective of lift and just put that in a JS file like normal. Something like: $('#mybutton').click(function(e){ confirm... //blah blah code here }); 2. If you *really* want to use the on-click handle

[Lift] Javascript "confirm(..)" dialog with ajaxButton

2009-04-27 Thread Chris
Hi there, I'm pretty new to Lift and Scala for that matter, but have long been on the lookout for something like seaside running on the JVM and this is just great! Now to my issue... I've hit a brick-wall in the attempt to get a confirmation dialog working before executing an ajaxButton. I've trie

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread Timothy Perrett
Sounds great gents! Looking forward to the update. Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this grou

[Lift] Re: slicing off a web front end

2009-04-27 Thread Derek Chen-Becker
Could you give me some sample ajax urls? This looks like it should be pretty simple but I'm still a little lost in Rails. Derek On Sat, Apr 25, 2009 at 12:12 AM, Meredith Gregory wrote: > Derek, > > Apologies for the delay. i just saw this. The requests are in > rails/app/controllers/pipes_cont

[Lift] Re: malformed Scala signature of User

2009-04-27 Thread erik.karls...@iki.fi
Hi, I have noticed this and I always run mvn clean before running the tests or just compiling them. So I get the issue even I run the clean command. -erik David Pollak kirjoitti: > Erik, > > Please do an: > > mvn clean test > > From the command line. > > The Eclipse plugin uses a different vers

[Lift] Re: jpa, emf Model and unit tests

2009-04-27 Thread Derek Chen-Becker
I may be misunderstanding this, but if you just do bidirectional mappings in JPA then the DB query is generally efficient and transparent. Could you post a little snippet showing what you're trying to do? Derek On Mon, Apr 27, 2009 at 2:44 PM, TSP wrote: > > Viktor, > It's a valid point, and I

[Lift] Re: malformed Scala signature of User

2009-04-27 Thread David Pollak
Erik, Please do an: mvn clean test >From the command line. The Eclipse plugin uses a different version of Scala than does Lift. There will be weird errors like the one you've seen. Thanks, David On Mon, Apr 27, 2009 at 2:24 PM, erik.karls...@iki.fi < erik.b.karls...@gmail.com> wrote: > > W

[Lift] Re: malformed Scala signature of User

2009-04-27 Thread erik.karls...@iki.fi
Weird thing is that I'm able to mock "MetaTeam": --- trait MetaTeam extends Team with LongKeyedMetaMapper[Team] { def findByUser(user:User): List[Team] } object Team extends MetaTeam { def findByUser(user:User): List[Team] = UserTeam.findAll( By(UserTeam.user, user.id), Orde

[Lift] malformed Scala signature of User

2009-04-27 Thread erik.karls...@iki.fi
Hi, I have set of specs test and I'm using mockito I noticed that if I have a list of Users (pretty much same class that is coming from archetype) and do following test: users(1).firstName must beEqualTo(name2) Then I get : [WARNING] Exception in thread "main" java.lang.RuntimeException: malfo

[Lift] Re: StatefulSnippet Beginner

2009-04-27 Thread Derek Chen-Becker
StatefulSnippet example is in now. On Sat, Apr 18, 2009 at 8:44 PM, Derek Chen-Becker wrote: > I'll add in an example for StatefulSnippet. We have one already in > PocketChange, so I just need to copy the code listing in. You should be able > to mix the two as you see fit. > > Derek > > > On Sat,

[Lift] Re: jpa, emf Model and unit tests

2009-04-27 Thread TSP
Viktor, It's a valid point, and I would where possible but I've got quite a lot of uni-directional references (for example, addressable locations in a city) where using a mapping would entail very large fetches that are better handled by querying the database. Evans in Domain Driven Design is very

[Lift] Re: jpa, emf Model and unit tests

2009-04-27 Thread Viktor Klang
Why don't collection mappings work? Also, from personal experience, mixing persistence-logic in domain objects does make you feel somewhat naughty. On Mon, Apr 27, 2009 at 9:15 PM, Tim P wrote: > > Hi > I'm looking for some guidance here and I don't think this is addressed > in the book. > > I'

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread David Pollak
Go for it! On Mon, Apr 27, 2009 at 12:53 PM, marius d. wrote: > > I could implement this soon if you are too busy. Just let me know. > > Br's, > Marius > > On Apr 27, 10:37 pm, David Pollak > wrote: > > On Mon, Apr 27, 2009 at 12:33 PM, marius d. > wrote: > > > > > Good ... well then shouldn't

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread marius d.
I could implement this soon if you are too busy. Just let me know. Br's, Marius On Apr 27, 10:37 pm, David Pollak wrote: > On Mon, Apr 27, 2009 at 12:33 PM, marius d. wrote: > > > Good ... well then shouldn't the same rationale be applied for > > since with-param is not really a snippet invoc

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread David Pollak
On Mon, Apr 27, 2009 at 12:33 PM, marius d. wrote: > > Good ... well then shouldn't the same rationale be applied for > since with-param is not really a snippet invocation? > > perhaps for lift tags that are not really snippets to use: > > > Sure... the old tags should be deprecated and prin

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread marius d.
Good ... well then shouldn't the same rationale be applied for since with-param is not really a snippet invocation? perhaps for lift tags that are not really snippets to use: ? Br's, Marius On Apr 27, 10:08 pm, David Pollak wrote: > On Mon, Apr 27, 2009 at 3:25 AM, marius d. wrote: > > >

[Lift] jpa, emf Model and unit tests

2009-04-27 Thread Tim P
Hi I'm looking for some guidance here and I don't think this is addressed in the book. I've got domain classes that need to go get stuff from the database "list all ... " type of methods. So presumably my domain class should have, or be allowed to have methods that access Model But my unit tests

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread David Pollak
On Mon, Apr 27, 2009 at 3:25 AM, marius d. wrote: > > I'm not referring to something similar to lift:bind. Just that using > snippets or Loc snippets, chooseTemplate etc. gives you the ability to > to change content depending on what page you are which is with-param > kind of does. > > No worries

[Lift] Re: Getting started: No XML output, docs and basic restful CRUD (on GAE)

2009-04-27 Thread David Pollak
On Mon, Apr 27, 2009 at 7:53 AM, Tom wrote: > > Hello List, > > I just started with Scala and Lift. Installation was pretty straight > forward (I only had to fight with Debian SIDs Java .. it needed > OpenJDK instead of what is provided as default. Maven threw exceptions > with gnuJava) > So far

[Lift] Re: Feedback on screen cast, please

2009-04-27 Thread Meredith Gregory
David, Your screencast is very well done. There is one small change i would make to add a layer regarding the management of complexity. Make a change to the app: a small but noticeable change, like reorder the messages newest to oldest with a timestamp, or something. It would be ideal if somewhere

[Lift] Re: Feedback on screen cast, please

2009-04-27 Thread Timothy Perrett
I usually upload quicktime and let blip do the flash conversion... using QT as source means you can subscribe via itunes I do belive. Cheers, Tim On Apr 27, 8:34 am, Alexander Kellett wrote: > jfyi, it seems its not possible to download the movie via the > "subscribe with itunes" link, maybe if

[Lift] Re: How to set different response in lift

2009-04-27 Thread David Pollak
The enclosed example demonstrates how to use the Lift rendering mechanism to generate an XML file based on a Lift template and send it back to the browser. Look at the lib.PageChunkServer.scala file to see how it's done. Thanks, David On Mon, Apr 27, 2009 at 2:57 AM, pravin wrote: > > Hi guys

[Lift] Re: How to set different response in lift

2009-04-27 Thread marius d.
BTW ... I'm not sure why you'd prefer an XML response back instead of JSON or JavaScript ... but it's up to you. Br's, Marius On Apr 27, 8:13 pm, "marius d." wrote: > Of course ...  You can use: > > 1. DispatchPf functions and return an XmlResponse > 2. Try this: > >   def ajaxButton(text: Node

[Lift] Re: How to set different response in lift

2009-04-27 Thread marius d.
Of course ... You can use: 1. DispatchPf functions and return an XmlResponse 2. Try this: def ajaxButton(text: NodeSeq, func: () => NodeSeq, attrs: (String, String)*): Elem = { attrs.foldLeft(fmapFunc(NFuncHolder(func))(name => {text}))(_ % _) } When processing Ajax requests li

[Lift] Re: from where can i get lifts sample examples

2009-04-27 Thread Timothy Perrett
Check out these: http://is.gd/uTbj Cheers, Tim On 27/04/2009 13:32, "pravin" wrote: > > Hi guys, > > i want sample examples of lift > from where i will get these sample examples? > > > > > > --~--~-~--~~~---~--~~ You received this message because you

[Lift] Getting started: No XML output, docs and basic restful CRUD (on GAE)

2009-04-27 Thread Tom
Hello List, I just started with Scala and Lift. Installation was pretty straight forward (I only had to fight with Debian SIDs Java .. it needed OpenJDK instead of what is provided as default. Maven threw exceptions with gnuJava) So far I read one book about Scala and I looked at a few howtos on

[Lift] from where can i get lifts sample examples

2009-04-27 Thread pravin
Hi guys, i want sample examples of lift from where i will get these sample examples? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To u

[Lift] How to set different response in lift

2009-04-27 Thread pravin
Hi guys, i want send xml response to request when i click on button i should get xml file as response in browser . How can i do that in lift? Thanks in advanced. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lif

[Lift] Re: Feedback on screen cast, please

2009-04-27 Thread James Strachan
Great stuff! The only thing I can think of that could be improved is maybe mentioning the JavaRebel stuff; when seeing Rails demos, there's no stop-start-wait-30 seconds type stuff while maven does its thing - maybe in the next screen cast the JavaRebel stuff could be shown so that the same rails

[Lift] Re: Object typecast to Mapper

2009-04-27 Thread Amit Kumar Verma
Hi All, Thanks again, for support. Made many things more clear. Thanks Amit Kumar Verma On Apr 22, 1:35 am, David Pollak wrote: > Amit, > Class.forName(...) is called reflection in Scala/Java land.  It allows you > to get a class based on a String.  You can then create a new instance of the >

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread marius d.
I'm not referring to something similar to lift:bind. Just that using snippets or Loc snippets, chooseTemplate etc. gives you the ability to to change content depending on what page you are which is with-param kind of does. No worries, these are valid question and to me it kind of boils down to th

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread Timothy Perrett
Can you be specific about which other lift artefacts you want to replace lift:bind with? Im not fighting lift:binds corner or anything, rather, just interested to know what will supersede it because this kind of functionality is key in our template strategy. Cheers, Tim On 27/04/2009 10:13, "ma

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread marius d.
Right now: bits me ... perhaps Dave has more input. However it seems to me that what we can do with / today, it can be easily done without it using the other Lift artifacts. Still probably people got used with style and finds this pretty handy? Br's, Marius On Apr 27, 11:23 am, Timothy Perrett

[Lift] Re: Upgrade to 2.7.4 breaks "with-param"?

2009-04-27 Thread Timothy Perrett
Ah right, so your thinking that lift:bind will go, and be replaced with something similar that uses our existing snippet infrastructure? Cheers, Tim On 27/04/2009 07:28, "marius d." wrote: > BTW ... there were previous discussions that for 1.1 we'll deprecate > lift:bind, right? ... if so wit

[Lift] Re: Feedback on screen cast, please

2009-04-27 Thread Alexander Kellett
jfyi, it seems its not possible to download the movie via the "subscribe with itunes" link, maybe if you upload a mp4 version of the content it would? i'm certain i'm not the only one that much prefers to watch on a portable device / while offline. Alex On Sat, Apr 25, 2009 at 3:10 PM, David Pol