|
Rank: Newbie
Groups: Registered
Joined: 9/14/2016 Posts: 2
|
I am running a trial version of Rapidspellweb to test the spell checks using Zkoss framework before buying it.
I have changed the web.xml to use inline typing and also added this peace of code in the main.zul
<?script type="text/javascript" content="zk.afterMount(function() {rsw_setupTextBoxes(true);});"?> <style src="~/sans-style.css" /> <script src="a.rapidspellweb?t=r&n=RapidSpell-AYT.js" />
<script type="text/javascript"> rapidSpell.setParameterValue('default', 'UserDictionaryFile', '~/userdictionaries/dict.txt'); </script>
When i run developer tools, IE is loading the RapidSpell-AYT.js, but it is throwing 2 exceptions
one is rapidSpell is undefined and another is Out of stack space at a.rapidspellweb(1121,112)
Please suggest me how I can fix this..as I need to give demo to my boss to buy the tool
Thanks in Advance
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Hi, thanks for posting some code - it looks like you've already seen the KB article https://keyoti.com/kb/De...uestId=262&catId=45
Could you post the complete page please? Thanks Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Please try making these changes: In web.xmlChange this Code: <servlet-mapping> <servlet-name>RapidSpellWebHandlerServlet</servlet-name> <url-pattern>*.rapidspellweb</url-pattern> </servlet-mapping>
to Code: <servlet-mapping> <servlet-name>RapidSpellWebHandlerServlet</servlet-name> <url-pattern>/rs/a.rapidspellweb</url-pattern> </servlet-mapping>
In any .zul pages where you use RapidSpellChange this Code: <script src="a.rapidspellweb?t=r&n=RapidSpell-AYT.js" />
to Code: <script src="/rs/a.rapidspellweb?t=r&n=RapidSpell-AYT.js" />
You may also need to call Code: rapidSpell.ayt_helperURL ='/rs/a.rapidspellweb?t=a';
in the code block, eg. Code: <script type="text/javascript"> rapidSpell.setParameterValue('default', 'UserDictionaryFile', '~/userdictionaries/1.txt'); rapidSpell.ayt_helperURL ='/rs/a.rapidspellweb?t=a'; </script>
Please let me know how it goes. Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Newbie
Groups: Registered
Joined: 9/14/2016 Posts: 2
|
Hi Jim, I have modified my web.xml as like you said Quote:<!-- Rapid Spell Checker context Configuration --> <context-param> <param-name>RapidSpellUserDictionaryDirs</param-name> <param-value>~/userdictionaries/</param-value> </context-param> <context-param> <param-name>RapidSpellUserDictionaryLegacyMode</param-name> <param-value>false</param-value> </context-param> Quote:<!-- Rapid Spell Checker servlet Configuration --> <servlet> <description>Handles requests for RapidSpell Web</description> <servlet-name>RapidSpellWebHandlerServlet</servlet-name> <servlet-class>com.keyoti.rapidSpell.web.ControlServlet</servlet-class> <init-param> <param-name>licenseKey</param-name> <param-value></param-value> </init-param> </servlet> Quote:<!-- Rapid Spell Checker servlet mapping Configuration --> <servlet-mapping> <servlet-name>RapidSpellWebHandlerServlet</servlet-name> <url-pattern>/rs/a.rapidspellweb</url-pattern> </servlet-mapping> and we have one main.zul which is like a desktop page in which I have added this code Quote:<script defer="true"><![CDATA[ zk.afterMount(function () { rsw_setupTextBoxes(true); }); ]]> </script> <style src="~/sans-style.css" /> <script src="/rs/a.rapidspellweb?t=r&n=RapidSpell-AYT.js" /> <script type="text/javascript"> rapidSpell.setParameterValue('default', 'UserDictionaryFile', '~/userdictionaries/dict.txt'); rapidSpell.ayt_helperURL ='/rs/a.rapidspellweb?t=a'; </script> and in detail.zul where it contains textbox also added the following code Quote:<script type="text/javascript" content="zk.afterMount(function() {rsw_setupTextBoxes(true);});"?>
<style src="~/sans-style.css" /> <script src="/rs/a.rapidspellweb?t=r&n=RapidSpell-AYT.js"/> <script type="text/javascript"> rapidSpell.setParameterValue('default', 'UserDictionaryFile', '~/userdictionaries/dict.txt'); rapidSpell.ayt_helperURL ='/rs/a.rapidspellweb?t=a'; </script> and now it is throwing the same Out of stack space error when I load the detail.zul file.
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Which version of ZK are you using? Also, can you post the entire page, just so I'm not missing anything? Thanks Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
For other ZK users, the solution was to NOT include Code: <script src="/rs/a.rapidspellweb?t=r&n=RapidSpell-AYT.js" ></script>
on the inner detail page. It only needs to be on the master main.zul -your feedback is helpful to other users, thank you!
|
|