Wednesday, April 28, 2010

ADF af:carousel implementation

af:carousel implementation is really easy.Dont get afraid.

You have a ViewObject say DepartmnentsVO exposed in a DataControl(i.e AM).
From DataControl pallete, drag and drop the VO as af:carousel onto your page.
It creates a Tree binding in the pagedef automnatically and an af:carousel UI component.
Interesting thing in the Jspx/Jsff page for af:carousel is the var property usage.
See the sample code below.

Jspx code

              <af:carousel currentItemKey="#{bindings.DepartmentsView1.treeModel.rootCurrencyRowKey}"
value="#{bindings.DepartmentsView1.treeModel}"
var="item" id="c1"
carouselSpinListener="#{SpinHelper.onSpin}">
<f:facet name="nodeStamp">
<af:carouselItem id="ci1">
<af:panelFormLayout id="pfl1">
<f:facet name="footer"/>
<af:panelLabelAndMessage label="#{item.bindings.DepartmentId.hints.label}" id="plam1">
<af:outputText value="#{item.bindings.DepartmentId.inputValue}" id="ot1"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{item.bindings.DepartmentId.hints.label}"
id="panelLabelAndMessage1">
<af:outputText value="#{item.bindings.DepartmentName.inputValue}"
id="outputText1"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{item.bindings.ManagerId.hints.label}"
id="panelLabelAndMessage3">
<af:outputText value="#{item.bindings.ManagerId.inputValue}"
id="outputText3"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{item.bindings.LocationId.hints.label}"
id="panelLabelAndMessage2">
<af:outputText value="#{item.bindings.LocationId.inputValue}"
id="outputText2"/>
</af:panelLabelAndMessage>
</af:panelFormLayout>
</af:carouselItem>
</f:facet>
</af:carousel>


PageDef code
    <tree IterBinding="DepartmentsView1Iterator" id="DepartmentsView1">
<nodeDefinition DefName="adf.sample.model.DepartmentsView"
Name="DepartmentsView10">
<AttrNames>
<Item Value="DepartmentId"/>
<Item Value="DepartmentName"/>
<Item Value="ManagerId"/>
<Item Value="LocationId"/>
</AttrNames>
</nodeDefinition>
</tree>

4 comments:

Anonymous said...

This article will giѵe business уоu neсeѕsаry information to the online audienceѕ.
Thіs seеms to be relative аnd tempered by the neеd to prοvide for а sρecific trip.


Ϻy homepage - internet marketing keywords

Anonymous said...

These guys work to partnership produce the results everyone is striving for
on a consistent basis. However, since you also need to maintain the style of the website.
So hire your partnership agency carefully.
The results of these actions will lead to a viral effect
if and when possible, create original and unique to
improve quality. Bidders have to be 'present' the full five minutes which reduces sniping the practice of
placing winning bids at the last second.

My weblog ... www.guitartube.com.au

Anonymous said...

Palkia's pink gem on its chest that bears resemblance to a cicada. The only thing you should be worrying about while you are playing online 3d video games. Next, find out if he is willing to grow and farm their currency. It is followed by Giratina and the Sky Warrior and Arceus and the Jewel of Life. It is very 3d video games common for different reserachers to arrive at different conclusions based on their available resources. The 6-2, 240-pound Quentin who starred as an outside linebacker in high school slammed into the pitcher.

My page - homepage

Anonymous said...

Playing dance central 4 xbox for prolonged periods of time
because they can tire you out and some of the games and use the lure.


Feel free to surf to my web page :: harmonix dance central 3