Converting ADF Pages to Reusable Page Fragments

So you finished building a great ADF Faces JSF page, and now you realize that you actually need the same functionality in 30 other places in your application. Well wouldn't it have been great to know about it before you started? What am I suppose to do now? How can I include one JSF page inside another JSF page?

Don't worry - JDeveloper and ADF come to the rescue.

ADF has some great reusability features for JSF pages in the form of TaskFlows, Page Fragments and Regions. And even if you didn't plan ahead of time to use those, you can still get your page to become a pagefragment and be included in other pages quite easily with the JDeveloper convert options for taskflows.

 Here is a small demo that shows how to take a regular ADF Faces page, and convert it to be a resuable page that you can include in multiple other pages.

Want to learn more about taskflows and regions - you can start with this ADF Controller Overview seminar I recorded.

And you can then learn even more things in the taskflow sessions on the ADF Insider seminar.

Comments:

thanks for the post.

Posted by guest on July 15, 2011 at 06:21 AM PDT #

Hi Shay,

Thanks for this useful blog. I noticed 1 problem, if I use table (inside panelCollection) instead of form, it doesn't stretch. I can stretch the width with 'AFStretchWidth' but i can't stretch the height. I am using panelSplitter as container.

Is there any way I can stretch the height?

Posted by guest on September 06, 2011 at 08:03 PM PDT #

Your component needs to be inside a component that will stretch it.
For example if you create a new page that just has panelStretchLayout and put the panelCollection in the center facet and a table in it - the table will stretch.
Without looking at your complete component hierarchy for the page - I can't know why your table doesn't stretch.
Post this on the JDeveloper forum on OTN.

Posted by shay on September 07, 2011 at 01:43 AM PDT #

Shay,

I've searched and haven't seen any mention of ADF Mobile being able to have page fragments. Do you know if that's possible? I'd like to have one header/footer created as an amx page fragment and then include it in other amx pages. So far I've seen no way to do this. I'm using 11.1.2.4. Thanks in advance for any advice or direction.

Posted by guest on October 09, 2013 at 01:24 PM PDT #

guest - we currently don't have the concept of page fragments in ADF Mobile.

Posted by Shay on October 21, 2013 at 02:22 PM PDT #

Shay,

Video is not playing. Niether emded nor on youtube. Please have a look

Posted by guest on April 15, 2014 at 11:41 PM PDT #

guest - the video works fine for me - check it out at https://www.youtube.com/watch?v=t4yQnd6kODk

Posted by guest on April 16, 2014 at 02:08 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today