Will do, if I figure it out. But my comment wasn't complaining. I am
honestly mystified. Am I the only one using trees in Hibernate? Is there
a tree library in Scala that I'm missing? What the heck does everyone
else do? It just blows my mind.
Chas.
Viktor Klang wrote:
On Mon, Dec 1,
That will probably work. I was thinking it would be nice to build in a
method findOrNew that would do it for me... but it looks like that might
involve some sort of implicit manifest thingy, so I don't know.
Chas.
Viktor Klang wrote:
On Mon, Dec 1, 2008 at 7:12 AM, Charles F. Munat
Are you including a link to the parent node or are you just using the
left and right values to figure out which nodes are children? I always
include a foreign key to the parent so I can just select the children of
that parent directly. Then to get all descendants, I use the left and
right
Im not sure I follow? Can you use this diagram to try and explain?:
http://dev.mysql.com/tech-resources/articles/hierarchical-data-4.png
If you wanted to select the direct children of 'electronics', how
would one go about doing that? Is there a simpler way than all that
HQL?
Cheers
Tim
On
http://github.com/tjweir/liftbook/tree/master
See earlier posts for details.
Derek
On Sun, Nov 30, 2008 at 7:33 PM, Oscar Picasso [EMAIL PROTECTED]wrote:
Which book are you talking about?
I didn't know that they were already chapters of a lift book we could
read.
On Wed, Nov 26, 2008 at
Because it's type erasure I don't think I can do a generic new inside the
methods, but the findOne method does return a Can. That means that you were
actually pretty close in your demo code. Here's what it could look like:
val user: User =
Model.createNamedQuery[User](
findUserByUsername,
For now the plugin lives here:
http://github.com/dchenbecker/maven-lift/tree/master
I'm going to talk to David B. about hosting the plugin on scala-tools, but
for now you can check it out and do a mvn install on the source. Then add
plugin
groupIdnet.liftweb.tools/groupId
Tim,
Please remember that Lift's Snippet processing is recursive. Thus, you
don't really need to hook into the templating system in order to be able to
using Lift's templates. For example, if your snippet returned:
spanlift:comet type=Dog/lift:comet type=Cat//span
Lift would then interpret
On Sun, Nov 30, 2008 at 3:46 PM, Derek Chen-Becker [EMAIL PROTECTED]wrote:
OK, I have a maven-lift plugin done with an i18ngen target that you can
use to parse all of your Scala and xhtml sources for i18n keys (lift:loc,
etc). The question now is, where should I put it? Should I put it in the
Hey David,
Thanks for the response - I have been reflecting on the whole L2 cache
thing today and kind of came to the same conclusion. If the content
has been served, it might as well be cached in its entirety as a HTML
file so it can then be served by the front end web-server (nginx,
apache
On Wed, Nov 26, 2008 at 2:44 PM, Alex Boisvert [EMAIL PROTECTED] wrote:
... extends PartialFunction with Named ?
I was looking to name the companion object.
It's called NamedPF
alex
On Wed, Nov 26, 2008 at 2:08 PM, TylerWeir [EMAIL PROTECTED] wrote:
DebugPartialFunction,
I've added def dmap[B](dflt: = B)(f: A = B): B to Cans:
S.param(foo).dmap(5)(toInt)
On Fri, Nov 28, 2008 at 6:53 AM, Derek Chen-Becker [EMAIL PROTECTED]wrote:
I have to say, I love this Can-map-openOr idiom. I use it all of the
time in my code for parameter handling, etc.
Derek
On Fri,
On Fri, Nov 28, 2008 at 4:39 AM, Acciaio [EMAIL PROTECTED] wrote:
Thanx for the advice,
Now I'm writing code into eclipse with a project setted up without
source files to compile
and after I run jetty I also run a scala:cc on the same project...
Don't works perfectly but in this way I
My 2 cents:
- I'm strongly opposed to any compiler plugins as they (1) mean that IDEs
will work less well and (2) they require some sort of installation (if they
can be rolled into the Maven building stuff, it makes this objection go
away)
- I'm strongly opposed to mixing
On Mon, Dec 1, 2008 at 10:24 AM, Alex Boisvert [EMAIL PROTECTED] wrote:
Isn't this similar to Option.mapOrElse that you opposed on the scala
mailing list? :)
In fact it is. :-)
Polluting Scala is bad. Polluting Lift is less bad.
alex
On Mon, Dec 1, 2008 at 9:55 AM, David Pollak
Marius,
Back when I wrote the mapper stuff, there were a bunch of limitations of
using vals:
- Because of uniform access rules, the difference between val foo = new
Thing ; def bar = foo was not possible to calculate. It looks like the
compiler now stores things in a named field, so
- I'm pretty close to having a releasable version of the maven-scala-plugin
that supports compiler plugins.
- Adding integration between the maven-pom and eclipse is going to take some
time (but is possible). I'm not sure about the netbeans/IntelliJ tools,
but this could be an awkward integration
On Dec 1, 8:22 pm, David Pollak [EMAIL PROTECTED]
wrote:
My 2 cents:
- I'm strongly opposed to any compiler plugins as they (1) mean that IDEs
will work less well and (2) they require some sort of installation (if they
can be rolled into the Maven building stuff, it makes this
Hi ... new to Scala and Lift. I'm having trouble understanding how to
think about a project with a horizontally scaled database. I guess
people call this sharding these days? My existing app uses PHP, no
framework, and no O-R mapping. It's all PHP/MySQL with SQL
statements. Some O-R mappers
When I use a nested set, I make it like a combination of nested set and
a simple tree. So in my database, I have:
idparent_idlftrgtname
--
1 NULL 1 20Electronics
21 2 9Televisions
3
On Sun, Nov 30, 2008 at 6:27 AM, Derek Chen-Becker
[EMAIL PROTECTED] wrote:
If you're heavily skewed towards reads and not writes (as it seems in the
case of a CMS), you might want to look at Celko nested sets:
http://www.intelligententerprise.com/001020/celko.jhtml
I hate to nag, but does anyone have any idea what's up with the bug
in the chat example I e-mailed about a while ago?
I've been playing around with the ask/answer functionality in the
interim, and (although it's quite possible that I'm missing something)
I can't get it to work at all. The first
Thanks. Types are still largely a mystery to me, but this works just fine.
Chas.
Derek Chen-Becker wrote:
Because it's type erasure I don't think I can do a generic new inside
the methods, but the findOne method does return a Can. That means that
you were actually pretty close in your demo
On Sun, Nov 30, 2008 at 6:07 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi ... new to Scala and Lift. I'm having trouble understanding how to
think about a project with a horizontally scaled database. I guess
people call this sharding these days? My existing app uses PHP, no
I have a table in which each row represents an object in the database,
with each cell in the row an input bound to an attribute of the object.
I want to be able to add rows (with new, blank objects) and delete rows
(deleting both the row on the page and the associated object in the
database).
Charles,
If you're planning to deploy this app in IE, you may have an issue. My
experience with IE is that adding/removing tr doesn't always work well.
:-(
What is most likely happening is that your button is inside a form. It
turns out that there's a race condition where sometimes the
On Thu, Oct 9, 2008 at 9:46 AM, Charles F. Munat [EMAIL PROTECTED] wrote:
Is it possible to do joins in Lift Mapper?
For example, I have a Category class that has a name and position (an
int). I have a Document class that has a name, a URI, and a Category.
I want to query the database and
Charles,
I use NetBeans and a whole lot of printlns. In general, if you've got a
case class or Scala collections, the toString methods are pretty descriptive
of what's going on.
I have heard tell that it's possible to hook the NetBeans debugger up to a
running Jetty instance and do breakpoints
Hi,
I'm writing the chapter on Mapper/Record right now and I was wondering
why there have been small name changes between the two frameworks. Things
like
1. MappedField.validations vs. Field.validators
2. MappedField.asHtml vs. Field.asXHtml (and Field.toXHtml, which seems
redundant)
I've done it in Eclipse and I'm assuming it would be similarly easy in
NetBeans. There's a good article on setting up Maven remote debugging with
Jetty here:
http://www.mojavelinux.com/blog/archives/2007/03/remote_debugging_with_jetty/
Derek
On Mon, Dec 1, 2008 at 2:43 PM, David Pollak
[EMAIL
Hmm. Crap. Damn that IE.
Well, I have something working in Firefox on Mac for the button. It's
probably more complicated than it needs to be...
def ajaxRemove(name: String,
func: AFuncHolder,
attrs: Tuple2[String, String]*): Elem = {
val funcName = mapFunc(func)
(input
On Mon, Dec 1, 2008 at 1:44 PM, Derek Chen-Becker [EMAIL PROTECTED]wrote:
Hi,
I'm writing the chapter on Mapper/Record right now and I was wondering
why there have been small name changes between the two frameworks. Things
like
1. MappedField.validations vs. Field.validators
2.
I'm not sure whether it is just me, but I seem to be stumbling on the
Scala compiler exceptions whatever I do. First there was one when
creating specs that I mailed earlier, and now I get compile problems
when I changed Boot-class.
I have changed Boot-class as follows. Idea is to allow different
Charles,
Thanks for the suggestion.
I've just checked up code that looks something like yours:
def ajaxButton(text: NodeSeq, func: () = JsCmd, attrs: (String,
String)*): Elem =
attrs.foldLeft(button
onclick={makeAjaxCall(Str(mapFunc(func)+=true)).toJsCmd+; return false;}
The exception is an out of memory exception.
What OS and RAM size are you running?
On Mon, Dec 1, 2008 at 1:44 PM, Juha L [EMAIL PROTECTED] wrote:
I'm not sure whether it is just me, but I seem to be stumbling on the
Scala compiler exceptions whatever I do. First there was one when
creating
It might be the type checker getting confused.
Try:
val models: List[MetaMapper] = List(User, Game, GameUser, Hull, Ship,
StarSystem)
You can also call schemify with:
Schemifier.schemify(true, Log.infoF _, models :_*)
Instead of the foreach stuff
--j
On Mon, Dec 1, 2008 at 3:44 PM, Juha
Derek,
I've made the default behavior to not pass requests to the container (you
can change the default in LiftRules.)
That will address the raw template being displayed.
Now... I have no idea why you need an index and a List(index) always
matches for me.
Are you using 0.10-SNAPSHOT?
Gah, this is super-handy. Thanks Chas, Dave.
On Dec 1, 5:41 pm, David Pollak [EMAIL PROTECTED]
wrote:
Charles,
Thanks for the suggestion.
I've just checked up code that looks something like yours:
def ajaxButton(text: NodeSeq, func: () = JsCmd, attrs: (String,
String)*): Elem =
I would but I have so many other things going on right now I don't want to
hold things up. I don't want to sound like I'm complaining about something
and not wanting to actually deal with it but my plate is pretty full :(
Derek
On Mon, Dec 1, 2008 at 3:21 PM, David Pollak
[EMAIL PROTECTED]wrote:
I am using 0.10-SNAPSHOT, but let me do a clean jetty:run and make sure
it's still doing it.
Thanks!
Derek
On Mon, Dec 1, 2008 at 3:44 PM, David Pollak
[EMAIL PROTECTED]wrote:
Derek,
I've made the default behavior to not pass requests to the container (you
can change the default in
I've tried twice to get NetBeans up and running on my MacBook Pro with 2
gigs of RAM. Both times I made the mistake of loading in the entire
liftweb library. After that -- and even after I closed the liftweb
master project -- NetBeans will lock up for long periods of time (e.g.
ten minutes or
Are there printable versions of any draft Lift books?
It would help me and would provide an easy basis for feedback to the
authors if the Lift books currently in draft were made available for
easy
download and printing, in say PDF format.
The Scala book early access process was both useful and
Cool. I hope I get time to read this really soon.
Thanks!
Chas.
Derek Chen-Becker wrote:
I've done it in Eclipse and I'm assuming it would be similarly easy in
NetBeans. There's a good article on setting up Maven remote debugging
with Jetty here:
Will do. Thanks.
Chas.
David Pollak wrote:
Charles,
I just checked in code that has a return false at the end of
ajaxButton. If you've pulled the Lift source from GitHub, please do a
fresh pull and an mvn clean install on Lift and then give it a try.
Thanks,
David
On Mon, Dec
I figured there was a better way to do it. I rewrote pretty much all of
SHtml to allow adding attributes easily (which is why mine says FH
instead of SHtml). This looks interesting. I'll check it out.
Thanks,
Chas.
David Pollak wrote:
Charles,
Thanks for the suggestion.
I've just
There was a defect in the plugin. Cauyuon posted a fix to this list last
week.
On Mon, Dec 1, 2008 at 3:07 PM, Charles F. Munat [EMAIL PROTECTED] wrote:
I've tried twice to get NetBeans up and running on my MacBook Pro with 2
gigs of RAM. Both times I made the mistake of loading in the
I just pushed a change... change the line to:
class Entry extends KeyedRecord[Entry,Long]
and see if it works.
On Mon, Dec 1, 2008 at 3:39 PM, Derek Chen-Becker [EMAIL PROTECTED]wrote:
I'm writing up some sample code for the book (Record chapter) and I got
this when trying to do a keyed
You certainly can. The easiest way is with the JsonFunc:
val (jsonCall: JsonCall, jsCmd: JsCmd) = S.buildJsonFunc {
case JsonCmd(DoSomething, _, s, _) =
println(Got +s)
Alert(You entered: +s)
case _ = Noop
}
In your page, include:
span
{
Script(jsCmd) // emit the JSON call
}
{
Please make sure that you've got specs 1.4.0 and scalacheck 1.5
Also, please do an mvn clean test
Thanks,
David
On Sat, Nov 29, 2008 at 3:45 AM, Juha L [EMAIL PROTECTED] wrote:
I managed after all to find specs test example from the example
webapp. Now that I try to start creating some
I thought I had updated to that, but maybe I broke it before the
update... Will install all the latest this time and will see what
happens. But I had the same experience a couple of months ago when I
tried it for the first time. I'd really like it to work, though. That
would be great, and it
I'd suggest removing the ~/.netbeans directory (and anything that looks like
it).
On Mon, Dec 1, 2008 at 5:00 PM, Charles F. Munat [EMAIL PROTECTED] wrote:
I thought I had updated to that, but maybe I broke it before the
update... Will install all the latest this time and will see what
Please keep in mind most things are in flux.
Just fair warning. :)
On Dec 1, 6:11 pm, mal3 [EMAIL PROTECTED] wrote:
Are there printable versions of any draft Lift books?
It would help me and would provide an easy basis for feedback to the
authors if the Lift books currently in draft were
Darnit. I figured out the issue. My pom.xml had a scala.version tucked
away and set to 2.7.1. Changing to 2.7.2 fixed it.
Derek
On Mon, Dec 1, 2008 at 4:58 PM, David Pollak
[EMAIL PROTECTED]wrote:
I just pushed a change... change the line to:
class Entry extends KeyedRecord[Entry,Long]
and
53 matches
Mail list logo