[Lift] How to bind preserving element contents?

2009-09-18 Thread Heiko Seeberger
Hi,
I would like to bind the following part form a template:

question:row
  tdquestion:edit/nbsp;question:delete//td
  tdquestion:id//td
  tdquestion:text//td
  tdquestion:answers//td
/question:row

The result should be a table row like that:

tr id=someId
  td.../td
  ...
/tr

So in this case I want to replace the row-element itself (and add an
attribute value), but the contents (children) of the row-element must be
preserved! How can this be accomplished?

Thank you!

Heiko

--
My job: weiglewilczek.com
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: 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: Tabs + menu builder

2009-09-18 Thread Jeppe Nejsum Madsen

caw1461 caw1...@gmail.com writes:

 I'm working on a UI for a project and we are looking at the jquery
 tabs.  Currently we just have a plain menu builder site map.  we are
 thinking that a good way to create our UI is to somehow link the site
 builder with the Tabs such that each tab holds a different link from
 the site map.  I know this is slightly vague, but any advice for a new
 to lift and scala and HTML/XML.

We've made primary/secondary navigation where primary navigation is a
list across the screen (could be tabs in your case), and the secondary
navigation is dynamic based on the selected primary navigation item.

Everything is defined in the sitemap, with some custom menu snippets.

We're using LocGroup's to indicate whether an item is primary or
secondary (or something else :-) and created a snippet to render a
group:
 lift:FZMenu.group group=primarylimenu:bind
 //li/lift:FZMenu.group

The secondary navigation has it's own snippet (it's collapsable):

lift:FZMenu.secondary group=secondary li_item:class=selected /

/Jeppe

--~--~-~--~~~---~--~~
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: Binding - keepAttrs?

2009-09-18 Thread Ewan

I asked this only the day before (and got the answer) - might be worth
popping it on the wiki now.

On Sep 17, 9:58 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 DPP added an attribute-preserving arrow: -%
 Then you can use unprefixed attributes.

 -

 Bryangerm...@gmail.com wrote:

 I am trying to update an old lift application I wrote using
 1.1-SNAPSHOT.  It looks like bind is no longer keeping the attributes
 I've defined in the template.

 bind(f, xhtml,
      pickupDate - keepAttrs(SHtml.text(pickupDate.is, pickupDate(_))),
      submit - SHtml.submit(Search, processSearch)
 )

 f:pickupDate f:id=pdate f:maxlength=10 f:size=10 /

 Renders as

 input value= type=text name=F812119230404JZF /

 But should be

 input value= type=text name=F812119230404JZF id=pdate
 maxlength=10 size=10 /

 Thanks,
 Bryan
--~--~-~--~~~---~--~~
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] Weird JPA behavior

2009-09-18 Thread Charles F. Munat

I have an object with associated objects which have associated objects.

The first is an Application. An application is associated with a Member. 
The Member is associated with sets of StreetAddresses and Telephones.

In the Application class I have a toHTML method that lays out the detail 
from the Application, *including* the Member's data *and* any 
StreetAddresses or Telephones.

If I pull an Application out of the DB using a ScalaQuery, it works like 
a charm.

I also have an add method that creates the Application. It creates the 
Member first, then creates the StreetAddresses and Telephones and adds 
them to the Member. Then it creates the Application and adds the Member. 
Then it does a mergeAndFlush on the Application.

Then I send a couple of emails, and in one of them I call the asHTML 
method on the Application. And I get all the Application and Member 
data, but the StreetAddresses and Telephones are blank.

What gives? What do I have to do to access 
application.member.telephones? Or can I not do that automatically in a 
method inside of application? (It's the Application toHTML method that 
runs through this.member.telephones to create the output.)

The craziest thing to me is that if I query for the Application, it 
works just fine.

TIA

Chas.

--~--~-~--~~~---~--~~
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: Binding - keepAttrs?

2009-09-18 Thread Timothy Perrett

The wiki is open for all to edit.

Can I suggest you call it How To: Preserve binding attributes

Cheers, Tim

On 18 Sep 2009, at 10:25, Ewan wrote:


 I asked this only the day before (and got the answer) - might be worth
 popping it on the wiki now.

 On Sep 17, 9:58 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 DPP added an attribute-preserving arrow: -%
 Then you can use unprefixed attributes.

 -

 Bryangerm...@gmail.com wrote:

 I am trying to update an old lift application I wrote using
 1.1-SNAPSHOT.  It looks like bind is no longer keeping the attributes
 I've defined in the template.

 bind(f, xhtml,
  pickupDate - keepAttrs(SHtml.text(pickupDate.is, pickupDate 
 (_))),
  submit - SHtml.submit(Search, processSearch)
 )

 f:pickupDate f:id=pdate f:maxlength=10 f:size=10 /

 Renders as

 input value= type=text name=F812119230404JZF /

 But should be

 input value= type=text name=F812119230404JZF id=pdate
 maxlength=10 size=10 /

 Thanks,
 Bryan
 



--~--~-~--~~~---~--~~
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: Binding - keepAttrs?

2009-09-18 Thread Naftoli Gugenheim

Or you can maybe insert it in the main binding article.

-
Timothy Perretttimo...@getintheloop.eu wrote:


The wiki is open for all to edit.

Can I suggest you call it How To: Preserve binding attributes

Cheers, Tim

On 18 Sep 2009, at 10:25, Ewan wrote:


 I asked this only the day before (and got the answer) - might be worth
 popping it on the wiki now.

 On Sep 17, 9:58 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 DPP added an attribute-preserving arrow: -%
 Then you can use unprefixed attributes.

 -

 Bryangerm...@gmail.com wrote:

 I am trying to update an old lift application I wrote using
 1.1-SNAPSHOT.  It looks like bind is no longer keeping the attributes
 I've defined in the template.

 bind(f, xhtml,
  pickupDate - keepAttrs(SHtml.text(pickupDate.is, pickupDate 
 (_))),
  submit - SHtml.submit(Search, processSearch)
 )

 f:pickupDate f:id=pdate f:maxlength=10 f:size=10 /

 Renders as

 input value= type=text name=F812119230404JZF /

 But should be

 input value= type=text name=F812119230404JZF id=pdate
 maxlength=10 size=10 /

 Thanks,
 Bryan
 





--~--~-~--~~~---~--~~
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: Binding - keepAttrs?

2009-09-18 Thread Ewan

I'd be happy to do that.  One thing though is that the main binding
article still has examples of the old way which needs an update i.e.

# label for=first_name
#   User name example:first_name example:id=first_name /
# /label

which brings me on to a related issue where by -% does compile if the
argument is a String where as - does.  Is this intended?

/src/main/scala/org/harrow/findaholidaylet/snippet/
PropertySearch.scala:291: error: overloaded method value -% with
alternatives ((scala.xml.NodeSeq) = scala.xml.Elem)
net.liftweb.util.Helpers.FuncBindParam and (Option[scala.xml.Elem])
net.liftweb.util.Helpers.FuncBindParam and (net.liftweb.util.Box
[scala.xml.Elem])net.liftweb.util.Helpers.FuncBindParam and
(scala.xml.Elem)net.liftweb.util.Helpers.FuncBindParam cannot be
applied to (String)
   name -% r(name),
  ^
one error found


On Sep 18, 11:26 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Or you can maybe insert it in the main binding article.

 -

 Timothy Perretttimo...@getintheloop.eu wrote:

 The wiki is open for all to edit.

 Can I suggest you call it How To: Preserve binding attributes

 Cheers, Tim

 On 18 Sep 2009, at 10:25, Ewan wrote:



  I asked this only the day before (and got the answer) - might be worth
  popping it on the wiki now.

  On Sep 17, 9:58 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
  DPP added an attribute-preserving arrow: -%
  Then you can use unprefixed attributes.

  -

  Bryangerm...@gmail.com wrote:

  I am trying to update an old lift application I wrote using
  1.1-SNAPSHOT.  It looks like bind is no longer keeping the attributes
  I've defined in the template.

  bind(f, xhtml,
       pickupDate - keepAttrs(SHtml.text(pickupDate.is, pickupDate
  (_))),
       submit - SHtml.submit(Search, processSearch)
  )

  f:pickupDate f:id=pdate f:maxlength=10 f:size=10 /

  Renders as

  input value= type=text name=F812119230404JZF /

  But should be

  input value= type=text name=F812119230404JZF id=pdate
  maxlength=10 size=10 /

  Thanks,
  Bryan


