[Lift] 1.1: children of menu items do not appear

2010-01-16 Thread Joachim A.
Hi,
I've been away from Lift for quite a time. At the moment I work on an old 
project and am in the progress to update to the current 1.1-SNAPSHOT .
I have to say that getting used to Lift again was very quick and easy.

In 1.0 this worked and showed a top-level menu item and submenu items if 
you've clicked on it:
Menu(Loc("admin_newsletter", List("newsletter"), 
S.?("menu.newsletters"), 
testUserNotSuper), Newsletter.menus: _*) ::

In 1.1 the submenu items do not appear. "Newsletter" uses Crudify.

I've tried  the expandAll attribute for Menu.builder but this did not work.

I'd appreciate some hints where to look,

Best regards,
Joachim
-- 
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 group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: 1.1: children of menu items do not appear

2010-01-16 Thread Joachim A.
Tim,
thank you for your reply.
I've updated updated to 2.0-SNAPSHOT now. The submenu items still do
not appear, though.

Do I need to set some options or is it still the bug you mentioned?

Regards,
Joachim

On Jan 16, 4:36 pm, Tim Nelson  wrote:
> There was a bug that's been fixed. I suggest you use the newest
> version, which is 2.0-SNAPSHOT. 1.1 was renamed 2.0 last week.
>
> Tim
>
> On Sat, Jan 16, 2010 at 6:59 AM, Joachim A.
>
>
>
>  wrote:
> > Hi,
> > I've been away from Lift for quite a time. At the moment I work on an old
> > project and am in the progress to update to the current 1.1-SNAPSHOT .
> > I have to say that getting used to Lift again was very quick and easy.
>
> > In 1.0 this worked and showed a top-level menu item and submenu items if
> > you've clicked on it:
> >        Menu(Loc("admin_newsletter", List("newsletter"), 
> > S.?("menu.newsletters"),
> > testUserNotSuper), Newsletter.menus: _*) ::
>
> > In 1.1 the submenu items do not appear. "Newsletter" uses Crudify.
>
> > I've tried  the expandAll attribute for Menu.builder but this did not work.
>
> > I'd appreciate some hints where to look,
>
> > Best regards,
> > Joachim
>
> > --
> > 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 group, send email to 
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=en.
-- 
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 group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: 1.1: children of menu items do not appear

2010-01-16 Thread Joachim A.
Tim,
thanks again for the reply.
I did clean out the old code.

In 1.1  I've hit the bug, I think.
I found the reason why it did not work with 2.0. I had to use
expandAll and had to adjust the css for the menu.
It's working fine now.

Thanks guys!
Joachim

On Jan 16, 6:15 pm, Tim Nelson  wrote:
> Did you "clean" out your code before you updated? I don't use maven,
> so I'm not sure of the exact command, but that seems to come up a lot
> on this list.
>
> If you indeed did clean out the code before updating, then I'm afraid
> I'm not sure how to help you further. I've only used mappper a little
> and crudify never.
>
> If you manually put in a menu location, does that work? That should
> narrow down if it's crudify related or not.
>
> Tim
>
> On Sat, Jan 16, 2010 at 10:38 AM, Joachim A.
>
>
>
>  wrote:
> > Tim,
> > thank you for your reply.
> > I've updated updated to 2.0-SNAPSHOT now. The submenu items still do
> > not appear, though.
>
> > Do I need to set some options or is it still the bug you mentioned?
>
> > Regards,
> > Joachim
>
> > On Jan 16, 4:36 pm, Tim Nelson  wrote:
> >> There was a bug that's been fixed. I suggest you use the newest
> >> version, which is 2.0-SNAPSHOT. 1.1 was renamed 2.0 last week.
>
> >> Tim
>
> >> On Sat, Jan 16, 2010 at 6:59 AM, Joachim A.
>
> >>  wrote:
> >> > Hi,
> >> > I've been away from Lift for quite a time. At the moment I work on an old
> >> > project and am in the progress to update to the current 1.1-SNAPSHOT .
> >> > I have to say that getting used to Lift again was very quick and easy.
>
> >> > In 1.0 this worked and showed a top-level menu item and submenu items if
> >> > you've clicked on it:
> >> >        Menu(Loc("admin_newsletter", List("newsletter"), 
> >> > S.?("menu.newsletters"),
> >> > testUserNotSuper), Newsletter.menus: _*) ::
>
> >> > In 1.1 the submenu items do not appear. "Newsletter" uses Crudify.
>
> >> > I've tried  the expandAll attribute for Menu.builder but this did not 
> >> > work.
>
> >> > I'd appreciate some hints where to look,
>
> >> > Best regards,
> >> > Joachim
>
> >> > --
> >> > 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 group, send email to 
> >> > liftweb+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/liftweb?hl=en.
>
> > --
> > 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 group, send email to 
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=en.
-- 
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 group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Potential LiftRules dispatch issue.

2009-01-28 Thread Joachim A.

Hi,
I'd be interested to have  a look at the code :)
I was about to do the same. I'd planned to use a simple cache (by uuid) in a 
concurrent, weak map but EHCache might be the better solution, I guess.

Thanks a lot,
Joachim

> On this note, I wrote an image cache for use in conjunction with
> MappedBinary - if anyone is interested I'm happy to post the code. It
> uses EHCache and first checks the cache for the right image, and grabs
> it if it's there, otherwise it does the database read. If your needing
> to store images in the database, using an object cache can vastly cut
> the amount of DB access and reduce server load
>
> Cheers
>
> Tim
>
> On Jan 28, 12:00 am, Alli  wrote:
> > Thanks, will definitely order a PDF or your book when it's out.
> >
> > Cheers,
> > Alli
> >
> > On Jan 27, 11:56 pm, David Pollak 
> >
> > wrote:
> > > On Tue, Jan 27, 2009 at 3:53 PM, Alli  wrote:
> > > > Is it possible to make the extension a wild card somehow, e.g.
> > > > if i want jpg,png,gif,bmp ?
> > >
> > > LiftRules.dispatch.append {
> > >  case r @ Req("picture" :: fileName :: Nil, extension, GetRequest) if
> > > List("jpg", "png", "gif").contains(extension) => () =>
> > >     ...
> > >
> > > }
> > >
> > > Note that this is not a speed-optimal solution (you'd pre-populate set
> > > with the valid extensions).  But it demonstrates using extractors and
> > > guards... the stuff I'm writing about this very day in *Beginning
> > > Scala*.
> > >
> > > Thanks,
> > > David
> > >
> > > > On Jan 27, 11:50 pm, Alli  wrote:
> > > > > Thanks chaps, can't believe i didn't spot it :).
> > > > >
> > > > > Cheers,
> > > > > Alfred
> > > > >
> > > > > On Jan 27, 11:48 pm, Tim Perrett  wrote:
> > > > > > Change the req to this:
> > > > > >
> > > > > > Req("picture" :: fileName :: Nil, "jpg", GetRequest)
> > > > > >
> > > > > > That should then work for you
> > > > > >
> > > > > > Cheers, Tim
> > > > > >
> > > > > > On Jan 27, 11:39 pm, Alli  wrote:
> > > > > > > LiftRules.dispatch.append {
> > > > > > >   case r @ Req("picture" :: fileName :: Nil, "", GetRequest) =>
> > > > > > > () => ...
> > > > > > >
> > > > > > > }


--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] S.servletRequest is empty

2009-01-31 Thread Joachim A.

Hi,
I was using S.hostAndPath and was surprised that it didn't include the 
protocoll and path.
I've found out that S.servletRequest returns Empty here.

The method is called by in an actor. 
Is some special initialisation necessary for this setup? 

Thanks,
Joachim

--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: S.servletRequest is empty

2009-01-31 Thread Joachim A.


> > The method is called by in an actor.
> > Is some special initialisation necessary for this setup?
>
> The Actor code is outside of the HTTP request/response cycle, so there's no
> way to access the request information from the Actor.

Correct. Next time I'll think a little bit longer :)
I'll find another solution, either by configuration setting or by asking my 
user's comet actor (still need to check if that works).

Thanks,
Joachim

--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift and Flex

2009-02-01 Thread Joachim A.

I'm working on a Flex / Lift application.
Basically it's Lift<->Comet<->Flex/Flash. The communication between the comet 
and Flex is done using the FABridge Flex-Javascript bridge.

This way I don't have to use another serer side software and can stay with 
pure Lift on the server side (and get a comet style flex app as a bonus).

Joachim

> As a Scala en Lift newbie I'm wondering about how much interest there
> is to integrate web application written in Scala (Lift?) with Flex.
> After many years developing Java (web) applications I'm convinced that
> creating rich internet applications with HTML/Ajax is not the way to
> go (to be short). Most recent blog about Lift and Flex is
> http://www.gerbrand-ict.nl/2009/01/combining-flex-and-scala-using-liftweb-a
>nd-blazeds/ but it refers to an old post. It surprises me that there is not
> much interest. According to me Flex (view layer) and Scala (server-side) is
> a combination which can go mainstream.




--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] RewriteResponse to url of existing image file

2009-02-04 Thread Joachim A.

Hi,
I have a RewritePf to show the right image when the user's thumb is requested.
If the thumb exists a rewrite to an url is done where a dispatchPf returns a 
binary stream. 

If the thumb does not exist then the rewrite just returns the path to a 
default image on disk. 
I can't make the default image work. 

case Full(thumb) =>  
RewriteResponse(MyUrlDispatcher.showImagePath(thumb))
 case _ =>  //default image
RewriteResponse("images" :: "thumb_default.gif" :: Nil)

Requesting /images/thumb_default.gif in the browser works. 

Am I doing something wrong here or does the rewrite only work with lift 
resources?

Thanks a lot,
Joachim


--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Problems with lift:gc attributes

2009-02-11 Thread Joachim A.

Hi,
I'm using the jQuery plugin ModalDialog  in a page. The message which is 
displayed in a dialog contains a lift ajax form. The xhtml of the form is:

Do you really 
want to break up this friendship? Yes No 

Basically the plugin calls $().
This works fine in Opera. But it doesn't in Firefox. Firefox 3 complains about 
the lift:gc attribute and gives an error that the prefix is not defined.

My page has xmlns:lift="http://liftweb.net"; in the html tag. But obviously 
this is not used in the jQuery call.

Is it possible to get an additional xmlns:lift namespace declaration in the 
tags which use the lift:gc attribute?

Or is there another way to fix this?

Another problem:
Also, Lift outputs html like 

The key attribute is not prefixed by lift: and thus is invalid xhtml, I think.

Thanks a lot. Looking forward to the great 1.0 version,
Joachim


--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: IMPORTANT: Library Upgrades

2009-02-12 Thread Joachim A.

Jorge,
thanks a lot for that (I especially like the JQuery 1.3.1 update).

Is it possible to update to the latest blueprint css version? 0.8 was released 
2009-02-06. I noticed some type/font problem in Opera with the version shipped 
with Lift.

Joachim

> I've upgraded the dependencies for all of the Lift components and sample
> projects. I used the latest backward-compatible version that was available
> on public Maven repositories. (See below for the complete list.) PLEASE
> CHECK YOUR APPS to make sure nothing breaks. You only have a couple of
> weeks to get bug reports in before our major 1.0 release.

--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [ANN] Lift 1.0 is released

2009-02-26 Thread Joachim A.

Congratulations!
It's great to see Lift stable and better than ever. The more I learn about it 
the more I like it :)

Joachim

>  Two years ago, today, I
> launchedt-web-framework-version-0.1.0.html>the Lift Web Framework as an open source
> project.  Wow... it's been a long and fun experience... and today the dozen
> plus Lift committers and the whole Lift community together are releasing
> Lift 1.0.
>
> Lift is an expressive elegant web framework based on the
> Scalaprogramming language and released under
> an an Apache 2.0 license.  Lift
> provides developers the best way to build interactive, high performance web
> applications.  Lift based applications are deployed as WAR files into J2EE
> containers such as Jetty, Tomcat, and WebLogic.  Lift based applications
> are high performance and can make use of your existing Java libraries.




--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: MappedTextarea problem

2009-03-03 Thread Joachim A.

It might be the case that David has some css rules which change the size of 
the textarea.
It's easy to check in firebug or something similair to see what the applied 
values are.

Joachim

> Can you post the generated XHTML for the textarea? I would want to verify
> that it's actually setting the attributes.
>
> Derek
>
> On Tue, Mar 3, 2009 at 2:08 PM, DavidV  wrote:
> > For some reason when I override the textareaRows and textareaCols
> > methods in MappedTextarea, the size of the text block appears the same
> > in my web application no matter what size I assign to the rows and
> > cols.  Does anyone know how to decrease the size of the blank text
> > area that shows up on the webpage?
> > Thanks,
> > David
>
> 



--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] SHtml.ajaxInvoke

2009-03-04 Thread Joachim A.

I noticed that SHtml.ajaxInvoke now return a Tuple2(String, JsExp).

