Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Out of stack space - using ZK framework - RapidSpell Web Java - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
raja_jan09
#1 Posted : Wednesday, September 14, 2016 1:59:52 PM
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&amp;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

Jim
#2 Posted : Wednesday, September 14, 2016 6:43:36 PM
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!


Jim
#3 Posted : Wednesday, September 14, 2016 8:50:25 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Please try making these changes:

In web.xml

Change 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 RapidSpell

Change this

Code:

<script src="a.rapidspellweb?t=r&amp;n=RapidSpell-AYT.js" />


to

Code:

<script src="/rs/a.rapidspellweb?t=r&amp;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!


raja_jan09
#4 Posted : Wednesday, September 14, 2016 9:14:54 PM
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&amp;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&amp;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.


Jim
#5 Posted : Wednesday, September 14, 2016 10:01:04 PM
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!


Jim
#6 Posted : Friday, September 16, 2016 4:29:40 AM
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&amp;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!


Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.