Re: Textarea maxlength issue Struts 6.0.0

2022-07-21 Thread Lukasz Lenart
czw., 21 lip 2022 o 18:07 Matt Williams
 napisał(a):
>
> For Struts 6.0.0:
> The freemarker template for the s:textarea tag is wrong when using 
> 'maxlength' attribute.  It puts the value inside the text area.

This is already addressed in incoming 6.0.1 release
https://issues.apache.org/jira/browse/WW-5198


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: textarea Encoding

2008-07-11 Thread Joachim Rohde

Hi,

are the values still correct within your controller? And which Server 
are you using?


I once had a similar problem, but I am not sure, if my solution can be 
applied to your problem. In my case I tried to deliver strings with 
umlauts as a GET-request-parameter to my controller, which failed. As 
server I used Tomcat. I had to set the URIEncoding of Tomcat to UTF-8 
what solved my problem. A comprehensive description of the problem (and 
solution) can be found here: 
http://tompson.wordpress.com/2007/01/29/encoding-filter-for-java-web-applications/


Hope that helps


Juan Pablo Pizarro schrieb:

Hi All, I've a problem with textarea encoding. I use struts 2.0.11. I
put things like áí or ü into a text area, then I pass that value to
others pages (through session) and the the characters appear as ?.

I looked forums and all problems had a Db involved, not mine.

Any idea?

Thanks.

Juan Pablo.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: textarea

2006-06-22 Thread Miller, Andy
You will also need to do server side validation if you are attempting to
insert/update into a database (i.e., your users may have javascript
disabled in which case a javascript test alone will not be sufficient).
a

Andy Miller
IS Designer
Butte College
530.895.2946

-Original Message-
From: Mukta [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 9:42 PM
To: 'Struts Users Mailing List'
Subject: RE: textarea

Use following javascript function to limit the number of characters to
255
in a textbox:

function checkLength(name)
{
var textBox = document.getElementsByName(name)[0].value;
if (textBox.length255)
{
document.getElementsByName(name)[0].value =
textBox.substring(0,255);
}
}

And call this function on 

onkeyup=checkLength('textareaName');
onmouseout=checkLength('textareaName');




-Original Message-
From: Abhimanyu Koul [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 3:48 PM
To: Struts Mailing list
Subject: textarea

how can i set the maximum number of chars in a textarea. i can only set
columns and rows.

Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
Mobile : +91 9819510090



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: textarea

2006-06-21 Thread nageshkumar.siddu

Hi,
Call a javascript method  onKeyPressDown to validate the length.
--CODE--
script
function  checkLength(obj,max){
if(obj.value.lengthmax){
alert(obj.name+ feild cannot be more than +max);
}

}

/script
BODY

/// some HTML
TEXTAREA NAME=textAreaName onKeyDown=javascript:return
checkLength(this,30)/TEXTAREA
/// some HTML

--CODE--
This will work like a text box maxlength property.
If you want to restrict ctrl+v also , you need to call this method on
corresponding key combination.


Regards,
Nagesh


-Original Message-
From: Abhimanyu Koul [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 3:48 PM
To: Struts Mailing list
Subject: textarea

how can i set the maximum number of chars in a textarea. i can only set
columns and rows.

Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
Mobile : +91 9819510090


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: textarea

2006-06-21 Thread Truong Xuan Tinh
You have to write a javascript function to check in the following event:
onFocus, onChange and onKeyUp of the textarea.
Regards,

Abhimanyu Koul wrote:
 how can i set the maximum number of chars in a textarea. i can only set 
 columns and rows.

 Regards,
 Abhimanyu Koul
 FinEng Solutions (P)  Ltd.
 Mobile : +91 9819510090

   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: textarea

2006-06-21 Thread Bart Busschots

Abhimanyu Koul wrote:

how can i set the maximum number of chars in a textarea. i can only set columns 
and rows.

Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
Mobile : +91 9819510090

  
The only way to do this would be with JavaScript. You'd do something 
like this:


textarea name=blah cols=20 rows=5 onchange=checkLength(this, 50)
/textarea
script type=text/javascript
function checkLength(ta, maxLen){
 if(ta.value.lengthmaxLen){
   window.alert(This text area may only contain  + maxLen +  
characters, you tried to enter  + ta.value.length);

 }
}
/script

HTH

Bart.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: textarea

2006-06-21 Thread Swapan Mazumdar
Hi Abhimanyu,

Wouldn't you do the validation the struts way? Do the validation, chop
and warn.

-Original Message-
From: Truong Xuan Tinh [mailto:[EMAIL PROTECTED] 
Sent: 21 June 2006 12:47 PM
To: Struts Users Mailing List
Subject: Re: textarea

You have to write a javascript function to check in the following event:
onFocus, onChange and onKeyUp of the textarea.
Regards,

Abhimanyu Koul wrote:
 how can i set the maximum number of chars in a textarea. i can only
set columns and rows.

 Regards,
 Abhimanyu Koul
 FinEng Solutions (P)  Ltd.
 Mobile : +91 9819510090

   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

___
This communication together with any attachments transmitted with it
('this E-mail') is intended only for the use of the addressee and may
contain information which is privileged and confidential. 
If the reader of this E-mail is not the intended recipient or the
employee or agent responsible for delivering it to the intended 
recipient you are notified that any use of this E-mail is prohibited.

Addressees should check this E-mail for viruses. 
Mitsol (Pty) Ltd makes no representations as regards 
the absence of viruses in this E-mail.

If you have received this E-mail in error please notify our 
IT Systems Team immediately by E-mail at [EMAIL PROTECTED]

Please then immediately destroy this E-mail and any copies of it.
___


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: textarea

2006-06-21 Thread Mukta
Use following javascript function to limit the number of characters to 255
in a textbox:

function checkLength(name)
{
var textBox = document.getElementsByName(name)[0].value;
if (textBox.length255)
{
document.getElementsByName(name)[0].value =
textBox.substring(0,255);
}
}

And call this function on 

onkeyup=checkLength('textareaName');
onmouseout=checkLength('textareaName');




-Original Message-
From: Abhimanyu Koul [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 3:48 PM
To: Struts Mailing list
Subject: textarea

how can i set the maximum number of chars in a textarea. i can only set
columns and rows.

Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
Mobile : +91 9819510090



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: textarea

2006-06-21 Thread Mukta
Sorry I mean textarea. I have mistakenly written textbox for textarea.
Anyways, its just a variable name. Doesn't affect the functionality.


-Original Message-
From: Mukta [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 22, 2006 10:12 AM
To: 'Struts Users Mailing List'
Subject: RE: textarea

Use following javascript function to limit the number of characters to 255
in a textbox:

function checkLength(name)
{
var textBox = document.getElementsByName(name)[0].value;
if (textBox.length255)
{
document.getElementsByName(name)[0].value =
textBox.substring(0,255);
}
}

And call this function on 

onkeyup=checkLength('textareaName');
onmouseout=checkLength('textareaName');




-Original Message-
From: Abhimanyu Koul [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 3:48 PM
To: Struts Mailing list
Subject: textarea

how can i set the maximum number of chars in a textarea. i can only set
columns and rows.

Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
Mobile : +91 9819510090



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TextArea

2005-07-20 Thread Brent Vaughn
You can use JavaScript to do it.  That is how I have done it beforehand.

-Original Message-
From: Vijay K Anand [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 9:39 AM
To: Struts Users Mailing List
Subject: TextArea

Hi Guys

How to control char maxlength in html:textarea/ ?

Regards
Vijay



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TextArea

2005-07-20 Thread Mark Benussi
Sadly, JavaScript I am afraid.

-Original Message-
From: Vijay K Anand [mailto:[EMAIL PROTECTED] 
Sent: 20 July 2005 15:39
To: Struts Users Mailing List
Subject: TextArea

Hi Guys

How to control char maxlength in html:textarea/ ?

Regards
Vijay



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TextArea

2005-07-20 Thread Larry Meadors
Yep, not an option in HTML, gotta javascript it, or catch it on the server.

Larry


On 7/20/05, Mark Benussi [EMAIL PROTECTED] wrote:
 Sadly, JavaScript I am afraid.
 
 -Original Message-
 From: Vijay K Anand [mailto:[EMAIL PROTECTED]
 
 How to control char maxlength in html:textarea/ ?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TextArea

2005-07-20 Thread Adrian_Rios
Here is the code to do it.

I have used it a number of times.

http://javascript.internet.com/forms/limit-textarea.html

Adrian

__

Senior Programmer Analyst, Tax Distributed Systems Development

Tax  Compliance Development, ADP IT

Phone: (909) 592-6411 Ext. 3863

e-mail: [EMAIL PROTECTED]



-Original Message-
From: Vijay K Anand [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 7:39 AM
To: Struts Users Mailing List
Subject: TextArea


Hi Guys

How to control char maxlength in html:textarea/ ?

Regards
Vijay



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the message is not the intended recipient or an authorized
representative of the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, notify the sender immediately by
return email and delete the message and any attachments from your system.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TextArea

2005-07-20 Thread Steve Bosman
On 7/20/05, Larry Meadors [EMAIL PROTECTED] wrote:
 Yep, not an option in HTML, gotta javascript it, or catch it on the server.
 
 On 7/20/05, Mark Benussi [EMAIL PROTECTED] wrote:
  Sadly, JavaScript I am afraid.
  From: Vijay K Anand [mailto:[EMAIL PROTECTED]
  How to control char maxlength in html:textarea/ ?

I'd say both, javascript for a nice user experience and server side
for safety. One because as a matter of good practice you should never
trust anything to have been properly validated on the browser and two
because testing the number of characters in textareas can be error
prone. I forget which one but either Mozilla or IE has given me length
counts in javascript which differ from the String length by the time
the value is one the server - basically a CR versus CR/LF issue.

Steve
-- 
A witty saying proves nothing.  -- Voltaire

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TextArea

2005-07-20 Thread Folashade Adeyosoye
Here is a solution, JavaScript by the way...


script language=JavaScript type=text/javascript
!--
var max_comment=150;
var clr=0;
function Counter(field){
var len=0;
len+=field.value.length;
if (len  max_comment){
alert(The User Comments field has a limit of  + max_comment + 
characters.\n\n You have entered  + len +  characters.);
field.value=field.value.substring(0,field.value.length+max_comment-len);
field.focus();
}
}

// --
/script



html:textarea property=userComment cols=40 rows=3
onkeydown=Counter(this); onkeyup=Counter(this);
titleKey=title.Comment/



Shardayyy



-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 10:56 AM
To: Struts Users Mailing List
Subject: Re: TextArea

Yep, not an option in HTML, gotta javascript it, or catch it on the server.

Larry


On 7/20/05, Mark Benussi [EMAIL PROTECTED] wrote:
 Sadly, JavaScript I am afraid.
 
 -Original Message-
 From: Vijay K Anand [mailto:[EMAIL PROTECTED]
 
 How to control char maxlength in html:textarea/ ?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]