> 1.How applet (javascript in html) pass parameter to Pivot?How to Piovt get > the parameter(Map<String, String> properties?)
You can pass initial startup properties to the application via an applet <param> tag: <param name="startup_properties" value="foo=abc&bar=123"> These values will be passed to the applications's startup() method in the properties argument. If you want to pass information dynamically, you can see the DOM Interaction demo for an example: http://pivot.apache.org/demos/dom-interaction.html The application defines a sayHello() method that is called by JavaScript. It also calls out to a JavaScript function in the page using the BrowserApplicationContext.eval() method: http://svn.apache.org/repos/asf/pivot/trunk/demos/src/org/apache/pivot/demos/dom/DOMInteractionDemo.java The relevant script looks like this: <script type="text/javascript"> // This function will be called by Pivot function sayHello(helloText) { alert(helloText); } // This function will call into Pivot function onHelloButtonClick() { var applet = document.getElementById("applet"); applet.getApplication().sayHello("Hello from JavaScript!"); } </script> > 2.is there any example for QueryServlet? especially for post TableView data > to server side and how QueryServlet parse the JSON? A QueryServlet example will be included in Pivot 1.5.1 along with a tutorial example. However, you can see it here for now: http://svn.apache.org/repos/asf/pivot/branches/1.5.x/tutorials-server/src/org/apache/pivot/tutorials/webqueries/server/ The client application is here: http://svn.apache.org/repos/asf/pivot/branches/1.5.x/tutorials/src/org/apache/pivot/tutorials/webqueries/ It simulates a simple expense management system.
