Sitecore custom field treeview with multiselect -


i've created custom treeview field - multiselect treeview.

this field inherited sitecore.shell.applications.contenteditor.treelist overridden method add():

public class multiselecttreelist : treelist {     protected new virtual void add()     {             bool alert = true;             if (this.disabled) return;             string viewstatestring = this.getviewstatestring("id");             var treeviewex = this.findcontrol(viewstatestring + "_all") treeviewex;             assert.isnotnull(treeviewex, typeof (datatreeview));             var listbox = this.findcontrol(viewstatestring + "_selected") listbox;             assert.isnotnull(listbox, typeof (listbox));             if (treeviewex == null)             {                 sheerresponse.alert("treeviewex control not found..", new string[0]);             }             else             {                 item[] selectionitems = treeviewex.getselecteditems();                 if (selectionitems == null)                 {                     sheerresponse.alert("select item in content tree.", new string[0]);                 }                 else                 {                     foreach (item selectionitem in selectionitems)                     {                         if (this.hasexcludetemplateforselection(selectionitem)) return;                         if (this.isdeniedmultipleselection(selectionitem, listbox))                         {                             if (alert)                             {                                 sheerresponse.alert("you cannot select same item twice.", new string[0]);                                 alert = false;                             }                         }                         else                         {                             if (!this.hasincludetemplateforselection(selectionitem)) return;                             sheerresponse.eval("scform.browser.getcontrol('" + viewstatestring +                                                "_selected').selectedindex=-1");                             var listitem = new listitem {id = getuniqueid("l")};                             sitecore.context.clientpage.addcontrol(listbox, listitem);                             listitem.header = this.getheadervalue(selectionitem);                             listitem.value = listitem.id + (object) "|" + selectionitem.id;                             sheerresponse.refresh(listbox);                             setmodified();                         }                     }                 }             }         } } 

i've registered in core database: /sitecore/system/field types/custom types/multiselect tree list: filled assembly , class fields.

added item multiselect treelist field. filled data. multiple selection works ok.

but when try find references using ribbon->navigate->links don't see references items (also missed targetitemid in links table in master database).

when changed sitecore treeview field - works fine.

as far understood crawler don't index field , links not added database.

any ideas how fix this?

register field type in app_config\fieldtypes.config. once done, future writes field included in linkdatabase.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -