Index: /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/components/DataCategoryEditor.xml
===================================================================
--- /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/components/DataCategoryEditor.xml	(revision 2655)
+++ /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/components/DataCategoryEditor.xml	(revision 2656)
@@ -81,5 +81,5 @@
               <strings jsxname="cdf" jsxwidth="100%" jsxheight="100%" jsxxmlid="DC-dc-_jsx_1_4b" jsxcdfid="dc-_jsx_1_4b"></strings>
               <object type="jsx3.gui.StackGroup">
-                <variants jsxoverflow="2" jsxselectedindex="0"></variants>
+                <variants jsxoverflow="2" jsxselectedindex="1"></variants>
                 <strings jsxname="stackgroup" jsxrows="*,27,27"></strings>
                 <object type="jsx3.gui.Stack">
@@ -88,5 +88,5 @@
                   <object type="jsx3.gui.Block">
                     <variants jsxoverflow="2" jsxrelativeposition="0" jsxleft="0" jsxtop="0"></variants>
-                    <strings jsxname="pane" jsxwidth="100%" jsxheight="100%" jsxdisplay="" jsxpadding="5 5 0 5" jsxvisibility="visible"></strings>
+                    <strings jsxname="pane" jsxwidth="100%" jsxheight="100%" jsxdisplay="none" jsxpadding="5 5 0 5" jsxvisibility="visible"></strings>
                     <dynamics jsxbgcolor="ISOcat logo bg color"></dynamics>
                     <object type="jsx3.gui.CDF">
@@ -197,5 +197,5 @@
                                   <object type="jsx3.gui.Select">
                                     <variants jsxwidth="150" jsxheight="18" jsxxmlasync="1" _isfocusing="true"></variants>
-                                    <strings jsxname="type" jsxxmlurl="xml/dc-types.xml" jsxmargin="0 4 0 0" jsxcdfattribute="type"></strings>
+                                    <strings jsxname="type" jsxxmlurl="xml/dc-types.xml" jsxmargin="0 4 0 0" jsxcdfattribute="type" jsxvalue="closed"></strings>
                                     <events jsxselect="this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller.changedType();"></events>
                                   </object>
@@ -592,5 +592,5 @@
                   <object type="jsx3.gui.Block">
                     <variants jsxoverflow="2" jsxrelativeposition="0" jsxleft="0" jsxtop="0"></variants>
-                    <strings jsxname="pane" jsxwidth="100%" jsxheight="100%" jsxdisplay="none" jsxpadding="5 5 0 5" jsxvisibility="visible"></strings>
+                    <strings jsxname="pane" jsxwidth="100%" jsxheight="100%" jsxdisplay="" jsxpadding="5 5 0 5" jsxvisibility="visible"></strings>
                     <dynamics jsxbgcolor="ISOcat logo bg color" jsxborder="@Inset Top"></dynamics>
                     <object type="jsx3.gui.CDF">
@@ -609,5 +609,5 @@
                             <object type="jsx3.gui.LayoutGrid">
                               <variants jsxrelativeposition="0" jsxleft="0" jsxtop="0" jsxoverflow="2"></variants>
-                              <strings jsxname="layout (--)" jsxrows="30,120,35,130,35,725" jsxwidth="100%" jsxheight="100%" jsxstyleoverride="overflow-y:scroll;" jsxcols="*,20"></strings>
+                              <strings jsxname="layout (--)" jsxrows="30,130,35,130,35,725" jsxwidth="100%" jsxheight="100%" jsxstyleoverride="overflow-y:scroll;" jsxcols="*,20"></strings>
                               <object type="jsx3.gui.Block">
                                 <variants jsxoverflow="1"></variants>
@@ -621,5 +621,5 @@
                               <object type="jsx3.gui.LayoutGrid">
                                 <variants jsxrelativeposition="1" jsxleft="0" jsxtop="0" jsxoverflow="2"></variants>
