[Lift] Re: Help embedding lift in jetty

2010-02-05 Thread Alex Black
There is a RunWebApp.scala that seems to be included in the generated
projects from the maven archetype, you can probably copy it?

object RunWebApp extends Application {
  val server = new Server(8080)
  val context = new WebAppContext()
  context.setServer(server)
  context.setContextPath("/")
  context.setWar("src/main/webapp")

  server.addHandler(context)

  try {
println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO
STOP")
server.start()
while (System.in.available() == 0) {
  Thread.sleep(5000)
}
server.stop()
server.join()
  } catch {
case exc : Exception => {
  exc.printStackTrace()
  System.exit(100)
}
  }
}


On Feb 5, 6:22 pm, parki  wrote:
> Hello - newbie to scala and (esp) lift.
>
> I'm trying to get lift embedded into a server I wrote which also
> embeds jetty, so trying to avoid making war files, etc (the init code
> is at the end of this email) and thought someone out there might be
> able to point me in the right direction. I am using lift-util-1.0.jar
> and lift-webkit-1.0.jar, a bunch of the jetty jars, and any other jars
> needed to resolve dependencies. I may be a sucker for punishment, but
> everything works fine - the LiftServlet and LiftFilter are installed
> into jetty, and when I surf to :
>
> http://localhost:8081/lift/
>
> I get a 'broken link' error response to the browser, and the scala
> console outputs:
>
> scala> INFO - Service request (GET) /lift/ took 136 Milliseconds
>
> So, it looks like it's getting to lift, but likely lift thinks that
> there are no web apps, and hence the error (or something).
>
> I have a directory containing a simple hello world lift app created
> with maven archetype:generate, and I'd like to point the LiftServlet
> to that, if at all possible. Or copy that project structure somewhere
> underneath jetty...
>
> I've tried copying the lift app to cwd, the classes directory, the lib
> directory, etc to no avail.
>
> Does anyone know how to get the LiftServlet to find the web apps?
>
> Any help is appreciated.
>
> brian...
>
> --- x8 snip
>
> import com.whatevernot.liaison.servlet.HelloServlet
> import net.liftweb.http.
> import org.eclipse.jetty.server.
> import org.eclipse.jetty.servlet._
>
> val server = new Server(8081)
> val context = new
> ServletContextHandler(ServletContextHandler.SESSIONS)
>
> context.addFilter(new FilterHolder(new LiftFilter()), "/lift/", 1)
> context.addServlet(new ServletHolder(new HelloServlet()), "/hello/")
> context.addServlet(new ServletHolder(new LiftServlet()), "/lift/*")
> context.setContextPath("/")
>
> server.setHandler(context)
> server.start

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Help required with utility method

2010-01-18 Thread pabraham
Aargh!  Yes that pesky capital M fixed the errors.

Thanks Ross.

Paul.


On 18 Jan, 22:22, Ross Mellgren  wrote:
> flatMap (with a capital M)
>
> -Ross
>
> On Jan 18, 2010, at 5:21 PM, pabraham wrote:
>
> > Hi Naftoli,
>
> > The code I have is:
>
> > def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By
> > (Expense.month,m.toLong)).flatmap ({ month =>
> >  bind("month", expenseTemplate,
> >       "name" -> Text( month.item ),
> >       "amount" -> Text( month.amount )
> >  )
> > })
> > bind("thismonth", xhtml, "expenseitem" -> allexpenses _)
>
> > which gives the error: value flatmap is not a member of List
> > [demo.expenses.model.Expense]
>
> > From what you've said, I'm not sure how to remove the flatmap without
> > generating another error.  I realise this is a bit cheeky, but please
> > humour me and rewrite my code above to remove the flatmap and errors.
>
> > Also given an ID, how can I create an instance of a Month class whose
> > ID matches that ID?
>
> > Regards,
>
> > Paul.
>
> > On 18 Jan, 21:57, Naftoli Gugenheim  wrote:
> >> val l = List(1,2,3)
> >> l.map(x => x * 2)  ==  List(2,4,6)
> >> So map take as its argument a function that transforms every member of the 
> >> list.
> >> flatmap is similar but instead of the new List *consisting of* the 
> >> transformed elements, it consists of the *concatenation* of the results of 
> >> the function (which must be concatenatable). So
> >> l.flatmap(x => List(x, x * 2))  ==  List(1,2) ++ List(2,4) ++ List(3,6)  
> >> ==  List(1,2,2,4,3,6)
> >> Since bind returns a NodeSeq, if you would return the result of bind from 
> >> a function you pass to *map* you would have a List of NodeSeq. Flatmap 
> >> means you'll get the NodeSeq for each List element concatenated into one 
> >> long NodeSeq.
> >> So your code needs to continue
> >>   ...flatmap { curExpense =>
> >>       bind("prefix", expenseTemplate, ...)
>
> >> }
>
> >> -
>
> >> pabraham wrote:
>
> >> Hi Adam,
>
> >> Thanks for your advice.  Unfortunately if I paste your code, I get
> >> "error: not found: value expensesformonth".
>
> >> I need to convert my "m" value to an instance of Month where the ID of
> >> this instance is "m", but I can't work out how.
>
> >> I then tried this:
>
> >> def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By
> >> (Expense.month,m.toLong)).flatmap
>
> >> but the findAll() gives a List[] not a flatmap, and my Scala isn't
> >> good enough to convert from one to the other!
>
> >> Regards,
>
> >> Paul.
>
> >> On 18 Jan, 08:32, Adam Warski  wrote:
>
> >>> Hello,
>
>  I have HTML to print out expenses for a given month (i.e. URL = .../
>  month/12):
>
>  
>  ...
>  
>  
>         
>         
>  
>  
>  ...
>  
>
>  The area I'm having problems with is the code to drive the above
>  HTML.  I need something like:
>
>  class MonthPage {
>   def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
>     case Full(m) => {
>       val allexpenses : NodeSeq = expensesformonth.flatmap({ month =>
>           bind("month", chooseTemplate("thismonth", "expenseitem",
>  xhtml),
>               "name" -> Text( month.item ),
>               "amount" -> Text( month.amount )
>           )
>         })
>       bind("thismonth", xhtml, "expenseitem" -> allexpenses)
>     }
>     case _ => {
>       Text( "Not a valid month." )
>     }
>   }
>  }
>
> >>> I think you're almost there.
> >>> Try making the "allexpenses" val a function (def) NodeSeq => NodeSeq. The 
> >>> function takes the "template" of the month and returns it with bound 
> >>> values. So something like:
>
> >>> class MonthPage {
> >>>  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
> >>>    case Full(m) => {
> >>>      def allexpenses(expenseTemplate: NodeSeq): NodeSeq = 
> >>> expensesformonth.flatmap({ month =>
> >>>          bind("month", expenseTemplate,
> >>>              "name" -> Text( month.item ),
> >>>              "amount" -> Text( month.amount )
> >>>          )
> >>>        })
> >>>      bind("thismonth", xhtml, "expenseitem" -> allexpenses _)
> >>>    }
> >>>    case _ => {
> >>>      Text( "Not a valid month." )
> >>>    }
> >>>  }
>
> >>> }
>
> >>> No need to lookup the right template then using chooseTemplate, as the 
> >>> method receives the appropriate xhtml.
>
> >>> --
> >>> Adam
>
> >> --
> >> You received this message because you are subscribed to the Google Groups 
> >> "Lift" group.
> >> To post to this group, send email to lift...@googlegroups.com.
> >> To unsubscribe from this group, send email to 
> >> liftweb+unsubscr...@googlegroups.com.
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/liftweb?hl=en.
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Lift" group.
> > To post to this group, se

Re: [Lift] Re: Help required with utility method

2010-01-18 Thread Ross Mellgren
flatMap (with a capital M)

-Ross

On Jan 18, 2010, at 5:21 PM, pabraham wrote:

> Hi Naftoli,
> 
> The code I have is:
> 
> def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By
> (Expense.month,m.toLong)).flatmap ({ month =>
>  bind("month", expenseTemplate,
>   "name" -> Text( month.item ),
>   "amount" -> Text( month.amount )
>  )
> })
> bind("thismonth", xhtml, "expenseitem" -> allexpenses _)
> 
> which gives the error: value flatmap is not a member of List
> [demo.expenses.model.Expense]
> 
> From what you've said, I'm not sure how to remove the flatmap without
> generating another error.  I realise this is a bit cheeky, but please
> humour me and rewrite my code above to remove the flatmap and errors.
> 
> Also given an ID, how can I create an instance of a Month class whose
> ID matches that ID?
> 
> Regards,
> 
> Paul.
> 
> 
> On 18 Jan, 21:57, Naftoli Gugenheim  wrote:
>> val l = List(1,2,3)
>> l.map(x => x * 2)  ==  List(2,4,6)
>> So map take as its argument a function that transforms every member of the 
>> list.
>> flatmap is similar but instead of the new List *consisting of* the 
>> transformed elements, it consists of the *concatenation* of the results of 
>> the function (which must be concatenatable). So
>> l.flatmap(x => List(x, x * 2))  ==  List(1,2) ++ List(2,4) ++ List(3,6)  ==  
>> List(1,2,2,4,3,6)
>> Since bind returns a NodeSeq, if you would return the result of bind from a 
>> function you pass to *map* you would have a List of NodeSeq. Flatmap means 
>> you'll get the NodeSeq for each List element concatenated into one long 
>> NodeSeq.
>> So your code needs to continue
>>   ...flatmap { curExpense =>
>>   bind("prefix", expenseTemplate, ...)
>> 
>> }
>> 
>> -
>> 
>> pabraham wrote:
>> 
>> Hi Adam,
>> 
>> Thanks for your advice.  Unfortunately if I paste your code, I get
>> "error: not found: value expensesformonth".
>> 
>> I need to convert my "m" value to an instance of Month where the ID of
>> this instance is "m", but I can't work out how.
>> 
>> I then tried this:
>> 
>> def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By
>> (Expense.month,m.toLong)).flatmap
>> 
>> but the findAll() gives a List[] not a flatmap, and my Scala isn't
>> good enough to convert from one to the other!
>> 
>> Regards,
>> 
>> Paul.
>> 
>> On 18 Jan, 08:32, Adam Warski  wrote:
>> 
>>> Hello,
>> 
 I have HTML to print out expenses for a given month (i.e. URL = .../
 month/12):
>> 
 
 ...
 
 


 
 
 ...
 
>> 
 The area I'm having problems with is the code to drive the above
 HTML.  I need something like:
>> 
 class MonthPage {
  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
case Full(m) => {
  val allexpenses : NodeSeq = expensesformonth.flatmap({ month =>
  bind("month", chooseTemplate("thismonth", "expenseitem",
 xhtml),
  "name" -> Text( month.item ),
  "amount" -> Text( month.amount )
  )
})
  bind("thismonth", xhtml, "expenseitem" -> allexpenses)
}
case _ => {
  Text( "Not a valid month." )
}
  }
 }
>> 
>>> I think you're almost there.
>>> Try making the "allexpenses" val a function (def) NodeSeq => NodeSeq. The 
>>> function takes the "template" of the month and returns it with bound 
>>> values. So something like:
>> 
>>> class MonthPage {
>>>  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
>>>case Full(m) => {
>>>  def allexpenses(expenseTemplate: NodeSeq): NodeSeq = 
>>> expensesformonth.flatmap({ month =>
>>>  bind("month", expenseTemplate,
>>>  "name" -> Text( month.item ),
>>>  "amount" -> Text( month.amount )
>>>  )
>>>})
>>>  bind("thismonth", xhtml, "expenseitem" -> allexpenses _)
>>>}
>>>case _ => {
>>>  Text( "Not a valid month." )
>>>}
>>>  }
>> 
>>> }
>> 
>>> No need to lookup the right template then using chooseTemplate, as the 
>>> method receives the appropriate xhtml.
>> 
>>> --
>>> Adam
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> liftweb+unsubscr...@googlegroups.com.
>> For more options, visit this group 
>> athttp://groups.google.com/group/liftweb?hl=en.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.

[Lift] Re: Help required with utility method

2010-01-18 Thread pabraham
Hi Naftoli,

The code I have is:

def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By
(Expense.month,m.toLong)).flatmap ({ month =>
  bind("month", expenseTemplate,
   "name" -> Text( month.item ),
   "amount" -> Text( month.amount )
  )
})
bind("thismonth", xhtml, "expenseitem" -> allexpenses _)

which gives the error: value flatmap is not a member of List
[demo.expenses.model.Expense]

>From what you've said, I'm not sure how to remove the flatmap without
generating another error.  I realise this is a bit cheeky, but please
humour me and rewrite my code above to remove the flatmap and errors.

Also given an ID, how can I create an instance of a Month class whose
ID matches that ID?

Regards,

Paul.


On 18 Jan, 21:57, Naftoli Gugenheim  wrote:
> val l = List(1,2,3)
> l.map(x => x * 2)  ==  List(2,4,6)
> So map take as its argument a function that transforms every member of the 
> list.
> flatmap is similar but instead of the new List *consisting of* the 
> transformed elements, it consists of the *concatenation* of the results of 
> the function (which must be concatenatable). So
> l.flatmap(x => List(x, x * 2))  ==  List(1,2) ++ List(2,4) ++ List(3,6)  ==  
> List(1,2,2,4,3,6)
> Since bind returns a NodeSeq, if you would return the result of bind from a 
> function you pass to *map* you would have a List of NodeSeq. Flatmap means 
> you'll get the NodeSeq for each List element concatenated into one long 
> NodeSeq.
> So your code needs to continue
>   ...flatmap { curExpense =>
>       bind("prefix", expenseTemplate, ...)
>
> }
>
> -
>
> pabraham wrote:
>
> Hi Adam,
>
> Thanks for your advice.  Unfortunately if I paste your code, I get
> "error: not found: value expensesformonth".
>
> I need to convert my "m" value to an instance of Month where the ID of
> this instance is "m", but I can't work out how.
>
> I then tried this:
>
> def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By
> (Expense.month,m.toLong)).flatmap
>
> but the findAll() gives a List[] not a flatmap, and my Scala isn't
> good enough to convert from one to the other!
>
> Regards,
>
> Paul.
>
> On 18 Jan, 08:32, Adam Warski  wrote:
>
> > Hello,
>
> > > I have HTML to print out expenses for a given month (i.e. URL = .../
> > > month/12):
>
> > > 
> > > ...
> > > 
> > > 
> > >        
> > >        
> > > 
> > > 
> > > ...
> > > 
>
> > > The area I'm having problems with is the code to drive the above
> > > HTML.  I need something like:
>
> > > class MonthPage {
> > >  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
> > >    case Full(m) => {
> > >      val allexpenses : NodeSeq = expensesformonth.flatmap({ month =>
> > >          bind("month", chooseTemplate("thismonth", "expenseitem",
> > > xhtml),
> > >              "name" -> Text( month.item ),
> > >              "amount" -> Text( month.amount )
> > >          )
> > >        })
> > >      bind("thismonth", xhtml, "expenseitem" -> allexpenses)
> > >    }
> > >    case _ => {
> > >      Text( "Not a valid month." )
> > >    }
> > >  }
> > > }
>
> > I think you're almost there.
> > Try making the "allexpenses" val a function (def) NodeSeq => NodeSeq. The 
> > function takes the "template" of the month and returns it with bound 
> > values. So something like:
>
> > class MonthPage {
> >  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
> >    case Full(m) => {
> >      def allexpenses(expenseTemplate: NodeSeq): NodeSeq = 
> > expensesformonth.flatmap({ month =>
> >          bind("month", expenseTemplate,
> >              "name" -> Text( month.item ),
> >              "amount" -> Text( month.amount )
> >          )
> >        })
> >      bind("thismonth", xhtml, "expenseitem" -> allexpenses _)
> >    }
> >    case _ => {
> >      Text( "Not a valid month." )
> >    }
> >  }
>
> > }
>
> > No need to lookup the right template then using chooseTemplate, as the 
> > method receives the appropriate xhtml.
>
> > --
> > Adam
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/liftweb?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




Re: [Lift] Re: Help required with utility method

2010-01-18 Thread Naftoli Gugenheim
val l = List(1,2,3)
l.map(x => x * 2)  ==  List(2,4,6)
So map take as its argument a function that transforms every member of the list.
flatmap is similar but instead of the new List *consisting of* the transformed 
elements, it consists of the *concatenation* of the results of the function 
(which must be concatenatable). So
l.flatmap(x => List(x, x * 2))  ==  List(1,2) ++ List(2,4) ++ List(3,6)  ==  
List(1,2,2,4,3,6)
Since bind returns a NodeSeq, if you would return the result of bind from a 
function you pass to *map* you would have a List of NodeSeq. Flatmap means 
you'll get the NodeSeq for each List element concatenated into one long NodeSeq.
So your code needs to continue
  ...flatmap { curExpense =>
  bind("prefix", expenseTemplate, ...)
}


-
pabraham wrote:

Hi Adam,

Thanks for your advice.  Unfortunately if I paste your code, I get
"error: not found: value expensesformonth".

I need to convert my "m" value to an instance of Month where the ID of
this instance is "m", but I can't work out how.

I then tried this:

def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By
(Expense.month,m.toLong)).flatmap

but the findAll() gives a List[] not a flatmap, and my Scala isn't
good enough to convert from one to the other!

Regards,

Paul.

On 18 Jan, 08:32, Adam Warski  wrote:
> Hello,
>
>
>
> > I have HTML to print out expenses for a given month (i.e. URL = .../
> > month/12):
>
> > 
> > ...
> > 
> > 
> >        
> >        
> > 
> > 
> > ...
> > 
>
> > The area I'm having problems with is the code to drive the above
> > HTML.  I need something like:
>
> > class MonthPage {
> >  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
> >    case Full(m) => {
> >      val allexpenses : NodeSeq = expensesformonth.flatmap({ month =>
> >          bind("month", chooseTemplate("thismonth", "expenseitem",
> > xhtml),
> >              "name" -> Text( month.item ),
> >              "amount" -> Text( month.amount )
> >          )
> >        })
> >      bind("thismonth", xhtml, "expenseitem" -> allexpenses)
> >    }
> >    case _ => {
> >      Text( "Not a valid month." )
> >    }
> >  }
> > }
>
> I think you're almost there.
> Try making the "allexpenses" val a function (def) NodeSeq => NodeSeq. The 
> function takes the "template" of the month and returns it with bound values. 
> So something like:
>
> class MonthPage {
>  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
>    case Full(m) => {
>      def allexpenses(expenseTemplate: NodeSeq): NodeSeq = 
> expensesformonth.flatmap({ month =>
>          bind("month", expenseTemplate,
>              "name" -> Text( month.item ),
>              "amount" -> Text( month.amount )
>          )
>        })
>      bind("thismonth", xhtml, "expenseitem" -> allexpenses _)
>    }
>    case _ => {
>      Text( "Not a valid month." )
>    }
>  }
>
> }
>
> No need to lookup the right template then using chooseTemplate, as the method 
> receives the appropriate xhtml.
>
> --
> Adam
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Help required with utility method

2010-01-18 Thread pabraham
Hi Adam,

Thanks for your advice.  Unfortunately if I paste your code, I get
"error: not found: value expensesformonth".

I need to convert my "m" value to an instance of Month where the ID of
this instance is "m", but I can't work out how.

I then tried this:

def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By
(Expense.month,m.toLong)).flatmap

but the findAll() gives a List[] not a flatmap, and my Scala isn't
good enough to convert from one to the other!

Regards,

Paul.

On 18 Jan, 08:32, Adam Warski  wrote:
> Hello,
>
>
>
> > I have HTML to print out expenses for a given month (i.e. URL = .../
> > month/12):
>
> > 
> > ...
> > 
> > 
> >        
> >        
> > 
> > 
> > ...
> > 
>
> > The area I'm having problems with is the code to drive the above
> > HTML.  I need something like:
>
> > class MonthPage {
> >  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
> >    case Full(m) => {
> >      val allexpenses : NodeSeq = expensesformonth.flatmap({ month =>
> >          bind("month", chooseTemplate("thismonth", "expenseitem",
> > xhtml),
> >              "name" -> Text( month.item ),
> >              "amount" -> Text( month.amount )
> >          )
> >        })
> >      bind("thismonth", xhtml, "expenseitem" -> allexpenses)
> >    }
> >    case _ => {
> >      Text( "Not a valid month." )
> >    }
> >  }
> > }
>
> I think you're almost there.
> Try making the "allexpenses" val a function (def) NodeSeq => NodeSeq. The 
> function takes the "template" of the month and returns it with bound values. 
> So something like:
>
> class MonthPage {
>  def summary( xhtml : NodeSeq ) : NodeSeq = S.param("month") match {
>    case Full(m) => {
>      def allexpenses(expenseTemplate: NodeSeq): NodeSeq = 
> expensesformonth.flatmap({ month =>
>          bind("month", expenseTemplate,
>              "name" -> Text( month.item ),
>              "amount" -> Text( month.amount )
>          )
>        })
>      bind("thismonth", xhtml, "expenseitem" -> allexpenses _)
>    }
>    case _ => {
>      Text( "Not a valid month." )
>    }
>  }
>
> }
>
> No need to lookup the right template then using chooseTemplate, as the method 
> receives the appropriate xhtml.
>
> --
> Adam
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Help obtaining SQL Server version numbers

2009-10-15 Thread Derek Chen-Becker
Awesome, thanks! It looks like the version numbers in the real tables don't
match up, but their example does. If anyone else can verify the values for
2000 and 2008, that would be great, otherwise I'll assume that the doc's
examples are valid.

Thanks,

Derek

On Thu, Oct 15, 2009 at 2:04 PM, Ross Mellgren  wrote:

