Last Comment Bug 45231 - Can't insert first item to the bookmark folder
: Can't insert first item to the bookmark folder
Status: VERIFIED FIXED
suntrak-n6
:
Product: Core Graveyard
Classification: Graveyard
Component: Java APIs to WebShell (show other bugs)
: Trunk
: x86 Windows NT
: P3 normal (vote)
: ---
Assigned To: edburns
: Alexei V. Mokeev
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2000-07-12 04:39 PDT by Alexei V. Mokeev
Modified: 2012-04-09 22:27 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
tar.gz Fix for this bug, first iteration (31.34 KB, application/octet-stream)
2000-12-07 17:17 PST, edburns
no flags Details
tar.gz fix for this bug, second iteration: works on solaris, has comments. (32.96 KB, application/octet-stream)
2000-12-08 12:09 PST, edburns
no flags Details

Description Alexei V. Mokeev 2000-07-12 04:39:06 PDT
When we try to add new bookmark to the empty folder 
via method addBookmark(BookmarkEntry mayBeNullParent, BookmarkEntry bookmark) of
Bookmarks interface, then we just got "ASSERTION: illegal value 'aIndex>=1'" and 
nothing more. 
Supposed reason: RDF containers are one-indexed(elements numbered 1,2,3.. but
not a 0,1,2 ..). But in BookmarksImpl.java we are use childCount value as a
lastChildIndex and in case of empty folder this value is equals to 0, and then
try to insert new bookmark at this position.

This bug is reproduced on Mozilla M16 and webclient sources from July,07 2000
Comment 1 edburns 2000-07-20 12:31:26 PDT
a
Comment 2 geetha.vaidyanaathan 2000-11-17 14:05:42 PST
Adding Status white board keyword to track all existing Webclient bugs
Comment 3 edburns 2000-12-07 17:17:32 PST
Created attachment 20321 [details]
tar.gz Fix for this bug, first iteration
Comment 4 edburns 2000-12-08 12:00:01 PST
This fix enables the adding of bookmarks and bookmark folders.

 * Due to the vagaries of the mozilla RDF implementation, folders and
 * bookmark entries are handled differently.  For Folders, we don't
 * create a nativeRDFNode at the outset.  Rather, we just create the
 * properties table and stock it with the known keys, then wait for the
 * nativeRDFNode to be created en addBookmark.

 * The adding of bookmark folders is done through the RDF DoCommand
 * interface.  The DoCommand interface creates the nsIRDFResource on
 * your behalf.  We use an nsIRDFObserver to obtain the created resource
 * as the DoCommand executes.


A src_moz/wsRDFObserver.cpp
A src_moz/wsRDFObserver.h
M classes_spec/org/mozilla/webclient/BookmarkEntry.java
M classes_spec/org/mozilla/webclient/test/EMWindow.java
M classes_spec/org/mozilla/webclient/wrapper_native/BookmarkEntryImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/BookmarksImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/RDFTreeNode.java
M src_moz/Makefile.win
M src_moz/Makefile.in
M src_moz/RDFActionEvents.cpp
M src_moz/RDFActionEvents.h
M src_moz/RDFTreeNode.cpp
M src_moz/rdf_util.cpp
M src_moz/rdf_util.h
M src_moz/motif/NativeLoaderStub.cpp
M src_share/jni_util.cpp
M src_share/jni_util.h
Comment 5 edburns 2000-12-08 12:09:00 PST
Created attachment 20356 [details]
tar.gz fix for this bug, second iteration: works on solaris, has comments.
Comment 6 edburns 2000-12-11 17:17:38 PST
Fix checked in.
Comment 7 Vladimir Strigun 2001-10-22 08:03:14 PDT
Verified with : mozilla branch Netscape61_RELEASE and blackwood branch 
JAVADEV_6_1_20010831 under Win NT 4.0.
I can correctly insert first item to bookmark folder.
Comment 8 Alexei V. Mokeev 2001-10-22 08:04:57 PDT
VERIFIED

Note You need to log in before you can comment on or make changes to this bug.