What should / can I do with the first param?
The source code tells me it's Lift's name for the function, but I'm unsure how 
I should do with it.

Thanks,
Joachim


--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] How can I use unit tests with S.?("key") ?

2009-03-11 Thread Joachim A.

Hi,
I have a unit test which call a method which uses the locale method S.?
(String). It throws a nullpointer, though.

Did I forget to setup things somewhere? Or can't I use S.? without a running 
request?
The call to S.? works fine in a running web application.

Thanks a lot,
Joachim


The beginning of the backtrace is:

java.lang.NullPointerException
at net.liftweb.http.S$.$qmark$bang(S.scala:288)
at net.liftweb.http.S$.$qmark(S.scala:263)
at net.liftweb.http.S$.$qmark(S.scala:277)
at 
com.ansorgit.frontend.SubscriptionMgr$.subscribeToNewsletter(SubscriptionMgr.scala:65)
at 
com.ansorgit.frontend.SubscriptionMgrTest$$anonfun$testAlreadySubscribed$1.apply(SubscriptionMgrTest.scala:37)
at 
com.ansorgit.frontend.SubscriptionMgrTest$$anonfun$testAlreadySubscribed$1.apply(SubscriptionMgrTest.scala:33)
at 
net.liftweb.mapper.DB$$anon$1.net$liftweb$mapper$DB$$anon$$doWith(DB.scala:117)
at 
net.liftweb.mapper.DB$$anon$1$$anonfun$net$liftweb$mapper$DB$$anon$$doWith$1.apply(DB.scala:118)
at 
net.liftweb.mapper.DB$$anon$1$$anonfun$net$liftweb$mapper$DB$$anon$$doWith$1.apply(DB.scala:118)
at net.liftweb.mapper.DB$.use(DB.scala:305)
at 
net.liftweb.mapper.DB$$anon$1.net$liftweb$mapper$DB$$anon$$doWith(DB.scala:118)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:124)
at com.ansorgit.BaseDBTest.runInDb(BaseTest.scala:44)
at 
com.ansorgit.frontend.SubscriptionMgrTest.testAlreadySubscribed(SubscriptionMgrTest.scala:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)



--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: MappedTextarea problem

2009-03-11 Thread Joachim A.

David,
I suggest to leave blueprint as it is and to create your own stylesheet.
Create a directory in the webapps dir and put a new .css file into it. Link 
that file into your template .

It should be possible to override the blueprint definitions with something 
like:

textarea {
width:300px !important;
}

It's not possible to set columns or rows in css, just the width and height in 
px, pt, etc.

Hope that helps,
Joachim

> As Tyler suggested, I would like to create my own style sheet for my
> webapp.  My app is currently using the blueprint CSS boss, but I can't
> find the screen.css file anywhere on my computer.  Is it being called
> from within a jar or war file?  I can access it by putting the URL in
> my web browser, but then I can't find the directory in windows
> explorer.  I used firebug and confirmed that I can fix this problem by
> altering the css style sheet.  How can I create my own and where
> should I store it in my project folder?
> Thanks,
> David




--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: MappedTextarea problem

2009-03-12 Thread Joachim A.

Hi,
just use different CSS classes.
For example:




with the CSS code

textarea.large { height:200px; width:400px; }
textarea.small { height:100px; width:200px; }

will give you two textareas with differnt sizes.

Just have a look at some CSS tutorials / resources to see what you can do with 
it.

Regards,
Joachim

> I'm working on making my own style sheet now, thanks for the help.
> One more question:
> What if I have multiple text areas on one page but what them to be of
> different sizes?




--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Where are the lift jars?

2009-03-20 Thread Joachim A.

Hi,

> This is a n00b question, but I've spent a bit too much time trying to
> find where a number of the Lift classes are defined.  I installed the
> PocketChange app, and I can get it to run (although the current
> version is quiet broken and I had to create a postgres db user) but
> when I open it as a project in IntelliJ (with apologies to David - I'm
> giving it a chance :) it can't find many of the Lift classes,
> including the mapper ones (e.g. LongKeyedMapper).  

IntelliJ's Scala support works very well for me. 
I think the best way is if you open the pom.xml as a project. Then add the 
Scala facet to the module. IntelliJ should download the required maven jars 
for you as you load the maven project.

> I am new to maven I think it downloaded them magically and put them
> somewhere, but where?  Can maven also download the source so I don't
> have to keep a separate source directory in sync somehow?