> Sadly I cannot -- we use XADataSource and so I have no idea what a working
> JDBC URL is ;-)
> I replicated what your script does in BeanShell and ran it against my
> running JBoss instance, so hopefully it's sufficient:
>
> conn =
> com.paytronix.server.api.common.ServiceLocator.get(com.paytronix.server.api.datasource.ConnectionService.class).acquireTransactionalConnection("foo",
> 1);
> md = conn.getMetaData();
> md.getDatabaseMajorVersion() + "," + md.getDatabaseMinorVersion() + "," +
> md.getDatabaseProductName();
> //over
> //output
> //error
> //encodingExceptions
> //result
> 
> 
>  9,0,Microsoft SQL Server
> 
> //over
>
> Ignore the //* gunk -- it's part of the protocol we use for beanshell.
>
> -Ross
>
>
>
> On Oct 15, 2009, at 3:51 PM, Derek Chen-Becker wrote:
>
> Could you do me a favor and run the script to make sure that it returns 9,
> 0? The Mapper code currently uses the separate major and minor version
> numbers because other DBs (PG, for example), do have different functionality
> between minor releases.
>
> Thanks,
>
> Derek
>
> On Thu, Oct 15, 2009 at 1:45 PM, Ross Mellgren  wrote:
>
>>
>> I have SQL Server 2005 SP2 here, and it reports 9.00.3042. I did not
>> run your script, this version comes from
>> DatabaseMetaData.getDatabaseProductVersion.
>>
>> -Ross
>>
>>
>> On Oct 15, 2009, at 3:38 PM, Derek Chen-Becker wrote:
>>
>> > I don't have access to any SQL Server instances, so I was wondering
>> > if someone out there who does could help me. In order to do some
>> > version-specific behavior in Mapper/Schemifier, I need major and
>> > minor version numbers for SQL Server. I've been googling around, and
>> > I found this doc:
>> >
>> > http://support.microsoft.com/kb/321185
>> >
>> > I would like to confirm that the major and minor versions returned
>> > in the JDBC metadata matches this document. The attached Scala
>> > script can be run to get the major and minor versions from a
>> > particular JDBC connection. Just run it like:
>> >
>> > $ scala -cp  JDBCVersioner.scala > > url>  
>> >
>> > If you can let me know what the values returned are for your
>> > instance, and what the "official" name of your version is, that
>> > would help me a lot.
>> >
>> > Thanks!
>> >
>> > 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: Help obtaining SQL Server version numbers

2009-10-15 Thread Ross Mellgren
Sadly I cannot -- we use XADataSource and so I have no idea what a  
working JDBC URL is ;-)

I replicated what your script does in BeanShell and ran it against my  
running JBoss instance, so hopefully it's sufficient:

conn = com.paytronix.server.api.common.ServiceLocator.get 
(com.paytronix.server.api.datasource.ConnectionService.class 
).acquireTransactionalConnection("foo", 1);
md = conn.getMetaData();
md.getDatabaseMajorVersion() + "," + md.getDatabaseMinorVersion() +  
"," + md.getDatabaseProductName();
//over
//output
//error
//encodingExceptions
//result


  9,0,Microsoft SQL Server

//over

Ignore the //* gunk -- it's part of the protocol we use for beanshell.

-Ross



On Oct 15, 2009, at 3:51 PM, Derek Chen-Becker wrote:

> Could you do me a favor and run the script to make sure that it  
> returns 9, 0? The Mapper code currently uses the separate major and  
> minor version numbers because other DBs (PG, for example), do have  
> different functionality between minor releases.
>
> Thanks,
>
> Derek
>
> On Thu, Oct 15, 2009 at 1:45 PM, Ross Mellgren   
> wrote:
>
> I have SQL Server 2005 SP2 here, and it reports 9.00.3042. I did not
> run your script, this version comes from
> DatabaseMetaData.getDatabaseProductVersion.
>
> -Ross
>
>
> On Oct 15, 2009, at 3:38 PM, Derek Chen-Becker wrote:
>
> > I don't have access to any SQL Server instances, so I was wondering
> > if someone out there who does could help me. In order to do some
> > version-specific behavior in Mapper/Schemifier, I need major and
> > minor version numbers for SQL Server. I've been googling around, and
> > I found this doc:
> >
> > http://support.microsoft.com/kb/321185
> >
> > I would like to confirm that the major and minor versions returned
> > in the JDBC metadata matches this document. The attached Scala
> > script can be run to get the major and minor versions from a
> > particular JDBC connection. Just run it like:
> >
> > $ scala -cp  JDBCVersioner.scala  > url>  
> >
> > If you can let me know what the values returned are for your
> > instance, and what the "official" name of your version is, that
> > would help me a lot.
> >
> > Thanks!
> >
> > 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: Help obtaining SQL Server version numbers

2009-10-15 Thread Derek Chen-Becker
Could you do me a favor and run the script to make sure that it returns 9,
0? The Mapper code currently uses the separate major and minor version
numbers because other DBs (PG, for example), do have different functionality
between minor releases.

Thanks,

Derek

On Thu, Oct 15, 2009 at 1:45 PM, Ross Mellgren  wrote:

>
> I have SQL Server 2005 SP2 here, and it reports 9.00.3042. I did not
> run your script, this version comes from
> DatabaseMetaData.getDatabaseProductVersion.
>
> -Ross
>
>
> On Oct 15, 2009, at 3:38 PM, Derek Chen-Becker wrote:
>
> > I don't have access to any SQL Server instances, so I was wondering
> > if someone out there who does could help me. In order to do some
> > version-specific behavior in Mapper/Schemifier, I need major and
> > minor version numbers for SQL Server. I've been googling around, and
> > I found this doc:
> >
> > http://support.microsoft.com/kb/321185
> >
> > I would like to confirm that the major and minor versions returned
> > in the JDBC metadata matches this document. The attached Scala
> > script can be run to get the major and minor versions from a
> > particular JDBC connection. Just run it like:
> >
> > $ scala -cp  JDBCVersioner.scala  > url>  
> >
> > If you can let me know what the values returned are for your
> > instance, and what the "official" name of your version is, that
> > would help me a lot.
> >
> > Thanks!
> >
> > 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: Help obtaining SQL Server version numbers

2009-10-15 Thread Ross Mellgren

I have SQL Server 2005 SP2 here, and it reports 9.00.3042. I did not  
run your script, this version comes from  
DatabaseMetaData.getDatabaseProductVersion.

-Ross


On Oct 15, 2009, at 3:38 PM, Derek Chen-Becker wrote:

> I don't have access to any SQL Server instances, so I was wondering  
> if someone out there who does could help me. In order to do some  
> version-specific behavior in Mapper/Schemifier, I need major and  
> minor version numbers for SQL Server. I've been googling around, and  
> I found this doc:
>
> http://support.microsoft.com/kb/321185
>
> I would like to confirm that the major and minor versions returned  
> in the JDBC metadata matches this document. The attached Scala  
> script can be run to get the major and minor versions from a  
> particular JDBC connection. Just run it like:
>
> $ scala -cp  JDBCVersioner.scala  url>  
>
> If you can let me know what the values returned are for your  
> instance, and what the "official" name of your version is, that  
> would help me a lot.
>
> Thanks!
>
> 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: Help!

2009-10-06 Thread Jack Widman
Thanks David. The command I was trying to remember was deploy-war but I kept
using run-war. The names are not quite precise. run-war should be called
build-and-run-war, and deploy-war is really run-with-war. If those names
were not so horribly long, that is.

On Tue, Oct 6, 2009 at 3:05 AM, David Bernard wrote:

>
> To create a war :
> mvn package
>
> To deploy (outline), (war are bundles that need a WebApp server to run
> (eg : jetty, tomcat, glassfish, jboss,...):
> # install jetty on your server (not maven)
> ## start jetty
> ## try http://jetty.host:jetty.port/  (eg: http://127.0.0.1:8080/)
> ## stop
> # put your .war into the jetty/webapp dir
> ## start jetty
> ## try http://jetty.host:jetty.port/mywebapp (mywebapp is the basename
> of your .war, if you don't want context (mywebapp prefix, named your
> war ROOT.war)
> # optional tweak the jetty configuration (read the jetty doc)
>
> FYI : Tim Perret is working on solution to create standalone jar with
> jetty embedded (search in the mailing-list)
>
> If you don't use Comet, you could try the winstone-maven-plugin to
> create a runnable jar
>
> /davidB
>
> On Tue, Oct 6, 2009 at 05:31, jack  wrote:
> >
> > never mind.
> > deploy-war, not run-war
> > (been working too hard)
> >
> > On Oct 5, 11:09 pm, Jack Widman  wrote:
> >> I meant to say jetty:run-war
> >>
> >> On Mon, Oct 5, 2009 at 10:52 PM, jack  wrote:
> >>
> >> > Is mvn jetty:run supposed to creat the war file? I want to upload a
> >> > war file and just run it, not create another one. How do I do that?
> >>
> >> --
> >> Jack
> > >
> >
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: Help!

2009-10-06 Thread David Bernard

To create a war :
mvn package

To deploy (outline), (war are bundles that need a WebApp server to run
(eg : jetty, tomcat, glassfish, jboss,...):
# install jetty on your server (not maven)
## start jetty
## try http://jetty.host:jetty.port/  (eg: http://127.0.0.1:8080/)
## stop
# put your .war into the jetty/webapp dir
## start jetty
## try http://jetty.host:jetty.port/mywebapp (mywebapp is the basename
of your .war, if you don't want context (mywebapp prefix, named your
war ROOT.war)
# optional tweak the jetty configuration (read the jetty doc)

FYI : Tim Perret is working on solution to create standalone jar with
jetty embedded (search in the mailing-list)

If you don't use Comet, you could try the winstone-maven-plugin to
create a runnable jar

/davidB

On Tue, Oct 6, 2009 at 05:31, jack  wrote:
>
> never mind.
> deploy-war, not run-war
> (been working too hard)
>
> On Oct 5, 11:09 pm, Jack Widman  wrote:
>> I meant to say jetty:run-war
>>
>> On Mon, Oct 5, 2009 at 10:52 PM, jack  wrote:
>>
>> > Is mvn jetty:run supposed to creat the war file? I want to upload a
>> > war file and just run it, not create another one. How do I do that?
>>
>> --
>> Jack
> >
>

--~--~-~--~~~---~--~~
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: Help!

2009-10-05 Thread jack

never mind.
deploy-war, not run-war
(been working too hard)

On Oct 5, 11:09 pm, Jack Widman  wrote:
> I meant to say jetty:run-war
>
> On Mon, Oct 5, 2009 at 10:52 PM, jack  wrote:
>
> > Is mvn jetty:run supposed to creat the war file? I want to upload a
> > war file and just run it, not create another one. How do I do that?
>
> --
> Jack
--~--~-~--~~~---~--~~
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: Help!

2009-10-05 Thread Jack Widman
I meant to say jetty:run-war

On Mon, Oct 5, 2009 at 10:52 PM, jack  wrote:

>
> Is mvn jetty:run supposed to creat the war file? I want to upload a
> war file and just run it, not create another one. How do I do that?
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-10-01 Thread glenn

David,

This is off topic, but you always are a help. Your
thoughtful assistance on this discussion group either directly
resolves issues I'm
having with Lift, or leads me to rethink my strategy and explore new
avenues
I haven't thought of. At the very least, you force me to reframe many
of my
questions, so they can be answered.

Many times, I've thought of abandoning Lift for "safer" harbors, but
the help
from you and all on this group brings me back to the fold. I've still
got lots to
learn.

Glenn

On Oct 1, 8:29 am, David Pollak  wrote:
> On Thu, Oct 1, 2009 at 8:25 AM, glenn  wrote:
>
> > David,
>
> > Excellent. This is exactly what I was looking for.
>
> Wow.  I think this is the first time I've actually helped you.  I'm sorry
> I'm bad at understanding what you ask for.
>
> More broadly, the JavaScript stuff in Lift is not magic.  It's just a bunch
> of simple JavaScript that I and some of the other committers have used over
> time.  I encourage the creation of your own JsCmd and JsExp components that
> suit your project... and maybe even share them with the community.
>
>
>
>
>
> > Thanks.
>
> > Glenn
>
> > On Sep 30, 4:54 pm, David Pollak 
> > wrote:
> > > JqHtml and JqEmptyAfter eagerly evaluate the NodeSeq on the server, so
> > > there's no way to get client-side JS execution in a NodeSeq.
> > > You can write something like:
>
> > > object MyJqText {
> > >     def apply(content: JsExp) = new JsExp with JQueryRight with
> > JQueryLeft {
> > >       def toJsCmd = "text("+content.toJsCmd+")"
> > >     }
> > >   }
>
> > > So:
>
> > > JqId("item-save") >> MyJqText(JsVar("this", "id") + " has changed")
>
> > > On Wed, Sep 30, 2009 at 2:05 PM, glenn  wrote:
>
> > > > As I mentioned, I was looking for a way to translate this JavaScript
>
> > > > $('#item-save').html(this.id + ' was toggled')
>
> > > > into a JsCmd so I could coded it my snipped as AnonFunc(some jsCmd).
>
> > > > I know I can just use JsRaw, but who in their right mind wants to
> > > > write JavaScript
> > > > if it can be avoided.
>
> > > > Glenn
>
> > > > On Sep 30, 1:20 pm, David Pollak 
> > > > wrote:
> > > > > On Wed, Sep 30, 2009 at 1:08 PM, glenn  wrote:
>
> > > > > > David,
>
> > > > > > The problem with writting the NodeSeq as {this.id} was
> > toggled > > > > > div>)
> > > > > > is that it generates the following JavaScript:
>
> > > > > > function() {jQuery('#'+"item-save").empty().after("-1 was
> > > > > > toggled");
>
> > > > > > that is, Lift evaluates {this.id} in relation to the snippet, then
> > > > > > outputs the value
> > > > > > in the JavaScript - not the result I'm after.
>
> > > > > What are you after?  What is "this" in the context?
>
> > > > > > Glenn...
>
> > > > > > On Sep 30, 11:41 am, David Pollak 
> > > > > > wrote:
> > > > > > > On Wed, Sep 30, 2009 at 11:36 AM, glenn 
> > wrote:
>
> > > > > > > > David,
>
> > > > > > > > I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
> > > > > > > > (this.id was
> > > > > > > > > toggled)) , if that's what you mean.
>
> > > > > > > That's not what I wrote.  Please look again at the curly braces
> > > > around
> > > > > > the
> > > > > > > this.id:
>
> > > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> > > > > > > was toggled))
>
> > > > > > > > This generates the following JavaScript:
>
> > > > > > > > function()
> > {jQuery('#'+"item-save").empty().after("this.idwas
> > > > > > > > toggled");
>
> > > > > > > > and that won't do. What's needed is something more akin to:
>
> > > > > > > > function() {jQuery('#'+"item-save").empty().after("" +
> > > > this.id +
> > > > > > > > "was toggled");
>
> > > > > > > > So, I guess my question is how do I define a NodeSeq to
> > accomplish
> > > > > > > > this?
>
> > > > > > > > Glenn
>
> > > > > > > > On Sep 30, 10:40 am, David Pollak <
> > feeder.of.the.be...@gmail.com>
> > > > > > > > wrote:
> > > > > > > > > On Tue, Sep 29, 2009 at 1:22 PM, glenn 
> > wrote:
>
> > > > > > > > > > I'd like to converting the following
>
> > > > > > > > > > JsRaw("""function() $('#item-save').html(this.id + ' was
> > > > > > > > > > toggled')""")
>
> > > > > > > > > > into something more object-oriented, using JQuery support
> > > > functions
> > > > > > in
> > > > > > > > > > Lift.
>
> > > > > > > > > > I've tried various combiniations, including this
>
> > > > > > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(
> > this.id
> > > > )}
> > > > > > was
> > > > > > > > > > toggled))
>
> > > > > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> > was
> > > > > > > > > toggled))
>
> > > > > > > > > No reason to promote this.id into some JavaScript thing.
> >  It's
> > > > part
> > > > > > of
> > > > > > > > the
> > > > > > > > > XML literal.  The XML literal is generated server-side as
> > part of
> > > > the
> > > > > > > > > JavaScript function.
>
> > > > > > > > > > but nothing seems to work. It just treats this.id as
> > ordinary
> > > > > > text,
> > > > > > > > > > not as a Javascript variable.

[Lift] Re: Help with using JSExp and JsCmd traits

2009-10-01 Thread David Pollak
On Thu, Oct 1, 2009 at 8:25 AM, glenn  wrote:

>
> David,
>
> Excellent. This is exactly what I was looking for.
>

Wow.  I think this is the first time I've actually helped you.  I'm sorry
I'm bad at understanding what you ask for.

More broadly, the JavaScript stuff in Lift is not magic.  It's just a bunch
of simple JavaScript that I and some of the other committers have used over
time.  I encourage the creation of your own JsCmd and JsExp components that
suit your project... and maybe even share them with the community.


>
> Thanks.
>
> Glenn
>
> On Sep 30, 4:54 pm, David Pollak 
> wrote:
> > JqHtml and JqEmptyAfter eagerly evaluate the NodeSeq on the server, so
> > there's no way to get client-side JS execution in a NodeSeq.
> > You can write something like:
> >
> > object MyJqText {
> > def apply(content: JsExp) = new JsExp with JQueryRight with
> JQueryLeft {
> >   def toJsCmd = "text("+content.toJsCmd+")"
> > }
> >   }
> >
> > So:
> >
> > JqId("item-save") >> MyJqText(JsVar("this", "id") + " has changed")
> >
> >
> >
> > On Wed, Sep 30, 2009 at 2:05 PM, glenn  wrote:
> >
> > > As I mentioned, I was looking for a way to translate this JavaScript
> >
> > > $('#item-save').html(this.id + ' was toggled')
> >
> > > into a JsCmd so I could coded it my snipped as AnonFunc(some jsCmd).
> >
> > > I know I can just use JsRaw, but who in their right mind wants to
> > > write JavaScript
> > > if it can be avoided.
> >
> > > Glenn
> >
> > > On Sep 30, 1:20 pm, David Pollak 
> > > wrote:
> > > > On Wed, Sep 30, 2009 at 1:08 PM, glenn  wrote:
> >
> > > > > David,
> >
> > > > > The problem with writting the NodeSeq as {this.id} was
> toggled > > > > div>)
> > > > > is that it generates the following JavaScript:
> >
> > > > > function() {jQuery('#'+"item-save").empty().after("-1 was
> > > > > toggled");
> >
> > > > > that is, Lift evaluates {this.id} in relation to the snippet, then
> > > > > outputs the value
> > > > > in the JavaScript - not the result I'm after.
> >
> > > > What are you after?  What is "this" in the context?
> >
> > > > > Glenn...
> >
> > > > > On Sep 30, 11:41 am, David Pollak 
> > > > > wrote:
> > > > > > On Wed, Sep 30, 2009 at 11:36 AM, glenn 
> wrote:
> >
> > > > > > > David,
> >
> > > > > > > I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
> > > > > > > (this.id was
> > > > > > > > toggled)) , if that's what you mean.
> >
> > > > > > That's not what I wrote.  Please look again at the curly braces
> > > around
> > > > > the
> > > > > > this.id:
> >
> > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> > > > > > was toggled))
> >
> > > > > > > This generates the following JavaScript:
> >
> > > > > > > function()
> {jQuery('#'+"item-save").empty().after("this.idwas
> > > > > > > toggled");
> >
> > > > > > > and that won't do. What's needed is something more akin to:
> >
> > > > > > > function() {jQuery('#'+"item-save").empty().after("" +
> > > this.id +
> > > > > > > "was toggled");
> >
> > > > > > > So, I guess my question is how do I define a NodeSeq to
> accomplish
> > > > > > > this?
> >
> > > > > > > Glenn
> >
> > > > > > > On Sep 30, 10:40 am, David Pollak <
> feeder.of.the.be...@gmail.com>
> > > > > > > wrote:
> > > > > > > > On Tue, Sep 29, 2009 at 1:22 PM, glenn 
> wrote:
> >
> > > > > > > > > I'd like to converting the following
> >
> > > > > > > > > JsRaw("""function() $('#item-save').html(this.id + ' was
> > > > > > > > > toggled')""")
> >
> > > > > > > > > into something more object-oriented, using JQuery support
> > > functions
> > > > > in
> > > > > > > > > Lift.
> >
> > > > > > > > > I've tried various combiniations, including this
> >
> > > > > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(
> this.id
> > > )}
> > > > > was
> > > > > > > > > toggled))
> >
> > > > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> was
> > > > > > > > toggled))
> >
> > > > > > > > No reason to promote this.id into some JavaScript thing.
>  It's
> > > part
> > > > > of
> > > > > > > the
> > > > > > > > XML literal.  The XML literal is generated server-side as
> part of
> > > the
> > > > > > > > JavaScript function.
> >
> > > > > > > > > but nothing seems to work. It just treats this.id as
> ordinary
> > > > > text,
> > > > > > > > > not as a Javascript variable.
> >
> > > > > > > > > Any ideas would be appreciated.
> >
> > > > > > > > > Glenn
> >
> > > > > > > > --
> > > > > > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > > > > > Follow me:http://twitter.com/dpp
> > > > > > > > Surf the harmonics
> >
> > > > > > --
> > > > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > > > Follow me:http://twitter.com/dpp
> > > > > > Surf the harmonics
> >
> > > > --
> > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > Beginning Scalahttp:

[Lift] Re: Help with using JSExp and JsCmd traits

2009-10-01 Thread glenn

David,

Excellent. This is exactly what I was looking for.

Thanks.

Glenn

