Skip to content

Releases: lift/framework

Lift 2.6-RC2

23 Nov 19:53

Choose a tag to compare

Bug Fixes

  • Fix for the conflict between the private class scala.io.Position and our implementation of it. Hat tip to @fmpwizard to fixing this in #1636.
  • Fix for the incorrect manipulation of ajaxPostTimeout on the server, which caused threads processing an ajax request to stick around longer than they should have. Penguin tip to @fmpwizard for fixing this in #1637.
  • Added an implicit conversion from tuple to SelectableOption for backward compatibility niceness. Bacon tip to @fmpwizard for fixing this in #1630.
  • Removed some unnecessary synchronization for Vars. Shoe tip to @davewhittaker for making that happen in #1631.
  • Return DefaultConnectionIdentifier.jndiName to being a var, with an added deprecation warning. JNDI tip to @eltimn for making that happen in #1623.

Lift Framework 3.0-M2

30 Sep 22:50

Choose a tag to compare

Lift Framework 3.0-M2 Pre-release
Pre-release

This is the first “clean” release of Lift 3.0. This means that we've removed all currently-deprecated items from Lift 3.0 (i.e., anything that is deprecated in Lift 2.6 is gone in Lift 3.0-M2). This release still shouldn't be considered stable per se, in that there may be some additional removals in the future, but we don't currently have any such removals planned.

Additionally, a lot of additional feature work has gone into this, as many of the pull requests that were pending a milestone release of 3.0 before have now gone in. Here's a high-level breakdown of things that have gone in, though they are not yet particularly well-documented (more documentation will come before the 3.0 final release; in the meantime, please ask any questions you may have on the Lift mailing list).

