CSS text conversion does not send uppercase to business layer

I created simple markup like.

<html>
    <head>
    <head>
    <body>
        <input type="text" style="text-transform:uppercase" />
    </body>
</html>

I assumed that the browser will use all resources and, indeed, has been converted

In my business layer, I assume that the browser will submit the form data in uppercase format also when the submit method is executed.

My problem is that when I get the data on my Spring controller, its not uppercase, and I need to do the capitalization myself.

Any idea?

+3
source share
5 answers

CSS . - . .

+6

JS :

// This function is used to change lower to upper case for the Input text
function cUpper(cObj)
{
cObj.value=cObj.value.toUpperCase();
}

After this, in your textbox OnKeyup event put this:

return cUpper(this);

, .

+2

js.

+1

In your case, I will probably try to write my own PropertyEditors.

See http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/validation.html for details

NTN

0
source

Source: https://habr.com/ru/post/1768031/


All Articles