0% found this document useful (0 votes)
506 views2 pages

What Are Named and Indexed Children in OAF

Indexed and named children are types of child elements in an OAF page hierarchy. Indexed children are arranged sequentially under a "contents" role element, while named children have predefined positions under specific non-contents role elements. For example, in a sample HelloWorldPG page, child elements under the "contents" role like PageLayoutRN and MainRN are indexed children, while corporateBranding and productBranding under other roles are named children. Developers can use different methods like findIndexedChildRecursive and getNamedChild to locate these children in the controller code.

Uploaded by

hisham_476
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
506 views2 pages

What Are Named and Indexed Children in OAF

Indexed and named children are types of child elements in an OAF page hierarchy. Indexed children are arranged sequentially under a "contents" role element, while named children have predefined positions under specific non-contents role elements. For example, in a sample HelloWorldPG page, child elements under the "contents" role like PageLayoutRN and MainRN are indexed children, while corporateBranding and productBranding under other roles are named children. Developers can use different methods like findIndexedChildRecursive and getNamedChild to locate these children in the controller code.

Uploaded by

hisham_476
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

07/10/2015

iWiDiWhatareNamedandIndexedChildreninOAF?

WhatareNamedandIndexedChildreninOAF?

TalksAbout:IndexedandnamedchildreninOAF.
Everyougotcuriousaboutquestionslike"Whatisnamedchildren?Whatisindexedchildren?"
InshaAllahinthisarticleImaytrytoexplain,whatthesetermsmeantoanOAFrameoworkDeveloper.
Iguessthisistheonlyarticleoninternetwhichmaytellyouaboutmuchused,butmuchlessunderstoodconceptofindexedandnamedchildren
inOAF.Thisisoneofthepurposeofthiswebsite...clearingtheconcepts.
YouknowthatanOAFpageismadeupofXMLtags/elements.Theseelementsareusedtodefinecomponentswhicharevisibletouser(like
button,textbox)aswellascomponentswhicharenotvisibletotheuser.
Layoutcomponentsarethefamousnonvisiblecomponentswhichareusedtocontrolpositionetc.ofthevisiblecomponents.
AnOAFpageishierarchicalstructureofparentandchildrelationships.Usually,Layoutelementsaretheparentswhosechildrenarevisiblechild
elements.
Thedifferenceofhowachildelementisarrangedinalayoutelement,makesthatchildanamedchildoranindexedchild.
Inthishierarchy,thereisanotherelementcalled"roleelement"whichdecideshowthechildrenarearrangedinthatlayout.
Iftheroleelementis"contents",childrenarearrangedinasequentialorder.Thus,thesechildrenarecalledindexedchildrenof
thatlayoutelement.
Ifsomespecificelement(notcontents)isusedas"roleelement",topredefinepositionsofchildrenelements,thanthesechildren
arecallednamedchildrenofthatlayoutelement.
Namedchildrengetsspecialtreatment(placedatspecialplace),thustreatedasVIP.
Indexedchildrenarecommonman,gointhequeue,onebyone.
Nowletstakeaviewofstandard"HelloWorldPG.xml"toseewhatarethenamedandindexedchildrenavailablethere.

Green:LayoutElements.
Red:RoleElements.
Yellow:Childelements.
IndexedChildren:
Eachdirectchildof"contents"elementisindexedchildofthedirectparentlayout.
IDsofsomeindexedchildreninthispage:
PageLayoutRN
MainRN
HelloName
Go
IDsofsomenamedchildren
corporateBranding
productBranding
Anoteaboutfindingchildrenincontroller.
webBean.findChildRecursive:tofindoutanychildren(bothnamedandindexed)
findIndexedChildRecursive:tofindspecificindexchild
webBean.getNamedChild:togetaspecificnamedchild.

Nowifyouhaveconfusionabouthowtolocatespecificbeanincontroller,justlookatthexmlofthepageanduseappropriatemethod.
SeeOAFjavadocumentationformoremethodstolocatespecificchildinyourpagebeanhierarchy.
Hereissomethingtoseethatalayoutcancontainonlysingle"contents"roleelement(whichinturncancontainmanyindexedchildren).
However,alayoutmaycontainmultiplenamedroletoholddifferentnamechildren.Butagain,eachnamedrolecancontainonlysinglenamed 1/2
data:text/htmlcharset=utf8,%3Ch1%20class%3D%22itempagetitle%22%20style%3D%22fontsize%3A%20inherit%3B%20lineheight%3A%2012px%3B%2

07/10/2015

iWiDiWhatareNamedandIndexedChildreninOAF?

However,alayoutmaycontainmultiplenamedroletoholddifferentnamechildren.Butagain,eachnamedrolecancontainonlysinglenamed
child.
That'sit.
Niceee...

data:text/htmlcharset=utf8,%3Ch1%20class%3D%22itempagetitle%22%20style%3D%22fontsize%3A%20inherit%3B%20lineheight%3A%2012px%3B%2

2/2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy