[Lift] Re: how to serve html fragments

2009-05-20 Thread fatu

Timothy,

thanks for the links, I found them useful and I find your blog in
general very interesting. Came across scala-blogs.org and it looks
quite promising as well.

I knew bind already from the Exploring Lift book which I pull from
git, build with Lyx and keep at hand regularly. In the doctype post,
though, I couldn't find a way to specify no doctype  which I think
is necessary to serve a fragment; plus I couldn't find any other easy
out-of-the-box way to do it. Shouldn't this use case (serving
fragments), which I think is quite common, be better / more easily
supported by the framework? Can someone post an example of how to do
it with raw response handling in the meanwhile?

Thanks anybody.

Fabio

On 26 Apr, 21:49, Timothy Perrett timo...@getintheloop.eu wrote:
 George,

 To tell lift what doctype you want to use see my blog post 
 here:http://is.gd/uJ4L

 Also, you'll want to read another one of my posts in which I discuss
 the bind(...) method and how you can stop putting markup into your
 snippets:http://is.gd/sfyT

 Cheers, Tim

 On Apr 26, 1:02 pm, george geo...@mattandgeorge.com wrote:

  hello all,

  hopefully someone can help me out here.

  i am trying to port some simple ajax stuff over to lift from a rails
  app. basically it just loads anhtmlfragmentand puts it into the dom
  using prototype.

  i have set up a template which contains thefragmentat src/main/
  webapp/fragment.html

  ulliitem/li/ul

  then i made the page available using the SiteMap and all seems good,
  but here comes the problem

  the lift response adds the xml declaration and doctype, one of which
  seems to cause prototype some problems

  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPEhtmlPUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  ulliitem/li/ul

  so the question is, how can i make lift send back the rawhtmlwithout
  meddling with it?

  i have tried out using ResourceServer to serve it statically which
  works, but this wouldn't allow me to generate thefragment
  dynamically.

  i would also prefer to have a separatehtmltemplate file rather than
  embedding the markup code in a snippet.

  any thoughts gratefully received..

  george

--~--~-~--~~~---~--~~
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: how to serve html fragments

2009-05-20 Thread marius d.

As I understood you want to make an Ajax request and serve back a
Document Fragment. If so please also take a look at Jx stuff. We
discuss Jx classes in a fairly amount of details in the lift book.

Br's,
Marius

On May 20, 9:32 am, fatu fab...@gmail.com wrote:
 Timothy,

 thanks for the links, I found them useful and I find your blog in
 general very interesting. Came across scala-blogs.org and it looks
 quite promising as well.

 I knew bind already from the Exploring Lift book which I pull from
 git, build with Lyx and keep at hand regularly. In the doctype post,
 though, I couldn't find a way to specify no doctype  which I think
 is necessary to serve a fragment; plus I couldn't find any other easy
 out-of-the-box way to do it. Shouldn't this use case (serving
 fragments), which I think is quite common, be better / more easily
 supported by the framework? Can someone post an example of how to do
 it with raw response handling in the meanwhile?

 Thanks anybody.

 Fabio

 On 26 Apr, 21:49, Timothy Perrett timo...@getintheloop.eu wrote:

  George,

  To tell lift what doctype you want to use see my blog post 
  here:http://is.gd/uJ4L

  Also, you'll want to read another one of my posts in which I discuss
  the bind(...) method and how you can stop putting markup into your
  snippets:http://is.gd/sfyT

  Cheers, Tim

  On Apr 26, 1:02 pm, george geo...@mattandgeorge.com wrote:

   hello all,

   hopefully someone can help me out here.

   i am trying to port some simple ajax stuff over to lift from a rails
   app. basically it just loads anhtmlfragmentand puts it into the dom
   using prototype.

   i have set up a template which contains thefragmentat src/main/
   webapp/fragment.html

   ulliitem/li/ul

   then i made the page available using the SiteMap and all seems good,
   but here comes the problem

   the lift response adds the xml declaration and doctype, one of which
   seems to cause prototype some problems

   ?xml version=1.0 encoding=UTF-8?
   !DOCTYPEhtmlPUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
   ulliitem/li/ul

   so the question is, how can i make lift send back the rawhtmlwithout
   meddling with it?

   i have tried out using ResourceServer to serve it statically which
   works, but this wouldn't allow me to generate thefragment
   dynamically.

   i would also prefer to have a separatehtmltemplate file rather than
   embedding the markup code in a snippet.

   any thoughts gratefully received..

   george
--~--~-~--~~~---~--~~
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: More Actor garbage (collection)

2009-05-20 Thread Jonas Bonér

Great job.

2009/5/18 David Pollak feeder.of.the.be...@gmail.com:
 Folks,

 As you all may or may not know, I've been battling memory retention issues
 with the Scala Actor libraries for 6 or so months now.  I believe that I've
 finally nailed the complete issues.

 They are as follows:

 There is an object called ActorGC that keeps track of all the actors in the
 system.  Due to the implementation as some other bugs in the Actor library,
 the ActorGC code retains references to all Actors that have been created
 until there is significant pressure on the garbage collector, then the
 references may or may not be released.  In order to combat this, I wrote
 code that uses reflection to look through the ActorGC retained references
 and I unretain the references for all Actors that have exited.
 The Actor library sits on top of a modified version of Doug Lea's ForkJoin
 library.  Due to bugs in the library or bugs in the enhancements, the
 library retains references to a substantial number of messages that have
 ever been sent from one Actor to another.  I've replaced the default
 scheduler with a scheduler based on the java.util.concurrent library with a
 default of 10 worker threads.  If you want to use the standard Scala Actor
 scheduler, in Boot, set ActorSchedulerFixer.performFix = false

 I've been running a stress test against the new code that in the past would
 result in retaining 32MB of memory over a 30 minute period.  Over the last
 30 minutes it has not retained any memory.

 I've started a thread on the Scala internals list and I hope that we'll be
 able to get the Actors fixed up for the 2.8 release.

 The above fixes will only impact you if you rely on particular facits of the
 existing Actor scheduling or ActorGC classes.

 Thanks,

 David

 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp

 




-- 
Jonas Bonér

twitter: @jboner
blog:http://jonasboner.com
work:   http://crisp.se
work:   http://scalablesolutions.se
code:   http://github.com/jboner

--~--~-~--~~~---~--~~
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: More Actor garbage (collection)

2009-05-20 Thread Timothy Perrett

Sounds great - you mention the schedular library... are you talking
about the actor schedular in lift-util ? Can you describe what would
cause it?

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 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: how to serve html fragments

2009-05-20 Thread fatu

Hi Marius,

as I understand them, Jx classes help in generating JS that can itself
generate DOM at the client.  Am I wrong? I'd really like to serve back
an HTML fragment built by using the normal Lift template pipeline (so
including surround  bind). Is that possible?

Thanks

On 20 Mag, 13:16, marius d. marius.dan...@gmail.com wrote:
 As I understood you want to make an Ajax request and serve back a
 Document Fragment. If so please also take a look at Jx stuff. We
 discuss Jx classes in a fairly amount of details in the lift book.

 Br's,
 Marius

 On May 20, 9:32 am, fatu fab...@gmail.com wrote:

  Timothy,

  thanks for the links, I found them useful and I find your blog in
  general very interesting. Came across scala-blogs.org and it looks
  quite promising as well.

  I knew bind already from the Exploring Lift book which I pull from
  git, build with Lyx and keep at hand regularly. In the doctype post,
  though, I couldn't find a way to specify no doctype  which I think
  is necessary to serve a fragment; plus I couldn't find any other easy
  out-of-the-box way to do it. Shouldn't this use case (serving
  fragments), which I think is quite common, be better / more easily
  supported by the framework? Can someone post an example of how to do
  it with raw response handling in the meanwhile?

  Thanks anybody.

  Fabio

  On 26 Apr, 21:49, Timothy Perrett timo...@getintheloop.eu wrote:

   George,

   To tell lift what doctype you want to use see my blog post 
   here:http://is.gd/uJ4L

   Also, you'll want to read another one of my posts in which I discuss
   the bind(...) method and how you can stop putting markup into your
   snippets:http://is.gd/sfyT

   Cheers, Tim

   On Apr 26, 1:02 pm, george geo...@mattandgeorge.com wrote:

hello all,

hopefully someone can help me out here.

i am trying to port some simple ajax stuff over to lift from a rails
app. basically it just loads anhtmlfragmentand puts it into the dom
using prototype.

i have set up a template which contains thefragmentat src/main/
webapp/fragment.html

ulliitem/li/ul

then i made the page available using the SiteMap and all seems good,
but here comes the problem

the lift response adds the xml declaration and doctype, one of which
seems to cause prototype some problems

?xml version=1.0 encoding=UTF-8?
!DOCTYPEhtmlPUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
ulliitem/li/ul

so the question is, how can i make lift send back the rawhtmlwithout
meddling with it?

i have tried out using ResourceServer to serve it statically which
works, but this wouldn't allow me to generate thefragment
dynamically.

i would also prefer to have a separatehtmltemplate file rather than
embedding the markup code in a snippet.

any thoughts gratefully received..

george

--~--~-~--~~~---~--~~
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: how to serve html fragments

2009-05-20 Thread David Pollak
I'm about to commit S.skipDocType = true | false.  If you set it to true,
the !DOCTYPE .../ will be omitted from the response page.  This will allow
your AJAX fragements to pull parts of pages from the server.  Note that
someplace in your snippets, you'll have to set S.skipDocType = true.

Does this address your issue?

On Wed, May 20, 2009 at 5:13 AM, fatu fab...@gmail.com wrote:


 Hi Marius,

 as I understand them, Jx classes help in generating JS that can itself
 generate DOM at the client.  Am I wrong? I'd really like to serve back
 an HTML fragment built by using the normal Lift template pipeline (so
 including surround  bind). Is that possible?

 Thanks

 On 20 Mag, 13:16, marius d. marius.dan...@gmail.com wrote:
  As I understood you want to make an Ajax request and serve back a
  Document Fragment. If so please also take a look at Jx stuff. We
  discuss Jx classes in a fairly amount of details in the lift book.
 
  Br's,
  Marius
 
  On May 20, 9:32 am, fatu fab...@gmail.com wrote:
 
   Timothy,
 
   thanks for the links, I found them useful and I find your blog in
   general very interesting. Came across scala-blogs.org and it looks
   quite promising as well.
 
   I knew bind already from the Exploring Lift book which I pull from
   git, build with Lyx and keep at hand regularly. In the doctype post,
   though, I couldn't find a way to specify no doctype  which I think
   is necessary to serve a fragment; plus I couldn't find any other easy
   out-of-the-box way to do it. Shouldn't this use case (serving
   fragments), which I think is quite common, be better / more easily
   supported by the framework? Can someone post an example of how to do
   it with raw response handling in the meanwhile?
 
   Thanks anybody.
 
   Fabio
 
   On 26 Apr, 21:49, Timothy Perrett timo...@getintheloop.eu wrote:
 
George,
 
To tell lift what doctype you want to use see my blog post here:
 http://is.gd/uJ4L
 
Also, you'll want to read another one of my posts in which I discuss
the bind(...) method and how you can stop putting markup into your
snippets:http://is.gd/sfyT
 
Cheers, Tim
 
On Apr 26, 1:02 pm, george geo...@mattandgeorge.com wrote:
 
 hello all,
 
 hopefully someone can help me out here.
 
 i am trying to port some simple ajax stuff over to lift from a
 rails
 app. basically it just loads anhtmlfragmentand puts it into the dom
 using prototype.
 
 i have set up a template which contains thefragmentat src/main/
 webapp/fragment.html
 
 ulliitem/li/ul
 
 then i made the page available using the SiteMap and all seems
 good,
 but here comes the problem
 
 the lift response adds the xml declaration and doctype, one of
 which
 seems to cause prototype some problems
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPEhtmlPUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 ulliitem/li/ul
 
 so the question is, how can i make lift send back the
 rawhtmlwithout
 meddling with it?
 
 i have tried out using ResourceServer to serve it statically which
 works, but this wouldn't allow me to generate thefragment
 dynamically.
 
 i would also prefer to have a separatehtmltemplate file rather than
 embedding the markup code in a snippet.
 
 any thoughts gratefully received..
 
 george

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: More Actor garbage (collection)

2009-05-20 Thread Barry Kaplan

Can these fixes be used outside of lift?

--~--~-~--~~~---~--~~
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: More Actor garbage (collection)

2009-05-20 Thread David Pollak
On Wed, May 20, 2009 at 7:15 AM, Barry Kaplan meme...@gmail.com wrote:


 Can these fixes be used outside of lift?


You can copy the two objects from Lift and use them elsewhere.  There's
nothing Lift-specific about them.




 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: how to serve html fragments

2009-05-20 Thread Timothy Perrett

Neat! Not sure how it is that we have no come across this need before! Lol.

Cheers, Tim

On 20/05/2009 15:05, David Pollak feeder.of.the.be...@gmail.com wrote:

 I'm about to commit S.skipDocType = true | false.  If you set it to true, the
 !DOCTYPE .../ will be omitted from the response page.  This will allow your
 AJAX fragements to pull parts of pages from the server.  Note that someplace
 in your snippets, you'll have to set S.skipDocType = true.
 
 Does this address your issue?
 
 On Wed, May 20, 2009 at 5:13 AM, fatu fab...@gmail.com wrote:
 
 Hi Marius,
 
 as I understand them, Jx classes help in generating JS that can itself
 generate DOM at the client.  Am I wrong? I'd really like to serve back
 an HTML fragment built by using the normal Lift template pipeline (so
 including surround  bind). Is that possible?
 
 Thanks
 
 On 20 Mag, 13:16, marius d. marius.dan...@gmail.com wrote:
  As I understood you want to make an Ajax request and serve back a
  Document Fragment. If so please also take a look at Jx stuff. We
  discuss Jx classes in a fairly amount of details in the lift book.
 
  Br's,
  Marius
 
  On May 20, 9:32 am, fatu fab...@gmail.com wrote:
 
   Timothy,
 
   thanks for the links, I found them useful and I find your blog in
   general very interesting. Came across scala-blogs.org
 http://scala-blogs.org  and it looks
   quite promising as well.
 
   I knew bind already from the Exploring Lift book which I pull from
   git, build with Lyx and keep at hand regularly. In the doctype post,
   though, I couldn't find a way to specify no doctype  which I think
   is necessary to serve a fragment; plus I couldn't find any other easy
   out-of-the-box way to do it. Shouldn't this use case (serving
   fragments), which I think is quite common, be better / more easily
   supported by the framework? Can someone post an example of how to do
   it with raw response handling in the meanwhile?
 
   Thanks anybody.
 
   Fabio
 
   On 26 Apr, 21:49, Timothy Perrett timo...@getintheloop.eu wrote:
 
George,
 
To tell lift what doctype you want to use see my blog post
 here:http://is.gd/uJ4L
 
Also, you'll want to read another one of my posts in which I discuss
the bind(...) method and how you can stop putting markup into your
snippets:http://is.gd/sfyT
 
Cheers, Tim
 
On Apr 26, 1:02 pm, george geo...@mattandgeorge.com wrote:
 
 hello all,
 
 hopefully someone can help me out here.
 
 i am trying to port some simple ajax stuff over to lift from a
rails
 app. basically it just loads anhtmlfragmentand puts it into the
dom
 using prototype.
 
 i have set up a template which contains thefragmentat src/main/
 webapp/fragment.html
 
 ulliitem/li/ul
 
 then i made the page available using the SiteMap and all seems
good,
 but here comes the problem
 
 the lift response adds the xml declaration and doctype, one of
which
 seems to cause prototype some problems
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPEhtmlPUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 ulliitem/li/ul
 
 so the question is, how can i make lift send back the
 rawhtmlwithout
 meddling with it?
 
 i have tried out using ResourceServer to serve it statically
which
 works, but this wouldn't allow me to generate thefragment
 dynamically.
 
 i would also prefer to have a separatehtmltemplate file rather
than
 embedding the markup code in a snippet.
 
 any thoughts gratefully received..
 
 george
 
 
 
 


--~--~-~--~~~---~--~~
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: Problems with the MenuWidget

2009-05-20 Thread Gonzalo N

Thanks for the quick response.
Yes, I've initialised the widget in the boot with Widget init

** In boot.scala: *
package bootstrap.liftweb

import _root_.net.liftweb.util._
import _root_.net.liftweb.http._
import _root_.net.liftweb.sitemap._
import _root_.net.liftweb.sitemap.Loc._
import Helpers._
import _root_.net.liftweb.widgets.menu.MenuWidget

object MenuInfo {
import Loc._

def menu: List[Menu] = Menu(Loc(Home, List(index), Home),
   Menu(Loc(overview, List(overview),
Overview)),
   Menu(Loc(documentation, List
(documentation), Documentation)),
   Menu(Loc(investigators, List
(investigators), Investigators))) ::
Menu(Loc(models, List(models,index), Models),
 Menu(Loc(createM, List(models,create), Create
Model)) ::
Nil
}

class Boot {

def boot {
// where to search snippet
LiftRules.addToPackages(pt.cnbc.wikimodels)

// Build SiteMap
LiftRules.setSiteMap(SiteMap(MenuInfo.menu:_*))

MenuWidget init;
}
}

** In a snippet -- MenuSnippet.scala: ***
package pt.cnbc.wikimodels.snippet

import _root_.scala.xml.NodeSeq
import _root_.net.liftweb.widgets.menu._

class MenuSnippet {

  def render(xhtml: NodeSeq) :NodeSeq = {
  MenuWidget()
  }
}

* in templates-hidden/default.html: *

head
...
/head
body

div
lift:MenuSnippet.render /
/div

/body
/html

It's basically equal with the example, just adapted to /src/main
instead of src/test
Do you think it's probably any error in my pom? Or with the reference
in the css and js files (I've putted them in the path /src/main/
webapp/classpath and ../classpath/menu, or should I put them in the
../main/resources/toserve/menu and reference them in the pom.xml)?
Hope you understand.

Thanks,
GonzaloN


On May 20, 6:26 pm, marius d. marius.dan...@gmail.com wrote:
 Could you please post your code ? ... Are you initializing the widget
 in your boot ?

 Br's,
 Marius

 On May 20, 7:52 pm, Gonzalo N gonn...@gmail.com wrote:

  Hi,

  I've recently started using Lift in a project and probably my
  difficulty is basic, but I've tried the Widgets that are uploaded in
  the github web page. When I run the example, it all worked fine, the
  menu did have the drop-down sub-menus, but when I integrate the code
  of the menu (to be more specific, I want to integrate the MenuWidget)
  to my project, it doesn't work like in the widgets example, ie it
  prints as a list of links with bullet-marks, like the basic menu style
  and I've changed the Boot.scala, added the snippet MenuSnippet.scala,
  added the callback in the default.html, added the respective css and
  js files in the respective folders and added the dependency:
  dependency
        groupIdnet.liftweb/groupId
        artifactIdlift-widgets/artifactId
        version1.1-SNAPSHOT/version
      /dependency
  , but still nothing.

  I've noticed that the example is run under the project/src/test/
  path and it is referenced in the pom.xml file, but in my project I
  wanted it to run in the project/src/main path, so I didn't add
  that reference in my pom.xml.
  If possible, I really would like that someone could explain a working
  step-by-step of how to integrate the menu widget to a project in the
  /src/main path.

  Sorry if this topic was already explained in another post, but I
  didn't found the solution after a search. The only thing I've found,
  was a brief reference to this problem, and I've done what was
  suggested, but it didn't worked. The 
  link:http://groups.google.com/group/liftweb/browse_thread/thread/33b6f9f5e...

  Thanks in advance for the help.

  Cheers,
  GonzaloN

--~--~-~--~~~---~--~~
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: Problems with the MenuWidget

2009-05-20 Thread marius d.

It looks like the CSS and potentially the JSdependecies are not seen
by the browser ...

From your page rendered take the URI for the superfish CSS and JS and
put it in your browser and see if they are seen. Also firebug should
yell if the CSS/JS is can not be loaded

I assume that lift-widgets is in your app pom :) (dumb question ...)

Br's,
Marius