-                                <strings jsxname="profileRow" jsxcols="175,16,250,*" jsxwidth="100%" jsxheight="100%" jsxrows="120" jsxdisplay=""></strings>
+                                <strings jsxname="profilesRow" jsxcols="191,*,20" jsxwidth="100%" jsxheight="100%" jsxrows="120" jsxdisplay=""></strings>
                                 <object type="jsx3.gui.Block">
                                   <variants jsxrelativeposition="1" jsxoverflow="3" jsxspy="1"></variants>
@@ -627,22 +627,46 @@
                                   <events jsxspy="org.isocat.spyglass(&quot;profile&quot;);"></events>
                                 </object>
-                                <object type="jsx3.gui.Image">
-                                  <variants jsxoverflow="2" jsxrelativeposition="1"></variants>
-                                  <strings jsxname="mandatory" jsxsrc="http://isocat:8080/famfamfam/silk/icons/bullet_red.png" jsxpadding="" jsxmargin="10"></strings>
-                                </object>
-                                <object type="jsx3.gui.Block">
-                                  <variants jsxoverflow="1"></variants>
-                                  <strings jsxname="block" jsxwidth="100%" jsxheight="100%" jsxrelativeposition="1" jsxmargin="10"></strings>
-                                  <object type="jsx3.gui.Block">
-                                    <variants jsxheight="100" jsxwidth="250" jsxrelativeposition="0" jsxoverflow="1" jsxleft="0" jsxtop="0"></variants>
-                                    <strings jsxname="block" jsxdisplay=""></strings>
-                                    <object type="jsx3.gui.Matrix">
-                                      <variants jsxheaderheight="0" jsxpagingmodel="1" jsxselectionmodel="2" jsxjsxxmlasync="1" jsxscalewidth="1"></variants>
-                                      <strings jsxname="profiles" jsxbgcolor="#efefff" jsxbodyborder="1px solid #dfdfef" jsxxmlid="profiles-_jsx_1_pc"></strings>
-                                      <events jsxselect="jsx3.log('EVENT: (jsxselect). Record: ' + strRECORDID);" jsxchange="var c = this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller;&#xA;c.changed();&#xA;c.profilesChanged();"></events>
-                                      <xslparameters jsx_rowbg1="#ffffff" jsx_rowbg2="#efefff"></xslparameters>
-                                      <object type="jsx3.gui.Matrix.Column">
-                                        <variants></variants>
-                                        <strings jsxname="profile" jsxwidth="*" jsxcellpadding="2" jsxpath="jsxtext"></strings>
+                                <object type="jsx3.gui.Block">
+                                  <variants jsxheight="100" jsxoverflow="1"></variants>
+                                  <strings jsxname="block" jsxwidth="100%" jsxrelativeposition="1" jsxmargin="10"></strings>
+                                  <object type="jsx3.gui.LayoutGrid">
+                                    <variants jsxrelativeposition="0" jsxleft="0" jsxtop="0" jsxoverflow="2"></variants>
+                                    <strings jsxname="layoutCols" jsxcols="*,20" jsxwidth="100%" jsxheight="100%"></strings>
+                                    <object type="jsx3.gui.Block">
+                                      <variants jsxoverflow="2"></variants>
+                                      <strings jsxname="pane1" jsxwidth="100%" jsxheight="100%"></strings>
+                                      <object type="jsx3.gui.Matrix">
+                                        <variants jsxpagingmodel="1" jsxselectionmodel="0" jsxjsxxmlasync="1" jsxautorow="0"></variants>
+                                        <strings jsxname="profiles" jsxbodyborder="1px solid #dfdfef" jsxheaderborder="1px solid #dfdfef" jsxbgcolor="#efefff" jsxxmlurl="http://isocat:8080/isocat/interface/JSXAPPS/ISOcat/xml/empty.xml" jsxxmlid="profiles-_jsx_1_1mq" jsxsortpath="jsxtext" jsxsorttype="text"></strings>
+                                        <events jsxafteredit="" jsxchange="" jsxaftercommit="var c = this.getAncestorOfName('DataCategoryEditor').controller;c.changed();c.profilesChanged();"></events>
+                                        <xslparameters jsx_rowbg1="#ffffff" jsx_rowbg2="#efefff"></xslparameters>
+                                        <object type="jsx3.gui.Matrix.Column">
+                                          <variants jsxwidth="16"></variants>
+                                          <strings jsxname="imageButtonColumn" jsxpadding="3" jsxcellpadding="1" jsxvaluetemplate="@empty"></strings>
+                                          <dynamics jsxborder="@Outset" jsxbg="@Bevel TopDown" jsxbgcolor="@Solid Disabled"></dynamics>
+                                          <object type="jsx3.gui.ImageButton">
+                                            <variants jsxstate="0" jsxwidth="16" jsxheight="16" jsxenabled="1" jsxprefetch="1" jsxtype="0"></variants>
+                                            <strings jsxname="imageButtonMask" jsximage="http://isocat:8080/Tango/16x16/actions/list-remove.png" jsxdisabledimage="http://isocat:8080/Tango/16x16/actions/list-remove.png" jsxoverimage="http://isocat:8080/Tango/16x16/actions/list-remove.png" jsxdownimage="http://isocat:8080/Tango/16x16/actions/list-remove.png" jsxonimage="http://isocat:8080/Tango/16x16/actions/list-remove.png"></strings>
+                                            <events jsxexecute="var id = this.emGetSession().recordId;&#xA;var c = this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller;&#xA;if (id == 'jsxautorow') {&#xA;  this.getParent().getParent().commitAutoRowSession();&#xA;} else {&#xA;  this.getParent().getParent().deleteRecord(id, true);&#xA;}&#xA;c.changed();"></events>
+                                          </object>
+                                        </object>
+                                        <object type="jsx3.gui.Matrix.Column">
+                                          <variants></variants>
+                                          <strings jsxname="profile" jsxwidth="100" jsxtext="Profile" jsxpadding="2" jsxcellpadding="3 0 0 4" jsxvaluetemplate="@empty" jsxformathandler="@lookup" jsxpath="jsxid"></strings>
+                                          <dynamics jsxborder="@Outset" jsxbg="@Bevel TopDown" jsxbgcolor="@Solid Disabled"></dynamics>
+                                          <object type="jsx3.gui.Select">
+                                            <variants jsxrelativeposition="0" jsxleft="16" jsxtop="0" jsxheight="20" jsxzindex="10" jsxwidth="425"></variants>
+                                            <strings jsxname="profileMask" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;&gt;&#xA;&lt;record jsxid=&quot;1&quot; jsxtext=&quot;One&quot;/&gt;&#xA;&lt;record jsxid=&quot;2&quot; jsxtext=&quot;Two&quot;/&gt;&#xA;&lt;record jsxid=&quot;3&quot; jsxtext=&quot;Three&quot;/&gt;&#xA;&lt;/data&gt;" jsxdisplay="none" jsxvalue="profile-5" jsxxmlid="profiles-_jsx_1_17b"></strings>
+                                          </object>
+                                        </object>
+                                      </object>
+                                    </object>
+                                    <object type="jsx3.gui.Block">
+                                      <variants jsxoverflow="1"></variants>
+                                      <strings jsxname="pane2" jsxwidth="100%" jsxheight="100%"></strings>
+                                      <object type="jsx3.gui.ImageButton">
+                                        <variants jsxwidth="16" jsxheight="16" jsxtype="0" jsxprefetch="1" jsxstate="0"></variants>
+                                        <strings jsxname="imagebutton" jsximage="http://isocat:8080/Tango/16x16/actions/list-add.png" jsxoverimage="http://isocat:8080/Tango/16x16/actions/list-add.png" jsxdownimage="http://isocat:8080/Tango/16x16/actions/list-add.png" jsxonimage="http://isocat:8080/Tango/16x16/actions/list-add.png" jsxdisabledimage="http://isocat:8080/Tango/16x16/actions/list-add.png" jsxtip="Add a profile."></strings>
+                                        <events jsxexecute="this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller.addProfile();&#xA;"></events>
                                       </object>
                                     </object>
