[Lift] Re: [Lift committers] Lots to do by end of day on Sunday **Important for Committers**

2010-02-27 Thread Naftoli Gugenheim
Would anyone be able to change my open tickets to after M3? I don't think I'l 
have a chance to deal with them before code slush. I'm not sure but I think 
they're 257, 258, 370, and 371.
Thanks!

-
David Pollak wrote:

Folks,

Code slush for 2.0-M3 is Sunday at midnight.  We've done a lot over the last
3 weeks, but we've still got a lot more to do.  See
https://liftweb.assembla.com/spaces/liftweb/milestones/163151-lift-2-0-m3

If you've got open tickets, please make sure they get code checked in or
that you move them to M4 (except for tickets 238 and 322 which I would
really, really like to see in M3).

If you've got code on the review board and you don't have enough reviews,
please ping the committers list with the reviews.

Please also spend an hour or two over the weekend reviewing other code.

If you've gotten a "Ship It", please roll it into master ASAP.

Thanks,

David

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

-- 
You received this message because you are subscribed to the Google Groups 
"Lift-committers" group.
To post to this group, send email to lift-committ...@googlegroups.com.
To unsubscribe from this group, send email to 
lift-committers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/lift-committers?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: [lift] scalajpa for 2.8

2010-02-27 Thread sjcarroll6

I was able to locate the 1.2 snapshot. From this I was able to find out that
this was initial port for 2.8. I'm trying to read Proj JPA and converting
the java code to scala. Since  I don't know much about scala or JPA this is
proving to be a challenge. If anyone could point me to a simple LocalEMF
CRUD example that would be great. Also, if anyone could indicate if scalajpa
1.2 has any known issues with JPA 2.0 eclipselink that would be helpful.

Thank you


sjcarroll6 wrote:
> 
> Are there any known issues with using scalajpa with 2.8? I read one post
> which indicated scalajpa will need to be updated for 2.8 but it wasn't
> clear if the existing version was still usable.
> 
> Thanks,
> 

-- 
View this message in context: 
http://old.nabble.com/scalajpa-for-2.8-tp27731695p27732946.html
Sent from the liftweb mailing list archive at Nabble.com.

-- 
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] How do I add sitemap.xml and robots.txt

2010-02-27 Thread Bob Folkerts
I'm trying to add robots.txt and a sitemap.xml to a web site.  My
Boot.scala has a snippet that looks like

