Scope backingbean

I have 2 backingbean:
The faces-config.xml look like :
<faces-config>
<managed-bean>
<managed-bean-name>Ca</managed-bean-name>
<managed-bean-class>com.backbase.bjs.example.ClienteActivo</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>Bus</managed-bean-name>
<managed-bean-class>com.backbase.bjs.example.SampleBackingBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
Inside the Bus object I try to get Ca objetc in this way:
1-//Obtain the bean ClienteActivo
HttpSession ss2= (HttpSession )FacesContext.getCurrentInstance().getExternalContext().getSession(true);
ClienteActivo CA= (ClienteActivo)ss2.getAttribute("Ca");
->This fail
But the same with the other object Bus works ok
2-
//Obtain the bean Bus
HttpSession ss= (HttpSession )FacesContext.getCurrentInstance().getExternalContext().getSession(true);
SampleBackingBean bus= (SampleBackingBean)ss.getAttribute("Bus");
bus.setText("Perico palotes");
Why one works and the other not??????????????

The managed-bean will not be in the context until it is accessed by JSF for the first time. i.e. the first time you bind "Ca" to the value of an inputText component.
CowKing

Similar Messages

  • How to get a parameter from each request in a session scope BackingBean

    While calling my JSF page, I pass an id as parameter in the URL, and in the Backing bean I retrieve it from the request.
    On each request I need to get the id and populate the page accordingly.
    But I am forced to create my Backing Bean in session scope b'cos otherwise ValueChangeListener method does not work properly.
    So where and how do I get the id on each request?
    Pls. help

    What you can do is create it in the request scope like this:
    <managed-bean>
          <managed-bean-name>personBean</managed-bean-name>
          <managed-bean-class>
            com.PersonBean
          </managed-bean-class>
          <managed-bean-scope>request</managed-bean-scope>
           <managed-property>
                 <property-name>id</property-name>
                 <property-class>java.lang.Long</property-class>
              <value>#{param.id}</value>
          </managed-property>
    </managed-bean>And then in the page use a hidden field to set the id in case of a postback (validation error):
    <h:inputHidden id="id" value="#{personBean.id}"/>Does that help you?
    Thomas

  • JSFF BackingBean scope

    Hello!
    I have a page composed of a region and jsff
    according to this doc; http://docs.oracle.com/cd/E12839_01/web.1111/b31974/web_getstarted.htm#BABBHGJA
    any backing beans for page fragments or declarative components should use BackingBean scope
    The backingbean's constructed is executed everytime thus resets my variables, How can I make it sessionscoped?
    I tried regisitering session scoped using annotations
    @ManagedBean
    @SessionScoped
    adf-config.xml
    faces-config.xml
    in the taskflow definition file
    everything! but the constructor is called multiple times
    thanks in advance please help!

    Let me get this straight, I am trying to understand
    Should I have two Beans per jsff? (If I need to carry state) one backingbean for the components (gettters/setters) and the other a session or pageflowscoped bean where I keep the state of my variables such as lists, strings, etc?
    and from the backingbean access those variables?
    Do you have a simple example you can show me? I was checking the blog Timo Hahn provided, I need an example, please!
    I created my session scoped bean and assign it to the backing bean ( that I already have) How should I access programatically from my backingbean a variable that is in a session scoped bean?
    and in my adfc-config.xml I have this
      <managed-bean id="__21">
        <managed-bean-name>beanSessionRegistrarGuia</managed-bean-name>
        <managed-bean-class>siat.view.backing.transporte.guia.SessionScopedBeanRegistrarGuia</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    <managed-bean id="__15">
        <managed-bean-name>backing_transporte_guia_frm_registrar_guia</managed-bean-name>
        <managed-bean-class>siat.view.backing.transporte.guia.Frm_registrar_guia</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1transporte/guia/frm_registrar_guia.jsff-->
        <managed-property id="__22">
          <property-name>beanSessionRegistrarGuia</property-name>
          <property-class>siat.view.backing.transporte.guia.SessionScopedBeanRegistrarGuia</property-class>
          <value>#{beanSessionRegistrarGuia}</value>
        </managed-property>
      </managed-bean>According to the blog
    private UIManager _uiManager;
    //Which should be exposed via a getter and setter pair with names that match the managed property name (e.g. setUiManager(UIManager _uiManager), getUiManager()). In my backing bean I do this
    private SessionScopedBeanRegistrarGuia sessBean;//+gettter and setterIn my SessionScoped Bean I have this
        public SessionScopedBeanRegistrarGuia(){
            System.out.println("I AM SESSION SCOPED BEAN");
        }This SOP is called but then I get error:
    <RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:El ciclo de vida de Faces recibe excepciones no tratadas en la fase RENDER_RESPONSE 6
    javax.faces.FacesException: javax.faces.FacesException: oracle.adf.controller.ControllerException: ADFC-10004: no se puede definir la propiedad de bean gestionado 'beanSessionRegistrarGuia'
         at com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1900)
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1109)
         at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:511)
         at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:157)
    ....MORE ERRORSEdited by: diego10 on 22-may-2013 8:21

  • How to change MANAGED-BEAN-SCOPE??????

    Hi Gurus,
    How to change the managed-bean-scope? In my ADF application I have created one backing bean which has attched with the page fragment. I cant able to set the bean scope other than REQUEST....
    If I set the bean scope request, then page and the inside fragment is rendering without any error. But I need to make that bean scope to pageFlow... but if I do, getting the below error. Non of the scopes are working except request... Please help me how to set the other scope which will solve my major development issue!!!!
    Error:
    Error trying to include:viewId:/advsearch-flow-definition/advUserSearch uri:/app/advUserSearch.jsffjavax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'UserSearch' resolved to null
    My ADFC-Config.xml:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <managed-bean>
    <managed-bean-name>backing_app_idm</managed-bean-name>
    <managed-bean-class>edu.syr.oim.backing.app.Idm</managed-bean-class>
    <managed-bean-scope>backingBean</managed-bean-scope>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1app/idm.jspx-->
    </managed-bean>
    <managed-bean>
    <managed-bean-name>backing_app_userMgmt</managed-bean-name>
    <managed-bean-class>edu.syr.oim.backing.app.UserMgmt</managed-bean-class>
    <managed-bean-scope>backingBean</managed-bean-scope>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1app/userMgmt.jspx-->
    </managed-bean>
    *<managed-bean>*
    *<managed-bean-name>UserSearch</managed-bean-name>*
    *<managed-bean-class>edu.syr.oim.backing.app.UserSearch</managed-bean-class>*
    *<managed-bean-scope>request</managed-bean-scope>*
    *</managed-bean>*
    </adfc-config>
    -kln
    Edited by: klogube on Jan 14, 2010 7:23 AM

    *public class UserSearch {*
    private RichTable searchResultTable;
    private Row currentRow;
    private String selectedNetID;
    private RichInputText inputOne;
    private RichInputText inputTwo;
    private RichInputText inputThree;
    private RichSelectOneChoice choiceOne;
    private RichSelectOneChoice choiceTwo;
    private RichSelectOneChoice choiceThree;
    private RichRegion region;
    private String choiceOneVal;
    private String choiceTwoVal;
    private String choiceThreeVal;
    DCBindingContainer bindings;
    int choiceOneRowIndex;
    int choiceTwoRowIndex;
    int choiceThreeRowIndex;
    Row choiceOnerw;
    Row choiceTworw;
    Row choiceThreerw;
    String choiceOneUserSelected = null;
    String choiceTwoUserSelected = null;
    String choiceThreeUserSelected = null;
    static String  txnTypeOne  = null;
    static String  txnTypeTwo  = null;
    static String  txnTypeThree  = null;
    String netid;
    RequestContext requestContext = RequestContext.getCurrentInstance();
    HashMap rcBackupHM = new HashMap();
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletRequest request = (HttpServletRequest)fc.getExternalContext().getRequest();
    HttpSession session = request.getSession();
    *public UserSearch() {*
    *public String userSelected() {*
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    return "goToDetails";
    ** Invoke this method when user double click the row in searchResult*
    *public void doDbClick(ClientEvent clientEvent) {*
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    *try{*
    FacesContext facesCtx = FacesContext.getCurrentInstance();
    NavigationHandler nh = facesCtx.getApplication().getNavigationHandler();
    nh.handleNavigation(facesCtx, "", "goDetails");
    *// Refresh the current region; advse1 is the id of the region component inside jspx page*
    AdfFacesContext.getCurrentInstance().addPartialTarget(region);
    *catch(Exception e){ }*
    *public void setSearchResultTable(RichTable searchResultTable) {*
    this.searchResultTable = searchResultTable;
    *public RichTable getSearchResultTable() {*
    return searchResultTable;
    *public void setInputOne(RichInputText inputOne) {*
    this.inputOne = inputOne;
    *public RichInputText getInputOne() {*
    return inputOne;
    *public void setInputTwo(RichInputText inputTwo) {*
    this.inputTwo = inputTwo;
    *public RichInputText getInputTwo() {*
    return inputTwo;
    *public void setInputThree(RichInputText inputThree) {*
    this.inputThree = inputThree;
    *public RichInputText getInputThree() {*
    return inputThree;
    *public void setChoiceOne(RichSelectOneChoice choiceOne) {*
    this.choiceOne = choiceOne;
    *public RichSelectOneChoice getChoiceOne() {*
    return choiceOne;
    *public void setChoiceTwo(RichSelectOneChoice choiceTwo) {*
    this.choiceTwo = choiceTwo;
    *public RichSelectOneChoice getChoiceTwo() {*
    return choiceTwo;
    *public void setChoiceThree(RichSelectOneChoice choiceThree) {*
    this.choiceThree = choiceThree;
    *public RichSelectOneChoice getChoiceThree() {*
    return choiceThree;
    *public void setChoiceOneVal(String choiceOneVal) {*
    this.choiceOneVal = choiceOneVal;
    *public String getChoiceOneVal() {*
    return choiceOneVal;
    *public void setChoiceTwoVal(String choiceTwoVal) {*
    this.choiceTwoVal = choiceTwoVal;
    *public String getChoiceTwoVal() {*
    return choiceTwoVal;
    *public void setChoiceThreeVal(String choiceThreeVal) {*
    this.choiceThreeVal = choiceThreeVal;
    *public String getChoiceThreeVal() {*
    return choiceThreeVal;
    *public void setRegion(RichRegion region) {*
    this.region = region;
    *public RichRegion getRegion() {*
    return region;
    Can you please explain how to define the 2nd bean in the pageFlowScope and injnect?...bacially my problem is I am loosing the pageFlowScope value when I navigate from first page to next page which I am setting by this above class....I need to carry forward the netid which I am losing ...any idea plz

  • Template UI Logic and backingbean

    Hi,
    I'm new to adf and i'm trying to build a sample project with jDevelopper 11.1.2.1.0 for my company to know if we can switch to it.
    I've go a use case to implement but i've got some issues to understand how i can do it.
    I must create a view with :
    1) a top zone with a toolbar (and other stuff)
    2) a center zone with a panel tabbed
    2.a) In the first tab, a bounded table with some columns
    2.b) In the second tab a splitter
    2.b.i ) In the first facet of the splitter a second bounded table with some other columns (but linked to the same iterator)
    2.b.ii) In the second facet of the splitter a form (to edit the data)
    3) a bottom zone with a statut toolbar.
    I've created my toolbar with a declarative component following the adf corner [079. Strategy for implementing global buttons in a page template|http://www.oracle.com/technetwork/developer-tools/adf/learnmore/79-global-template-button-strategy-360139.pdf], my toolbar have 5 buttons (create, edit, save, cancel and delete).
    I then created a template for placing panel, and table splitter ui components with a backingbean used for binding the ui components (in backingbean scope, its' important cause the template could be on the same page with nested template tag)
    I've created a taskflow following the adf corner [007.How to cancel an edit form, undoing changes with ADFm savepoints|http://www.oracle.com/technetwork/developer-tools/adf/learnmore/007-cancelform-savepoint-169126.pdf] for the edit form
    I created a page that inherits my template, placed the declarative component toolbar at the top, placed the two bounded datatable in the facets of the template, and finally created a normal region calling the taskflow.
    When i click on the create button, the template backing bean receive the "event" and handle it, changing a task flow parameter.... (updating the region)
    My taskflow update and show me the create form... no problem....
    But if the user is on the first tab, he sees nothing. So i would like to change the disclosed property of the showDetailItems of the panelTabbed.
    I then created a variable in the pageDef of the template that would store a boolean value if the page is in EditMode or not. (create and edit is edit mode. save, cancel and delete is not)
    I created a contextual event to listen when that variable change, like that a datacontrol from a bean with a single public method could handle that change :
    onIsEditModeChanged(boolean newValue){
     getGUI().swicthShowDetailItem(newValue);
    }The method try to get the backingbean of the template (with a el expression), and then call a updatePanel(Boolean newValue) for changing the disclosed property of the showDetailItems :
    public BackingBeanTemplate001 getGUI()
     FacesContext context = FacesContext.getCurrentInstance();
     ELContext eLContext = context.getELContext();
     ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory();
     ValueExpression createValueExpression =
     expressionFactory.createValueExpression(eLContext, "#{backingBeanScope.backingBeanTemplate001}", BackingBeanTemplate001.class);
     return (BackingBeanTemplate001)createValueExpression.getValue(eLContext);
    public void swicthShowDetailItem(Boolean newValue) {
     if (newValue) {
      if(!showDetail2.isDisclosed()){
       showDetaill1.setDisclosed(false);
       showDetaill2.setDisclosed(true);
    }Here's my issue :
    When the onIsEditModeChanged method is called the backingbean of the template doesn't exist in the context.
    So adf create a new instance of it but doesn't fill the ui component references of the page so i can't change the properties cause i get a NPE.
    of course showDetail2 and showDetail1 have their binding property set :
    <af:showDetailItem text="showDetail1" id="pt_sdi1" stretchChildren="first" binding="#{backingBeanScope.backingBeanTemplate001.showDetail1}">
    And
    <af:showDetailItem text="showDetail2" id="pt_sdi1" stretchChildren="first" binding="#{backingBeanScope.backingBeanTemplate001.showDetail2}">the backingBeanScope.backingBeanTemplate001 is referenced in adfc-config.xml :
    <managed-bean id="__5">
         <managed-bean-name>backingBeanTemplate001</managed-bean-name>
         <managed-bean-class>org.darkink.test.backingbean.template.BackingBeanTemplate001</managed-bean-class>
         <managed-bean-scope>backingBean</managed-bean-scope>
    </managed-bean>If i put a button IN the template that change my attribut value :
    public void switchAction(ActionEvent actionEvent) {
             BindingContext bindingContext = BindingContext.getCurrent();
             DCBindingContainer bindingContainer = (DCBindingContainer)bindingContext.getCurrentBindingsEntry();
             AttributeBinding binding = (AttributeBinding)bindingContainer.getControlBinding("isEditModeAttr");
             binding.setInputValue(true);
    }I dont have the NPE, at the "JSF Invoke Application" the bean already exists in the context (it is created at the "JSF Restore View") and all the ui component are NOT null.
    BUT if a place my button in the page that inherits the template and i call that method :
    public void switchAction(ActionEvent actionEvent) {
             BindingContext bindingContext = BindingContext.getCurrent();
             DCBindingContainer bindingContainer = (DCBindingContainer)bindingContext.getCurrentBindingsEntry();
             DCBindingContainer bcPtb1 = (DCBindingContainer)bindingContainer.get("ptb1");
             AttributeBinding binding = (AttributeBinding)bcPtb1 .getControlBinding("isEditModeAttr");
             binding.setInputValue(true);
    }everything works the same BUT at the "JSF Invoke Application" the bean doesn't exist in the context (so adf create it, BUT doesn't fill the ui component bindings).
    The strange thing is that at the "JSF Restore View" the backingbean is well created and filled with the ref of the ui components....
    So here's my questions :
    1) Why there is a difference when my button is on the template and when it's on the page ??? (with the backingbean)
    2) Why the backingbean is not fully created (only the constructor is called and not the ui components bindings)
    3) How can i realise my use case ?
    4) Is there another method to implement UI Logic with template ?
    5) Is there a better way to do this ?
    6) How to get the context of the template ?
    Thanks a lot for all of you who had the patience to read all of this, i know it's a lot
    but i didn't know how to explain my problem without all thoses explanations.
    I've read all the adf corner and all the given pdf books on the site (that i've found) trying to search for a solution and
    didn't find one. So please don't tell me read the books, or the solution is already documented...
    It would be a lot more helpfull to explain me why it's not working or why what a did is not a good solution.
    Sorry for my poor english too.
    Thanks a lot....
    Angle
    P.S 1:
    In the swicthShowDetailItem method i've tried to change for using this :
    if (newValue) {
     RichShowDetailItem c = (RichShowDetailItem)getComponent("pt1:pt_pt1:pt_sdi2");
     if (!c.isDisclosed()) {
        ((RichShowDetailItem)getComponent("pt1:pt_pt1:pt_sdi1")).setDisclosed(false);
        c.setDisclosed(true);
    }It's working... but ugly and not efficient... so for me it's not a good answer....
    P.S 2:
    Another solution that i've found is that i could create an hidden button on the template
    that call the change event and in the page create a button that queue a click event
    on that button but for me it's not a solution.
    P.S 3:
    I dont like a JavaScript solution neither. for me, if a can bind my ui components to a backingbean
    i want to be able to use them !!!
    Edited by: 915518 on 19 févr. 2012 12:04
    Edited by: 915518 on 19 févr. 2012 12:10

    Hi,
    There will not any performance issue as such as all the code will be executed by the same Dialog workprocess in the application server.
    But it is alwys good to keep you flow logic and application logic seperated, so flow logic just calls the methods and the methods are in a different component like a static method of a class or function module in a function group.
    Best thing is Function Group as you can have screens in a Function pool.
    Regards,
    Sesh

  • Oracle.adf.controller.activity.ActivityLogicException: ADFC-02013: Unable to get metadata for activity

    Hello,
    I am new to ADF, I am trying to learn how to navigate from one page to another, the code that I have is simple, but it is not working, I specified the control flow rules in the adfc-config.xml and I even tried to specify the navigation rules in the faces-config.xml file, but it doesn't matter if I do it in one configuration file or another I get the same error.  This is my first time working with ADF, I don't have formal training, just some video tutorial that I have seen on internet.  I have previous experience with JSF, so I feel more comfortable writing the code for my program than using all the graphical tools (at least at this moment)
    Any help to solve this problem will be highly appreciated.
    This is my page1.jsf  code:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html>
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:h="http://java.sun.com/jsf/html">
        <af:document title="page1.jsf" id="d1" binding="#{backingBeanScope.backing_page1.d1}">
            <af:form id="f1" binding="#{backingBeanScope.backing_page1.f1}"></af:form>
        </af:document>  
        <h:head>
            <title>First JSF Example</title>
        </h:head>   
        <h:body>
            <h3>ADF Hello World Example</h3>
            <h:form>
                What's your name?
                <h:inputText value="#{backingBeanScope.backing_page1.message}"></h:inputText>
                <h:commandButton value="Welcome Me" action="#{backingBeanScope.backing_page1.processPage1}"></h:commandButton>
            </h:form>
        </h:body>   
    </f:view>
    This is my backing bean for page1:
    package view.backing;
    import oracle.adf.view.rich.component.rich.RichDocument;
    import oracle.adf.view.rich.component.rich.RichForm;
    public class Page1 {
        private RichForm f1;
        private RichDocument d1;
        private String message;
        public void setF1(RichForm f1) { this.f1 = f1; }   
        public RichForm getF1() {return f1;}   
         public void setD1(RichDocument d1) {this.d1 = d1;}
        public RichDocument getD1() {return d1;}
        public void setMessage(String msg) { this.message= msg;  }
        public String getMessage() { return this.message; }
        public String processPage1()
            System.out.println("++++++++++++++++++++++++++++++++++++++++++++++move to next page");
            return "success";   
    This is my adfc-config.xml file:
    <?xml version="1.0" encoding="UTF-8" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <control-flow-rule id="__5">
        <from-activity-id>page1.jsf</from-activity-id>
        <control-flow-case id="__6">
          <from-action>#{backingBeanScope.backing_page1.processPage1}</from-action>
          <from-outcome>success</from-outcome>
          <to-activity-id>page2.jsf</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
      <managed-bean id="__2">
        <managed-bean-name>backing_page1</managed-bean-name>
        <managed-bean-class>view.backing.Page1</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1page1.jsf-->
      </managed-bean>
      <managed-bean id="__1">
        <managed-bean-name>backing_page2</managed-bean-name>
        <managed-bean-class>view.backing.Page2</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1page2.jsf-->
      </managed-bean>
    </adfc-config>
    Finally this is my page2.jsf
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html>
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"  xmlns:h="http://java.sun.com/jsf/html">
        <af:document title="page2.jsf" id="d1" binding="#{backingBeanScope.backing_page2.d1}">
            <af:form id="f1" binding="#{backingBeanScope.backing_page2.f1}"></af:form>
        </af:document>
        <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_page2-->
        <h:body>
            <h3>ADF Hello World Example PAGE2</h3>  
        </h:body>     
    </f:view>
    This is the error that I get when I push the button on page1 and I try to navigate to page 2:
    Target URL -- http://127.0.0.1:7101/EcatsADF12c-ViewController-context-root/faces/page1.jsf
    <org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl> <ViewHandlerImpl> <_checkTimestamp> <TIMESTAMP_CHECKING_ENABLED_SHOULDNOT_IN_PRODUCTION>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,015 during the configured idle timeout of 5 seconds.>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,014 during the configured idle timeout of 5 seconds.>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,013 during the configured idle timeout of 5 seconds.>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,017 during the configured idle timeout of 5 seconds.>
    <Apr 22, 2015 4:34:43 PM CDT> <Warning> <Socket> <BEA-000449> <Closing the socket, as no data read from it on 127.0.0.1:57,016 during the configured idle timeout of 5 seconds.>
    ++++++++++++++++++++++++++++++++++++++++++++++move to next page
    <oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl> <DiagnosticsDataExtractorImpl> <createADRIncident> <incident 11 created with problem key "ADFC-02013 [ADFc]">
    <oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl> <DiagnosticsDataExtractorImpl> <createADRIncident> <incident 12 created with problem key "ADFC-02013 [ADFc]">
    <oracle.adf.view> <RichExceptionHandler> <_logUnhandledException> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5>
    oracle.adf.controller.activity.ActivityLogicException: ADFC-02013: Unable to get metadata for activity 'page2.jsf'.
      at oracle.adfinternal.controller.util.Utils.createAndLogActivityLogicException(Utils.java:234)
      at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:1133)
      at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:979)
      at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:551)
      at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:162)
      at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:119)
      at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:88)
      at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:50)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
      at javax.faces.component.UICommand.broadcast(UICommand.java:315)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1074)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:402)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:202)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
      at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

    User, tell us your jdev version, please!
    What is your goal?
    What you have find had nothing to do with ADF. If you ent to learn adf then I recommend to work through find of the tutorials available on the jdev home page.
    If adf is not your goal, you might want to use Trinidad and ask your question in their forum.
    You might not like the declarative approach adf uses, but if you want to learn how to use adf, you have to understand how ADF works. Most can be done using java, but one you understand the framework you see the advantage.
    Timo

  • Iterator returns no records in managed bean

    Yes, its time to talk about the old SelectManyShuttle again! Well I've tried my hand at revising some blog code for the managed bean this time in order to populate and control the shuttle. But the binding is giving me the blues. Here's the code. It's not copmplete but it's enough to debug and see that the Iterator is CAPUT!
    package nebula.view.backing;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.binding.BindingContainer;
    public class RoleShuttleHelper {
    private BindingContainer bindings;
    private SelectItem[] allRoles = null;
    private List manyShuttleValue;
    private List initialSelectedValue;
    public void RoleShuttleHelper(){
    public SelectItem[] getAllRoles () {
    if (allRoles == null) {
    DCIteratorBinding rolesIt = (DCIteratorBinding) this.getBindings().get("AuthGroupView1Iterator");
    allRoles = new SelectItem[rolesIt.getAllRowsInRange().length];
    manyShuttleValue = new ArrayList();
    for(int i=0; i < rolesIt.getAllRowsInRange().length; i++){
    SelectItem item = new SelectItem();
    item.setLabel(rolesIt.getAllRowsInRange().getAttribute("GroupLongName").toString());
    item.setValue(rolesIt.getAllRowsInRange()[i].getAttribute("GroupId"));
    allRoles[i] = item;
    initialSelectedValue = manyShuttleValue;
    return allRoles;
    public void setBindings(BindingContainer bindings) {
    this.bindings= bindings;
    public BindingContainer getBindings() {
    return bindings;
    It looks like rolesIt.getAllRowsInRange().length is returning an undefined value. The causes the for loop to be skipped over. I assume this means that no rows have been fetched. Can anybody help? I've also added the XML for my managed bean to the adfc-config.xml here is that listing:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <managed-bean>
    <managed-bean-name>backing_AdminPage</managed-bean-name>
    <managed-bean-class>nebula.view.backing.AdminPage</managed-bean-class>
    <managed-bean-scope>backingBean</managed-bean-scope>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1AdminPage.jsp-->
    </managed-bean>
    <managed-bean>
    <managed-bean-name>RoleShuttleHelper</managed-bean-name>
    <managed-bean-class>nebula.view.backing.RoleShuttleHelper</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>
    </adfc-config>
    Thanks!

    you can try this too..
        public SelectItem[] populateShuttle(String iterName, String tmpValue, String tmpLabel){
            DCIteratorBinding iter= getBindingsForDCB().findIteratorBinding(iterName);
            int startIdx = iter.getRangeSize();
            iter.setRangeSize(-1);
            Row[] rows = iter.getAllRowsInRange();
            SelectItem[] shuttleElements = new SelectItem[rows.length];
            SelectItem item = null;
            if(rows != null && rows.length > 0){
               for(int i=0; i<rows.length; i++){
                   Row r = rows;
    String attribute = r.getAttribute(tmpValue).toString();
    String label = r.getAttribute(tmpLabel).toString();
    item = new SelectItem();
    item.setValue(attribute);
    item.setLabel(label);
    shuttleElements[i] = item;
    iter.setRangeSize(startIdx);
    return shuttleElements;

  • PPR problem with dynamic regions

    Hello,
    I have an application which starts by displaying a two buttons, each of which is supposed to display a particular bounded task flow in a dynamic region. The first task flow has a .jsff which has a table that displays records in a richtable... no problem there. The second task flow displays records (from a different table in the database) in a PanelFormLayout using inputtext's.
    Now the problem.
    When the first task flow is set to display by default when the application is run, the table works as it should. I click the button to switch the dynamic region to the second task flow and that is fine, but any navigation button I click gives me the following error...
    SEVERE: Server Exception during PPR, #4
    javax.el.PropertyNotFoundException: Target Unreachable, 'Col2Id' returned null
    Now, if I setup this second task flow to display by default, it works as it should.
    The actionlistener I use to switch the tasks in the dynamic region is as follows
      public void testListener1(ActionEvent actionEvent) {
        String varTask;
        //the two buttons have btn1 and btn2 as the id's, so this returns '1' or '2' respectively to generate the correct taskFlowId below
        varTask = actionEvent.getComponent().getId().substring(3);
        // this builds the task flow id based on the value of the variable determined above
        taskFlowId = "/WEB-INF/tasks/task-flow-" + varTask + ".xml#task-flow-" + varTask;
    }and it does switch the task flow to the correct one.
    The .jsff for the second task flow is as follows
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:panelBox text="PanelBox1">
        <f:facet name="toolbar"/>
        <af:panelFormLayout>
          <af:inputText value="#{bindings.Col2Id.inputValue}"
                        label="#{bindings.Col2Id.hints.label}"
                        required="#{bindings.Col2Id.hints.mandatory}"
                        columns="#{bindings.Col2Id.hints.displayWidth}"
                        maximumLength="#{bindings.Col2Id.hints.precision}"
                        shortDesc="#{bindings.Col2Id.hints.tooltip}"
                        id="textCol2Id">
            <f:validator binding="#{bindings.Col2Id.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Col2Desc.inputValue}"
                        label="#{bindings.Col2Desc.hints.label}"
                        required="#{bindings.Col2Desc.hints.mandatory}"
                        columns="#{bindings.Col2Desc.hints.displayWidth}"
                        maximumLength="#{bindings.Col2Desc.hints.precision}"
                        shortDesc="#{bindings.Col2Desc.hints.tooltip}"
                        id="textCol2Desc">
            <f:validator binding="#{bindings.Col2Desc.validator}"/>
          </af:inputText>
          <f:facet name="footer">
            <af:panelGroupLayout layout="vertical">
              <af:panelGroupLayout layout="horizontal">
                <af:commandButton actionListener="#{bindings.First.execute}"
                                  text="First" disabled="#{!bindings.First.enabled}"
                                  partialSubmit="true"/>
                <af:commandButton actionListener="#{bindings.Previous.execute}"
                                  text="Previous"
                                  disabled="#{!bindings.Previous.enabled}"
                                  partialSubmit="true"/>
                <af:commandButton actionListener="#{bindings.Next.execute}"
                                  text="Next" disabled="#{!bindings.Next.enabled}"
                                  partialSubmit="true"/>
                <af:commandButton actionListener="#{bindings.Last.execute}"
                                  text="Last" disabled="#{!bindings.Last.enabled}"
                                  partialSubmit="true"/>
              </af:panelGroupLayout>
              <af:commandButton text="Submit"/>
            </af:panelGroupLayout>
          </f:facet>
        </af:panelFormLayout>
      </af:panelBox>
    </jsp:root>the adfc_config.xml is as follows
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <view id="start">
        <page>/start.jspx</page>
      </view>
      <managed-bean>
        <managed-bean-name>backing_start</managed-bean-name>
        <managed-bean-class>programs.view.backing.Start</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1start.jspx-->
      </managed-bean>
    </adfc-config>Does anyone have an idea what gets missing or confused at the PPR level when I switch task flows in a dynamic region in this manner, and how can it be corrected.
    Thanks

    Hi Frank,
    When I try changing the managed bean scope from backingbean to pageflow (I also had to change the binding in the PageDef.xml file as well), it displays a blank screen when starting and the server log file has the following error message.
    <Apr 27, 2009 8:28:35 AM CDT> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@164d2b3 - appName: 'FcnTestApp1', name: 'FcnTestApp1-ViewController-context-root', context-path: '/FcnTestApp1-ViewController-context-root', spec-version: '2.5', request: weblogic.servlet.internal.ServletRequestImpl@1c5c9ca[
    ]] Root cause of ServletException.
    javax.el.PropertyNotFoundException: Target Unreachable, 'backing_start' returned null
         at com.sun.el.parser.AstValue.getTarget(AstValue.java:88)
         at com.sun.el.parser.AstValue.setValue(AstValue.java:133)
         at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:255)
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:248)
         at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
         Truncated. see log file for complete stacktrace
    >
    Any idea what might cause this?
    Thanks

  • Management Bean Error

    Dear All
    I create 2 page
    1- login and login display
    2 - in adfc-config i change scope from BackingBean to session
    i got this error
    javax.el.PropertyNotFoundException: //C:/Users/Waleed/AppData/Roaming/JDeveloper/system11.1.2.1.38.60.81/o.j2ee/drs/Application2/ViewControllerWebApp.war/Loginx.jsf @4,85 binding="#{backingBeanScope.Loginx.d1}": Target Unreachable, 'Loginx' returned null
    my jdeveloper is
    11.1.2.1

    thx very much for your qucik replay
    can you tell me where i can change {Loginx.d1}
    my adfc-config
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <view id="Loginx">
        <page>/Loginx.jsf</page>
      </view>
      <view id="LoginDisplay">
        <page>/LoginDisplay.jsf</page>
      </view>
      <control-flow-rule id="__4">
        <from-activity-id>Loginx</from-activity-id>
        <control-flow-case id="__5">
          <from-outcome>m1</from-outcome>
          <to-activity-id>LoginDisplay</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
      <managed-bean id="__2">
        <managed-bean-name>Loginx</managed-bean-name>
        <managed-bean-class>view.backing.Loginx</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1Loginx.jsf-->
      </managed-bean>
      <managed-bean id="__3">
        <managed-bean-name>LoginDisplay</managed-bean-name>
        <managed-bean-class>view.backing.LoginDisplay</managed-bean-class>
        <managed-bean-scope>backingBean</managed-bean-scope>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1LoginDisplay.jsf-->
      </managed-bean>
    </adfc-config>and my loginx.jsf is
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
        <af:document title="Loginx.jsf" id="d1" binding="#{backingBeanScope.Loginx.d1}">
            <af:form id="f1" binding="#{backingBeanScope.Loginx.f1}">
                <af:commandButton text="commandButton 1" id="cb1" binding="#{backingBeanScope.Loginx.cb1}" action="m1"/>
            </af:form>
        </af:document>
        <!--oracle-jdev-comment:auto-binding-backing-bean-name:Loginx-->
    </f:view>and mu loginx.java is
    package view.backing;
    import java.util.HashMap;
    import java.util.Map;
    import oracle.adf.view.rich.component.rich.RichDocument;
    import oracle.adf.view.rich.component.rich.RichForm;
    import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
    import oracle.binding.AttributeContext;
    import oracle.binding.DataControl;
    import oracle.binding.ManagedDataControl;
    import oracle.binding.OperationBinding;
    import oracle.binding.RowContext;
    import oracle.binding.TransactionalDataControl;
    import oracle.binding.UpdateableDataControl;
    public class Loginx implements TransactionalDataControl, UpdateableDataControl, ManagedDataControl {
        private RichForm f1;
        private RichDocument d1;
        private RichCommandButton cb1;
        public void setF1(RichForm f1) {
            this.f1 = f1;
        public RichForm getF1() {
            return f1;
        public void setD1(RichDocument d1) {
            this.d1 = d1;
        public RichDocument getD1() {
            return d1;
        public void setCb1(RichCommandButton cb1) {
            this.cb1 = cb1;
        public RichCommandButton getCb1() {
            return cb1;
        public String getName() {
            return null;
        public void release() {
        public Object getDataProvider() {
            return null;
        public boolean invokeOperation(Map p0, OperationBinding p1) {
            return false;
        public boolean isTransactionDirty() {
            return false;
        public void rollbackTransaction() {
        public void commitTransaction() {
        public boolean setAttributeValue(AttributeContext p0, Object p1) {
            return false;
        public Object createRowData(RowContext p0) {
            return null;
        public Object registerDataProvider(RowContext p0) {
            return null;
        public boolean removeRowData(RowContext p0) {
            return false;
        public void validate() {
        public void beginRequest(HashMap p0) {
        public void endRequest(HashMap p0) {
        public boolean resetState() {
            return false;
    }

  • BackingBean scope

    Hello   ADF experts, can you please  clarify my  question.   I have read in some blog   saying  in backingBean scoped bean,  the fields  should be marked as transient.       If the bean  is in  backingBean scope, should we still make the fields  transient ?   BackingBean scoped bean and requestScoped beans need not be seartilized and hence  I do not find any point in making the fields transient !!   Anyway we do not implement Serializable inerface and why is it need to make the fields transient ?
    thanks

    The Jdev version can make a difference, if you use Jdev 9.0.3. In your case, no, it doesn't make a difference.
    Ok, let's think about the problem. A bean in backing bean or request scope will not be serialized so they don't need to implement this interface. On the other side I don't see a disadvantage in doing so nonetheless. If you bind a component to a bean, regardless of the scope, this variable can't be serialized as ui components are not serializable. In a cluster environment this will cause errors. However, if you set the variable to transient the bean can be serialized but after reading it back the info you had is no longer there.
    Eugene Fedorenko blogged about this here ADF Practice: Managed Bean Scopes for Component Binding and mentioned a solution available for Jdev versions 11.1.1.4.0.
    Summary: I don't see a reason to mark attributes transient. A problem I see doing this is that the bean don't know which scope it's used in. This decision is made when you use the bean in a task flow. Think about what happens if you decide that the bean is used in view score for one task flow. This will crash the application in production under heavy load as the bean would brr serialized empty. From this point of view you should always implement the serializable interface.
    Timo

  • Affect commondLink  by different scope of BackingBean

    The problem is that all the command links created by af:table component can not work if the scope of the BackingBean is set as request.

    Hi,
    backing beans always have a request scope. I don't know what your post tries to tell me
    Frank

  • ValueChangeListener does not work if BackingBean is in request scope

    I am using ADF selectOneChoice and populating textfields etc. based on the selection in the SelectOneChoice.
    I implement this thru a ValueChangeListener method in my BackingBean,and it works perfectly if the bean is in session scope. But if I put it in request scope getOldValue() always gives the first value in the combo. So if user selects some other value and then goes back to first value, it does not generate an event since oldvalue=newvalue.
    It is not possible for me to create my BackingBean in session - it needs to be request scope. Is there any way of doing this? Pls help.

    Hi,
    it depends on your implementation, but keep in mind that a bean in request scope is reset to its default values after each request. So if you keep the list value data in the same bean then the value is set back to the default selection when the request ends because the managed bean is released and re-created for the next request. A work around is to store the value in a long lived scope memory attribute and read it from there when the managed bean is requested
    Frank

  • BackingBean Scope issue.

    Hi,
    I am using JdEV 11.1.1.2.0. I have an ADF table on the page with 100 records and rangsize is set to 25.
    On the page i have one button to get the selected row and call the procedure.
    If I select a 50th record in 100 records and click on button, I am getting the following added exception in the server log. But this issue is not reproducing if I select a record with in rangesize i.e. 25.
    These are my viewObject Tuning properties:
    All rows.
    Fill Last Page of rows when paging throw Rowset.
    Passivate State
    Access Mode: Scrollable.
    Please help me to fix this issue.
    Server Log:
    <UIXPageTemplate><tearDownVisitingContext> Tear down of page template context failed due to an unhandled exception.
    java.util.NoSuchElementException
         at java.util.ArrayDeque.removeFirst(ArrayDeque.java:251)
         at java.util.ArrayDeque.pop(ArrayDeque.java:480)
         at oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl.popContextChange(ApplicationContextManagerImpl.java:66)
         at oracle.adf.view.rich.component.fragment.UIXPageTemplate.tearDownVisitingContext(UIXPageTemplate.java:242)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.encodeEnd(ContextSwitchingComponent.java:157)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2572)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:221)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2572)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
    <Dec 21, 2009 3:58:35 PM MST> <Error> <HTTP> <BEA-101020> <[ServletContext@4711920[app:ESPSApp module:ESPSApp-ViewController-context-root path:/ESPSApp-ViewController-context-root spec-version:2.5 version:V2.0]] Servlet failed with Exception
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.model.binding.RowDataManager.getRowIndex(RowDataManager.java:189)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.getRowIndex(FacesCtrlHierBinding.java:596)
         at org.apache.myfaces.trinidad.component.UIXIterator._fixupFirst(UIXIterator.java:414)
         at org.apache.myfaces.trinidad.component.UIXIterator.__encodeBegin(UIXIterator.java:392)
         at org.apache.myfaces.trinidad.component.UIXTable.__encodeBegin(UIXTable.java:168)
         Truncated. see log file for complete stacktrace
    >
    <Dec 21, 2009 3:58:35 PM MST> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at Dec 21, 2009 3:58:35 PM MST. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = Dec 21, 2009 3:58:35 PM MST SERVER = DefaultServer MESSAGE = [ServletContext@4711920[app:ESPSApp module:ESPSApp-ViewController-context-root path:/ESPSApp-ViewController-context-root spec-version:2.5 version:V2.0]] Servlet failed with Exception
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.model.binding.RowDataManager.getRowIndex(RowDataManager.java:189)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.getRowIndex(FacesCtrlHierBinding.java:596)
         at org.apache.myfaces.trinidad.component.UIXIterator._fixupFirst(UIXIterator.java:414)
         at org.apache.myfaces.trinidad.component.UIXIterator.__encodeBegin(UIXIterator.java:392)
         at org.apache.myfaces.trinidad.component.UIXTable.__encodeBegin(UIXTable.java:168)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:517)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2572)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
    Thanks.

    Hi,
    Thanks for your reply.. Please find the source code:
    Table Code:
    <af:table value="#{bindings.CmProcessView35.collectionModel}"
    var="row"
    rows="#{bindings.CmProcessView35.rangeSize}"
    emptyText="#{bindings.CmProcessView35.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CmProcessView35.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.CmProcessView35.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmProcessView35.collectionModel.makeCurrent}"
    rowSelection="single"
    binding="#{backingBeanScope.backing_app_RunCalcPage.t4}"
    id="t4" inlineStyle="height:400px;" width="510" partialTriggers="::q1">
    <af:column sortProperty="ProcessType" sortable="true"
    headerText="#{bindings.CmProcessView35.hints.ProcessType.label}"
    id="c19">
    <af:outputText value="#{row.ProcessType}" id="ot19"/>
    </af:column>
    <af:column sortProperty="Description" sortable="true"
    headerText="#{bindings.CmProcessView35.hints.Description.label}"
    id="c17" width="300">
    <af:outputText value="#{row.Description}" id="ot8"/>
    </af:column>
    <af:column sortProperty="ArgumentsFlag" sortable="true"
    headerText="P - Flag"
    id="c18" width="70">
    <af:outputText value="#{row.ArgumentsFlag}" id="ot20"/>
    </af:column>
    </af:table>
    Page Def Code:
    <iterator Binds="CmProcessView3" RangeSize="25"
    DataControl="ESPSAppModuleDataControl"
    id="CmProcessView3Iterator"/>
    BackingBean Code:
    RowKeySet rowKeySet = (RowKeySet)this.t4.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.t4.getValue();
    String process = null;
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding)cm.getRowData();
    process = rowData.getAttribute(0).toString();
    if (process != null) {
    System.out.println("activeFlag is : " + activeFlag);
    if(activeFlag.equals("N")){
    ---------- Perform some operations...
    }else{                   
    sendMessage("Process Selection is Invalid.", FacesMessage.SEVERITY_ERROR);
    }else{               
    sendMessage("Please select a process to submit the job.", FacesMessage.SEVERITY_ERROR);
    Thanks.

  • Difference Between BackingBean Scope and Request Scope in Manged Beans

    Hi,
    This is going to sound really silly, me asking this question after working for over 6 months in ADF, but could anybody please give me some differences between backing bean scope and request scope. I've looked at the official Oracle documentation, and I'd be really grateful if anybody could please dumb it down a bit for me.-:)
    Thanks,
    Debojit

    If you make a declarative component and put it on a page more than once.
    Just like you can put multiple instances of the af:inputText component on a page, you can put multiple instances of declarative components on a page.

  • PageFragments BackingBean scope table binding issue

    Hi,
    We have an ADF table (with id resultTable) in a page fragment and we have a binding for it in backingBeanScope. A page can have multiple page fragments embedded as regions and popups. All of these pageFragments have ADF table with the same id (resultsTable). We observed that when we bind these tables to backingBeanScope, the table columns are getting jumbled. We are seeing few columns of one table appear in other.
    When we change the binding to pageFlowScope, every thing seem to work fine.
    binding="#{pageFlowScope.ResultsBean.resultsTable}"> --- This is working fine
    binding="#{backingBeanScope.resultsTable}"> --- Columns are getting jumbled with this
    We are not able to figure out why this is happening. Is it because we are using the same resultsTable variable in backingBeanScope for all tables in all page fragments and popups? Any help is highly appreciated.
    Thanks,

    Hi,
    you need to let us know how you integrate the page fragments to the page. Are you using ADF Regions? Which Oracle JDeveloper version do you use ?
    Note that the difference between the two options of yours
    binding="#{pageFlowScope.ResultsBean.resultsTable}"> --- This is working fine
    binding="#{backingBeanScope.resultsTable}"> --- Columns are getting jumbled with this
    is that using the pageFlowScope, all tables use the same data instance. Also, why is #{backingBeanScope.resultsTable} not #{backingBeanScope.ResultsBean.resultsTable} ?
    Frank

Maybe you are looking for