IntelliJ should find the jars for you :)
To download the sources you can tell IntelliJ to do so. In the maven projects 
tab/sidebar there's a button called "download artifacts" (I think).

Regards,
Joachim


--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Where are the lift jars?

2009-03-20 Thread Joachim A.


> Bingo!  I was creating a new project from source.  When I opened the
> pom as a project (I never would have thought of that) It actually
> detected the Scala facet so I didn't even need to set it up.
>
> It was not finding the jars otherwise, probably because it didn't use
> the pom.xml.
>
> So far IntelliJ/Scala is working great.  Like David I don't like the
> way it puts your cursor where you click, but I do like that I can do
> Apple-C/X and it will copy/paste the whole line.

I'm not sure what you mean.
If you meant that you can place the cursor after the end of the line you can 
turn that off in Settings->Editor->Virtual space .

Regards,
Joachim

--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Form validation with redo snippet?

2008-11-12 Thread Joachim A.

Hi,
I'm still a Scala and Lift novice but I really like what I see so far.
I'm using 0.10-SNAPSHOT.

I have a database entity called "Blog". For a new instance "blog" I
show the form with b.toForm(). I've found the redo snippet parameter.

If the data was invalid for the submit, redo is executed. But now the
original data is lost.

1. How can I show the data the user entered in the form?

2. What does the NodeSeq parameter for the redoSnippet do? For now I
just passed it on.

3. How do you put the error message to the field?


Here's my code (snippet class BlogUtils):
def create(xhtml: Group): NodeSeq = {
def redo(n: NodeSeq) = this.create({n})

User.currentUser.map(u => {
val b = u.createBlog
table(b.toForm(Full("Create"), redo _, handleSubmit _))
}) openOr {S.warning("There's no user logged in.");
NodeSeq.Empty}
}

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] DB transactions - how?

2008-11-15 Thread Joachim A.

Hi,
I'm using Lift 0.9 and the mapper featurese provided by Lift - I like
it!

Now I do need to do some database operations in a transaction and to
rollback when an error occurs.

I saw DB.rollback and tried DB.rollback(DefaultConnectionIdentifier),
but that doesn't rollback anything. I also grepped the lift source
code. No matches for "transaction" or "rollback" except in DB.

How can I open a transaction and how can I rollback?

Thanks a lot for any help!
Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: DB transactions - how?

2008-11-20 Thread Joachim A.

David,
thanks a lot for your help. The code works perfectly.

Joachim

On 17 Nov., 05:45, "David Pollak" <[EMAIL PROTECTED]>
wrote:
> Joachim,
>
> Many moons ago, Lift automatically created a JDBC transaction when it
> started handling an HTTP request and committed/released the connection at
> the end of the request.  I don't know where that code went. :-(

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Snippets of abstract super class not found

2008-11-20 Thread Joachim A.

Hi,
I have an abstract class which defines snippet methods for the
inheriting snippets.

Here's some sample code (untested, just to show the problem):

abstract class AbstractTestSnippet {
   def sayHi(xhtml:NodeSeq):NodeSeq = Text("Hi")
}

class TestSnippet extends AbstractTestSnippet {
  def callSayHi(xhmlt:NodeSeq):NodeSeq = sayHi(xhtml)
}

Using  doesn't work (the log prints a method
not found error).
Using   works fine, though.

What am I doing wrong here? :)

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Snippets of abstract super class not found

2008-11-21 Thread Joachim A.

David,
thanks for the reply!
I'm using a trait now instead of the abstract class. Using the trait
works well.

Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Query param for SQL "like"?

2008-11-21 Thread Joachim A.

Hi,
I'm using 0.10-SNAPSHOT and it's mapper classes.

I"m wondering how I can do something like "select * from Test t where
t.name LIKE '%test%.

I've found the classes QueryParam, OprEnum and Cmp. I've read in the
source code but can't see a way to extend this mechanism wih new
operators.
I've also found BySql and InThing but I don't know what they do :)

Can I do SQL's Like operator with the mapper classes? If yes, how?

Thank you very much!
Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Query param for SQL "like"?

2008-11-23 Thread Joachim A.

David,
it works well for me. Thank you very much for your quick response and
implementation!

Joachim

On 21 Nov., 20:06, "David Pollak" <[EMAIL PROTECTED]>
wrote:
> I've just committed up a Like operator in Mapper.  Please give it a try and
> let me know how it works.
>
> On Fri, Nov 21, 2008 at 8:02 AM, David Pollak <[EMAIL PROTECTED]
>
>
>
>
>
> > wrote:
> > I'll try to add the feature this weekend.
>
> > On Fri, Nov 21, 2008 at 7:19 AM, Joachim A. <[EMAIL PROTECTED]>wrote:
>
> >> Hi,
> >> I'm using 0.10-SNAPSHOT and it's mapper classes.
>
> >> I"m wondering how I can do something like "select * from Test t where
> >> t.name LIKE '%test%.
>
> >> I've found the classes QueryParam, OprEnum and Cmp. I've read in the
> >> source code but can't see a way to extend this mechanism wih new
> >> operators.
> >> I've also found BySql and InThing but I don't know what they do :)
>
> >> Can I do SQL's Like operator with the mapper classes? If yes, how?
>
> >> Thank you very much!
> >> Joachim
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Collaborative Task Managementhttp://much4.us
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Collaborative Task Managementhttp://much4.us
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Dynamic JqSHtml.autocompleteObj ?

2008-11-25 Thread Joachim A.

Hi,
I'm trying to find a way to integrate a dynamic autocompletion box in
my Lift application.

I've found JqSHtml.autocompleteObj but here's it's only possible to
have a static list of options.
The Javascript behind the box accepts an url parameter (which is not
used atm).

- Did somebody do the dynamic autocompletion alread?

- if not, how can I turn a closure into a url which can be passed to
the autocompletion Javascript, which does the request processing
itself?

Thanks a lot!
Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] A javascript method bound to lift?

2008-11-25 Thread Joachim A.

Hi,
sorry for my posts. I have some difficult time with the Javascript
stuff in Lift.

I have some HTML which is generated by XSLT.
This data contains links with javascript calls. I want that the
javascript ends up as ajax calls to lift.

Example data:

Show Element 1

Can I create a Javascript method "showElement" (with Lift's help or
without it) which does an ajax request with Lift to show the specified
Element?

Thanks a lot,
Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] SQL queries

2008-11-26 Thread Joachim A.

Hi,
after profiling my lift application (which uses the mapper classes) I
found out that most of the time is spend doing SQL queries. Displaying
medium-sized tabular data executes hundreds of (mostly small) queries.
This takes a lot of time.

I understand that the mapper implementation is not optimized.

- Is there any way for me to optimize this?  E.g. enabling caching,
enabling something like prefetching, ... ?

- Did anyone do db query profiling / optimization with lift before?
What have the results been?

- What is a good way to cache queries generated by MetaMapper.find()
and findAll() ?


Thank you for your patience - I'm still a lift learner :)
Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SQL queries

2008-12-02 Thread Joachim A.

David,
thank you very much for your reply. It's great to see that all
questions are answered on this list.

> > I understand that the mapper implementation is not optimized.
>
> This is not correct.  The Mapper stuff is fairly well optimized.  It, in
> general, executes 6 times faster than ActiveRecord, running the same queries
> (thus destroying any of Rail's claims about the time being spent in the
> database.)

Good to know.
Now I know that the problem was the amount of queries, not Lift's
handling of SQL.

> I generally write hand-code that pre-fetches.  This generally results in
> significant performance improvements (and 2 or 3 queries per page-load.)

Thanks for the example.
The reason I asked was, that I have two mappers, Blog and BlogEntry.
BlogEntry links to the Blog with an owner field.
If I have lots of BlogEntries and ask every item for the blog it
creates a lot of SQL queries (one for each entry), even if they link
to the same blog. So I thought it would be great to have
something like caching or prefetching build-in so a second query to
the same blog is not necessary any more.

Your example helps to speed this up, but usually I want to work with
the objects itself.
I've build a simple CachedMetaMapper trait for my classes, which
caches findAll and find(Any). Not optimal, but some improvement.

> > - What is a good way to cache queries generated by MetaMapper.find()
> > and findAll() ?
>
> I leave this to the RDBMS.  If you're doing a read-heavy app (like a CMS
> system), I'd manually build a cache in memory... as long as I was sure there
> were no external apps that could update the RDBMS out from under me.

That's what I finally did. Together with manual tuning (e.g. with a
prefetched map) it works very well.

Thank you for your patience and help :)

Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: A javascript method bound to lift?

2008-12-02 Thread Joachim A.

