Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Need rapidspell Dynamically added text areas - RapidSpell Web Java - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
Vijayaragavan
#1 Posted : Thursday, April 12, 2018 2:19:07 PM
Rank: Newbie

Groups: Registered

Joined: 4/12/2018
Posts: 5
Hi all,
I have a requirement to verify spell check for dynamically text areas. I have seen other posts here about this topic.But it doesn't suit my requirement. I have static text areas fields in jsp and have a button click.
Everytime when I click that button I am cloning the text areas fields from jsp. If I add rapidspell.**textbox(true) after clone statement I am getting rapidspell undefined error. Is there a way to add rapidspell via JavaScript.
Currently the working scenario is, I have added rapidspell web under my text area field and using rapidspell Id I am passing this to script and it's proceeding further. Either I want to create dynamic rapidspell id or need to create rapidspell in jQuery instead of in jsp
Please suggest any kind of ideas to achieve this.
Thanks in advance.
Jim
#2 Posted : Thursday, April 12, 2018 4:31:06 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Hi, I don't know if you're familiar with this, but there are 2 ways to use RapidSpell:

1. JSP Tag usage
Code:

<RapidSpellWeb:rapidSpellWebLauncher

rapidSpellWebPage="RapidSpellCheckerPopUp.jsp"
....
/>


2. Javascript usage, see https://keyoti.com/produ.../JSmode/As_you_type.htm

You can see this in the help https://keyoti.com/produ...vaWeb/Helpv5/index.html go to Examples->Client Side Usage

You need to do what you're doing the second way, but please make sure you follow the setup instructions completely as you will need to register our a.rapidspellweb servlet in your web.xml

If you have trouble after that just let me know.

Jim

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


Vijayaragavan
#3 Posted : Friday, April 13, 2018 10:42:38 AM
Rank: Newbie

Groups: Registered

Joined: 4/12/2018
Posts: 5
Hi Jim
Thanks much for the input. I am new to rapidspell web. Currently I am consuming this via jsp tag. In the jsp tag I am seeing attribute id ="" . I am passing this id to the spell check script and I am getting the value in the spellcheck pop-up if it is misspelled.
Is there a way to get or change this ID dynamically via JavaScript. Or I have to cosume the 2nd method in the earlier posu that you have mentioned.
Please suggest
Jim
#4 Posted : Friday, April 13, 2018 4:36:20 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Sorry I'm a bit confused as to what you mean, could you please post lots of your code and demonstrate with it what you mean and what you're trying to do?

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


Vijayaragavan
#5 Posted : Saturday, April 14, 2018 6:02:00 AM
Rank: Newbie

Groups: Registered

Joined: 4/12/2018
Posts: 5
Hi Jim,
I can give overview about my code.

JSP Sample Code:

<div>
<textarea name="mytextBox" id="textbox1" wrap='true' cols='55' rows='10'></textarea>
<textarea name="mytextBox" id="textbox2" wrap='true' cols='55' rows='10'></textarea>
<textarea name="mytextBox" id="textbox3" wrap='true' cols='55' rows='10'></textarea>
</div>

JSP Rapid Spell tag used in my JSP for static text boxes and text areas:

Static text area used in my JSP:
<textarea name="mytextBox" id="textbox2" wrap='true' cols='55' rows='10'></textarea>
<RapidSpellWeb:rapidSpellWebLauncher
id="rapidSpellWebLauncher2"
rapidSpellWebPage="/contxRoot/spellcheck/popup"
textComponentName="myForm.mytextBox"
/>

Then I am passing this rapidSpellWebLauncher2 id to my spell check script. It opens the popup spell checker and show the misspelled words.

The real problem is textComponentName="myForm.mytextBox" (name="mytextBox"), it expects the unique name for all text boxes and text areas. I have some text areas which is having same "name" (property which is mapped in controller pojo attributes) in the jsp form. I am sending all the text area box values as a single array to my controller pojo class attributes while submitting the form. I can/t have unique "name" property for all the generated text areas.

If i have multiple text boxes with the same "name" attribute, spell check is not showing the misspelled words present in those text boxes. And also I am generating these text boxes with different id's via jquery. So, I cant use jsp tag rapid spell for these dynamic text boxes. But I need to have spell check for these text boxes.

Hope you got my scenario now.

Please suggest a way to achieve this. I am waiting for your reply.

Thanks in advance

Best Regards,
Vijay
Jim
#6 Posted : Sunday, April 15, 2018 4:32:58 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Thanks Vijay, firstly you should be using our Javascript based usage (see my first post for the link) because it seems to be closer to what you're trying to do. Also we don't support accessing the Javascript functions from the JSP tags.

That said, you can set the textComponentName to the ID, eg. textComponentName="textbox1"

Hope that helps
Jim
-your feedback is helpful to other users, thank you!


Vijayaragavan
#7 Posted : Tuesday, April 17, 2018 2:39:31 PM
Rank: Newbie

Groups: Registered

Joined: 4/12/2018
Posts: 5
Hi Jim
Sorry for the late reply. Thank you so much for the valuable input.
Actually it worked for me that using id in textcomponentName.
For another screen I am using rapidspell jsp tag as I posted in the previous post, when I pass html attribute id or name in rapidspell web launcher script for eg
<Text area name="empName" value="${myPojo.empName}" id ="textarea1" />
<Rapidspell:rapidspell web launcher
Id ="mytext"
textcomponentname="empName"
Callback="${myPojo.empName}"
RSmultipleid ="spellcheckbutton" />

When I click the spell check button it is opening the pop-up and getting the text from the text field. But when I click other buttons like ignore or finish or ignore all it is not fetching or continue with the other text areas. Please let me know if you need more input from my side.

Thanks much once again.

Regards,
Vijay
Jim
#8 Posted : Tuesday, April 17, 2018 4:53:07 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Good to hear, Vijay.

Just remove

Callback="${myPojo.empName}"

because that attribute has been deprecated. Should work then.

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


Vijayaragavan
#9 Posted : Thursday, April 19, 2018 8:32:07 AM
Rank: Newbie

Groups: Registered

Joined: 4/12/2018
Posts: 5
Hi Jim,
You made my day. Thank you so much. It worked !!!. Thank you so so much once again.
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.