Dive into Oracle ADF

Send me a mail
 Dive into Oracle ADF   Click to see the XML version of this web page.   (Updated: 2/3/2008; 9:22:42 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

Search blog with Google:
 

Search BC4J JavaDoc:
 

June 2007
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
May   Jul

Get Firefox!

Monday, June 04, 2007

In 10.1.3.2, when you drop an "ADF Form..." from the Data Control Palette, we automatically drop an EL expression for the value of the columns property to have it evaluate to the bound-attribute's Display Width hint. The source of an example af:inputText component would look like this:

<af:inputText value="#{bindings.Dname.inputValue}"
  label="#{bindings.Dname.label}"
  required="#{bindings.Dname.mandatory}"
  columns="#{bindings.Dname.displayWidth}">
  <af:validator binding="#{bindings.Dname.validator}"/>
</af:inputText>

Note that if you haven't supplied a custom value of the Display Width, then it defaults to the maximum length of the attribute.

Now, what happens if you have consciously shortened the attribute's display width by providing a custom Display Width hint that is less than the attribute's maximum allowed length?  In this case, you would like to reference the attribute's maximum length in an EL expression for the UI component's maximumLength property.

You can do this by referencing the precision property of the attribute definition, as shown below:

<af:inputText value="#{bindings.Dname.inputValue}"
  label="#{bindings.Dname.label}"
  required="#{bindings.Dname.mandatory}"
  columns="#{bindings.Dname.displayWidth}"
maximumLength="#{bindings.Dname.attributeDef.precision}">
  <af:validator binding="#{bindings.Dname.validator}"/>
</af:inputText>

2:48:38 PM    



Last week, list of values were in the air.

First, I updated the popular "Cascading Lists in JSF" example#62 on my blog to expand the use cases it supports, implement custom error handling, and workaround some bugs users on the OTN discussion forum were encountering when trying to take the previous example to the next level...

Second, I wrote my September/October 2007 Oracle Magazine column called "Defining Cascading List of Values", the first column in my ongoing series that will talk about new JDeveloper/ADF 11g features. While you'll have to wait until August to read and follow along with that column, you can get some immediate gratification right now by watching the two screencasts described below.

Last but not least, Grant Ronald blogs about two new OTN Screencasts to help you see how easy building List of Values becomes in the new JDeveloper/ADF 11g release. I encourage you to check out these two quick demonstrations to see the new declarative list of values features working in Swing and JavaServer Faces (JSF), both simple lists and dependent/cascading lists:


11:16:33 AM    


Kuba shows how to generate Adobe Form Data Format (FDF) files in ADF.

Chris Muir counts clicks to clock productivity.

John Stegeman shows how to conditionally show fields based on attribute values.


10:26:54 AM    


© Copyright 2008 Steve Muench.