On Sep 30, 4:54 pm, David Pollak 
wrote:
> JqHtml and JqEmptyAfter eagerly evaluate the NodeSeq on the server, so
> there's no way to get client-side JS execution in a NodeSeq.
> You can write something like:
>
> object MyJqText {
>     def apply(content: JsExp) = new JsExp with JQueryRight with JQueryLeft {
>       def toJsCmd = "text("+content.toJsCmd+")"
>     }
>   }
>
> So:
>
> JqId("item-save") >> MyJqText(JsVar("this", "id") + " has changed")
>
>
>
> On Wed, Sep 30, 2009 at 2:05 PM, glenn  wrote:
>
> > As I mentioned, I was looking for a way to translate this JavaScript
>
> > $('#item-save').html(this.id + ' was toggled')
>
> > into a JsCmd so I could coded it my snipped as AnonFunc(some jsCmd).
>
> > I know I can just use JsRaw, but who in their right mind wants to
> > write JavaScript
> > if it can be avoided.
>
> > Glenn
>
> > On Sep 30, 1:20 pm, David Pollak 
> > wrote:
> > > On Wed, Sep 30, 2009 at 1:08 PM, glenn  wrote:
>
> > > > David,
>
> > > > The problem with writting the NodeSeq as {this.id} was toggled > > > div>)
> > > > is that it generates the following JavaScript:
>
> > > > function() {jQuery('#'+"item-save").empty().after("-1 was
> > > > toggled");
>
> > > > that is, Lift evaluates {this.id} in relation to the snippet, then
> > > > outputs the value
> > > > in the JavaScript - not the result I'm after.
>
> > > What are you after?  What is "this" in the context?
>
> > > > Glenn...
>
> > > > On Sep 30, 11:41 am, David Pollak 
> > > > wrote:
> > > > > On Wed, Sep 30, 2009 at 11:36 AM, glenn  wrote:
>
> > > > > > David,
>
> > > > > > I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
> > > > > > (this.id was
> > > > > > > toggled)) , if that's what you mean.
>
> > > > > That's not what I wrote.  Please look again at the curly braces
> > around
> > > > the
> > > > > this.id:
>
> > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> > > > > was toggled))
>
> > > > > > This generates the following JavaScript:
>
> > > > > > function() {jQuery('#'+"item-save").empty().after("this.idwas
> > > > > > toggled");
>
> > > > > > and that won't do. What's needed is something more akin to:
>
> > > > > > function() {jQuery('#'+"item-save").empty().after("" +
> > this.id +
> > > > > > "was toggled");
>
> > > > > > So, I guess my question is how do I define a NodeSeq to accomplish
> > > > > > this?
>
> > > > > > Glenn
>
> > > > > > On Sep 30, 10:40 am, David Pollak 
> > > > > > wrote:
> > > > > > > On Tue, Sep 29, 2009 at 1:22 PM, glenn  wrote:
>
> > > > > > > > I'd like to converting the following
>
> > > > > > > > JsRaw("""function() $('#item-save').html(this.id + ' was
> > > > > > > > toggled')""")
>
> > > > > > > > into something more object-oriented, using JQuery support
> > functions
> > > > in
> > > > > > > > Lift.
>
> > > > > > > > I've tried various combiniations, including this
>
> > > > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id
> > )}
> > > > was
> > > > > > > > toggled))
>
> > > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id} was
> > > > > > > toggled))
>
> > > > > > > No reason to promote this.id into some JavaScript thing.  It's
> > part
> > > > of
> > > > > > the
> > > > > > > XML literal.  The XML literal is generated server-side as part of
> > the
> > > > > > > JavaScript function.
>
> > > > > > > > but nothing seems to work. It just treats this.id as ordinary
> > > > text,
> > > > > > > > not as a Javascript variable.
>
> > > > > > > > Any ideas would be appreciated.
>
> > > > > > > > Glenn
>
> > > > > > > --
> > > > > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > > > > Follow me:http://twitter.com/dpp
> > > > > > > Surf the harmonics
>
> > > > > --
> > > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > > Follow me:http://twitter.com/dpp
> > > > > Surf the harmonics
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Surf the harmonics
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Surf the harmonics
--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-30 Thread David Pollak
JqHtml and JqEmptyAfter eagerly evaluate the NodeSeq on the server, so
there's no way to get client-side JS execution in a NodeSeq.
You can write something like:

object MyJqText {
def apply(content: JsExp) = new JsExp with JQueryRight with JQueryLeft {
  def toJsCmd = "text("+content.toJsCmd+")"
}
  }

So:

JqId("item-save") >> MyJqText(JsVar("this", "id") + " has changed")



On Wed, Sep 30, 2009 at 2:05 PM, glenn  wrote:

>
> As I mentioned, I was looking for a way to translate this JavaScript
>
> $('#item-save').html(this.id + ' was toggled')
>
> into a JsCmd so I could coded it my snipped as AnonFunc(some jsCmd).
>
> I know I can just use JsRaw, but who in their right mind wants to
> write JavaScript
> if it can be avoided.
>
> Glenn
>
>
> On Sep 30, 1:20 pm, David Pollak 
> wrote:
> > On Wed, Sep 30, 2009 at 1:08 PM, glenn  wrote:
> >
> > > David,
> >
> > > The problem with writting the NodeSeq as {this.id} was toggled > > div>)
> > > is that it generates the following JavaScript:
> >
> > > function() {jQuery('#'+"item-save").empty().after("-1 was
> > > toggled");
> >
> > > that is, Lift evaluates {this.id} in relation to the snippet, then
> > > outputs the value
> > > in the JavaScript - not the result I'm after.
> >
> > What are you after?  What is "this" in the context?
> >
> >
> >
> >
> >
> > > Glenn...
> >
> > > On Sep 30, 11:41 am, David Pollak 
> > > wrote:
> > > > On Wed, Sep 30, 2009 at 11:36 AM, glenn  wrote:
> >
> > > > > David,
> >
> > > > > I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
> > > > > (this.id was
> > > > > > toggled)) , if that's what you mean.
> >
> > > > That's not what I wrote.  Please look again at the curly braces
> around
> > > the
> > > > this.id:
> >
> > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> > > > was toggled))
> >
> > > > > This generates the following JavaScript:
> >
> > > > > function() {jQuery('#'+"item-save").empty().after("this.idwas
> > > > > toggled");
> >
> > > > > and that won't do. What's needed is something more akin to:
> >
> > > > > function() {jQuery('#'+"item-save").empty().after("" +
> this.id +
> > > > > "was toggled");
> >
> > > > > So, I guess my question is how do I define a NodeSeq to accomplish
> > > > > this?
> >
> > > > > Glenn
> >
> > > > > On Sep 30, 10:40 am, David Pollak 
> > > > > wrote:
> > > > > > On Tue, Sep 29, 2009 at 1:22 PM, glenn  wrote:
> >
> > > > > > > I'd like to converting the following
> >
> > > > > > > JsRaw("""function() $('#item-save').html(this.id + ' was
> > > > > > > toggled')""")
> >
> > > > > > > into something more object-oriented, using JQuery support
> functions
> > > in
> > > > > > > Lift.
> >
> > > > > > > I've tried various combiniations, including this
> >
> > > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id
> )}
> > > was
> > > > > > > toggled))
> >
> > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id} was
> > > > > > toggled))
> >
> > > > > > No reason to promote this.id into some JavaScript thing.  It's
> part
> > > of
> > > > > the
> > > > > > XML literal.  The XML literal is generated server-side as part of
> the
> > > > > > JavaScript function.
> >
> > > > > > > but nothing seems to work. It just treats this.id as ordinary
> > > text,
> > > > > > > not as a Javascript variable.
> >
> > > > > > > Any ideas would be appreciated.
> >
> > > > > > > Glenn
> >
> > > > > > --
> > > > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > > > Follow me:http://twitter.com/dpp
> > > > > > Surf the harmonics
> >
> > > > --
> > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > Follow me:http://twitter.com/dpp
> > > > Surf the harmonics
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
> >
>


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

--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-30 Thread glenn

As I mentioned, I was looking for a way to translate this JavaScript

$('#item-save').html(this.id + ' was toggled')

into a JsCmd so I could coded it my snipped as AnonFunc(some jsCmd).

I know I can just use JsRaw, but who in their right mind wants to
write JavaScript
if it can be avoided.

Glenn


On Sep 30, 1:20 pm, David Pollak 
wrote:
> On Wed, Sep 30, 2009 at 1:08 PM, glenn  wrote:
>
> > David,
>
> > The problem with writting the NodeSeq as {this.id} was toggled > div>)
> > is that it generates the following JavaScript:
>
> > function() {jQuery('#'+"item-save").empty().after("-1 was
> > toggled");
>
> > that is, Lift evaluates {this.id} in relation to the snippet, then
> > outputs the value
> > in the JavaScript - not the result I'm after.
>
> What are you after?  What is "this" in the context?
>
>
>
>
>
> > Glenn...
>
> > On Sep 30, 11:41 am, David Pollak 
> > wrote:
> > > On Wed, Sep 30, 2009 at 11:36 AM, glenn  wrote:
>
> > > > David,
>
> > > > I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
> > > > (this.id was
> > > > > toggled)) , if that's what you mean.
>
> > > That's not what I wrote.  Please look again at the curly braces around
> > the
> > > this.id:
>
> > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> > > was toggled))
>
> > > > This generates the following JavaScript:
>
> > > > function() {jQuery('#'+"item-save").empty().after("this.id was
> > > > toggled");
>
> > > > and that won't do. What's needed is something more akin to:
>
> > > > function() {jQuery('#'+"item-save").empty().after("" + this.id +
> > > > "was toggled");
>
> > > > So, I guess my question is how do I define a NodeSeq to accomplish
> > > > this?
>
> > > > Glenn
>
> > > > On Sep 30, 10:40 am, David Pollak 
> > > > wrote:
> > > > > On Tue, Sep 29, 2009 at 1:22 PM, glenn  wrote:
>
> > > > > > I'd like to converting the following
>
> > > > > > JsRaw("""function() $('#item-save').html(this.id + ' was
> > > > > > toggled')""")
>
> > > > > > into something more object-oriented, using JQuery support functions
> > in
> > > > > > Lift.
>
> > > > > > I've tried various combiniations, including this
>
> > > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)}
> > was
> > > > > > toggled))
>
> > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id} was
> > > > > toggled))
>
> > > > > No reason to promote this.id into some JavaScript thing.  It's part
> > of
> > > > the
> > > > > XML literal.  The XML literal is generated server-side as part of the
> > > > > JavaScript function.
>
> > > > > > but nothing seems to work. It just treats this.id as ordinary
> > text,
> > > > > > not as a Javascript variable.
>
> > > > > > Any ideas would be appreciated.
>
> > > > > > Glenn
>
> > > > > --
> > > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > > Follow me:http://twitter.com/dpp
> > > > > Surf the harmonics
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Surf the harmonics
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Surf the harmonics
--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-30 Thread David Pollak
On Wed, Sep 30, 2009 at 1:08 PM, glenn  wrote:

>
> David,
>
> The problem with writting the NodeSeq as {this.id} was toggled div>)
> is that it generates the following JavaScript:
>
> function() {jQuery('#'+"item-save").empty().after("-1 was
> toggled");
>
> that is, Lift evaluates {this.id} in relation to the snippet, then
> outputs the value
> in the JavaScript - not the result I'm after.
>

What are you after?  What is "this" in the context?


>
> Glenn...
>
> On Sep 30, 11:41 am, David Pollak 
> wrote:
> > On Wed, Sep 30, 2009 at 11:36 AM, glenn  wrote:
> >
> > > David,
> >
> > > I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
> > > (this.id was
> > > > toggled)) , if that's what you mean.
> >
> > That's not what I wrote.  Please look again at the curly braces around
> the
> > this.id:
> >
> > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> > was toggled))
> >
> >
> >
> >
> >
> > > This generates the following JavaScript:
> >
> > > function() {jQuery('#'+"item-save").empty().after("this.id was
> > > toggled");
> >
> > > and that won't do. What's needed is something more akin to:
> >
> > > function() {jQuery('#'+"item-save").empty().after("" + this.id +
> > > "was toggled");
> >
> > > So, I guess my question is how do I define a NodeSeq to accomplish
> > > this?
> >
> > > Glenn
> >
> > > On Sep 30, 10:40 am, David Pollak 
> > > wrote:
> > > > On Tue, Sep 29, 2009 at 1:22 PM, glenn  wrote:
> >
> > > > > I'd like to converting the following
> >
> > > > > JsRaw("""function() $('#item-save').html(this.id + ' was
> > > > > toggled')""")
> >
> > > > > into something more object-oriented, using JQuery support functions
> in
> > > > > Lift.
> >
> > > > > I've tried various combiniations, including this
> >
> > > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)}
> was
> > > > > toggled))
> >
> > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id} was
> > > > toggled))
> >
> > > > No reason to promote this.id into some JavaScript thing.  It's part
> of
> > > the
> > > > XML literal.  The XML literal is generated server-side as part of the
> > > > JavaScript function.
> >
> > > > > but nothing seems to work. It just treats this.id as ordinary
> text,
> > > > > not as a Javascript variable.
> >
> > > > > Any ideas would be appreciated.
> >
> > > > > Glenn
> >
> > > > --
> > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > Follow me:http://twitter.com/dpp
> > > > Surf the harmonics
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
> >
>


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

--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-30 Thread glenn

David,

The problem with writting the NodeSeq as {this.id} was toggled)
is that it generates the following JavaScript:

function() {jQuery('#'+"item-save").empty().after("-1 was
toggled");

that is, Lift evaluates {this.id} in relation to the snippet, then
outputs the value
in the JavaScript - not the result I'm after.

Glenn...

On Sep 30, 11:41 am, David Pollak 
wrote:
> On Wed, Sep 30, 2009 at 11:36 AM, glenn  wrote:
>
> > David,
>
> > I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
> > (this.id was
> > > toggled)) , if that's what you mean.
>
> That's not what I wrote.  Please look again at the curly braces around the
> this.id:
>
> AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
> was toggled))
>
>
>
>
>
> > This generates the following JavaScript:
>
> > function() {jQuery('#'+"item-save").empty().after("this.id was
> > toggled");
>
> > and that won't do. What's needed is something more akin to:
>
> > function() {jQuery('#'+"item-save").empty().after("" + this.id +
> > "was toggled");
>
> > So, I guess my question is how do I define a NodeSeq to accomplish
> > this?
>
> > Glenn
>
> > On Sep 30, 10:40 am, David Pollak 
> > wrote:
> > > On Tue, Sep 29, 2009 at 1:22 PM, glenn  wrote:
>
> > > > I'd like to converting the following
>
> > > > JsRaw("""function() $('#item-save').html(this.id + ' was
> > > > toggled')""")
>
> > > > into something more object-oriented, using JQuery support functions in
> > > > Lift.
>
> > > > I've tried various combiniations, including this
>
> > > > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> > > > toggled))
>
> > > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id} was
> > > toggled))
>
> > > No reason to promote this.id into some JavaScript thing.  It's part of
> > the
> > > XML literal.  The XML literal is generated server-side as part of the
> > > JavaScript function.
>
> > > > but nothing seems to work. It just treats this.id as ordinary text,
> > > > not as a Javascript variable.
>
> > > > Any ideas would be appreciated.
>
> > > > Glenn
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Surf the harmonics
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Surf the harmonics
--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-30 Thread David Pollak
On Wed, Sep 30, 2009 at 11:36 AM, glenn  wrote:

>
> David,
>
> I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
> (this.id was
> > toggled)) , if that's what you mean.
>

That's not what I wrote.  Please look again at the curly braces around the
this.id:

AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id}
was toggled))


>
> This generates the following JavaScript:
>
> function() {jQuery('#'+"item-save").empty().after("this.id was
> toggled");
>
> and that won't do. What's needed is something more akin to:
>
> function() {jQuery('#'+"item-save").empty().after("" + this.id +
> "was toggled");
>
> So, I guess my question is how do I define a NodeSeq to accomplish
> this?
>
> Glenn
>
>
>
> On Sep 30, 10:40 am, David Pollak 
> wrote:
> > On Tue, Sep 29, 2009 at 1:22 PM, glenn  wrote:
> >
> > > I'd like to converting the following
> >
> > > JsRaw("""function() $('#item-save').html(this.id + ' was
> > > toggled')""")
> >
> > > into something more object-oriented, using JQuery support functions in
> > > Lift.
> >
> > > I've tried various combiniations, including this
> >
> > > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> > > toggled))
> >
> > AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id} was
> > toggled))
> >
> > No reason to promote this.id into some JavaScript thing.  It's part of
> the
> > XML literal.  The XML literal is generated server-side as part of the
> > JavaScript function.
> >
> >
> >
> > > but nothing seems to work. It just treats this.id as ordinary text,
> > > not as a Javascript variable.
> >
> > > Any ideas would be appreciated.
> >
> > > Glenn
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
> >
>


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

--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-30 Thread glenn

David,

I can't do this, AnonFunc(JqId("item-save") >> JqEmptyAfter
(this.id was
> toggled)) , if that's what you mean.

This generates the following JavaScript:

function() {jQuery('#'+"item-save").empty().after("this.id was
toggled");

and that won't do. What's needed is something more akin to:

function() {jQuery('#'+"item-save").empty().after("" + this.id +
"was toggled");

So, I guess my question is how do I define a NodeSeq to accomplish
this?

Glenn



On Sep 30, 10:40 am, David Pollak 
wrote:
> On Tue, Sep 29, 2009 at 1:22 PM, glenn  wrote:
>
> > I'd like to converting the following
>
> > JsRaw("""function() $('#item-save').html(this.id + ' was
> > toggled')""")
>
> > into something more object-oriented, using JQuery support functions in
> > Lift.
>
> > I've tried various combiniations, including this
>
> > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> > toggled))
>
> AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id} was
> toggled))
>
> No reason to promote this.id into some JavaScript thing.  It's part of the
> XML literal.  The XML literal is generated server-side as part of the
> JavaScript function.
>
>
>
> > but nothing seems to work. It just treats this.id as ordinary text,
> > not as a Javascript variable.
>
> > Any ideas would be appreciated.
>
> > Glenn
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Surf the harmonics
--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-30 Thread David Pollak
On Tue, Sep 29, 2009 at 1:22 PM, glenn  wrote:

>
> I'd like to converting the following
>
> JsRaw("""function() $('#item-save').html(this.id + ' was
> toggled')""")
>
> into something more object-oriented, using JQuery support functions in
> Lift.
>
> I've tried various combiniations, including this
>
> AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> toggled))
>

AnonFunc(JqId("item-save") >> JqEmptyAfter({this.id} was
toggled))

No reason to promote this.id into some JavaScript thing.  It's part of the
XML literal.  The XML literal is generated server-side as part of the
JavaScript function.



>
> but nothing seems to work. It just treats this.id as ordinary text,
> not as a Javascript variable.
>
> Any ideas would be appreciated.
>
> Glenn
> >
>


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

--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-29 Thread Ross Mellgren

I'm sure opinions vary, but my personal preference in general is to  
implement JavaScript in JavaScript as a linked .js file and leave the  
HTML/XML generation in the server and not mix the two terribly much  
unless it's simple or there's a compelling reason.

What do you mean by "more functional"?

-Ross

On Sep 29, 2009, at 6:23 PM, glenn wrote:

