You're right, we have a mistake in the text. Templates take precedence over Views. I'll fix that and put a new PDF up.
Derek On Thu, Apr 2, 2009 at 4:32 PM, nau <anem...@googlemail.com> wrote: > > Hi there, > > There is a bug in ScriptRenderer.scala I've described here: > > http://liftweb.lighthouseapp.com/projects/26102/tickets/31-bug-liftajaxjs-generation-bug-in-case-of-liftrulesenableliftgc-false#ticket-31-1 > . > > I've got a quick fix for it but I don't think it's the best one > (sorry, can't provide normal patch now, I'm on windows): > > ScriptRenderer.scala > > function addPageName(url) { > return url.replace('""" + LiftRules.ajaxPath + """', '""" + > LiftRules.ajaxPath + liftPage + """); > } > > function lift_actualAjaxCall(data, onSuccess, onFailure) { > """ + > LiftRules.jsArtifacts.ajax(AjaxInfo(JE.JsRaw > ("data"), > "POST", > > LiftRules.ajaxPostTimeout, > false, > "script", > Full > ("onSuccess"), Full("onFailure")))+ > """ > } > > """ + > LiftRules.jsArtifacts.onLoad(new JsCmd() {def > toJsCmd = "lift_doAjaxCycle()"}).toJsCmd) > > val liftPage = if (LiftRules.enableLiftGC) "/'+lift_page" else > "" > > ------------------------------------------------------------------------------------------------------ > > One more. I've found inconsistent statements in Liftweb book (pdf > compilation master-20090309 from github). I'm not sure wheather it > still exists but anyway: > paragraph 3.4 states: > "3. Check to see if the request should be handled by a View. This is > covered in section > 3.6 > 4. If the request is not handled by a View, find a template that > matches and use it. We’ll > cover templates in section 3.5" > > but paragraph 3.6 states: > > "In either case, View lookup and dispatch is done after template > resolution, so templates take priority." > > Cheers, > Alex Nemish > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---