Skip to content

Change autoIncludeAjaxCalc to a volatile var to support a JQueryMobile use case #1510

Closed
wants to merge 1 commit into from

4 participants

@infofinity

By default, JQueryMobile (JQM) uses AJAX to load pages. This is primarily necessary in Phonegap so that the initial page load occurs at file:/// (with access to phonegap.js and thus some phone APIs through JavaScript) and all links can be enhanced to access a remote server through AJAX. The AJAX call requests the full page, searches for the data-role="page" DIV and injects that into the DOM (and removes the previous page). It is useful in some cases to control either the content or the location of liftAjax.js and thus include it manually in page content (or on an AJAX call). This is currently impossible because LiftRules.autoIncludeAjaxCalc is a val (and this is how LiftMerge decides whether to include liftAjax.js). This commit simply changes it to a var.

@fmpwizard
Lift Web Framework member

Before submitting a pull request and/or report bugs, please discuss them on the lift mailing list. Many times what may look like a bug is simply the user not understanding how things work.
And just for information purposes (please just follow up on the mailing and not on this ticket), the val is a Factory maker, which you can read about here https://www.assembla.com/spaces/liftweb/wiki/Dependency_Injection .

Thanks

Diego

@fmpwizard fmpwizard closed this Jan 6, 2014
@farmdawgnation
Lift Web Framework member

Few things:

First, This change shouldn't be required. FactoryMaker should allow you to override the default implementation by assigning a function to the "default" property.

Second, this should have been brought up on the mailing list first and a link to that thread provided as a part of this PR description, as per our contributing guidelines.

Closing this for now. If a mailing list thread determines this is needed, then we'll reopen it.

@farmdawgnation
Lift Web Framework member

Lol @fmpwizard. Great minds.

@fmpwizard
Lift Web Framework member

jeje, I had to hurry

@infofinity

Ok, I thought this was a trivial change. Guess not. Will review FactoryMaker and discuss on the mailing list if it doesn't work...

@farmdawgnation
Lift Web Framework member
@infofinity

No need to say sorry! It is my fault. I got it working using FactoryMaker. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.