コンボボックスのフィルタリング

マスター・ディテール構造のデータセットでデータベースからデータを取得し、コンボボックスのフィルタリングを行います。マスターデータのコンボボックスアイテムが変更されると、ディテールデータのコンボボックスリストが変更されます。

リバインディングを通じたコンボボックスのフィルタリング

Run example

リバインディングせずにフィルタリングする場合

Run example

JSONタイプのファイルリング

<script type="text/javascript" >
var serverUrl = "https://" + location.host;
var productLine = "[\n{\"productLine\":\"Bib-Shorts\"},\n{\"productLine\":\"Bottles and Cages\"},\n{\"productLine\":\"Bottom Brackets\"}\n]";
var productName = "[\n  {\n    \"productLine\": \"Bib-Shorts\",\n    \"productName\": \"Men\'s Bib-Shorts, L\"\n  },\n  {\n    \"productLine\": \"Bib-Shorts\",\n    \"productName\": \"Men\'s Bib-Shorts, S\"\n  },\n  {\n    \"productLine\": \"Bib-Shorts\",\n    \"productName\": \"Men\'s Bib-Shorts, M\"\n  },\n  {\n    \"productLine\": \"Bottles and Cages\",\n    \"productName\": \"Mountain Bottle Cage\"\n  },\n  {\n    \"productLine\": \"Bottles and Cages\",\n    \"productName\": \"Road Bottle Cage\"\n  },\n  {\n    \"productLine\": \"Bottles and Cages\",\n    \"productName\": \"Water Bottle - 30 oz.\"\n  },\n  {\n    \"productLine\": \"Bottom Brackets\",\n    \"productName\": \"LL Bottom Bracket\"\n  },\n  {\n    \"productLine\": \"Bottom Brackets\",\n    \"productName\": \"HL Bottom Bracket\"\n  }\n]";
function SetOZParamters_OZViewer(){
	var oz = document.getElementById("OZViewer");
	oz.sendToActionScript("information.debug", "true");
	oz.sendToActionScript("connection.servlet",serverUrl + "/oz/server");
	oz.sendToActionScript("connection.reportname","/samples/combobox-filtering-json.ozr");
	oz.sendToActionScript("connection.pcount", "2");
	oz.sendToActionScript("connection.args1", "productLine=" + productLine);
	oz.sendToActionScript("connection.args2", "productName=" + productName);
	return true;
}
start_ozjs("OZViewer", serverUrl + "/oz/HTML5viewer/");
</script>

Run example

最終更新