@@ -769,5 +793,5 @@
                                         <object type="jsx3.gui.Menu">
                                           <variants jsxxmlasync="1"></variants>
-                                          <strings jsxname="languageMenuLeft" jsxtip="Select a language section." jsxtext="Language" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;/&gt;" jsxxmlid="language-_jsx_1_pc-left" jsximage="images/flag.png"></strings>
+                                          <strings jsxname="languageMenuLeft" jsxtip="Select a language section." jsxtext="Language" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;/&gt;" jsxxmlid="language-_jsx_1_17b-left" jsximage="images/flag.png"></strings>
                                           <events jsxexecute="this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller.selectLanguageSection(this,objRECORD); "></events>
                                         </object>
@@ -779,5 +803,5 @@
                                         <object type="jsx3.gui.Menu">
                                           <variants jsxxmlasync="1"></variants>
-                                          <strings jsxname="languageMenuRight" jsxtip="Select a language section." jsxtext="Language" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;/&gt;" jsxxmlid="language-_jsx_1_pc-right" jsximage="images/flag.png"></strings>
+                                          <strings jsxname="languageMenuRight" jsxtip="Select a language section." jsxtext="Language" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;/&gt;" jsxxmlid="language-_jsx_1_17b-right" jsximage="images/flag.png"></strings>
                                           <events jsxexecute="this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller.selectLanguageSection(this,objRECORD);"></events>
                                         </object>