On May 20, 8:58 pm, Gonzalo N gonn...@gmail.com wrote:
 Thanks for the quick response.
 Yes, I've initialised the widget in the boot with Widget init

 ** In boot.scala: *
 package bootstrap.liftweb

 import _root_.net.liftweb.util._
 import _root_.net.liftweb.http._
 import _root_.net.liftweb.sitemap._
 import _root_.net.liftweb.sitemap.Loc._
 import Helpers._
 import _root_.net.liftweb.widgets.menu.MenuWidget

 object MenuInfo {
     import Loc._

     def menu: List[Menu] = Menu(Loc(Home, List(index), Home),
                            Menu(Loc(overview, List(overview),
 Overview)),
                            Menu(Loc(documentation, List
 (documentation), Documentation)),
                            Menu(Loc(investigators, List
 (investigators), Investigators))) ::
         Menu(Loc(models, List(models,index), Models),
                  Menu(Loc(createM, List(models,create), Create
 Model)) ::
         Nil

 }

 class Boot {

     def boot {
         // where to search snippet
         LiftRules.addToPackages(pt.cnbc.wikimodels)

         // Build SiteMap
         LiftRules.setSiteMap(SiteMap(MenuInfo.menu:_*))

         MenuWidget init;
     }

 }

 ** In a snippet -- MenuSnippet.scala: ***
 package pt.cnbc.wikimodels.snippet

 import _root_.scala.xml.NodeSeq
 import _root_.net.liftweb.widgets.menu._

 class MenuSnippet {

   def render(xhtml: NodeSeq) :NodeSeq = {
       MenuWidget()
   }

 }

 * in templates-hidden/default.html: *
 
 head
 ...
 /head
 body
 
 div
 lift:MenuSnippet.render /
 /div
 
 /body
 /html

 It's basically equal with the example, just adapted to /src/main
 instead of src/test
 Do you think it's probably any error in my pom? Or with the reference
 in the css and js files (I've putted them in the path /src/main/
 webapp/classpath and ../classpath/menu, or should I put them in the
 ../main/resources/toserve/menu and reference them in the pom.xml)?
 Hope you understand.

 Thanks,
 GonzaloN

 On May 20, 6:26 pm, marius d. marius.dan...@gmail.com wrote:

  Could you please post your code ? ... Are you initializing the widget
  in your boot ?

  Br's,
  Marius

  On May 20, 7:52 pm, Gonzalo N gonn...@gmail.com wrote:

   Hi,

   I've recently started using Lift in a project and probably my
   difficulty is basic, but I've tried the Widgets that are uploaded in
   the github web page. When I run the example, it all worked fine, the
   menu did have the drop-down sub-menus, but when I integrate the code
   of the menu (to be more specific, I want to integrate the MenuWidget)
   to my project, it doesn't work like in the widgets example, ie it
   prints as a list of links with bullet-marks, like the basic menu style
   and I've changed the Boot.scala, added the snippet MenuSnippet.scala,
   added the callback in the default.html, added the respective css and
   js files in the respective folders and added the dependency:
   dependency
         groupIdnet.liftweb/groupId
         artifactIdlift-widgets/artifactId
         version1.1-SNAPSHOT/version
       /dependency
   , but still nothing.

   I've noticed that the example is run under the project/src/test/
   path and it is referenced in the pom.xml file, but in my project I
   wanted it to run in the project/src/main path, so I didn't add
   that reference in my pom.xml.
   If possible, I really would like that someone could explain a working
   step-by-step of how to integrate the menu widget to a project in the
   /src/main path.

   Sorry if this topic was already explained in another post, but I
   didn't found the solution after a search. The only thing I've found,
   was a brief reference to this problem, and I've done what was
   suggested, but it didn't worked. The 
   link:http://groups.google.com/group/liftweb/browse_thread/thread/33b6f9f5e...

   Thanks in advance for the help.

   Cheers,
   GonzaloN
--~--~-~--~~~---~--~~
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: Snippet name clashes

2009-05-20 Thread Alex Boisvert
Maybe an optional package attribute?

e.g.,

lift:snippet package=com.example type=Foo.bar form=POST
...
/lift:snippet

alex

On Wed, May 20, 2009 at 9:19 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Tue, May 19, 2009 at 9:28 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi,
 As far as I understand it is not possible to specify the FQCN of a snippet
 class in a snippet tag. Is this true? If so, there might be name clashes:
 Just imagine popular names like user, customer, item, etc.

 This will be particularly important in the OSGi space where you can create
 extensible applications: You do not know in advance, which modules are
 added.

 Hence on the long run I think we need something like namespacing. What do
 you think?


 What do you propose as the syntax?

 It's possible to create page-specific snippets so a fair number of the name
 clashes go away, but yes, for global snippets, there might be name clashes.



 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net





 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Problems with the MenuWidget

2009-05-20 Thread Gonzalo N

Hi,

I've recently started using Lift in a project and probably my
difficulty is basic, but I've tried the Widgets that are uploaded in
the github web page. When I run the example, it all worked fine, the
menu did have the drop-down sub-menus, but when I integrate the code
of the menu (to be more specific, I want to integrate the MenuWidget)
to my project, it doesn't work like in the widgets example, ie it
prints as a list of links with bullet-marks, like the basic menu style
and I've changed the Boot.scala, added the snippet MenuSnippet.scala,
added the callback in the default.html, added the respective css and
js files in the respective folders and added the dependency:
dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-widgets/artifactId
  version1.1-SNAPSHOT/version
/dependency
, but still nothing.

I've noticed that the example is run under the project/src/test/
path and it is referenced in the pom.xml file, but in my project I
wanted it to run in the project/src/main path, so I didn't add
that reference in my pom.xml.
If possible, I really would like that someone could explain a working
step-by-step of how to integrate the menu widget to a project in the
/src/main path.

Sorry if this topic was already explained in another post, but I
didn't found the solution after a search. The only thing I've found,
was a brief reference to this problem, and I've done what was
suggested, but it didn't worked. The link:
http://groups.google.com/group/liftweb/browse_thread/thread/33b6f9f5e6519d8d/7bec6e15c4ed95a7?hl=enlnk=gstq=dropdown#7bec6e15c4ed95a7

Thanks in advance for the help.

Cheers,
GonzaloN

--~--~-~--~~~---~--~~
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: your first Lift application on GAE/J

2009-05-20 Thread glenn

I like what you've accomplished with this. I tried to set this up from
the GAE side, using the GAE Eclipse plugin rather
than the maven lift archetype? I took all the 30+ jars the archetype
now installs and created a Eclipse User Library
that I put in the project classpath.

I then just put the lift filter in the web.xml file and ran it as a
Google Web Application.
Even though I built and used the snapshot from the github repository,
I still get the Security Access Control Exception.

There is another approach to mixing GAE and lift using the Eclipse
plugin. The documentation is here

http://code.google.com/eclipse/docs/existingprojects.html

I'm not sure how to run this, however. Do you just use mvn jetty:run,
or do you also need to launch the Google App Engine as well?
Have you tried it?

Glenn...

On May 15, 9:23 pm, Atsuhiko Yamanaka atsuhiko.yaman...@gmail.com
wrote:
 Hi,

 Thank you for your feedback.

 On Sat, May 16, 2009 at 10:33 AM, Eric Daugherty edaughe...@gmail.com wrote:

  I think I executed all the steps correctly, but when I deploy it to
 GAEI get a Security Access Control Exception because the Actor class
  is trying to create a thread I think.

 It seems the recent commit[1] has caused that exception.
 I have pushed the fix to the github repository.
 May I ask you to try it again?

 [1]http://github.com/dpp/liftweb/commit/9e39859be9b8f6f4fd7c17cf503b5bcf...

 Sincerely,
 --
 Atsuhiko Yamanaka
 JCraft,Inc.
 1-14-20 HONCHO AOBA-KU,
 SENDAI, MIYAGI 980-0014 Japan.
 Tel +81-22-723-2150
     +1-415-578-3454
 Fax +81-22-224-8773
 Skype callto://jcraft/

--~--~-~--~~~---~--~~
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: Problems with the MenuWidget

2009-05-20 Thread marius d.

Could you please post your code ? ... Are you initializing the widget
in your boot ?

Br's,
Marius

On May 20, 7:52 pm, Gonzalo N gonn...@gmail.com wrote:
 Hi,

 I've recently started using Lift in a project and probably my
 difficulty is basic, but I've tried the Widgets that are uploaded in
 the github web page. When I run the example, it all worked fine, the
 menu did have the drop-down sub-menus, but when I integrate the code
 of the menu (to be more specific, I want to integrate the MenuWidget)
 to my project, it doesn't work like in the widgets example, ie it
 prints as a list of links with bullet-marks, like the basic menu style
 and I've changed the Boot.scala, added the snippet MenuSnippet.scala,
 added the callback in the default.html, added the respective css and
 js files in the respective folders and added the dependency:
 dependency
       groupIdnet.liftweb/groupId
       artifactIdlift-widgets/artifactId
       version1.1-SNAPSHOT/version
     /dependency
 , but still nothing.

 I've noticed that the example is run under the project/src/test/
 path and it is referenced in the pom.xml file, but in my project I
 wanted it to run in the project/src/main path, so I didn't add
 that reference in my pom.xml.
 If possible, I really would like that someone could explain a working
 step-by-step of how to integrate the menu widget to a project in the
 /src/main path.

 Sorry if this topic was already explained in another post, but I
 didn't found the solution after a search. The only thing I've found,
 was a brief reference to this problem, and I've done what was
 suggested, but it didn't worked. The 
 link:http://groups.google.com/group/liftweb/browse_thread/thread/33b6f9f5e...

 Thanks in advance for the help.

 Cheers,
 GonzaloN
--~--~-~--~~~---~--~~
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.init visibility?

2009-05-20 Thread David Pollak
It should be public.  There may be cases when the user wants to do something
on a non-request and non-CometActor thread that's still in the context of
the session.

On Wed, May 20, 2009 at 11:50 AM, Derek Chen-Becker
dchenbec...@gmail.comwrote:

 I'm working on docs and I noticed that S.init is public. Is there a use
 case for an end user self-initializing S, or is this something that should
 be made package private (or something else)?

 Derek

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Snippet name clashes

2009-05-20 Thread Derek Chen-Becker
Well, I don't know that it prevents all name clashes, but you have to use
LiftRules.addToPackages to tell Lift which packages to search for snippet
and view classes.



On Tue, May 19, 2009 at 10:28 PM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 Hi,
 As far as I understand it is not possible to specify the FQCN of a snippet
 class in a snippet tag. Is this true? If so, there might be name clashes:
 Just imagine popular names like user, customer, item, etc.

 This will be particularly important in the OSGi space where you can create
 extensible applications: You do not know in advance, which modules are
 added.

 Hence on the long run I think we need something like namespacing. What do
 you think?

 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net

 


--~--~-~--~~~---~--~~
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: Snippet name clashes

2009-05-20 Thread David Pollak
On Tue, May 19, 2009 at 9:28 PM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 Hi,
 As far as I understand it is not possible to specify the FQCN of a snippet
 class in a snippet tag. Is this true? If so, there might be name clashes:
 Just imagine popular names like user, customer, item, etc.

 This will be particularly important in the OSGi space where you can create
 extensible applications: You do not know in advance, which modules are
 added.

 Hence on the long run I think we need something like namespacing. What do
 you think?


What do you propose as the syntax?

It's possible to create page-specific snippets so a fair number of the name
clashes go away, but yes, for global snippets, there might be name clashes.



 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: S.init visibility?

2009-05-20 Thread Derek Chen-Becker
Fair enough. Thanks!


On Wed, May 20, 2009 at 12:51 PM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

 It should be public.  There may be cases when the user wants to do
 something on a non-request and non-CometActor thread that's still in the
 context of the session.

 On Wed, May 20, 2009 at 11:50 AM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

 I'm working on docs and I noticed that S.init is public. Is there a use
 case for an end user self-initializing S, or is this something that should
 be made package private (or something else)?

 Derek





 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Snippet name clashes

2009-05-20 Thread David Pollak
On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert boisv...@intalio.com wrote:

 Maybe an optional package attribute?

 e.g.,

 lift:snippet package=com.example type=Foo.bar form=POST
 ...
 /lift:snippet


Dude... you're so 2008 with that syntax... :-)

The current syntax is:

lift:Foo.bar form=Post.../lift:Foo.bar

I guess we can add a package attribute anyway, although it breaks the whole
Snippet lookup mechanism (not the reflection code, but the partial
functions).




 alex

 On Wed, May 20, 2009 at 9:19 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Tue, May 19, 2009 at 9:28 PM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi,
 As far as I understand it is not possible to specify the FQCN of a
 snippet class in a snippet tag. Is this true? If so, there might be name
 clashes: Just imagine popular names like user, customer, item, etc.

 This will be particularly important in the OSGi space where you can
 create extensible applications: You do not know in advance, which modules
 are added.

 Hence on the long run I think we need something like namespacing. What do
 you think?


 What do you propose as the syntax?

 It's possible to create page-specific snippets so a fair number of the
 name clashes go away, but yes, for global snippets, there might be name
 clashes.



 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net





 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp





 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Snippet name clashes

2009-05-20 Thread Alex Boisvert
2009/5/20 David Pollak feeder.of.the.be...@gmail.com



 On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert boisv...@intalio.comwrote:

 Maybe an optional package attribute?

 e.g.,

 lift:snippet package=com.example type=Foo.bar form=POST
 ...
 /lift:snippet


 Dude... you're so 2008 with that syntax... :-)


Yes, I know... I just couldn't come to terms with using dots in my XML
elements.   I guess I have issues ;)


