Various platforms are available for J2EE such as ZK (zkoss.org). Usage with ZK is mostly the same as standard RapidSpell usage, except the RapidSpell Servlet (a.rapidspellweb) needs to run with a different URL (/rs/a.rapidspellweb instead of a.rapidspellweb). 1. Install as per standard instructions in the documentation (ie modify the web.xml file in your app) 2. Change the web.xml file, from this: <servlet-mapping> <servlet-name>RapidSpellWebHandlerServlet</servlet-name> <url-pattern>*.rapidspellweb</url-pattern> </servlet-mapping> To this <servlet-mapping> <servlet-name>RapidSpellWebHandlerServlet</servlet-name> <url-pattern>/rs/a.rapidspellweb</url-pattern> </servlet-mapping> 3. Add this to your .zul file <?script type="text/javascript" content=" zk.afterMount(function() {rsw_setupTextBoxes(true);});"?> And load the RapidSpell script with <script src="/rs/a.rapidspellweb?t=r&n=RapidSpell-AYT.js" /> Eg. a full working page <?page automaticTimeout="false"?> <window title="Hello World!!" border="normal" width="200px"> <?script type="text/javascript" content=" zk.afterMount(function() {rsw_setupTextBoxes(true);});"?> <script src="/rs/a.rapidspellweb?t=r&n=RapidSpell-AYT.js"></script> <script type="text/javascript"> rapidSpell.setParameterValue('default', 'UserDictionaryFile', '~/userdictionaries/1.txt'); rapidSpell.ayt_helperURL ='/rs/a.rapidspellweb?t=a'; </script> <label value="You are using: ${desktop.webApp.version}"/> <textbox rows="50" id='tb1'></textbox> </window> In this page, the textbox will be ‘as you type’ enabled. If you have any trouble please let us know at support at keyoti.com |