AK | 18 May 2013 06:15
Picon

[Lift] Small fix for makeCometBreakoutDecision

There is this code to close long polling requests to free new possible requests for browser.

// dump the oldest requests
    which.drop(max).foreach {
      case (actor, req) => actor ! BreakOut()
    }

But to drop the oldest requests but not the newest it should be which.dropRight

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Julio | 18 May 2013 04:55
Picon
Gravatar

[Lift] AjaxRadio

Hello Everyone,


I was successfully able to implement an ajaxRadio example with simple css-sel binding. 

My problem is that I don't know what will be the radio options during page load, only after an ajaxSubmit returns a parameter that will be used to generate the options.

What is the easiest way to bind ajaxRadios after page load?


Thank you, Julio

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Ross Oreto | 18 May 2013 00:52
Picon

[Lift] Lift[2.5-RC6] Oracle Driver

I cannot get lift to find the Class.forName("oracle.jdbc.OracleDriver")


I have included the ojdbc6.jar driver in webapp/web-inf/lib/

Its not hosted on any maven repo that I'm aware of. Where should this driver be added?
I've only been using lift for a day.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
alexmnyc | 17 May 2013 19:09
Picon

[Lift] A question about since-ID API implementation with Mongo

I was hoping to implement an api similar to:


getPosts?sinceId=POSTID&max=20

Since MongoID is not an autoincremented integer, I'm not sure how to approach constructing such a query (with Rogue or without) looking for items with ID's > requested ID. Anyone can share thoughts on their experience with such an implementation?

Thank you.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Andriy Plokhotnyuk | 16 May 2013 11:06
Picon

[Lift] How to enforce creating new transaction in Liftweb Mapper?

Is it safe implementation for Liftweb 2.4?
Is there any implementation that is better than bellow one? 

import net.liftweb.db.{DefaultConnectionIdentifier, DB}
import akka.dispatch.{Dispatchers, Future}

val timeout = 60 * 1000 // 1 minute
val dispatcher =
Dispatchers.newExecutorBasedEventDrivenWorkStealingDispatcher("transaction-provider-dispatcher")
  .setMaxPoolSize(25) // should be same as max number of connection in DB
pool
  .build

/**
 * Will create a new transaction if none is in progress and commit it upon
completion or rollback on exceptions.
 * If a transaction already exists, it has no effect, the block will execute
in the context
 * of the existing transaction. The commit/rollback is handled in this case
by the parent transaction block.
 */
def inTransaction[T](f: => T): T = DB.use(DefaultConnectionIdentifier)(conn =>
f)

/**
 * Causes a new transaction to begin and commit after the block's execution,
 * or rollback if an exception occurs. Invoking a transaction always cause a
new one to be created,
 * even if called in the context of an existing transaction.
 */
def newTransaction[T](f: => T): T =
Future(DB.use(DefaultConnectionIdentifier)(conn => f),
timeout)(dispatcher).get

--
View this message in context: http://scala-programming-language.1934581.n4.nabble.com/How-to-enforce-creating-new-transaction-in-Liftweb-Mapper-tp4634203.html
Sent from the liftweb mailing list archive at Nabble.com.

-- 
--

-- 
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

--- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@...
For more options, visit https://groups.google.com/groups/opt_out.

alexmnyc | 15 May 2013 22:31
Picon

[Lift] JsonAST List map vs flatMap

Guys,



i was doing something along these lines:

 b.validate match {
              case Nil =>
                   b.save
                   JsonResponse(("success" -> true) ~ ("id" -> b.id.is.toString))
              case x =>
                   JsonResponse(("success", false) ~ ("errors", (x.flatMap(y=>y.msg.toString()))))
}

Compiler kept producing the error "No implicit view available from List[Char] => net.liftweb.json.JValue."

If I change flatMap to map, everything seems to work. Am I missing something as to why these two methods are producing different results?

Thank you



--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Christian Thomas | 15 May 2013 20:58
Picon

[Lift] how to use surround mechanism twice times

Hi,

following situation:

I have got a default template like:

...
<body>
    <header class="fixed">
        <nav id="head-mainmenu" class="top-bar contain-to-grid">
            <ul>
                <li><a href="/">Welcome</a></li>                       
            </ul>
        </nav>

        <div id="header"></div>

    </header>

    <section style="margin-top: 50px;">
        

        <div class="row">
            <div id="content"></div>
        </div>
    </section>
...


So different sites are using that default template to place the specific content inside the <div id="content"> element.

Now I need for some sites to place some other content inside the <div id="header"> element. Why: I'm using the html framework foundation. In the default template is a navigation defined. While using the css class fixed, that navigation bar is fixed on top of the page. Some pages need to place some elements inside that fixed area beside the normal content.

This example should be a page, that wants to place html content inside the #header and inside the #content:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title>Home</title>
</head>
<body class="lift:content_id=main">
<div id="main">
    
    <div data-lift="surround?with=default;at=content">
        <header><h1>SURROUND CONTENT</h1></header>
    </div>
    
    <section data-lift="surround?with=default;at=header">
        <header><h1>SURROUND HEADER</h1></header>
    </section>

</div>      
</body>
</html>

The strange thing is, that the produced html contains the whole page twice times. Once for the "content" part and once for the "header" part. Please watch the attachment "produced-html.html" ( or here )

How can I solve this example?

If you want to have a closer look, I have pushed it to https://github.com/Chris81T/lift-templating


Thanks!! 



--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 

lang="de" class="no-js"> More than one surround Home

SURROUND CONTENT

SURROUND HEADER

Dano | 15 May 2013 07:19
Picon

[Lift] trying to build on Lift 2.5RC6 - cannot find textile module

Hello Lifters!

I have a project which is building just fine on Lift 2.5-RC4 (scala 2.10).  I am now trying to update the project to Lift 2.5-RC6.

When I do this, maven cannot find the textile library.  In my pom.xml file, I have the following properties:

   <properties>                                                                                                                                        
        <scala.version>2.10.0</scala.version>                                                                                                           
        <lift.version>2.5-RC6</lift.version>                                                                                                            
        <maven.compiler.source>1.6</maven.compiler.source>                                                                                              
        <maven.compiler.target>1.6</maven.compiler.target>                                                                                              
    </properties>  

Here is the reference to the textile jar:

        <dependency>                                                                                                                                    
            <groupId>net.liftmodules</groupId>                                                                                                          
            <artifactId>textile_2.10</artifactId>                                                                                                       
            <version>${lift.version}-1.3</version>                                                                                                      
        </dependency>

When I do a clean build against 2.5-RC4, maven successfully finds the textile jar at the following location:

http://oss.sonatype.org/content/repositories/releases/net/liftmodules/textile_2.10/2.5-RC4-1.3/textile_2.10-2.5-RC4-1.3.jar

However, when I try a clean build against 2.5-RC6, maven cannot find it.  The URL it tries is http://oss.sonatype.org/content/repositories/releases/net/liftmodules/textile_2.10/2.5-RC6-1.3/textile_2.10-2.5-RC6-1.3.jar.  If I direct my browser to http://oss.sonatype.org/content/repositories/releases/net/liftmodules/textile_2.10, it looks like the last version placed there is 2.5-RC4.

Does the textile jar have a new location for 2.5-RC6?

Thanks in advance for any help.


Dan

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Tobias Pfeiffer | 15 May 2013 01:19
Gravatar

[Lift] A new Lift-powered website

Hi,

I have just deployed last weekend the new, Lift-powered version of
<https://www.vismath.eu>, a webshop for all kind of maths-related
products :-)

It is replacing a Drupal/Ubercart installation and is (besides providing
a lot of CMS functionality for our internal staff) basically a (now
multi-lingual) webshop using the Enterprise Resource Planning system
OpenERP as a backend for keeping track of product information, prices,
taxes, shipping costs, stock levels etc.
Between the Lift frontend and the OpenERP backend, I am using
restful-openerp <https://github.com/tgpfeiffer/restful-openerp> as a
REST-to-XML-RPC adapter and Varnish as an HTTP cache in order to speed up
things. On the Lift side, I'm using dispatch with all its Promise
goodness to access the backend and nicely chain requests like "look up
product by its SKU, then fetch the product, then get the product
availability" in a non-blocking manner.

Even though the Lift site is only running for a couple of days now, I'm
already quite glad that we got rid of this Drupal stuff :-)

Feedback is very welcome!

Kind regards,
Tobias

-- 
--

-- 
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

--- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@...
For more options, visit https://groups.google.com/groups/opt_out.

Diego Medina | 15 May 2013 01:04
Favicon
Gravatar

[Lift] Announcing Lift 2.5-RC6

Dear community,

We are proud to announce the release of Lift 2.5-RC6. We hope that
this will be the last RC before the final build.

You can read the changes included in this build since 2.5-RC5 here:
http://liftweb.net/25_rc6

Thank you.

  The Lift Team

-- 
--

-- 
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

--- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@...
For more options, visit https://groups.google.com/groups/opt_out.

Colin Bester | 15 May 2013 00:05
Picon

[Lift] Querying table using optional field

My brain must be shutting down as I am not seeing a decent way to do this.


I am using squeryl-record and am wanting to query database for unique record using a database field defined as optional.

What I have is messy and I am sure there is a better way.

My email field is defined in User class (record) as:
val email = new OptionalEmailField(this, 48)

My query is defined in the User companion object as:
   def findUserByEmail(email: String): Box[User] = {
      val query = from(SLSchema.users)(users =>
                  where(users.email.value.getOrElse("") === email)
                  select (users)).headOption
    }

Appreciate any suggestions.

Colin

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gmane