The current syntax is:

 lift:Foo.bar form=Post.../lift:Foo.bar

 I guess we can add a package attribute anyway, although it breaks the whole
 Snippet lookup mechanism (not the reflection code, but the partial
 functions).


It seems it would be natural to use XML namespaces for mapping to Scala
packages.

LiftRules.mapNamespaceToPackage(http://com.example.myapp.widgets; -
com.example.myapp.widgets)

and then,

html ... xmlns:example=http://com.example.myapp.snippets;

  example:Foo.bar ... /example:Foo.bar

?

alex

--~--~-~--~~~---~--~~
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: Problems with the MenuWidget

2009-05-20 Thread Gonzalo N

After using firebug and putting the URI localhost:8080/classpath/menu/
superfish.js,as weel as the css and the jquery.hoverintent, all are
being seen by the browser and in the terminal shell it doesn't return
errors when reading/locating those files.
In the pom I added the dependency:
dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-widgets/artifactId
  version1.1-M1/version
/dependency

I've putted the version 1.1-M1, because it was the last I've search in
the lift repo.
Do you think I should change to another version?
And also added the snapshot repository:
repositories
repository
  idscala-tools.org/id
  nameScala-Tools Maven2 Repository/name
  urlhttp://scala-tools.org/repo-releases/url
/repository
repository
  idscala-tools.org.snapshots/id
  nameScala Tools Maven2 Repository/name
  urlhttp://scala-tools.org/repo-snapshots/url
  snapshots /
/repository
  /repositories

Actually, I cannot see what am I doing wrong, that was why I was
asking if there was a step-by-step tutorial to the menu widget only.
In the Lift-book group, I've read the Exploring Lift tutorial and in
the widgets section, there is no reference to this widget.

Many thanks,
GonzaloN



