Create multiple rows in Oracle ADF (From Andrejus Baranovskis's Blog)

Hi All,
I followed the steps in the Blog Sample.
I tried this example with 2 tables -> Emp_Details(fields->empId and empName)and Multiple_Entry(fields-> empId and email).
ashu.jspx is my jsf page and Ashu.java is the backing bean.
I checked it many times, but getting the same error. Error is as follows:-
500 Internal Server Error
javax.faces.FacesException: #{backing_ashu.createButton_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98) at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:233) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:202) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123) at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92) ... 27 moreCaused by: java.lang.NullPointerException at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:706) at java.util.ResourceBundle.getBundle(ResourceBundle.java:699) at com.praphulla.khandala.view.utils.JSFUtils.getBundle(JSFUtils.java:227) at com.praphulla.khandala.view.utils.JSFUtils.getStringFromBundle(JSFUtils.java:142) at com.praphulla.khandala.view.backing.Ashu.createButton_action(Ashu.java:118) 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:585) at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146) ... 28 more
Plz provide me some help.
Praphul

Thank you for your reply..
If the am1.invokeMethod("createUserLoc"); is not there in the while loop, it goes through the while loop and gives SOP values correctly.
But if I put this statement in while loop, it errors out in the first iteration itself.

Similar Messages

  • How to create multiple rows in a child table from the multi select Lov

    Hi
    We have Departments and EmployDept and Persons tables and each employee can associate multiple departments and vice versa.While creating a Department page there should be a Multi Select LOV(values from Persons table) with search option for the Persons.From the search panel we can select multiple persons for that department.Suppose we have selected 5 persons and click on submit, then it should create 5 rows in the EmployDept table for 5 persons with that department id.
    Any inputs on how to implement this scenario please..

    Maybe you can get some ideas from here -
    http://adfdeveloper.blogspot.com/2011/07/simple-implementation-of-af.html

  • How to create multiple rows (manual) in jdeveloper (ADF) 11.1.1.1.0 ?

    Hi,
    I want create a multiple rows in detail section(data grid) for manual entries.
    can you give me an example regarding this?

    Is it just me, or is this question basically incomprehensible?
    I want to create multiple rowsthat I can parse
    in detail sectiondon't have a clue what that is
    (data grid)don't know what that is, either - are you talking about some specific component?
    for manual entriesI'm guessing that when you get the multiple rows created "in detail section (data grid)" that a user will be able to key in the values. Is that correct?
    Sorry to pick on you, but your question is so vague as to defy anyone being able to help.
    Best,
    John

  • How to Create multiple rows in Rich table programatically

    Hello ADF Exparts.
    I am Using below Code to create Rich Table Programatically on Clicking a button but I can't able to Create multiple tables will you please help me to create new row programatically
    public class NewTable {
        private RichInputText txtSearching;
        private RichShowDetailItem resultTab;
        private RichShowDetailItem simpleSearchTab;
        private RichColumn firstColumn;
        private RichOutputText outPutText;
        private String searchString;
        AdfFacesContext ctx=AdfFacesContext.getCurrentInstance();
        Connection conn;
        RichTable table;
        Statement stmt;
        private RichShowDetailItem basicSearchTab;
        private RichTable basicResultTable;
        private RichPanelGroupLayout panelGL;
        public NewTable() {
        public String buttonClicked() {
            // Add event code here...
            //Starrt Creating Table
            table =new RichTable();
            table.setId("demo");
            table.setVisible(true);
            table.setWidth("1024px");
            table.setValue("mat_search");
            table.setVar("Search");
            table.setFilterVisible(true);
            table.setAllDetailsEnabled(true);
            table.setRowKey("0");
            table.setFetchSize(25);
            table.setRows(10);
            table.setRowBandingInterval(0);
            table.setRowSelection("single");
           // table.setHorizontalGridVisible(false);
            //table.setVerticalGridVisible(false);      
            //Start Table Header Text Declaretion and Assignment
            RichOutputText colTextMat_No = new RichOutputText(); 
            colTextMat_No.setValue("Material No ");
            RichOutputText colTextShotDes = new RichOutputText(); 
            colTextShotDes.setValue("Short Description");
            RichOutputText colTextLongDes = new RichOutputText(); 
            colTextLongDes.setValue("Long Description");
            //Start Table Columan Creatin
            RichColumn colMat_No = new RichColumn(); 
            colMat_No.setVisible(true);
            colMat_No.setHeader(colTextMat_No);
            colMat_No.setWidth("100px");  
            colMat_No.setSortProperty("Material No");
            colMat_No.setSortable(true);
            colMat_No.setFilterable(true);
            colMat_No.setSeparateRows(true);
            RichColumn colShotDes = new RichColumn(); 
            colShotDes .setVisible(true);
            colShotDes .setHeader(colTextShotDes);
            colShotDes.setWidth("500px");
            colShotDes.setSortProperty("Short Description");
            colShotDes.setSortable(true);
            colShotDes.setFilterable(true);
            colShotDes.setSeparateRows(true);
            RichColumn colLongDes = new RichColumn(); 
            colLongDes .setVisible(true);
            colLongDes .setHeader(colTextLongDes);
            colLongDes.setWidth("500px");
            colLongDes.setFilterable(true);
            colLongDes.setSeparateRows(true);
            //End Table Columan Creatin
            //Start Creating table Children
            List<UIComponent> tblChild;
            tblChild=table.getChildren();
            //Start adding Columan to Table
            tblChild.add(colMat_No);
            tblChild.add(colShotDes);
            tblChild.add(colLongDes);
           List<UIComponent> displayPanel;
           displayPanel=panelGL.getChildren();
            List<UIComponent> matChild;
            matChild=colMat_No.getChildren();
            RichOutputText rot=new RichOutputText();
            rot.setValue("15000");
            matChild.add(rot);
           displayPanel.add(table);
             System.out.println("RowIndex="+table.getRowIndex());
             System.out.println("Row Count="+table.getRowCount());
            return null;
    Thank you very much

    Maybe you can get some ideas from here -
    http://adfdeveloper.blogspot.com/2011/07/simple-implementation-of-af.html

  • Multiple inserts in Oracle ADF

    Hi ,
    I would like to insert multiple records using an Oracle ADF Table.
    Ex: Consider the example of Dept and Emp table. 1 dept can have many employees. so in a master detail form , i would like to have a detail table with some empty rows.where in i can insert 5 records.
    thanks

    Hi Shmeltzer
    Thank you very much for your response. In the present code i am able to insert only one row at a time, but i need on load of the page it should create more than one row. Let me know if you come across such example.
    Kindly let us know where we can add more than one empty rows in the code.
    Thanks in advance :-)
    Thanks & Regards,
    Rajesh

  • Configuring Multiple Schemas in Oracle ADF application

    Hi,
    Thanks all for the replies for my previous posts :-)
    We have a requirement in which we need to configure our application for multiple Database schema. At runtime based upon the logged in user we need to get data from the schema related to that user.
    These schema may be on same Database instance/server or may be on different DB servers.
    The requirement is like this
    Logged in User DB schema configured
    "A" ASchema @ 127.0.0.1
    "B" BSchema @ 127.0.0.2
    "C" ASchema @  127.0.0.1
    "D" Dschema @ 127.0.0.2
    based on the User login (which is happening through one OID system), I need to fetch data from different schema (configured for different application).
    These schema have different set of tables but set of table we require for our application are of same structure.
    Same structure means same Table names with same relations.
    Please let me know can we do the same in Oracle ADF application and How?_
    One more requirement is that if i add a user at runtime and configure the DB schema for this user, All data related to this users will be loaded from this Schema which is configured for this user.
    Thanks in Advance,
    Amit
    newbie to Oracle ADF
    Edited by: ur.amit on May 10, 2010 3:17 PM

    You can try the below example to change database at run time.
    in the filter change the connection and not the credentials
    http://www.oracle.com/technetwork/developer-tools/jdev/dynamicjdbchowto-101755.html#03.
    Most of the other part is done to handle state management tables, which you might also have to do unless you use a file passivation store or if its ok to passivate to a single database always.
    If its ok to passivate to a single db always. Hard code the jbo.server.internal_connection in the AM configurations to a DB jndi name.
    Adf allows you to activate and passivate to a different database other than what you are connected to get and put data.

  • How insert multiple rows in oracle version 8.1

    Hi All,
    I have table date_rng in which i have cloumns date_mnth and date_yr and like to insert multiple rows such (01,2011),
    (02,2011),(03,2011) etc using single insert statement.And i am using oracle 8.1 version so i do not have option of insert all into .please help me..
    Thanks
    Srini

    YOu can use this format
    insert into <table> select <column_value> from dual union all select <column_value> from dual union all ....

  • Multiple row selection in ADF Table using addition column with checkbox

    I am using ADF table(Jdeveloper11g) and i want to selecte multiple rows it may be more than one OR all rows.
    For that i added one Column to the table with Header Delete and checkbox
    <af:table....
    <af:column sortProperty="Delete" headerText="Delete" width="100"
    sortable="false">
    <af:selectBooleanCheckbox label="#{row.favoriteId}"
    valueChangeListener="#{Mybean.onCheck}"
    id="checkbox" autoSubmit="true">
    </af:selectBooleanCheckbox>
    </af:column>
    </af:table>
    backing bean:Here i added code to get Value of one column with id favoriteId and use an arrayList(listForDelete) to monitor the state of the checkboxes
    public void onCheck(ValueChangeEvent valueChangeEvent) {
    BindingContainer bindings = getBindings();
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind =
    (DCIteratorBinding)bindings.get("getUserFavoritesByUserIDIterator");
    if (iterBind != null && iterBind.getCurrentRow() != null) {
    RichSelectBooleanCheckbox ch = (RichSelectBooleanCheckbox)valueChangeEvent.getSource();
    if (!ch.isSelected()) {
    Long issueId = (Long)iterBind.getCurrentRow().getAttribute("favoriteId");
    listForDelete.add(issueId);
    else
    Long issueId = (Long)iterBind.getCurrentRow().getAttribute("favoriteId");
    listForDelete.remove(issueId);
    Problem is that when i select single row checkBox, onCheck() method of backing bean gets called multiple times(equals to the number of rows)
    I think this is beacuse of <af:selectBooleanCheckbox id is same that is "checkbox" but i am not sure.Even i tried to assign some unique id but no any success in assigning Id with value Expression.
    I also find related post
    Re: ADF Table Multiple row selection by Managed Bean
    but that is related to Select All rows or Deselect all rows from table.
    From the simillar post i follow the steps given by Frank.but problem with below step
    ->have an af:clientAttribute assigned to the checkbox with the following EL #{row.key} ,here I added <af:clientAttribute name="#{row.key}"></af:clientAttribute> and i am getting error
    Error(64,37):  Static attribute must be a String literal, its illegal to specify an expression.
    Please let me know if any one had already implemented same test case.
    Thanks for all help
    Jaydeep
    Edited by: JaydeepJ on Aug 7, 2009 4:42 AM

    just to update after the rollback is called in the cancel button i wrote following code which does not change the row focus to the first row
    DCBindingContainer bc =
    (DCBindingContainer)BindingUtils.getBindingContext().getCurrentBindingsEntry();
    DCIteratorBinding profItr =
    bc.findIteratorBinding("ProfileSearchInstIterator");
    Row cRow = profItr.getRowAtRangeIndex(0);
    if(cRow != null){
    System.out.println("Current row is not null so fixed ");
    profItr.setCurrentRowIndexInRange(0);
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(cRow.getKey());
    rks.add(keyList);
    profileTable.setSelectedRowKeys(rks);
    AdfFacesContext.getCurrentInstance().addPartialTarget(profileTable);
    }

  • Multiple rows to be returned from a procedure without a cursor?

    We can return multiple rows using ref cursor as the return type in a procedure/function but I want to avoid processing a cursor. I would like to use the select statement on the returned multiple rows. I believe pl/sql table can not be used here also as select are not permitted on it. Is there some way to get around this defficiency in oracle?? Please help out!! My email is [email protected]
    null

    Oracle 8i has temporary tables. As far as I know, this is your only option.
    I, too, would like to be able to return a true "relation" (or "table") from a pl/sql function. Why can't I just specify the return type of the function as a "table" of "records"?
    Note that if pl/sql is completely orthogonality (neat word, huh?) I should be allowed to use this function that returns a "relation" as a table in the "from" clause of a sql query.
    Speaking of complete orthogonality, why can't I treat a pl/sql table just like any other table -- I should be able to query it, "insert" into it, "update" it, join it to other "tables", etc.
    How about this for a slogan, "tables everywhere"? Anything, from arrays scalars to functions to arrays of classes to pl/sql tables should be able to participate in a sql statement as a "relation/table."
    Anyone from Oracle listening out there? :-)

  • How to insert multiple rows in oracle forms when using TEMPLATE FORM

    I got a case study on PO creation nd in that I have to insert multiple rows in form especally when PO creation screen is there.
    I tried by different syntaxes but its not working.I need correct syntax to insert the multiple rows in to the table in oracle forms

    Please Oracle EBS queries on EBS forums.

  • Inserting Multiple rows in Oracle DB using DB Adapter not working

    Hi All,
    I have a bpel process that reads actually calls the db adapter to insert(only) multiple rows in a table ..
    This is a very simple process and worked fine on soa 10g
    After migrating to 11.1.1.3 the invoke throws a strange error " db lock ..batch execution failed " or something.. the jca adapter rolls back causing bpel to throw a bpelx:rollback
    I tried the same on 11.1.1.4 and got the same result ..
    The process takes multiple orders from an entity and has xslt using for-each to write to multiple rows in the DB..
    Any help is appreciated..
    thanks

    Thank you for your reply..
    If the am1.invokeMethod("createUserLoc"); is not there in the while loop, it goes through the while loop and gives SOP values correctly.
    But if I put this statement in while loop, it errors out in the first iteration itself.

  • How to create multiple rows in  HFR-- need help urgent

    I want to create a row template in HFR, there are almost 500 members in rows and we already have them listed in an excel sheet in rows. They are not under a particular hierarchy so cannot choose the relationship functions ( like idesc or children and all). Is there a way we can copy paste it some way in HFR from excel or do we need to pick every member in HFR separately.
    Please help.

    Firstly format the members in excel such that they end with a comma, then "Copy" and "Transpose" paste these on a new cell in excel.
    Copy the transposed line and paste in financial reporting studio in the formulae bar & click save.

  • HFR Query on  creating multiple rows - Need urgent help

    I want to create a row template in HFR, there are almost 500 members in rows and we already have them listed in an excel sheet in rows. They are not under a particular hierarchy so cannot choose the relationship functions ( like idesc or children and all). Is there a way we can copy paste it some way in HFR from excel or do we need to pick every member in HFR separately.
    Please help.

    There is no way to import from Excel to FR. You have to pick every member separately and create the report.

  • Insert Multiple rows into the table from that table data

    Hi All,
    I have a requirement like to insert mulitple rows into the table from that table data only(I need to replicate the data).
    In this table primary key is composite primary key with all foreign keys.primary key also including the Date foreign key.I need to change that date at the of insertion.
    INSERT
    INTO myschema.Fact_page_performance
    time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available ,
    date_sk
    VALUES
    (SELECT time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available
    FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
    WHERE date_sk=20090509,20090510
    But it is giving the error like missing Expression.
    Could anyone please help to me.
    Thanks and Regards
    Swetha.

    You can have either VALUES or SELECT not both
    INSERT
    INTO myschema.Fact_page_performance
    time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available ,
    date_sk
    SELECT time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available
    FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
    WHERE date_sk=20090509,20090510;

  • Multiple row insertion into rm_text_lines from "free format select text"?

    We use the Repository Object Navigator (RON) to define views through the "free format select text" ("Select text" and "Where/Validation condition" fields).
    Before the upgrade/migration to 9i (repository and clients), multi-line definitions inserted in these text fields with older Designer clients were saved in multiple rm_text_lines rows and have remained this way after the upgrade/migration.
    With the 9i Designer clients, the multi-line definition (separated by "Enter" key) are now inserted as only one row.
    Is there any (easy) way in Designer 9i client to "force" the insertion of multiple rows into rm_text_lines when an "Enter" (chr(13)+chr(10)) is encountered?

    Can you give a use case? Are you using some Repository API scripts that expect that rm_text_lines are no longer than a single line, that are now failing when the text is actually fairly long? Are you printing and want to make sure that line breaks occur where the user put them?
    I ask because there really isn't a way to force Designer to break long text into multiple rm_text_line rows. Therefore, you are going to have to change your API scripts and reports to take the possible long lines into account.

Maybe you are looking for