--~--~-~--~~~---~--~~
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 crudify rewrite and sitemap access protection

2009-09-18 Thread Jeppe Nejsum Madsen

Hi,

I have the following in Boot

 val menuDispatch:List[PartialFunction[Box[Req], Loc.LocParam]] = List({
  case Full(Req(path, _, _)) if !User.loggedIn_?  
path != List(profile,login)  path != List(profile, 
lost_password)  =
  Loc.EarlyResponse(() = 
Full(RedirectResponse(/profile/login?returnTo=+S.uri)))
})
 
LiftRules.setSiteMap(SiteMap(menuDispatch,entries:_*))

Which, in essense, says that all urls besides
/profile/{login,lost_password} are protected and an anonymous user gets
redirected to the login page if trying to access any other page.

This works fine for normal pages defined in the sitemap, but entries
that are generated by CRUDify rewriting (edit  view) doesn't seem to be
hit by the above.

Ie for urls like http://localhost:8080/assets/edit/5817, an anonymous
user is not redirected to the login page (at least, not before
findForParam is called)

Any clues?

/Jeppe

--~--~-~--~~~---~--~~
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: Binding - keepAttrs?

2009-09-18 Thread Ewan

Ah never mind... ahem strings are not xml and therefore trying to add
an attribute to them makes no sense...

On Sep 18, 12:58 pm, Ewan ehar...@gmail.com wrote:
 I'd be happy to do that.  One thing though is that the main binding
 article still has examples of the old way which needs an update i.e.

 #     label for=first_name
 #       User name example:first_name example:id=first_name /
 #     /label

 which brings me on to a related issue where by -% does compile if the
 argument is a String where as - does.  Is this intended?

 /src/main/scala/org/harrow/findaholidaylet/snippet/
 PropertySearch.scala:291: error: overloaded method value -% with
 alternatives ((scala.xml.NodeSeq) = scala.xml.Elem)
 net.liftweb.util.Helpers.FuncBindParam and (Option[scala.xml.Elem])
 net.liftweb.util.Helpers.FuncBindParam and (net.liftweb.util.Box
 [scala.xml.Elem])net.liftweb.util.Helpers.FuncBindParam and
 (scala.xml.Elem)net.liftweb.util.Helpers.FuncBindParam cannot be
 applied to (String)
                                                    name -% r(name),
                                                           ^
 one error found

 On Sep 18, 11:26 am, Naftoli Gugenheim naftoli...@gmail.com wrote:

  Or you can maybe insert it in the main binding article.

  -

  Timothy Perretttimo...@getintheloop.eu wrote:

  The wiki is open for all to edit.

  Can I suggest you call it How To: Preserve binding attributes

  Cheers, Tim

  On 18 Sep 2009, at 10:25, Ewan wrote:

   I asked this only the day before (and got the answer) - might be worth
   popping it on the wiki now.

   On Sep 17, 9:58 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
   DPP added an attribute-preserving arrow: -%
   Then you can use unprefixed attributes.

   -

   Bryangerm...@gmail.com wrote:

   I am trying to update an old lift application I wrote using
   1.1-SNAPSHOT.  It looks like bind is no longer keeping the attributes
   I've defined in the template.

   bind(f, xhtml,
        pickupDate - keepAttrs(SHtml.text(pickupDate.is, pickupDate
   (_))),
        submit - SHtml.submit(Search, processSearch)
   )

   f:pickupDate f:id=pdate f:maxlength=10 f:size=10 /

   Renders as

   input value= type=text name=F812119230404JZF /

   But should be

   input value= type=text name=F812119230404JZF id=pdate
   maxlength=10 size=10 /

   Thanks,
   Bryan


--~--~-~--~~~---~--~~
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 bind preserving element contents?

2009-09-18 Thread Ross Mellgren
Well I'm not sure what ID you want, but how about

bind(question, xhtml,
  ...
  row - { (ns: NodeSeq) =
 questions.foreach(q = {
  tr id=someId{ bind(question, ns, id -  
q.id, ...) }/tr
 }
  })

I'm presuming here that question:row will generate multiple rows, one  
for each question, but I'm not sure from your example.

-Ross

On Sep 18, 2009, at 3:05 AM, Heiko Seeberger wrote:

 Hi,

 I would like to bind the following part form a template:

 question:row
   tdquestion:edit/nbsp;question:delete//td
   tdquestion:id//td
   tdquestion:text//td
   tdquestion:answers//td
 /question:row

 The result should be a table row like that:

 tr id=someId
   td.../td
   ...
 /tr

 So in this case I want to replace the row-element itself (and add an  
 attribute value), but the contents (children) of the row-element  
 must be preserved! How can this be accomplished?

 Thank you!

 Heiko

 --
 My job: weiglewilczek.com
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: 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: Google Analytics

2009-09-18 Thread Richard Dallaway

I'm a bit late to this thread, but found it really useful.

In case this is of any use to future explorers of the thread, I
thought I'd contribute what we ended up doing: we put
lift:Analytics.google / (snippet below) before /body in our
template.  I guess this may have been all over-taken by the lift:tail
work.

--
import scala.xml.NodeSeq

import net.liftweb._
import http._
import S._
import util._
import Props.RunModes._

class Analytics {

  // To avoid non-XHTML compliant JavaScript we decide if we're https
or not here.
  // See e.g., 
http://happygiraffe.net/blog/2009/06/06/google-analytics-in-xhtml/
  def google_script_url = S.request match {
case Full(req) if req.request.scheme == https =
https://ssl.google-analytics.com/ga.js;
case _ = http://www.google-analytics.com/ga.js;
  }

  // Output the Google Analytics JavaScript
  def google(xhtml: NodeSeq) = Props.mode match {
case Production | Pilot | Staging =
  script type=text/javascript src={google_script_url}/script ++
  script type=text/javascript
  ![CDATA[try {
  var pageTracker = _gat._getTracker('UA--1');
  pageTracker._trackPageview();
  } catch(err) {}
  ]]
  /script
case _ = Nil
  }

}
---

...but replacing 'UA--1' with your tracking code.

Warning: I've not tested with a https site yet.

Richard


On Wed, Jul 15, 2009 at 3:25 AM, Xavi Ramirez xavi@gmail.com wrote:

 Sorry, I didn't replay earlier, but it turns out that the operation
 is not supported code: 9 error is related to the fact that the
 default Google Analytics snippet uses document.write().  It turns out
 that XHTML does not support document.write(), which causes Firefox to
 chock.

 Ultimately, I replaced the default Google Analytics snippet with this one:
 script src=http://www.google-analytics.com/ga.js; type=text/javascript /
 script type=text/javascript
 //![CDATA[
    try { var pageTracker = _gat._getTracker(UA-4384857-1);
 pageTracker._trackPageview(); } catch(err) {}
 //]]
 /script

 A full write up of my experiences with Google Analytics and Lift can
 be found here:
 http://www.the-xavi.com/articles/operation-is-not-supported-code-9

 ~Xavi

 On Tue, Jul 7, 2009 at 4:34 PM, Xavi Ramirezxavi@gmail.com wrote:
 Thanks!  I ran into this exact problem.  Is there any way to get rid
 of it?  Is there a lift:production tag?

 Thanks,
 Xavi

 On Tue, Mar 17, 2009 at 5:22 PM, Charles F. Munatc...@munat.com wrote:

 OK, I have to stop posting this crap when it's 5:30 AM, I've been
 working for 18 hours straight, and my brain is fried.

 The problem was that I was looking at it on my development machine, not
 the production server. The Google Analytics code is tied to the URL. If
 the URL is wrong, it doesn't serve the script, so Firebug reports the
 error. I are dumb.

 Hopefully, though, my posting this will save some other person a hassle
 and a little public embarrassment.

 Chas.

 Derek Chen-Becker wrote:
 Can you send the beginning of the XHTML output, up to and including the
 GA script?

 Derek

 On Tue, Mar 17, 2009 at 6:31 AM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:


     Is anyone else using Google Analytics? I am getting this strange
     JavaScript error:

     operation is not supported code: 9
      var pageTracker = _gat._getTracker(UA-5774043-2);

     The Google scripts are supposed to be placed right before the closing
     body tag, but Lift inserts its own script in there. I can't imagine how
     that would make a difference, but it is the only thing different from
     what Google recommends.

     Also, the analytics are not working.

     Any ideas?

     Chas.




 

 



 


--~--~-~--~~~---~--~~
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: CometActor timeout problem

2009-09-18 Thread marius d.



On Sep 17, 11:09 pm, jack jack.wid...@gmail.com wrote:
 I have a CometActor which displays a list of urls and at the same time
 launches a bunch of threads each of which gets information about the
 urls and then puts messages about that information in a Queue. On each
 new tick, the CometActor checks the queue and updates its urls.

 The problem is that I am launching the threads from the CometActor and
 the page is never coming back. It times out.

So the page never gets rendered? I would recommend using actors and
not really threads but even with threads it shouldn't impact you. But
it also depends on what your code does. Can you post a minimalistic
example?


 Is there some general principle about launching threads from a
 CometActor that might explain this behavior?
--~--~-~--~~~---~--~~
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: CometActor timeout problem

2009-09-18 Thread Jack Widman
Yes, the page never gets rendered. I am actually using Actors. I will post a
code example tonight. Thanks for your response.

On Fri, Sep 18, 2009 at 12:09 PM, marius d. marius.dan...@gmail.com wrote:




 On Sep 17, 11:09 pm, jack jack.wid...@gmail.com wrote:
  I have a CometActor which displays a list of urls and at the same time
  launches a bunch of threads each of which gets information about the
  urls and then puts messages about that information in a Queue. On each
  new tick, the CometActor checks the queue and updates its urls.
 
  The problem is that I am launching the threads from the CometActor and
  the page is never coming back. It times out.

 So the page never gets rendered? I would recommend using actors and
 not really threads but even with threads it shouldn't impact you. But
 it also depends on what your code does. Can you post a minimalistic
 example?

 
  Is there some general principle about launching threads from a
  CometActor that might explain this behavior?
 


--~--~-~--~~~---~--~~
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] Direct To Web

