getAttribute() method of a view object returns NULL

Hello
I am currently implementing PPR in one of my OFA page and I took the following approach.

I stated the Boolean attribute transitional follwing in the VO() outside of the existing attribute 'sense '.
1 MfgEnttity
2 MfgAcct
3 MfgSubAcct
4 MfgCc
5 MfgProj

In the page I used these attributes in the property made in the form "${oa." XXR2RMfgproSegVO.MfgSubAcct}' like that.

Now, in the central, I wrote the following code.

' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
{
super.processRequest (pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule (webBean);
am.invokeMethod ("initializeXXR2RMfgproSegVO");
}
' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
{
super.processFormRequest (pageContext, webBean);

Event string = pageContext.getParameter (EVENT_PARAM);
Source of the string = pageContext.getParameter (SOURCE_PARAM);
Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
am.invokeMethod ("handleSegmentChangeEvent");
}
}


And the AM code is as follows:

Public Sub initializeXXR2RMfgproSegVO()
{
OAViewObject vo = getXXR2RMfgproSegVO();
If (!) VO.isPreparedForExecution ())
vo.executeQuery ();
Line = vo.createRow ();
vo.insertRow (row);
row.setNewRowState (Row.STATUS_INITIALIZED);
}

Public Sub handleSegmentChangeEvent()
{
PVO OAViewObject = (OAViewObject) findViewObject ("XXR2RMfgproSegVO");
OARow hdrRow = (OARow) pVO.getCurrentRow ();
String status = (String) hdrRow.getAttribute ("Meaning").
System.out.println ("poRow" + hdrRow.toString ());
System.out.println ("value of the State is" + status);
If ("Entity". Equals (Status))
{
hdrRow.setAttribute ("MfgEnttity", Boolean.TRUE);
hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
} else
If ("Account". Equals (Status))
{
hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
hdrRow.setAttribute ("MfgAcct", Boolean.TRUE);
hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
} else
If ("Subaccount". Equals (Status))
{
hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgSubAcct", Boolean.TRUE);
hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
} else
If ("cost Center".equals (status))
{
hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgCc", Boolean.TRUE);
hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
} else
If ('Project'. Equals (Status))
{
hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
hdrRow.setAttribute ("MfgProj", Boolean.TRUE);
}
on the other
{
hdrRow.setAttribute ("MfgEnttity", Boolean.FALSE);
hdrRow.setAttribute ("MfgAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgSubAcct", Boolean.FALSE);
hdrRow.setAttribute ("MfgCc", Boolean.FALSE);
hdrRow.setAttribute ("MfgProj", Boolean.FALSE);
}
}
}

Now when I change in the value of the attribute "Meaning" page that he can always get into the else part, which is where all the attributes are 'False'.

The two System.out.Println statements return the following values.

03/10/22 15:41:08 poRow xxr2r.oracle.apps.gl.coam.poplist.server.XXR2RMfgproSegVORowImpl@3
03/10/22 15:41:08 state value is null

Can you please why this 'status' returns NULL and how I can get the current selected line in the page?

Thank you
Lucile

Hello

you set the attributes of PVO, based on a condition, your old code is just the question is from where you can get the status, you may get this page, but you must pass this value to AM.

thanx
Pratap

Tags: Oracle Applications