@@ -881,5 +905,5 @@
                               <dynamics jsxborder="@No jsxborder"></dynamics>
                               <object type="jsx3.gui.TabbedPane">
-                                <variants selectedIndex="2" jsxselectedindex="0" jsxshowtabs="0"></variants>
+                                <variants selectedIndex="2" jsxselectedindex="1" jsxshowtabs="0"></variants>
                                 <strings jsxname="simpleComplexTabs" jsxtextalign="0" jsxbgcolor="white"></strings>
                                 <object type="jsx3.gui.Tab">
@@ -888,5 +912,5 @@
                                   <object type="jsx3.gui.Block">
                                     <variants jsxoverflow="2" jsxrelativeposition="0" jsxleft="0" jsxtop="0"></variants>
-                                    <strings jsxname="pane" jsxwidth="100%" jsxheight="100%" jsxdisplay="" jsxvisibility="visible" jsxbg=""></strings>
+                                    <strings jsxname="pane" jsxwidth="100%" jsxheight="100%" jsxdisplay="none" jsxvisibility="visible" jsxbg=""></strings>
                                     <dynamics jsxbgcolor="@Transparent BG" jsxborder="@No jsxborder"></dynamics>
                                     <object type="jsx3.gui.LayoutGrid">
@@ -951,5 +975,5 @@
                                   <object type="jsx3.gui.Block">
                                     <variants jsxoverflow="2" jsxrelativeposition="0" jsxleft="0" jsxtop="0" jsxloadtype="4"></variants>
-                                    <strings jsxname="pane" jsxwidth="100%" jsxheight="100%" jsxdisplay="none" jsxvisibility="visible"></strings>
+                                    <strings jsxname="pane" jsxwidth="100%" jsxheight="100%" jsxdisplay="" jsxvisibility="visible"></strings>
                                     <dynamics jsxbgcolor="@Transparent BG" jsxborder="@No jsxborder"></dynamics>
                                     <object type="jsx3.gui.LayoutGrid">
@@ -982,5 +1006,5 @@
                                           <object type="jsx3.gui.Select">
                                             <variants jsxwidth="150" jsxheight="18" jsxxmlasync="1" _isfocusing="true"></variants>
