W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1997

Filter removal problem

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Fri, 31 Jan 1997 15:28:46 +0100 (MET)
Message-Id: <199701311428.PAA25468@www43.inria.fr>
To: Jason Hoos <jhoos@math.uiuc.edu>
Cc: www-jigsaw@www10.w3.org
Jason Hoos writes:
 > Ok, here's a really strange problem (in my opinion at least).
 > 
 > I'm currently running a Jigsaw 1.0a3 server.  For this server I have
 > written a resource which, among other things, has the ability to 
 > delete filters off of other resources.  However, there seems to be
 > some major discontinuities between what I'm doing and what /Admin/Editor
 > says I'm doing.

This wouldn't (unfortunatelly) be a surprise to me: the editor really
thinks its the only one to modify things, so the first time it edits
an object, it builds an editor for it (with appropriate filter cards,
etc), and then it resuses it (without first checking if the resource
has changed).
This is true for the "structure" of the editor (ie the various form
"cards"), not for attribute values, though (which are properly
displayed...I hope)

 > This is the method I'm using to delete:
 > 1. Look up the resource.
 > 2. Obtain the list of filters from the resource using getFilters().
 > 3. Scan that list for a filter with a given name.
 > 4. Obtain the target of the filter with filter.getTargetResource.
 > 5. Call unregisterFilter(filter) on the obtained target.

That's the way to do it

 > (I've also tried the direct method of just calling unregisterFilter
 > on the resource I got in step one instead of using getTargetResource;
 > it didn't change anything.)

That might be a bug, I have added it to the todo

 > Anyhow, here's a play-by-play of what happens.
 > 1. I start the Jigsaw server, use a nice non-caching (I think) browser
 > like Lynx to look at the /Admin resource in /Admin/Editor.  It happily
 > asks for authentication information and then shows me my filter as
 > "filter-0" on the list at the bottom of the form editor.
 > 2. I then tell my resource to nuke the aforementioned filter on /Admin.
 > 3. I kill lynx and then do step 1 again.  It goes straigt into /Admin/Editor
 > without asking for authentication information, implying that the filter
 > is indeed dead.  However, the 'filter-0' entry is still listed in the
 > editor!

That's definitely the above mentionned bug. I'll try to see if I can
fix it for next public release (still due Feb the 13th)

 > 4. I then checkpoint the server from /Admin/Properties, and doing
 > step 1 yet again.  Same result as in step 3.
 > 5. Being ever persistent, I then restart the server from /Admin/Properties.
 > Now, when I try step one, I get a NullPointerException in line 558
 > of SimpleResourceStore.enumerateResourceIdentifiers when I try to get
 > into /Admin/Editor! 

An unfortunate consequence of above bug

 > 6. Finally, as a last ditch attempt, I kill the server with /Admin/Exit.
 > I then try step one again.  This time, finally, everything is happy,
 > my filter is dead, /Admin/Editor concurs that my filter is dead, and
 > I'm pleased except for having had to kill the server.

Yes the editors cache is flushed by shutting doewn Jigsaw, that's why
you get it right when restarting Jigsaw. An easy solution to the bug,
btw, is to flush the resource editor's cache is the structure of a
resource (ie its filters) has changed, I'll see if I can implement it
for next public.

Anselm.
Received on Friday, 31 January 1997 09:29:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT