Sequence of Create Rows in View Object

I have to insert a sequence of Rows in a entity object. While doing this , I need to display the master table record at the top of the page. I created a Data action (Dragged and Dropped Create button) which forwards to the data page containing ADF UIX input form and ADF UIX read only table(Master record). When I click te submit button, I commit the transaction and forward to the create data action again. I removed the following line from the Data Page.
<formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>
But Still, I'm not able to get the master record to display(Shows Empty Record) on third and subsequent insert rows. But the child record is inserted into the database on the first and second attempt.
Please help me solve this problem.
Sathya

Are you using alterts related to that data object?
Do you have any open report that uses that data object?

Similar Messages

  • How to get first row from View Object cache.

    hi,
    I am using Jdeveloper 11.1.1.6
    can we get first row from View Object cache??
    Thanks in Advance.
    Best
    Shashidhar

    Hi Frank,
    Thanks for reply!!
    My case is:
    I have a Query based ViewObject.
    One of the field is LOV and remaining fields are in ADF table. the LOV field is out side ADF table when i insert first record in ADF table and i choose LOV  filed the value is selected.
    when i create second row LOV value got refreshed because both are in same VO.
    I need to get the LOV value of first row and set same value to second Row.
    Shashidhar

  • Creating and Binding View Objects dynamically : Oracle Jdeveloper 11g

    Hello,
    We are trying to create and bind view objects dynamically to adf data visualization components.
    The view object is a result of multiple tables.
    We are using Oracle JDeveloper 11g Technical Preview. ( can't upgrade to TP2 or TP3 now).
    We have found this : http://radio.weblogs.com/0118231/stories/2003/07/15/creatingUpdateableMultientityViewObjectDefinitionsDynamically.html on our search for the same.
    The sample application however, is in 10g , hence required migration.
    Also, it was a standalone application with the TestClient.java having a main() method.
    Our requirement is for Web Application; we use Adf+jsf .
    Guidance of any sort is very much appreciated.
    Thanks in advance.
    -Anil Golla

    Hi,
    there also exist a forum for JDeveloper 11: JDeveloper and OC4J 11g Technology Preview
    What you are trying todo is not trivial because you need to not only dynamically create the VO, you would also dynamically need to create the binding meta data for it (assuming you use ADF). Not sure if the API to modify the binding is public, so posting it on the JDeveloper 11 forum bears a glimpse of hope for an answer
    In JDeveloper 10.1.3 you can't do this
    Frank

  • Possible bug when creating multiple detail view objects

    using jdev 11.1.1.0.0 to build jsf/adf applications. I wanted to report what seems like a bug in 11g. I have a parent table which has two child tables. After creating the appropriate entities, associations, views, and view links, the app module looks like this:
    MasterView
    --DetailView1
    --DetailView2
    The two detail view objects are on the same level, they are both direct children of the Master view.
    Here's what's happening:
    1) I create the master entity/view objects (MasterView)
    2) I create one of the detail entity/view objects (DetailView1).
    3) I create the association and view link to establish relationship between MasterView and DetailView1. Everything works fine.
    4) I create the entity/view objects for second detail view (DetailView2)
    5) When I attempt to create a second view link (based off an association) to establish the relationship between MasterView and DetailView2, the query clauses of the Create View Link wizard (screens 4 and 5) do not get created properly. I finish the wizard and save. Not only does this view link not get created properly, but in the process the query clauses that were defined in the first view link between MasterView and DetailView1 are wiped out. This will break any coordination between master and detail views in both the app module tester and runtime. Has anyone seen this problem?

    fyi, it looks like this issue has been resolved with jdev 11.1.1.0.2 (Update 2)

  • Problem during Add row in View Object : View Row of Key Not found

    Hello,
    I'm facing this problem during insert of new row in the view object. I'm having 2 entities that belong to the same DB table (I need this because one is required with the composition assoc and the other one without it).
    I have three tables, COMPANY, USERS and PRIVILEGES.
    Company (1) to USERS (N)
    USERS (1) to PRIVILGES (N)
    While adding users for a specific company , i get this error msg.
    P.S: I'm not getting this error, if i add company, then user. Only if i directly add users i'm getting this error.
    04/11/27 19:31:46 [12511] DCUtil.RETURNING oracle.jbo.uicli.binding.JUFormBinding
    04/11/27 19:31:46 [12512] **** refreshControl() for BindingContainer :new_cuserUIModel
    04/11/27 19:31:46 [12513] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/11/27 19:31:46 [12514] Decompressed BC state:BCST:Reousers1View1Iterator=0001000000042D323535,UsertypeView1Iterator=0001000000124141414B6639414142414141537653414141,StatesView1Iterator=0001000000124141414B5A77414142414141536643414141,
    04/11/27 19:31:46 [12515] **** refreshControl() for BindingContainer :new_cuserUIModel
    04/11/27 19:31:46 [12516] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/11/27 19:31:46 [12517] Column count: 21
    04/11/27 19:31:46 [12518] ViewObject: Reousers1View_254_findByKey_ close prepared statements...
    04/11/27 19:31:46 [12519] ViewObject: Reousers1View_254_findByKey_ Created new QUERY statement
    04/11/27 19:31:46 [12520] SELECT Reousers1.USERID, Reousers1.CID, Reousers1.UTYPE, Reousers1.DESIGNATION, Reousers1.NAME, Reousers1.ADDRESS, Reousers1.CITY, Reousers1.STATE, Reousers1.ZIP, Reousers1.EMAIL, Reousers1.TEL, Reousers1.FAX, Reousers1.WEBSITE, Reousers1.ENTRY FROM REOUSERS Reousers1 WHERE (Reousers1.USERID = :1)
    04/11/27 19:31:46 [12521] Bind params for ViewObject: Reousers1View_254_findByKey_
    04/11/27 19:31:46 [12522] Binding param 1: -255
    04/11/27 19:31:46 [12523] OracleSQLBuilder Executing Select on: REOUSERS (false)
    04/11/27 19:31:46 [12524] Built select: 'SELECT USERID, CID, UTYPE, DESIGNATION, NAME, ADDRESS, CITY, STATE, ZIP, EMAIL, TEL, FAX, WEBSITE, ENTRY FROM REOUSERS Reousers1'
    04/11/27 19:31:46 [12525] Executing FAULT-IN...SELECT USERID, CID, UTYPE, DESIGNATION, NAME, ADDRESS, CITY, STATE, ZIP, EMAIL, TEL, FAX, WEBSITE, ENTRY FROM REOUSERS Reousers1 WHERE USERID=:1
    oracle.jbo.RowNotFoundException: JBO-25020: View row of key oracle.jbo.Key[-255 ] not found in Reousers1View1.

    Hi Timo,
    once again thanks for ur reply.
    as my vo are based on procedure, i know that i can't update the table using them.
    i only wanted to insert the rows in the vo and show it to user (only for selection purpose).
    Now my problem is sorted as i have changed the code like this-
    Row new_row=vo1.createRow();
    new_row.setAttribute(index,vo2.getAttribute(index)) ;
    vo1.insertRow(new_row);
    Earlier i was only inserting a new row, without creating any row.
    Thanks a lot.

  • How to retrieve rows in view object and display on UI

    Hi All,
    I am new to ADF. i am using jdeveloper11.1.1.5.0 . Here is my scenario.
    In my AM i have a view object say EmployeeVo. on empVo i am performing setRangeStart and setRangeSize.
    empVo .setRangeStart(2);
    empVo .setRangeSize(2);
    Rows[] rows=empVo .getAllRowsInRange();
    so from the above statement will get two rows from the empVo object. Now i have to display these rows in UI in the form of af:table.
    Can anyone suggest how to acheive this.
    Thanks in advance.

    <af:table value="#{Bean.listValue}" var="row" />
    //refer rows like
    <af:column>
    <af:inputText value="#{row.description}" />
    </af:column>
    List listValue = new ArrayList();
    //getter setter of listValue
    //bean constructor
    retrieve the rows from the AM methodthe above step is very crude hope you understand the steps

  • How To Delete a row from view object

    Hi
    I have a table whose data is populated based on the view object... and for each row i have a delete icon...
    when i press on this delete icon i want to delete that particular row from the view object only..but not from the data
    base..please help me in this issue
    Thanks

    Hi,
    as per krishna priya says u can delete .
    -----1st one thing let me know vo is eo based .???.
    If not here is the sample code to delete a row not from the data base.:
    public void Deleterow(OAPageContext pageContext, OAWebBean webBean,String prjid)
    int idtodelete;
    int fetchedrowcount;
    Number prjojectid;
    RowSetIterator deleteIter;
    prjidtodelete=Integer.parseInt(prjid);
    OADBTransaction tr = getOADBTransaction();
    ProjectsVORowImpl row=null;
    ProjectsVOImpl vo= getProjectsVO1();
    fetchedrowcount=vo.getRowCount();
    deleteIter = vo.createRowSetIterator("deleteIter");
    deleteIter.setRangeStart(0);
    deleteIter.setRangeSize(fetchedrowcount);
    for(int i=0;i<fetchedrowcount;i++)
    row= (ProjectsVORowImpl)deleteIter.getRowAtRangeIndex(i);
    prjojectid=(Number)row.getAttribute("ProjectId");
    if (prjojectid.compareTo(prjidtodelete)==0)
    row.remove();
    break;
    deleteIter.closeRowSetIterator();
    Regards
    Meher Irk
    Edited by: Meher Irk on Nov 2, 2010 12:42 AM

  • Creating and Using View Objects on JDev 10g against SQL Server 2005

    I'm currently working on this project on Jdeveloper against a SQL Server 2005 DB (I couldn't talk this people to migrate to Oracle... :-( ), and it's the first time I work with JDev against a database other than 10g.
    I had no problem making the connection, and I can see the DB in Conections->Databases, but when I create an app. module, and create entities and views and add them to the app. module to access them through the Data Controls, these don't work. I can see the view on the Data Controls, and when I drag them to my jspx page it shows the menu that let's me choose whether I want to create a table, or a selection, or a tree, but once I choose one, it does nothing.
    I've search all over the internet and haven't found a solution, so I come to this forum desperate for help, seriously.
    Please get in touch; if anyone knows another solution that doesn't involve not using JDev or SQL Server 2005, please let me know, because I basically need to have a few selectonechoice showing some data from a few tables.
    Thanks for reading this post, and hope to get help.
    Carlos.

    Hi,
    can you run the model in the ADF BC tester ? If this is possible the SQL Server doesn't seem to be the problem. Are you on JDeveloper 10.1.3.3? If not, just get this latest build
    Frank

  • [SOLVED] Row level view object validation (cross-field/multi-field)

    Hi,
    I'm trying to implement a validation rule across multiple view object fields in ADF 11g (11.1.1.2.0). I have 4 fields that the user needs to either leave all blank or there are some pretty complicated rules around which fields should be specified in combination. I'm having trouble using standard expression type validation rules because:
    - The validation rule is always attached to a particular field
    - The validation rule is not executed if the field is left blank. I need it to.
    - I can't control which field the validation message shows in (it always shows in the field on which the rule is attached).
    Is there any way I can hook into the v
    I've found the following example that seems to tackle similar problems:
    +107. Displaying ADF BC Mandatory Field Errors Using UI Hint Labels+
    http://blogs.oracle.com/smuenchadf/examples/
    It's fairly long and complex solution though, which quite a lot of code to be written. This example is from 10g (in 2007). Does anyone know of a more elegant way to achieve this in 11g (in 2010 :) )?

    Thanks John! I didn't realise you could define entity-level rules - now found it in the Business Rules section of the entity properties.
    One more question: is there any way that I can specify which field is in error when an entity-level validation fails? It would be nice if my error message was attached to the field that is in error.

  • Creating emty rows in View Object

    Hi,
    My Application is ADFBC.
    My requirement is create empty rows while page loading.I am using three tables one is master and another two are detailed tables.
    creation form is: master form
    detailed table
    detailed table.
    when i am pressing create button the form shows two emty rows in detailed table and 7 empty rows in second detailed table.
    i wrote code in AMImpl is
    public void createcomp() {
    SequenceImpl s = new SequenceImpl("ATTRIBUTE_ID_S", getDBTransaction());
    Number next = s.getSequenceNumber();
    Number n=(Number)s.getData();
    Number ssid=next+(new Number(1));
    FbCmnEmcStorageSystemsVOImpl fbCmnEmcStorageSystemsVO = (FbCmnEmcStorageSystemsVOImpl) this.getFbCmnEmcStorageSystemsVO1();
    FbCmnEmcStorageProcessorsVOImpl fbCmnEmcStorageProcessorsVO = (FbCmnEmcStorageProcessorsVOImpl) this.getFbCmnEmcStorageProcessorsVO2();
    FbCmnEmcStorageComponentsVOImpl fbCmnEmcStorageComponentsVO = (FbCmnEmcStorageComponentsVOImpl) this.getFbCmnEmcStorageComponentsVO2();
    // FbCmnEmcStorageSystemsVORow fbCmnEmcStorageSystemsVORow = (FbCmnEmcStorageSystemsVORow) fbCmnEmcStorageSystemsVO.createRow();
    for(int i=1;i<=2;i++)
    FbCmnEmcStorageProcessorsVORow fbCmnEmcStorageProcessorsVORow = (FbCmnEmcStorageProcessorsVORow) fbCmnEmcStorageProcessorsVO.createRow();
    fbCmnEmcStorageProcessorsVORow.setStorageSystemId(new Number(ssid));
    fbCmnEmcStorageProcessorsVORow.setSpId(new Number(i));
    for(int i=0;i<7;i++) {
    FbCmnEmcStorageComponentsVORow fbCmnEmcStorageComponentsVORow = (FbCmnEmcStorageComponentsVORow) fbCmnEmcStorageComponentsVO.createRow();
    fbCmnEmcStorageComponentsVORow.setStorageSystemId(new Number(ssid));
    fbCmnEmcStorageComponentsVORow.setComponentName("sample"+i);
    i am calling this method while page loading using these procedure:
    expose the method as a client method and create a method binding for it (in pageDef). Then create an invokeAction (also pageDef but Executables section) pointing to the method binding. Set the invokeAction refresh condition (property of it) to
    ${!adfFacesContext.postback}
    but i am not getting emtyrows in display.
    what i have to do?please help me.
    Thanks,

    Hi,
    see this section in the developer guide for the answer
    http://download-uk.oracle.com/docs/html/B25947_01/bcdcpal004.htm#sthref823
    Frank

  • How to create LOV on view object with itself

    Hi
    My scenario is that I have COUNTRY table with columns Country_Code and Country_Name.
    I need to display the Country_Name as selectonechoice. User will select some country name and then I should get the Country_Code associated with the selected Country_Name in Managed bean.
    Could you please suggest how to achieve this?
    Regards,
    Vinod

    Hi
    My English isn't very good.
    create a view obj on COUNTRY table then from Data Control drag&drop view obj as a Single Selection and then select Adf Select One Choice and from there you can select which attribute to display.
    in managed bean you can get the Country_Code from the below code:
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iteratorRow =
    (DCIteratorBinding)dcBindings.get("iterator name for view obj");
    Row row = iteratorRow.getCurrentRow();
    System.out.println("row[]=" + row.getAttribute(0));
    Habib

  • HOWTO create a polymorphic View Object .

    I 've a table say "people" wich contains a discriminator column (say sex) and some data depending on that attribute.
    I'm able to create an entity people and the 2 extending entities Man and Woman and the related Vo.
    Now I need to create a complete VO wich includes attributes from People, Man and Woman in order to create a maintenance program for that table (I'd like to avoid a double or triple maintenance program) wich exposes all attributes switching off the attributes wich are not related to the row the user is operating on.
    I mean the Vo should expose People+Man attributes if it's a man and People+Woman attributes if it's a Woman.
    Is it possible ? How ?
    Tks
    Tullio

    There are two ways that could possible solve your needs:
    1. Create two or n 'leaf' VOs per subtype. And use the allEmpVO to find the row you are interested in and then use it's key to find the row in an appropriate VO subtype to fetch all the subtype VO properties that are not part of the base.
    2. Use a custom attribute mapping by overriding getAttribute(String/int) methods and map extra subtype specific attributes to predefined generic names and based on the discriminator, in the generic attribute getter, unmap it back to the corresponding subtype attribute value. Something like say create ATTR1, ATTR2, ATTR3 etc on the base subtype. Override the getters for these attributes to fetch the subtype entity and fetch a subtype attribute value. Note that you may also have to implement mapping of subtype attribute names to ATTR1, ATTR2 etc so that on the caller side you could call getAttribute(subTypeAttrName) and that gets mapped to say ATTR1 which ends up calling subtype's getAttr1 method and return getEntity(subTypeEntityIndex).getSubTypeAttr1()

  • Error when dynamically creating and binding view object

    Hi,
    I'm using JDeveloper 10.1.2.1.0 (1913) to create a JSP - Struts - ADF BC application.
    I'm trying to create a lov page that is based on a viewobject whose query (and bindings) are set at runtime (like Steve Muench shows in one of his undocumented ADF samples).
    In the prepareModel() I do the following:
    -unbindRowsetIteratorFromDynamicQueryIteratorBinding(...)
    -changeDynamicViewObjectQuery(...)
    -recreateRangeBindingForDynamicQuery(...)
    -removeControlBinding(...)
    -addDynamicRangeBinding(...)
    So I remove the existing binding, change the query of the viewobejct and recreate the bindings.
    I have got most of the code running except for 1 issue:
    1. The first time I call my Lov I get the a stacktrace (included at the end of this post). If I close the window and click the Lov button again it is working fine.
    Can someone help me out with this one???
    Here is the stacktrace I am getting:
    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${bindings.OpmerkingenLookupIterator.rangeStart}": An error occurred while getting property "rangeStart" from an instance of class oracle.jbo.uicli.binding.JUIteratorBinding (java.lang.NullPointerException)
         at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:146)
         at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:166)
         at org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:112)
         at org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNotNull(ExpressionUtil.java:85)
         at org.apache.taglibs.standard.tag.el.core.SetTag.evaluateExpressions(SetTag.java:147)
         at org.apache.taglibs.standard.tag.el.core.SetTag.doStartTag(SetTag.java:95)
         at web2d_inf._page._referentie._LovOpmerkingenLookup._jspService(_LovOpmerkingenLookup.java:131)
         [SRC:/WEB-INF/page/referentie/LovOpmerkingenLookup.jsp:28]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         at oracle.jheadstart.controller.strutsadf.JhsRequestProcessor.process(JhsRequestProcessor.java:385)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at oracle.jheadstart.controller.strutsadf.JhsActionServlet.process(JhsActionServlet.java:130)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.jheadstart.controller.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:176)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)

    Here is some more info:
    I can reproduce the problem using the code Steve Muench supplies in his undocumented ADF samples.
    If you add the following line to the jsp in the example code(browseResultsOfDynamicVO.jsp):
    <c:set var="rangeStart" scope="request" value="${bindings.DynamicViewObjectIterator.rangeStart}"/>You will get the behaviour I am facing.
    The first time in your session you enter a valid query and submit it you get a stacktrace. By refreshing the page it works.
    It looks like that when recreating the bindings at runtime something more is fone that isn't done at design time. So the first time the statement fails but once the bindings have been recreated at runtime it suddenly works....
    The main question is: what is it that is done at runtime and is missing at design time?

  • How to create dynamic View Object and Dynamic Table

    Dear ll
    I want to create a dynamic view object and display the output in a dynamic table on the page.
    I am using Jdeveloper 12c "Studio Edition Version 12.1.2.0.0"
    This what I did:
    1- I created a read only view object with this query "Select sysdate from dual"
    2- I added this View object to the application module
    3- I created a new method that change the query of this View object at runtime
        public void changeVoQuery(String dbViewName) {
            String sqlstm = "Select * From " + dbViewName;
            ViewObject dynamicVo = this.findViewObject("DynamicVo");
            if (dynamicVo != null) {
                dynamicVo.remove();
            dynamicVo = this.createViewObjectFromQueryStmt("DynamicVo", sqlstm);
            dynamicVo.executeQuery();
    4- I run the application module for testing the method and I passed "Scott.Emp" as a parameter and the result was Success
    5- Now I want to show the result of the view on the page, so I draged and dropped the method from the data control as a parameter form
    6- I dragged and dropped the view Object "DynamicVo" as a table and I choose "generate Column Dynamically at runtime". This is the page source
    <af:panelHeader text="#{viewcontrollerBundle.SELECT_DOCUMTN_TYPE}" id="ph1">
            <af:panelFormLayout id="pfl1">
                <af:inputText value="#{bindings.dbViewName.inputValue}" label="#{bindings.dbViewName.hints.label}"
                              required="#{bindings.dbViewName.hints.mandatory}"
                              columns="#{bindings.dbViewName.hints.displayWidth}"
                              maximumLength="#{bindings.dbViewName.hints.precision}"
                              shortDesc="#{bindings.dbViewName.hints.tooltip}" id="it1">
                    <f:validator binding="#{bindings.dbViewName.validator}"/>
                </af:inputText>
                <af:button actionListener="#{bindings.changeVoQuery.execute}" text="changeVoQuery"
                           disabled="#{!bindings.changeVoQuery.enabled}" id="b1"/>
            </af:panelFormLayout>
        </af:panelHeader>
        <af:table value="#{bindings.DynamicVo.collectionModel}" var="row" rows="#{bindings.DynamicVo.rangeSize}"
                  emptyText="#{bindings.DynamicVo.viewable ? 'No data to display.' : 'Access Denied.'}"
                  rowBandingInterval="0" selectedRowKeys="#{bindings.DynamicVo.collectionModel.selectedRow}"
                  selectionListener="#{bindings.DynamicVo.collectionModel.makeCurrent}" rowSelection="single"
                  fetchSize="#{bindings.DynamicVo.rangeSize}" filterModel="#{bindings.DynamicVoQuery.queryDescriptor}"
                  queryListener="#{bindings.DynamicVoQuery.processQuery}" filterVisible="true" varStatus="vs" id="t1"
                  partialTriggers="::b1">
            <af:iterator id="i1" value="#{bindings.DynamicVo.attributesModel.attributes}" var="column">
                <af:column headerText="#{column.label}" sortProperty="#{column.name}" sortable="true" filterable="true"
                           id="c1">
                    <af:dynamicComponent id="d1" attributeModel="#{column}"
                                         value="#{row.bindings[column.name].inputValue}"/>
                </af:column>
            </af:iterator>
        </af:table>
    when I run the page this error is occured
    <Nov 13, 2013 2:51:58 PM AST> <Error> <oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    Caused By: java.lang.NullPointerException
    Can any body help me please
    thanks

    Have you seen Shay's video https://blogs.oracle.com/shay/entry/adf_faces_dynamic_tags_-_for_a
    All you have to do is to use the dynamic table to get your result.
    Timo

  • Creating and Accessing a Dynamic View Object

    Hi,
    I'm needing to create a Dynamic View Object so to have the ability to modify the FROM and WHERE clauses in an SQL statement.
    I then need to view all the columns and rows in an adf table or something similar.
    I've read up a fair bit on similar situations, however I'm struggling with the basic framework of building the View Object.
    I know I'm wanting to use ..createViewObjectFromQueryStmt..but just unsure of the syntax in using it, especially connecting the VO to an Application Module.
    This is similar to what I've got now, located in AppModuleImpl.java
        public void createDynVO(ApplicationModule appMod, String FROMclause, String WHEREclause){
        String SQL = "SELECT JOURNAL_NAME, PERIOD_NAME FROM " + FROMclause + " " + WHEREclause;
        ViewObject vo = appMod.createViewObjectFromQueryStmt("DynamicView", SQL);
        vo.executeQuery();But how does it know what the application module is?
    Any help would be greatly appreciated!
    -Chris

    Ok, I've actually modified my approach to this.
    I've created a View Object in the design view, added it to the App Module, and then created an iterator and bound an adf table to that iterator.
    The View Object which I created has the same column names as what I am going to be getting later down the track.
    Everything is working perfectly, except that I can't seem to bind variables to the WHERE clause.
    Below is what I have got running:
        public void recreateDynView(String FromClause, String whereCompany, String whereDepartment) {
             String sql_PAGE_ITEM1 = " AND PAGE_ITEM1 LIKE :P_PAGE_ITEM1";
             String sql_PAGE_ITEM2 = " AND PAGE_ITEM2 LIKE :P_PAGE_ITEM2";
             findViewObject("DynamicView1").remove();
             String SQLStmt = "SELECT PAGE_ITEM1, PAGE_ITEM2, PAGE_ITEM3, LINE_ITEM FROM " + FromClause;
             ViewObject vo = createViewObjectFromQueryStmt("DynamicView1",SQLStmt);
             vo.setWhereClause("1=1");
               if (whereCompany != null && whereCompany.length()>0){
                   vo.setWhereClause(vo.getWhereClause() + sql_PAGE_ITEM1);
                   vo.defineNamedWhereClauseParam("P_PAGE_ITEM1",null,null);
                   vo.setNamedWhereClauseParam("P_PAGE_ITEM1",whereCompany);
               if (whereDepartment != null && whereDepartment.length()>0){
                   vo.setWhereClause(vo.getWhereClause() + sql_PAGE_ITEM2);
                   vo.defineNamedWhereClauseParam("P_PAGE_ITEM2",null,null);
                   vo.setNamedWhereClauseParam("P_PAGE_ITEM2",whereDepartment);
             vo.executeQuery();
           }However whenever I input a value into one of the bound variables, I get the following error on the page.
       1. JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOperException, msg=JBO-25070: Where-clause param variable P_PAGE_ITEM1 needs ordinal index array.
       2. JBO-25070: Where-clause param variable P_PAGE_ITEM1 needs ordinal index array.In the view object which i created at design stage, I've set the binding style to Oracle Named, so it should be alright. But obviously since I'm removing the view object and creating another version of it, it doesn't have the same binding style attached by default?
    Is there a work around for this? I'm so close!
    -Chris

Maybe you are looking for