-                                            <strings jsxname="datatypes" jsxmargin="0 4 0 0" jsxxmlid="datatypes-_jsx_1_pc" jsxvalue="datatype-1"></strings>
+                                            <strings jsxname="datatypes" jsxmargin="0 4 0 0" jsxxmlid="datatypes-_jsx_1_17b" jsxvalue="datatype-1"></strings>
                                             <events jsxselect="this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller.changed();"></events>
                                           </object>
@@ -996,6 +1020,6 @@
                                       </object>
                                       <object type="jsx3.gui.TabbedPane">
-                                        <variants selectedIndex="2" jsxselectedindex="-1" jsxshowtabs="0"></variants>
-                                        <strings jsxname="closedConstrainedTabs" jsxtextalign="0" jsxbgcolor="white" jsxvisibility=""></strings>
+                                        <variants selectedIndex="2" jsxselectedindex="0" jsxshowtabs="0"></variants>
+                                        <strings jsxname="closedConstrainedTabs" jsxtextalign="0" jsxbgcolor="white" jsxvisibility="visible"></strings>
                                         <object type="jsx3.gui.Tab">
                                           <variants jsxzindex="3" jsxheight="20"></variants>
@@ -1078,5 +1102,5 @@
                                                         <object type="jsx3.gui.Select">
                                                           <variants jsxrelativeposition="0" jsxleft="16" jsxtop="20" jsxheight="20" jsxzindex="10" _isfocusing="true"></variants>
-                                                          <strings jsxwidth="100%" jsxname="ruleTypeMask" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;&gt;&#xA;&lt;record jsxid=&quot;1&quot; jsxtext=&quot;One&quot;/&gt;&#xA;&lt;record jsxid=&quot;2&quot; jsxtext=&quot;Two&quot;/&gt;&#xA;&lt;record jsxid=&quot;3&quot; jsxtext=&quot;Three&quot;/&gt;&#xA;&lt;/data&gt;" jsxdisplay="none" jsxxmlid="ruletypes-_jsx_1_pc" jsxvalue="Object Constraint Language"></strings>
+                                                          <strings jsxwidth="100%" jsxname="ruleTypeMask" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;&gt;&#xA;&lt;record jsxid=&quot;1&quot; jsxtext=&quot;One&quot;/&gt;&#xA;&lt;record jsxid=&quot;2&quot; jsxtext=&quot;Two&quot;/&gt;&#xA;&lt;record jsxid=&quot;3&quot; jsxtext=&quot;Three&quot;/&gt;&#xA;&lt;/data&gt;" jsxdisplay="none" jsxxmlid="ruletypes-_jsx_1_17b" jsxvalue="Object Constraint Language"></strings>
                                                           <events jsxselect="this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller.changed();"></events>
                                                         </object>
@@ -1145,5 +1169,5 @@
                                                 <object type="jsx3.gui.Menu">
                                                   <variants jsxxmlasync="1"></variants>
-                                                  <strings jsxname="linguisticMenuLeft" jsxtip="Select a linguistic section." jsxtext="Language" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;/&gt;" jsxxmlid="linguistic-_jsx_1_pc-left" jsximage="images/flag.png"></strings>
+                                                  <strings jsxname="linguisticMenuLeft" jsxtip="Select a linguistic section." jsxtext="Language" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;/&gt;" jsxxmlid="linguistic-_jsx_1_17b-left" jsximage="images/flag.png"></strings>
                                                   <events jsxexecute="this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller.selectLinguisticSection(this,objRECORD); "></events>
                                                 </object>
@@ -1155,5 +1179,5 @@
                                                 <object type="jsx3.gui.Menu">
                                                   <variants jsxxmlasync="1"></variants>
