Thursday 7 April 2011

How to give a multiple CSS style classes to the Rich UI Component?

In any Rich UI Component, there is a property called 'StyleClass'. In this property, we are normally use to give a CSS style.

In an implementation you will give only one CSS style class but It will support for multiple CSS Style Class also. You can give multiple CSS class by using the white space separator.

CSS Style Class


Style Class Usage in Rich UI Component



For more details check with sample.

You can download the sample workspace from here.
[Runs with Oracle JDeveloper 11g R1 PS2 + HR Schema]

How to run this sample?
Run using the Main.jspx and check.

Monday 4 April 2011

How to access the single Bundle into the different Model Layer Project?


You can access the Single bundle into different project by using the keyword of 'adfBundle'. The syntax is 
adfBundle['Bundle Name with full Package Path']['Bundle Key']

In Source View of EO
In Design View of EO




You can download the sample workspace from here.
[Runs with Oracle JDeveloper 11g R1 PS2 + HR Schema]


How to run this sample?
Run using the Mask.jspx and check the Hire Date field.

Sunday 3 April 2011

Immediate Property Behaviour between af:inputText & af:commandButton


<af:inputText>

By default values are converted and validated together in the Process Validators phase. If you setting immediate to true then value is converted and validated immediately in the Apply Request Values phase, or is handled in the Process Validators phase.

<af:commandButton>

In Command button, if you setting immediate to true will skip validation, whether data validation is client-side or server-side will be skipped when events are generated by this component.By default is immediate false.

When immediate is true, the command's action and ActionListeners, including the default ActionListener provided by the JavaServer Faces implementation, will be executed during Apply Request Values phase of the request processing lifecycle, rather than waiting until the Invoke Application phase.

If the page contains the <af:inputText> with Immediate/Required True and <af:commandButton> with Immediate True. Now, If you invoke the command button then it trigger the required message instance of skipping the validations.

So it will trigger the validation for true-true combinations also.

You can download the sample workspace from here.
[Runs with Oracle JDeveloper 11g R1 PS2]

How to run this sample?
Run using the Immediate.jspx and check the FirstName field and Immediate True Command Button.

Friday 1 April 2011

How to access an Entity Attribute Level Custom Property in UI Pages?

In ADF there are many ways available for accessing the Custom property in the UI Pages. One of the way to access the Custom Property directly to the UI Pages is using the Expression.

You have to Create a Custom Property in EO attribute level by using Edit Selected Attribute Option.



Then create a Page in View Layer and drag-drop the Employee View from the DataControl. Now You can access the custom property by the expression "#{bindings.FirstName.hints.VisibleFlag}". VisibleFlag is a custom property which it created in an EO level.



You can download the sample workspace from here.
[Runs with Oracle JDeveloper 11g R1 PS2 + HR Schema]
How to run this sample?
Run using the Run.jspx. It contains FirstName, LastName, Email, HireDate, PhoneNumber & Salary Fields.But here the fields Email & HireDate won't visible because this VisibleFlag is 'N' at EO Attribute Level.