How to use Liftweb’s built-in functionality for Sorting and Pagination using Scala

Reading Time: 2 minutes In this blog , we will have a basic idea that how to use LiftWeb’s built -in functionality for Sorting and Pagination . Lift provides SortedPaginatorSnippet for sorting of results and PaginatorSnippet for paging of results . Suppose you are displaying an item list on web and you want to sort and paginate that list then you have to implement both snippets SortedPaginatorSnippet and PaginatorSnippet Continue Reading

Integrate PayPal in LiftWeb application using Scala

Reading Time: 3 minutes If you are developing an E-Business web application , where you have to provide online payment solution to your customer then PayPal is one of the most secure , faster and easier way to make payment online . In this blog, we will have a basic idea that how easily you can integrate PayPal functionality in your Liftweb project using Scala . We are assuming Continue Reading

Downloading And Uploading Data on Google App Engine Using Java Application

Reading Time: 3 minutes We need to download data as a CSV from the app engine data store. This would help us get the data back from the app engine, just in case you want to move away or update from the data store. We’ll go through a step by step example for using this tool with a Java application. 1. Download Google App Engine SDK for Python from here. Unzip this Continue Reading

Scala Liftweb : Re render page element without making any request to the server

Reading Time: 2 minutes Lift introduces a powerful feature that enables developer to create rich interactive application using Comet and Ajax support . Using Comet , its easy to push content from server to browser by sending request asynchronously . AJAX works for a single client at a time , while Comet works for multiple users . Comet works like AJAX but in opposite direction . In this blog Continue Reading

Connect with LinkedIn in java

Reading Time: < 1 minute We needed to post LinkedIn updates in our gwt based application. LinkedIn-J is a java wrapper over LinkedIn API’s. We used this to post LinkedIn updates in our application. We have also used signpost-core. It stands for simple oauth messages signing for java. It exoposes a simple interface to sign HTTP requests using a given OAuth token and secret. For getting this work we downloaded Continue Reading

An alternate way to implement JOINs in MongoDB [Update]

Reading Time: 2 minutes I have updated this blog . As last description was creating some misunderstanding and lot of confusion . In one of my project , there was a requirement to generate report in .csv format from MongoDB without using any reporting tool and any language . I had to use only MongoDB query . In that report , I had to use multiple collection . Since Continue Reading

Filter Query Results With Objectify

Reading Time: < 1 minute Objectify is a Java data access API specifically designed for the Google App Engine datastore. It is an easy way to use Google Datastore. In this blog we are going to filter a single attribute for multiple values. Now lets start with creating an entity. The first step is to define your entity class. Here is an example of employee. public class Employee { @Id Continue Reading

Scala LiftWeb: Upload File using AJAX

Reading Time: < 1 minute Liftweb provides AJAX functionality for all html elements except file upload using Scala . But there is a way to upload file using AJAX by binding form as AJAX form . 1) add below lines in your html . <div class="lift:FileSnippet.uploadFile"> Upload File : <input name="upload" type="file"></input> <input type="submit" name="submit" value="Upload"/> </div> 2) class FileSnippet { def uploadFile(form: NodeSeq): NodeSeq = { def handleFile():JsCmd = Continue Reading

Play With Liftweb’s AJAX Generators using Scala

Reading Time: 2 minutes AJAX is an approach for building dynamic web content on the client side . In Liftweb , we can implement this approach either by AJAX or by Comet . Comet is like AJAX , except in opposite direction . AJAX model increases the richness of the User Experience for a single client at a time, Comet can do the same for multiple users. First thing Continue Reading

Communicating with Twitter via Twitter4J using Scala

Reading Time: 2 minutes Twitter4J is a Java library for the Twitter API. With Twitter4J, you can easily integrate your Scala application with the Twitter service. Twitter4J is featuring: – Easy to use with Scala (as it works on any Java Platform version 5 or later) – Support via a single jar file. – Built-in OAuth support. Here is the tutorial to use Twitter4J in Scala. 1. Download the Continue Reading

Getting a preview image of a PDF file in Scala

Reading Time: < 1 minute In order to have an preview image of an PDF file you can use PDFBox. Here is the simple tutorial to extracting an preview image of an PDF file. Firstly you need to get the pdfbox-jar file & you can get it here. 1. You need to have these following imports. import import javax.imageio.ImageIO import org.dopdf.document.model.PageDetail import import import utils.AmazonUpload import Continue Reading

Extract a frame image from video in scala

Reading Time: 2 minutes Sometimes it becomes a general requirement to show the preview of a video wherever video gets displayed. Like on YouTube , If you’ll right click on almost any video , you’d find that each video contains a preview image of a frame of that video. Here is a short tutorial for doing the same i.e extracting a frame image from a video in Scala via Continue Reading

Play with Lift’s Autocomplete Widget using Scala-One of the Best Feature of LiftWeb Framework

Reading Time: 3 minutes The AutoComplete widget provides a flexible and accessible way to offer suggestions or some kind of filtering information as a user type text information in an input field . If you have used Google , you might see that Google starts providing autocomplete suggestion with entries depending on user’s current input . Lift provides a very easy way to implement Autocomplete using Scala . Here Continue Reading