Bugs item #1529344, was opened at 2006-07-26 16:47
Message generated for change (Comment added) made by mhmxs
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=480577&aid=1529344&group_id=55394

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Interface (example)
Group: None
Status: Open
Resolution: None
Priority: 2
Private: No
Submitted By: Trudi Ersvaer (trudiersvaer)
Assigned to: Nobody/Anonymous (nobody)
Summary: JXplorer's table editor doesn't reset

Initial Comment:
JXplorer's table editor doesn't reset after doing a 
change class.

Steps to reproduce...
1. go to an entry (or create one) that has the 
following object classes: organizationalUnit, 
inetOrgPerson, person, organizationalPerson.
2. click the Table Editor tab
3. click the Change Class button
4. remove inetOrgPerson
5. click ok (inetOrgPerson and associated attributes 
are removed as expected)
6. click Reset

The Table Editor view does not reset back to include 
the inetOrgPerson attributes.



----------------------------------------------------------------------

Comment By: Decker (mhmxs)
Date: 2012-03-22 12:32

Message:
I do a solution for the problem, i hope it's good enough to commit on
com.ca.directory.jxplorer.viewer.TableAttributeEditor class. (sorry I
cannot upload patch)


# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -46,6 +46,11 @@
     boolean virtualEntry = false;
 
     /**
+     * Copy of the original entry.
+     */
+       DXEntry originalEntry = null;
+       
+    /**
      * Copy of the current entry.
      */
     DXEntry currentEntry = null;
@@ -164,7 +169,7 @@
             public void actionPerformed(ActionEvent e)
             {
                 myEditor.stopCellEditing();
-                tableData.reset();
+                               displayEntry(originalEntry, dataSource, false);
             }
         });
 
@@ -505,11 +510,20 @@
      */
     public void displayEntry(DXEntry entry, DataBrokerQueryInterface ds)
     {
+               displayEntry(entry, ds, true);
+       }
+       
+    private void displayEntry(DXEntry entry, DataBrokerQueryInterface ds,
boolean storeOriginalEntry)
+    {
         myEditor.stopCellEditing();
 
 
 //        checkedDN = null; // hack - resets promptForSave.
 
+        // Store original Entry for reset
+               if (storeOriginalEntry && entry.getStatus() == 0)
+                       originalEntry = new DXEntry(entry);
+               
\ No newline at end of file
         // Set the globals...
         currentEntry = entry;
         dataSource = ds;


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=480577&aid=1529344&group_id=55394

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Jxplorer-devel mailing list
Jxplorer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jxplorer-devel

Reply via email to