I am giving one value to the representedObject and another to the
title, and I seem to be able to populate it just fine. When I try to
get the value of the selected item, for some reason the only thing I
get is the actual index of the selection. The third choice in my
button, for example, returns a 2 (0,1,2...) instead of the actual value
I gave that selection (10).
The button is named category, and I am populating it like so:
<trigger path="Internet.category.action.setPopups" language="XQuery">
let $httpRequest :=
http-request("http://localhost/sherlock_cats.html") /* List of
Categories/Values */
let $html := http-request-value($httpRequest, "DATA")
let $menuItems := $html/cat
let $categoryList := for $item in $menuItems
let $value := $item/@id
let $title := string-combine($item/text()/convert-html(.), "")
return dictionary(("representedObject", $value), ("title",
$title))
return dictionary(("Internet.category.items", $categoryList),
("Internet.category.selectedItem", "All")) /* All is a default value */
</trigger>
In the <trigger ...> declaration where I need that value, I set
inputs="cat_id=Internet.category.selectedItem" but, like I said, all I
get back is the index of the title.