ClassID | ID | Description | Comments |
3 | 55 | Load the top level entries | The command loads IDs and contents of the products. The command also returns the ID of the panel statement used to load the subentries. The statement may contain information about the labels of the search fields. |
3 | >= 10000 | Load the subentries | Command to load subentries |
18 | 95 | Load the ID of the script to be executed at Double click of a product. |
The following mechanism is used to load the products in the Treeview:
The actual load command depends on the type of data connection. ODBC connections expect an SQL SELECT statement, XML data pools a XML SELECT statement, SOAP connections expect a getProductList statement.
Only Panelstatement 55 (top) level evaluates the search input, so only this statement has input values that must be marked with ? in the command. The following entries are expected.
Parameter Index | Type | Description | Remarks |
2 | string | Content of the first search field with % appended | Standard search only. For further search criteria see here. |
3 | Content of the second search field with % appended | ||
4 | int | rownum < ... | Always replaced by 100 (only ODBC connections) |
All commands use the same scheme for return values.
Column
normal/ SOAP getList |
Parameter | Type | Description | Remarks | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | 1 | ID | int | Unique ID of the data. | über die ID des Datensatzes wird der Status (+, x, ....) der Produkte in der Palette gesetzt. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | 2 | ID2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | 3 | ID3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | - | StringID | char* | StringID of the data | NOT ON SOAP CONNECTIONS (When using SOAP, use row 17 for the StringID)
For using StringIDs, the following conditions have to be fulfilled:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | 4 | classID | int | internal ClassID of the object | Currently unused | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | 5 | iconID | int | Number of the Icon to be used for the object |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | 6 | 1. column of the palette | string | values shown in the palette list | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | 7 | 2. column of the palette | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | 8 | forceDelete | int | Object status |
>0 : If the object is not planned in the document, it is not included in the product list. If the object is scheduled in the document, it will be deleted from the list if all references to this product are removed from the document. 0 : Normal scheduled product <0 : The object should not be planned in the document. The link button is deactivated and the object is not checked when checking the status with . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | 9 | panelStatementID | int | >= 10000, reference to a panel statement of the same type, which can be used to load the subentries. | If the value is 0, the object cannot be expanded any further. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | 10 | docID | int | ID of the document | The parameter is currently unused and can be filled with 0. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | 11 | masterpage | string | Pattern page name in the form Prefix name (e.g. "C-Double page") | If a new page has to be created for this product during product construction, the specified sample page is used. If the sample page does not exist or if the specification is empty, the standard page of the structure is used.
The specification is only relevant for grid-oriented product construction. In the page template-based structure, sample pages are assigned via the page templates. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | 12 | Reserved | string | Enter the value "" here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 | 13 | Own_Icon | string | Icon description | "" or Definition of an own icon for the entry. If the field is not empty, the specification iconID from column 6 (or 5 for SOAP) will be ignored. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | 14 | pagetemplateID | int | Before building the product, create a new page with Pagetemplate create |
0 or valid ID of a pagetemplates. In the palette, the name of the pagetemplates separated by @ after the template name is displayed: Template@Pagetemplate Use this option carefully: By specifying a pagetemplates the product will automatically be created on a new page during product creation. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | 15 | Reserved | int | Enter the value 0 here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | 16 | pageItemID | int | Template with which the product should be inserted |
Templates are determined page by page: If the given template is limited to left pages but has a specification for a right-sided template, the right-sided template is automatically used on right pages. If the specification is 0 or the specified template does not exist, the standard template of the structure will be used. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- | 17 | stringID | string | StringID of the product | ONLY SOAP
For the StringID to be used, the following two conditions must be met :
|
The commands support the full set of panel statement tags such as <user>, <now>. You can find a complete list of these variables here.
To allow access to the values of the parent objects when loading subentries, a number of additional variables are supported in the statements for loading these objects.
Name | Type | Description | Comments |
parent.ID | int | ID of the parent record | With parent.parent the parent record of the parent record is referenced, etc. |
parent.ID2 | |||
parent.ID3 | |||
parent.StringID | string | ||
parent.classID | int | internal ClassID of the parent record | |
parent.Row1 | string | List text of parent record | |
parent.Row2 | |||
parent.ForceDelete | int | Forcedelete value of parent record |
In addition, you can access the current values in the search fields of the palette at any level. The figure shows the tags assigned to the search fields. If a search field is empty, the tag gets the value "%", otherwise exactly the content of the search field (i.e. not converted to capital letters).
The statements have the same columns for database and XML and for main and subentries, with the only difference that under XML and for all subentries (database and XML) the order of ClassID and IconID is reversed : ... IconID, ClassID, ...
To rename search fields or to assign them at startup use the mechanism described here.
From version 1.4.2 R 504 the entries of the product research can be provided with own icons. The following table gives a complete list of all supported sources:
Keyword | source | Description | Transparency | Example |
ImagePath |
local file system |
Complete path to the image file The path may begin with the valid alias name for folder. |
none |
ImagePath: "$DESKTOP/../.././InDesign/Plugins/Pictures/aaa.png" |
IconPath |
White |
|||
ImageURL |
Network |
Valid URL to image file |
none |
ImageURL : "http://www.hi13.de/tantarantana.jpg" |
IconURL |
White |
|||
SOAPImage | Current SOAP connection |
fieldID an image file of the SOAP service There must be a SOAP connection. |
none |
SOAPImage : "icons/123" |
SOAPIcon |
White |
Caution : In all cases there must be a space before and after the colon.
images are automatically scaled to be fully visible. Images that are not PNG will be scaled versions of the images stored on your computer:
$PREFS/Werk [2]/CS_VERSION/ProductPreviews/17x 17/... with CS_VERSION equal CS6 for ID CS6, CS7 for ID CC, CS8 for ID CC 2014 etc.
This folder or any entries of these folders may be deleted - then previews will be created automatically if required. But files of these folders must not be changed. The images, even if they have known image formats, are not readable by other graphics programs.
To ensure that icons are always visible on the scalable gray of the Illustratir user interface, different icons must be used for light and dark surfaces. It will automatically try to find image files with the following name extension :
If the required variants are not found, the base file is used without an additional name extension.
The transparency of different UI colors can of course no longer be white-based. For transparencies, always use PNG images with alpha channel. In this case, the image or icon specification is equivalent. Here is a sample image with the same colors as the Comet icons:
As path separator you can use / or \ systemindependent.
When using \ as a path separator, please remember that this character must be masked with \, as is usual in strings, i.e. it must be specified as \\. Since most programs for processing database contents also expect \ to be doubled if you want to pass it in a insert or update, you must in most cases pass all \ as \\\\:
when defining the search statement.
select
1, 0, 0, a.id,
3,
2020,
anbsp;label, '''',
0,
10000,
0,
A-Sample Template''',
''',
"ImagePath. "\\\\Users\\\\paul\\\\Desktop/../../InDesign/Plugins/Bilder/buffer.png"'',
0,
0,
0
from comet_container a, comet_planningtypes r
where a.container_id=''0'' and a.active = 1 and r.keyname = a.type_name
order by sort, label
Whether you need to mask the character when defining the search statement for the database or not (so whether you need to write \\ or \\\\), you need to test it with your input program. If you perform the search in the product search, the statement is written to the log file, where all path separators should appear as \\. If you still don't get a single image, the path doesn't point to a readable image.
Here are two examples of SQL and XML.
First the panel statement 55 to load the objects of the first layer.
select ID, 1401, 1702, '' 3, -- unused 2012, -- House Num, name, ForceDelete, 10000, -- Load the subentries 0, '', '', '', 0, 0, 7 -- Template 7 from WIIProducts where ID > ? and upper (num) like ? and upper (name) like ? and rownum < ?
Load the second layer objects.
select ID, <parent.ID>, 123 ,'', 2009, -- Gear ObjectType, Name, Value, ForceDelete, 10001, -- Load the subentries 0, '', '', '', 0, 0, 7 -- Template 7 from WIIElements where productID = <parent.ID> union select ID, <parent.ID>, 123, '', 2010, -- No passing ObjectType, Name, Value, ForceDelete, 10001, 0, '', '', '', 0, 0, 7 -- Template 7 from WIIElements2 where productID = <parent.ID> union select ID, <parent.ID>, 123, '', 2011, -- Heart ObjectType, Name, Value, ForceDelete, 10001, 0, '', '', '', 0, 0, 7 -- Template 7 from WIIElements3 where productID = <parent.ID>'
Load the third layer objects.
select 1, 1401, 1702, '', 2003, -- Incandescent lamp -1, '||to_char(<parent.ID>), <parent.Row2>||' '|| to_char(<parent.ID2>), 0, 0, -- No more subentries 0, '', '', '', 0, 0, 7 -- Template 7 from dual union select 1, 1401, 1702, '', 2002, -- Book with pen -1, '|| to_char(<parent.ID>), <parent.Row2>||' '|| to_char(<parent.ID2>), 0, 0, -- No more subentries 0, '', '', '', 0, 0, 7 -- Template 7 from dual
The instructions for XML are given analogously to the panel statements for databases. Only the following differences have to be considered :
This is an example entry that supports StringIDs. The orange parts return a StringId. The return value of id is automatically converted to a string. In order to load the subentries of the products found in this way, a definition for the panel statement 10001 must also be made.
<panelstatement> <id> 10000>? <usage>1</usage> <domain> <statement> "$MYFILE" select id, <parent.ID>, 123, id objecttype, 2009, name, value, forcedelete, 10001, docid, masterpage, grid.name, grid.elem, grid.id, grid.elemid, pageitemid node elements.element where productid = <parent.ID> </statement> <in_parameters></in_parameters> <out_parameters></out_parameters> <description>Load subentries</description> <hasstringids>1</hasstringids> </panelstatement>
SOAP services must provide a special command to load (sub)product lists. You can find a complete description of the SOAP service here. On the plugin page of the SOAP connection getProductList is used in four different ways :
The following example shows a valid SOAP statement to load the top-level products (Panelstatement 55) :
<panelstatement> <id>55</id> <usage>Download product research products as a treeview> <domain> <domain>/domain> <statement> getProductList id > ? and name like ? and num LIKE ? </statement> <in_parameters></in_parameters> <out_parameters></out_parameters> <description></description> </panelstatement>Unlike the database connection and XML data statements described above, the SOAP statement getProductList does not allow you to specify which panel statement to use to load the subentries. This setting is made on the server side. For example, if the server returns 20000, the panel statement entry might look like this:
<panelstatement> <id>20000</id> <usage>Load subproducts SOAP</usage> <domain> <domain>/domain> <statement> getSubProductList id = <parent.ID> </statement> <in_parameters></in_parameters> <out_parameters></out_parameters> <description></description> </panelstatement>
The entries on the list can react to double clicks. The action to be performed is defined as follows:
Here are some examples of valid panel statements which can be used to define a valid double click ID.
select 900+<depth> from dual; "datafiles.xml" -- any XML file select 900+<depth> select id%3 from ... where ID = ? select id%3 from ... where ID = <ID> -- ? are optional
And here a simple double click script
int main ()
{
showmessage ("Row %d, ID = %d",
gClicked+1,
gRecordID);
return 1;
}
Placeholders of texts and frames can be linked to the respective product by Shift-click in the first column of the product list. The placeholders of all selected frames and/or texts are linked to the product. If the so-called autoload button of the palette is activated (red)
all placeholders will be loaded immediately after linking.
The palette has the ClassID 3