2009-09-18 Thread Daniel Mejía

Hi all,

In Apple´s WebObjects framework there is a wondeful technology known  
as Diect to Web that enables rapid prototyping base in rules. Is there  
something similar in lift?

regards,

Daniel.



--~--~-~--~~~---~--~~
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: Direct To Web

2009-09-18 Thread Timothy Perrett

Daniel,

Can you describe direct to web for those of us not familiar?

Cheers, Tim

On 18 Sep 2009, at 17:11, Daniel Mejía wrote:


 Hi all,

 In Apple´s WebObjects framework there is a wondeful technology known
 as Diect to Web that enables rapid prototyping base in rules. Is there
 something similar in lift?

 regards,

 Daniel.



 



--~--~-~--~~~---~--~~
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 bind preserving element contents?

2009-09-18 Thread harryh

Personally, when doing this, I like splitting out the code to fill in
the rows into a separate function like so:

def row(xhtml: NodeSeq): NodeSeq = {
  questions.flatMap(question = {
bind(question, xhtml, edit - ..., delete - ...)
  })
}

bind(questions, xhtml, row - row _)

On Sep 18, 3:05 am, Heiko Seeberger heiko.seeber...@googlemail.com
wrote:
 Hi,
 I would like to bind the following part form a template:

 question:row
   tdquestion:edit/nbsp;question:delete//td
   tdquestion:id//td
   tdquestion:text//td
   tdquestion:answers//td
 /question:row

 The result should be a table row like that:

 tr id=someId
   td.../td
   ...
 /tr

 So in this case I want to replace the row-element itself (and add an
 attribute value), but the contents (children) of the row-element must be
 preserved! How can this be accomplished?

 Thank you!

 Heiko

 --
 My job: weiglewilczek.com
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: 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: CMS for Lift?

2009-09-18 Thread David Pollak
On Thu, Sep 17, 2009 at 5:26 PM, Randinn rand...@gmail.com wrote:


 Is there a example of this as of yet?


No, but I'm planning to spend October (and perhaps part of November)
off-list (which is now consuming 3/4 of my day every day).  A CMS is on my
to-do list.



 On Aug 20, 1:03 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  FWIW... I got roped into hosting a CMS by the PTA of my kids' school.  I
 may
  knock something together in Lift or leverage off the work Glenn has done.
 
  On Tue, Aug 18, 2009 at 3:26 PM, Timothy Perrett timo...@getintheloop.eu
 wrote:
 
 
 
 
 
   Just my two cents, but I wouldn't use the lift namespace... If you use
 the
   lift tags OOTB, you risk designers shoving lots of comet actors on a
 single
   page. You would get more granular control if you created a special set
 of
   tags:
 
   cms:something .. /
 
   Cheers, Tim
 
   On 18/08/2009 23:00, Ewan ehar...@gmail.com wrote:
 
I've been scratching my head about that one too.  I have used both
Alfresco and opencms to produce both dynamic and static and in the
case of dynamic they have their own servlet/filter to render the
content - I've not yet spent enough time working out how and if they
can be fitted together.
 
For me, having used Hybris (J2EE ecommerce engine with some CMS built
in), I'd like to be able to have page fragments in a template served
from the CMS (lift snippets presumably) that would be created/
maintained with some aspect of workflow by CMS user(s) in an
associated CMS lift webapp with funky (X)HTML editor support.  My web
guys, non-lift devs, can then sprinkle cms tags where appropriate.  A
tag might be lift:cms contentId=news count=5 order=ascending/
which would render the last five news items in ascending order.
 
Just some thoughts
 
-- Ewan
 
On Aug 18, 10:09 pm, Terry J. Leach terry.le...@gmail.com wrote:
I would like to know how the Lift/Scala can leveraged to with
 Alfresco
or any other open source Java based CMS.
 
Terry J. Leach
 
On Aug 17, 2:09 pm, Stefan Scott stefanscottal...@gmail.com
 wrote:
 
I'll chime in here since I've been evaluating several CMSs lately.
 
I previously used Drupal and WordPress as my CMSs - now however I'm
moving everything to MODx because of the increased flexibility and
more-logical organization, and I'm also impressed with the demos of
SilverStripe, TypoLight Typo3 - and LifeRay, which is written in
 Java
instead of PHP. (LifeRay seems to be much more than a CMS - it
 claims
to offer collaboration and social networking.)
 
Some on-line demos here:
 
MODx -http://trymodx.com/
SilverStripe -http://demo.silverstripe.com/
TypoLight -http://www.typolight.org/demo.html
Typo3 -http://testsite.punkt.de/
LifeRay -http://demo.liferay.net/web/guest/home
 
It would be good to take a look at these additional CMSs as they
 offer
some capabilities beyond WordPress and Drupal.
 
Drupal in particular is wildly popular but it may no longer be the
best candidate to imitate, as it is less well-organized and less
flexible/customizable (compared say to MODx, which lets you take
 CSS
from an existing site and use it for your site, and which lets you
apply a template to a single document, unlike Drupal where a theme
applies to the entire site). To keep up with advanced CMSs, Drupal
 has
evolved to use a bunch of (often redundant or competing) modules
 which
are not always compatible with current releases. Examples of things
that Drupal treats as add-ons (modules) are: custom content (the
CCK/Views modules, with their confusing albeit AJAX-y interface),
multi-language, and photo galleries (I gave up on Drupal after a
 few
days of trying out various photo gallery modules, none of which I
could understand). Finally, it seems odd that Drupal, as a content
management system, lacks something all advanced CMSs have: a
*treeview* of the overall site content. Instead, it only has a
 jumbled
*list* of content, sorted by not by location but by last edited
 (!),
with all translations also scattered through the list based on
 last-
edited date, and this list is buried several levels deep in the
 admin
navigation system, unlike the site content treeview navigator which
 is
prominently displayed (usually on the left) in advanced CMSs. (Of
course, I don't want to veer off-topic here and start a CMS flame
 war
here in this liftweb discussion. :-)
 
Regarding dynamic site map creation - I do know that MODx has
something like this, using WayFinder to create a menu from selected
branches of the site's document tree, automatically including any
updated sub-branches, and I believe most other advanced CMSs have
something like this too.
 
LifeRay seems very intriguing - it claims to do a lot beyond just
 CMS.
Since it's written in Java (not 

[Lift] Re: Weird JPA behavior

2009-09-18 Thread Derek Chen-Becker
As long as your session is open (not using detached objects), JPA should
handle fetching all properties correctly. Would you mind sending some code
to look at?

Derek

On Fri, Sep 18, 2009 at 3:35 AM, Charles F. Munat c...@munat.com wrote:


 I have an object with associated objects which have associated objects.

 The first is an Application. An application is associated with a Member.
 The Member is associated with sets of StreetAddresses and Telephones.

 In the Application class I have a toHTML method that lays out the detail
 from the Application, *including* the Member's data *and* any
 StreetAddresses or Telephones.

 If I pull an Application out of the DB using a ScalaQuery, it works like
 a charm.

 I also have an add method that creates the Application. It creates the
 Member first, then creates the StreetAddresses and Telephones and adds
 them to the Member. Then it creates the Application and adds the Member.
 Then it does a mergeAndFlush on the Application.

 Then I send a couple of emails, and in one of them I call the asHTML
 method on the Application. And I get all the Application and Member
 data, but the StreetAddresses and Telephones are blank.

 What gives? What do I have to do to access
 application.member.telephones? Or can I not do that automatically in a
 method inside of application? (It's the Application toHTML method that
 runs through this.member.telephones to create the output.)

 The craziest thing to me is that if I query for the Application, it
 works just fine.

 TIA

 Chas.

 


--~--~-~--~~~---~--~~
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 crudify rewrite and sitemap access protection

2009-09-18 Thread David Pollak
On Fri, Sep 18, 2009 at 5:32 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:


 Hi,

 I have the following in Boot

  val menuDispatch:List[PartialFunction[Box[Req], Loc.LocParam]] = List({
  case Full(Req(path, _, _)) if !User.loggedIn_? 
path != List(profile,login)  path != List(profile,
 lost_password)  =
  Loc.EarlyResponse(() =
 Full(RedirectResponse(/profile/login?returnTo=+S.uri)))
})

LiftRules.setSiteMap(SiteMap(menuDispatch,entries:_*))

 Which, in essense, says that all urls besides
 /profile/{login,lost_password} are protected and an anonymous user gets
 redirected to the login page if trying to access any other page.

 This works fine for normal pages defined in the sitemap, but entries
 that are generated by CRUDify rewriting (edit  view) doesn't seem to be
 hit by the above.

 Ie for urls like http://localhost:8080/assets/edit/5817, an anonymous
 user is not redirected to the login page (at least, not before
 findForParam is called)

 Any clues?


SiteMap is applied after URL rewriting.  URL rewriting happens very, very
early in the HTTP service cycle.  We don't know what the URL is and how it
should be applied before the rewrite.

If the CRUDify page is actually displayed, this is a bug.  But the
findForParam method will be invoked because this is part of URL rewriting.



 /Jeppe

 



-- 
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: Bug in MappedEmail: emailPattern is wrong

2009-09-18 Thread David Pollak
Please open a ticket

On Wed, Sep 16, 2009 at 11:27 AM, harryh har...@gmail.com wrote:


 Hrm, MappedEmail is now rejecting e-mails with a - in the part before
 the @.

 is %-+ being interpreted as % through + and not % OR - OR + ?

 -harryh, who is easily confused by regular expressions

 On Aug 26, 7:32 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Thanks.
 
  Changed and pushed to GitHub.  Allow 2 hours for Maven availability.
 
  On Wed, Aug 26, 2009 at 4:15 PM, harryh har...@gmail.com wrote:
 
What's the change to the RegEx?
 
   val emailPattern = Pattern.compile(^[a-z0-9._%-+]+@(?:[a-z0-9-]+\\.)+
   [a-z]{2,4}$)
 
   note the addition of the + to the allowed characters before the @
 
   -harryh
 
  --
  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 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: Direct To Web

2009-09-18 Thread Warren Henning

http://www.willingtofail.com/research/rules/d2w.html

It sounds like Rails' scaffolding'/Django's admin module but with some
kind of rule-based system added.

On Fri, Sep 18, 2009 at 9:27 AM, Timothy Perrett
timo...@getintheloop.eu wrote:

 Daniel,

 Can you describe direct to web for those of us not familiar?

 Cheers, Tim

 On 18 Sep 2009, at 17:11, Daniel Mejía wrote:


 Hi all,

 In Apple´s WebObjects framework there is a wondeful technology known
 as Diect to Web that enables rapid prototyping base in rules. Is there
 something similar in lift?

 regards,

 Daniel.



 



 


--~--~-~--~~~---~--~~
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 bind preserving element contents?

2009-09-18 Thread Heiko Seeberger
Ross,
I tries this yesterday and it did not work, but i must have been too tired
and screwed things up, because of course this is the way to go.
By the way: It has to be flatMap ;-)

Thanks

Heiko