David,
thank you for your help with this. I'll try that soon.

On 2 Dez., 01:32, "David Pollak" <[EMAIL PROTECTED]>
wrote:
> 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
>  }

Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Dynamic JqSHtml.autocompleteObj ?

2008-12-02 Thread Joachim A.

David,
thank for another great reply!

> You can build a server-side autocomplete builder such as:
>
>   private def buildQuery(current: String, limit: Int): Seq[String] = {
>     Log.info("Checking on server side with "+current+" limit "+limit)
>     (1 to limit).map(n => current+""+n)
>   }

This is pretty cool! I'll try that as soon as the lift snapshot on
scala-tools is updated by the build system :)

Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] DB connection not closed?

2008-12-04 Thread Joachim A.
Hi,
I have a lift application running in a tomcat container (using 0.10-SNAPSHOT) 
using a MySQL database. Tomcat is setup to provide connections via JNDI.

It runs very well. But now it has happened twice that the connection to MySQL 
fails. In the log appears a section which says that the connection to the 
database was never released.
I guess this is not normal for Lift :)  I assumed that DB.use() takes care of 
that.

What am I doing wrong with the DB handling? How can I make sure that the 
connections get closed?


I attached the relevant part with the stacktrace. 
bootstrap.liftweb.TransactionalWrapper is a wrapper to enable transactions 
with the DB, it has been given to my by David P. on this list (the code same 
as DB.buildLoanWrapper, I think).

Thanks a lot for you help,
Joachim

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---

INFO   | jvm 1| 2008/12/03 05:23:56 | DBCP object created 2008-12-02 
03:10:41 by the following code was never closed:
INFO   | jvm 1| 2008/12/03 05:23:56 | java.lang.Exception
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
org.apache.tomcat.dbcp.dbcp.AbandonedTrace.setStackTrace(AbandonedTrace.java:160)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:86)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.mapper.DB$$anonfun$3$$anonfun$apply$3.apply(DB.scala:82)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.mapper.DB$$anonfun$3$$anonfun$apply$3.apply(DB.scala:81)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:39)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.Helpers$.tryo(Helpers.scala:29)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:53)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.Helpers$.tryo(Helpers.scala:29)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.mapper.DB$$anonfun$3.apply(DB.scala:81)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.mapper.DB$$anonfun$3.apply(DB.scala:84)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.EmptyCan.openOr(Can.scala:314)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.mapper.DB$.newConnection(DB.scala:80)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.mapper.DB$.getConnection(DB.scala:117)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.mapper.DB$.use(DB.scala:271)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
bootstrap.liftweb.TransactionalWrapper$$anon$1.apply(TransactionalWrapper.scala:31)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:377)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit$1.apply(S.scala:455)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:31)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:454)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20$$anonfun$apply$21$$anonfun$apply$22.apply(S.scala:474)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:31)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20$$anonfun$apply$21.apply(S.scala:473)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:31)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20.apply(S.scala:472)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:31)
INFO   | jvm 1| 2008/12/03 05:23:56 |   at 
net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$$anonfun$apply$18$$anonfun$apply$19.apply(S.scala:471)
INFO   | jvm 1| 2008/12

[Lift] Snapshot documentation not current any more

2008-12-04 Thread Joachim A.

Hi,
I use the generated API documentation almost every day - thanks a lot for 
that!

The documentation (http://scala-tools.org/mvnsites-snapshots/liftweb/lift-
webkit/scaladocs/index.html) used to be updated from trunk (I think :). The 
current pages are not current, newly added things like SHtml.autocomplet and 
the  Join/Prefect are missing. 

Would be great to have documentation updated from trunk again :)

Regards,
Joachim


--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Problem with recursive MetaMapper types

2008-12-10 Thread Joachim A.

Hi,
I hope this is not off-topic here.
I have the problem that I can't find a type declaration for a collection of 
MetaMappers so that create.save  works on the meta mapper.

