Friday, March 16, 2012

Adding UI Facets into ADF Page Template Based on Facelets Type

If you will try to add UI Facet into ADF Page Template based on Facelets type (JDeveloper 11g R2) - you may get into trouble of accessing UI Facet from consuming fragment/page.

Here is what I mean - assume there is a template created based on Facelets type:

This template contains UI Facet - we drag and drop it from Component Palette:

Facelets type fragment is created based on Facelets template:

We try to access UI Facet inside fragment - but its not accessible:

Declared UI Facet is not accessible even from Structure window:

This is because of error in ADF Template - related to Facet definition:

JDeveloper creates (when you drag and drop Facet component) invalid Facet definition for ADF Template based on Facelets (it works well for JSP XML template). Facet definition error - remove wrong facet definition manually:

We can workaround this, by going into Facet Definitions section and manually defining facet for the template with the same name - content:

As you can see, facet definition is correct now and is based on afc tag:

Facet is available from consuming fragment:

Download sample application -


Archyvas said...

Labai padėjo jūsų patarimas, išsprendė galvos skausmą :) Ačiū :)

Andrej Baranovskij said...

Puiku :)