-                                                  <strings jsxname="linguisticMenuRight" jsxtip="Select a linguistic section." jsxtext="Language" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;/&gt;" jsxxmlid="linguistic-_jsx_1_pc-right" jsximage="images/flag.png"></strings>
+                                                  <strings jsxname="linguisticMenuRight" jsxtip="Select a linguistic section." jsxtext="Language" jsxxml="&lt;data jsxid=&quot;jsxroot&quot;/&gt;" jsxxmlid="linguistic-_jsx_1_17b-right" jsximage="images/flag.png"></strings>
                                                   <events jsxexecute="this.getAncestorOfName(&quot;DataCategoryEditor&quot;).controller.selectLinguisticSection(this,objRECORD);"></events>
                                                 </object>
Index: /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/DCEditor.js
===================================================================
--- /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/DCEditor.js	(revision 2655)
+++ /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/DCEditor.js	(revision 2656)
@@ -107,4 +107,5 @@
 	DCEditor_prototype.issues;
 	DCEditor_prototype.profiles;
+	DCEditor_prototype.profileMask;
 	DCEditor_prototype.dataElementNames;
 	DCEditor_prototype.languageMenuLeft;
@@ -216,4 +217,5 @@
 		this.issues               = this.view.getDescendantOfName("issues");
 		this.profiles             = this.view.getDescendantOfName("profiles");
+		this.profileMask          = this.view.getDescendantOfName("profileMask");
 		org.isocat.gui.DCEditor.log.info("- DC editor profiles list["+this.profiles+"]");
 		this.dataElementNames     = this.view.getDescendantOfName("dataElementNames");
@@ -229,5 +231,5 @@
 		org.isocat.gui.DCEditor.log.info("- DC editor language section right["+this.languageSectionRight+"]");
 		this.datatypes            = this.view.getDescendantOfName("datatypes");
-		this.valueDomain    = this.view.getDescendantOfName("ProfileValueDomainEditor").controller;
+		this.valueDomain          = this.view.getDescendantOfName("ProfileValueDomainEditor").controller;
 		this.ruleTypeMask         = this.view.getDescendantOfName("ruleTypeMask");
 		this.constraints          = this.view.getDescendantOfName("constraints");
@@ -300,6 +302,5 @@
 		var cacheId = "profiles-"+this.view.getId();
 		var profs = org.isocat.loadDynamicCDFDocument(new jsx3.net.URI("http://isocat:8080/isocat/rest/info/profiles.xml"),"Profiles2CDF_xsl",null,cacheId);
-		this.profiles.setXMLId(cacheId);
-		this.profiles.repaint();
+		this.profileMask.setXMLId(cacheId);
 		
 		// set the callbacks for the profile value domains editor
@@ -518,14 +519,19 @@
 		var cdfDoc = this.cdf.getXML();
 		
-		var profDoc = org.isocat.createSubCDFDocument(cdfDoc,"profiles",true);
-		org.isocat.gui.DCEditor.log.info("profiles["+profDoc.getRecordIds().lenght+"]:"+profDoc);
-		var profs = profDoc.getRecordIds();
+		// profiles
+		var profs = org.isocat.createSubCDFDocument(cdfDoc,"profiles",true);
+		var cacheId = this.cacheId()+"-profiles";
+		org.isocat.APP.getCache().setDocument(cacheId,profs);
+		this.profiles.setXMLId(cacheId);
+		this.profiles.repaintData();
+		profs = profs.getRecordIds();
 		if (typeof(profs)=='undefined' || profs.length==0) {
 		    this.setCheck("profiles","none");
 		} else {
 		    this.setCheck("profiles","ok");
-		    this.profiles.setValue(profs);
-		}
-
+		}
+
+
+        // data element names
 		var cacheId = this.cacheId()+"-datanames";
 		org.isocat.APP.getCache().setDocument(cacheId,org.isocat.createSubCDFDocument(cdfDoc,"datanames",true));
@@ -882,4 +888,11 @@
 	};
 	
+	DCEditor_prototype.addProfile = function() {
+		var rec = this.profiles.insertRecord({jsxid:'profile-0',jsxtext:''});
+		jsx3.sleep(function() { this.profiles.focusCellById('profile-0',"jsxtext"); },"focusCell",this,true);
+		this.changed();
+		this.profilesChanged();
+	};
+	
 	DCEditor_prototype.addDataElementName = function() {
 		var id =  jsx3.xml.CDF.getKey();
@@ -897,5 +910,4 @@
 	
 	DCEditor_prototype.profilesChanged = function() {
-		// callback from the ProfilesInput
 		var profDoc = this.getProfiles();
 	    org.isocat.gui.DCEditor.log.info("DCEditor.profilesChanged():profs["+profDoc+"]");
@@ -905,5 +917,4 @@
 		    this.setCheck("profiles","none");
     		org.isocat.APP.alert("Profile membership","A data category should be a member of at least one profile!",null,"OK");
-
 		} else {
 		    this.setCheck("profiles","ok");
@@ -916,16 +927,17 @@
 	
 	DCEditor_prototype.getProfiles = function() {
-	    var profs = new jsx3.xml.CDF.Document();
-	    profs.createDocumentElement("data");
-		profs.setAttribute("jsxid","jsxroot");
-        for (var iter = this.profiles.getSelectedNodes().iterator();iter.hasNext();) {
-            var prof = iter.next();
-			prof = prof.cloneNode(true);
-			prof.removeChildren();
-			prof.removeAttribute("checked");
-			prof.removeAttribute("jsxopen");
-			profs.appendChild(prof);
-        }
-        return profs;
+	    var profs = this.profiles.getXML().cloneDocument();
+	    org.isocat.gui.DCEditor.log.info("DCEditor.getProfiles(...):profs["+profs+"]");
+	    profs = jsx3.xml.CDF.Document.wrap(profs);
+	    org.isocat.gui.DCEditor.log.info("DCEditor.getProfiles(...):profs["+profs+"]");
+	    var recs = profs.getRecordIds();
+	    org.isocat.gui.DCEditor.log.info("DCEditor.getProfiles(...):recs["+recs+"]");
+	    for (var i = 0; i<recs.length; i++) {
+	        var rec = profs.getRecordNode(recs[i]);
+    	    org.isocat.gui.DCEditor.log.info("DCEditor.getProfiles(...):rec["+i+"]["+recs[i]+"]["+rec+"]");
+	        rec.setAttribute("jsxtext",this.profileMask.getRecord(recs[i]).jsxtext);
+	        org.isocat.gui.DCEditor.log.info("DCEditor.getProfiles(...):rec["+i+"]["+recs[i]+"]["+rec+"]");
+	    }
+	    return profs;
 	};
 		
@@ -1618,5 +1630,5 @@
 	
 	DCEditor_prototype.focusDescrSection = function() {
-        jsx3.sleep(function() { this.profiles.setValue(this.profiles.getSelectedIds()); },"revealSelectedProfile",this,true);
+        //jsx3.sleep(function() { this.profiles.setValue(this.profiles.getSelectedIds()); },"revealSelectedProfile",this,true);
 	}
 });
Index: /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/settings/builder.xml
===================================================================
--- /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/settings/builder.xml	(revision 2655)
+++ /cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/settings/builder.xml	(revision 2656)
@@ -54,6 +54,6 @@
     <record jsxid="JSXAPPS/ISOcat" type="map">
       <record jsxid="recentFiles" type="array">
-        <record jsxid="0" type="string">components/appCanvas.xml</record>
-        <record jsxid="1" type="string">components/DataCategoryEditor.xml</record>
+        <record jsxid="0" type="string">components/DataCategoryEditor.xml</record>
+        <record jsxid="1" type="string">components/appCanvas.xml</record>
         <record jsxid="2" type="string">components/ProfilesInput.xml</record>
         <record jsxid="3" type="string">xml/dc.xml</record>