I have a base class for a certain kind of mappers and the same for the meta 
class (I don't show the MetaMappers which are used here):

trait AbstractPersistentMetaChannel[T <: AbstractPersistentChannel[T]] extends 
LongKeyedMetaMapper[T] {  self: T =>}

And there are some objects which use that trait:
object ChannelA extends ChannelA with AbstractPersistentMetaChannel[ChannelA]
object ChannelB extends ChannelB with AbstractPersistentMetaChannel[ChannelB]

I now have a list of those and have a can to store an element of that list::
var cType: Can[AbstractPersistentMetaChannel[_ <: 
AbstractPersistentChannel[_]]] = Empty

def showForm: JsCmd = {
  val form = cType.map(_.create.toForm(Empty, c => c.save)) openOr 
NodeSeq.Empty
//...
}

The compiler complains:
[WARNING] Channels.scala:74: error: value save is not a member of _$2
[WARNING]   val form = cType.map(t => t.create.toForm(Empty, c => 
{c.save;ChannelList.startChannel(c)})) openOr NodeSeq.Empty


Is there any way to define the type of cType so that save works? 

Hopefully I was able to explain the problem :) Any helps is appreciated,
Joachim


--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Problem with recursive MetaMapper types

2008-12-10 Thread Joachim A.

David,
that works much better. With a little help the compiler almost made it ;)
There's now another problem with that I can't fix atm (I snipped the packages 
away).

[WARNING] Channels.scala:83: error: type mismatch;
[WARNING]  found   : ChannelA.type (with underlying type object ChannelA)
[WARNING]  required: SomeMetaT
[WARNING]   List((ChannelA, "Channel A"), (ChannelB, "Channel B"))
[WARNING] ^

//The code:

type SomeMetaT = T forSome {type T <: 
AbstractPersistentMetaChannel[AbstractPersistentChannel[T]]}

def createTypeSelect: Seq[(SomeMetaT, String)] = {
  List((ChannelA, Channel A"), (ChannelB, "Channel B"))
}


// the classes and objects:
object ChannelA extends ChannelA with AbstractPersistentMetaChannel[ChannelA]
class ChannelA extends AbstractPersistentChannel[ChannelA] {...}

Thanks for your help,
Joachim





--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Problem with recursive MetaMapper types

2008-12-10 Thread Joachim A.

David,
thank you!  This worked out of the box.

Regards,
Joachim

> Important stuff in Bold.  Most notably, the type inferencer gets Lists
> wrong sometimes.

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] NPE with SHtml.text

2008-12-16 Thread Joachim A.

Hi,
I'm getting a NPE after calling SHtml.text()
I'm calling that method from an actor. That's probably the reason for that, I 
guess.
Is there any way to call SHtml methods from actors?

java.lang.NullPointerException
at net.liftweb.http.S$.addFunctionMap(S.scala:706)
at net.liftweb.http.S$.mapFunc(S.scala:911)
at net.liftweb.http.S$.mapFunc(S.scala:905)
at net.liftweb.http.SHtml$.makeFormElement(SHtml.scala:217)
at net.liftweb.http.SHtml$.text(SHtml.scala:231)


Thanks,
Joachim

--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: NPE with SHtml.text

2008-12-16 Thread Joachim A.

Hi David,
thank you for your quick reply.
I'm using the latest 0.10-SNAPSHOT.

Here's the code I'm using. The line in the backtrace is 
  {text(title, t => title = t)}  

protected def renderChannelActions(): NodeSeq = {
var title = ""
var message = ""
def sendNew(): Unit = {} //snipped 

val body = 
 Title: 
  {text(title, t => title = t)}  
 Message: 
  {textarea(message, m => message = m)}  
  {submit("New message", () => sendNew)}   

ajaxForm(JsCmds.Noop, body)
  }

This method creates the reply of a actor message. It's called in the act() 
implementation by:
case RenderChannelActions => reply(renderChannelActions)

> Are you using Lift 0.10-SNAPSHOT or 0.9?
>
> If it's 0.10-SNAPSHOT, it should work.  If it doesn't, please post sample
> code and I'll fix the bug.

Joachim



--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] JQuery UI Tabs : JqJE.JqTabs ?

2008-12-20 Thread Joachim A.

Hi,
I'd like to construct JQuery ui tabs in a snippet.

Does anybody know what the JqJE.JqTabs* object are supposed to do?

After reading the source code I think it's to construct expressions to work 
with tabs. But it's still unclear to me if this is for the JQuery ui tabs and 
if there's a Lift way to create the xhtml for those tabs.

I couldn't find a reference to these methods in the whole Lift code ...

Thanks a lot,
Joachim


--~--~-~--~~~---~--~~
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 group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Who eats the

2008-12-23 Thread Joachim A.

Hi, 
I have a snippet which returns a NodeSeq which contains a  tag to 
include an external Javascript file. 
For example: