Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to change input text value to UpperCase

829807Mar 28 2012 — edited Mar 29 2012
Hello All,

I am using jDeveloper 11.1.1.5.

I have a fragment jsff inside that I have a textbox FirstName and few other text boxes and buttons. I have used that fragment on my page MyPage.jspx as a region.

Now my requirement is as soon as user enter some text in the textbox FirstName it should get converted to UpperCase.

One way of doing it which i found is- I have created a class UpperCaseConverter which implements Converter

+public class UpperCaseConverter implements Converter {+
+public UpperCaseConverter() {+
super();
+}+
+public String getAsString(FacesContext fc, UIComponent uIComponent, Object object) {+
return object.toString();
+}+
+public Object getAsObject(FacesContext fc, UIComponent uIComponent, String string) {+
return string.toUpperCase();
+}+
+}+


Then I have registered this class in faces-config.xml of my application inside Converters tab and in the property inspector of that text box I have marked that UpperCaseConverter class as its converter property.

This is working fine but my requirement is I dont want to use this class due to some restriction. Is there any other way we can do this. Does ADF provide anything of this sort by default?

Please Help

--Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 26 2012
Added on Mar 28 2012
4 comments
5,627 views