U bent hier: Home > Blog > ADF

ADF custom attribute validation in the Impl-class


Johan Tuitel, 17 februari 2012

The standard validation in ADF application is done by setting the attribute required. The disadvantage of this functionality, is that the validation is to early and not validating when a form is filled in. To do this we need to customize the validating of our application.

We can do this by validating the value in the Impl class of the Entity you use in the page.

1. Replace the required=”true” attribute on the input component into a showRequired=”true”, this can by jheadstart template or manually.

2. Open the Impl class and override the validateEntity() method

  protected void validateEntity() {
} (meer…)

ADF 11g: Create custom pending changes popup


Johan Tuitel,

In ADF applications we have a standard Pending Changes Popup. In this popup, the application handles the standard rollback of the record.

We found out that it is not work correctly for our application, therefore we need to create a custom Pending Changes Popup. (meer…)

Running ADF Application: Cannot read from policy store


Johan Tuitel,

When running an application ADF I get an error in the Weblogic server:

oracle.security.jps.JpsRuntimeException: Cannot read from policy store

Then you have a problem with the system-jazn-data.xml.

The system-jazn-data.xml is corrupt and you need to fix the corrupted xml file in your user map.

1. Find the system-jazn-data.xml file. I found it in:

jdevdata\system11.1.1.4.37.59.23\DefaultDomain\config\fmwconfig

But the system version is dependent of the version you use.

2. Make the file usable for the webserver, this can be done by setting the old content into the corrupted file or clean the file. My suggestion is to use old content because you don’t have any data loss, the old content can be found in de jdev11114 map.

Using CSS stylesheet to customize your application 11g


Johan Tuitel, 3 februari 2012

In my project, I needed to customize the ADF 11g application.

Here are the steps what you need to do to make use of CSS in you’re application

1. Create a xml-file called trinidad-skins.xml(if not present) in ViewController > Web Content > WEB-INF. (meer…)

Make use of custom ‘Number’ converter in ADF application with Jheadstart 11g


Johan Tuitel, 20 januari 2012

When we need to convert ‘Number’ values in the front-end, we have the standard:

<af:convertNumber />

But we want a custom converter for the number values in the application.

To do this for the whole application, we need to adjust the jag-config.xml.

1. Go to ViewController > Resources > config and open jag-config.xml.

2. Search for property name=”libraries” under this property you will find

<value>default/common/common_items.vm</value>

3. Replace this one with a custom reference e.g.

<value>UrgencyRequest/common/demo_items.vm</value>

4. Next is to make this new demo_items.vm template and copy the content from the original common_items.vm template to the new template.

5. Search for #macro (NUMBER_CONVERTER) and insert a custom converter:

<f:converter binding=”#{DemoNumberConverter}” />

Example:

  #macro (NUMBER_CONVERTER)
#if(${JHS.current.item.numberItem})
<f:converter binding=”#{DemoNumberConverter}” />
#end
#end

Debugging in jDeveloper 11g: Name too long to represent


Johan Tuitel,

When I was working on a project and i wanted to debug the application i get an error:

name is too long to represent(Caused by: java.lang.InternalError: name is too long to represent)

I found out that the problem was caused by the jsff-file I was running. The file was to big to debug.

There are several methods to reduce the size of the file, my suggestion is to make use of regions.

Using CSS stylesheet to customize tab menu in ADF 11g


Johan Tuitel, 10 januari 2012

When you would like to customize the menu in ADF you have to use css.

To do this you need to understand that a tab consist of three parts

  • start(left side of the tab)
  • content(middle of the tab)
  • end(right side of the tab)

in the application we have two states of the tab, not selected and selected.

Example (meer…)

JSP page template not found


Johan Tuitel,

When I was looking in a jsff-file I saw that the pageTemplate component showed an error.

the error: JSP page template not found

This will not cause any problems to run you’re application, but it is correct to solve problems.

1. Then you have to add the url to the custom template in the

pagetemplate-metadata.xml

2. go to ViewController > Application Sources > META-INF > pagetemplate-metadata.xml

3. Add a line which define the template of the page:

<pagetemplate-jsp-ui-def>/common/pageTemplates/ExamplePageTemplate.jspx</pagetemplate-jsp-ui-def>

Reusable Component in ADF 11g


Johan Tuitel,

When I was working on a project I saw we created a few components the same, but if we had an adjustment we need to do this several times. To fix this problem you can make use of the declarativeComponent. (meer…)

Generate taskflow and controlflow with jHeadstart 11g


Johan Tuitel, 2 januari 2012

When you made custom navigation in you’re application, but you want to keep te navigation you need to create custom templates otherwise the navigation is lost if you generate the application.

For this problem you need to create a custom taskflow with custom control-flow-case, you need to set the template TASK_FLOW_VIEW_ACTIVITIES for task-flow-control and set the template TASK_FLOW_CONTROL_FLOW_RULES. (meer…)

Eerdere artikelen »