Different memory scope in Oracle ADF

Application: The application scope lasts until the application stops. Values that you store in a managed bean with this scope are available to every session and every request that uses the application.

session: The session scope begins when a user first accesses a page in the application and ends when the user’s session times out due to inactivity, or when the application invalidates the session.
The session scope begins when a user first accesses a page in the application and ends when the user’s session times out due to inactivity, or when the application invalidates the session. Use this scope only for information that is relevant to the whole session, such as user or context information. Avoid using it to pass values from one task flow to another. Instead, use parameters to pass values between task flows. Using parameters gives your task flow a clear contract with other task flows that call it
or are called by it. Another reason to avoid use of session scope is because it may persist beyond the life span of the task flow.

pageFlow: this is accessible across the activities within a task flow. A managed bean that has a pageFlow scope shares state with pages from the task flow that access it. A managed bean that has a pageFlow scope exists for the life span of the task flow.If another task flow’s page references the managed bean, the managed bean creates a separate instance of this object and adds it to the pageFlow scope of its task flow.
Choose this scope if you want the managed bean to be accessible across the
activities within a task flow. A managed bean that has a pageFlow scope shares
state with pages from the task flow that access it. A managed bean that has a
pageFlow scope exists for the life span of the task flow.
If another task flow’s page references the managed bean, the managed bean
creates a separate instance of this object and adds it to the pageFlow scope of its
task flow.

backingBean: A backing bean is a convention to describe a managed bean that stores accessors for UI components and event handling code on a JSF page. It exists for the duration of a request and should not be used to maintain state.Use this scope if it is possible that your task flow appears in two ADF regions on the same JSF page and you want to isolate each instance of ADF region.
A backing bean is a convention to describe a managed bean that stores accessors for UI components and event handling code on a JSF page. It exists for the duration of a request and should not be used to maintain state.Use this scope if it is possible that your task flow appears in two ADF regions
on the same JSF page and you want to isolate each instance of ADF region.

view :Use this scope for managed bean objects that are needed only within the current view activity and not across view activities. It defines scope for each view port that ADF Controller manages, for example, a root browser window or an ADF region.The life span of this scope begins and ends when the current viewId of a viewport changes. If you specify view, the application retains managed bean objects used on a page as long as the user continues to interact with the page. These objects are automatically released when the user leaves the page.

Request : Use request scope when the managed bean does not need to persist longer than the current request.

Get value from selectOneChoice in Oracle ADF

public void selectOneChoice1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
//for iterator name click binding tab in the jsf page
DCIteratorBinding listIter = getBindingsForDCB().findIteratorBinding(“yourViewObj1Iterator”);
int curIndex = (Integer)valueChangeEvent.getNewValue();
Row datRow = listIter.getRowAtRangeIndex(curIndex);
String name = (String)datRow.getAttribute(“Code”); //as in data control
}

Book Review : Ext JS 4 First Look

The folks at Packt asked me to review one of their book on EXTJS 4 If you are interested in buying it (a judgment you may reserve until after you have read the review)

“http://www.packtpub.com/ext-js-4-first-look/book” this is link you can go

Loiane Groner iS a EXT-JS consultant, she is expert in EXT JS. As far as I can recall, I have never met them but I follow her blog http://loianegroner.com regularly

The Packt model is an interesting one. They are an online publishing house who approach subject matter experts and offer them an advance and a good commission for writing a book for them. They have approached me a couple of times but I have turned them down on both occasions simply due to a lack of time. Given the movement towards e-readers and related devices I believe it is a business model most publishers will eventually adopt.

Overview and Structure of the Book

The first thing you will probably notice is the size of the document. This is no brief summary of the new features. This is over 340 pages covering what has changed since EXT JS 3 in EXT JS 4 with a full index in the back. The structure of the book is:

• The usual preliminary bits (About the Authors, Acknowledgement, Table of Contents etc.)
• Chapter 1: What new in EXT JS 4.
• Chapter 2: The new Data package
• Chapter 3: Upgraded Layout
• Chapter 4: Upgraded Charts
• Chapter 5: Upgraded Grid, Tree and Form
• Chapter 6: Ext JS 4 Themes
• Chapter 7: MVC Application Architecture
• Appendix
• Index

I like this structure as it parallels the steps one would take in setting up a EXT JS4. The titles are also plain English e.g. ‘Ext JS 4 First Look’ making it easier to know where to go. To add a bit of a flow to the book, they also put it in the examples,real life scenarios
What is missing is – This book is not for the beginners who are learning EXT JS from scratch. Major feature release.
Ext JS 4 introduces major changes compared to Ext JS 3..You will find lot of changes There is a new data package, new charts, and new, updated layouts. The framework was completely changed from EXT JS 3 for increasing the performance.
This book covering all changes in EXT JS 4 , all new features using coding example with detailed explanation and screenshot of code as well the result too. Book will make you understand the changes in EXT JS 4 with presented examples and using this book you can easily migrate the application from EXT JS 3 to EXT JS 4 application

Chapter 1: What’s New in Ext JS 4

This chapter provides an introduction to all major changes between Ext JS 3 and Ext JS 4. Ext JS 4 presents a vast improvement in all packages; the framework was completely rewritten to boost performance and make learning and configuring easy. This chapter covers all these changes, from class system, to an overview, to the new Sencha platform
Good high-level review to introduce the reader to these completely new features

Chapter 2: The New Data Package

This chapters covers all the changes in the data packageI am amazed to see the Sencha Touch framework for mobile application This chapter introduces the new Model class, associations, proxies, operations, batches, and the new features of the Store class.
What this means is the book lends itself to system architects with a good understanding of the configuration options of the system but not so much to people who are new to either system.

Chapter 3: Upgraded Layouts

This is a great chapter on the awesome work Sencha Team has done on improving the layout. It covers all changes made to the existing layouts, and the new component layout engines, such as dock, toolbar, field, and trigger field layouts. It also covers the changes made to the container layouts, such as fit, border, table, anchor, card, accordion, and so on..
If you are stuck in designing the layout of application then reading this chapter is worth of. 

Chapter 4: Upgraded Charts

I like this chapter after reading this a lot. Chapters presents the new JavaScript-powered Ext JS 4 charts. And what you can expect more the no flash is required anymore. This chapter introduces the new draw package, which is the base package for the new chart package. It also covers how to configure chart axis, legend, customized themes, and Ext JS 4 chart series, such as Bar, Column, Line, Area, Scatter, Pie, Radar, and Gauge.

Chapter 5: Upgraded Grid, Tree, and Form

Again, this is a big topic for one chapter. It mention and demonstrates the upgraded Ext JS Components. Very well explained the more performance and more developer flexibility. Some new features and plugins for Components covered in this chapter are: grid, tree, and forms.

Chapter 6: Ext JS 4 Themes

This is probably one of the best example or step by step way of creating on how developer can customize and create a new theme by using CSS architecture, which uses Sass and Compass.

Chapter 7: MVC Application Architecture

. One nice touch in this chapter how MVC architecture applied or implemented to Ext JS 4 applications. This chapter as with others is designed to give the reader a feel for creating a MVC EXT JS 4 application. Steps by steps instruction given in this chapter. Chapter also includes the structure of EXT JS 4 application project structure and how reader can manage the component, files in EXT project structure.
Appendix A, Ext JS 4 Versus Ext JS 3 Class Names,
It presents a comparison list between Ext JS 3 classes and Ext JS 4 class names. In this new version of Ext JS, the names of some classes have changed, and this list can help you find the new Ext JS 4 class names easily, while migrating an application from Ext JS 3 to Ext JS 4 Beta.

Conclusions

This book is not a comprehensive guide to the learn EXT JS 4 or EXT JS. Rather, it is an introduction to some of the new features of the product, compared to EXT JS 3. .It is good guide if you want to migrate an application from EXT JS 3 to EXT JS 4 or if you want learn ,understand the new feature and advanced topic on EXT JS 4.The way author mentioned he pseudo code with example and detailed description is really good. Features of the product they do cover are covered very well. What I mean by this is their high-level summaries of large topics, such as Layout ,tree and form, cover the essential elements and their treatment of smaller topics, such as EXT JS 4 Theme, MVC Application Architecture topic are some of the best I have seen.

While there is not as much bang for buck as, say, Loiane Groner’s book, the EXT JS 4 developer will not have to filter out a rehash of the version 4 features as this book assumes that knowledge. Where I see this book working is as good migration guide. While those volumes allow the reader to drill down into a specific topic, this book, uniquely, gives a much greater context to the features in question, providing a practical example as an integral part of the narrative