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

    0
    20
    Spread the love
    • 1
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
      1
      Share

    ADF
    There are two ways to create input text field through JDeveloper (ADF).
    Case-1. Drag a data control and select Form—>ADF Form.
    image 
    This will create input fields.
    image
    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.

    image
    So the easy solution to solve this problem could be either set the length of the text field programmatically  through a display bean
    or
    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.
    image

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

    Don't miss out!
    Subscribe To Newsletter

    Receive top technical news, lesson ideas, travel tips and more!

    Invalid email address
    Give it a try. You can unsubscribe at any time.

    Spread the love
    • 1
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
      1
      Share

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here