ADF JSF data binding: why state maintained between requests?

Dear All,
i want to know when and how the state of jsf can be maintain automatically by
adf model.
i have 2 pages, pageA.jspx and pageB.jspx. in pageA.jspx show some data in
datatable (bound to methodIterator), when it go to pageB.jspx from pageA.jspx
and then back to pageA.jspx, the state of the pageA.jspx seems can be stored
by adf somewhere else.
i.e. (pageA.jspx -> pageB.jspx -> pageA.jspx)
****all the backing beans are request scope.
according to the adf dev guide, only the the page binding data for the current page will maintain automatically, then why when pageA.jspx's state is stored ?
do adf store the state in session?? when can i rely on this nature to avoid reload
pageA.jspx's data?? or how can i clear the state of pageA.jspx (blank page) (return from pageB.jspx)??
the adf developer guide seems with little information about the page/binding data
management..where can i found more information about this??
thank you
lsp

Hi,
i am using EJB + JSF + adf model.
in this case its the iterator that survives the page navigationdo you mean that all iterator(method/variable..etc) can survive between page navigation??
You can decide to refresh the iterator on each page load or re-execute the query if
you don't want this.i want to 'clear' the iterator's data, but not to re-execute/refresh it to get data
(as this will cause the underlying methodAction be executed once more)..i just want, say
to display a 'blank' page, say blank pageA.jspx.
IS THERE ANY REFENENCE document that describe the detail behavior..
1. when state maintain?
e.g. case 1 pageA->pageB->pageA->pageB (pageB's state maintained?)
e.g. case 2 pageA->pageB->pageC->pageA (pageA's state maintained?)
2. how do the state maintained??
the iterators are stored in the session or store in the request (e.g. serialized in
hidden input..etc)? will it lead to large memory usage in server side (until session
end)?
i can't find information about the state managementin
the adf developer guide (not adf bc)..
could you please point out where can i found these info??
thank you.
lsp
Message was edited by:
lsp
Message was edited by:
lsp
Message was edited by:
lsp

Similar Messages

  • Missing code ? in example ADF JClient Data Binding in a Multi-Form APP

    I was reviewing the documnt for concurrent forms and see the statement -
    oracle.jbo.Key masterRowKey ;
    but do not see how it becomes initilized ?
    and then it is used in the statement -
    if (masterRowKey != null && row.getKey().equals(masterRowKey))
    can someone help me here?
    thanks.

    Robert,
    thats a good catch. I checked the sample form that we used to develop the howto document and this doesn't contain the masterRowKey initialization either. So my guess is that the masterRowKey is not needed.
    I'll forward your question to Ralph Gordon, the author of the document.
    thanks
    Frank

  • Information about adf data model's state management in JSF/ADF faces?

    Dear All,
    i am developing an application with JSF/ADF faces + using
    adf data model (EJB, not adf bc)...
    i want to know more about state management of adf data model..
    1. under what condition, will the data in the binding context
    (methodIterator, variableIterator, accessorIterator..etc) be maintained accross
    http requests? say browse pageA.jspx, pageB.jspx, pageC.jspx..then do data
    in the corresponding pages saved somewhere else until session timeout?
    2. how do the binding context data be saved ?? http session?
    i can't find detail information in the adf bc dev guide and the adf dev guide..
    could anyone give me more information about this?? any better document??
    i have asked these question several times...but seem nobody can give me a
    full picture about the adf data model's state management....it is quite important
    in order to develop good application using adf data model.
    my company have brought oracle's support service...can i get these information
    through metalink (open a SR) ?? or actually no such information available ??
    btw, after playing with adf data model for a few weeks, i do find it is very
    hard to learn it... no complete document, information is just by providing example...
    adf data model do make:
    1. simple logic, supported by adf, more simple in coding
    2. simple logic, not supported by adf, more complex in coding
    3. complex logic, much more complex in coding...brain damage..
    lsp

    Hi,
    actually, these pages don't explain the state management about the adf data model's iterators?
    i want to know the state management of the iterators...for some iterators..it's
    state is maintained across requests...
    please see my previous post: ADF JSF data binding: why state maintained between requests? that Frank Nimphius said:
    "in this case its the iterator that survives the page navigation"...
    in the adf dev guide..section 5.5.5..it says: "Upon each request, the iterator bindings are refreshed to rebind them to the
    underlying RowSetIterator objects. By default, the rowset iterator state and the
    data caches are maintained between requests."
    in dev guide, it seems state is maintained for request for the same page, but not
    accross different pages. but in fact, the rowset iterator do survive...
    any detail document that write down the actual behavior of the iterators?
    thank you.
    lsp

  • Stuck at error with How To Example for Data Binding in Multi-Form App

    I have succesfully completed the section "Serial Forms Use Case" by Ralph Gordon's in "Managing ADF JClient Data Binding in a Multi-Fom Application" How To Document. Everything worked as explained.
    Then I tried doing the second section "Concurrent Form Use Case". I got stuck there.
    Im sure it's just something silly, but I would love to complete this section.
    I get the follwing error when I click on the open details button in the master form:
    java.lang.ClassCastException: portaluniverse.debitorder.model.dao.ClientViewRowImpl
         at portaluniverse.debitorder.view.debitorder.debitform.openButton_actionPerformed(debitform.java:545)
         at portaluniverse.debitorder.view.debitorder.debitform.access$6000171(debitform.java:47)
         at portaluniverse.debitorder.view.debitorder.debitform$2.actionPerformed(debitform.java:144)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:458)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    The error appears on this line:
    RowSetIterator detailAccessor = (RowSetIterator)row.getAttribute("ClientView");
    The above line of code was taken out of the following method:
    // object used in the following action listener
    oracle.jbo.Key masterRowKey ;
    // specify the action listener
    private void openButton_actionPerformed(ActionEvent e) {
    ClientForm df = new ClientForm();
    // note that the setBindingContainer() method will be defined in DetailForm.java
    df.setBindingContainer(createDetailBinding());
    // get master current row, get detail accessor iterator, then bind detail form iterator binding to
    // detail accessor iterator
    DCIteratorBinding iterBinding = getPanelBinding().findIteratorBinding("DebitOrderViewIterator");
    Row row = iterBinding.getCurrentRow();
    if (masterRowKey != null && row.getKey().equals(masterRowKey)) {
    //create a new RowSet Iterator for the same master to avoid auto-synchronization of currency
    RowSetIterator secondaryRSI = (RowSetIterator)iterBinding.getViewObject().createRowSetIterator(null);
    df.getPanelBinding().findIteratorBinding("ClientViewIterator").bindRowSetIterator(secondaryRSI, false);
    } else {
    RowSetIterator detailAccessor = (RowSetIterator)row.getAttribute("ClientView");
    df.getPanelBinding().findIteratorBinding("ClientViewIterator").bindRowSetIterator(detailAccessor, false);
    df.setVisible(true);
    My Master Form is called "DebitForm.java" and my Details Form is called "ClientForm.java".
    I appreciate any help.
    Thank-you in advance.
    Leana

    Leana,
    I'll point Ralph to this question. I can't see a difference between your code and Ralph's. Which JDeveloper version do you use use?
    Frank

  • Where is detailed description of what data binding language can do?

    Where in the documentation does it clearly spell out exactly what you can do with
    the data binding language (the stuff between "{...}")? I'm trying to understand
    what is happening in the SamplesApp, in the "repeaterTag" module, in XMLString.jsp
    and repeaterTagController.jpf.
    In particular, in XMLString.jsp, it references an expression like this:
    <netui-data:repeater dataSource="{pageContext.xml.employee}">
    I can't figure out how this is working. I can see that the "callPageFlow" tag
    just before this is putting the result of "getXMLStr()" into the "xml" variable.
    This string looks like this:
    <employees>
    <employee title=\"CEO\"><first>Mary</first><last>Smith</last></employee>
    <employee title=\"President\"><first>Mark</first><last>Jones</last></employee>
    <employee title=\"Vice President\"><first>Matt</first><last>Nelson</last></employee>
    <employee title=\"Salesperson\"><first>John</first><last>Doe</last></employee>
    <employee title=\"Office Manager\"><first>Jane</first><last>Doe</last></employee>
    </employees>
    This usage of the data binding language is a little unusual, but I would assume
    it's documented somewhere, right?

    I had already read that description. It has just about one sentence that covers
    the ability to reference elements of an XML string, but without giving any usable
    details. I was already convinced that this and direct variable references were
    worth avoiding, I just wanted to understand the extent of the available features
    first. I guess the lack of any documentation on referencing elements in XML strings
    will make it easier to deprecate :) .
    Eddie O'Neil <[email protected]> wrote:
    David--
    A general data binding description is here:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conDatabindingXScript.html
    This help topic describes the NetUI data binding contexts and how
    properties / objects are
    accessed using them. As far as property binding, a question that came
    up in the group earlier,
    public properties always win over JavaBean properties, so if you expose
    data on any Java object
    (page flow, global app, form bean, repeated data item) like this:
    ::::: Controller.jpf
    public String foo = "foo";
    private String anotherFoo = "another foo";
    public String getFoo()
    return anotherFoo;
    and bind to this in a JSP:
    <netui:label value="{pageFlow.foo}"/>
    the value "foo" will display in your page because it is a public property.
    The specific example that you mention below is a sample of using the
    XScript capabilities in the
    8.1 NetUI data binding language to bind directly to parts of an XML document
    without having turned
    the document itself into a JavaBean.
    Frankly, I'd encourage you to use a JavaBean centric approach as we
    will likely deprecate this
    feature in the future in favor of a more XMLBean / JavaBean centric binding
    model. The JavaBean
    property binding model is also much more in-line with the JSP 2.0 expression
    language.
    In the same vein, I'd also suggest following the best practice of
    exposing JavaBean properties on
    your objects instead of using direct binding to fields.
    If you have additional specific questions, feel free to post them
    here and we can address them as
    they come up.
    Hope that helps...
    Eddie
    David Karr wrote:
    Where in the documentation does it clearly spell out exactly what youcan do with
    the data binding language (the stuff between "{...}")? I'm tryingto understand
    what is happening in the SamplesApp, in the "repeaterTag" module,in XMLString.jsp
    and repeaterTagController.jpf.
    In particular, in XMLString.jsp, it references an expression like this:
    <netui-data:repeater dataSource="{pageContext.xml.employee}">
    I can't figure out how this is working. I can see that the "callPageFlow"tag
    just before this is putting the result of "getXMLStr()" into the "xml"variable.
    This string looks like this:
    <employees>
    <employee title=\"CEO\"><first>Mary</first><last>Smith</last></employee>
    <employee title=\"President\"><first>Mark</first><last>Jones</last></employee>
    <employee title=\"Vice President\"><first>Matt</first><last>Nelson</last></employee>
    <employee title=\"Salesperson\"><first>John</first><last>Doe</last></employee>
    <employee title=\"Office Manager\"><first>Jane</first><last>Doe</last></employee>
    </employees>
    This usage of the data binding language is a little unusual, but Iwould assume
    it's documented somewhere, right?

  • ADF UIX programatic data binding

    Oracle ADF UIX Developer's Guide mentions the possibility to use the UIX framework in Java, to create new objects or alter the existing ones.
    E.g. we can create a table using a construct like:
    TableLayoutBean tlb = new TableLayoutBean();
    The same document demonstrates the data binding:
    BoundValue rows = new DataBoundValue(_YOUR_NAMESPACE, YOURNAME, "rows");
    tlb.setIndexedNodeList(new DataObjectListNodeList(rows));
    For "simple" attributes using DataObject DataObjectList, etc. the procedure is clear. But what about creating a data bound table or input text:
    <table model="${bindings.EmpView1}" ... >
    <messageTextInput model="${bindings.DeptCode}"/>
    It’s easy to understand that model="${bindings.EmpView1}" or model="${bindings.DeptCode}" are equivalent to multiple attribute bindings (data, validation, read-only, etc.), but it looks that the classes/methods resolving these equivalences and linking the bean to the corresponding DCControlBinding, are not public (or maybe I was not able to find them).
    How can we obtain programmatically, in Java, the same structure as described above (in XML)? The best would be to use the same classes used when the UIX XML document is parsed to create the page description.
    It would be very nice to be able to use a structure like
    tbl.setModel( new JUCtrlRangeBinding(...) );
    txt.setModel( new JUCtrlValueBinding(...) );
    or maybe
    txt.setAttribute( "model", new TextInputModelBoundValue(...) ) etc.
    In JSF we can do something like:
    ValueBinding vb = application.createValueBinding(value);
    component.setValueBinding(attributeName, vb);
    Can we do something similar in UIX?
    Any help will be appreciated,
    thanks,
    Mircea Ionita

    Since the code is already written, it's a pity that we can't use/extend it. I don't like to say it (sorry) but I find this design choice (implement the "model" only into the XML parsing layer) a little bit strange (or maybe I don't understand... ;-) ). We should (or we are supposed to) be able to do in java everything that we can do in XML.
    I would like to find more support/help for the programmatic approach. I have the feeling that you are too focalised on "use-our-state-of-the-art-tools/wizards-to-write-the-code-for-you" and you forgot that this is not suitable for all projects. E.g. our application creates the user interface according to a layout defined by each user. To generate it, we need to use at maximum the extension mechanism and we can't simply relay on "rendered" attribute etc.
    -When should we expect this new UIX release?
    -What about the UIX controller? The Struts controller will replace it?
    -What about the source code of uixexp2-demo.jar (distributed with ADF_UIX_component_guide)?
    -Why while debugging we can't set a method/class breakpoint on UIX classes (to understand the data flow) - the stack is secret?
    Thanks

  • Data Binding in ADF UIX example trouble

    Two related questions:
    From the help example 3. Data Binding in ADF UIX example trouble in JDeveloper on UIX. If this worked I was going to run a small java class that captures the login and passes it as a messagebox with a Welcome login name on the first page, but I can't get past the example and path problems.
    From the example..."
    package yourpackage;
    import java.util.Date;
    public class CurrentDateBean
    public CurrentDateBean() { }
    public String getTime()
    return (new Date()).toString();
    Now, we want to change the page so it uses getTime(). We need to do three things: Tell UIX to data bind the text attribute. Add a <dataScope> to the page to provide data to the content. Write a small "data provider" in Java that can access the bean. First, we'll data bind "text": <text xmlns="http://xmlns.oracle.com/uix/ui"
    text="${uix.data.currentDate.time}"/>The example has one small change. The value is changed to ${uix.data.currentDate.time}, which is an expression that defines the data. This is shorthand for "get the time property from currentDate." If you tried running this example, you'd see nothing. That iss because we haven't given currentDate to the page, so the databinding failed, and the "text" is left to null. We do this by adding <dataScope> to the page: <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    Q#1?? Trying to follow the demo. The method class and method name do not seem to match the names in the above class from the demo. Am I missing a point here, please help.
    <data name="currentDate">
    <method class="yourpackage.DataDemo" method="getCurrentDate"/>
    </data>
    </provider>
    <contents>
    <text text="${uix.data.currentDate.time}"/>
    </contents>
    </dataScope>
    Q#2?? When I try and apply the demo class to my home.uix XML file with
    "<?xml version = '1.0' encoding = 'windows-1252'?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- start Add DataProviders (<data> elements) here -->
    <data name="currentDate">
    <method class="us.mn.state.dot.apptrack.security.CurrentDateBean" method="getTime()"/>
    </data>
    <!-- end Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <text text="${uix.data.currentDate.time}"/>
    <document>
    <metaContainer>"
    I get the following, and I don't know how to make the UIX XML accept the correct path, please help:
    �file:/C:/JDeveloper905p/jdev/mywork/ProjTrack/AppTrack/ViewController/public_html/home.uix: Parsing error, line 12, column 97: Could not find class us.mn.state.dot.apptrack.security.CurrentDateBean

    for question 1 the name of the class CurrentDateBean
    actually has nothing to do with the el expression
    uix.data.currentDate.time. The currentDate part of the
    el expression is coming from the method data provider part
    of your page:
    <data name="currentDate">
    <method class="yourpackage.DataDemo"
    method="getCurrentDate"/>
    </data>
    so if you changed the name of the data provider to "foo":
    <data name="foo">
    <method class="yourpackage.DataDemo"
    method="getCurrentDate"/>
    </data>
    your el would look like this:
    uix.data.foo.time
    by the way the uix.data part tells UIX to look for
    a <data> element define in the <provider> section of
    your dataScope.
    For question #2, do you have the java file
    us.mn.state.dot.apptrack.security.CurrentDateBean on
    your classpath and is it compiled? You will get that
    warning if it is not on your classpath.
    Also you are incorrectly interpreting the example. What
    you are doing is trying to reference the actual bean
    object and its getTime() method. What you want to do
    is write a method data provider that returns your
    CurrentDataBean. so uix.data.currentDate would return
    a CurrentDateBean instance object. the .time part of the
    el expression would tell UIX to look for a method named
    getTime() and use that value.
    let me know if you have any more questions.

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • ADF JSF 10.13 how do you reference a binding from a command button?

    I have developed the following code as a model as I am trying to utilise ADF JSF without using a database.
    I have a collection called School. This has the appropriate operations that populate the school with a number of Child. A Child simply has a firstname and a surname.
    I have generated data controls for these collections and created two JSP pages and added a navigation link as follows:
    index.jsp --> goToSchool (navigation) --> school.jsp
    I have then added a command button to the index.jsp page. When the button is then pressed the school.jsp page is displayed. This works correctly.
    I would like to override the action of the button though so that before the navigation is executed I can get a handle on the school collection and populate it so that it will be displayed on the school.jsp page.
    I have previously done this in 10.12 when I had the following setup:
    index.jsp --> getSchool (dataAction) --> school.jsp
    by overriding the getSchool dataAction.
    I have looked through the 10.13 ADF user guides and tried various different things but have not managed to successfully acheive my goal of populating the school collection when the button is pressed prior to navigating to the school.jsp page.
    I would appreciate it if you could offer any advice, and if possible let me know the recommended best practices to acheive this.
    Thanks in advance for your help
    David

    Check out the ADF Tutorial (TopLink edition) chapter 5 has a section called:
    Adding a Drilldown Link
    I think this is what you are looking for.
    http://www.oracle.com/technology/obe/ADF_tutorial_1013/ADF_tutorial.pdf

  • How to handle html:multibox in jsp with ADF Data Binding

    Hi,
    I like to use html:multibox feature in my jsp with ADF Data Binding. I am able to retrieve checked values in the DataForwardAction form. However, when the page is refreshed, the checkboxes are not persistent and yet an error showing
    "JBO-25009: unable to create object type ....oracle.jbo.domain.Array" appears.
    Here is my jsp code:
    <c:forEach var="type" items="${bindings.SystemTypeView1.rangeSet}">
    <c:if test="${Row['SystemGroup'] == type['SystemGroup']}">
    <br>
    <html:multibox property="selectedSystemType">
    <c:out value="${type.SystemType}"/>
    </html:multibox>
    <c:out value="${type.TypeDesc}"/>
    </c:if>
    </c:forEach>
    Can anyone tell me how to handle html:multibox with ADF Data Binding and make the checkboxes persistent.

    Generally this can be done.
    I see a problem with your use case, which has nothing to do with jdev or java:
    How do you identify the user when he comes back to finish the form?
    For this you can't use information like session cookie or IP address because they change.
    So you have to save some information about the user which lets you identify him when he comes back. All other requirements can be implemented by ADF.
    Timo

  • Data binding and screen communication

    It seems to me that the "backing bean" concept for a view is becoming the common way to implement JSF pages. I just wanted to get some feedback on something I was thinking about concerning the data that the components bind to and communication between screens. I think there are two options:
    1) Create a "ViewDataBean" more or less a "sister-bean" to the backing bean, and is stored in session scope. All of the components in the backing bean are bound to the data in the ViewDataBean. That ViewDataBean would also be used to communicate from one screen to the other (binding related pages to the ViewDataBean attributes).
    2) Eliminate the "ViewDataBean" and put the actual data in the backing bean itself, binding the components in the backing bean to the data. Communication between screens would then be done by binding components in one backing bean to the data in a different backing bean. This means that all backing beans would be in session scope and I would need to figure out a way to clean them up. Other than that I think this would be a good solution.
    I asked this same question during the "Q&A" portion of the "Meet the JSF Expert group", and didn't get a lot of feedback. What do you guys think of this?
    Dave

    I beleive Adam Winer just said there are some problems in using session beans.
    That why many experts will say: "keep session storage to a reasonable minimum."
    Inside "blueprints solutions" you can find rules:
    Request scope
    Information in this scope is created some time after the request is received and is disposed of some time before the response is complete. It is a good practice to have the backing beans for pages be in the request scope where possible, and maintain separate beans that store only the information that will not need to be continually passed between the client and server.
    The following types of information are good candidates for storing in the request scope:
    Value bindings (e.g. <h:inputText value="#{MyBean.lastName}" /> should always be stored in request scope since they are automatically restored on every request.
    Component bindings (e.g. <h:inputText binding="#{MyBean.lastNameComponent}" />) should always be stored in request scope since their value is no longer valid after a request has been processed anyway. The component tree is reconstituted during each incoming request, changing the physical instances these component bindings will point to.
    References to database resources such as connections, statements, and result sets should be properly closed and discarded before a request is complete (see the section on resource management below for details).<>
    <>Caches of database query results - see section on caching database query results for details.
    <>Temporary results of calculations used for rendering the current view.
    Session scope
    Information in this scope is created some time after the current user's first request is received and is disposed of after a configurable period of inactivity (i.e. when a request has not been received in a certain period of time), or when a session is explicitly invalidated by the application. It is also disposed of when the application is undeployed. Depending on the robustness of the application server, it may also be disposed of when the application server is shut down or crashes.
    The following types of information are good candidates for storing in the session scope:
    Navigational context, for example the album the user is currently editing in a music catalog application. This type of information could potentially be carefully passed back and forth via hidden input fields, but this is error prone and can be difficult to manage together with form validation and when forms are shared between different parts of an application.
    Information that is specific to this session, but temporary, such as short-lived shopping carts. The information can be made persistent by also updating a database table. The recommended way to do this is via entity EJBs, but this can be done by manually coding database-aware JavaBeans as well.
    Security sensitive information that should not be continuously sent back and forth between the client and server.
    Caches of database query results - see section on caching database query results for details.
    Application scope
    Information in this scope is created some time after the application starts and is discarded some time before the application is undeployed. Depending on the robustness of the application server, it may also be disposed of when the application server is shut down or crashes.
    The following types of information are good candidates for storing in the application scope:
    Information that transcends particular users or sessions, such as application settings.
    Caches of database query results - see section on caching database query results for detai
    I'm sure we just have to make real JSF application, not some kind of jsp or html pages.
    Rules for creating real JSF application:
    1) using only native JSF navigation
    2) using only JSF tags
    3) easy way to exchange information between beans
    (probably suggestion Adam Winer about input and output parameters for action is good idea in this direction)
    4) using only good jsf components
    In good JSF application using session scope can't be problem at all.

  • ADF af:panelSplitter binding in threeColumnTemplate NullPointerException

    Oracle Fusion ADF - Accessing ADF af:panelSplitter binding in threeColumnTemplate NullPointerException
    Hi,
    when using the template containing panel splitter binding to backing bean panelSpliterRightShoppingCart a RichPanelSplitter,
    when clicking on a command button, the action throws a NullPointerException. Any ideas as to why the component is NULL on
    a fully rendered page? I want to be able to set the collapsed attribute to true or false and of course see that state in the browser view, Thanks...
    <af:panelSplitter collapsed="false" binding="#{backingBeanScope.backing_jsp_myDetails.panelSpliterRightShoppingCart}"
    orientation="horizontal"
    splitterPosition="#{attrs.endColumnSize}"
    positionedFromEnd="true" id="panelSpliterRightCart">
    <f:facet name="first">
    <!-- start of main decoration -->
    <af:decorativeBox theme="default" id="pt_db2">
    <f:facet name="center">
    <af:facetRef facetName="center"/>
    </f:facet>
    </af:decorativeBox>
    <!-- end of main decoration -->
    </f:facet>
    <f:facet name="second">
    <af:facetRef facetName="end"/>
    </f:facet>
    </af:panelSplitter>
    Edited by: meet.mrnrg on Sep 1, 2009 12:05 PM

    Yes - the problem is with the current limitations on the level of EL expression language capabilities on the EL expression enabled attributes of various tags.
    1) The Oracle Fusion Expression - BUILDER - currently only allows the following operations;
    #{&&} #{||} #{>} #{<} #{>=} #{<=} #{==} #{!=} #{-} #{!} #{+} #{-} #{*} #{} #{%}
    2) The Oracle Fusion Expression - BUILDER - currently DOES NOT allow;
    a) access to public methods
    b) access to public methods of any return type
    c) access to public methods with any parameter lists
    -- My Problem --
    <af:pageTemplate viewId="/templates/threeColumnTemplate.jspx"> -- This is the template with the following;
    The code:
    af:panelSplitter collapsed="false" binding="#{backingBeanScope.backing_jsp_myDetails.panelSpliterRightShoppingCart}"
    a) This binding attribute as a valid EL expression, the page compiles with no-errors.
    b) The backing bean and the field attribute exist
    c) The filed attribute of type RichPanelSplitter - it has setter and getter methods.
    d) The code: The if check removes the NullPointerException, but does not explain why the field data member is not populated, it show not be NULL, all other Richxxx types are populated with valid page object references.
    public void collapseExpandRightCartPanelSplitter() {
    System.out.println("collapseExpandRightCartPanelSplitter: " + "collapseExpandRightCartPanelSplitter()");
    System.out.println("panelSpliterRightShoppingCart: " + panelSpliterRightShoppingCart);
    if (this.panelSpliterRightShoppingCart != null) { //Removes NullPointerException
    if (this.panelSpliterRightShoppingCart.isRendered()) {
    this.panelSpliterRightShoppingCart.setCollapsed(false);
    } else {
    this.panelSpliterRightShoppingCart.setCollapsed(true);
    e) The main JSPX page calls the template and has a RichCommandButton - this button has an action which invokes the collapseExpandRightCartPanelSplitter() method in the backing bean! But of course as mentioned the field data member is not populated and is always NULL for some reason!

  • Jsf data table component + print null cell

    I am using the jsf data table component and binding the column values to a backing bean.
    <h:dataTable binding="#{backing_showDifferences.dataTable2}"
    id="dataTable2">
    <h:column binding="#{backing_showDifferences.userColumn1}"/>
    <h:column binding="#{backing_showDifferences.userColumn2}"/>
    <h:column binding="#{backing_showDifferences.userColumn3}"/>
    </h:dataTable>
    - some code from my showDifferences.java
    HtmlOutputText column1Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.uclass}");
    column1Text.setValueBinding("value", vb);
    usercolumn1.getChildren().add(column1Text);
    HtmlOutputText column2Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.ue1}");
    column2Text.setValueBinding("value", vb);
    usercolumn2.getChildren().add(column2Text);
    HtmlOutputText column3Text = new HtmlOutputText();
    vb =
    FacesContext.getCurrentInstance().getApplication().createValueBinding("#{users.ue2}");
    column3Text.setValueBinding("value", vb);
    usercolumn3.getChildren().add(column3Text);
    ResultSetDataModel dataModel = new ResultSetDataModel();
    dataModel.setWrappedData(rs);
    dataTable2.setValue(dataModel);
    The raw HTML:
    <table id="form1:dataTable2" class="iuptable" border="1">
    <thead>
    <tr>
    <th scope="col">Heading 1</th>
    <th scope="col">Heading 2</th>
    <th scope="col">Heading3</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>some data in this column</td>
    <td>X</td>
    <td></td>
    </tr>
    <tr>
    <td>Some more data in this row</td>
    <td>X</td>
    <td></td>
    </tr>
    </tbody>
    </table>
    My problem is this...in the raw HTML the <td></td> tag is not formatted nicely on my table output. I have lines around my entire table and each cell within it. When the <td></td> prints there are no lines. I am new to the JSF table data component, but if I were writing some JSP or servlet code I would check that if value was null I would append an &nbsp to the <td> tag (ex. <td>&nbsp</td>) and the table would be formatted properly. The backing bean that I am binding to is pulling the data from a database table...so my sql looks like this:
    SELECT uclass, ue1, ue2 from table1; my problem is when ue1 or ue2 is a null value.
    Any ideas would be greatly appreciated!

    Hi,
    the h:dataTable belongs to the JSF Reference Implementation from Sun, not to Oracle ADF Faces. The rendering is within this component set and I suggest to report your issue on one of the SUN forums (http://forum.java.sun.com/forum.jspa?forumID=427) as we have no handle to e.g. fix an issue if it exists in the component set.
    Frank

  • ADF/JSF page loads when any command button is clicked

    Hello All,
    I am lost in the ADF/JSF page flow (using Jdev 10.1.3). Following are the tags (in order) in my page;
    (WHEN THIS PAGE LOADS, IT GOES TO THE DATABASE TO GET VALUES (for the drop down lists that will appear on the page); THIS SHOULD HAPPEN JUST ONCE AND AT THIS POINT)
    <f:view>
    <afh:body>
    <afh:html>
    <af:form>
    <af:panelpage>
    <f:facet name="contextSwitcher">
    <af:panelHorizontal> has a af:commandLink </af:panelHorizontal>
    </f:facet>
    <f:facet name="messages">
    <af:messages/>
    </f:facet>
    <af:panelform>
    <h:panelGrid columns="2" cellspacing="14">
    has 2 panelgroups (one group has *2 SelectOneChoice lists (that need to be populated by fetching data from database* and the other group has 2 CommandButtons - 'Go' and 'Cancel") (GO BUTTON SETS THE SHOWPANEL() TO TRUE)
    (WHEN GO BUTTON IS CLICKED, THE PAGE GOES TO THE DATABASE (AS IT DID ON PAGE LOAD). *THIS SHOULD NOT BE HAPPENING*. ONLY THE METHOD (action="#{muBean.doWork}" )THAT IS ASSOCIATED WITH GO BUTTON ACTION SHOULD BE CALLED)
    </h:panelGrid>
    <h:panelGrid columns="2" cellspacing="14" rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has 3 inputText fields
    </h:panelGrid>
    <af:table var="someTable" rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has a bunch of af:columns
    </af:table>
    <af:panelHorizontal rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has 3 af:commandButtons - submit, save, add row
    (WHEN submit or save or add row BUTTON IS CLICKED, THE PAGE KIND OF LOADS AND GOES TO THE DATABASE (AS IT DID ON PAGE LOAD). *THIS SHOULD NOT BE HAPPENING*. ONLY THE METHOD THAT IS ASSOCIATED WITH submit/save/add row BUTTON ACTION SHOULD BE CALLED)
    </af:panelHorizontal
    </af:panelForm>
    </af:panelPage>
    <!-- Footer -->
    <jsp:include page="/pages/includes/footer.jspx"/>
    </af:form>
    <f:verbatim>
    <script type="text/javascript" src="../script/tree.js"></script>
    </f:verbatim>
    </afh:body>
    </afh:html>
    </f:view>
    </jsp:root>
    _*why is it that when the command buttons are clicked, the whole page is loaded? Only the methods associated with the action (action="#{newMapRequestItem.addARow}" ) should be called.*_
    _*IS THERE A WAY TO AVOID THIS WITHOUT USING PARTIAL PAGE RENDERING ?*_
    _*DOES MY TAG NESTING LOOK OK?*_
    Edited by: user12054715 on Mar 24, 2010 12:00 PM

    Can somebody please address this?
    Thanks,

  • ADF JSF URL problems...

    Hi All,
    I have the following requirement. Please could someone help me out?
    1) I have a dot net application into which I can log in with either the Canadian or US context. This is kind of multi-orging.
    2) Once logged in, the user needs to right click on a value in a panel inside this Windows dot net application and click a menu option.
    3) Once the option is clicked, a new JSF page will open. The URL for this JSF page will have the parameters such as the user country code plus the document number of the panel value.
    4) For this JSF page I am planning on an ADF JSF application. The application module for this application will have two database connections, basically two different schemas which are triggered based on the context information. These are already available in the bc4j.xcfg file.
    5) Based on the country parameter passed in the URL, I need to alternate the database connection information on the root application module created by the application between teh two database schemas using the bc4j.xcfg file in the Model project of the application. This needs to be done dynamically through the code.
    In order to fulfill the above requirement, I need to do the following:-
    1) As soon as the URL is triggered, the ADF application needs to read the URL parameters and set the context specific database schema of the application module without pressing a button or any other manual user trigger in hte JSF page. Basically I am looking at loading the JSF page dynamically after having set the database schema on the application module that was instantiated using the URL parameters
    2) After step 1, since the database schema is now set on the context I will be able to use the database schema to load data from the database objects.
    3) Each schema has a database trigger which runs when the database connection is initiated. This is used to set the multi-org context.
    Please could someone help me out with step 1 above on how to read URL parameters without any user triggers on the JSF page and setting the database schema on the application module being used by the application. Please remember that I am not using JDBC data sources but JDBC URL's to create m application.
    Any code samples to load the current application module instance and setting the database connection on the same from bc4j.xcfg would be very very helpful.
    Thanks a lot.
    Regards,
    Lester.

    Hi safir,
    thanks for your answer.
    With JSF also "normal" Links should be handled like Form-submit links
    ("Command buttons")
    (see in JSF manual "Using java server faces tech.", page 82 Handling Events: Application Events: #
    <i>Because app. events apply to the entire application, this kind of event is currently used for
    navigation between pages of the app.</i>)
    So it is a general Problem, you cannot copy the links from the browser.
    I understand, that is is not a bug,
    but is there maybe a solution for my problem?
    I want to use JSF, because of the good form validation
    operations.

