Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Inline control question - RapidSpell Web Java - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
seadog00@yahoo.com
#1 Posted : Wednesday, January 29, 2014 5:32:41 PM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
Hi, I'm using v3 of RapidSpell for java and we are currently using the WInline control and the WInlineTextBox along with as you type spell checking. Unfortunately, we are experiencing some network latency/load issues and we would like to change the behavior of the spell check events. What I would like to do is keep what we have now, but instead of checking on the fly as the user types, I just want to fire spell check when the WInlineTextBox loses focus. I currently use the following attributes:
checkAsYouTypeOnPageLoad="true"
asYouTypeDelay="10"
showButton="false"

When I set the first value to false or remove it completely, I get an alert box when the page loads that reads something like, "No spelling errors found". Additionally, I tried adjusting the asYouTypeDelay to a ridiculously large value like 100000, but that doesn't seem to affect the frequency of the network calls; rather, those seem to conincide with the character input. Can you direct me toward a way to achieve using the inline controls, but only spell checking when the textbox loses focus?

On a related topic, is there a synopsis of all the attributes somewhere that gives their meanings (not javadocs) and perhaps default values if not specified?

Thanks!
Jim
#2 Posted : Thursday, January 30, 2014 5:41:58 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Hi, yes it can be done by adding this Javascript to the page

Code:

<script type="text/javascript">
    function RS_OnTextBoxesInitialized (){
             for(var i=0; i<rsw_tbs.length; i++){
                var tb = new RSWITextBox(rsw_tbs[i].shadowTB.id);
               
                tb.OnBlur = function (sender, args){
                    if(! (rsw_contextMenu && rsw_contextMenu.isVisible))
                        for(var j=0; j<rsw_scs.length; j++){
                            if(rsw_scs[j].textBoxID==sender._getTBS().shadowTB.id)
                                rsw_scs[j].OnSpellButtonClicked();
                        }
                };

               
            }
        }
</script>



And setting these attributes

Code:

        <RapidSpellWeb:rapidSpellWInlineTextBox id="rswitb1"
            width="300" height="300"
            tabIndex="1"  multiline="true"
            maxLength="400"
            ></RapidSpellWeb:rapidSpellWInlineTextBox>

        <RapidSpellWeb:rapidSpellWInline
            id="rswi1"
            textComponentID="rswitb1"
            <b>
            checkAsYouType="false"
            showButton="false"
</b>
        />


The only attribute docs we have are http://keyoti.com/produc...ell/javaWeb/taglib.xml, sorry I know it's not the most user friendly presentation. But if you have any questions you're welcome to ask (as you know).

Best
Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


seadog00@yahoo.com
#3 Posted : Thursday, January 30, 2014 4:31:46 PM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
Hi Jim. I tried your suggestion, but it does not seem to be working correctly. When the page first loads, I can step through the code you gave me and see that it is attaching the event to all the winline textboxes on the page; however, I get an alert message after the page loads that reads, "No Spelling Errors In Text." If I focus on one of the winline textboxes and start typing, I can still see calls to a.rapidspellweb being made as I type. If I focus on the textbox and do not type anything, but remove focus, I see the alert message "No Spelling Errors In Text." again. What can I try next?

On a related note, somewhere along the way, it seems one of the upgrades I did caused the loss the ability to right-click on a misspelled word and get the suggestion popup. It must not be all that important to the users since nobody complained, but it would be nice to have the feature working again. The error message reported is as follows:

a.rapidspellweb?t=r&n=inline.js, line 3919 character 17
SCRIPT87: Invalid argument.

Is this a known problem?
Jim
#4 Posted : Thursday, January 30, 2014 5:38:02 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Hmmm, could I see your code please?

Thanks

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


seadog00@yahoo.com
#5 Posted : Thursday, January 30, 2014 5:54:48 PM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
Sure, do you want the rendered HTML or original JSP source? Also, can I e-mail it to you and if so, what is the e-mail address?
Jim
#6 Posted : Thursday, January 30, 2014 11:29:21 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
JSP please via support @ keyoti.com

Thanks
Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


Jim
#7 Posted : Saturday, February 1, 2014 5:32:10 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Thanks for the code - so the reason is that when you have any RapidSpellWInline where checkAsYouType is enabled, it adds it for all.

So, maybe you want to implement what we talked about in all spell checkers anyway (in which case setting checkAsYouType=false in all tags will solve it) otherwise... we can fix it in v4, or maybe there's a workaround I can find for you.

Regarding the right click error, which browser is this happening in? Also, can you debug the error and get some contextual code out of the browser please (otherwise I'd need your actual JAR copy to get to the line number, but sometimes that's even wrongly reported)....

Best
Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


seadog00@yahoo.com
#8 Posted : Tuesday, February 4, 2014 9:24:26 PM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
Jim,