2009/9/18 Ross Mellgren dri...@gmail.com

 Oh I put in foreach, I should have said map ( questions.map(q = ...{ )
 -Ross

 On Sep 18, 2009, at 11:35 AM, Ross Mellgren wrote:

 Well I'm not sure what ID you want, but how about
 bind(question, xhtml,
  ...
  row - { (ns: NodeSeq) =
 questions.foreach(q = {
  tr id=someId{ bind(question, ns, id - q.id, ...)
 }/tr
 }
  })

 I'm presuming here that question:row will generate multiple rows, one for
 each question, but I'm not sure from your example.

 -Ross

 On Sep 18, 2009, at 3:05 AM, Heiko Seeberger wrote:

 Hi,
 I would like to bind the following part form a template:

 question:row
   tdquestion:edit/nbsp;question:delete//td
   tdquestion:id//td
   tdquestion:text//td
   tdquestion:answers//td
 /question:row

 The result should be a table row like that:

 tr id=someId
   td.../td
   ...
 /tr

 So in this case I want to replace the row-element itself (and add an
 attribute value), but the contents (children) of the row-element must be
 preserved! How can this be accomplished?

 Thank you!

 Heiko

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





 



-- 
Heiko Seeberger

My job: weiglewilczek.com
My blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: 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: How to bind preserving element contents?

2009-09-18 Thread Ross Mellgren
Ah yeah it sure does, my quick test on the REPL used a single elem so  
it happened to work out:

scala x.map(y = { foo{y}/foo }) : NodeSeq
res71: scala.xml.NodeSeq = foo1/foofoo2/foofoo3/foo

But bind: NodeSeq, not : Node or : Elem.

-Ross

On Sep 18, 2009, at 2:14 PM, Heiko Seeberger wrote:

 Ross,

 I tries this yesterday and it did not work, but i must have been too  
 tired and screwed things up, because of course this is the way to go.
 By the way: It has to be flatMap ;-)

 Thanks

 Heiko

 2009/9/18 Ross Mellgren dri...@gmail.com
 Oh I put in foreach, I should have said map ( questions.map(q = ... 
 { )

 -Ross

 On Sep 18, 2009, at 11:35 AM, Ross Mellgren wrote:

 Well I'm not sure what ID you want, but how about

 bind(question, xhtml,
  ...
  row - { (ns: NodeSeq) =
 questions.foreach(q = {
  tr id=someId{ bind(question, ns, id -  
 q.id, ...) }/tr
 }
  })

 I'm presuming here that question:row will generate multiple rows,  
 one for each question, but I'm not sure from your example.

 -Ross

 On Sep 18, 2009, at 3:05 AM, Heiko Seeberger wrote:

 Hi,

 I would like to bind the following part form a template:

 question:row
   tdquestion:edit/nbsp;question:delete//td
   tdquestion:id//td
   tdquestion:text//td
   tdquestion:answers//td
 /question:row

 The result should be a table row like that:

 tr id=someId
   td.../td
   ...
 /tr

 So in this case I want to replace the row-element itself (and add  
 an attribute value), but the contents (children) of the row- 
 element must be preserved! How can this be accomplished?

 Thank you!

 Heiko

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









 -- 
 Heiko Seeberger

 My job: weiglewilczek.com
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: 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: Lift deal breakers

2009-09-18 Thread dres

I agree with Chas but unfortunately it sounds like a lot of work to
change.  I would be happy if Lift used JQuery for this but then it
would be tied to a specific library.  I wouldn't mind but I can see
why Lift folks would.


On Sep 13, 6:00 pm, Charles F. Munat c...@munat.com wrote:
 marius d. wrote:
  I'm thinking that instead of:

  button onclick=liftAjax.lift_ajaxHandler
  ('F1029758482780OTA=true',null, null, null); return false;Press me/
  button

  We could have:

  button onclick=liftAjax('F1029758482780OTA')Press me/button

 This is not what I had in mind at all. You still have the event handler
 in the HTML. The idea, I thought, was to attach the event handler from
 an external file using the id (or class) of the button element.

 Maybe I'm living on a different planet (a distinct possibility and one
 I've been giving much thought to recently), but virtually every JS
 programmer I know considers this a best practice, and it has been
 considered so for many years.

 Frankly, and maybe I'm just a bit dull, but I can't conceive of what the
 advantage to the above change might be. What am I missing?

 Chas.

--~--~-~--~~~---~--~~
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] all page URLs appended with ;jsessionid=knq01t90ajh7

2009-09-18 Thread Grant Wood

The first time a browser visits my site, all the path-only URLs
embedded in the requested page are being appended with what looks like
a malformed query parameter containing the session id.

for example:
a href=/correct/path/ link/a
is being rewritten:
a href=/correct/path/;jsessionid=knq01t90ajh7 link/a

What's odd is that it is also happening to img elements as well:
img src=/s/images/site/light_blue.png /
is being rewritten:
img src=/s/images/site/light_blue.png;jsessionid=knq01t90ajh7 /


This happens reliably if you clear the cache and all session data from
your browser and visit any page in the site first.  ANy subsequent
pages are fine.  The result is that links work fine (which is why I
didn't notice the problem right away) but images and embedded media
are broken.  If you reload the page, the URLs are all fine.

The ;jsessionid=session id

Other facts:
- It is NOT affecting URLs in CSS or js in external files.

- It is NOT being added to URLs with a protocol and authority such
as:
http://www.foo.com/path/to/page  (and it makes no difference if
its an external link or not)

- I first suspected that a script somewhere was doing this, however,
disabling javascript in the browser causes no change.  I verified this
using curl.. the URLs are being altered on the server.

- I'm on the latest 1.1-SNAPSHOT, but this has been happening for some
time, possibly since I started my work on lift 6 weeks ago.


I have been searching through lift code for jsessionid without luck,
so hopefully David or someone knows exactly what part of the chain is
causing this.   Its certainly possible I'm doing this somehow, but I
can find nothing that would come close to doing this in any of my
snippets (or models or libs for that matter)

Thanks for any insight, let me know what other information would be
helpful.

--~--~-~--~~~---~--~~
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: New version of master.pdf

2009-09-18 Thread Grant Wood

Thanks for the update, and all the teams hard work!

-Grant

On Sep 17, 3:24 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
 I've made some more minor edits based on feedback, including the recent JSON
 forms. I still have a long list of stuff to do, but please keep sending
 feedback if you find errors or things that are unclear.

 Derek

--~--~-~--~~~---~--~~
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: all page URLs appended with ;jsessionid=knq01t90ajh7

2009-09-18 Thread Chris Lewis

It has nothing to do with lift, but the servlet container. jsessionid 
is a specified standard, and appending it I *think* is part of the 
mandate when implementing the servlet api. That is to say, the automatic 
appending will probably occur on any servlet container. Google around 
and you'll find various ways people deal with it.

Grant Wood wrote:
 The first time a browser visits my site, all the path-only URLs
 embedded in the requested page are being appended with what looks like
 a malformed query parameter containing the session id.
 
 for example:
 a href=/correct/path/ link/a
 is being rewritten:
 a href=/correct/path/;jsessionid=knq01t90ajh7 link/a
 
 What's odd is that it is also happening to img elements as well:
 img src=/s/images/site/light_blue.png /
 is being rewritten:
 img src=/s/images/site/light_blue.png;jsessionid=knq01t90ajh7 /
 
 This happens reliably if you clear the cache and all session data from
 your browser and visit any page in the site first.  ANy subsequent
 pages are fine.  The result is that links work fine (which is why I
 didn't notice the problem right away) but images and embedded media
 are broken.  If you reload the page, the URLs are all fine.
 
 The ;jsessionid=session id
 
 Other facts:
 - It is NOT affecting URLs in CSS or js in external files.
 
 - It is NOT being added to URLs with a protocol and authority such
 as:
 http://www.foo.com/path/to/page  (and it makes no difference if
 its an external link or not)
 
 - I first suspected that a script somewhere was doing this, however,
 disabling javascript in the browser causes no change.  I verified this
 using curl.. the URLs are being altered on the server.
 
 - I'm on the latest 1.1-SNAPSHOT, but this has been happening for some
 time, possibly since I started my work on lift 6 weeks ago.
 
 
 I have been searching through lift code for jsessionid without luck,
 so hopefully David or someone knows exactly what part of the chain is
 causing this.   Its certainly possible I'm doing this somehow, but I
 can find nothing that would come close to doing this in any of my
 snippets (or models or libs for that matter)
 
 Thanks for any insight, let me know what other information would be
 helpful.
 
  
 

--~--~-~--~~~---~--~~
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: all page URLs appended with ;jsessionid=knq01t90ajh7

2009-09-18 Thread David Pollak
On Fri, Sep 18, 2009 at 12:15 PM, Chris Lewis burningodzi...@gmail.comwrote:


 It has nothing to do with lift, but the servlet container. jsessionid
 is a specified standard, and appending it I *think* is part of the
 mandate when implementing the servlet api. That is to say, the automatic
 appending will probably occur on any servlet container. Google around
 and you'll find various ways people deal with it.


Lift is inserting these are part of the URL rewriting at the request of the
container.

Is this causing a problem?  If it is, you can disable it... I forgot how,
but I can dig through the code to find out the appropriate LiftRules to
change.



 Grant Wood wrote:
  The first time a browser visits my site, all the path-only URLs
  embedded in the requested page are being appended with what looks like
  a malformed query parameter containing the session id.
 
  for example:
  a href=/correct/path/ link/a
  is being rewritten:
  a href=/correct/path/;jsessionid=knq01t90ajh7 link/a
 
  What's odd is that it is also happening to img elements as well:
  img src=/s/images/site/light_blue.png /
  is being rewritten:
  img src=/s/images/site/light_blue.png;jsessionid=knq01t90ajh7 /
 
  This happens reliably if you clear the cache and all session data from
  your browser and visit any page in the site first.  ANy subsequent
  pages are fine.  The result is that links work fine (which is why I
  didn't notice the problem right away) but images and embedded media
  are broken.  If you reload the page, the URLs are all fine.
 
  The ;jsessionid=session id
 
  Other facts:
  - It is NOT affecting URLs in CSS or js in external files.
 
  - It is NOT being added to URLs with a protocol and authority such
  as:
  http://www.foo.com/path/to/page  (and it makes no difference if
  its an external link or not)
 
  - I first suspected that a script somewhere was doing this, however,
  disabling javascript in the browser causes no change.  I verified this
  using curl.. the URLs are being altered on the server.
 
  - I'm on the latest 1.1-SNAPSHOT, but this has been happening for some
  time, possibly since I started my work on lift 6 weeks ago.
 
 
  I have been searching through lift code for jsessionid without luck,
  so hopefully David or someone knows exactly what part of the chain is
  causing this.   Its certainly possible I'm doing this somehow, but I
  can find nothing that would come close to doing this in any of my
  snippets (or models or libs for that matter)
 
  Thanks for any insight, let me know what other information would be
  helpful.
 
  
 

 



-- 
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 crudify rewrite and sitemap access protection

2009-09-18 Thread Jeppe Nejsum Madsen

David Pollak feeder.of.the.be...@gmail.com writes:

  http://localhost:8080/assets/edit/5817, an anonymous
 user is not redirected to the login page (at least, not before
 findForParam is called)

 Any clues?


 SiteMap is applied after URL rewriting.  URL rewriting happens very, very
 early in the HTTP service cycle.  We don't know what the URL is and how it
 should be applied before the rewrite.

I had a feeling this was the case. I seem to run into this a lot with
CRUDify ;-(

 If the CRUDify page is actually displayed, this is a bug.  But the
 findForParam method will be invoked because this is part of URL rewriting.

The crudify page is not displayed. If I fix my findForParam to work
without the logged in user I have two solutions the way I see it:

1) If I do 

find(By(id,in.toInt),By(account,
User.currentUser.dmap(0L)(_.account.is)))

I will of course not find the record since account is 0. This gives a
404, so doesn't really work

2) If I do 

User.currentUser.dmap(Full(new Vehicle):Box[Vehicle])(acc =
find(By(id,in.toInt),By(account, acc.account.is)))

it seems to work by returning a default Vehicle in the anonymous
case. This seems to work as long as the creation doesn't have any side
effects. Conceptually not so nice, but gets the job done...

The only  description of the Lift request lifecycle I've found is this:
http://wiki.liftweb.net/index.php/How_lift_processes_HTTP_requests. Is
this up to date?

I'm not sure how much of the Lift machinery is available during the
different stages, is this described somewhere?

/Jeppe


--~--~-~--~~~---~--~~
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: FacebookRestApi examples?

2009-09-18 Thread Keith K

Hi, Jon,

Good to hear you're making progress.  I'm now able to get a session
established, as well as a FacebookClient. However, when I try to use
it as follows, I get NullPointerExceptions no matter which of teh
following method calls I use.

val fbClient: FacebookClient = new FacebookClient
(FacebookSession(fbSessionKey, 0L, fbUid))

fbClient !? GetInfo(List(123, 456, 789), Name, Hometown)

fbClient.getInfo(List(fbUid.toLong, 3534L), AboutMe,
FirstName, LastName)

fbClient !? SendNotifications(brhello/br, fbUid.toLong)

They all result in :

Message: java.lang.NullPointerException
net.liftweb.ext_api.facebook.FacebookClient$$anonfun$2.apply
(FacebookRestApi.scala:46)
net.liftweb.ext_api.facebook.FacebookClient$$anonfun$2.apply
(FacebookRestApi.scala:46)
scala.List.map(List.scala:812)
net.liftweb.ext_api.facebook.FacebookClient$.call
(FacebookRestApi.scala:46)
net.liftweb.ext_api.facebook.FacebookClient.callMethod
(FacebookRestApi.scala:148)
com.liftworkshop.snippet.GameUtil.fbTest(GameUtil.scala:110)


Maybe this is because I am using an infinite session key, but I doubt
it since the call is not even making it out to FB.

If you happen to have some code you'd be willing to share (JSON or
not) I'd love to take a look. Thanks,

-Keith


On Sep 17, 1:43 pm, jon jonhoff...@gmail.com wrote:
 Hi Keith,

 You're missing a step in the process.  The auth_token needs to be
 authenticated withfacebookbefore you request a session.  You would
 do this by visiting a url like

 http://www.facebook.com/login.php?api_key=KEYauth_token=TOKENin a
 web browser.

 I am using the FB API in a connect application, but have forked to
 speak json and added a few extra calls.

 - Jon

 On Sep 15, 8:02 pm, Keith K quasike...@gmail.com wrote:

  I don't see any thing obviously wrong in thefacebookpackage's method
  def genSignature(allParams: List[(String, Any)], secret: String).

  Wish I did!

  -Keith

  On Sep 15, 3:34 pm, Keith K quasike...@gmail.com wrote:

   Hello,

   I am able to get a certain distance, to the point where FB gives me
   back an authToken.  Here is my code.

           println(FacebookRestApi.apiKey =  + FacebookRestApi.apiKey);

           val respNode: Node = FacebookClient !? (AuthCreateToken);
           val authToken = respNode.text;

           println(authToken =  + authToken);

           val fbSession: Option[FacebookSession] =
   FacebookSession.fromAuthToken(authToken)

           println(fbSession =  + fbSession.toString);

   This doesn't include the code for the apiKey and secret. I see the
   following output:

   FacebookRestApi.apiKey = 25548077c8db93252a947a525d93be02
   authToken = cd86be265bfcacf96a2dc392ffed874c
   fbSession = None

   Maybe as a scala newbie, I'm not handling the fbSession code properly,
   but it's coming back with None, which seems weird to me.

   On Sep 15, 2:02 pm, TylerWeir tyler.w...@gmail.com wrote:

I believe Jorge did the original implementation.

I'm not sure if anyone else is using it.

I'd suggest starting on your own app and post when you hit a stumbling
block.  Someone on the list will take a look.

On Sep 15, 4:46 pm, Keith K quasike...@gmail.com wrote:

 Hello,

 Are there any code examples that use the LiftFacebookpackage?  I
 encountered one in the Lift Book, but it is incomplete.  I have spent
 a lot of time searching, but am only able to find the implementation
 of it, not any unit test or some sample code to set up a session,
facebookclient, etc.  Thanks,

 -Keith


--~--~-~--~~~---~--~~
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: all page URLs appended with ;jsessionid=knq01t90ajh7

2009-09-18 Thread marius d.

Turning ON cookies in container will disable URL rewriting. jsessionid
will become a cookie.

Br's,
Marius

On Sep 18, 2:43 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Fri, Sep 18, 2009 at 12:15 PM, Chris Lewis burningodzi...@gmail.comwrote:



  It has nothing to do with lift, but the servlet container. jsessionid
  is a specified standard, and appending it I *think* is part of the
  mandate when implementing the servlet api. That is to say, the automatic
  appending will probably occur on any servlet container. Google around
  and you'll find various ways people deal with it.

 Lift is inserting these are part of the URL rewriting at the request of the
 container.

 Is this causing a problem?  If it is, you can disable it... I forgot how,
 but I can dig through the code to find out the appropriate LiftRules to
 change.





  Grant Wood wrote:
   The first time a browser visits my site, all the path-only URLs
   embedded in the requested page are being appended with what looks like
   a malformed query parameter containing the session id.

   for example:
       a href=/correct/path/ link/a
   is being rewritten:
       a href=/correct/path/;jsessionid=knq01t90ajh7 link/a

   What's odd is that it is also happening to img elements as well:
       img src=/s/images/site/light_blue.png /
   is being rewritten:
       img src=/s/images/site/light_blue.png;jsessionid=knq01t90ajh7 /

   This happens reliably if you clear the cache and all session data from
   your browser and visit any page in the site first.  ANy subsequent
   pages are fine.  The result is that links work fine (which is why I
   didn't notice the problem right away) but images and embedded media
   are broken.  If you reload the page, the URLs are all fine.

   The ;jsessionid=session id

   Other facts:
   - It is NOT affecting URLs in CSS or js in external files.

   - It is NOT being added to URLs with a protocol and authority such
   as:
      http://www.foo.com/path/to/page (and it makes no difference if
   its an external link or not)

   - I first suspected that a script somewhere was doing this, however,
   disabling javascript in the browser causes no change.  I verified this
   using curl.. the URLs are being altered on the server.

   - I'm on the latest 1.1-SNAPSHOT, but this has been happening for some
   time, possibly since I started my work on lift 6 weeks ago.

   I have been searching through lift code for jsessionid without luck,
   so hopefully David or someone knows exactly what part of the chain is
   causing this.   Its certainly possible I'm doing this somehow, but I
   can find nothing that would come close to doing this in any of my
   snippets (or models or libs for that matter)

   Thanks for any insight, let me know what other information would be
   helpful.

 --
 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
-~--~~~~--~~--~--~---



[Lift] Alternate Lift builds?

2009-09-18 Thread David Pollak
Folks,
Is there a clean and easy way that anyone knows of to have Hudson do
alternate builds from different Git branches and put them in SNAPSHOTS with
different versions (e.g., 1.1-SNAPSHOT_DPP_ACTOR)?

I am making some wholesale changes to Lift's use of Actors (basically
getting rid of all Scala Actors and creating some simple traits that Akka or
other systems can implement so that Lift-based systems can choose different
Actor implementations.

Given that these changes are non-trivial, I'd like to run a parallel version
of Lift for at least a few weeks and get feedback on the API changes and
performance before committing the code to the main branch, but I want the
code to available in Hudson.

So... any ideas?

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

--~--~-~--~~~---~--~~
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: Alternate Lift builds?

2009-09-18 Thread Kevin Wright
Your best bet is probably:

Modifiy the pom in the branch, e.g. by adding a qualifier to the version
infoManually configure a second build in hudson that points to the branch

I'm pretty sure you can't automate on this one :(

On Sat, Sep 19, 2009 at 12:38 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

 Folks,
 Is there a clean and easy way that anyone knows of to have Hudson do
 alternate builds from different Git branches and put them in SNAPSHOTS with
 different versions (e.g., 1.1-SNAPSHOT_DPP_ACTOR)?

 I am making some wholesale changes to Lift's use of Actors (basically
 getting rid of all Scala Actors and creating some simple traits that Akka or
 other systems can implement so that Lift-based systems can choose different
 Actor implementations.

 Given that these changes are non-trivial, I'd like to run a parallel
 version of Lift for at least a few weeks and get feedback on the API changes
 and performance before committing the code to the main branch, but I want
 the code to available in Hudson.

 So... any ideas?

 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

 


--~--~-~--~~~---~--~~
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] Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-18 Thread David Pollak
Folks,

Please join me in welcoming Indrajit Raychaudhuri to the Lift committers.

Indrajit has been very visible on the Lift list of late, offering lots of
good solutions to people's questions.  He's got some ideas of improving the
Lift Maven infrastructure and build process and will be contributing to the
build side (and may substantive code side) of Lift.

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

--~--~-~--~~~---~--~~
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] Where's LiftFilter connected in with LiftServlet?

2009-09-18 Thread Meredith Gregory
Dear Lifted,
bash-3.2$ cd liftweb/
bash-3.2$ ls
builtin http sitemap
bash-3.2$ find . -name *.scala -exec grep LiftFilter '{}' \; -print
class LiftFilter extends ServletFilterProvider
./http/LiftServlet.scala
 * @see LiftFilter
./http/S.scala
bash-3.2$

The web.xml file references LiftFilter. The class LiftFilter extends the
Java class ServletFilterProvider and has no body. It looks like all the
logic is in LiftServlet. What makes the connection?

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: all page URLs appended with ;jsessionid=knq01t90ajh7

2009-09-18 Thread Atsuhiko Yamanaka

Hi,

On Sat, Sep 19, 2009 at 4:43 AM, David Pollak
feeder.of.the.be...@gmail.com wrote:


 Is this causing a problem?  If it is, you can disable it... I forgot how,
 but I can dig through the code to find out the appropriate LiftRules to
 change.

I had troubles.
For example,
  a href=# onlick=...click/a
was suddenly transformed to
  a href=;jsessionid=knq01t90ajh7# onlick=...click/a
and the page reload was happened unexpectedly.

Now, I have rewritten those anchor tags as
  a href=javascript:void(0) onclick=...click/a
and such troubles have disappeared. So, it is not a problem for me anymore.
This is just FYI.


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
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: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-18 Thread Warren Henning

Grats!

On Fri, Sep 18, 2009 at 5:00 PM, David Pollak
feeder.of.the.be...@gmail.com wrote:
 Folks,

 Please join me in welcoming Indrajit Raychaudhuri to the Lift committers.

 Indrajit has been very visible on the Lift list of late, offering lots of
 good solutions to people's questions.  He's got some ideas of improving the
 Lift Maven infrastructure and build process and will be contributing to the
 build side (and may substantive code side) of Lift.

 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: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-18 Thread marius d.

Outstanding! Welcome aboard!

Br's,
Marius

On Sep 18, 7:00 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,

 Please join me in welcoming Indrajit Raychaudhuri to the Lift committers.

 Indrajit has been very visible on the Lift list of late, offering lots of
 good solutions to people's questions.  He's got some ideas of improving the
 Lift Maven infrastructure and build process and will be contributing to the
 build side (and may substantive code side) of Lift.

 Thanks,

 David

 --
 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
-~--~~~~--~~--~--~---



[Lift] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-18 Thread Meredith Gregory
Indrajit! Glad you could join the party! B.w. --greg

On Fri, Sep 18, 2009 at 6:54 PM, marius d. marius.dan...@gmail.com wrote:


 Outstanding! Welcome aboard!

 Br's,
 Marius

 On Sep 18, 7:00 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Folks,
 
  Please join me in welcoming Indrajit Raychaudhuri to the Lift committers.
 
  Indrajit has been very visible on the Lift list of late, offering lots of
  good solutions to people's questions.  He's got some ideas of improving
 the
  Lift Maven infrastructure and build process and will be contributing to
 the
  build side (and may substantive code side) of Lift.
 
  Thanks,
 
  David
 
  --
  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
 



-- 
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: Where's LiftFilter connected in with LiftServlet?

2009-09-18 Thread marius d.

LiftFilter is indeed only extending ServletFilterProvider which is
oriented obviously for JEE servlet filter processing (we do this for
backward compatibility reasons). ServletFilterProvider is also
extending HTTPProvider which knows about LiftServlet.
ServletFilterProvider just calls the service function and from here
the LiftServlet gets called. HTTPProvider trait has no knowledge about
servlets API, neither LiftServlet which is not a real JEE servlet.

Br's,
Marius

On Sep 18, 7:03 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
 Dear Lifted,
 bash-3.2$ cd liftweb/
 bash-3.2$ ls
 builtin http sitemap
 bash-3.2$ find . -name *.scala -exec grep LiftFilter '{}' \; -print
 class LiftFilter extends ServletFilterProvider
 ./http/LiftServlet.scala
  * @see LiftFilter
 ./http/S.scala
 bash-3.2$

 The web.xml file references LiftFilter. The class LiftFilter extends the
 Java class ServletFilterProvider and has no body. It looks like all the
 logic is in LiftServlet. What makes the connection?

 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] Pain Building Lift