Maybe you are looking for

  • CSA causing BSOD - btaudio.sys

    Hey Guys, We're trying to build a new SOE, but on a laptop when you turn on/off bluetooth we recieve a Blue screen of death. With CSA uninstalled the error does not occur. With CSA turned off (right clicked on task bar) we still get a BSOD, so that k

  • Why this simple 'IF' syntax is not working?

    Hello Pls. help me that, var myObject = /TextField11/ var greyFieldsList = "TextFieldAA TextFieldBB TextFieldCC " var ReqFieldsList = "TextField11 TextField22 TextField33 " var returnValue = greyFieldsList.search(myObject); var returnValueReq = ReqFi

  • Help mem please - adding metadata to iweb files changed to RTFD

    Hi guys - can you help me please. I've just followed some of the threads to try and add metadata and keywords to my site. I thought I'd cracked it. I opened the .html in Finer/idisk/web/sites/iweb/my site name.co.uk/page.html I wanted to add data to.

  • My MacBook has become very very slow

    My MacBook has become very slow for the last 2 weeks and often gets hangs with mail/address book applications. I have tried disc cleaning and permission repair but no change. Anybody has solution?

  • Error on pst file When leave outlook opend without any action for a while

    Hi, When I leave my outlook opend without any action for a while it reports an error in the pst file and out of memory error,so i have to close outllok then open it again this problem is general (not just on my pc ), i tried compact for the pst file