On May 20, 7:24 pm, marius d. marius.dan...@gmail.com wrote:
 It looks like the CSS and potentially the JSdependecies are not seen
 by the browser ...

 From your page rendered take the URI for the superfish CSS and JS and
 put it in your browser and see if they are seen. Also firebug should
 yell if the CSS/JS is can not be loaded

 I assume that lift-widgets is in your app pom :) (dumb question ...)

 Br's,
 Marius

 On May 20, 8:58 pm, Gonzalo N gonn...@gmail.com wrote:

  Thanks for the quick response.
  Yes, I've initialised the widget in the boot with Widget init

  ** In boot.scala: *
  package bootstrap.liftweb

  import _root_.net.liftweb.util._
  import _root_.net.liftweb.http._
  import _root_.net.liftweb.sitemap._
  import _root_.net.liftweb.sitemap.Loc._
  import Helpers._
  import _root_.net.liftweb.widgets.menu.MenuWidget

  object MenuInfo {
      import Loc._

      def menu: List[Menu] = Menu(Loc(Home, List(index), Home),
                             Menu(Loc(overview, List(overview),
  Overview)),
                             Menu(Loc(documentation, List
  (documentation), Documentation)),
                             Menu(Loc(investigators, List
  (investigators), Investigators))) ::
          Menu(Loc(models, List(models,index), Models),
                   Menu(Loc(createM, List(models,create), Create
  Model)) ::
          Nil

  }

  class Boot {

      def boot {
          // where to search snippet
          LiftRules.addToPackages(pt.cnbc.wikimodels)

          // Build SiteMap
          LiftRules.setSiteMap(SiteMap(MenuInfo.menu:_*))

          MenuWidget init;
      }

  }

  ** In a snippet -- MenuSnippet.scala: ***
  package pt.cnbc.wikimodels.snippet

  import _root_.scala.xml.NodeSeq
  import _root_.net.liftweb.widgets.menu._

  class MenuSnippet {

    def render(xhtml: NodeSeq) :NodeSeq = {
        MenuWidget()
    }

  }

  * in templates-hidden/default.html: *
  
  head
  ...
  /head
  body
  
  div
  lift:MenuSnippet.render /
  /div
  
  /body
  /html

  It's basically equal with the example, just adapted to /src/main
  instead of src/test
  Do you think it's probably any error in my pom? Or with the reference
  in the css and js files (I've putted them in the path /src/main/
  webapp/classpath and ../classpath/menu, or should I put them in the
  ../main/resources/toserve/menu and reference them in the pom.xml)?
  Hope you understand.

  Thanks,
  GonzaloN

  On May 20, 6:26 pm, marius d. marius.dan...@gmail.com wrote:

   Could you please post your code ? ... Are you initializing the widget
   in your boot ?

   Br's,
   Marius

   On May 20, 7:52 pm, Gonzalo N gonn...@gmail.com wrote:

Hi,

I've recently started using Lift in a project and probably my
difficulty is basic, but I've tried the Widgets that are uploaded in
the github web page. When I run the example, it all worked fine, the
menu did have the drop-down sub-menus, but when I integrate the code
of the menu (to be more specific, I want to integrate the MenuWidget)
to my project, it doesn't work like in the widgets example, ie it
prints as a list of links with bullet-marks, like the basic menu style
and I've changed the Boot.scala, added the snippet MenuSnippet.scala,
added the callback in the default.html, added the respective css and
js files in the respective folders and added the dependency:
dependency
      groupIdnet.liftweb/groupId
      artifactIdlift-widgets/artifactId
      version1.1-SNAPSHOT/version
    /dependency
, but still nothing.

I've noticed that the example is run under the project/src/test/
path and it is referenced in the pom.xml file, but in my project 

[Lift] The 1.0_maint branch

2009-05-20 Thread David Pollak
Folks,

I've committed code for the 1.0.1-SNAPSHOT to the 1.0_maint branch in the
repository.

I've tested the sample app against IE8 and it works just fine.

Please give it a whirl (there's nothing in the Maven repository, you'll have
to hand-build) and let me know how it's working for you.

Thanks,

David

PS -- It upgrades to Scala 2.7.4, so your app will have to be 2.7.4 as well.

-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Problems with the MenuWidget

2009-05-20 Thread marius d.

I emailed you privately an simple chat application that has the
MenuWidget in it. I had no problem with putting it.

If you stil can't figure it out please email me a minimalistic lift
app where it just doesn't work.

Br's,
Marius

On May 20, 10:04 pm, Gonzalo N gonn...@gmail.com wrote:
 After using firebug and putting the URI localhost:8080/classpath/menu/
 superfish.js,as weel as the css and the jquery.hoverintent, all are
 being seen by the browser and in the terminal shell it doesn't return
 errors when reading/locating those files.
 In the pom I added the dependency:
     dependency
       groupIdnet.liftweb/groupId
       artifactIdlift-widgets/artifactId
       version1.1-M1/version
     /dependency

 I've putted the version 1.1-M1, because it was the last I've search in
 the lift repo.
 Do you think I should change to another version?
 And also added the snapshot repository:
 repositories
     repository
       idscala-tools.org/id
       nameScala-Tools Maven2 Repository/name
       urlhttp://scala-tools.org/repo-releases/url
     /repository
     repository
       idscala-tools.org.snapshots/id
       nameScala Tools Maven2 Repository/name
       urlhttp://scala-tools.org/repo-snapshots/url
       snapshots /
     /repository
   /repositories

 Actually, I cannot see what am I doing wrong, that was why I was
 asking if there was a step-by-step tutorial to the menu widget only.
 In the Lift-book group, I've read the Exploring Lift tutorial and in
 the widgets section, there is no reference to this widget.

 Many thanks,
 GonzaloN

 On May 20, 7:24 pm, marius d. marius.dan...@gmail.com wrote:

  It looks like the CSS and potentially the JSdependecies are not seen
  by the browser ...

  From your page rendered take the URI for the superfish CSS and JS and
  put it in your browser and see if they are seen. Also firebug should
  yell if the CSS/JS is can not be loaded

  I assume that lift-widgets is in your app pom :) (dumb question ...)

  Br's,
  Marius

  On May 20, 8:58 pm, Gonzalo N gonn...@gmail.com wrote:

   Thanks for the quick response.
   Yes, I've initialised the widget in the boot with Widget init

   ** In boot.scala: *
   package bootstrap.liftweb

   import _root_.net.liftweb.util._
   import _root_.net.liftweb.http._
   import _root_.net.liftweb.sitemap._
   import _root_.net.liftweb.sitemap.Loc._
   import Helpers._
   import _root_.net.liftweb.widgets.menu.MenuWidget

   object MenuInfo {
       import Loc._

       def menu: List[Menu] = Menu(Loc(Home, List(index), Home),
                              Menu(Loc(overview, List(overview),
   Overview)),
                              Menu(Loc(documentation, List
   (documentation), Documentation)),
                              Menu(Loc(investigators, List
   (investigators), Investigators))) ::
           Menu(Loc(models, List(models,index), Models),
                    Menu(Loc(createM, List(models,create), Create
   Model)) ::
           Nil

   }

   class Boot {

       def boot {
           // where to search snippet
           LiftRules.addToPackages(pt.cnbc.wikimodels)

           // Build SiteMap
           LiftRules.setSiteMap(SiteMap(MenuInfo.menu:_*))

           MenuWidget init;
       }

   }

   ** In a snippet -- MenuSnippet.scala: ***
   package pt.cnbc.wikimodels.snippet

   import _root_.scala.xml.NodeSeq
   import _root_.net.liftweb.widgets.menu._

   class MenuSnippet {

     def render(xhtml: NodeSeq) :NodeSeq = {
         MenuWidget()
     }

   }

   * in templates-hidden/default.html: *
   
   head
   ...
   /head
   body
   
   div
   lift:MenuSnippet.render /
   /div
   
   /body
   /html

   It's basically equal with the example, just adapted to /src/main
   instead of src/test
   Do you think it's probably any error in my pom? Or with the reference
   in the css and js files (I've putted them in the path /src/main/
   webapp/classpath and ../classpath/menu, or should I put them in the
   ../main/resources/toserve/menu and reference them in the pom.xml)?
   Hope you understand.

   Thanks,
   GonzaloN

   On May 20, 6:26 pm, marius d. marius.dan...@gmail.com wrote:

Could you please post your code ? ... Are you initializing the widget
in your boot ?

Br's,
Marius

On May 20, 7:52 pm, Gonzalo N gonn...@gmail.com wrote:

 Hi,

 I've recently started using Lift in a project and probably my
 difficulty is basic, but I've tried the Widgets that are uploaded in
 the github web page. When I run the example, it all worked fine, the
 menu did have the drop-down sub-menus, but when I integrate the code
 of the menu (to be more specific, I want to integrate the MenuWidget)
 to my project, it doesn't work like in the widgets example, ie it
 prints as a list of links with bullet-marks, like the basic menu style
 and I've changed the Boot.scala, added the snippet MenuSnippet.scala,
 added the callback in the default.html, 

[Lift] Cron style job support?

2009-05-20 Thread Ewan

Apologies for the cross-post with the Lift-book group but this is the
more appropriate group...

While this does not necessarily have anything to do with a webapp does
anyone have suggestions for the means to create/register and run a
cron style job?  Specifically I would like to extract data from the DB
and send to a Solr instance for searching and as I am happily using
Mapper I'd like to continue using it for ORM.  In J2EE land we used
Quartz so worst case I guess I could have a servlet that on
initialisation starts up Quartz and then code a job to that hits the
DB with JDBC and then post to a Solr instance.

-- Ewan

--~--~-~--~~~---~--~~
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] trang maven repo/plugin?

2009-05-20 Thread Meredith Gregory
Lifted,

Does anybody have a lead on a repo for trang? Even better -- a plugin would
be awesome.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
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: Snippet name clashes

2009-05-20 Thread David Pollak
On Wed, May 20, 2009 at 12:02 PM, Alex Boisvert boisv...@intalio.comwrote:

 2009/5/20 David Pollak feeder.of.the.be...@gmail.com



 On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert boisv...@intalio.comwrote:

 Maybe an optional package attribute?

 e.g.,

 lift:snippet package=com.example type=Foo.bar form=POST
 ...
 /lift:snippet


 Dude... you're so 2008 with that syntax... :-)


 Yes, I know... I just couldn't come to terms with using dots in my XML
 elements.   I guess I have issues ;)


 The current syntax is:

 lift:Foo.bar form=Post.../lift:Foo.bar

 I guess we can add a package attribute anyway, although it breaks the
 whole Snippet lookup mechanism (not the reflection code, but the partial
 functions).


 It seems it would be natural to use XML namespaces for mapping to Scala
 packages.

 LiftRules.mapNamespaceToPackage(http://com.example.myapp.widgets; -
 com.example.myapp.widgets)

 and then,

 html ... xmlns:example=http://com.example.myapp.snippets;

   example:Foo.bar ... /example:Foo.bar

 ?


Interesting... it might impact rendering performance, but it's nice and
flexible.




 alex

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Problem with S.params

2009-05-20 Thread wilkinspoe

Hi,

I have been having trouble reading a list of HTTP parameters with the
same name that may or may not exist. If I call S.params(nn) and nn
doesn't exist, it throws a NoSuchElementException: key not found. I
was expecting an empty List.

The code for S.params is

def params(n: String): List[String] = request.map(_.params(n)).openOr
(Nil)

Shouldn't it be something like:

def params(n: String): List[String] = request.map(_.params.getOrElse
(n,Nil)).openOr(Nil)

Or am I doing something wrong?

Thanks,
Wilkins

--~--~-~--~~~---~--~~
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] set currentUser as owner

2009-05-20 Thread Tobias Daub

Hello Lifters,

I wanted to override the defaultValue of my owner field, to always set 
it to the currentUser. I cannot compile this, because I get an error 
(what I kind of understand). During compilation, there's no currentUser 
so this function call has to be delayed somehow, but how?

The definition of the owner field is inside a trait, is this a 
additional reason for this error?


thanks!

--~--~-~--~~~---~--~~
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: Problem with S.params

2009-05-20 Thread Derek Chen-Becker
Definitely looks wrong to me. Maybe we can get this in for the 1.0.1
release.

Derek

On Wed, May 20, 2009 at 6:22 PM, wilkinspoe wilkins...@gmail.com wrote:


 Hi,

 I have been having trouble reading a list of HTTP parameters with the
 same name that may or may not exist. If I call S.params(nn) and nn
 doesn't exist, it throws a NoSuchElementException: key not found. I
 was expecting an empty List.

 The code for S.params is

 def params(n: String): List[String] = request.map(_.params(n)).openOr
 (Nil)

 Shouldn't it be something like:

 def params(n: String): List[String] = request.map(_.params.getOrElse
 (n,Nil)).openOr(Nil)

 Or am I doing something wrong?

 Thanks,
 Wilkins

 


--~--~-~--~~~---~--~~
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] Double as primary key

2009-05-20 Thread vseryakov

Hi,

For anyone who may use Double as a primary key. I know it is not usual
but still doubles are prett usefull as indexes.

---
trait DoubleKeyedMetaMapper[A : DoubleKeyedMapper[A]] extends
KeyedMetaMapper[Double, A] { self: A = }

trait DoubleKeyedMapper[OwnerType : DoubleKeyedMapper[OwnerType]]
extends KeyedMapper[Double, OwnerType] with BaseDoubleKeyedMapper {
  self: OwnerType =
}

trait BaseDoubleKeyedMapper extends BaseKeyedMapper {
  override type TheKeyType = Double
}

class MappedDoubleIndex[T:Mapper[T]](theOwner: T) extends MappedDouble
[T](theOwner) with IndexedField[Double] {

  override def writePermission_? = false // not writable

  override def dbIndexed_? = true

  def defined_? = i_is_! != defaultValue
  override def dbPrimaryKey_? = true

  override def defaultValue = 0.0

  override def dbIndexFieldIndicatesSaved_? = {i_is_! != defaultValue}

  def makeKeyJDBCFriendly(in: Double) = new _root_.java.lang.Double
(in)

  def convertKey(in: String): Box[Double] = {
if (in eq null) Empty
else tryo(toLong(if (in.startsWith(name + =)) in.substring((name
+ =).length) else in))
  }

  override def dbDisplay_? = false

  def convertKey(in : Double): Box[Double] = {
if (in  0L) Empty
else Full(in)
  }

  def convertKey(in : Int): Box[Double] = {
if (in  0) Empty
else Full(in)
  }

  def convertKey(in : Long): Box[Double] = {
if (in  0) Empty
else Full(in)
  }

  def convertKey(in : AnyRef): Box[Double] = {
if ((in eq null) || (in eq None)) Empty
else tryo(convertKey(in.toString)).flatMap(s = s)
  }

  override def fieldCreatorString(dbType: DriverType, colName:
String): String = colName +   + dbType.doubleColumnType +  NOT
NULL

}

--~--~-~--~~~---~--~~
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: Double as primary key

2009-05-20 Thread David Pollak
Very cool!

On Wed, May 20, 2009 at 8:02 PM, vseryakov vserya...@gmail.com wrote:


 Hi,

 For anyone who may use Double as a primary key. I know it is not usual
 but still doubles are prett usefull as indexes.

 ---
 trait DoubleKeyedMetaMapper[A : DoubleKeyedMapper[A]] extends
 KeyedMetaMapper[Double, A] { self: A = }

 trait DoubleKeyedMapper[OwnerType : DoubleKeyedMapper[OwnerType]]
 extends KeyedMapper[Double, OwnerType] with BaseDoubleKeyedMapper {
  self: OwnerType =
 }

 trait BaseDoubleKeyedMapper extends BaseKeyedMapper {
  override type TheKeyType = Double
 }

 class MappedDoubleIndex[T:Mapper[T]](theOwner: T) extends MappedDouble
 [T](theOwner) with IndexedField[Double] {

  override def writePermission_? = false // not writable

  override def dbIndexed_? = true

  def defined_? = i_is_! != defaultValue
  override def dbPrimaryKey_? = true

  override def defaultValue = 0.0

  override def dbIndexFieldIndicatesSaved_? = {i_is_! != defaultValue}

  def makeKeyJDBCFriendly(in: Double) = new _root_.java.lang.Double
 (in)

  def convertKey(in: String): Box[Double] = {
if (in eq null) Empty
else tryo(toLong(if (in.startsWith(name + =)) in.substring((name
 + =).length) else in))
  }

  override def dbDisplay_? = false

  def convertKey(in : Double): Box[Double] = {
if (in  0L) Empty
else Full(in)
  }

  def convertKey(in : Int): Box[Double] = {
if (in  0) Empty
else Full(in)
  }

  def convertKey(in : Long): Box[Double] = {
if (in  0) Empty
else Full(in)
  }

  def convertKey(in : AnyRef): Box[Double] = {
if ((in eq null) || (in eq None)) Empty
else tryo(convertKey(in.toString)).flatMap(s = s)
  }

  override def fieldCreatorString(dbType: DriverType, colName:
 String): String = colName +   + dbType.doubleColumnType +  NOT
 NULL

 }

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: set currentUser as owner