2009-09-18 Thread runt

Hi Everyone,

Ok, so I want to see what the hype is about with Lift - it sounds
pretty exciting. However trying to build Lift from source is killing
my buzz, I tried using the instructions from the wiki

sudo git clone git://github.com/dpp/liftweb.git
cd liftweb
sudo /opt/maven/bin/mvn -e install

on unbuntu 9.04, with maven 2.2.1, and git 1.6.3.3. I have a tried it
a couple times and had epic fails that have ranged from compilation
errors to runtime errors.

Reading http://wiki.liftweb.net/index.php/Source_code says the clone
URL is from the trunk. Please correct me if I am mistaken with that -
I cannot seem to find anything about Lift's release management.

My question is are stable release sources available? I would like to
try my luck with one of those.

Thankyou - runt

--~--~-~--~~~---~--~~
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] Lift Download Instructions for Linux (Maven Installation Instructions)

2009-09-18 Thread espeed

The Lift download instructions for Linux says:

For linux, we recommend that you use your native package management
system to install maven. If you are unsure how to do this, please
refer to your OS documentation.

However, the maven2 version for the the yum package on Fedora is maven
2.0.4, which is not current enough because mvn -e archetype:generate
will fail with Required goal not found: archetype:generate.

Downloading the source and following the source installation
instructions resolves the issue -- 
http://maven.apache.org/download.html#Installation