Changing all the controls to checkAsYouType="false" fixed the first problem; however, where there are no misspelled words in the box when it loses focus, the alert dialog still displays with the message "No Spelling Errors In Text". Also, the popup with suggestions still does not work. When I debug it, it is throwing an Invalid Argument exception on the following line of the show() method below in the inline.js script file.

this.CMIFelement.style.height = (rsw_getElementHeight(rsS37[308]) - 4) + rsS37[41];

The exact error message is:

SCRIPT87: Invalid argument.
a.rapidspellweb?t=r&n=inline.js, line 3919 character 17


function show() {
if (typeof(this.textBox.enabled) != rsS37[9] && !this.textBox.enabled)
return;
this.setVisible(true);
this.moveCMElement();
this.setCMContent(this.getContentHtml());
if (typeof(rsw_useIFrameMenuBacker) == rsS37[9] || rsw_useIFrameMenuBacker) {
if (navigator.userAgent.toLowerCase().indexOf(rsS37[310]) > -1 && !rsw_isMac) {
this.CMIFelement.style.left = this.x + rsS37[41];
this.CMIFelement.style.top = this.y + rsS37[41];
this.CMIFelement.style.height = (rsw_getElementHeight(rsS37[308]) - 4) + rsS37[41];
this.CMIFelement.style.width = (rsw_getElementWidth(rsS37[308]) - 4) + rsS37[41];

}
}
}
Jim
#9 Posted : Wednesday, February 5, 2014 5:09:10 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
For the message, set showNoErrorsMessage="false" in each RapidSpellWInline control.

For the menu issue - really odd that this hasn't been reported. I'm not sure which argument is invalid, since it's pretty straightforward. Would be good to know which version JAR you have (just a date would be enough), it might be worth getting the latest v3 build.

You could try setting rsw_useIFrameMenuBacker=false; in a Javascript block - what that does is no longer use an iframe underneath the menu. We had to do that because otherwise certain HTML controls (like drop downs) would 'shine through' the menu (I think it's an IE issue only), so you would see the drop down on top of the suggestions context menu.

Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


seadog00@yahoo.com
#10 Posted : Wednesday, February 5, 2014 3:08:49 PM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
Thanks, I will set that attribute as you described.

The version we are using shows a date of 4/5/2013 and the MANIFEST.MF file shows:

Manifest-Version: 1.2
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_19-b04 (Sun Microsystems Inc.)
Class-Path: RapidSpellMDict.jar
Sealed: true
Specification-Title: RapidSpell Web
Specification-Version: 3.2.130301

Should I download the latest version and try it?
Jim
#11 Posted : Wednesday, February 5, 2014 4:15:01 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Before we do that, can I quickly ask which browser the error happens in?

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


seadog00@yahoo.com
#12 Posted : Wednesday, February 5, 2014 7:29:39 PM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
I have only tested in IE 9, but that is where it is happening.
Jim
#13 Posted : Thursday, February 6, 2014 1:32:28 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Thanks, I think it's resolved with this - if not could you reproduce on a simple JSP and post it please.

https://www.dropbox.com/...AVA-3-2-ContextMenu.zip

Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


seadog00@yahoo.com
#14 Posted : Thursday, February 6, 2014 2:22:33 AM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
OK, I will give it a try and let you know. Thanks!
Jim
#15 Posted : Thursday, February 6, 2014 10:55:28 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
For anyone else, the resolution was to move the first RapidSpellWinline tag outside of a DIV which could be hidden. This is only an issue with v3.

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


seadog00@yahoo.com
#16 Posted : Friday, February 28, 2014 1:35:22 AM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
Jim,

I have run into another snag with the latest version of the control I have integrated along with the changes related to this thread. I have 5 instances of the WInline and WInlineTextBox controls on one page. It is long enough to cause the page to have a vertical scrollbar and the controls start about 2/3 of the way down the initial visible portion of the page and continue near the bottom of the page. So, users typically scroll the page to reveal all of the WInlineTextBoxes. It seems that when one of the boxes loses focus and fires the spellcheck event and the box is empty or there are no misspelled words, there is a weird side effect depending on which type of input control that gains focus next. If the input control is a select box, the page scrolls to the top and that select box loses focus. If the input control is a text box, it moves the cursor to the beginning of any text that is in that text box. Can you suggest anything to alleviate this issue?
Jim
#17 Posted : Friday, February 28, 2014 5:40:03 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
I do see it in IE8, but not 9 (which I thought you were using, so that's odd). I'll try to resolve it as soon as I can.

EDIT: I should say, IE8 and 9 running off of IE11 emulation - which might explain it.

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


Jim
#18 Posted : Friday, February 28, 2014 6:00:12 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
This will resolve it.

https://www.dropbox.com/...SWEBJAVA-3.2-140228.zip

Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


seadog00@yahoo.com
#19 Posted : Monday, March 3, 2014 10:30:57 PM
Rank: Member

Groups: Registered

Joined: 8/18/2012
Posts: 27
Thanks Jim, that resolved it!
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.