>
> Ross,
>
> I think you and I  came to same conclusion. Writing it as raw
> JavaScript, as I
> did initially, seems the only way I could find to do this. FYI, where
> I was using this
> was with the TreeView widget. There, "toggle" takes an anonymous
> function, and
> "this" is an implicit parameter, denoting the Tree selected.
>
> val func = JsRaw("""function() $('#item-save').html(this.id + ' was
> toggled')""")
> TreeView("tree", JsObj(("persist", "location"),("toggle",  func)),
> loadTree, loadNode)
>
>
> I was hoping for a more functional way to write func, in order to do
> more complex processing on the client.
>
> Glenn
>
>
>
> On Sep 29, 2:55 pm, Ross Mellgren  wrote:
>> Oh I'm sorry, I got tunnel vision and did not read the rest of your
>> code. You'll not be able to do quite what you want, since this.id is
>> on the javascript side and the NodeSeq is on the server side.
>>
>> If you really want this.id within that div, I think you'll have to
>> construct or modify the div on the JS side. I rummaged through the
>> Lift jQuery docs and I couldn't find something that will append/ 
>> inject
>> to a JQueryLeft (such as JqId) but using a JsExp and not a fixed
>> NodeSeq. This is not to say there isn't such a thing, just that I
>> couldn't find it. Of course, you can whip this up using the lower
>> level javascript stuff:
>>
>> AnonFunc(JqId("item-save") ~>
>>   JsFunc("empty") ~>
>>   JsFunc("after", Call("jQuery", " was toggled")  
>> ~>
>>   JsFunc("prepend", JsVar("this", "id"
>>
>> Of course, at that point I'd just say it might be a better idea to
>> write the JavaScript directly, since this expands to
>>
>> $("#item-save").empty().after($(" was toggled").prepend
>> (this.id));
>>
>> -Ross
>>
>> On Sep 29, 2009, at 5:22 PM, glenn wrote:
>>
>>
>>
>>> Hi, Ross,
>>
>>> Unfornately, all of these just result in:
>>
>>> function() {jQuery('#'+"item-save").empty().after("this.id was
>>> toggled");}
>>
>>> They simply treat this.id as part of the passed in NodeSeq,
>>> "this.id was toggled". I need it
>>> to output this.id + "was toggled".
>>
>>> Glenn
>>
>>> On Sep 29, 1:46 pm, Ross Mellgren  wrote:
 Try JsVar("this", "id") or JsRaw("this.id")
>>
 -Ross
>>
 On Sep 29, 2009, at 4:22 PM, glenn wrote:
>>
> I'd like to converting the following
>>
> JsRaw("""function() $('#item-save').html(this.id + ' was
> toggled')""")
>>
> into something more object-oriented, using JQuery support
> functions in
> Lift.
>>
> I've tried various combiniations, including this
>>
> AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)}  
> was
> toggled))
>>
> but nothing seems to work. It just treats this.id as ordinary  
> text,
> not as a Javascript variable.
>>
> Any ideas would be appreciated.
>>
> Glenn
> >


--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-29 Thread Naftoli Gugenheim

Maybe write javascript code that gets all its variables by calling functions. 
Then supply those functions as Lift JsXX. This way you can supply values from 
Lift but the javascript "program" is written in javascript.


-
glenn wrote:


Ross,

I think you and I  came to same conclusion. Writing it as raw
JavaScript, as I
did initially, seems the only way I could find to do this. FYI, where
I was using this
was with the TreeView widget. There, "toggle" takes an anonymous
function, and
"this" is an implicit parameter, denoting the Tree selected.

val func = JsRaw("""function() $('#item-save').html(this.id + ' was
toggled')""")
TreeView("tree", JsObj(("persist", "location"),("toggle",  func)),
loadTree, loadNode)


I was hoping for a more functional way to write func, in order to do
more complex processing on the client.

Glenn



On Sep 29, 2:55 pm, Ross Mellgren  wrote:
> Oh I'm sorry, I got tunnel vision and did not read the rest of your  
> code. You'll not be able to do quite what you want, since this.id is  
> on the javascript side and the NodeSeq is on the server side.
>
> If you really want this.id within that div, I think you'll have to  
> construct or modify the div on the JS side. I rummaged through the  
> Lift jQuery docs and I couldn't find something that will append/inject  
> to a JQueryLeft (such as JqId) but using a JsExp and not a fixed  
> NodeSeq. This is not to say there isn't such a thing, just that I  
> couldn't find it. Of course, you can whip this up using the lower  
> level javascript stuff:
>
> AnonFunc(JqId("item-save") ~>
>           JsFunc("empty") ~>
>           JsFunc("after", Call("jQuery", " was toggled") ~>
>                           JsFunc("prepend", JsVar("this", "id"
>
> Of course, at that point I'd just say it might be a better idea to  
> write the JavaScript directly, since this expands to
>
> $("#item-save").empty().after($(" was toggled").prepend
> (this.id));
>
> -Ross
>
> On Sep 29, 2009, at 5:22 PM, glenn wrote:
>
>
>
> > Hi, Ross,
>
> > Unfornately, all of these just result in:
>
> > function() {jQuery('#'+"item-save").empty().after("this.id was
> > toggled");}
>
> > They simply treat this.id as part of the passed in NodeSeq,
> > "this.id was toggled". I need it
> > to output this.id + "was toggled".
>
> > Glenn
>
> > On Sep 29, 1:46 pm, Ross Mellgren  wrote:
> >> Try JsVar("this", "id") or JsRaw("this.id")
>
> >> -Ross
>
> >> On Sep 29, 2009, at 4:22 PM, glenn wrote:
>
> >>> I'd like to converting the following
>
> >>> JsRaw("""function() $('#item-save').html(this.id + ' was
> >>> toggled')""")
>
> >>> into something more object-oriented, using JQuery support  
> >>> functions in
> >>> Lift.
>
> >>> I've tried various combiniations, including this
>
> >>> AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> >>> toggled))
>
> >>> but nothing seems to work. It just treats this.id as ordinary text,
> >>> not as a Javascript variable.
>
> >>> Any ideas would be appreciated.
>
> >>> Glenn


--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-29 Thread glenn

Ross,

I think you and I  came to same conclusion. Writing it as raw
JavaScript, as I
did initially, seems the only way I could find to do this. FYI, where
I was using this
was with the TreeView widget. There, "toggle" takes an anonymous
function, and
"this" is an implicit parameter, denoting the Tree selected.

val func = JsRaw("""function() $('#item-save').html(this.id + ' was
toggled')""")
TreeView("tree", JsObj(("persist", "location"),("toggle",  func)),
loadTree, loadNode)


I was hoping for a more functional way to write func, in order to do
more complex processing on the client.

Glenn



On Sep 29, 2:55 pm, Ross Mellgren  wrote:
> Oh I'm sorry, I got tunnel vision and did not read the rest of your  
> code. You'll not be able to do quite what you want, since this.id is  
> on the javascript side and the NodeSeq is on the server side.
>
> If you really want this.id within that div, I think you'll have to  
> construct or modify the div on the JS side. I rummaged through the  
> Lift jQuery docs and I couldn't find something that will append/inject  
> to a JQueryLeft (such as JqId) but using a JsExp and not a fixed  
> NodeSeq. This is not to say there isn't such a thing, just that I  
> couldn't find it. Of course, you can whip this up using the lower  
> level javascript stuff:
>
> AnonFunc(JqId("item-save") ~>
>           JsFunc("empty") ~>
>           JsFunc("after", Call("jQuery", " was toggled") ~>
>                           JsFunc("prepend", JsVar("this", "id"
>
> Of course, at that point I'd just say it might be a better idea to  
> write the JavaScript directly, since this expands to
>
> $("#item-save").empty().after($(" was toggled").prepend
> (this.id));
>
> -Ross
>
> On Sep 29, 2009, at 5:22 PM, glenn wrote:
>
>
>
> > Hi, Ross,
>
> > Unfornately, all of these just result in:
>
> > function() {jQuery('#'+"item-save").empty().after("this.id was
> > toggled");}
>
> > They simply treat this.id as part of the passed in NodeSeq,
> > "this.id was toggled". I need it
> > to output this.id + "was toggled".
>
> > Glenn
>
> > On Sep 29, 1:46 pm, Ross Mellgren  wrote:
> >> Try JsVar("this", "id") or JsRaw("this.id")
>
> >> -Ross
>
> >> On Sep 29, 2009, at 4:22 PM, glenn wrote:
>
> >>> I'd like to converting the following
>
> >>> JsRaw("""function() $('#item-save').html(this.id + ' was
> >>> toggled')""")
>
> >>> into something more object-oriented, using JQuery support  
> >>> functions in
> >>> Lift.
>
> >>> I've tried various combiniations, including this
>
> >>> AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> >>> toggled))
>
> >>> but nothing seems to work. It just treats this.id as ordinary text,
> >>> not as a Javascript variable.
>
> >>> Any ideas would be appreciated.
>
> >>> Glenn
--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-29 Thread Ross Mellgren

Oh I'm sorry, I got tunnel vision and did not read the rest of your  
code. You'll not be able to do quite what you want, since this.id is  
on the javascript side and the NodeSeq is on the server side.

If you really want this.id within that div, I think you'll have to  
construct or modify the div on the JS side. I rummaged through the  
Lift jQuery docs and I couldn't find something that will append/inject  
to a JQueryLeft (such as JqId) but using a JsExp and not a fixed  
NodeSeq. This is not to say there isn't such a thing, just that I  
couldn't find it. Of course, you can whip this up using the lower  
level javascript stuff:

AnonFunc(JqId("item-save") ~>
  JsFunc("empty") ~>
  JsFunc("after", Call("jQuery", " was toggled") ~>
  JsFunc("prepend", JsVar("this", "id"

Of course, at that point I'd just say it might be a better idea to  
write the JavaScript directly, since this expands to

$("#item-save").empty().after($(" was toggled").prepend 
(this.id));

-Ross


On Sep 29, 2009, at 5:22 PM, glenn wrote:

>
> Hi, Ross,
>
> Unfornately, all of these just result in:
>
> function() {jQuery('#'+"item-save").empty().after("this.id was
> toggled");}
>
> They simply treat this.id as part of the passed in NodeSeq,
> "this.id was toggled". I need it
> to output this.id + "was toggled".
>
> Glenn
>
>
>
>
> On Sep 29, 1:46 pm, Ross Mellgren  wrote:
>> Try JsVar("this", "id") or JsRaw("this.id")
>>
>> -Ross
>>
>> On Sep 29, 2009, at 4:22 PM, glenn wrote:
>>
>>
>>
>>> I'd like to converting the following
>>
>>> JsRaw("""function() $('#item-save').html(this.id + ' was
>>> toggled')""")
>>
>>> into something more object-oriented, using JQuery support  
>>> functions in
>>> Lift.
>>
>>> I've tried various combiniations, including this
>>
>>> AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
>>> toggled))
>>
>>> but nothing seems to work. It just treats this.id as ordinary text,
>>> not as a Javascript variable.
>>
>>> Any ideas would be appreciated.
>>
>>> Glenn
> >


--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-29 Thread Naftoli Gugenheim

Well the compiler is trying to convert your JsRaw into a NodeSeq, because 
that's what happens to anything inside an xml literal. It probably uses 
toString.
I can't tell you how to do it correctly because I'm not familiar with Lift's 
javascript functionality.


-
glenn wrote:


Hi, Ross,

Unfornately, all of these just result in:

function() {jQuery('#'+"item-save").empty().after("this.id was
toggled");}

They simply treat this.id as part of the passed in NodeSeq,
"this.id was toggled". I need it
to output this.id + "was toggled".

Glenn




On Sep 29, 1:46 pm, Ross Mellgren  wrote:
> Try JsVar("this", "id") or JsRaw("this.id")
>
> -Ross
>
> On Sep 29, 2009, at 4:22 PM, glenn wrote:
>
>
>
> > I'd like to converting the following
>
> > JsRaw("""function() $('#item-save').html(this.id + ' was
> > toggled')""")
>
> > into something more object-oriented, using JQuery support functions in
> > Lift.
>
> > I've tried various combiniations, including this
>
> > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> > toggled))
>
> > but nothing seems to work. It just treats this.id as ordinary text,
> > not as a Javascript variable.
>
> > Any ideas would be appreciated.
>
> > Glenn


--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-29 Thread glenn

Hi, Ross,

Unfornately, all of these just result in:

function() {jQuery('#'+"item-save").empty().after("this.id was
toggled");}

They simply treat this.id as part of the passed in NodeSeq,
"this.id was toggled". I need it
to output this.id + "was toggled".

Glenn




On Sep 29, 1:46 pm, Ross Mellgren  wrote:
> Try JsVar("this", "id") or JsRaw("this.id")
>
> -Ross
>
> On Sep 29, 2009, at 4:22 PM, glenn wrote:
>
>
>
> > I'd like to converting the following
>
> > JsRaw("""function() $('#item-save').html(this.id + ' was
> > toggled')""")
>
> > into something more object-oriented, using JQuery support functions in
> > Lift.
>
> > I've tried various combiniations, including this
>
> > AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> > toggled))
>
> > but nothing seems to work. It just treats this.id as ordinary text,
> > not as a Javascript variable.
>
> > Any ideas would be appreciated.
>
> > Glenn
--~--~-~--~~~---~--~~
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: Help with using JSExp and JsCmd traits

2009-09-29 Thread Ross Mellgren

Try JsVar("this", "id") or JsRaw("this.id")

-Ross

On Sep 29, 2009, at 4:22 PM, glenn wrote:

>
> I'd like to converting the following
>
> JsRaw("""function() $('#item-save').html(this.id + ' was
> toggled')""")
>
> into something more object-oriented, using JQuery support functions in
> Lift.
>
> I've tried various combiniations, including this
>
> AnonFunc(JqId("item-save") >> JqEmptyAfter({JsRaw(this.id)} was
> toggled))
>
> but nothing seems to work. It just treats this.id as ordinary text,
> not as a Javascript variable.
>
> Any ideas would be appreciated.
>
> Glenn
> >


--~--~-~--~~~---~--~~
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: Help on "Build from source"

2009-07-31 Thread nile black
David:

I build again on windows. and fond there are also some error. I log

I've fixed it . and log my modify follow:

# On branch master
# Changed but not updated:
#   (use "git add ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working
directory)
#
#   modified:
lift-actor/src/main/scala/net/liftweb/actor/LiftActor.scala
#   modified:
lift-jta/src/main/scala/net/liftweb/transaction/hibernate/LiftTransactionManagerLookup.scala
#   modified:
lift-mapper/src/main/scala/net/liftweb/mapper/MappedBinary.scala
#   modified:
lift-osgi/src/main/scala/net/liftweb/osgi/internal/Activator.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/DBMetaRecord.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/Field.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/MetaRecord.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/BinaryField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/BooleanField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/DateTimeField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/DecimalField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/DoubleField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/EmailField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/EnumField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/IntField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/LocaleField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/LongField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/PasswordField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/PostalCodeField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/StringField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/TextareaField.scala
#   modified:
lift-record/src/main/scala/net/liftweb/record/field/TimeZoneField.scala
#   modified:
lift-textile/src/main/scala/net/liftweb/textile/TextileParser.scala
#   modified:
lift-util/src/main/scala/net/liftweb/util/ConcurrentLock.scala
#   modified:
lift-util/src/main/scala/net/liftweb/util/CurrencyZone.scala
#   modified:
lift-util/src/main/scala/net/liftweb/util/IOHelpers.scala
#   modified:   lift-util/src/main/scala/net/liftweb/util/Mailer.scala
#   modified:
lift-util/src/main/scala/net/liftweb/util/PCDataMarkupParser.scala
#   modified:   lift-util/src/main/scala/net/liftweb/util/Props.scala
#   modified:
lift-util/src/main/scala/net/liftweb/util/SoftReferenceCache.scala
#   modified:
lift-util/src/main/scala/net/liftweb/util/TemplateCache.scala
#   modified:
lift-util/src/test/scala/net/liftweb/util/ActorPingUnit.scala
#   modified:
lift-util/src/test/scala/net/liftweb/util/EnumWithDescriptionSpec.scala
#   modified:
lift-util/src/test/scala/net/liftweb/util/XmlParsingSpecs.scala
#   modified:   lift/src/main/scala/net/liftweb/http/LiftRules.scala
#   modified:   lift/src/main/scala/net/liftweb/http/LiftServlet.scala
#   modified:   lift/src/main/scala/net/liftweb/http/LiftSession.scala
#   modified:   lift/src/main/scala/net/liftweb/http/Req.scala
#   modified:   lift/src/main/scala/net/liftweb/http/S.scala
#   modified:
sites/JPADemo/JPADemo-spa/src/main/scala/net/liftweb/jpademo/model/AU.scala
#   modified:
sites/JPADemo/JPADemo-spa/src/main/scala/net/liftweb/jpademo/model/Author.scala
#   modified:
sites/JPADemo/JPADemo-spa/src/main/scala/net/liftweb/jpademo/model/Book.scala
#   modified:
sites/JPADemo/JPADemo-spa/src/main/scala/net/liftweb/jpademo/model/CurrencyUserType.scala
#   modified:
sites/JPADemo/JPADemo-spa/src/main/scala/net/liftweb/jpademo/model/CurrencyZone.scala
#   modified:
sites/JPADemo/JPADemo-spa/src/main/scala/net/liftweb/jpademo/model/EnumvType.scala
#   modified:
sites/JPADemo/JPADemo-web/src/main/scala/net/liftweb/jpademo/snippet/Books.scala
#   modified:
sites/JPADemo/JPADemo-web/src/main/webapp/css/datePicker.css
#   modified:
sites/JPADemo/JPADemo-web/src/main/webapp/scripts/jquery.datePicker.js
#   modified:   sites/JPADemo/JPADemo-web/src/test/scala/RunWebApp.scala
#   modified:
sites/example/src/main/scala/net/liftweb/example/snippet/Ajax.scala
# Untracked files:
#   (use "git add ..." to include in what will be committed)






Nile Black

On Thu, Jul 30, 2009 at 9:11 PM, David Pollak  wrote:

> Does it also build on your Windows box?  It should now... and if it doesn't
> I didn't nail all the _root_ causes.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To pos

[Lift] Re: Help on "Build from source"

2009-07-30 Thread David Pollak
On Wed, Jul 29, 2009 at 10:22 PM, nile black  wrote:

> Thanks everyone for your help and replies!
>
> It builds successful in my new clean colinux vm.


Does it also build on your Windows box?  It should now... and if it doesn't
I didn't nail all the _root_ causes.


>
>
> Nile Black
>
>
>
> On Wed, Jul 29, 2009 at 10:11 PM, Timothy Perrett  > wrote:
>
>>
>> FYI, David MacIver recently wrote a blog about exactly how package
>> imports work :-)
>>
>> http://www.drmaciver.com/2009/07/how-packages-work-in-scala/
>>
>> Its interesting reading so perhaps that will help Nile.
>>
>> Cheers, Tim
>>
>> On Jul 29, 3:06 pm, David Pollak 
>> wrote:
>> > Nile,
>> >
>> > Scala imports are relative unless the path of the import is prefixed by
>> > "_root_".  This behavior is the subject of fierce discussion on the
>> Scala
>> > list.  What does relative mean?  It's like this:
>> >
>> > import net.liftweb._
>> > import http._ // imports net.liftweb.http._
>> >
>> > The problem is that if you have a JAR with some net.java.blah package in
>> it,
>> > the Scala compiler will look to resolve java.concurrent._ as
>> > net.java.concurrent._
>> >
>> > We've generally tried to be explicit about using _root_ for all our
>> imports,
>> > etc., but some lazy good for nothing Lift committers (I'm thinking about
>> > me), don't always follow the rule... and this has led to the pain you
>> are
>> > experiencing.
>> >
>> > So, I don't know how Maven uses your environment variables, but that's
>> the
>> > thing that's poking at the issue.
>> >
>> > I did some work to make the import paths in Lift absolute.  I'll spend
>> time
>> > today finishing the cleanup.
>> >
>> > Thanks,
>> >
>> > David
>> >
>> >
>> >
>> >
>> >
>> > On Tue, Jul 28, 2009 at 10:52 PM, nile black 
>> wrote:
>> > > Hi,Everyone
>> >
>> > > i try to fix the problem
>> > > eg:
>> > > [WARNING]
>> D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.sc
>> ala:16:
>> > > error: value util is not a member of package net.java
>> > > [WARNING] import java.util.concurrent.locks._
>> >
>> > > i use
>> > > import _root_.java.util.concurrent.locks._
>> > > instead of
>> > > import java.util.concurrent.locks._
>> >
>> > > the error disappear! it works.
>> >
>> > > but my question is what's difference between with or without _root_???
>> >
>> > > Nile Black
>> >
>> > > On Wed, Jul 29, 2009 at 1:07 PM, nile black 
>> wrote:
>> >
>> > >> [WARNING]
>> > >>
>> D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.sc
>> ala:16:
>> > >> error: value util is not a member of package net.java
>> > >> [WARNING] import java.util.concurrent.locks._
>> >
>> > --
>> > 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: Help on "Build from source"

2009-07-29 Thread nile black
Thanks everyone for your help and replies!

It builds successful in my new clean colinux vm.

Nile Black


On Wed, Jul 29, 2009 at 10:11 PM, Timothy Perrett
wrote:

>
> FYI, David MacIver recently wrote a blog about exactly how package
> imports work :-)
>
> http://www.drmaciver.com/2009/07/how-packages-work-in-scala/
>
> Its interesting reading so perhaps that will help Nile.
>
> Cheers, Tim
>
> On Jul 29, 3:06 pm, David Pollak 
> wrote:
> > Nile,
> >
> > Scala imports are relative unless the path of the import is prefixed by
> > "_root_".  This behavior is the subject of fierce discussion on the Scala
> > list.  What does relative mean?  It's like this:
> >
> > import net.liftweb._
> > import http._ // imports net.liftweb.http._
> >
> > The problem is that if you have a JAR with some net.java.blah package in
> it,
> > the Scala compiler will look to resolve java.concurrent._ as
> > net.java.concurrent._
> >
> > We've generally tried to be explicit about using _root_ for all our
> imports,
> > etc., but some lazy good for nothing Lift committers (I'm thinking about
> > me), don't always follow the rule... and this has led to the pain you are
> > experiencing.
> >
> > So, I don't know how Maven uses your environment variables, but that's
> the
> > thing that's poking at the issue.
> >
> > I did some work to make the import paths in Lift absolute.  I'll spend
> time
> > today finishing the cleanup.
> >
> > Thanks,
> >
> > David
> >
> >
> >
> >
> >
> > On Tue, Jul 28, 2009 at 10:52 PM, nile black 
> wrote:
> > > Hi,Everyone
> >
> > > i try to fix the problem
> > > eg:
> > > [WARNING]
> D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.sc
> ala:16:
> > > error: value util is not a member of package net.java
> > > [WARNING] import java.util.concurrent.locks._
> >
> > > i use
> > > import _root_.java.util.concurrent.locks._
> > > instead of
> > > import java.util.concurrent.locks._
> >
> > > the error disappear! it works.
> >
> > > but my question is what's difference between with or without _root_???
> >
> > > Nile Black
> >
> > > On Wed, Jul 29, 2009 at 1:07 PM, nile black 
> wrote:
> >
> > >> [WARNING]
> > >>
> D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.sc
> ala:16:
> > >> error: value util is not a member of package net.java
> > >> [WARNING] import java.util.concurrent.locks._
> >
> > --
> > 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: Help on "Build from source"

2009-07-29 Thread Timothy Perrett

FYI, David MacIver recently wrote a blog about exactly how package
imports work :-)

http://www.drmaciver.com/2009/07/how-packages-work-in-scala/

Its interesting reading so perhaps that will help Nile.

Cheers, Tim

On Jul 29, 3:06 pm, David Pollak 
wrote:
> Nile,
>
> Scala imports are relative unless the path of the import is prefixed by
> "_root_".  This behavior is the subject of fierce discussion on the Scala
> list.  What does relative mean?  It's like this:
>
> import net.liftweb._
> import http._ // imports net.liftweb.http._
>
> The problem is that if you have a JAR with some net.java.blah package in it,
> the Scala compiler will look to resolve java.concurrent._ as
> net.java.concurrent._
>
> We've generally tried to be explicit about using _root_ for all our imports,
> etc., but some lazy good for nothing Lift committers (I'm thinking about
> me), don't always follow the rule... and this has led to the pain you are
> experiencing.
>
> So, I don't know how Maven uses your environment variables, but that's the
> thing that's poking at the issue.
>
> I did some work to make the import paths in Lift absolute.  I'll spend time
> today finishing the cleanup.
>
> Thanks,
>
> David
>
>
>
>
>
> On Tue, Jul 28, 2009 at 10:52 PM, nile black  wrote:
> > Hi,Everyone
>
> > i try to fix the problem
> > eg:
> > [WARNING] 
> > D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.sc 
> > ala:16:
> > error: value util is not a member of package net.java
> > [WARNING] import java.util.concurrent.locks._
>
> > i use
> > import _root_.java.util.concurrent.locks._
> > instead of
> > import java.util.concurrent.locks._
>
> > the error disappear! it works.
>
> > but my question is what's difference between with or without _root_???
>
> > Nile Black
>
> > On Wed, Jul 29, 2009 at 1:07 PM, nile black  wrote:
>
> >> [WARNING]
> >> D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.sc
> >>  ala:16:
> >> error: value util is not a member of package net.java
> >> [WARNING] import java.util.concurrent.locks._
>
> --
> 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: Help on "Build from source"

2009-07-29 Thread David Pollak
Nile,

Scala imports are relative unless the path of the import is prefixed by
"_root_".  This behavior is the subject of fierce discussion on the Scala
list.  What does relative mean?  It's like this:

import net.liftweb._
import http._ // imports net.liftweb.http._

The problem is that if you have a JAR with some net.java.blah package in it,
the Scala compiler will look to resolve java.concurrent._ as
net.java.concurrent._

We've generally tried to be explicit about using _root_ for all our imports,
etc., but some lazy good for nothing Lift committers (I'm thinking about
me), don't always follow the rule... and this has led to the pain you are
experiencing.

So, I don't know how Maven uses your environment variables, but that's the
thing that's poking at the issue.

I did some work to make the import paths in Lift absolute.  I'll spend time
today finishing the cleanup.

Thanks,

David


On Tue, Jul 28, 2009 at 10:52 PM, nile black  wrote:

> Hi,Everyone
>
> i try to fix the problem
> eg:
> [WARNING] 
> D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.scala:16:
> error: value util is not a member of package net.java
> [WARNING] import java.util.concurrent.locks._
>
> i use
> import _root_.java.util.concurrent.locks._
> instead of
> import java.util.concurrent.locks._
>
> the error disappear! it works.
>
> but my question is what's difference between with or without _root_???
>
>
> Nile Black
>
>
>
> On Wed, Jul 29, 2009 at 1:07 PM, nile black  wrote:
>
>> [WARNING]
>> D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.scala:16:
>> error: value util is not a member of package net.java
>> [WARNING] import java.util.concurrent.locks._
>>
>
>
> >
>


-- 
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: Help on "Build from source"

2009-07-28 Thread nile black
Thanks everyone for replies!

I've checked my jdk,classpath,maven,but the problem go on.

D:\user\liftweb>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Administrator\Application Data
APR_ICONV_PATH=D:\Program Files\Subversion\iconv
classpath=.;D:\opt\Java\jdk1.5.0_16\lib;D:\opt\Java\jdk1.5.0_16\jre\lib\rt.jar;D:\opt\Java\jdk1.5.0_16\lib\tools.jar;d:\PROGRA~1\JMF21~1.1E\lib\sound.jar;d:\PRO
GRA~1\JMF21~1.1E\lib\jmf.jar;d:\PROGRA~1\JMF21~1.1E\lib;
CLIENTNAME=Console
COLINUX=d:\coLinux
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=PC-200905040902
ComSpec=C:\WINDOWS\system32\cmd.exe
ERROR_CODE=1
FP_NO_HOST_CHECK=NO
GRAILS_HOME=D:\opt\grails
HOME=C:\Documents and Settings\Administrator
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Administrator
JAVA_HOME=D:\opt\Java\jdk1.5.0_16
LOGONSERVER=\\PC-200905040902
M2=D:\opt\apache-maven-2.0.10\bin
M2_HOME=D:\opt\apache-maven-2.0.10
MAVEN_OPTS=-Xmx1024m
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=D:\opt\apache-maven-2.0.10\bin;
d:\opt\liftweb-1.0/apache-maven/bin;.;D:\opt\grails\bin;d:\oracle\product\10.2.0\client_1\bin;D:\opt\JavaFX\javafx-sdk1.1\bi
n;D:\opt\JavaFX\javafx-sdk1.1\emulator\bin;.;D:\opt\Java\jdk1.5.0_16/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\IDM Computer S
olutions\UltraEdit-32;d:\Program Files\Subversion\bin;D:\Program
Files\TortoiseSVN\bin;.;d:\opt;D:\Python25\;d:\opt\opencv\lib;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 107 Stepping 1, AuthenticAMD
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=6b01
ProgramFiles=C:\Program Files
PROMPT=$P$G
SCALA_HOME22=D:\opt\scala-2.7.5.final\
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
USERDOMAIN=PC-200905040902
USERNAME=Administrator
USERPROFILE=C:\Documents and Settings\Administrator
VS80COMNTOOLS=C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
windir=C:\WINDOWS


D:\user\liftweb>mvn compile
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Lift
[INFO]   Lift Utils
[INFO]   Lift Actor
[INFO]   Lift WebKit
[INFO]   Lift Wizard
[INFO]   Lift OSGi
[INFO]   Lift Widgets
[INFO]   Lift Mapper
[INFO]   Lift Machine
[INFO]   Lift Record
[INFO]   Lift Textile
[INFO]   Lift Facebook
[INFO]   Lift AMQP
[INFO]   Lift XMPP
[INFO]   Lift OpenID
[INFO]   Lift OAuth
[INFO]   Lift PayPal
[INFO]   Lift TestKit
[INFO]   Lift Core (full lift)
[INFO]   Lift JTA
[INFO]   Lift JPA
[INFO]   Lift Sites
[INFO]   Lift Example
[INFO]   OSGi Examples for Lift - Hello
[INFO]   OSGi Examples for Lift
[INFO]   Skittr Example
[INFO]   HelloLift example application
[INFO]   HelloDarwin tutorial application
[INFO]   JPA Demo Master
[INFO]   JPADemo-spa
[INFO]   JPADemo-web
[INFO]   HTTP Authentication example
[INFO]   lift-archetype-blank
[INFO]   lift-archetype-basic
[INFO]   lift-archetype-jpa-basic
[INFO]   lift-archetype-jpa-blank
[INFO]   lift-archetype-jpa-blank-single
WAGON_VERSION: 1.0-beta-2
[INFO]

[INFO] Building Lift
[INFO]task-segment: [compile]
[INFO]

[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[WARNING] No source files found.
[INFO]

[INFO] Building Lift Utils
[INFO]task-segment: [compile]
[INFO]

[INFO] [resources:resources]
[WARNING] Using platform encoding (GBK actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
D:\user\liftweb\lift-util\src\main\resources
[INFO] [yuicompressor:compress {execution: default}]
[INFO] nb warnings: 0, nb errors: 0
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] Compiling 37 source files to D:\user\liftweb\lift-util\target\classes
[WARNING]
D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.scala:16:
error: value util is not a member of package net.java
[WARNING] import java.util.concurrent.locks._
[WARNING] ^
[WARNING]
D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\CurrencyZone.scala:69:
error: value lang is not a member of package net.java
[WARNING] } catch { case e: java.lang.NumberFormatException => {
[WARNING]^
[WARNING]
D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\CurrencyZone.scala:72:
error: value text is not a member of package net.java
[WARNING] } catch { case e: java.text.ParseException =>
{
[WARNING]^
[WARNING]
D:\use

[Lift] Re: Help on "Build from source"

2009-07-28 Thread nile black
Nile Black


On Wed, Jul 29, 2009 at 2:31 AM, David Pollak  wrote:

>
>
> On Tue, Jul 28, 2009 at 11:05 AM, Naftoli Gugenheim 
> wrote:
>
>>
>> If it thinks import java.xxx is a relative import of net.java.xxx, then it
>> must be you're somehow building it with a net.java package in the classpath.
>> The question is why maven is building it with a different classpath than
>> it uses for everyone else, and why those imports don't start with _root_.
>
>
> Yeah... that's the problem.  I wonder if he added some classes to his
> pom.xml file or if there's some global classpath that's bleeding into the
> Maven process.
>

HI,David Pollak,
what means " if he added some classes to his pom.xml file or if there's some
global classpath that's bleeding into the Maven process."
i did not change any file after checkout .
>if there's some global classpath
is it means my system evn "classpath" ?


>
>
>
>>
>>
>> -
>> TylerWeir wrote:
>>
>>
>> "why i cann't see my post at group?"
>>
>> All new members are moderated to start with.
>>
>>
>> On Jul 27, 11:56 pm, nile black  wrote:
>> > why i cann't see my post at group?
>> >
>> >
>> >
>> > On Tue, Jul 28, 2009 at 11:48 AM, Nile Black 
>> wrote:
>> > > [INFO] Building Lift Utils
>> > > [INFO]task-segment: [install]
>> > > [INFO]
>> > >
>> 
>> > > [INFO] [resources:resources]
>> > > [INFO] Using default encoding to copy filtered resources.
>> > > [INFO] [yuicompressor:compress {execution: default}]
>> > > [INFO] nb warnings: 0, nb errors: 0
>> > > [INFO] [compiler:compile]
>> > > [INFO] Nothing to compile - all classes are up to date
>> > > [INFO] [scala:compile {execution: default}]
>> > > [INFO] Checking for multiple versions of scala
>> > > [INFO] Compiling 37 source files to D:\user\liftweb\lift-util\target
>> > > \classes
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \ConcurrentLock.scala:16: error: value util is not a member of package
>> > > net.java
>> > > [WARNING] import java.util.concurrent.locks._
>> > > [WARNING] ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \CurrencyZone.scala:69: error: value lang is not a member of package
>> > > net.java
>> > > [WARNING] } catch { case e: java.lang.NumberFormatException =>
>> > > {
>> > > [WARNING]^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \CurrencyZone.scala:72: error: value text is not a member of package
>> > > net.java
>> > > [WARNING] } catch { case e:
>> > > java.text.ParseException => {
>> > > [WARNING]^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \CurrencyZone.scala:103: error: value math is not a member of package
>> > > net.java
>> > > [WARNING] make(new BigDecimal(this.amount.bigDecimal.divide
>> > > (that.amount.bigDecimal, scale, java.math.BigDecimal.ROUND_HALF_UP)) )
>> > > [WARNING]
>> > > ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \IOHelpers.scala:104: error: value io is not a member of package
>> > > net.java
>> > > [WARNING]   def doClose[T](is: java.io.Closeable*)(f : => T): T = {
>> > > [WARNING]   ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \Mailer.scala:84: error: value util is not a member of package
>> > > net.java
>> > > [WARNING]   import java.util.Properties
>> > > [WARNING]   ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \PCDataMarkupParser.scala:187: error: value io is not a member of
>> > > package net.java
>> > > [WARNING] import java.io.ByteArrayInputStream
>> > > [WARNING] ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \Props.scala:178: error: value io is not a member of package net.java
>> > > [WARNING] import java.io.{ByteArrayInputStream}
>> > > [WARNING] ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \Props.scala:179: error: value util is not a member of package
>> > > net.java
>> > > [WARNING] import java.util.InvalidPropertiesFormatException
>> > > [WARNING] ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \SoftReferenceCache.scala:3: error: value lang is not a member of
>> > > package net.java
>> > > [WARNING] import java.lang.ref.{ReferenceQueue,SoftReference};
>> > > [WARNING] ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
>> > > \SoftReferenceCache.scala:4: error: value util is not a member of
>> > > package net.java
>> > > [WARNING] import java.util._
>> > > [WARNING] ^
>> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\l

[Lift] Re: Help on "Build from source"

2009-07-28 Thread nile black
Hi,Everyone

i try to fix the problem
eg:
[WARNING] 
D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.scala:16:
error: value util is not a member of package net.java
[WARNING] import java.util.concurrent.locks._

i use
import _root_.java.util.concurrent.locks._
instead of
import java.util.concurrent.locks._

the error disappear! it works.

but my question is what's difference between with or without _root_???


Nile Black



On Wed, Jul 29, 2009 at 1:07 PM, nile black  wrote:

> [WARNING]
> D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util\ConcurrentLock.scala:16:
> error: value util is not a member of package net.java
> [WARNING] import java.util.concurrent.locks._
>

--~--~-~--~~~---~--~~
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: Help on "Build from source"

2009-07-28 Thread David Pollak
On Tue, Jul 28, 2009 at 11:05 AM, Naftoli Gugenheim wrote:

>
> If it thinks import java.xxx is a relative import of net.java.xxx, then it
> must be you're somehow building it with a net.java package in the classpath.
> The question is why maven is building it with a different classpath than it
> uses for everyone else, and why those imports don't start with _root_.


Yeah... that's the problem.  I wonder if he added some classes to his
pom.xml file or if there's some global classpath that's bleeding into the
Maven process.


>
>
> -
> TylerWeir wrote:
>
>
> "why i cann't see my post at group?"
>
> All new members are moderated to start with.
>
>
> On Jul 27, 11:56 pm, nile black  wrote:
> > why i cann't see my post at group?
> >
> >
> >
> > On Tue, Jul 28, 2009 at 11:48 AM, Nile Black 
> wrote:
> > > [INFO] Building Lift Utils
> > > [INFO]task-segment: [install]
> > > [INFO]
> > >
> 
> > > [INFO] [resources:resources]
> > > [INFO] Using default encoding to copy filtered resources.
> > > [INFO] [yuicompressor:compress {execution: default}]
> > > [INFO] nb warnings: 0, nb errors: 0
> > > [INFO] [compiler:compile]
> > > [INFO] Nothing to compile - all classes are up to date
> > > [INFO] [scala:compile {execution: default}]
> > > [INFO] Checking for multiple versions of scala
> > > [INFO] Compiling 37 source files to D:\user\liftweb\lift-util\target
> > > \classes
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \ConcurrentLock.scala:16: error: value util is not a member of package
> > > net.java
> > > [WARNING] import java.util.concurrent.locks._
> > > [WARNING] ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \CurrencyZone.scala:69: error: value lang is not a member of package
> > > net.java
> > > [WARNING] } catch { case e: java.lang.NumberFormatException =>
> > > {
> > > [WARNING]^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \CurrencyZone.scala:72: error: value text is not a member of package
> > > net.java
> > > [WARNING] } catch { case e:
> > > java.text.ParseException => {
> > > [WARNING]^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \CurrencyZone.scala:103: error: value math is not a member of package
> > > net.java
> > > [WARNING] make(new BigDecimal(this.amount.bigDecimal.divide
> > > (that.amount.bigDecimal, scale, java.math.BigDecimal.ROUND_HALF_UP)) )
> > > [WARNING]
> > > ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \IOHelpers.scala:104: error: value io is not a member of package
> > > net.java
> > > [WARNING]   def doClose[T](is: java.io.Closeable*)(f : => T): T = {
> > > [WARNING]   ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \Mailer.scala:84: error: value util is not a member of package
> > > net.java
> > > [WARNING]   import java.util.Properties
> > > [WARNING]   ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \PCDataMarkupParser.scala:187: error: value io is not a member of
> > > package net.java
> > > [WARNING] import java.io.ByteArrayInputStream
> > > [WARNING] ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \Props.scala:178: error: value io is not a member of package net.java
> > > [WARNING] import java.io.{ByteArrayInputStream}
> > > [WARNING] ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \Props.scala:179: error: value util is not a member of package
> > > net.java
> > > [WARNING] import java.util.InvalidPropertiesFormatException
> > > [WARNING] ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \SoftReferenceCache.scala:3: error: value lang is not a member of
> > > package net.java
> > > [WARNING] import java.lang.ref.{ReferenceQueue,SoftReference};
> > > [WARNING] ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \SoftReferenceCache.scala:4: error: value util is not a member of
> > > package net.java
> > > [WARNING] import java.util._
> > > [WARNING] ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \SoftReferenceCache.scala:147: error: wrong number of arguments for
> > > constructor Object: ()jav
> > > a.lang.Object
> > > [WARNING]   queue: ReferenceQueue[Any]) extends
> > > SoftReference[V](v, queue) {
> > > [WARNING]   ^
> > > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > > \TemplateCache.scala:17: error: value util is not a member

[Lift] Re: Help on "Build from source"

2009-07-28 Thread Naftoli Gugenheim

If it thinks import java.xxx is a relative import of net.java.xxx, then it must 
be you're somehow building it with a net.java package in the classpath.
The question is why maven is building it with a different classpath than it 
uses for everyone else, and why those imports don't start with _root_.

-
TylerWeir wrote:


"why i cann't see my post at group?"

All new members are moderated to start with.


On Jul 27, 11:56 pm, nile black  wrote:
> why i cann't see my post at group?
>
>
>
> On Tue, Jul 28, 2009 at 11:48 AM, Nile Black  wrote:
> > [INFO] Building Lift Utils
> > [INFO]    task-segment: [install]
> > [INFO]
> > 
> > [INFO] [resources:resources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [yuicompressor:compress {execution: default}]
> > [INFO] nb warnings: 0, nb errors: 0
> > [INFO] [compiler:compile]
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO] [scala:compile {execution: default}]
> > [INFO] Checking for multiple versions of scala
> > [INFO] Compiling 37 source files to D:\user\liftweb\lift-util\target
> > \classes
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \ConcurrentLock.scala:16: error: value util is not a member of package
> > net.java
> > [WARNING] import java.util.concurrent.locks._
> > [WARNING]             ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \CurrencyZone.scala:69: error: value lang is not a member of package
> > net.java
> > [WARNING]         } catch { case e: java.lang.NumberFormatException =>
> > {
> > [WARNING]                                ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \CurrencyZone.scala:72: error: value text is not a member of package
> > net.java
> > [WARNING]                     } catch { case e:
> > java.text.ParseException => {
> > [WARNING]                                            ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \CurrencyZone.scala:103: error: value math is not a member of package
> > net.java
> > [WARNING]         make(new BigDecimal(this.amount.bigDecimal.divide
> > (that.amount.bigDecimal, scale, java.math.BigDecimal.ROUND_HALF_UP)) )
> > [WARNING]
> > ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \IOHelpers.scala:104: error: value io is not a member of package
> > net.java
> > [WARNING]   def doClose[T](is: java.io.Closeable*)(f : => T): T = {
> > [WARNING]                           ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \Mailer.scala:84: error: value util is not a member of package
> > net.java
> > [WARNING]   import java.util.Properties
> > [WARNING]               ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \PCDataMarkupParser.scala:187: error: value io is not a member of
> > package net.java
> > [WARNING]     import java.io.ByteArrayInputStream
> > [WARNING]                 ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \Props.scala:178: error: value io is not a member of package net.java
> > [WARNING]     import java.io.{ByteArrayInputStream}
> > [WARNING]                 ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \Props.scala:179: error: value util is not a member of package
> > net.java
> > [WARNING]     import java.util.InvalidPropertiesFormatException
> > [WARNING]                 ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \SoftReferenceCache.scala:3: error: value lang is not a member of
> > package net.java
> > [WARNING] import java.lang.ref.{ReferenceQueue,SoftReference};
> > [WARNING]             ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \SoftReferenceCache.scala:4: error: value util is not a member of
> > package net.java
> > [WARNING] import java.util._
> > [WARNING]             ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \SoftReferenceCache.scala:147: error: wrong number of arguments for
> > constructor Object: ()jav
> > a.lang.Object
> > [WARNING]                       queue: ReferenceQueue[Any]) extends
> > SoftReference[V](v, queue) {
> > [WARNING]                                                           ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \TemplateCache.scala:17: error: value util is not a member of package
> > net.java
> > [WARNING] import java.util.{Locale}
> > [WARNING]             ^
> > [WARNING] 13 errors found
> > [INFO]
> > 
> > [ERROR] BUILD FAILURE
> > [INFO]
> > 
> > [INFO] command line returned non-zero value:1
> > [INFO]
> > --

[Lift] Re: Help on "Build from source"

2009-07-28 Thread TylerWeir

"why i cann't see my post at group?"

All new members are moderated to start with.


On Jul 27, 11:56 pm, nile black  wrote:
> why i cann't see my post at group?
>
>
>
> On Tue, Jul 28, 2009 at 11:48 AM, Nile Black  wrote:
> > [INFO] Building Lift Utils
> > [INFO]    task-segment: [install]
> > [INFO]
> > 
> > [INFO] [resources:resources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [yuicompressor:compress {execution: default}]
> > [INFO] nb warnings: 0, nb errors: 0
> > [INFO] [compiler:compile]
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO] [scala:compile {execution: default}]
> > [INFO] Checking for multiple versions of scala
> > [INFO] Compiling 37 source files to D:\user\liftweb\lift-util\target
> > \classes
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \ConcurrentLock.scala:16: error: value util is not a member of package
> > net.java
> > [WARNING] import java.util.concurrent.locks._
> > [WARNING]             ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \CurrencyZone.scala:69: error: value lang is not a member of package
> > net.java
> > [WARNING]         } catch { case e: java.lang.NumberFormatException =>
> > {
> > [WARNING]                                ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \CurrencyZone.scala:72: error: value text is not a member of package
> > net.java
> > [WARNING]                     } catch { case e:
> > java.text.ParseException => {
> > [WARNING]                                            ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \CurrencyZone.scala:103: error: value math is not a member of package
> > net.java
> > [WARNING]         make(new BigDecimal(this.amount.bigDecimal.divide
> > (that.amount.bigDecimal, scale, java.math.BigDecimal.ROUND_HALF_UP)) )
> > [WARNING]
> > ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \IOHelpers.scala:104: error: value io is not a member of package
> > net.java
> > [WARNING]   def doClose[T](is: java.io.Closeable*)(f : => T): T = {
> > [WARNING]                           ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \Mailer.scala:84: error: value util is not a member of package
> > net.java
> > [WARNING]   import java.util.Properties
> > [WARNING]               ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \PCDataMarkupParser.scala:187: error: value io is not a member of
> > package net.java
> > [WARNING]     import java.io.ByteArrayInputStream
> > [WARNING]                 ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \Props.scala:178: error: value io is not a member of package net.java
> > [WARNING]     import java.io.{ByteArrayInputStream}
> > [WARNING]                 ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \Props.scala:179: error: value util is not a member of package
> > net.java
> > [WARNING]     import java.util.InvalidPropertiesFormatException
> > [WARNING]                 ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \SoftReferenceCache.scala:3: error: value lang is not a member of
> > package net.java
> > [WARNING] import java.lang.ref.{ReferenceQueue,SoftReference};
> > [WARNING]             ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \SoftReferenceCache.scala:4: error: value util is not a member of
> > package net.java
> > [WARNING] import java.util._
> > [WARNING]             ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \SoftReferenceCache.scala:147: error: wrong number of arguments for
> > constructor Object: ()jav
> > a.lang.Object
> > [WARNING]                       queue: ReferenceQueue[Any]) extends
> > SoftReference[V](v, queue) {
> > [WARNING]                                                           ^
> > [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> > \TemplateCache.scala:17: error: value util is not a member of package
> > net.java
> > [WARNING] import java.util.{Locale}
> > [WARNING]             ^
> > [WARNING] 13 errors found
> > [INFO]
> > 
> > [ERROR] BUILD FAILURE
> > [INFO]
> > 
> > [INFO] command line returned non-zero value:1
> > [INFO]
> > 
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> > 
> > [INFO] Total time: 1 minute 15 seconds
> > [INFO] Finished at: Tue Jul 28 11:47:44 CST 2009
> > [INFO] Final Memory: 22M/39M
> > [INFO]
> > --

[Lift] Re: Help on "Build from source"

2009-07-28 Thread Timothy Perrett

Can you provide some enviroment details What version of maven are
you using? What JDK?

What maven command did you run?

Cheers, Tim

On Jul 28, 4:48 am, Nile Black  wrote:
> [INFO] Building Lift Utils
> [INFO]    task-segment: [install]
> [INFO]
> 
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [yuicompressor:compress {execution: default}]
> [INFO] nb warnings: 0, nb errors: 0
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [scala:compile {execution: default}]
> [INFO] Checking for multiple versions of scala
> [INFO] Compiling 37 source files to D:\user\liftweb\lift-util\target
> \classes
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \ConcurrentLock.scala:16: error: value util is not a member of package
> net.java
> [WARNING] import java.util.concurrent.locks._
> [WARNING]             ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \CurrencyZone.scala:69: error: value lang is not a member of package
> net.java
> [WARNING]         } catch { case e: java.lang.NumberFormatException =>
> {
> [WARNING]                                ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \CurrencyZone.scala:72: error: value text is not a member of package
> net.java
> [WARNING]                     } catch { case e:
> java.text.ParseException => {
> [WARNING]                                            ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \CurrencyZone.scala:103: error: value math is not a member of package
> net.java
> [WARNING]         make(new BigDecimal(this.amount.bigDecimal.divide
> (that.amount.bigDecimal, scale, java.math.BigDecimal.ROUND_HALF_UP)) )
> [WARNING]
> ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \IOHelpers.scala:104: error: value io is not a member of package
> net.java
> [WARNING]   def doClose[T](is: java.io.Closeable*)(f : => T): T = {
> [WARNING]                           ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \Mailer.scala:84: error: value util is not a member of package
> net.java
> [WARNING]   import java.util.Properties
> [WARNING]               ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \PCDataMarkupParser.scala:187: error: value io is not a member of
> package net.java
> [WARNING]     import java.io.ByteArrayInputStream
> [WARNING]                 ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \Props.scala:178: error: value io is not a member of package net.java
> [WARNING]     import java.io.{ByteArrayInputStream}
> [WARNING]                 ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \Props.scala:179: error: value util is not a member of package
> net.java
> [WARNING]     import java.util.InvalidPropertiesFormatException
> [WARNING]                 ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \SoftReferenceCache.scala:3: error: value lang is not a member of
> package net.java
> [WARNING] import java.lang.ref.{ReferenceQueue,SoftReference};
> [WARNING]             ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \SoftReferenceCache.scala:4: error: value util is not a member of
> package net.java
> [WARNING] import java.util._
> [WARNING]             ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \SoftReferenceCache.scala:147: error: wrong number of arguments for
> constructor Object: ()jav
> a.lang.Object
> [WARNING]                       queue: ReferenceQueue[Any]) extends
> SoftReference[V](v, queue) {
> [WARNING]                                                           ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \TemplateCache.scala:17: error: value util is not a member of package
> net.java
> [WARNING] import java.util.{Locale}
> [WARNING]             ^
> [WARNING] 13 errors found
> [INFO]
> 
> [ERROR] BUILD FAILURE
> [INFO]
> 
> [INFO] command line returned non-zero value:1
> [INFO]
> 
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> 
> [INFO] Total time: 1 minute 15 seconds
> [INFO] Finished at: Tue Jul 28 11:47:44 CST 2009
> [INFO] Final Memory: 22M/39M
> [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.

[Lift] Re: Help on "Build from source"

2009-07-27 Thread nile black
why i cann't see my post at group?


On Tue, Jul 28, 2009 at 11:48 AM, Nile Black  wrote:

> [INFO] Building Lift Utils
> [INFO]task-segment: [install]
> [INFO]
> 
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [yuicompressor:compress {execution: default}]
> [INFO] nb warnings: 0, nb errors: 0
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [scala:compile {execution: default}]
> [INFO] Checking for multiple versions of scala
> [INFO] Compiling 37 source files to D:\user\liftweb\lift-util\target
> \classes
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \ConcurrentLock.scala:16: error: value util is not a member of package
> net.java
> [WARNING] import java.util.concurrent.locks._
> [WARNING] ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \CurrencyZone.scala:69: error: value lang is not a member of package
> net.java
> [WARNING] } catch { case e: java.lang.NumberFormatException =>
> {
> [WARNING]^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \CurrencyZone.scala:72: error: value text is not a member of package
> net.java
> [WARNING] } catch { case e:
> java.text.ParseException => {
> [WARNING]^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \CurrencyZone.scala:103: error: value math is not a member of package
> net.java
> [WARNING] make(new BigDecimal(this.amount.bigDecimal.divide
> (that.amount.bigDecimal, scale, java.math.BigDecimal.ROUND_HALF_UP)) )
> [WARNING]
> ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \IOHelpers.scala:104: error: value io is not a member of package
> net.java
> [WARNING]   def doClose[T](is: java.io.Closeable*)(f : => T): T = {
> [WARNING]   ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \Mailer.scala:84: error: value util is not a member of package
> net.java
> [WARNING]   import java.util.Properties
> [WARNING]   ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \PCDataMarkupParser.scala:187: error: value io is not a member of
> package net.java
> [WARNING] import java.io.ByteArrayInputStream
> [WARNING] ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \Props.scala:178: error: value io is not a member of package net.java
> [WARNING] import java.io.{ByteArrayInputStream}
> [WARNING] ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \Props.scala:179: error: value util is not a member of package
> net.java
> [WARNING] import java.util.InvalidPropertiesFormatException
> [WARNING] ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \SoftReferenceCache.scala:3: error: value lang is not a member of
> package net.java
> [WARNING] import java.lang.ref.{ReferenceQueue,SoftReference};
> [WARNING] ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \SoftReferenceCache.scala:4: error: value util is not a member of
> package net.java
> [WARNING] import java.util._
> [WARNING] ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \SoftReferenceCache.scala:147: error: wrong number of arguments for
> constructor Object: ()jav
> a.lang.Object
> [WARNING]   queue: ReferenceQueue[Any]) extends
> SoftReference[V](v, queue) {
> [WARNING]   ^
> [WARNING] D:\user\liftweb\lift-util\src\main\scala\net\liftweb\util
> \TemplateCache.scala:17: error: value util is not a member of package
> net.java
> [WARNING] import java.util.{Locale}
> [WARNING] ^
> [WARNING] 13 errors found
> [INFO]
> 
> [ERROR] BUILD FAILURE
> [INFO]
> 
> [INFO] command line returned non-zero value:1
> [INFO]
> 
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> 
> [INFO] Total time: 1 minute 15 seconds
> [INFO] Finished at: Tue Jul 28 11:47:44 CST 2009
> [INFO] Final Memory: 22M/39M
> [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.

[Lift] Re: Help with the eclipse plugin

2009-07-09 Thread Naftoli Gugenheim
So maybe we can say... either use it only outside or only inside...

On Thu, Jul 9, 2009 at 4:00 PM, Dan Gravell  wrote:

>
> Ok... my feelings are that is not so much the scala stuff as the maven
> plugin that was borking eclipse. So I took Jeppe's advice, which seems
> to be to use maven outside of eclipse. At least it doesn't seem to
> hang anymore, which is a significant step forward!
>
> Thanks everyone for their thoughts. Time to prepare some coffee!
>
> Dan
>
> >
>

--~--~-~--~~~---~--~~
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: Help with the eclipse plugin

2009-07-09 Thread Dan Gravell

Ok... my feelings are that is not so much the scala stuff as the maven
plugin that was borking eclipse. So I took Jeppe's advice, which seems
to be to use maven outside of eclipse. At least it doesn't seem to
hang anymore, which is a significant step forward!

Thanks everyone for their thoughts. Time to prepare some coffee!

Dan

--~--~-~--~~~---~--~~
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: Help with the eclipse plugin

2009-07-09 Thread Jeppe Nejsum Madsen

Naftoli Gugenhem  writes:

> Completion works for me, when there are no basic syntax errors in the file 
> (mismatched bracketd etc.).
> Also, I use lift without running maven from the command line. I create the 
> project with m2eclipse, and I don't recall having to set M2_REPO.
>

The M2_REPO var is used by the .classpath generated by 
  mvn eclipse:eclipse

/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: Help with the eclipse plugin

2009-07-09 Thread Naftoli Gugenhem

Completion works for me, when there are no basic syntax errors in the file 
(mismatched bracketd etc.).
Also, I use lift without running maven from the command line. I create the 
project with m2eclipse, and I don't recall having to set M2_REPO.

-
Jeppe Nejsum Madsen wrote:


Ellis  writes:

> Hi Dan,
>
> I don't have an answer to your question, but maybe a suggestion.
> Eclipse does not work well with maven/scala/lift, and I really doubt
> it will anytime soon.

I don't know about the Maven part, but Eclipse works with Scala &
Lift. It's not nearly as functional as with Java, but I can edit,
compile and debug without too much trouble. Advanced stuff such as
completion, navigation etc. doesn't seem to work that well and I
sometimes need to do a "clean all" to get back into a working state

I'm using it daily without major pain, but await the 2.8 plugin (when
Lift moves to 2.8 :-)

I don't like Maven, so only use it to bootstrap the project. These steps works
for me (Eclipse EE 3.5, Scala 2.7.5):

mvn archetype:create -U -DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic \ 
-DarchetypeVersion=1.1-SNAPSHOT \
-DremoteRepositories=http://scala-tools.org/repo-snapshots \
-DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.1-SNAPSHOT 

verify it works: mvn jetty:run
Press Ctrl-C to stop
mvn eclipse:eclipse

In Eclipse:
- If you haven't already: Define M2_REPO classpath var to point to your
local maven repo (~/.m2/repository)
- Import the project you just created above
- Eclipse plugin don't like multiple output folders so modify your
projects build path
  * Remove all existing source folders
  * Add the source folders src/main/scala, src/main/resources,
  src/test/scala & src/test/resources, all with the same output folder
- Clean the project
- You can now launch src/test/RunWebApp as a Scala Application to have
jetty run inside eclipse and you can run debug etc
- Running specs with the Eclipse JUnit runner is possible but requires a
workaround, see the specs site. 

/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: Help with the eclipse plugin

2009-07-09 Thread Naftoli Gugenhem

I'm using eclipse for lift. I'm not saying it's perfect but it's very usable. 
My understanding is that the important thing is not to use mv eclipse:eclipse.

-
Miles Sabin wrote:


On Thu, Jul 9, 2009 at 5:45 PM, David
Pollak wrote:
> But, until Martin's magic brain has yielded code for us, I would recommend
> avoiding Eclipse for Scala and Lift related development.

Unsurprisingly I disagree.

Bug reports and more contributions to documentation on using Eclipse
with Lift and Maven would be much appreciated from the Lift community.
There's a start here,

  http://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseLift
  http://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseMaven

but clearly a great deal more is needed. A little more encouragement
and a little less FUD wouldn't go amiss.

Cheers,


Miles

-- 
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin



--~--~-~--~~~---~--~~
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: Help with the eclipse plugin

2009-07-09 Thread David Pollak
On Thu, Jul 9, 2009 at 10:14 AM, Jeppe Nejsum Madsen wrote:

>
> Miles Sabin  writes:
>
> > On Thu, Jul 9, 2009 at 5:45 PM, David
> > Pollak wrote:
> >> But, until Martin's magic brain has yielded code for us, I would
> recommend
> >> avoiding Eclipse for Scala and Lift related development.
> >
> > Unsurprisingly I disagree.
> >
> > Bug reports and more contributions to documentation on using Eclipse
> > with Lift and Maven would be much appreciated from the Lift community.
> > There's a start here,
> >
> >   http://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseLift
> >   http://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseMaven
> >
> > but clearly a great deal more is needed. A little more encouragement
> > and a little less FUD wouldn't go amiss.
>
> A major show stopper atm is that Lift, afaik, doesn't work with Scala
> 2.8 which makes it difficult to actually use the trunk plugin.


Lift relies on Specs.  As of a week ago, scalac could not compile Specs or
Lift because of compiler problems.  Jorge is working on this, but it'll be a
little while before we have a branch of Lift that is on 2.8.


> It is my
> (maybe incorrect?) impression that there's not a lot of activity
> happening on the 2.7.5 plugin
>
> /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: Help with the eclipse plugin

2009-07-09 Thread Miles Sabin

On Thu, Jul 9, 2009 at 6:14 PM, Jeppe Nejsum Madsen wrote:
> A major show stopper atm is that Lift, afaik, doesn't work with Scala
> 2.8 which makes it difficult to actually use the trunk plugin. It is my
> (maybe incorrect?) impression that there's not a lot of activity
> happening on the 2.7.5 plugin

All the current activity is on trunk ...

Nevertheless there are many mostly happy users of 2.7.5 for Lift and
general Scala development work.

Cheers,


Miles

-- 
Miles S4abin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin

--~--~-~--~~~---~--~~
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: Help with the eclipse plugin

2009-07-09 Thread Jeppe Nejsum Madsen

Miles Sabin  writes:

> On Thu, Jul 9, 2009 at 5:45 PM, David
> Pollak wrote:
>> But, until Martin's magic brain has yielded code for us, I would recommend
>> avoiding Eclipse for Scala and Lift related development.
>
> Unsurprisingly I disagree.
>
> Bug reports and more contributions to documentation on using Eclipse
> with Lift and Maven would be much appreciated from the Lift community.
> There's a start here,
>
>   http://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseLift
>   http://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseMaven
>
> but clearly a great deal more is needed. A little more encouragement
> and a little less FUD wouldn't go amiss.

A major show stopper atm is that Lift, afaik, doesn't work with Scala
2.8 which makes it difficult to actually use the trunk plugin. It is my
(maybe incorrect?) impression that there's not a lot of activity
happening on the 2.7.5 plugin

/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: Help with the eclipse plugin

2009-07-09 Thread Jeppe Nejsum Madsen

Ellis  writes:

> Hi Dan,
>
> I don't have an answer to your question, but maybe a suggestion.
> Eclipse does not work well with maven/scala/lift, and I really doubt
> it will anytime soon.

I don't know about the Maven part, but Eclipse works with Scala &
Lift. It's not nearly as functional as with Java, but I can edit,
compile and debug without too much trouble. Advanced stuff such as
completion, navigation etc. doesn't seem to work that well and I
sometimes need to do a "clean all" to get back into a working state

I'm using it daily without major pain, but await the 2.8 plugin (when
Lift moves to 2.8 :-)

I don't like Maven, so only use it to bootstrap the project. These steps works
for me (Eclipse EE 3.5, Scala 2.7.5):

mvn archetype:create -U -DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic \ 
-DarchetypeVersion=1.1-SNAPSHOT \
-DremoteRepositories=http://scala-tools.org/repo-snapshots \
-DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.1-SNAPSHOT 

verify it works: mvn jetty:run
Press Ctrl-C to stop
mvn eclipse:eclipse

In Eclipse:
- If you haven't already: Define M2_REPO classpath var to point to your
local maven repo (~/.m2/repository)
- Import the project you just created above
- Eclipse plugin don't like multiple output folders so modify your
projects build path
  * Remove all existing source folders
  * Add the source folders src/main/scala, src/main/resources,
  src/test/scala & src/test/resources, all with the same output folder
- Clean the project
- You can now launch src/test/RunWebApp as a Scala Application to have
jetty run inside eclipse and you can run debug etc
- Running specs with the Eclipse JUnit runner is possible but requires a
workaround, see the specs site. 

/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: Help with the eclipse plugin

2009-07-09 Thread Miles Sabin

On Thu, Jul 9, 2009 at 5:45 PM, David
Pollak wrote:
> But, until Martin's magic brain has yielded code for us, I would recommend
> avoiding Eclipse for Scala and Lift related development.

Unsurprisingly I disagree.

Bug reports and more contributions to documentation on using Eclipse
with Lift and Maven would be much appreciated from the Lift community.
There's a start here,

  http://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseLift
  http://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseMaven

but clearly a great deal more is needed. A little more encouragement
and a little less FUD wouldn't go amiss.

Cheers,


Miles

-- 
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin

--~--~-~--~~~---~--~~
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: Help with the eclipse plugin

2009-07-09 Thread David Pollak
On Thu, Jul 9, 2009 at 9:27 AM, Kevin Wright
wrote:

> The fabled 2.8 eclipse plugin will be the one to use when it's here, should
> be any day now...


This is normally my cue to rant about the state of the Eclipse plugin.
First some background... I've been part of the Scala community for nearly 3
years.  Ever since I joined the community, the "new, better, stable,
working" Eclipse plugin was just a few months away.

Last year, Miles took over development of the plugin and has made
significant progress... the plugin doesn't suck beyond all belief, it's now
merely unstable and generally doesn't play well with the likes of Maven
(when used from the command line).  Miles has relatively improved the plugin
in amazing ways, but at the absolute level, there are still exceptions
logged for mousing over virtually every element in my apps and I find
Eclipse unusable for Lift or Lift-related development.

A few weeks ago, Martin Odersky announced that he was going to focus his
efforts on the Eclipse plugin.  Martin is one of the best computer
scientists and one of the best programmers in the world.  I am finally
looking forward to excellent progress on the Eclipse plugin front.

But, until Martin's magic brain has yielded code for us, I would recommend
avoiding Eclipse for Scala and Lift related development.

For newbies, I suggest using TextMate, Emacs, or vi.  You don't need much
more for Lift development than those tools.  There's less to get in your way
with a text editor.

I use 25% emacs, 60% NetBeans and 15% IntelliJ for my development.  My
fingers know Emacs better than everything else.  NetBeans has the best error
reporting of any of editors.  IntelliJ has the best code navigation and
intellisense of any of the editors.

Thanks,

David



>
>
>
> On Thu, Jul 9, 2009 at 5:14 PM, Ellis  wrote:
>
>>
>> Hi Dan,
>>
>> I don't have an answer to your question, but maybe a suggestion.
>> Eclipse does not work well with maven/scala/lift, and I really doubt
>> it will anytime soon.  According to exchanges on this list, IntelliJ
>> IDEA apparently has the best working implementation so far.  I've been
>> using NetBeans 6.7 for a couple weeks now, and I like it better than
>> Eclipse (which I've used for years).  It works a better with maven,
>> and a little bit better with scala.  Neither environment handles
>> testing, debugging, or refactoring smoothly though.
>>
>> Anyhow, with NetBeans you can just open the maven pom directly.
>> You'll have to create some custom "actions" in order to get your
>> programs to launch, and entering debug mode a bit of a pain.
>>
>> Cheers,
>> Ellis
>>
>>
>> On Jul 9, 3:02 pm, Dan Gravell  wrote:
>> > I'm trying to learn about lift using the eclipse plugin but not really
>> > getting far... Currently trying to build a project hangs eclipse which
>> > is obviously something of a shortcoming.
>> >
>> > Eclipse 3.4.2
>> > Scala plugin 2.7.5
>> > Maven plugin Q4E (IAM) 0.10
>> >
>> > So I create a new lift project externally using maven and the
>> > instructions 
>> > athttp://wiki.liftweb.net/index.php/Chore_wheel(I
>> > believe this is the way to do it, I've tried other approaches but I
>> > didn't really find anything that could be classed as canonical) did a
>> > 'mvn eclipse:eclipse' and imported it into eclipse. That's when it
>> > hangs, because Eclipse tries to build straight away.
>> >
>> > It hangs when it says:
>> >
>> > Starting mojoExecution scala:compile
>> >
>> > ... in the progress bar. Meanwhile, in a different VM I notice the
>> > following process has begun:
>> >
>> > /usr/java/jdk1.6.0_12/jre/bin/java -classpath /home/gravelld/.m2/
>> > repository/org/scala-lang/scala-compiler/2.7.3/scala-
>> > compiler-2.7.3.jar:/home/gravelld/.m2/repository/org/scala-lang/scala-
>> > library/2.7.3/scala-library-2.7.3.jar:/home/gravelld/.m2/repository/
>> > org/scala-tools/maven-scala-plugin/2.11/maven-scala-plugin-2.11.jar -
>> > Xbootclasspath/a:/home/gravelld/.m2/repository/org/scala-lang/scala-
>> > library/2.7.3/scala-library-2.7.3.jar
>> > org.scala_tools.maven.executions.MainWithArgsInFile
>> > scala.tools.nsc.Main /tmp/scala-maven-1418794117226686986.args
>> >
>> > But this doesn't appear to complete. Is this what the eclipse builder
>> > is waiting for? I can actually run the above from the command line and
>> > it returns in a couple of seconds.
>> >
>> > Interestingly, when working through the 'todo' example there was a
>> > period when it appeared to work, but going back to it today appears to
>> > show the same issue above.
>> >
>> > Really hoping someone can help me out because this stuff looked
>> > interesting.
>>
>>
>>
>
> >
>


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

[Lift] Re: Help with the eclipse plugin

2009-07-09 Thread Kevin Wright
The fabled 2.8 eclipse plugin will be the one to use when it's here, should
be any day now...


On Thu, Jul 9, 2009 at 5:14 PM, Ellis  wrote:

>
> Hi Dan,
>
> I don't have an answer to your question, but maybe a suggestion.
> Eclipse does not work well with maven/scala/lift, and I really doubt
> it will anytime soon.  According to exchanges on this list, IntelliJ
> IDEA apparently has the best working implementation so far.  I've been
> using NetBeans 6.7 for a couple weeks now, and I like it better than
> Eclipse (which I've used for years).  It works a better with maven,
> and a little bit better with scala.  Neither environment handles
> testing, debugging, or refactoring smoothly though.
>
> Anyhow, with NetBeans you can just open the maven pom directly.
> You'll have to create some custom "actions" in order to get your
> programs to launch, and entering debug mode a bit of a pain.
>
> Cheers,
> Ellis
>
>
> On Jul 9, 3:02 pm, Dan Gravell  wrote:
> > I'm trying to learn about lift using the eclipse plugin but not really
> > getting far... Currently trying to build a project hangs eclipse which
> > is obviously something of a shortcoming.
> >
> > Eclipse 3.4.2
> > Scala plugin 2.7.5
> > Maven plugin Q4E (IAM) 0.10
> >
> > So I create a new lift project externally using maven and the
> > instructions 
> > athttp://wiki.liftweb.net/index.php/Chore_wheel(I
> > believe this is the way to do it, I've tried other approaches but I
> > didn't really find anything that could be classed as canonical) did a
> > 'mvn eclipse:eclipse' and imported it into eclipse. That's when it
> > hangs, because Eclipse tries to build straight away.
> >
> > It hangs when it says:
> >
> > Starting mojoExecution scala:compile
> >
> > ... in the progress bar. Meanwhile, in a different VM I notice the
> > following process has begun:
> >
> > /usr/java/jdk1.6.0_12/jre/bin/java -classpath /home/gravelld/.m2/
> > repository/org/scala-lang/scala-compiler/2.7.3/scala-
> > compiler-2.7.3.jar:/home/gravelld/.m2/repository/org/scala-lang/scala-
> > library/2.7.3/scala-library-2.7.3.jar:/home/gravelld/.m2/repository/
> > org/scala-tools/maven-scala-plugin/2.11/maven-scala-plugin-2.11.jar -
> > Xbootclasspath/a:/home/gravelld/.m2/repository/org/scala-lang/scala-
> > library/2.7.3/scala-library-2.7.3.jar
> > org.scala_tools.maven.executions.MainWithArgsInFile
> > scala.tools.nsc.Main /tmp/scala-maven-1418794117226686986.args
> >
> > But this doesn't appear to complete. Is this what the eclipse builder
> > is waiting for? I can actually run the above from the command line and
> > it returns in a couple of seconds.
> >
> > Interestingly, when working through the 'todo' example there was a
> > period when it appeared to work, but going back to it today appears to
> > show the same issue above.
> >
> > Really hoping someone can help me out because this stuff looked
> > interesting.
>
> >
>

--~--~-~--~~~---~--~~
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: Help with the eclipse plugin

2009-07-09 Thread Ellis

Hi Dan,

I don't have an answer to your question, but maybe a suggestion.
Eclipse does not work well with maven/scala/lift, and I really doubt
it will anytime soon.  According to exchanges on this list, IntelliJ
IDEA apparently has the best working implementation so far.  I've been
using NetBeans 6.7 for a couple weeks now, and I like it better than
Eclipse (which I've used for years).  It works a better with maven,
and a little bit better with scala.  Neither environment handles
testing, debugging, or refactoring smoothly though.

Anyhow, with NetBeans you can just open the maven pom directly.
You'll have to create some custom "actions" in order to get your
programs to launch, and entering debug mode a bit of a pain.

Cheers,
Ellis


On Jul 9, 3:02 pm, Dan Gravell  wrote:
> I'm trying to learn about lift using the eclipse plugin but not really
> getting far... Currently trying to build a project hangs eclipse which
> is obviously something of a shortcoming.
>
> Eclipse 3.4.2
> Scala plugin 2.7.5
> Maven plugin Q4E (IAM) 0.10
>
> So I create a new lift project externally using maven and the
> instructions athttp://wiki.liftweb.net/index.php/Chore_wheel(I
> believe this is the way to do it, I've tried other approaches but I
> didn't really find anything that could be classed as canonical) did a
> 'mvn eclipse:eclipse' and imported it into eclipse. That's when it
> hangs, because Eclipse tries to build straight away.
>
> It hangs when it says:
>
> Starting mojoExecution scala:compile
>
> ... in the progress bar. Meanwhile, in a different VM I notice the
> following process has begun:
>
> /usr/java/jdk1.6.0_12/jre/bin/java -classpath /home/gravelld/.m2/
> repository/org/scala-lang/scala-compiler/2.7.3/scala-
> compiler-2.7.3.jar:/home/gravelld/.m2/repository/org/scala-lang/scala-
> library/2.7.3/scala-library-2.7.3.jar:/home/gravelld/.m2/repository/
> org/scala-tools/maven-scala-plugin/2.11/maven-scala-plugin-2.11.jar -
> Xbootclasspath/a:/home/gravelld/.m2/repository/org/scala-lang/scala-
> library/2.7.3/scala-library-2.7.3.jar
> org.scala_tools.maven.executions.MainWithArgsInFile
> scala.tools.nsc.Main /tmp/scala-maven-1418794117226686986.args
>
> But this doesn't appear to complete. Is this what the eclipse builder
> is waiting for? I can actually run the above from the command line and
> it returns in a couple of seconds.
>
> Interestingly, when working through the 'todo' example there was a
> period when it appeared to work, but going back to it today appears to
> show the same issue above.
>
> Really hoping someone can help me out because this stuff looked
> interesting.

--~--~-~--~~~---~--~~
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: Help with the eclipse plugin

2009-07-09 Thread Naftoli Gugenhem

mvn eclipse:eclipse doesn't seem to like scala. Why don't you initialize 
everything from the IAM GUI?

-
Dan Gravell wrote:


I'm trying to learn about lift using the eclipse plugin but not really
getting far... Currently trying to build a project hangs eclipse which
is obviously something of a shortcoming.

Eclipse 3.4.2
Scala plugin 2.7.5
Maven plugin Q4E (IAM) 0.10

So I create a new lift project externally using maven and the
instructions at http://wiki.liftweb.net/index.php/Chore_wheel (I
believe this is the way to do it, I've tried other approaches but I
didn't really find anything that could be classed as canonical) did a
'mvn eclipse:eclipse' and imported it into eclipse. That's when it
hangs, because Eclipse tries to build straight away.

It hangs when it says:

Starting mojoExecution scala:compile

... in the progress bar. Meanwhile, in a different VM I notice the
following process has begun:

/usr/java/jdk1.6.0_12/jre/bin/java -classpath /home/gravelld/.m2/
repository/org/scala-lang/scala-compiler/2.7.3/scala-
compiler-2.7.3.jar:/home/gravelld/.m2/repository/org/scala-lang/scala-
library/2.7.3/scala-library-2.7.3.jar:/home/gravelld/.m2/repository/
org/scala-tools/maven-scala-plugin/2.11/maven-scala-plugin-2.11.jar -
Xbootclasspath/a:/home/gravelld/.m2/repository/org/scala-lang/scala-
library/2.7.3/scala-library-2.7.3.jar
org.scala_tools.maven.executions.MainWithArgsInFile
scala.tools.nsc.Main /tmp/scala-maven-1418794117226686986.args

But this doesn't appear to complete. Is this what the eclipse builder
is waiting for? I can actually run the above from the command line and
it returns in a couple of seconds.

Interestingly, when working through the 'todo' example there was a
period when it appeared to work, but going back to it today appears to
show the same issue above.

Really hoping someone can help me out because this stuff looked
interesting.



--~--~-~--~~~---~--~~
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: Help with writing generic functions for lift mapper

2009-06-19 Thread Sean Reque

Thanks for the quick response! I will submit a ticket in the scala bug
tracker.

On Jun 19, 10:14 am, David Pollak 
wrote:
> On Fri, Jun 19, 2009 at 6:35 AM, Sean Reque  wrote:
>
> > I am trying to write a generic function to do a on-to-one join between
> > mapper objects in memory using a map. The function is as follows:
>
> >  def oneToOneJoin[PType <: LongKeyedMapper[PType] with IdPK,
> >                   CType <: LongKeyedMapper[CType] with IdPK,
> >                   CMetaType <: CType with LongKeyedMetaMapper
> > [CType],
> >                   FKType <: MappedLongForeignKey[PType, CType]]
> >  (parents: List[PType], metaMapper: CMetaType, keyGetter: (PType) =>
> > FKType ):
> >  Map[Long, CType] = {
> >    (Map.empty[Long, CType] /: metaMapper.findAll(
> >          ByList(metaMapper.id, parents.map {p => keyGetter
> > (p).is.longValue } ))
> >          ) {(accum, v) => accum + (v.id.longValue -> v) }
>
> > This function compiles fine, but I can't use it! Here is the call
> > site:
>
> > Util.oneToOneJoin(runs, TestSubject, (tr: TestRun) => tr.testSubject
>
> >  where runs is of type List[TestRun]
>
> > Here are the relevant class and object definitions. All the
> > definitions are "by the book", meaning the exploring Lift book :).
> > Each test run has one test subject.
>
> >  class TestSubject extends LongKeyedMapper[TestSubject] with IdPK {
> >  object TestSubject extends TestSubject with LongKeyedMetaMapper
> > [TestSubject] {
> >  class TestRun extends LongKeyedMapper[TestRun] with IdPK {
> >      object testSubject extends MappedLongForeignKey(this,
> > TestSubject)
> >   }
> >  object TestRun extends TestRun with LongKeyedMetaMapper[TestRun]
> > with CRUDify[Long, TestRun] {
>
> > I get an error that makes me think I'm coding in C++ with the boost
> > library. Scala is inferring CType as Nothing, which is definitely not
> > what I want.
>
> > error: inferred type arguments
> > [com.test_results.model.TestRun,Nothing,object
> > com.test_results.model.TestSubject,object
> > com.test_results.model.TestRun#testSubject] do not conform to method
> > oneToOneJoin's type parameter bounds [PType <:
> > net.liftweb.mapper.LongKeyedMapper[PType] with
> > net.liftweb.mapper.IdPK,CType <: net.liftweb.mapper.LongKeyedMapper
> > [CType] with net.liftweb.mapper.IdPK,CMetaType <: CType with
> > net.liftweb.mapper.LongKeyedMetaMapper[CType],FKType <:
> > net.liftweb.mapper.MappedLongForeignKey[PType,CType]]
> >    Util.oneToOneJoin(runs, TestSubject, (tr: TestRun) =>
> > tr.testSubject)
>
> > I cannot find any way to get the class of the TestSubject companion
> > object, So I changed things slightly to create a MetaTestSubject and
> > then tried to explicitly specify the type parameters to the
> > oneToOneJoin function as shown below. MetaTestSubject is the supertype
> > for the TestSubject companion object so that I can reference it's type
> > explicitly.
>
> >  Util.oneToOneJoin[TestRun,
> >                    TestSubject,
> >                    MetaTestSubject,
> >                    (TestRun) => MappedLongForeignKey[TestRun,
> > TestSubject]
> >  ](runs, TestSubject, (tr: TestRun) => tr.testSubject)
>
> >  where MetaTestSubject and TestSubject are now defined as
> >    class MetaTestSubject extends TestSubject with LongKeyedMetaMapper
> > [TestSubject]
> >    object TestSubject extends MetaTestSubject {
>
> > When I specify the types to the oneToOneJoin function explicitly,
> > Scala then just plain tells me that the types don't match with this
> > error.
>
> >  error: type arguments
>
> > [com.test_results.model.TestRun,com.test_results.model.TestSubject,com.test_results.model.MetaTestSubject,
> > (com.test_results.model.TestRun) =>
> > net.liftweb.mapper.MappedLongForeignKey
> > [com.test_results.model.TestRun,com.test_results.model.TestSubject]]
> > do not conform to method oneToOneJoin's type parameter bounds [PType
> > <: net.liftweb.mapper.LongKeyedMapper[PType] with
> > net.liftweb.mapper.IdPK,CType <: net.liftweb.mapper.LongKeyedMapper
> > [CType] with net.liftweb.mapper.IdPK,CMetaType <: CType with
> > net.liftweb.mapper.LongKeyedMetaMapper[CType],FKType <:
> > net.liftweb.mapper.MappedLongForeignKey[PType,CType]]
> >      Util.oneToOneJoin[TestRun,
>
> > After a couple of hours of trying I am stuck at this point and all of
> > the types look like they line up to me. TestRun is a LongKeyedMapper
> > of the right type with IdPK, and so is TestSubject. MetaTestSubject
> > inherits from TestSubject with LongKeyedMetaMapper[TestSubject]. The
> > third value parameter is a function takes a type TestRun and returns a
> > MappedLongForeignKey[TestRun, TestSubject].
>
> > What am I doing wrong?
>
> In the second one where you explicitly specified the types, you are doing
> nothing wrong.
>
> In the first case, because there were no parameters with the type CType, the
> type inferencer couldn't figure out what CType was.  The type inferencer
> only looks a certain number of levels for a type in order to av

[Lift] Re: Help with writing generic functions for lift mapper

2009-06-19 Thread David Pollak
On Fri, Jun 19, 2009 at 6:35 AM, Sean Reque  wrote:

>
> I am trying to write a generic function to do a on-to-one join between
> mapper objects in memory using a map. The function is as follows:
>
>  def oneToOneJoin[PType <: LongKeyedMapper[PType] with IdPK,
>   CType <: LongKeyedMapper[CType] with IdPK,
>   CMetaType <: CType with LongKeyedMetaMapper
> [CType],
>   FKType <: MappedLongForeignKey[PType, CType]]
>  (parents: List[PType], metaMapper: CMetaType, keyGetter: (PType) =>
> FKType ):
>  Map[Long, CType] = {
>(Map.empty[Long, CType] /: metaMapper.findAll(
>  ByList(metaMapper.id, parents.map {p => keyGetter
> (p).is.longValue } ))
>  ) {(accum, v) => accum + (v.id.longValue -> v) }
>
> This function compiles fine, but I can't use it! Here is the call
> site:
>
> Util.oneToOneJoin(runs, TestSubject, (tr: TestRun) => tr.testSubject
>
>  where runs is of type List[TestRun]
>
> Here are the relevant class and object definitions. All the
> definitions are "by the book", meaning the exploring Lift book :).
> Each test run has one test subject.
>
>  class TestSubject extends LongKeyedMapper[TestSubject] with IdPK {
>  object TestSubject extends TestSubject with LongKeyedMetaMapper
> [TestSubject] {
>  class TestRun extends LongKeyedMapper[TestRun] with IdPK {
>  object testSubject extends MappedLongForeignKey(this,
> TestSubject)
>   }
>  object TestRun extends TestRun with LongKeyedMetaMapper[TestRun]
> with CRUDify[Long, TestRun] {
>
>
>
>
> I get an error that makes me think I'm coding in C++ with the boost
> library. Scala is inferring CType as Nothing, which is definitely not
> what I want.
>
> error: inferred type arguments
> [com.test_results.model.TestRun,Nothing,object
> com.test_results.model.TestSubject,object
> com.test_results.model.TestRun#testSubject] do not conform to method
> oneToOneJoin's type parameter bounds [PType <:
> net.liftweb.mapper.LongKeyedMapper[PType] with
> net.liftweb.mapper.IdPK,CType <: net.liftweb.mapper.LongKeyedMapper
> [CType] with net.liftweb.mapper.IdPK,CMetaType <: CType with
> net.liftweb.mapper.LongKeyedMetaMapper[CType],FKType <:
> net.liftweb.mapper.MappedLongForeignKey[PType,CType]]
>Util.oneToOneJoin(runs, TestSubject, (tr: TestRun) =>
> tr.testSubject)
>
> I cannot find any way to get the class of the TestSubject companion
> object, So I changed things slightly to create a MetaTestSubject and
> then tried to explicitly specify the type parameters to the
> oneToOneJoin function as shown below. MetaTestSubject is the supertype
> for the TestSubject companion object so that I can reference it's type
> explicitly.
>
>  Util.oneToOneJoin[TestRun,
>TestSubject,
>MetaTestSubject,
>(TestRun) => MappedLongForeignKey[TestRun,
> TestSubject]
>  ](runs, TestSubject, (tr: TestRun) => tr.testSubject)
>
>  where MetaTestSubject and TestSubject are now defined as
>class MetaTestSubject extends TestSubject with LongKeyedMetaMapper
> [TestSubject]
>object TestSubject extends MetaTestSubject {
>
>
> When I specify the types to the oneToOneJoin function explicitly,
> Scala then just plain tells me that the types don't match with this
> error.
>
>  error: type arguments
>
> [com.test_results.model.TestRun,com.test_results.model.TestSubject,com.test_results.model.MetaTestSubject,
> (com.test_results.model.TestRun) =>
> net.liftweb.mapper.MappedLongForeignKey
> [com.test_results.model.TestRun,com.test_results.model.TestSubject]]
> do not conform to method oneToOneJoin's type parameter bounds [PType
> <: net.liftweb.mapper.LongKeyedMapper[PType] with
> net.liftweb.mapper.IdPK,CType <: net.liftweb.mapper.LongKeyedMapper
> [CType] with net.liftweb.mapper.IdPK,CMetaType <: CType with
> net.liftweb.mapper.LongKeyedMetaMapper[CType],FKType <:
> net.liftweb.mapper.MappedLongForeignKey[PType,CType]]
>  Util.oneToOneJoin[TestRun,
>
> After a couple of hours of trying I am stuck at this point and all of
> the types look like they line up to me. TestRun is a LongKeyedMapper
> of the right type with IdPK, and so is TestSubject. MetaTestSubject
> inherits from TestSubject with LongKeyedMetaMapper[TestSubject]. The
> third value parameter is a function takes a type TestRun and returns a
> MappedLongForeignKey[TestRun, TestSubject].
>
> What am I doing wrong?


In the second one where you explicitly specified the types, you are doing
nothing wrong.

In the first case, because there were no parameters with the type CType, the
type inferencer couldn't figure out what CType was.  The type inferencer
only looks a certain number of levels for a type in order to avoid cyclical
type references and in order to save compilation speed.


> Is this a scala bug?


Yes.

I would suggest reporting it.

>
>
> - Sean Reque
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow m

[Lift] Re: help! create lift project with 1.1-snapshorts

2009-06-11 Thread jfyl...@gmail.com

thank you!!!

On 6月11日, 下午11时08分, Timothy Perrett  wrote:
> You might well find this wiki entry helpful:
>
> http://wiki.liftweb.net/index.php/Maven_Mini_Guide
>
> Cheers, Tim
>
> On Jun 11, 3:14 pm, Atsuhiko Yamanaka 
> wrote:
>
> > Hi,
>
> > On Thu, Jun 11, 2009 at 10:01 PM, jfyl...@gmail.com 
> > wrote:
>
> > > I will creat a lift project, the next is my command:
> > > mvn archetype:generate -U  -DremoteRepositories=http://scala-tools.org/
> > > repo-snapshots -DarchetypeGroupId=net.liftweb -
> > > DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.1-
> > > SNAPSHOT -DgroupId=com.test -DartifactId=mytest
>
> > How about 'archetype:create' instead of 'archetype:generate'?
>
> >  mvn archetype:create -U \
> > -DremoteRepositories=http://scala-tools.org/repo-snapshots\
> > -DarchetypeGroupId=net.liftweb \
> > -DarchetypeArtifactId=lift-archetype-basic \
> > -DarchetypeVersion=1.1-SNAPSHOT \
> > -DgroupId=com.test -DartifactId=mytest
>
> > 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: help! create lift project with 1.1-snapshorts

2009-06-11 Thread jfyl...@gmail.com

thanks Atsuhiko Yamanaka, i  will study all about scala lift maven
hardly!

On 6月11日, 下午10时14分, Atsuhiko Yamanaka 
wrote:
> Hi,
>
> On Thu, Jun 11, 2009 at 10:01 PM, jfyl...@gmail.com wrote:
>
> > I will creat a lift project, the next is my command:
> > mvn archetype:generate -U  -DremoteRepositories=http://scala-tools.org/
> > repo-snapshots -DarchetypeGroupId=net.liftweb -
> > DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.1-
> > SNAPSHOT -DgroupId=com.test -DartifactId=mytest
>
> How about 'archetype:create' instead of 'archetype:generate'?
>
>  mvn archetype:create -U \
> -DremoteRepositories=http://scala-tools.org/repo-snapshots\
> -DarchetypeGroupId=net.liftweb \
> -DarchetypeArtifactId=lift-archetype-basic \
> -DarchetypeVersion=1.1-SNAPSHOT \
> -DgroupId=com.test -DartifactId=mytest
>
> 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: help! create lift project with 1.1-snapshorts

2009-06-11 Thread Timothy Perrett

You might well find this wiki entry helpful:

http://wiki.liftweb.net/index.php/Maven_Mini_Guide

Cheers, Tim

On Jun 11, 3:14 pm, Atsuhiko Yamanaka 
wrote:
> Hi,
>
> On Thu, Jun 11, 2009 at 10:01 PM, jfyl...@gmail.com wrote:
>
> > I will creat a lift project, the next is my command:
> > mvn archetype:generate -U  -DremoteRepositories=http://scala-tools.org/
> > repo-snapshots -DarchetypeGroupId=net.liftweb -
> > DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.1-
> > SNAPSHOT -DgroupId=com.test -DartifactId=mytest
>
> How about 'archetype:create' instead of 'archetype:generate'?
>
>  mvn archetype:create -U \
>     -DremoteRepositories=http://scala-tools.org/repo-snapshots\
>     -DarchetypeGroupId=net.liftweb \
>     -DarchetypeArtifactId=lift-archetype-basic \
>     -DarchetypeVersion=1.1-SNAPSHOT \
>     -DgroupId=com.test -DartifactId=mytest
>
> 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: help! create lift project with 1.1-snapshorts

2009-06-11 Thread Atsuhiko Yamanaka

Hi,

On Thu, Jun 11, 2009 at 10:01 PM, jfyl...@gmail.com wrote:
>
> I will creat a lift project, the next is my command:
> mvn archetype:generate -U  -DremoteRepositories=http://scala-tools.org/
> repo-snapshots -DarchetypeGroupId=net.liftweb -
> DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.1-
> SNAPSHOT -DgroupId=com.test -DartifactId=mytest

How about 'archetype:create' instead of 'archetype:generate'?

 mvn archetype:create -U \
-DremoteRepositories=http://scala-tools.org/repo-snapshots \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic \
-DarchetypeVersion=1.1-SNAPSHOT \
-DgroupId=com.test -DartifactId=mytest


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: help with JPA annotation?

2009-05-26 Thread Meredith Gregory
John,

Thanks for your suggestions. It appears that there are two problems that
come together, here.

   - The custom subclass is actually a container for an abstract super class
   of the possible concrete content classes. Only the concrete subclasses have
   been given JPA annotations. In full generality, i've got to avail myself of
   some single-table-inheritance (STI) strategy to push this through.
   - i don't really have full control of the container class used -- unless
   i write my own trampoline. The JPA annotated class is generated from a class
   that is generated from a BNF Converter spec. They chose to implement lists
   in this way.

It's easy to generate a trampoline -- which i can use to test the first
level of the problem. The STI is a bit more involved.

Best wishes,

--greg

On Tue, May 26, 2009 at 9:21 AM, John D. Heintz  wrote:

>
> I think I know, the custom subclass is breaking things.
>
> From
> http://docs.jboss.org/hibernate/stable/annotations/reference/en/html/entity.html#entity-mapping-association-collections
> "You can map Collection, List (ie ordered lists, not indexed lists),
> Map and Set"
>
> These are the interfaces, not any concrete class. The reason is that
> at runtime Hibernate will replace the property with a Hibernate
> subclass of Collection or List that has the magic lazy-loading and
> query caching details in it.
>
> I think a viable strategy for you would be to:
> * expose a List instead of a LinkedList subclass
>
> That loses two of the features you wanted: linkedList and specialized type
> name.
>
> I think the LinkedList just isn't persistable, and the second could be
> re-obtained by providing a secondary method that wraps the primary
> collection list with a new one for typing purposes.
>
> Cheers,
> John
>
> ps - I prefer to annotate fields, not methods. It lets me alter the
> persistence and public interfaces separately.
>
> On Tue, May 26, 2009 at 7:59 AM, Meredith Gregory
>  wrote:
> > John,
> >
> > Thanks for your response. i included in my first email query on this
> topic
> > the complete impl of ListVariableExpr, but that was a lengthy message and
> > it's small enough to be missed, so here it is again.
> >
> > // container class generated to hold lists of variables
> > package com.biosimilarity.reflection.
> > model.rlambda.Absyn; // Java Package generated by the BNF Converter.
> >
> > public class ListVariableExpr extends java.util.LinkedList
> {
> > }
> > i also checked that LinkedList implements Collection. Then i checked
> > hibernate documentation -- which said that if you don't have a generic
> you
> > have to provide a targetEntity annotation. i've done everything "by the
> > book" with no joy.
> >
> > Best wishes,
> >
> > --greg
> >
> > On Mon, May 25, 2009 at 8:05 PM, John D. Heintz 
> wrote:
> >>
> >> Hello Greg,
> >>
> >> What is the type of ListVariableExpr? Does Hibernate recognize that as
> >> a java.util.collection?
> >>
> >> My guess is that you need to change that type to a List
> >> for Hibernate to do the "right thing".
> >>
> >> That's probably not something you want to do, the alternative would be
> >> to implement a UserType to customize the Hibernate mapping process. I
> >> don't actually know how that would work with a collection type, but I
> >> suspect some strange incantations would work.
> >>
> >> Hope this helps,
> >> John Heintz
> >>
> >> On Mon, May 25, 2009 at 5:42 PM, Meredith Gregory
> >>  wrote:
> >> > All,
> >> >
> >> > Below are the contents of three classfiles. The first and second
> >> > generated
> >> > by BNFC from the grammar here. The second is a subclass generated from
> >> > the
> >> > first to provide persistence to the abstract syntax. My procedure is
> >> > working
> >> > for everything but those classes that contain collections. The call to
> >> > hibernate via the maven-hibernate-plugin is generating the following
> >> > error.
> >> >
> >> > [INFO]
> >> >
> 
> >> > [ERROR] FATAL ERROR
> >> > [INFO]
> >> >
> 
> >> > [INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
> >> > collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
> >> >
> >> >
> com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
> >> > [INFO]
> >> >
> 
> >> > [INFO] Trace
> >> > javax.persistence.PersistenceException:
> >> > org.hibernate.AnnotationException:
> >> > Illegal attempt to map a non collection as a @OneToMany, @ManyToMany
> or
> >> > @CollectionOfElements:
> >> >
> >> >
> com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
> >> > at
> >> >
> >> >
> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
> >> > at
> >> >
> >> >
> org.codehaus.mojo.hibernat

[Lift] Re: help with JPA annotation?

2009-05-26 Thread John D. Heintz

I think I know, the custom subclass is breaking things.

>From 
>http://docs.jboss.org/hibernate/stable/annotations/reference/en/html/entity.html#entity-mapping-association-collections
"You can map Collection, List (ie ordered lists, not indexed lists),
Map and Set"

These are the interfaces, not any concrete class. The reason is that
at runtime Hibernate will replace the property with a Hibernate
subclass of Collection or List that has the magic lazy-loading and
query caching details in it.

I think a viable strategy for you would be to:
* expose a List instead of a LinkedList subclass

That loses two of the features you wanted: linkedList and specialized type name.

I think the LinkedList just isn't persistable, and the second could be
re-obtained by providing a secondary method that wraps the primary
collection list with a new one for typing purposes.

Cheers,
John

ps - I prefer to annotate fields, not methods. It lets me alter the
persistence and public interfaces separately.

On Tue, May 26, 2009 at 7:59 AM, Meredith Gregory
 wrote:
> John,
>
> Thanks for your response. i included in my first email query on this topic
> the complete impl of ListVariableExpr, but that was a lengthy message and
> it's small enough to be missed, so here it is again.
>
> // container class generated to hold lists of variables
> package com.biosimilarity.reflection.
> model.rlambda.Absyn; // Java Package generated by the BNF Converter.
>
> public class ListVariableExpr extends java.util.LinkedList {
> }
> i also checked that LinkedList implements Collection. Then i checked
> hibernate documentation -- which said that if you don't have a generic you
> have to provide a targetEntity annotation. i've done everything "by the
> book" with no joy.
>
> Best wishes,
>
> --greg
>
> On Mon, May 25, 2009 at 8:05 PM, John D. Heintz  wrote:
>>
>> Hello Greg,
>>
>> What is the type of ListVariableExpr? Does Hibernate recognize that as
>> a java.util.collection?
>>
>> My guess is that you need to change that type to a List
>> for Hibernate to do the "right thing".
>>
>> That's probably not something you want to do, the alternative would be
>> to implement a UserType to customize the Hibernate mapping process. I
>> don't actually know how that would work with a collection type, but I
>> suspect some strange incantations would work.
>>
>> Hope this helps,
>> John Heintz
>>
>> On Mon, May 25, 2009 at 5:42 PM, Meredith Gregory
>>  wrote:
>> > All,
>> >
>> > Below are the contents of three classfiles. The first and second
>> > generated
>> > by BNFC from the grammar here. The second is a subclass generated from
>> > the
>> > first to provide persistence to the abstract syntax. My procedure is
>> > working
>> > for everything but those classes that contain collections. The call to
>> > hibernate via the maven-hibernate-plugin is generating the following
>> > error.
>> >
>> > [INFO]
>> > 
>> > [ERROR] FATAL ERROR
>> > [INFO]
>> > 
>> > [INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
>> > collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
>> >
>> > com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
>> > [INFO]
>> > 
>> > [INFO] Trace
>> > javax.persistence.PersistenceException:
>> > org.hibernate.AnnotationException:
>> > Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
>> > @CollectionOfElements:
>> >
>> > com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
>> >     at
>> >
>> > org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
>> >     at
>> >
>> > org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)
>> > ...
>> >
>> > However, as the contents of the second class indicate, the member is
>> > clearly
>> > a collection. Is it that hibernate can't deal with subclasses of
>> > collections?
>> >
>> > Best wishes,
>> >
>> > --greg
>> >
>> >
>> > // class generated for abstractions
>> > package com.biosimilarity.reflection.model.rlambda.Absyn; // Java
>> > Package
>> > generated by the BNF Converter.
>> >
>> > public class Abstraction extends Expression {
>> >   public final ListVariableExpr listvariableexpr_;
>> >   public final Expression expression_;
>> >
>> >   public Abstraction(ListVariableExpr p1, Expression p2) {
>> > listvariableexpr_
>> > = p1; expression_ = p2; }
>> >
>> >   public  R
>> >
>> > accept(com.biosimilarity.reflection.model.rlambda.Absyn.Expression.Visitor
>> > v, A arg) { return v.visit(this, arg); }
>> >
>> >   public boolean equals(Object o) {
>> >     if (this == o) return true;
>> >     if (o instanceof
>> > com.biosimilarity.reflection.model.rlambda.Absy

[Lift] Re: help with JPA annotation?

2009-05-26 Thread Meredith Gregory
John,

Thanks for your response. i included in my first email query on this topic
the complete impl of ListVariableExpr, but that was a lengthy message and
it's small enough to be missed, so here it is again.

// container class generated to hold lists of variables
package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
generated by the BNF Converter.

public class ListVariableExpr extends java.util.LinkedList {
}

i also checked that LinkedList implements Collection. Then i checked
hibernate documentation -- which said that if you don't have a generic you
have to provide a targetEntity annotation. i've done everything "by the
book" with no joy.

Best wishes,

--greg

On Mon, May 25, 2009 at 8:05 PM, John D. Heintz  wrote:

>
> Hello Greg,
>
> What is the type of ListVariableExpr? Does Hibernate recognize that as
> a java.util.collection?
>
> My guess is that you need to change that type to a List
> for Hibernate to do the "right thing".
>
> That's probably not something you want to do, the alternative would be
> to implement a UserType to customize the Hibernate mapping process. I
> don't actually know how that would work with a collection type, but I
> suspect some strange incantations would work.
>
> Hope this helps,
> John Heintz
>
> On Mon, May 25, 2009 at 5:42 PM, Meredith Gregory
>  wrote:
> > All,
> >
> > Below are the contents of three classfiles. The first and second
> generated
> > by BNFC from the grammar here. The second is a subclass generated from
> the
> > first to provide persistence to the abstract syntax. My procedure is
> working
> > for everything but those classes that contain collections. The call to
> > hibernate via the maven-hibernate-plugin is generating the following
> error.
> >
> > [INFO]
> > 
> > [ERROR] FATAL ERROR
> > [INFO]
> > 
> > [INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
> > collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
> >
> com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
> > [INFO]
> > 
> > [INFO] Trace
> > javax.persistence.PersistenceException:
> org.hibernate.AnnotationException:
> > Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
> > @CollectionOfElements:
> >
> com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
> > at
> > org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
> > at
> >
> org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)
> > ...
> >
> > However, as the contents of the second class indicate, the member is
> clearly
> > a collection. Is it that hibernate can't deal with subclasses of
> > collections?
> >
> > Best wishes,
> >
> > --greg
> >
> >
> > // class generated for abstractions
> > package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
> > generated by the BNF Converter.
> >
> > public class Abstraction extends Expression {
> >   public final ListVariableExpr listvariableexpr_;
> >   public final Expression expression_;
> >
> >   public Abstraction(ListVariableExpr p1, Expression p2) {
> listvariableexpr_
> > = p1; expression_ = p2; }
> >
> >   public  R
> >
> accept(com.biosimilarity.reflection.model.rlambda.Absyn.Expression.Visitor
> > v, A arg) { return v.visit(this, arg); }
> >
> >   public boolean equals(Object o) {
> > if (this == o) return true;
> > if (o instanceof
> > com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction) {
> >   com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction x =
> > (com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction)o;
> >   return this.listvariableexpr_.equals(x.listvariableexpr_) &&
> > this.expression_.equals(x.expression_);
> > }
> > return false;
> >   }
> >
> >   public int hashCode() {
> > return
> > 37*(this.listvariableexpr_.hashCode())+this.expression_.hashCode();
> >   }
> >
> >
> > }
> >
> > // container class generated to hold lists of variables
> > package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
> > generated by the BNF Converter.
> >
> > public class ListVariableExpr extends java.util.LinkedList
> {
> > }
> >
> >
> > // Generated by stockholm to add persistence to abstraction class
> >
> > package com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql;
> >
> > import javax.persistence.CascadeType;
> > import javax.persistence.Column;
> > import javax.persistence.Entity;
> > import javax.persistence.FetchType;
> > import javax.persistence.Id;
> > import javax.persistence.OneToMany;
> > import javax.persistence.Table;
> > import javax.persistence.UniqueConstraint;
> > import java.util.D

[Lift] Re: help with JPA annotation?

2009-05-25 Thread John D. Heintz

Hello Greg,

What is the type of ListVariableExpr? Does Hibernate recognize that as
a java.util.collection?

My guess is that you need to change that type to a List
for Hibernate to do the "right thing".

That's probably not something you want to do, the alternative would be
to implement a UserType to customize the Hibernate mapping process. I
don't actually know how that would work with a collection type, but I
suspect some strange incantations would work.

Hope this helps,
John Heintz

On Mon, May 25, 2009 at 5:42 PM, Meredith Gregory
 wrote:
> All,
>
> Below are the contents of three classfiles. The first and second generated
> by BNFC from the grammar here. The second is a subclass generated from the
> first to provide persistence to the abstract syntax. My procedure is working
> for everything but those classes that contain collections. The call to
> hibernate via the maven-hibernate-plugin is generating the following error.
>
> [INFO]
> 
> [ERROR] FATAL ERROR
> [INFO]
> 
> [INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
> collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
> com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
> [INFO]
> 
> [INFO] Trace
> javax.persistence.PersistenceException: org.hibernate.AnnotationException:
> Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
> @CollectionOfElements:
> com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
>     at
> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
>     at
> org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)
> ...
>
> However, as the contents of the second class indicate, the member is clearly
> a collection. Is it that hibernate can't deal with subclasses of
> collections?
>
> Best wishes,
>
> --greg
>
>
> // class generated for abstractions
> package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
> generated by the BNF Converter.
>
> public class Abstraction extends Expression {
>   public final ListVariableExpr listvariableexpr_;
>   public final Expression expression_;
>
>   public Abstraction(ListVariableExpr p1, Expression p2) { listvariableexpr_
> = p1; expression_ = p2; }
>
>   public  R
> accept(com.biosimilarity.reflection.model.rlambda.Absyn.Expression.Visitor
> v, A arg) { return v.visit(this, arg); }
>
>   public boolean equals(Object o) {
>     if (this == o) return true;
>     if (o instanceof
> com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction) {
>   com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction x =
> (com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction)o;
>   return this.listvariableexpr_.equals(x.listvariableexpr_) &&
> this.expression_.equals(x.expression_);
>     }
>     return false;
>   }
>
>   public int hashCode() {
>     return
> 37*(this.listvariableexpr_.hashCode())+this.expression_.hashCode();
>   }
>
>
> }
>
> // container class generated to hold lists of variables
> package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
> generated by the BNF Converter.
>
> public class ListVariableExpr extends java.util.LinkedList {
> }
>
>
> // Generated by stockholm to add persistence to abstraction class
>
> package com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql;
>
> import javax.persistence.CascadeType;
> import javax.persistence.Column;
> import javax.persistence.Entity;
> import javax.persistence.FetchType;
> import javax.persistence.Id;
> import javax.persistence.OneToMany;
> import javax.persistence.Table;
> import javax.persistence.UniqueConstraint;
> import java.util.Date;
> import java.util.HashSet;
> import java.util.Set;
> import java.util.Iterator;
> import java.net.URI;
> import com.biosimilarity.reflection.model.rlambda.Absyn.*;
> import com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.*;
>
> @Entity
> @Table(name = "Abstraction_table", catalog = "rlambda_production",
> uniqueConstraints = { @UniqueConstraint(columnNames = "uuid") })
> public class AbstractionResource extends Abstraction {
>
>     private String uuid;
>
>     private String id;
>
>     public AbstractionResource(ListVariableExpr listvariableexpr_,
> Expression expression_) {
>     super(listvariableexpr_, expression_);
>     }
>
>     @Id
>     @Column(name = "uuid", unique = true, nullable = false, insertable =
> true, updatable = true)
>     public String getUuid() {
>     return this.uuid;
>     }
>
>     public void setUuid(String id) {
>     this.uuid = id;
>     }
>
>     @Id
>     @Column(name = "id", unique = true, nullable = false, inse

[Lift] Re: help with JPA annotation?

2009-05-25 Thread Meredith Gregory
All,

Based on some web documentation i found for the OneToMany annotation, i
modified my compiler's output to generate

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy =
"abstractionResource", targetEntity = VariableExpr.class)
public ListVariableExpr getListvariableexpr_() {
return this.listvariableexpr_;
}

instead of

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy =
"AbstractionResource")
public ListVariableExpr getListvariableexpr_() {
return this.listvariableexpr_;
}

and i still get the same error

16:44:08,780  INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity
com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource
on table Abstraction_table
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
[INFO]

[INFO] Trace
javax.persistence.PersistenceException: org.hibernate.AnnotationException:
Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
@CollectionOfElements:
com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
at
org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)

...

Best wishes,

--greg

On Mon, May 25, 2009 at 3:42 PM, Meredith Gregory
wrote:

> All,
>
> Below are the contents of three classfiles. The first and second generated
> by BNFC from the grammar 
> here.
> The second is a subclass generated from the first to provide persistence to
> the abstract syntax. My procedure is working for everything but those
> classes that contain collections. The call to hibernate via the
> maven-hibernate-plugin is generating the following error.
>
> [INFO]
> 
> [ERROR] FATAL ERROR
> [INFO]
> 
> [INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
> collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
> com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
> [INFO]
> 
> [INFO] Trace
> javax.persistence.PersistenceException: org.hibernate.AnnotationException:
> Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
> @CollectionOfElements:
> com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
> at
> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
> at
> org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)
> ...
>
> However, as the contents of the second class indicate, the member is
> clearly a collection. Is it that hibernate can't deal with subclasses of
> collections?
>
> Best wishes,
>
> --greg
>
>
> // class generated for abstractions
> package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
> generated by the BNF Converter.
>
> public class Abstraction extends Expression {
>   public final ListVariableExpr listvariableexpr_;
>   public final Expression expression_;
>
>   public Abstraction(ListVariableExpr p1, Expression p2) {
> listvariableexpr_ = p1; expression_ = p2; }
>
>   public  R
> accept(com.biosimilarity.reflection.model.rlambda.Absyn.Expression.Visitor
> v, A arg) { return v.visit(this, arg); }
>
>   public boolean equals(Object o) {
> if (this == o) return true;
> if (o instanceof
> com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction) {
>   com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction x =
> (com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction)o;
>   return this.listvariableexpr_.equals(x.listvariableexpr_) &&
> this.expression_.equals(x.expression_);
> }
> return false;
>   }
>
>   public int hashCode() {
> return
> 37*(this.listvariableexpr_.hashCode())+this.expression_.hashCode();
>   }
>
>
> }
>
> // container class generated to hold lists of variables
> package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
> generated by the BNF Converter.
>
> public class ListVariableExpr extends java.util.LinkedList {
> }
>
>
> // Generated by stockholm 

[Lift] Re: Help with PocketChange project

2009-04-12 Thread TylerWeir

It's probably better to send PocketChange questions to the Lift Book
list, which is here
http://groups.google.com/group/the-lift-book/

And there is a thread regarding your issue here:
http://groups.google.com/group/the-lift-book/browse_frm/thread/7791a6f79654d568

If you open Boot.scala, you'll see that we're using Postgres as a
database.  You'll need to change that to suit your set-up.

On Apr 12, 5:21 pm, Xavi Ramirez  wrote:
> Hello,
>
> I've started reading through Exploring Lift and I'm having trouble
> with running the PocketChange demo.  I've ran the following commands:
>
> git clone git://github.com/tjweir/pocketchangeapp.git
> cd to PocketChange directory
> mvn install
> mvn jetty:run -U
>
> When the jetty server starts, the following two errors appear:
>
> 2009-04-12 17:05:47.728::INFO:  No Transaction manager found - if your
> webapp requires one, please configure one.
> org.postgresql.util.PSQLException: Connection refused. Check that the
> hostname and port are correct and that the postmaster is accepting
> TCP/IP connections.
>         at 
> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122)
>         at 
> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
>         at 
> org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:116)
>         at 
> org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:30)
>         ...
>
> ERROR - Failed to Boot
> java.lang.NullPointerException: Looking for Connection Identifier
> ConnectionIdentifier(lift) but failed to find either a JNDI data
> source with the name lift or a lift connection manager with the
> correct name
>         at 
> net.liftweb.mapper.DB$$anonfun$3$$anonfun$apply$7.apply(DB.scala:95)
>         at 
> net.liftweb.mapper.DB$$anonfun$3$$anonfun$apply$7.apply(DB.scala:95)
>         at net.liftweb.util.EmptyBox.openOr(Box.scala:372)
>         at net.liftweb.mapper.DB$$anonfun$3.apply(DB.scala:95)
>         ...
>
> Is there a step I'm missing?
>
> Thanks,
> Xavi
--~--~-~--~~~---~--~~
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: Help on getting Eclipse/Maven/Lift working

2009-02-03 Thread DavidV

Hi Thomas,
I've been having the same troubles and found that these instructions
helped me a bit:

http://liftweb.net/index.php/Using_eclipse_hotdeploy

if you left-click on the RunWebApp application and go to "Debug As"
and don't see an "Open Debug Dialogue" option, just try clicking on
"Scala Application"...that worked for me.

Good luck!
-David

On Feb 2, 2:20 pm, Thomas Sant Ana  wrote:
> I followed the tutorial here on this page:
>
> http://scala-blogs.org/2007/12/dynamic-web-applications-with-lift-and...
>
> And was pleased to see the application come out so quickly. However I have a
> question. As I save the file on Eclipse they don't get picked up by Jetty. I
> need to do a mvn install on the pom.xml of the eclipse project.  And
> clearing the project on eclipse broke mvn install, until I did a mvn clean
> then a mvn install.
>
> The tutorial references to "incremental compiling". I've been working with
> Scala  on Eclipse and got around most troubles myself. But the
> Eclipse+Maven+Jetty+Lift is confusing for me. I have a set of questions:
>
> a) How to get code compile incrementally on eclipse, picked up by jetty?
>
> b) How do I debug the application from eclipse?
>
> c) Is there a way to have it all running under eclipse?
>
> I know these question may seem dumb, but I'm not finding good information on
> google. Is there a "Developing for Lift using Eclipse for Dummies" arround?
> The best I found what this tutorial.
>
> Thomas

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