How to Set Customized Text Field Width for Web Pages Designed in ADF

Share and Enjoy !

There are two ways to create input text field through JDeveloper (ADF).
Case-1. Drag a data control and select Form—>ADF Form.
This will create input fields.
Case-II  we can drag from component palette
image .
As these fields are based on database, Both the cases by default the label and value will come from database column and field width respectively.
Now let me come to the topic directly…if you see the appearance the column value is given as “#{bindings.EmployeeNumber.hints.displayWidth}” Which is nothing but the permissible character given during database design.And it is bound to differ for different fields. Say First Name may have varchar(200) and Sex may have varchar (3). So the display will be like for First name –textfield  , length of 200 character and for sex length will be of 3 characters.

So the easy solution to solve this problem could be either set the length of the text field programmatically  through a display bean
use the wizard based ADF component palette.
This is appearance settings in View level(MVC) so go to Appearance submenu in the component palette and find out column.
The value by default will be-     “#{bindings.EmployeeNumber.hints.displayWidth}”. Change this to numeric value what is globally set for your project. Say 100 for firstName. 100 for LastName etc.
By this way you can get a customizable text field width and great appearance for the forms. Till the time we are not changing the binding value , the model and wizard will support the appearance.

Easy way to go to Property Manager
Right click on the field ,you want to change–> go to Properties

See also  How to work with Entity Object Attributes

Share and Enjoy !

Leave a Reply

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