Similar Questions

  • Links returned null in bean

    Hello

    I have a method call activity that is backing bean in stubborn workflow. When this method is called, the bindings returns null. So, I couldn't get my iterator.

    I used the following codes in my grain of support separately. But no use. All return to line 3 null pointer exception. Bindings returns a null value in line 1, line 2 and line 3.

    1 DCBindingContainer links = ADFUtils.getDCBindingContainer ();
    2 DCBindingContainer links = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    3 BindingContainer links = getBindings();

    3 DCIteratorBinding iterator = bindings.findIteratorBinding("ComponentAssignment1Iterator");

    How to get the iterator from the definition of my page? Is there a work around way?

    Thanks in advance

    Usha,

    For a workflow method call, the current link container is not the container of liaison for the pages it's the page definition for the call of the method itself.

    KUBA posted a very similar question last week: {: identifier of the thread = 2279848}

    Edit:

    u can try to drag and drop your component again of the datacontrol... maybe there is a problem... you Databindings.cpx file.

    No, this isn't the problem.

    John

  • If a view object query returns no rows, can the vacuum to be tested at all?

    All those who know or have also experienced:

    I guess that the answer should be Yes, but I tried anyway, I still didn't worked. Here is the code (it's a method behind a command button, a bean of support (I use JDeveloper 10.1.3.4).) In the code, LoggedInStudent is the name of a view object; ZBLCModule is the name of the application module):
        public String commandButton1_action() {
            FacesContext fc = FacesContext.getCurrentInstance();
            ValueBinding vb = fc.getApplication().createValueBinding("#{data}");
            BindingContext bc = (BindingContext)vb.getValue(fc);
            DCDataControl dc = bc.findDataControl("ZBLCModuleDataControl");
            ApplicationModule am = (ApplicationModule)dc.getDataProvider();
            ZBLCModuleImpl zblcam = (ZBLCModuleImpl)am;
            LoggedInStudentImpl studentsFound = (LoggedInStudentImpl)zblcam.getLoggedInStudent();
            
            String navCase = null;
            
            // Test (1): if the view cache is empty; always bombs up the application if it IS empty:
            if(studentsFound.getAllRowsInRange().length == 0) {
                navCase = "userNotFound";
            // (2) The following three tests gets to run only when the cache is not empty; they work fine.
            } else if (((Number)studentsFound.first().getAttribute("HoursAttm")).floatValue() == 0.0) {
                navCase = "noHours";
            } else if (((Number)studentsFound.first().getAttribute("Balance")).floatValue() > 0.0) {
                navCase = "notZero";
            } else if (!(studentsFound.first().getAttribute("Validated").equals(" "))) {
                navCase = "validated";
            } else {
                navCase = "zeroBal";
            }
            return navCase;
        }
    When the view object query returns a line, the whole of the application works without error. When the query returns no rows, test (1) always bombs toward the top of the application, prompting a Houston-30003 error.

    (1) test, I tried the following:
      if (studentsFound.getAllRowsInRange().length == 0)
      if (studentsFound.first() == null)
      if (studentsFound.getEstimatedRowCount() == 0)
      if (studentsFound.isDead()) //I do not know what isDead() does; just tried desperately.
      if (studentsFound.equals(null))
      if (studentsFound.getCurrentRow() == null)
    With each of these events, I got an error of Houston-30003. It does not matter what looks like the conditional test; It is important only when the objects from view cache is empty. If the view cache is not empty, everything, including the test (1), works very well. And when the cache is empty is not because of the failure of the connection to the database, but because the student is not in the data table and line are for the student.

    It is a requirement of the company to do something when the view object query returns no rows. Can it be tested at all? How?

    Or is there something wrong in the first lines in the method before the {color: green} String navCase = null; {color} line?

    Thank you very much for your help!


    Newman

    Hello

    What you have done, is to get a handle to the object that CAN execute queries to the database.
    However, you do not query the database.

    Just add:

      LoggedInStudentImpl studentsFound = (LoggedInStudentImpl)zblcam.getLoggedInStudent();
      //New line
      studentsFound.executeQuery();
    

    The code that Shay has given you is when you do not have a request for all module, but since you are talking about a command etc button I guess that the module of the application is already active.
    The line I gave you should be enough to make it work.

    I'd be careful with the

    studentsFound.hasNext();
    

    I suggest to use estimatedRowCount();

    -Anton

  • ViewObject line getAttribute returns null when I know that the data is there.

    Hi all

    I have a simple piece of code in my implementation of the Application Module class to define a binding on a view variable and return the results to my REST Web Service project.

        public ListItem[] returnListForCategory(String category) {
            ListItem[] result =  null;
            Row row = null;
                    
            ViewObjectImpl voi = getListForCategoryVO1();
            voi.setNamedWhereClauseParam("Category", category);
            int rows = (int) voi.getEstimatedRowCount();
            int idx = 0;
            result = new ListItem[rows];
    
            while (voi.hasNext()) {
                row = voi.next();
                ListItem item = new ListItem();
                
                System.out.println("returnListForCategory: code: " + (String)row.getAttribute("Code"));
                System.out.println("returnListForCategory: codeDescription: " + (String)row.getAttribute(1));
                item.setCode((String)row.getAttribute("Code"));
                item.setCodeDescription((String)row.getAttribute("CodeDescription"));
                
                result[idx] = item;
                idx++;
            }        
            
            return result;
        }

    When I run the debugger Houston (right click on the Module of the Application and select Debugging), the point of view getListForCategoryVO works as expected: three lines, with data in the fields.

    When I deploy this on WLS, and run via the WS REST I get three rows, but all the attributes ('Code' and 'Code') have the value null.

    Here's the REST WS code that calls it (in case it is relevant).

        private static final String amDef = "model.am.LookupListsAM";
        private static final String config = "LookupListsAMLocal";
    
        @GET
        @Path("/{category}")
        public ListItems getList(@PathParam("category") String category) {
            ListItems result = new ListItems();
            ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
    
            LookupListsAMImpl llami = (LookupListsAMImpl)am;
            model.dto.ListItem[] items = llami.returnListForCategory(category);
            
            for (model.dto.ListItem item : items) {
                ListItem newItem = new ListItem();
                newItem.setCode(item.getCode());
                newItem.setCodeDescription(item.getCodeDescription());
                result.addListItem(newItem);
            }
            Configuration.releaseRootApplicationModule(am, true);
            return result;
        }
    

    Do you have any idea what I am doing wrong, or it could be the cause?

    TIA

    You use libraries remains part or a third party provider of jax - rs? (this may be a problem with the classpath)

    Dario

  • View object impl - AM not found null pointer exception

    Hello

    I wanted to filter my view criteria for a particular line. I used the following code in the module of the application. But why I can't see the items?

    private line getUserInfo (String emailId) {}
    Line UserInfo = null;
    If (emailId! = null & &! emailId.equals("")) {}
    ViewObject userAuthentionEVO = this.getViewObj1 (); Returns null
    userAuthentionEVO.setNamedWhereClauseParam ("The_EmailId", emailId);
    userAuthentionEVO.executeQuery ();
    userInfo = userAuthentionEVO.first ();
    }
    return userInfo;
    }
    Exception in thread "main" java.lang.NullPointerException
    at oracle.insurance.viking.foundation.model.am.AuthenticationAMImpl.getUserInfo(AuthenticationAMImpl.java:165)
    at oracle.insurance.viking.foundation.model.am.AuthenticationAMImpl.validateUserCredential(AuthenticationAMImpl.java:64)
    at oracle.insurance.viking.foundation.model.am.AuthenticationAMImpl.main(AuthenticationAMImpl.java:35)

    @KR? Where this comes in the picture?

    @Rakesh
    start the request module Tester (BC4J tester) in debug mode (of the sort that you can set breakpoints), when the dialog box opens double click the node root (the module of the application). This opens a pane lists all the available public methods (which are part of the client interface). Select your method of a choice method select and press "run". This runs your method. If you have set a breakpoint in the execution of the method should stop there.

    Timo

  • DataBind method call returns null in the WebCenter content filtering

    Hello

    I got code that has a problem and I am new to the WebCenter content and filters that can be added. We have a FileNameFilter class that begins with the code

    / public class CWEFileNameFilter implements FilterImplementor {}

    public CWEFileNameFilter() {}

    Super();

    }

    public int doFilter (workspace workspace, DataBinder dataBinder,

    ExecutionContext executionContext) throw {DataException

    Service string = dataBinder.getLocal ("IdcService");

    ....

    }

    }

    However, service is sometimes return null and then filter throws a NPE.

    My questions are:

    (1) can we explain what dataBinder.getLocal ("IdcService"); is done and why it might come back as null

    (2) anyone can provide links to documentation that explains the filters and a little more on the object DataBinder as the JavaDoc is not much help.

    Thank you
    Marc

    Hi Marc,

    Below the code will give the name of the service for which the filter is implemented LocalData

    Service string = dataBinder.getLocal ("IdcService");

    for example below

    http://localhost:16200/cs/idcplg? IdcService = DOC_INFO_BY_NAME & dDocName = 1111111 & IsJava

    This example displays the entire response including localdata data and results that are created in the execution of the service. Here is the code snippet

    LocalData @Properties

    DocUrl =https://localhost:16200/cs/weblayout/groups/secure/documents/test/mhdk/mjg1/1111111.pdf

    IdcService = DOC_INFO_BY_NAME

    If String = dataBinder.getLocal ("IdcService") service; Service = "DOC_INFO_BY_NAME."

    Under blog will give an idea about the filter but the best place to learn or start is "The Definitive Guide to Stellent Content Server Development" by Brian Huff

    http://www.redstonecontentsolutions.com/technical-blog/UCM-service-handlers-and-javafilters

    Also, I recommend reading ' WebCenter Content Services Reference Guide '

    http://docs.Oracle.com/CD/E23943_01/doc.1111/e11011/TOC.htm

    Kind regards

    Amol Germain.

  • Call the method of the object, the view object entity

    Hi all
    I use jdeveloper 11.2.1.0, and I need to call the method in the object class to view object entity class.
    Someone knows how to do?

    Thank you.

    http://andrejusb.blogspot.in/2009/11/calling-custom-entity-method-from-view.html

  • Passivation and activation of the parameters of view object.

    Hello

    I use Jdeveloper version 11.1.2.3.0.

    I have several settings view objects that are passed as default values for example:

    My view object has this query:

    Select user_id, username, password from user where user_id =?

    I'm a parameter passing pUserId with the default 'adf.userSession.userData.mfcUserId '.

    Everything works fine front of passivation.

    It's the activation method:


    protected void activateState(Element element) {
            super.activateState(element);
            if (element != null) {
                // 1. Search the element for any <jbo.counter> elements
                NodeList nl = element.getElementsByTagName(USER_DATA_ELEMENT);
                if (nl != null) {
                    // 2. If any found, loop over the nodes found
                    for (int i = 0; i < nl.getLength(); i++) {
                        NamedNodeMap attrs = nl.item(i).getAttributes();
                        if (attrs.getLength() == 2) {
                            Node userDataElementKey = attrs.getNamedItem(USER_DATA_ELEMENT_KEY);
                            Node userDataElementValue = attrs.getNamedItem(USER_DATA_ELEMENT_VALUE);
                            if (userDataElementKey != null && userDataElementValue != null) {
                                String key = userDataElementKey.getNodeValue();
                                String value = userDataElementValue.getNodeValue();
                                System.out.println("putting in userData:" + key + ":" + value);
                                this.getSession().getUserData().put(key, value);
                            }
                        }
                    }
                }
            }
    }
    

    All parameters that are passivees are properly recovered after activation, and I see them in the newspaper () "put in userData: But all the tables that use these settings are empty after activation.

    Like six months ago or a year before it was working properly after passivation and activation. Something has changed in the application or in libraries, and I do not understand what it is. I don't remember the time right, because this problem has been noticed recently, but probably existed for some time.

    Concerning

    Found the problem. I have a dynamic where the objects clause which is called for each of the opinions that I have this problem. After the execution of the view I always call a method that adds a where clause clause and then adds a dynamic parameter, and then run the query.  The final request looks like this:

    SELECT * FROM (SELECT select user_id, username, password from user where user_id =?)

    QRSLT WHERE ((NM_DECODED_NAME) upper: upper (EMAIL) | upper (PHONE) "like '%' | superior (?) |) '%');

    I pass a parameter to the view object. By default, this parameter is null.

    iter.getViewObject () .setWhereClauseParam (2, null);

    Basically, in the end, he becomes select column1 from table1 WHERE (upper (column1) | "like '%': superior (null) |) » %');

    et « % » || superior (null) | ' %' is equivalent to ' %' then it returns all records. But after activation this "null" is turned into something else and it will not return any records.

    This only happens after activation...

    It took me a year to find this bug already exists...

    Thanks for the help, Timo.

  • ViewObject get attribute always returns null

    Hi guys,.

    I need your help, I'm going crazy.

    I'm just trying to browse a ViewObject as I did a thousand times but despite getEstimatedRowCount return 1 and the Row inside the SENTENCE object is not null, getattribute always returns null, does not care if I call getAttribute (String) or getAttribut (int)

    This is the last code I tested:

    AppMod = (PeopleFinderAppModuleImpl) this.getApplicationModule () PeopleFinderAppModuleImpl;

    PfUserGetInfoImpl pf_Info = (PfUserGetInfoImpl) appMod.getPfUserGetInfo1 ();

    pf_Info.setp_userid (UserID);

    pf_Info.executeQuery ();

    System.out.println ("# view getEstimatedRowCount:" + pf_Info.getEstimatedRowCount ());

    PfUserGetInfoRowImpl r = null;

    RowSetIterator rsIterator = pf_Info.createRowSetIterator (null);

    While (rsIterator.hasNext ()) {}

    r = (PfUserGetInfoRowImpl) rsIterator.next ();

    System.out.println ("# AttributeCount:" + r.getAttributeCount ());

    String [] uploading = r.getAttributeNames ();

    for (int i = 0; i < attrs.length; i ++) {}

    System.out.println (I + "" + uploading [i] + "=" + r.getAttributeValues () [i]);

    }

    }

    rsIterator.closeRowSetIterator ();

    The output is:

    # userid: EPETRANG

    # Discovers getEstimatedRowCount: 1

    # AttributeCount: 13

    0 Userid = null

    1 name = null

    2 Givenname = null

    3 family name = null

    4 title = null

    5 Dn = null

    6 mail = null

    7 company = null

    8 Department = null

    9 Telephonenumber = null

    Mobile 10 = null

    11 Ipphone = null

    Manager of 12 = null

    My Env record:

    Build JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493

    1.6.0_45 64-bit JVM

    Of course, the query returns 1 row SQLDeveloper and ApplicationModule compressiometre is as well.

    You see something wrong in the code? I tried to delete and re-create the ViewObject without a bit of luck.

    Hi guys,.

    Thanks to you all.

    This morning I just tried to delete and recreate the Weblogic JDev field and now everything works fine. Looks like that integrated weblogic has been screwed

    Thanks again.

  • Houston-25036: an invalid object operation was drawn to the View object type.

    Hi all

    I use version jdev 11.1.2.2

    I have an application module impl in which I have a method to call a pl/sql that calls an external API.
      public String create(String productId, String component)
    {
        String createMessage=null;
        DBTransaction dbtransaction = (DBTransaction)getTransaction();
        StringBuffer str = new StringBuffer();
           str.append(" BEGIN ");
        str.append(" api.database@test ( ");
        str.append(" p_number                    => :1,   ");
        str.append(" p_product_id               => :2,   ");
        str.append(" p_component                => :3   ");
        str.append("    ); ");
        str.append(" END; ");
    
        CallableStatement callablestatement = dbtransaction.createCallableStatement(str.toString(), 1);
    
        try {
          callablestatement.registerOutParameter(1, Types.INTEGER);
          callablestatement.setInt(2, Integer.parseInt(productId));
          callablestatement.setString(3, component);
          callablestatement.executeUpdate();
          dbtransaction.commit();
          createMessage = callablestatement.getObject(1).toString();
          if (callablestatement != null) {
            callablestatement.close();
          }
          if (dbtransaction != null) {
            dbtransaction.closeTransaction();// closing connection
          }
    } catch (Exception e) {
          e.printStackTrace();
        }
    
        return createMessage;
    }
    I returns a value of this class of impl. I call this form of method a bean customer interface through. Then, I want to display another page passing the return as a variable binding value to another object to display grace to perform with the workflow setting.
      public void callCreate(ActionEvent actionEvent){
        BindingContext bctx = BindingContext.getCurrent();
        DCBindingContainer bindings = (DCBindingContainer)bctx.getCurrentBindingsEntry();
        DCDataControl dataControl = bindings.findDataControl("ReportAMDataControl");
        ReportAM ReportAM = (ReportAM)dataControl.getApplicationModule();
        createMessage =
            ReportAM.createBug(product, component);
          FacesContext context = FacesContext.getCurrentInstance();
          context.getApplication().getNavigationHandler().handleNavigation(context, null, "goExecute");//navigate to next page
    }
    Everything is going very well when I'm not closing the db connection in the impl.

    but when I close the db connection is showing the following error.

    Houston-25036: an invalid object operation was drawn to the View object type.
    <MethodExpressionActionListener> <processAction> Received 'oracle.jbo.InvalidObjAccessException' when invoking action listener '#{invokeImplMethodBean.callCreate}' for component 'cb1'
    <MethodExpressionActionListener> <processAction> oracle.jbo.InvalidObjAccessException: JBO-25036: An invalid object operation was invoked on type View Object with name RVO
         at oracle.jbo.server.QueryCollection.getPCollManager(QueryCollection.java:505)
         at oracle.jbo.server.QueryCollection.initPCollRows(QueryCollection.java:337)
         at oracle.jbo.server.QueryCollection.initQC(QueryCollection.java:367)
         at oracle.jbo.server.QueryCollection.<init>(QueryCollection.java:271)
         at oracle.jbo.server.ViewRowSetImpl.initQueryCollection(ViewRowSetImpl.java:876)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1140)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1413)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1319)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1304)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:7211)
         at view.InvokeImplMethod.call(InvokeImplMethod.java:206)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
         at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:148)
         at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:824)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:179)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1134)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:358)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         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:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    No idea why this is happening?

    Can someone help me with this problem? :(

    Thank you
    Vignesh

    like I said with ADF BC, we never explicitly close the DB connection (framework takes care for this).

  • HttpServletRequest getParameter returns null in Jdeveloper 11 g

    Hello:

    IM currently involved in a project to the title of the ADF faces in Jdeveloper 11 g. I have a requirement that an online application must be connected to a bank. We can redirect the workflow on the site of the Bank, but the return parameters are the problem. The Bank sends the confirmation by MAIL, but when we try to get the data to a ControllerBean using a HttpServletRequest parameters return null.

    This works very well in the Adf using Oracle Jdeveloper 10 g but in Jdeveloper 11 g Adf in richfaces don't.

    Here are the facts:

    1. a third application must send parameters via post method in the form of html to my request.

    2. in the PrepareModel of the support of my jsp bean, I get the HttpServletRequest object.

    3. I have access to the settings in the HttpServletRequest.

    Here's the pararameter sending form example:

    < html >
    < head >
    < meta http-equiv = "Content-Type".
    Content = text/html"; charset = windows-1252 "/ >"
    < title > < /title > answer Bank
    < script languaje = "JavaScript" type = "text/javascript" >
    function responder() {}
    document. TestForm.Submit ();
    }
    < /script >
    < / head >
    < body >
    < name of the form = "testform" action = "myAppUrl" method = "post" >
    < input type = "hidden" name = "parameter1" value = "Value1" / >
    < input type = "hidden" name = "parameter 2' value = 'value2' / >
    < input type = "hidden" name = "parameter3' value = 'value3' / >
    < / make >
    < / body >
    < / html >


    The code I use in the bean of the JSP (HttpServeletRequest get parameters):


    public void prepareModel (LifecycleContext context) {}
    super.prepareModel (context);
    ADC ADFContext = ADFContext.getCurrent ();
    FacesContext facesContext = FacesContext.getCurrentInstance ();
    try {}
    HttpServletRequest request =.
    (HttpServletRequest) facesContext.getExternalContext () .getRequest ();
    System.out.println (Request.GetParameter ("Parameter1")); / / < < < < < ME GIVES a NULL VALUE
    System.out.println (Request.GetParameter ("parameter2")); / / < < < < < ME GIVES a NULL VALUE
    System.out.println (Request.GetParameter ("parameter3")); / / < < < < < ME GIVES a NULL VALUE
    } catch (Exception ex) {}
    ex.printStacktrace ();
    }
    }

    Any advice?

    Concerning

    Jorge

    Edited by: 828478 01/15/2011 10:43

    Hello

    on the f: view of the JSPX page element, set the afterMethod property to point to a managed bean method. In this method of bean management, determine the phase and if this phase is afterRestore, read the query parameter, if it exists (be sure to check if the setting exists). If the parameter exists, write on a range of memeory as viewScope or session. Then when you need this setting in the managed bean, get it from the scope of the memory

    Frank

  • Bind Variables on the view objects child definition

    JDeveloper 12 c

    I have an interesting question.  I have a view (AisWebModulePrivsVO) object that uses a bindvariable hardcoded in the view object.

    SELECT * FROM SYS. DBA_ROLE_PRIVS where DEALER =: bvUserName

    If I put this in the request module I can programmatically set the variable binding (view object contains the getter/setter for the binding variable).

    AisWebModulePrivsVOImpl voTest = am.getAisWebModulePrivsVI ();

    voTest.setbvUserName ("ARAWLS");

    voTest.executeQuery ();

    System.out.println ("test reports:" + voTest.getRowCount ());

    and get the correct number of records based on return on the user and database roles. If it works.

    What does NOT work, it is when this display object is a recording of 'the child' to another display object (as specified by a link between the two and by setting the object from a point of view as one child of the other in the module of the application).

    AppModule looks like this:

    CgRefCodesVO

    AisWebModulePrivsVO

    In this case, I have a view called cgRefCodeVO parent object.  There is a link between this and the AisWebModulePrivsVO. The relationship works.

    AISMenuAppModuleImpl m = ADFUtils.getApplicationModuleForDataControl (appMod) (AISMenuAppModuleImpl);

    CgRefCodesVOImpl cgRefVO = am.getCgRefCodes1 ();

    AisWebModulePrivsVOImpl modsVO = am.getAisWebModulePrivs1 ();

    modsVO.setbvDBUserName ("ARAWLS");  This doesn't seem to work here...

    cgRefVO.executeQuery ();

    All lines rs = cgRefVO.getRowSet ();

    RS. Reset();

    While (rs.hasNext ()) {}

    CgRefCodesVORowImpl CgRefRow = rs.next ((CgRefCodesVORowImpl));

    System.out.println ("RvLowValue:" + CgRefRow.getAttribute ("RvLowValue"));

    RowIterator aisModulesRowIter = CgRefRow.getAisWebModulePrivs ();

    System.out.println ("number of children:" + aisModulesRowIter.getRowCount ());

    }

    The code compiles and runs.  She translates: "County of the child: 0" for each row returned by the

    I also tried:

    VM VariableValueManager = modsVO.ensureVariableManager ();

    vm.setVariableValue ("bvDBUserName", "ARAWLS");

    And:

    modsVO.setNamedWhereClauseParam ("bvDBUserName", "ARAWLS");

    and (of https://community.oracle.com/message/2746551#2746551 ( )

    @Override

    protected void executeQueryForCollection (Object, object, Object [] object2, int i) {}

    I coded everything hard to see if it would work.

    setNamedWhereClauseParam ("bvDBUserName", "ARAWLS");

    super.executeQueryForCollection (object, object2, i);

    }

    and from there, I changed around the order to execute the objects in view.    https://community.oracle.com/message/10632314#10632314

    How can I set the variable binding in the object view child?

    Thank you

    Stuart

    It is an interesting example how ADF works up to a certain point... then you need to start to make cuts to modify its behavior as you wish.

    I decided that it was just easier to delete 'the child' parent (in the app module) and create a view of criteria on this subject for what would basically query the records to get the same results, like a child.

    Perhaps not as elegant, but so much easier.

    Thanks for your help.

    Stuart

  • Debugging inaccessible FacesException:Target, 'bean' returned null

    Hi all

    Jdev: 11.1.1.7.1

    We have a living ADF application that worked very well until installing a recent where a flow is the break with the message "inaccessible FacesException:Target, 'bean' returned null. It works very well in our UAT and our production environment is clustered.

    StackTrace

    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: javax.faces.FacesException, msg=#{pageFlowScope.xyzBean.showCaseDetails}: Target Unreachable, 'xyzBean' returned null
    Supplemental Detail    at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:417)
    at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:479)
    at com.wellsfargo.common.view.WFExceptionHandler.handleException(WFExceptionHandler.java:57)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._handleException(LifecycleImpl.java:1380)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:211)
    .....
    ..
    ## Detail 0 ##
    javax.faces.FacesException: #{pageFlowScope.xyzBean.showCaseDetails}: Target Unreachable, 'xyzBean' returned null
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
    at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
    at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:280)
    

    Guidance on how to debug what appears not a problem with scope as our UAT works very well.

    We were finally able to reproduce the problem in our local instance.

    Regarding the cause, the view behind the UI object, the research doesn't have the right keys. As a result, selection on the table was selecting two rows on the search results. By clicking on the commandlink, it seems that two events of Action are put in queue and after that the first action event navigates successfully, the second is pulled and fails.

  • New line of view object does not receive committed to DB

    Hi guys,.

    I have a form to enter a new record on a view object entity based on a taskflow with a new transaction.

    Before the page is called I call the CreateInsert operation to create the new record on this view object.

    There is a certain attributes with default values that I determine in the create ViewRowImpl, method (using populateAttributeAsChanged to set the values).

    Now, if none of the inputValues in the form is filled manually and I want to record the data (the default values are sufficient to back up the folder) return taskflow commit action does not commit data from the db. As soon as I manually enter a value in any field the same return valid action recording correctly in the db. There is no error message and the new record is visible in the application because it is inserted in the iterator to view...

    Is there a way to mark the new line as changed / insert if only the default values are filled? Or I do something wrong?

    With the help of JDev 11.1.1.5

    Achim

    Add the following method in your class RowImpl:

    {} public void setNewRowState (byte b)
         If (b! = Row.STATUS_INITIALIZED |)
             getNewRowState()! = Row.STATUS_NEW) {}
             super.setNewRowState (b);
         }
    }
  • Create a view object with only transient attributes in its entity

    Hello

    With the help of ADF 11 g (11.1.2.3) with JHeadstart (11.1.2.1.28).

    I'm looking to create a new line for a view object that is supported by an entity that is not related to an existing database object:

    http://i.imgur.com/ex1Eqwq.PNG

    The view object has two lists of radio and a check box:

    http://i.imgur.com/sFWl5qF.PNG

    Normally, I'd create a page like the following fragment:


    1. drag the corresponding data control (for example, MyMedicationListView) on the JSFF.
    2. drag the create operation to the MyMedicationListView on the same page fragment.
    3. change the definition of page for the page fragment.
    4. Add an invokeAction for call to action of creation with a refreshCondition of #{adfFacesContext.postback == false}.
    5. remove the button create the page fragment.

    When users browse to the report page, the form elements to provide parameters for the report because there is an instance of line.

    I put:

    * Insert authorized einreihig? is checked.
    * New display at the entrance line? is set to true.

    Here you can see the other parameters:

    http://i.imgur.com/3DZBD7T.PNG

    Section 8.1.3 of the JHS Guide development (v11.1.2) pointed out that the executeQueryForCollection method can be overridden, but should match the settings that are currently enabled.

    When I build the application and go to the page of the report, no radio buttons are displayed. I expected to see the two sets of radio buttons. When I look in the generated page definition file, I see the following executables:
      <executables>
        <invokeAction id="clearDeepLinkViewCriteriaInvoke" Binds="clearDeepLinkViewCriteria" Refresh="renderModel"
                      RefreshCondition="#{'true' != pageFlowScope.jhsQueryByKeyValue}"/>
        <iterator id="MyMedicationListIterator" Binds="MyMedicationListView" DataControl="ReportingServiceDataControl"
                  RangeSize="10"/>
        <invokeAction id="ExecuteQueryMyMedicationListInvoke" Binds="ExecuteQueryMyMedicationList" Refresh="renderModel"
                      RefreshCondition="#{jhsPageChanged}"/>
        <iterator Binds="ReportingServiceDataControl" RangeSize="25" DataControl="ReportingServiceDataControl"
                  id="ReportingServiceDataControlIterator"/>
        <variableIterator id="variables">
          <variable Name="MyMedicationListRowKeyVar" Type="java.lang.String"
                    DefaultValue="#{bindings.MyMedicationListIterator.currentRowKeyString}"/>
        </variableIterator>
      </executables>
    There is no invokeAction for:
        <action IterBinding="MyMedicationListIterator" id="CreateMyMedicationList" RequiresUpdateModel="true"
                Action="createInsertRow"/>
    The result is essentially a form "in white": http://i.imgur.com/0cIeoeG.png

    When I look at the newspaper, I see:
    MyMedicationListViewImpl::buildQuery SELECT  FROM MYMEDICATIONLIST MyMedicationList
    This generates a resumption of flight of exceptions (the request is absurd: there should be no application because all fields are transient). I've tweaked the ViewImpl as follows:
      public String buildQuery(int noUserParams, boolean forRowCount)  {
        String query = super.buildQuery( noUserParams, forRowCount );
        System.err.printf("MyMedicationListViewImpl::buildQuery %s\n", query);
        
        return "SELECT 1 FROM DUAL";
      }
    The executeQueryForCollection did not work (because the getEstimatedRowCount triggers the incorrect SQL statement), so I have injected a custom rowcount:

    http://pastebin.com/UKPiEs03

    How to create an instance of line valid using JHeadstart?

    Thank you!

    Dynamic areas are not configured correctly.

    By connecting the dynamic field to the corresponding view object (that is, the areas >... > query parameters > data collection), option buttons appeared.

Maybe you are looking for