I suspect that many of the maven packages are not current for the
various distributions so it would probably be beneficial to update the
Lift download instructions to reflect this.

James Thornton


[ja...@fedora espeed]$ mvn -e archetype:generate
/usr/lib/jvm/java
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] Ignoring available plugin update: 2.0-alpha-4 as it requires
Maven version 2.0.7
[INFO] Ignoring available plugin update: 2.0-alpha-3 as it requires
Maven version 2.0.7
[INFO] Ignoring available plugin update: 2.0-alpha-2 as it requires
Maven version 2.0.7
[INFO] Ignoring available plugin update: 2.0-alpha-1 as it requires
Maven version 2.0.7
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] Required goal not found: archetype:generate
[INFO]

[INFO] Trace
org.apache.maven.BuildFailureException: Required goal not found:
archetype:generate
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
(DefaultLifecycleExecutor.java:1533)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds
(DefaultLifecycleExecutor.java:381)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:135)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:
315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:
430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]

[INFO] Total time: 1 second
[INFO] Finished at: Fri Sep 18 19:23:30 CDT 2009
[INFO] Final Memory: 2M/5M
[INFO]


--~--~-~--~~~---~--~~
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: all page URLs appended with ;jsessionid=knq01t90ajh7

2009-09-18 Thread marius d.

