TIWCGJQTreeViewSearchPlugin Class
Enables searching for nodes whose title contains a given string, works on async trees too
IWCGJQCommon.TIWCGJSon
IWCGJQTreeView.TIWCGJQTreeViewBasePlugin
IWCGJQTreeView.TIWCGJQTreeViewSearchPlugin
type TIWCGJQTreeViewSearchPlugin = class(TIWCGJQTreeViewBasePlugin) end;
The TIWCGJQTreeViewSearchPlugin type exposes the following members.
Name | Description | |
---|---|---|
![]() | Ajax | This object can be used to make a request to the server on each search - useful if you are using async trees. That way you can return an array of IDs that need to be loaded before the actual DOM search is performed (so that all the nodes that will match the search are loaded). For example if the user searches for "string", you get that on the server side, check the database and find out that there is a node containing that string. But the node is the child of some other node, etc - so in your response you must return the path to the node (without the node itself) as ids: ["#root_node","#child_node_3"]. This means that jstree will load those two nodes before doing the client side search, ensuring that your node will be visible. The ajax config object is pretty much the same as the jQuery ajax settings object. You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the search string as a paramater. Whatever you return in the function will be sent to the server as data. You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the search string as a paramater. Whatever you return in the function will be used as the URL of the ajax request. The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used as the array of IDs. |
![]() | CGJSContainer | Represents property |
![]() | ClassData | Represents property |
![]() | InstList | Represents property |
![]() | IsStored | Represents property |
![]() | JSon | Return the Interface of SuperObject (ISuperObject) (Inherited from TIWCGJSon.) |
![]() | JSonEvents[string] | Represents property |
![]() | List | Represents property |
![]() | MemberList | Represents property |
![]() | Owner | Represents property |
![]() | PluginActive | Represents property |
![]() | PropCount | Represents property |
![]() | PropIndexByName[string] | Represents property |
![]() | PropList | Represents property |
![]() | PropName | Represents property |
![]() | PropNameByIndex[Integer] | Represents property |
![]() | SearchMethod | The method to use for searching. The other options bundled with jstree are "jstree_contains" (case insensitive search) and "jstree_title_contains" (case insensitive based on the title tag of the A node). For multiple word search take a look this: https://github.com/vakata/jstree/issues/10 - you can easily write your own method too. |
![]() | ShowOnlyMatches | If set to true all non-matching nodes are hidden and only the matching nodes (and their parents) are left visible, until the search is cleared. Keep in mind show_only_matches is heavy on the browser/DOM and is still experimental. |
![]() | SObj | Represents property |
![]() | TreeView | Represents property |
Name | Description | |||
---|---|---|---|---|
![]() | AddBooleanMember(string,Boolean,Boolean,Boolean) | Represents method | ||
![]() | AddColorMember(string,TIWCGColor,Boolean,Boolean) | Represents method | ||
![]() | AddCurrencyMember(string,Currency,Boolean,Boolean) | Represents method | ||
![]() | AddDoubleMember(string,Double,Boolean,Boolean) | Represents method | ||
![]() | AddDynObjListMember(string,Boolean,Boolean) | Represents method | ||
![]() | AddEnumMember(string,string[],Byte,Boolean,Boolean) | Represents method | ||
![]() | AddEnumSetMember(string,string[],Void,Word,Boolean,Boolean) | Represents method | ||
![]() | AddFuncMember(string,string,string,Boolean,TIWCGJSonFuncClass,Boolean,Boolean) | Represents method | ||
![]() | AddHTML5(TIWHTMLTag) | Represents method | ||
![]() | AddIntegerMember(string,Integer,Boolean,Boolean) | Represents method | ||
![]() | AddJSonMember(string,TCGJSon,Boolean,Boolean) | Represents method | ||
![]() | AddMembers | The procedure add jquery properties.
| ||
![]() | AddObjListMember(string,TIWCGJSonListClass,Boolean,Boolean,Boolean) | Represents method | ||
![]() | AddObjMember(string,TIWCGJSonClass,Boolean,Boolean,Boolean) | Represents method | ||
![]() | AddSimpleArrayMember(string,Boolean,Boolean,Boolean) | Represents method | ||
![]() | AddStringMember(string,string,Boolean,Boolean) | Represents method | ||
![]() | AddVariantMember(string,Variant,Boolean,Boolean) | Represents method | ||
![]() | AfterConstruction | Represents method | ||
![]() | Assign(TPersistent) | Represents method | ||
![]() | CheckJSonMember(Integer) | Represents method | ||
![]() | ClearSearch | Clears the current search. This function is automatically called when doing a new search. Triggers an event. | ||
![]() | ConvertEnumToString(string) | Represents method | ||
![]() | ConvertSetToString(string,TCGStringArray) | Represents method | ||
![]() | DoSearch(string) | Searches for nodes matching the supplied string. Triggers an event. | ||
![]() | FreeJSonObj(Integer) | Overloaded. Represents method | ||
![]() | FreeJSonObj(string) | Overloaded. Represents method | ||
![]() | GetBooleanValue(Integer) | Represents method | ||
![]() | GetCGJSContainer | Represents method | ||
![]() | GetColorValue(Integer) | Represents method | ||
![]() | GetCurrencyValue(Integer) | Represents method | ||
![]() | GetCustomJq(string,ISuperObject) | Represents method | ||
![]() | GetDoubleValue(Integer) | Represents method | ||
![]() | GetDynObjListValue(Integer) | Represents method | ||
![]() | GetEnumAsString(Integer) | Represents method | ||
![]() | GetEnumerValue(Integer) | Represents method | ||
![]() | GetEnumSetValue(Integer,Pointer) | Represents method | ||
![]() | GetFixedScript(TIWCGJSonFunc,Boolean) | Represents method | ||
![]() | GetFuncValue(Integer) | Represents method | ||
![]() | GetHTMLName | Represents method | ||
![]() | GetImplComponent | Represents method | ||
![]() | GetIntegerValue(Integer) | Represents method | ||
![]() | GetIsStored | Represents method | ||
![]() | GetItemIndex | Represents method | ||
![]() | GetIWCLName | Represents method | ||
![]() | GetJSon | Represents method | ||
![]() | GetJSonByType(Boolean,Boolean) | Represents method | ||
![]() | GetJSonEx(Boolean,Boolean,TIWCGResponseMemberList,Boolean) | Represents method | ||
![]() | GetJSonValue(Integer) | Represents method | ||
![]() | GetJSonValueObj(Integer) | Represents method | ||
![]() | GetMemberJSon(TCGJSonMember,ISuperObject,Boolean,Boolean,string) | Represents method | ||
![]() | GetMemberSetterHandler(TObject,TCGJSonMember) | Represents method | ||
![]() | GetMemberSetterScriptParts(TIWCGResponseMemberList,TIWCGJScript) | Represents method | ||
![]() | GetMembersJSon(TIWCGResponseMemberList,Boolean,Boolean) | Represents method | ||
![]() | GetObjListValue(Integer) | Represents method | ||
![]() | GetObjValue(Integer) | Represents method | ||
![]() | GetOwner | Represents method | ||
![]() | GetPropName | Represents method | ||
![]() | GetSimpleArrayValue(Integer) | Represents method | ||
![]() | GetStringValue(Integer) | Represents method | ||
![]() | GetVariantValue(Integer) | Represents method | ||
![]() | InternalGetJSon(TEachPropJSonProc,Boolean,Boolean,Void,Boolean,Boolean,TIWCGResponseMemberList,Boolean) | Represents method | ||
![]() ![]() | IsArray | Represents method | ||
![]() | IsBooleanStored(Integer) | Represents method | ||
![]() | IsColorStored(Integer) | Represents method | ||
![]() | IsCurrencyStored(Integer) | Represents method | ||
![]() | IsDoubleStored(Integer) | Represents method | ||
![]() | IsEnumerStored(Integer) | Represents method | ||
![]() | IsEnumSetStored(Integer) | Represents method | ||
![]() | IsFuncStored(Integer) | Represents method | ||
![]() | IsIntegerStored(Integer) | Represents method | ||
![]() | IsJSonObjStored(string) | Represents method | ||
![]() | IsJSonStored(Integer) | Represents method | ||
![]() | IsObjStored(Integer) | Represents method | ||
![]() | IsStringStored(Integer) | Represents method | ||
![]() | IsVariantStored(Integer) | Represents method | ||
![]() | jsClearSearch | Represents method | ||
![]() | jsDoSearch(string) | Represents method | ||
![]() ![]() | JSonEscape | Represents method | ||
![]() ![]() | JSonIdent | Represents method | ||
![]() ![]() | JSonNameQuote | Represents method | ||
![]() | ResetProps | Represents method | ||
![]() | SetBooleanValue(Integer,Boolean) | Represents method | ||
![]() | SetColorValue(Integer,TIWCGColor) | Represents method | ||
![]() | SetCurrencyValue(Integer,Currency) | Represents method | ||
![]() | SetDoubleValue(Integer,Double) | Represents method | ||
![]() | SetDynObjListValue(Integer,TIWCGJSonDynObjList) | Represents method | ||
![]() | SetEnumerValue(Integer,Byte) | Represents method | ||
![]() | SetEnumSetValue(Integer,Pointer) | Represents method | ||
![]() | SetFuncValue(Integer,TIWCGJSonFunc) | Represents method | ||
![]() | SetIntegerValue(Integer,Integer) | Represents method | ||
![]() | SetJSonValue(Integer,TCGJSon) | Represents method | ||
![]() | SetObjListValue(Integer,TIWCGJSonList) | Represents method | ||
![]() | SetObjValue(Integer,TIWCGJSon) | Represents method | ||
![]() | SetPluginActive(boolean) | Represents method | ||
![]() | SetSimpleArrayValue(Integer,TIWCGJSonSimpleArray) | Represents method | ||
![]() | SetStringValue(Integer,string) | Represents method | ||
![]() | SetVariantValue(Integer,Variant) | Represents method | ||
![]() | StoreProperty(PPropInfo,TObject) | Represents method | ||
![]() | SupportsSetter(TObject,TCGJSonMember) | Represents method |