You are here: Foswiki>Tasks Web>Item11654 (12 Oct 2013, MichaelDaum)Edit Attach

Item11654: improved documentation for jquery-ui-dialog's use of the cache:false parameter

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.6
Target Release: patch
Applies To: Extension
Component: JQueryPlugin
Branches: Release01x01 trunk
Reported By: SvenDowideit
Waiting For:
Last Change By: MichaelDaum
Could you explain a bit more what you mean?

-- MichaelDaum - 16 Mar 2012

http://foswiki.org/System/JQueryUIDialog talks about

Open Dialog

but my testing and use appears that its always getting the content from the cache.

The jquery docco http://jqueryui.com/demos/dialog/ doesn't seem to talk about it - which makes me suspicious (and sad) that its carried over from the simplemodal docco.

-- SvenDowideit - 16 Mar 2012

course, I could just be doing it all wrong:

<a href='%SCRIPTURL{edit}%/Tasks/ItemAUTOINC001?template=Tasks.PopupEditItemTemplate&formtemplate=Tasks.ItemTemplate&from=%BASEWEB%.%BASETOPIC%' class='jqUIDialogLink {cache:false}'>TEST: New Task</a>

TEST: New Task

looking in firebug, the second time I request it from there, it is served from the cache. Similar issues on my local tests.

-- SvenDowideit - 16 Mar 2012

This is a feature implemented on top of jquery::ui, ported over from their demos and integrated into foswiki. Works as expected. Can't see where the problem is.

-- MichaelDaum - 16 Mar 2012

click the link shown, cancel it, click it again. the second one comes from the cache.

here on foswiki.org, clicking it once, and submitting (as in creating a new task) and then click it again also seems to get the next from cache - and so the strikeone is stale.

pretty simple to reproduce really.

if its been ported, then maybe its broken in 1.1.5rc1?

-- SvenDowideit - 16 Mar 2012

Compare it to the same example with caching enabled (default).

TEST: New Task

As you can see, it does not query the server the second time you click the link. That's because it cached the result received the first time.

-- MichaelDaum - 19 Mar 2012

so you are confirming the bug I'm raising? that {cache: false} does indeed not query the server the second time?

because that is what we're seeing.

-- SvenDowideit - 19 Mar 2012

I'm going to add an example to the docco topic that shows that it works exactly as it should there.

which means that something about the example here in the Tasks we is off.

click&cancel the link a few times, and you'll see the time changes - works as it should.

Open Dialog

%STARTSECTION{"dialog"}%
<div title="From Ajax call" class="jqUIDialog { modal:true, resizable:true, draggable:true, height:300, width:600}">

GMTIME is now %GMTIME{"$day $month, $year - $hour:$min:$sec"}%

  <a class="jqUIDialogButton jqUIDialogClose {icon:'ui-icon-circle-check'}">%MAKETEXT{"Ok"}%</a>
  <a class="jqUIDialogButton jqUIDialogClose {icon:'ui-icon-cancel'}">%MAKETEXT{"Cancel"}%</a>
</div>
%ENDSECTION{"dialog"}%

The root problem I'm seeing with the Tasks editing popup, is that the strikeone oops dialog is often being triggered. firefox was showing me that its getting the html from its cache - chrome is telling me that its making a request to the server, but seem to be unsure which of the multiple div's to show.

-- SvenDowideit - 22 Mar 2012

This doc change has been merged to Release01x01. Is this task completed? Ready for 1.1.6?

-- GeorgeClark - 28 Jul 2012
 

ItemTemplate edit

Summary improved documentation for jquery-ui-dialog's use of the cache:false parameter
ReportedBy SvenDowideit
Codebase 1.1.4
SVN Range
AppliesTo Extension
Component JQueryPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:2f7fe5d5681d distro:d769b946009d
TargetRelease patch
ReleasedIn 1.1.6
CheckinsOnBranches Release01x01 trunk
trunkCheckins distro:2f7fe5d5681d
Release01x01Checkins distro:d769b946009d
Topic revision: r13 - 12 Oct 2013, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy