Hi,
We are trying to pass HashTable as a function parameter from JAVA to ACL.
Following is the sample code snippet for the same. We are able to pass
the HashTable from java to ACL and also able to print the HashTable as
{KEY=VALUE} .
*SOS.java*:
Hashtable<string,string> hashTable = new
Hashtable<string,string>();
hashTable.put("ONE", "1111");
hashTable.put("TWO", "2222");
String cmd = "ditadocs::sos_link_insert(" + "\" + text +
"\" +"," + id + ",\"+hashTable+"\"+")";
Acl.eval(cmd);
*ditadocs.acl:*
function sos_link_insert($docname,$doc,$selectedTopics){
consoleT("DOCNAME:".$docname); /#DOCNAME:whatIsDocument1/
consoleT("DOC:".$doc); /#DOC40/
consoleT("SelectedTopics".$selectedTopics);*/#SelectedTopics{TWO=2222,
ONE=1111}/*
local arr[];
local i;
# Convert the ArrayList object to an ACL array
local size = java_array_to_acl($selectedTopics, $arr);
consoleT("SIZE".$size);
///#Exception occurred during event dispatching://
// #com.arbortext.epic.AclException: [A11276] Badly formed number
"{TWO=two, ONE=one}" in expression/
for ($junk in $selectedTopics) {
local $temp = $selectedTopics[$junk];
consoleT("TEMP".$temp);
}
/ #com.arbortext.epic.AclException: [A11284] Operand of "in" operator
must be array name: selectedTopics//
// #(at line 359 of file "C:\Program Files
(x86)\Arbortext\Editor\custom\init\ditadocs.acl")/
But some how, I could not able to iterate through HashTable in our ACL
function. Can we pass Hashtable as a function parameter? If so, Please
suggest on iterate through HashTable in ACL function.
Thanks,
Samba.