LIft doesn't explicitly add jsessionid to the URL but it calls
encodeUrl on the HttpServletResponse. If in the container you have the
cookies turned off URL rewrite comes into picture. This is because we
need lift apps to still work when cookies are turned off from
container. This is the correct behavior.

Your specific example sounds like a bug and I'll try to fix it
tomorrow.

Br's,
Marius

On Sep 18, 7:04 pm, Atsuhiko Yamanaka atsuhiko.yaman...@gmail.com
wrote:
 Hi,

 On Sat, Sep 19, 2009 at 4:43 AM, David Pollak

 feeder.of.the.be...@gmail.com wrote:

  Is this causing a problem?  If it is, you can disable it... I forgot how,
  but I can dig through the code to find out the appropriate LiftRules to
  change.

 I had troubles.
 For example,
   a href=# onlick=...click/a
 was suddenly transformed to
   a href=;jsessionid=knq01t90ajh7# onlick=...click/a
 and the page reload was happened unexpectedly.

 Now, I have rewritten those anchor tags as
   a href=javascript:void(0) onclick=...click/a
 and such troubles have disappeared. So, it is not a problem for me anymore.
 This is just FYI.

 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
 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: CMS for Lift?

2009-09-18 Thread Randinn

Ah, nice, might I suggest contacting Glenn http://github.com/glennSilverman
as he has a good start on it.

On Sep 19, 2:38 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Thu, Sep 17, 2009 at 5:26 PM, Randinn rand...@gmail.com wrote:

  Is there a example of this as of yet?

 No, but I'm planning to spend October (and perhaps part of November)
 off-list (which is now consuming 3/4 of my day every day).  A CMS is on my
 to-do list.





  On Aug 20, 1:03 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   FWIW... I got roped into hosting a CMS by the PTA of my kids' school.  I
  may
   knock something together in Lift or leverage off the work Glenn has done.

   On Tue, Aug 18, 2009 at 3:26 PM, Timothy Perrett timo...@getintheloop.eu
  wrote:

Just my two cents, but I wouldn't use the lift namespace... If you use
  the
lift tags OOTB, you risk designers shoving lots of comet actors on a
  single
page. You would get more granular control if you created a special set
  of
tags:

cms:something .. /

Cheers, Tim

On 18/08/2009 23:00, Ewan ehar...@gmail.com wrote:

 I've been scratching my head about that one too.  I have used both
 Alfresco and opencms to produce both dynamic and static and in the
 case of dynamic they have their own servlet/filter to render the
 content - I've not yet spent enough time working out how and if they
 can be fitted together.

 For me, having used Hybris (J2EE ecommerce engine with some CMS built
 in), I'd like to be able to have page fragments in a template served
 from the CMS (lift snippets presumably) that would be created/
 maintained with some aspect of workflow by CMS user(s) in an
 associated CMS lift webapp with funky (X)HTML editor support.  My web
 guys, non-lift devs, can then sprinkle cms tags where appropriate.  A
 tag might be lift:cms contentId=news count=5 order=ascending/
 which would render the last five news items in ascending order.

 Just some thoughts

 -- Ewan

 On Aug 18, 10:09 pm, Terry J. Leach terry.le...@gmail.com wrote:
 I would like to know how the Lift/Scala can leveraged to with
  Alfresco
 or any other open source Java based CMS.

 Terry J. Leach

 On Aug 17, 2:09 pm, Stefan Scott stefanscottal...@gmail.com
  wrote:

 I'll chime in here since I've been evaluating several CMSs lately.

 I previously used Drupal and WordPress as my CMSs - now however I'm
 moving everything to MODx because of the increased flexibility and
 more-logical organization, and I'm also impressed with the demos of
 SilverStripe, TypoLight Typo3 - and LifeRay, which is written in
  Java
 instead of PHP. (LifeRay seems to be much more than a CMS - it
  claims
 to offer collaboration and social networking.)

 Some on-line demos here:

 MODx -http://trymodx.com/
 SilverStripe -http://demo.silverstripe.com/
 TypoLight -http://www.typolight.org/demo.html
 Typo3 -http://testsite.punkt.de/
 LifeRay -http://demo.liferay.net/web/guest/home

 It would be good to take a look at these additional CMSs as they
  offer
 some capabilities beyond WordPress and Drupal.

 Drupal in particular is wildly popular but it may no longer be the
 best candidate to imitate, as it is less well-organized and less
 flexible/customizable (compared say to MODx, which lets you take
  CSS
 from an existing site and use it for your site, and which lets you
 apply a template to a single document, unlike Drupal where a theme
 applies to the entire site). To keep up with advanced CMSs, Drupal
  has
 evolved to use a bunch of (often redundant or competing) modules
  which
 are not always compatible with current releases. Examples of things
 that Drupal treats as add-ons (modules) are: custom content (the
 CCK/Views modules, with their confusing albeit AJAX-y interface),
 multi-language, and photo galleries (I gave up on Drupal after a
  few
 days of trying out various photo gallery modules, none of which I
 could understand). Finally, it seems odd that Drupal, as a content
 management system, lacks something all advanced CMSs have: a
 *treeview* of the overall site content. Instead, it only has a
  jumbled
 *list* of content, sorted by not by location but by last edited
  (!),
 with all translations also scattered through the list based on
  last-
 edited date, and this list is buried several levels deep in the
  admin
 navigation system, unlike the site content treeview navigator which
  is
 prominently displayed (usually on the left) in advanced CMSs. (Of
 course, I don't want to veer off-topic here and start a CMS flame
  war
 here in this liftweb discussion. :-)

 Regarding dynamic site map creation - I do know that MODx has
 something like this, using WayFinder to create a menu from selected
 branches of the site's document