2009-05-20 Thread David Pollak
Can you post a code sample and the error?
try:

object owner extends MappedLongForeignKey(this, User) {
  override def defaultValue = User.currentUserId openOr 0L
}


On Wed, May 20, 2009 at 5:38 PM, Tobias Daub hannes.flo...@gmx.li wrote:


 Hello Lifters,

 I wanted to override the defaultValue of my owner field, to always set
 it to the currentUser. I cannot compile this, because I get an error
 (what I kind of understand). During compilation, there's no currentUser
 so this function call has to be delayed somehow, but how?

 The definition of the owner field is inside a trait, is this a
 additional reason for this error?


 thanks!

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Problem with S.params

2009-05-20 Thread David Pollak
Fixed in 1.1-SNAPSHOT and 1.0.1-SNAPSHOT

On Wed, May 20, 2009 at 7:13 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Definitely looks wrong to me. Maybe we can get this in for the 1.0.1
 release.

 Derek


 On Wed, May 20, 2009 at 6:22 PM, wilkinspoe wilkins...@gmail.com wrote:


 Hi,

 I have been having trouble reading a list of HTTP parameters with the
 same name that may or may not exist. If I call S.params(nn) and nn
 doesn't exist, it throws a NoSuchElementException: key not found. I
 was expecting an empty List.

 The code for S.params is

 def params(n: String): List[String] = request.map(_.params(n)).openOr
 (Nil)

 Shouldn't it be something like:

 def params(n: String): List[String] = request.map(_.params.getOrElse
 (n,Nil)).openOr(Nil)

 Or am I doing something wrong?

 Thanks,
 Wilkins




 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: how to serve html fragments

2009-05-20 Thread David Pollak
On Wed, May 20, 2009 at 8:38 PM, fatu fab...@gmail.com wrote:


 Hi David,

 yes it will do, thank you so much for such a lightning-fast
 development in reply!

 I'm only thinking about a case that is probably much more of an
 exception than a rule, i.e. when the snippet dynamically decides if it
 needs to generate a full page or a fragment (which is not a very good
 design anyway IMHO), for example based on some info passed. But even
 in that case the snippet will know that and will be able to set
 S.skipDocType = true accordingly, so it should be perfectly fine. Plus
 it won't be difficult at all to make the processing diverge in the 2
 cases by using URL rewrites, redirecting it to a different template /
 snippet depending on parameters or URL structure, which is probably a
 better design too.


You could also pass a header flag from your AJAX call.  If the header's set,
you don't do the boilerplate surround that'll include all the html, head
and body tags.

Anyway, enjoy and thanks for the use case.

Party on.



 Again many thanks everyone and David especially!

 On May 20, 4:05 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  I'm about to commit S.skipDocType = true | false.  If you set it to true,
  the !DOCTYPE .../ will be omitted from the response page.  This will
 allow
  your AJAX fragements to pull parts of pages from the server.  Note that
  someplace in your snippets, you'll have to set S.skipDocType = true.
 
  Does this address your issue?
 
 
 
  On Wed, May 20, 2009 at 5:13 AM, fatu fab...@gmail.com wrote:
 
   Hi Marius,
 
   as I understand them, Jx classes help in generating JS that can itself
   generate DOM at the client.  Am I wrong? I'd really like to serve back
   an HTML fragment built by using the normal Lift template pipeline (so
   including surround  bind). Is that possible?
 
   Thanks
 
   On 20 Mag, 13:16, marius d. marius.dan...@gmail.com wrote:
As I understood you want to make an Ajax request and serve back a
Document Fragment. If so please also take a look at Jx stuff. We
discuss Jx classes in a fairly amount of details in the lift book.
 
Br's,
Marius
 
On May 20, 9:32 am, fatu fab...@gmail.com wrote:
 
 Timothy,
 
 thanks for the links, I found them useful and I find your blog in
 general very interesting. Came across scala-blogs.org and it looks
 quite promising as well.
 
 I knew bind already from the Exploring Lift book which I pull
 from
 git, build with Lyx and keep at hand regularly. In the doctype
 post,
 though, I couldn't find a way to specify no doctype  which I
 think
 is necessary to serve a fragment; plus I couldn't find any other
 easy
 out-of-the-box way to do it. Shouldn't this use case (serving
 fragments), which I think is quite common, be better / more easily
 supported by the framework? Can someone post an example of how to
 do
 it with raw response handling in the meanwhile?
 
 Thanks anybody.
 
 Fabio
 
 On 26 Apr, 21:49, Timothy Perrett timo...@getintheloop.eu wrote:
 
  George,
 
  To tell lift what doctype you want to use see my blog post here:
  http://is.gd/uJ4L
 
  Also, you'll want to read another one of my posts in which I
 discuss
  the bind(...) method and how you can stop putting markup into
 your
  snippets:http://is.gd/sfyT
 
  Cheers, Tim
 
  On Apr 26, 1:02 pm, george geo...@mattandgeorge.com wrote:
 
   hello all,
 
   hopefully someone can help me out here.
 
   i am trying to port some simple ajax stuff over to lift from a
   rails
   app. basically it just loads anhtmlfragmentand puts it into the
 dom
   using prototype.
 
   i have set up a template which contains thefragmentat src/main/
   webapp/fragment.html
 
   ulliitem/li/ul
 
   then i made the page available using the SiteMap and all seems
   good,
   but here comes the problem
 
   the lift response adds the xml declaration and doctype, one of
   which
   seems to cause prototype some problems
 
   ?xml version=1.0 encoding=UTF-8?
   !DOCTYPEhtmlPUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
   ulliitem/li/ul
 
   so the question is, how can i make lift send back the
   rawhtmlwithout
   meddling with it?
 
   i have tried out using ResourceServer to serve it statically
 which
   works, but this wouldn't allow me to generate thefragment
   dynamically.
 
   i would also prefer to have a separatehtmltemplate file rather
 than
   embedding the markup code in a snippet.
 
   any thoughts gratefully received..
 
   george
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala 

[Lift] Re: Problem with S.params

2009-05-20 Thread wilkinspoe

Thanks for the quick fix. You guys are great.

On May 20, 8:35 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Fixed in 1.1-SNAPSHOT and 1.0.1-SNAPSHOT

 On Wed, May 20, 2009 at 7:13 PM, Derek Chen-Becker 
 dchenbec...@gmail.comwrote:



  Definitely looks wrong to me. Maybe we can get this in for the 1.0.1
  release.

  Derek

  On Wed, May 20, 2009 at 6:22 PM, wilkinspoe wilkins...@gmail.com wrote:

  Hi,

  I have been having trouble reading a list of HTTP parameters with the
  same name that may or may not exist. If I call S.params(nn) and nn
  doesn't exist, it throws a NoSuchElementException: key not found. I
  was expecting an empty List.

  The code for S.params is

  def params(n: String): List[String] = request.map(_.params(n)).openOr
  (Nil)

  Shouldn't it be something like:

  def params(n: String): List[String] = request.map(_.params.getOrElse
  (n,Nil)).openOr(Nil)

  Or am I doing something wrong?

  Thanks,
  Wilkins

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---