Breaking Changes

  • JavaScript handling
    • liftAjax is no longer available on the client, as it has been significantly restructured.
    • There is now a public API for Lift's few client-side functions; it resides under the window.lift object. It is not yet documented, and should be considered volatile until we announce otherwise.
    • Lift AJAX calls are now routed under <context path>/lift/ajax
    • Lift comet calls are now routed under <context path>/lift/comet
    • Everything under /lift is reserved for Lift's use. That path can be customized via
      LiftRules.liftContextRelativePath. Unlike before, when you could customize AJAX and comet paths
      separately, you can now only customize the top-level Lift path, and everything underneath
      it is reserved for Lift's use, both present and future.
  • (#1584) lift-json's JField stopped being a JValue; it is now instead a type alias for (String, JValue). This is a cleaner representation, but it means that map, transform, find, and filter only operate on proper JValues, and using these on fields requires using mapField, transformField, findField, and filterField.
  • (#1548) The old binding strategy based on the bind function is now gone. CSS selector transforms should be used instead. Several built-in snippets have been migrated away from the old bind strategy. The changed snippets are:
    • Paginator
    • ProtoUser
    • Crudify
    • LiftScreen (now behaves like CssBoundLiftScreen)
    • CssBoundLiftScreen (now LiftScreen)
    • FormProcessor (removed)
    • TableEditor
    • Util in mapper.view
  • (#1585) CometActor behavior has changed—comets with no type specified are no longer supported.

Improvements

  • (#1585) Sending new comets to the client in AJAX callbacks now works.
  • (#1585) Comets can now be instantiated programmatically via a well-defined S API.
  • (#1613) S.request is now empty in comet actors.
  • (#1607) The lazy-load snippet now works in AJAX responses (builds on the comet support above).
  • (#1607) Scala Future and Lift LAFuture can be used in a CSS selector transform and will automatically be set up for lazy loading.
  • (#1606, #1537) Lift 3 now builds exclusively on Scala 2.11, using sbt 0.13.
  • (#1522) Add the ability to force reading RestHelper post data as JSON or XML even if the sent Content-Type is incorrect.
  • (#1253) withFilter added to BaseResponse class (for testing) so that it can be used correctly in forcomprehensions.
  • (#1574) Fix an issue where there were two very different overloads of updateListeners in ListenerManager. One of them is now named sendListenersMessage.
  • (#1559) JavaScript added to the page via S.appendJs during the initial page render is now accumulated into a file under the <context path>/lift path and referenced from the page. Things like on* event handlers and such will in the future also be placed in this file so that the generated HTML is free of inline script when using Lift's built-in behavior. This will allow a restrictive Content-Security-Policy for security purposes.

Fixes

  • (#1253) withFilter added to BaseResponse class (for testing) so that it can be used correctly in forcomprehensions.
  • (#1572) Fixed an issue in 3.0-M1 where boolean values in roundtrip responses could cause issues.
  • (#1593) BsonRecordListField validates all elements by default on validate
  • (#1597) Fixed an issue in Lift 3.0-M1 where the AJAX paths did not include the context path.

2.6-RC1

31 Jul 19:59

Choose a tag to compare

Changes

  • Included option attributes in multiSelect_*.
  • Improved memory usage by sharing init key value for each *Var.
  • Added explicit parameter type when looking for snippet methods.
  • Added Date header when sending mail.
  • Exclude the Position.scala file in builds for Scala < 2.11.

2.6-M4

19 Jun 03:58

Choose a tag to compare

Changes

  • 2.10 versions of Lift are now built for Scala 2.10.4.
  • We are now publishing Lift builds for 2.11, built with Scala 2.11.1.
  • MongoRecord.save now has a default true value for its safe parameter.
  • Add saveBox, updateBox, and deleteBox_! methods to MongoRecord
    that catch exceptions and return a Box.
  • Moved MongoIdentifier to use a common ConnectionIdentifier shared with
    other record types.
  • Added RecordRules.fieldName, a FactoryMaker that lets you modify a field's
    corresponding database name based on the database connection and the field's
    variable name. (#1505).
  • Added RecordRules.displayName, a FactoryMaker that lets you modify a field's
    display name (the name rendered in the UI) based on the record instance being
    handled, the current locale, and the default display name.
  • Added MongoRules.collectionName, an Inject that lets you modify the name of a MongoRecord class's collection based on the connection and the
    class name.
  • Fix MongoListField's setFromJValue to properly handle special mongo data
    types.
  • Add AsObjectId extractor for pattern matching ObjectId Strings.
  • Add AsMongoRecord extractor for pattern matching a Mongo Record instance
    based on an incoming String id.
  • Add JsonObjectId, JsonRegex, JsonUUID, JsonDate, and JsonDateTime
    extractors for lift-mongodb-formatted JValues.
  • Added a withFilter method to suppress warnings when using the BaseResponse
    class in Lift tests (see #1253).
  • Wrap mail parts in multipart/related MIME part in emails (see #1569).
  • CometActor now handles ResponseShortcutExceptions with redirect responses
    by sending an appropriate RedirectTo command to the client. This means that
    e.g. S.redirectTo will work as expected in a CometActor. Note that this is implemented
    in the default exceptionHandler of CometActor, so if you've overridden it you'll
    need to make sure that the default handler is something you eventually invoke.
  • Added the ability to get a forced version of a request body as JSON or XML,
    regardless of whether the specified Content-Type of the request was correct.
    These are Req.forcedBodyAsJson and Req.forcedBodyAsXml, respectively.
  • Return a Failure with descriptive error message if bodyAsJson or bodyAsXml
    are invoked and we don't return the relevant JSON or XML due to an incorrect
    Content-Type in the request.
  • Added a short note on StackableMaker's doWith (used by FactoryMaker,
    amongst other things) regarding the fact that its changes to its maker's value
    are thread-local.

Deprecations

  • JSONParser, Lift's legacy JSON parser, along with its dependents:
    • MetaRecord.setFieldsFromJSON
    • MetaRecord.fromJSON
    • CometActor's handleJson, jsonCall, and jsonInCode
    • S.buildJsonFunc
    • S.jsonFmapFunc with Any=>JsCmd
    • JsonHandler
    • SHtml.fjsonCall
    • SHtml.jsonButton with Any=>JsCmd
    • SHtml.jsonForm
  • Mapper and MetaMapper's snippet bindings that use PartialFunctions:
    • addSnippet, editSnippet, viewSnippet (in favor of addFormSnippet,
      editFormSnippet, and viewTransform, all based on CSS selector transforms)
    • modSnippet, used in addSnippet and editSnippet, superseded by formSnippet.
    • add, edit, and view snippets in HTML, in favor of addForm, editForm,
      and viewTransform
    • fieldMapperPF, in favor of fieldMapperTransforms
    • fieldPF, appendField, and prependField, in favor of fieldTransforms,
      appendFieldTransform, and prependFieldTransform.
  • MongoAddress, MongoHostBase, MongoHost, MongoSet and all functions that
    take them as parameters. Please use the Mongo Java driver's MongoClient instead.
  • MongoRecord.save with no parameters. Please use the version with one
    parameter, and invoke it with empty parens (save()) if you want a safe save. The
    default for save with no parameters was an unsafe save, which can be achieved using
    save(false).
  • MongoMeta.ensureIndex; use MongoMeta.createIndex instead.
  • ListenerManager.updateListeners(Any); use ListenerManager.sendListenersMesage(Any)
    instead.

Lift Framework 3.0-M1

06 Jun 03:17

Choose a tag to compare

Lift Framework 3.0-M1 Pre-release
Pre-release

Quick fix over 3.0-M0, this fixes an issue where the comet-related ListenerManager
trait would not notify a comet when it was first subscribed to it.

Lift Framework 3.0-M0

20 May 03:12

Choose a tag to compare

Lift Framework 3.0-M0 Pre-release
Pre-release

This build includes early work on Lift 3.0 that has been available in the snapshot for
some time, as well as some recent cleanup that has gone in. It is a stable base for
people who have been using Lift's 3.0 snapshot, as there is likely to be continuing and
significant churn in the mainline 3.0 snapshot over the coming months.

A couple of new features include:

More to come on that front—and more to be documented as well.

Removed Deprecations

  • JSONParser, Lift's legacy JSON parser, along with its dependents:
    • MetaRecord.setFieldsFromJSON
    • MetaRecord.fromJSON
    • CometActor's handleJson, jsonCall, and jsonInCode
    • S.buildJsonFunc
    • S.jsonFmapFunc with Any=>JsCmd
    • JsonHandler
    • SHtml.fjsonCall
    • SHtml.jsonButton with Any=>JsCmd
    • SHtml.jsonForm
  • Mapper and MetaMapper's snippet bindings that use PartialFunctions:
    • addSnippet, editSnippet, viewSnippet (in favor of addFormSnippet,
      editFormSnippet, and viewTransform, all based on CSS selector transforms)
    • modSnippet, used in addSnippet and editSnippet, superseded by formSnippet.
    • add, edit, and view snippets in HTML, in favor of addForm, editForm,
      and viewTransform
    • fieldMapperPF, in favor of fieldMapperTransforms
    • fieldPF, appendField, and prependField, in favor of fieldTransforms,
      appendFieldTransform, and prependFieldTransform.
  • lift-mongo's MongoIdentifier in favor of ConnectionIdentifier in lift-util
  • lift-mongo's constructors and methods dealing with db connections that aren't in
    the form of MongoClient (Mongo, MongoHost, etc)

Lift Framework 2.6-M3

12 Apr 13:13
2.6-M3-release

Choose a tag to compare

I'm pleased to announce that Lift 2.6-M3 is out the door and should be available on Sonatype shortly.

Here's the rundown.

Notable Changes

  • Box.get is officially deprecated. Previously, calling .get on a box would trigger an implicit conversion from Box => Option. As we move towards encouraging people even more to utilize flatMap, map, etc to open boxes and to specify exceptions when they can't (a la openOrThowException), we're officially deprecating the use of .get on a box, and you will start seeing warnings in your code if you do it as of this release. In Lift 3.0, the ability to call .get on a box will disappear.

New Features / Enhancements

Bugfixes

Once again, thank you to everyone involved in making this release possible. Have a spectacular Saturday.

Lift 2.6-M2

11 Jan 19:53

Choose a tag to compare

Bugfixes

  • Fix JObject's hashCode to work with equals (#1499).

2.6-M1

08 Jan 15:44
@d6y d6y

Choose a tag to compare

New Features & Enhancements

Markdown parser included: the Actuarius Markdown parser is now part of Lift. Thanks to @chenkelmann and @dpp. There's an example in Torsten's Lift 3 demo source.

Add support for X-Frame-Options: Lift now sets the "SAMEORIGIN" X-Frame-Options header. Thanks to @dpp and @fmpwizard.

Improved LAFutures: The improvements to LAFuture in Lift 3.0 have been back-ported to 2.6. This brings map, flatMap, filter, withFilter, onSuccess, onFail, and onComplete. Thanks to @dpp and @fmpwizard.

CSS Selector for first match: You can now use "^ [href]" as a CSS selector, and it will only apply a transformation to the first match on your NodeSeq. Thanks to @dpp and @fmpwizard.

Run-mode auto-detection: when run.mode isn't set, you can now supply a function to determine the run mode to use by setting Props.autDetectRuModeFn before referencing run.mode. Thanks to @japgolly for this.

Make LiftRules use the html5 parser by default: you no longer need to set the parser in your Boot.scala file. Thanks @fmpwizard.

No more warnings in JValue in for comprehensions: withFilter has been implemented on JValue. Thanks @hedefalk.

Mock Lift Actor for better unit tests: The details and example are in the pull request. Thanks to @farmdawgnation.

Lift now defaults to the HTML5 parser: You don't need to specify HTML5 anymore in your Boot.scala. Thanks @fmpwizard.

Addition of ajaxOnSubmit to SHtml: Use ajaxOnSubmit to bind a () => JsCmd submit handling function to an <input> or <button>. This allows you to retain the entire element content, except for the onclick attribute, without resorting to a hidden field. Thanks to @Shadowfiend.

Conditional onEvent: A convenience for prompting the user before carrying out an action. For example: SHtml.onEventIf("Are you sure you want to do that?", s => deleteUser()). Thanks to @farmdawgnation

Support for form=ajax as a snippet attribute: You can now invoke a snippet with a ?form=ajax parameter and Lft will do the right thing and convert it into an Ajax form. Prior to this, you had to enclose your form with an extra div and call data-lift="form.ajax". Thanks to @fmpwizard.

Logging not found GUIDs: Lift now logs POST or GET requests that contain no callback functions, but look like they should. You can control this behaviour with LiftRules.handleUnmappedParameter. Thanks to @Shadowfiend and @serioga.

Easier testing and customization of Mailer: Mailer's inner class is now a trait, which allows any class extending the trait to accept From(), To() etc. Thanks to @japgolly.

Custom handling of Menu Param failing to match: Normally a Menu.param 404s if the current value is Empty. You can now change the behaviour via Loc.MatchWithoutCurrentValue. There's an example of using this in the ScalaDoc. Thank you @farmdawgnation.

Scheme-relative URLs now supported: Scheme relative URLs (e.g., those starting //) no longer have the context path pre-pended. Thanks to @serveace.

Lifecycle callbacks added to MongoMetaRecord.update: there's now support for beforeUpdate and afterUpdate on Mongo records. Thanks to @eltimn.

Mongo Record creation date: a document creation date is now available via createdAt. This uses the timestamp from Mongo's ObjectId. Thanks to @eltimn.

Joda Time support for Mongo Record: you can now use Joda's DateTime via JodaTimeField. Thanks to @eltimn.

Dirty check on Record: use myrecord.dirty_? to test if a record has been modified since being loaded. Thanks to @eltimn

Maven archetypes updated: thanks to @ldeck.

Bug fixes, Compatibility and Performance Gains

Remove ActorWatcher: BREAKING CHANGE ActorWatcher has been removed, as it referenced the old deprecated Scala Actor code. Thanks @fmpwizard.

Workaround for Scala regression SI-7612: Annotate type of primaryKeyField in Mapper to avoid a StackOverflow (will be fixed in 2.10.3 or 2.11). Thanks to @retronym and @fmpwizard.

LAFuture.collect IndexOutOfBoundsException fix: it was possible for LAFuture to throw an IndexOutOfBoundsException for futures resolved in a particular order. This has been resolved, thanks to @tuhlmann.

Jetty 9 null safety checks: Under Jetty 9 it's possible for a request to say it has a header, but when you ask for the header you get null. We now protect against this, and you won't get a null header value. Thanks to @dpp.

JSON parser fix for handing scientific notation: The parser was fine with e and e-, but now can handle e+ (e.g., 1.23e+1). Thank you @kluyg.

CSS parser robustness improvements: Including allowing the # character in URLs. Thanks @pbrant.

Menu.item swallowed surrounding Elem. From @dpp and @hedefalk.

Helpers.toBoolean("on") now returns true: it didn't before! Thanks @fmpwizard and Denis Nevmerzhitsky.

S.ieMode is misleading and so deprecated: This flag is used for a specific XML handling issue, and is not a general IE detection check. To avoid this confusion, isMode is deprecated and will probably be removed in Lift 3. This improvement from @farmdawgnation.

Spelling fixes for Vendor and supplimentalKidMenuItems: there have been a number of fixes to spelling mistakes in functions. Incorrect spellings have been deprecated. Thanks to @farmdawgnation and @nafg

ScalaDoc improvement to ListenerManager, thanks to @timr.

Typos in the source: fixed by @pbrant.

Out of date references to Can removed by @Shadowfiend.

...and thanks to everyone who contributed on the mailing list, writing code, reviewing code, supplying feedback!