val entries =   Menu(Loc("Home", List("index"), "Home")) ::
galleryMenu :: servingYouMenu ::
socialSitesMenu :: aboutUsMenu ::
Menu(Loc("ContactUs", List("ContactUs"), "Contact
Us")) ::
Menu(Loc("robots", List("robots.txt"),
"robots.txt", Hidden)) ::
Menu(Loc("sitemap", List("sitemap.xml"),
"sitemap.xml", Hidden)) ::Nil


The robots.txt file shows up right away, but I get a 404 when I try to
access /sitemap.xml .  I have a static sitemap.xml that I want to
include.  I tried this as a static xml file in the webapp directory.
I also tried it without the explicit '.xml', but I had the same
results.  I tried to make it look more like my html, so I added a
sitemap-tempate.xml in templates-hidden and had the sitemap.xml
reference that.

Eventually, I would like to generate the sitemap.xml from the SiteMap
assuming that the user has not logged into the application.  I would
also assume that for most users, a default robots.txt would be easy to
generate.  This seems like something of general utility that would be
a good chance to learn more about Lift.

Can anyone explain how to display the simple, static sitemap.xml.  I'm
sure this is a newbie mistake, but I'm not seeing it on my own.

-- 
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] [lift] scalajpa for 2.8

2010-02-27 Thread sjcarroll6

Are there any known issues with using scalajpa with 2.8? I read one post
which indicated scalajpa will need to be updated for 2.8 but it wasn't clear
if the existing version was still usable.

Thanks,
-- 
View this message in context: 
http://old.nabble.com/scalajpa-for-2.8-tp27731695p27731695.html
Sent from the liftweb mailing list archive at Nabble.com.

-- 
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: How to execute JsCmd after submit

2010-02-27 Thread sdillard
ok - thanks -- that makes sense and works.

On Feb 26, 2:35 pm, Marius  wrote:
> Well it looks like you are submitting a non ajax form. You can easily
> use ajax forms.
>
> something like:
>
>   def calcForm(xhtml:NodeSeq):NodeSeq = {
>     SHtml.ajaxForm(Helpers.bind("f", xhtml,
>       "age" -> SHtml.text(ageVar.is.toString, v => ageVar(v.toInt)),
>       "male" -> SHtml.text(maleVar.is.toString, v =>
> maleVar(v.toBoolean)),
>       "submit" -> SHtml.ajaxSubmit("Calculate", () => {
>
>        // return your JSCmd here
>      }),
>       "le" -> le.toString
>     ))
>
> On 26 feb., 18:58, sdillard  wrote:
>
> > I am probably confused on what exactly is going on in the request /
> > response cycle here, but I am trying to show a table cell after a
> > calculation is performed, and I can't seem to get the js to run.  The
> > JS is being called in the showResults method that is bound to the
> > submit action.  I am guessing that the submit action is reloading the
> > page, so there is no opportunity to run the js.  Any suggestions on
> > how I should be doing this instead?  I am learning lift, and I am
> > working on an app that needs to be completely stateless (no db
> > backend, no cookies, no session).
>
> > I have the following for my page:
>
> > 
> >   
> >     
> >       
> >         
> >                 
> >                                     Age:  > type="text"/>
> >                                     Male:  > type="text"/>
> >                                      > value="calculate"/>
> >                             
> >         
> >         
> >           
> >           Life Expectancy: 50
> >           
> >         
> >       
> >     
> >   
> > 
>
> > Then in my snippet code I have the following:
> > class Mortality {
> >   object ageVar extends RequestVar[Int](S.param("age").map(_.toInt)
> > openOr 0)
> >   object maleVar extends RequestVar[Boolean]
> > (S.param("male").map(_.toBoolean) openOr false)
> >   var le = "0"
> >   def calculateLifeExp = {
> >     val calcLE = Annuity2000.lifeExpectancy(ageVar.is, maleVar.is)
> >     le = String.format("%.2f",double2Double(calcLE))
> >   }
> >   def doCalculate(xhtml:NodeSeq):NodeSeq = {
> >     calculateLifeExp
> >     Helpers.bind("r", xhtml,
> >       "le" -> le.toString
> >     )
> >   }
> >   def showResults():JsCmd = {
> >     JsCmds.Run("$('#mortalityResult').show();alert('I ran')")
> >   }
> >   def calcForm(xhtml:NodeSeq):NodeSeq = {
> >     Helpers.bind("f", xhtml,
> >       "age" -> SHtml.text(ageVar.is.toString, v => ageVar(v.toInt)),
> >       "male" -> SHtml.text(maleVar.is.toString, v =>
> > maleVar(v.toBoolean)),
> >       "submit" -> SHtml.submit("Calculate", showResults),
> >       "le" -> le.toString
> >     )
> >   }
>
> > }
>
>

-- 
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: Using existing Javascript

2010-02-27 Thread Richard
Rick

Thanks so much for the pointers and the darwin page. What an awesome
community to have such friendly and forthcoming advice. I hope that I
can contribute ahead.

Thanks again - Richard

On Feb 25, 4:39 pm, Rick R  wrote:
> On Thu, Feb 25, 2010 at 12:40 PM, Richard  
> wrote:
> > I have pages that I've created with standard HTML forms and javascript
> > validation. What is the fastest or best way to use them in my Lift
> > app? Do I have to completely rewrite in Lift snippets using JsCmds in
> > order to tie into the already named fields and form, or is there
> > something I'm missing?
>
> You can retrieve values from legacy forms using the S.param function.
> In order to ensure that the appropriate session data is transmitted, I
> would convert the key bits of your legacy HTML into templates.
>
> IMO, you might be better off just converting the rest of the way to
> Lift and use the bind function to tie your form values to lift
> variables, you also gain security from replay and xss attacks, because
> the field names are randomized.
>
> You can still use your custom validators, you will just have to
> specify that the jsCmds call your validators.
> (It is easy to call legacy functions by name via lift js, it's just
> rather difficult to do the opposite, because the lift generated
> function names are random strings)
>
> Seehttp://wiki.liftweb.net/index.php/Hello_Darwin#add_formfor a
> brief comparison between the two options.
>
> Hope that helps.

-- 
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] Eearly functions not working in 280_port_refresh

2010-02-27 Thread David Pollak
On Sat, Feb 27, 2010 at 8:32 AM, Michel wrote:

> Hi!
>
> I compiles Lift myself using the branch "280_port_refresh". I
> registered a function to be called early in the request cycle to set
> the web servers character encoding:
>
> override def boot {
>  def makeUtf8(r: HTTPRequest) {
>//will never be called!
>r.setCharacterEncoding("UTF-8")
>  }
>
>  LiftRules.early.append(makeUtf8)
>  ...
> }
>
> The makeUtf8 function is never called although it is correctly
> appended to the early list (I checked that using breakpoints in
> Eclipse. I double checked by temporarily throwing dummy
> RuntimeExceptions).
>
> Is this a bug or am I doing something wrong?
>

Sounds like a bug.  Please open a ticket at
https://liftweb.assembla.com/spaces/liftweb/tickets


>
> Thanks,
> Michel
>
> --
> 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, 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 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] Cleanups in lift-record **possible breaking changes**

2010-02-27 Thread Ross Mellgren
Hey all,

So as a result of an infelicity in the way records are initialized that tripped 
up Tim a week or two ago, I'm planning on doing some cleanup to lift-record. It 
is a breaking change, and it was noted that it'd be good to get opinions on 
this, so here we are!

The original problem was that if you used "new MyRecord" then you'd get a 
record that was basically functional but some of the extended metadata (notably 
field.name) would not be initialized correctly. This is because the correct way 
to create a record was MyRecordMeta.createRecord.

I fixed it so that new MyRecord is equivalent to MyRecordMeta.createRecord, but 
Marius pointed out there was more cleaning to do.

Here are the changes:
 - I made the createRecord method on MetaRecord abstract, so that MyRecordMeta 
must now implement it. If you are porting over old code, then just do:
 def createRecord = new MyRecord
   This change is so that record creation must be explicitly specified in case 
it is different from new MyRecord (the default implementation)

 - MetaRecord.fromJSON(inst, json) has been renamed to setFieldsFromJSON(inst, 
json)
 - a new method MetaRecord.setFieldsFromReq(inst, req) has been created to 
parallel the new name of fromJSON
 - MetaRecord.createRecord(json) has been renamed to fromJSON(json)
 - Record.fromJSON has been renamed to setFieldsFromJSON
 - Record.setFieldsFromReq has been added -- they just call the meta methods of 
the same name.

These changes at the end make it so that fromSomething(something) are 
consistently factory methods that create records from some source (JSON or 
Req), and that setFieldsFromSomething(inst, something) is consistently there 
for setting the fields from the source.

Let me know what you think.

-Ross


-- 
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] Eearly functions not working in 280_port_refresh

2010-02-27 Thread Michel
Hi!

I compiles Lift myself using the branch "280_port_refresh". I
registered a function to be called early in the request cycle to set
the web servers character encoding:

override def boot {
  def makeUtf8(r: HTTPRequest) {
//will never be called!
r.setCharacterEncoding("UTF-8")
  }

  LiftRules.early.append(makeUtf8)
  ...
}

The makeUtf8 function is never called although it is correctly
appended to the early list (I checked that using breakpoints in
Eclipse. I double checked by temporarily throwing dummy
RuntimeExceptions).

Is this a bug or am I doing something wrong?

Thanks,
Michel

-- 
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: serving images from a directory

2010-02-27 Thread Jack Widman
Thanks Marius.

On Sat, Feb 27, 2010 at 4:07 AM, Marius  wrote:

> If you want Lift to serve images you should put them in /resources/
> toserve folder and reference them as /classpath/{image file}
>
> If you want to put images say in /img folder at the same level with /
> WEB-INF for example, you just reference tham /img/{image file} ...
> these will not be served by Lift but by web container.
>
> There is no need for SiteMap when serving other resources.
>
>
>
> On Feb 27, 10:53 am, jack  wrote:
> > I would like to access an image on the client via a URL. How do I
> > generate that URL. Currently, I'm getting the error
> >
> > The requested page was not defined in your SiteMap, so access was
> > blocked.
> >
> > I understand what this error means for html pages. How does it work
> > for images?
> >
> > Thanks.
>
> --
> 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.



Re: [Lift] Happy 3rd Anniversary to Lift

2010-02-27 Thread Heiko Seeberger
I am proud to be on board and looking forward to the next three years

Heiko

On Saturday, February 27, 2010, David Pollak
 wrote:
> Folks,
>
> Today is Lift's 3rd Anniversary/Birthday!
>
> Before I go offline for the weekend, I wanted to give a hearty thanks for the 
> Scala team, the Scala community, the Lift committers, and most importantly 
> the Lift community members new and old for making Lift possible, fun, and 
> challenging.
>
> Thank you all very, very much for everything each and everyone one of you has 
> done.
>
> David
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> 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 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.
>

-- 
Heiko Seeberger

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

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to 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] Happy 3rd Anniversary to Lift

2010-02-27 Thread Tim Perrett

Wow, three years already! Man, what an adventure its been!!

David I think you also need a big "thank you" from both the rest of  
the team and the community - thanks for fostering a community where  
newbies are welcome and production support is a primary concern.


Its been a hell of a ride so far - cant wait to see what 2010 and 2011  
bring for us.


Cheers, Tim

On 27 Feb 2010, at 01:26, David Pollak wrote:


Folks,

Today is Lift's 3rd Anniversary/Birthday!

Before I go offline for the weekend, I wanted to give a hearty  
thanks for the Scala team, the Scala community, the Lift committers,  
and most importantly the Lift community members new and old for  
making Lift possible, fun, and challenging.


Thank you all very, very much for everything each and everyone one  
of you has done.


David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
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 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: serving images from a directory

2010-02-27 Thread Marius
If you want Lift to serve images you should put them in /resources/
toserve folder and reference them as /classpath/{image file}

If you want to put images say in /img folder at the same level with /
WEB-INF for example, you just reference tham /img/{image file} ...
these will not be served by Lift but by web container.

There is no need for SiteMap when serving other resources.



On Feb 27, 10:53 am, jack  wrote:
> I would like to access an image on the client via a URL. How do I
> generate that URL. Currently, I'm getting the error
>
> The requested page was not defined in your SiteMap, so access was
> blocked.
>
> I understand what this error means for html pages. How does it work
> for images?
>
> Thanks.

-- 
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] serving images from a directory

2010-02-27 Thread jack
I would like to access an image on the client via a URL. How do I
generate that URL. Currently, I'm getting the error

The requested page was not defined in your SiteMap, so access was
blocked.

I understand what this error means for html pages. How does it work
for images?

Thanks.

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