[Lift] Re: Can't find Javascript files using LiftRules.resourceServerPath

2009-04-08 Thread marius d.

In your boot try this:

ResourceServer.allow {
  case "jquery-tabs.js" :: Nil => true
  case "jquery-ui-1.7.1.custom.min.js" :: Nil => true

}

On Apr 9, 12:17 am, glenn  wrote:
> What am I doing wrong?
>
> I'm trying to implement tabs using the jquery-tabs.js (the JqueryTabs
> Plugin), but when I run the application, I get the following
> javascript error:
>
>    jQuery.Tabs is undefined  http://localhost:8080/Line 34
>
> I'm using the following snippet to create the jquery script
> initializing the tabs.
>
> class HomePage {
> def tabRender(selector: String, height: String, width: String, tabs:
> List[String], ids: List[String]) : NodeSeq = {
>
>     val onLoad = Unparsed("""
>                  $(document).ready(function() {
>                     jQuery.Tabs.initialize('"""+selector+"""', '"""+height
> +"""', '"""+width+"""',
>                        """ + JsArray(tabs.map(Str(_)):_*) + """, """ + JsArray
> (ids.map(Str(_)):_*) + """ );
>                   });
>                  """)
>
>     
>         LiftRules.resourceServerPath + "/jquery-tabs.js"}>
>        

[Lift] Rails -> Lift

2009-04-08 Thread Charles F. Munat

I'm writing a proposal for a presentation on moving from Rails to Lift.

A couple of stumbling blocks that I've mentioned are:

1. Understanding and taking advantage of immutable constructs.

2. Getting the hang of the view-centric approach to MVC.

Before I go much further, I'd like to poll this list for things that 
others think should be included. For former or current Rails developers 
like myself, What sorts of things gave you the most trouble when moving 
to Lift (or trying it out)? What would you like to have had someone 
explain to you to make the transition easier?

Thanks for any help!

Chas.

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



[Lift] Sorry but a newbie Mapper question

2009-04-08 Thread sailormoo...@gmail.com

Hi :

  I would like to know is there an MappedNumber to reflect to database
type NUMBER(2) that I can define the number of digits, like 2 for
example?

  And while there is an example about the MappedDecimal in the lift
book, I cannot find the class in official API??
  Thanks..

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



[Lift] Re: Snippets; having trouble with a simple example

2009-04-08 Thread Douglas F Shearer

I've found the solution to this. It seems that for some reason I
needed to provide the return type on the posts method, as so:

def posts(html: NodeSeq): NodeSeq = {
...

Odd it should fail in such a manner without it, I would expect the
return type to be inferred by the compiler, or an error given.

Thanks.

On Apr 8, 9:10 pm, Douglas F Shearer  wrote:
> Hi there.
>
> I'm having issues with a simple snippets example.
>
> The error, view and template can be seen here:http://gist.github.com/91971
>
> I'm sure it's a trivial issue, my code seems identical to the example  
> given in the Getting Started PDF.
>
> Help is much appreciated.
>
> Thanks.
>
> Douglas F Shearer
> douga...@gmail.comhttp://douglasfshearer.com

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



[Lift] Re: Snippets; having trouble with a simple example

2009-04-08 Thread Timothy Perrett

Hi,

What happens when you do a clean build? Do you still get the error?

Are you getting any snippet failure errors in the console when jetty
is running?

Thanks, Tim

On Apr 8, 9:10 pm, Douglas F Shearer  wrote:
> Hi there.
>
> I'm having issues with a simple snippets example.
>
> The error, view and template can be seen here:http://gist.github.com/91971
>
> I'm sure it's a trivial issue, my code seems identical to the example  
> given in the Getting Started PDF.
>
> Help is much appreciated.
>
> Thanks.
>
> Douglas F Shearer
> douga...@gmail.comhttp://douglasfshearer.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: How to use the new Record framework and Jackrabbit

2009-04-08 Thread Timothy Perrett


Glenn, my understanding is that the OSGI stuff is *extremely* new... Check
back on the recent conversations about it on list and that might answer some
of your questions :-)

Josh might also chime in with an appropriate answer as I think he's been
working on the OSGI stuff.

Cheers, Tim

On 08/04/2009 22:27, "glenn"  wrote:

> 
> Has anyone tried to use the Scala OSGI bundle, say in Sling, to
> persist data to Jackrabbit? Any attempt at an implementation, at this
> stage, would be welcome.
> 
> Glenn Silverman
> 
> > 
> 



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



[Lift] How to use the new Record framework and Jackrabbit

2009-04-08 Thread glenn

Has anyone tried to use the Scala OSGI bundle, say in Sling, to
persist data to Jackrabbit? Any attempt at an implementation, at this
stage, would be welcome.

Glenn Silverman

--~--~-~--~~~---~--~~
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] Can't find Javascript files using LiftRules.resourceServerPath

2009-04-08 Thread glenn

What am I doing wrong?

I'm trying to implement tabs using the jquery-tabs.js (the JqueryTabs
Plugin), but when I run the application, I get the following
javascript error:

   jQuery.Tabs is undefined  http://localhost:8080/ Line 34

I'm using the following snippet to create the jquery script
initializing the tabs.

class HomePage {
def tabRender(selector: String, height: String, width: String, tabs:
List[String], ids: List[String]) : NodeSeq = {

val onLoad = Unparsed("""
 $(document).ready(function() {
jQuery.Tabs.initialize('"""+selector+"""', '"""+height
+"""', '"""+width+"""',
   """ + JsArray(tabs.map(Str(_)):_*) + """, """ + JsArray
(ids.map(Str(_)):_*) + """ );
  });
 """)



   
   
   {onLoad}
 
  }

  def renderTabs(xhtml: NodeSeq): NodeSeq = {
 val ids = List("Page1", "Page2", "Page3")
 val tabs = List("Tab1","Tab2", "Tab3")

  tabRender("MyTabbedView","300px", "150px", tabs, ids )
  }
}

My index.html is the following:


   
   
   Page 1Description of jQuery Tabs plugin
   Page 2How to use this plugin
   Page 3Download plugin


I put the jquery-tabs.js file in src/main/resources/toserve.

The returned source at http://localhost:8080 contains the following
html:


[Lift] Snippets; having trouble with a simple example

2009-04-08 Thread Douglas F Shearer

Hi there.

I'm having issues with a simple snippets example.

The error, view and template can be seen here: http://gist.github.com/91971

I'm sure it's a trivial issue, my code seems identical to the example  
given in the Getting Started PDF.

Help is much appreciated.

Thanks.

Douglas F Shearer
douga...@gmail.com
http://douglasfshearer.com


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



[Lift] Re: Google App Engine

2009-04-08 Thread Timothy Perrett

Thanks for the link - sounds pretty awesome!

On Apr 8, 9:45 pm, Lincoln Stoll  wrote:
> This looks like the 
> thread:http://www.nabble.com/-scala--Google-App-Engine-for-Scala%21-td229442...

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



[Lift] Re: Google App Engine

2009-04-08 Thread Lincoln Stoll

This looks like the thread: 
http://www.nabble.com/-scala--Google-App-Engine-for-Scala%21-td22944265.html

Linc.

On 08/04/2009, at 4:53 PM, Timothy Perrett wrote:

>
> Can you fwd to the lift list for those of us not on the main scala
> mailing lists?
>
> Thanks, Tim
>
> On Apr 8, 3:14 pm, David Pollak  wrote:
>> See my response on the scala list
>
> >


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



[Lift] Re: Google App Engine

2009-04-08 Thread Timothy Perrett

Can you fwd to the lift list for those of us not on the main scala
mailing lists?

Thanks, Tim

On Apr 8, 3:14 pm, David Pollak  wrote:
> See my response on the scala list

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



[Lift] Re: Google App Engine

2009-04-08 Thread David Pollak
See my response on the scala list

On Apr 8, 2009 2:28 AM, "Viktor Klang"  wrote:

As stated in the Scala list, GAE doesn't support JDBC or Threads.

It does however, support JPA.

Since it only supports the Servlet 2.4 spec currently, it doesn't include
the Continuations as in the 3.0 spec.

This means that for now, I think the odds are against us on this one.

Did I miss something?
Cheers,
Viktor

On Wed, Apr 8, 2009 at 10:08 AM, Timothy Perrett 
wrote: > > > Awesome! H...
Viktor Klang
Senior Systems Analyst

--~--~-~--~~~---~--~~ You received this
message because you are su...

--~--~-~--~~~---~--~~
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: Howto re-initialize database

2009-04-08 Thread Tobias Daub

Thanks, that helped!

If I want to create some initial items in a table when lift is started 
first, where is a good point to do that?

I had a look a Boot.scala but couldn't find an entry point.

Tobias
> Right, sorry about that.
>
> On Apr 6, 10:01 am, Derek Chen-Becker  wrote:
>   
>> Actually, Derby doesn't have an in-memory mode 
>> (http://db.apache.org/derby/faq.html#in_memory), and saves the data to disk
>> by default. The JDBC connection URL determines the directory that Derby
>> saves stuff in. In the ToDo app I believe it's "lift_example", which should
>> be in your project root directory. You can just delete that directory and it
>> wipes the DB.
>>
>> Derek
>>
>>
>>
>> On Mon, Apr 6, 2009 at 5:53 AM, TylerWeir  wrote:
>>
>> 
>>> The default setup uses Apache Derby[1], which is an in-memory db.
>>>   
>>> You are free to use other DBs, most commonly used would be MySQL and
>>> PostgreSQL, although there are others.
>>> Take a look here,
>>> http://wiki.liftweb.net/index.php?title=Cheat_Sheet#Connection_String...
>>>   
>>> [1]http://db.apache.org/derby/
>>>   
>>> On Apr 6, 3:25 am, Tobias Daub  wrote:
>>>   
 Hi Derek,
 
 This was something that confused me a bit, too. Which kind of database
 is Lift using? Its not mentioned at all in the tutorial, or?
 
 I just know it from Turbogears, that they had a tool that could play
 with the underlying database and do stuff like delete all tables and
 create new empty ones. With Grok its really easy to "create" a new empty
 database, too.
 
 I think this is really helpful for testing, because you dont have waste
 so much time with doing it manually.
 
 I just asked, because I thought maybe there's something similar to do so.
 
 thanks
 Tobias
 
> If you're talking about one of the archetypes (using Derby), just
> delete the Derby directory in your project root. Otherwise, you could
> look at the destroyTables_!! method on Schemifier. Could you give some
> more details?
>   
> Derek
>   
> On Sun, Apr 5, 2009 at 1:06 PM, Tobias Daub  > wrote:
>   
> Hi There,
>   
> How can I initialize the database again, e.g. to have all tables
>   
>>> emtpy
>>>   
> again?
>   
> Do I have to modify Boot.scala?
>   
> thanks
> Tobias
>   
> >
>   


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



[Lift] Re: Google App Engine

2009-04-08 Thread Viktor Klang
As stated in the Scala list, GAE doesn't support JDBC or Threads.

It does however, support JPA.

Since it only supports the Servlet 2.4 spec currently, it doesn't include
the Continuations as in the 3.0 spec.

This means that for now, I think the odds are against us on this one.

Did I miss something?
Cheers,
Viktor

On Wed, Apr 8, 2009 at 10:08 AM, Timothy Perrett wrote:

>
> Awesome! Hell yeah, i'll give this a try!
>
> On Apr 8, 8:40 am, Jorge Ortiz  wrote:
> > Google App Engine just released support for Java/Scala. I just sent in
> > my laptop for repairs and won't get it back for a while.
> >
> > Anyone want to try Lift on GAE and report back?
> >
> > --j
> >
>


-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Google App Engine

2009-04-08 Thread Timothy Perrett

Awesome! Hell yeah, i'll give this a try!

On Apr 8, 8:40 am, Jorge Ortiz  wrote:
> Google App Engine just released support for Java/Scala. I just sent in
> my laptop for repairs and won't get it back for a while.
>
> Anyone want to try Lift on GAE and report back?
>
> --j
--~--~-~--~~~---~--~~
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] nice tutorial

2009-04-08 Thread Tobias Daub

Hi There,

I don't know if somebody already found this, but I think its nice and 
helpful, too.

http://www.ibm.com/developerworks/ajax/tutorials/wa-aj-comet/

Tobias

--~--~-~--~~~---~--~~
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] Google App Engine

2009-04-08 Thread Jorge Ortiz

Google App Engine just released support for Java/Scala. I just sent in
my laptop for repairs and won't get it back for a while.

Anyone want to try Lift on GAE and report back?

--j

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