Sun. Oct 24th, 2021

Requirement: Convert af:inputText value to upperCase, lowerCase, and capitalize by setting contentStyle of the af:input text in ADF

Solution: For solution to the above requirement follow the steps as shown below:

Step 1: Create an Oracle ADF Fusion Web Application.

Step 2: Create a demoPage.jspx page in the ViewController project of our application.

Step 3: Open demoPage.jspx page. Add three af:inputTextby drag and drop from the component palette on thedemoPage.jspx. Set the contentStyle for each of the af:inputText as shown below:

The below code will enforce the User to enter text in an upperCase format

<af:inputTextlabel="First Name"id="it2"contentStyle="text-transform:uppercase;"/>

The below code will enforce the User to enter text in a lowerCase format

<af:inputTextlabel="Middle Name"id="it3"contentStyle="text-transform:lowercase;"/>

The below code will enforce the User to enter text in an initCap (capilatize) format

<af:inputTextlabel="Last Name"id="it4"contentStyle="text-transform:capitalize;"/>

Thus, the complete demoPage.jspx code is shown below:

<?xmlversion='1.0'encoding='UTF-8'?>
<jsp:rootxmlns:jsp=""version="2.1"
	xmlns:f=""
	xmlns:af="">
	<jsp:directive.pagecontentType="text/html;charset=UTF-8"/>
	<f:view>
		<af:documenttitle="demoPage.jspx"id="d1">
			<af:formid="f1">
				<af:inputTextlabel="First Name"id="it2"
					contentStyle="text-transform:uppercase;"/>
				<af:inputTextlabel="Middle Name"id="it3"
					contentStyle="text-transform:lowercase;"/>
				<af:inputTextlabel="Last Name"id="it4"
					contentStyle="text-transform:capitalize;"/>
			</af:form>
		</af:document>
	</f:view>
</jsp:root>

Step 4: Save all and run the application . Thus, the ran application is shown below:

Now type First Name as Susanto,Middle Name as Kumar, and Last Name as Paul. So, irrespective of the case we enter in the various af:inputText, the First Name is accepted as SUSANTO, Middle Name as kumar and Last Name as Paul as shown below:

Hence, the solution to our requirement.

If you like the post please comment, share, and do join me on Facebook. Please subscribe to my YouTube Channel for video tutorials.

Thanks & Regards,
Susanto Paul

 494 total views,  3 views today

By Susanto Paul

Susanto is an Oracle ACE, a qualified MCA, MBA, and a highly-skilled Senior Oracle Specialist. He is an enthusiastic Blogger and YouTuber who helps learners to solve their complex problems more efficiently. He has 9+ years of experience in multiple technologies like AWS, Oracle ADF, Oracle APEX, Oracle JET, Oracle VBCS, Oracle IDCS, Oracle PL/SQL, Oracle Integration Cloud, Java, JDBC, Servlets, JSP, Spring, Hibernate, HTML5, CSS3, JavaScript, TypeScript, NodesJS, Angular, MySQL, Oracle WebLogic Server, JUnit, JMeter, Selenium Web Driver, etc. He is a certified: Oracle Certified Professional Java SE 6 Programmer, Oracle ADF 11g Certified Implementation Specialist, Oracle Cloud Platform Application Integration 2020 Certified Specialist, Oracle Cloud Infrastructure Foundations 2020 Certified Associate, and Oracle Cloud Infrastructure Developer 2020 Certified Associate

Leave a Reply

Your email address will not be published. Required fields are marked *

satta king chart