DBSequence usage creating 2 rows (ADF BC)

As a "newbie" with JDeveloper (10.1.3) development, I have approached my project development referencing the Oracle ADF Tutorial for Forms/4GL Developers using the same technology specified in the Tutorial (ADF Faces Components, ADF Faces HTML, JSF Core, JSF HTML).
This is a small project (a team knowledge base) that actually fit well with the Tutorial (SRDemo) example.
The problem I am encountering is 2 rows are created when using the same approach in the Tutorial with a "Create" and a "Confirm" page. The first row has the correct data entered and the second row is blank with the next sequential ID. Row ID is of type DBSequence and a database sequence is used and populated with a BEFORE INSERT TRIGGER.
So when I've created 2 new rows, the results appears as follows:
5 8/2/2006 SW Prototype Dev JD 10.1.3 WN 111111
6
7 8/2/2006 SW Database DB 10g WN 111111
8

Just to keep the thread in sync (because I've gone further into the hole!), I'm pasting the Stack information:
Class     Method
TrackingImpl     create
EntityImpl     callCreate
EntityDefImpl     createInstance
DBTransactionImpl     createEntityInstance
DBTransactionImpl2     createEntityInstance
IssuePublicServiceImpl     createNewIssueFromGlobals
NativeMethodAccessorImpl     invoke0
NativeMethodAccessorImpl     invoke
DelegatingMethodAccessorImpl     invoke
Method     invoke
DCInvokeMethod     invokeMethod
DCDataControl     invokeMethod
DCJboDataControl     invokeMethod
DCInvokeMethod     callMethod
JUCtrlActionBinding     doIt
DCDataControl     invokeOperation
JUCtrlActionBinding     invoke
PageLifecycleImpl     invokeActionBinding
PageLifecycleImpl     handleEvent
PageLifecycleImpl     processComponentEvents
NativeMethodAccessorImpl     invoke0
NativeMethodAccessorImpl     invoke
DelegatingMethodAccessorImpl     invoke
Method     invoke
MethodBindingImpl     invoke
FacesCtrlActionBinding     _execute
FacesCtrlActionBinding     execute
NativeMethodAccessorImpl     invoke0
NativeMethodAccessorImpl     invoke
DelegatingMethodAccessorImpl     invoke
Method     invoke
MethodBindingImpl     invoke
UIXComponentBase     __broadcast
UIXCommand     broadcast
UIViewRoot     broadcastEvents
UIViewRoot     processApplication
InvokeApplicationPhase     execute
LifecycleImpl     phase
LifecycleImpl     execute
FacesServlet     service
ResourceFilterChain     doFilter
AdfFacesFilterImpl     _invokeDoFilter
AdfFacesFilterImpl     _doFilterImpl
AdfFacesFilterImpl     doFilter
AdfFacesFilter     doFilter
EvermindFilterChain     doFilter
ADFBindingFilter     doFilter
ServletRequestDispatcher     invoke
ServletRequestDispatcher     forwardInternal
HttpRequestHandler     doProcessRequest
HttpRequestHandler     processRequest
HttpRequestHandler     serveOneRequest
HttpRequestHandler     run
HttpRequestHandler     run
ServerSocketReadHandler$SafeRunnable     run
ServerSocketAcceptHandler     procClientSocket
ServerSocketAcceptHandler     access$800
ServerSocketAcceptHandler$AcceptHandlerHorse     run
ReleasableResourcePooledExecutor$MyWorker     run
Thread     run

Similar Messages

  • Problem while creating row with dependent select one choice in adf  table

    Iam having independent and dependent select one choice in a ROW in adf af:table
    unable to insert more than one row with dependent select one choice using create insert in adf table.
    Able to add more rows in UI af:table but ,ignoring previous rows (select one choice values) and only latest current row values is getting inserted to the database.
    Following is the code used to create row and for pointing to the current row
    public void addRowOnSecSettings(){
    SecurityGroupSettingsVOImpl SecGroupSetVO =(SecurityGroupSettingsVOImpl) this.getSecurityGroupSettingsVO1();
    try{
    int rowCount = SecGroupSetVO.getRowCount();
    SecurityGroupSettingsVORowImpl SecGroupSetRow =
    (SecurityGroupSettingsVORowImpl)SecGroupSetVO.createRow();
    SecGroupSetRow.setNewRowState(Row.STATUS_INITIALIZED);
    SecGroupSetVO.insertRowAtRangeIndex(rowCount, SecGroupSetRow);
    SecGroupSetVO.setCurrentRowAtRangeIndex(rowCount);
    SecGroupSetVO.setCurrentRow(SecGroupSetRow);
    } catch (Exception e) {
    e.printStackTrace();
    Regards,
    Bhagavan

    as it is dependent select one choice ,have already put auto submit="true".but no chance ,
    if i add two rows vo rowiterator showing count 2 but only current row select onechoice values are getting where as previous row select one choice values are null.

  • ADF 10.1.3.4: 'losing' newly created row in master-detail-detail.

    Situation:
    I have a page in JSF/ADF with the following set up.
    Top-half of the page is a table.
    Underneath the table is on the left a selectonelistbox component and next to it on the right a tabbed section.
    The table -> selectonelistbox relation is master-detail.
    The selectonelistbox -> tabbed section is master-detail.
    So when you change the selection in de seletonelistbox the data in the tabbed section changes.
    One of the functions in a tabbed section is a createinsert.
    step1: select value '1' in the selectonelistbox.
    step1: a new row is create (with createinsert). there is no commit yet, the row is in the entity cache.
    step2: change the selection to '2' in the selectonelistbox.
    step3: create a new row (with createinsert).
    step4: commit the changes.
    We see that only the row of the current row is committed. The newly created row under value '1' has disappeared.
    There are no warnings/exception thrown.
    How can I commit all newly created rows?
    It must be possible to created several new rows, before committing if it is possible.
    Some specs:
    JDeveloper 10.1.3.4.0
    using the embedded OC4J server
    JDK
    Thanks,
    Goldhorn

    Which technology are you using?

  • ADF JS API methods not working for the newly created rows in table

    Hi All,
    We need to make sure the focus goes back to the newly created rows first column's first component.
    Used findComponent and findComponentByAbsoulteId and even hard coded the id, but still the methods are returning null.
    Even tried ADFRichTable.getRowKey(index), by passing index as 0 for the first row, still the method is returning null.
    Tried ADFUITable.findComponent(Object scopedId, Object rowKey), but unable to pass client side rowKey as the above method is returning null.
    All our requirement is to make the focus back to the first row's component when the user clicks on the cancel button instead of save button. Appreciate your help. Thanks.
    P.S.: Rows will be created using CreateInsert method.
    JDEV Version: 11.1.2.0.0 and Table is in a region and we are using UI Shell Tab Template to launch regions.
    Raja.
    Edited by: RajaRamasamy on Feb 10, 2013 4:30 PM
    Edited by: RajaRamasamy on Feb 10, 2013 4:30 PM

    Thanks Frank,
    But some times even we use findComponentByAbsoulteLocator, its not working. So i followed the approach where you will get the rowID like the below and construct the client ID and pushing the JS to client using Service class. And it worked.
    String rowId = table.getClientRowKeyManager().getClientRowKey(facesContext, table, rowKey);
    But i am worried that even though we hard coded the client and executing the js function from the command button by keeping client listener's type as click, the focus is not setting. And i tried giving the id as tableId[rowIndex]:componentId in the findComponentByAbsoulteLocator.
    Can you let me know is there another way to make focus only using JS on click of command button, where the button does not have any action or actionListener.
    Raja.

  • Hit the exception when editing the value of row key column in a new created row in a table

    1. I created a view object with 2 entity objects (parent table: YARD_FIXED_SLOT - child table: YARD_FIXED_SLOT_DETAIL) and the primary key of child table composes of 2 columns ( one of them is FK: YardFixedSlotDetail.FIXED_SLOT_ID REFERENCES YARD_FIXED_SLOT(FIXED_SLOT_ID)
    SQL queries:
    SELECT YardFixedSlotDetail.FIXED_SLOT_ID,
           YardFixedSlotDetail.MODIFIED_DT,
           YardFixedSlotDetail.SLOT_FROM_N,
           YardFixedSlotDetail.SLOT_TO_N,
           YardFixedSlotDetail.USER_ID,
           YardFixedSlot.BLOCK_M,
           YardFixedSlot.BLOCK_N,
           YardFixedSlot.FIXED_SLOT_ID AS FIXED_SLOT_ID1,
           YardFixedSlot.SECTION_N,
           YardFixedSlot.STATUS_C,
           YardFixedSlot.TERMINAL_C
    FROM  YARD_FIXED_SLOT_DETAIL YardFixedSlotDetail, YARD_FIXED_SLOT YardFixedSlot
    YardFixedSlotDetail.FIXED_SLOT_ID = YardFixedSlot.FIXED_SLOT_ID
    2. I dragged this view object into JSF page as an ediable table and add 'add' button to add a new row to the table. and the handling logic in managed bean is as followed. now one new row can be added succesfully in the table.
        public void processSlotDetailCreation(ActionEvent ae)
            DCBindingContainer bindings = (DCBindingContainer)getBindings();
            DCIteratorBinding dciter = bindings.findIteratorBinding("YardFixedSlotDetailFindAllByBlock1Iterator");
            Row row = dciter.getCurrentRow();
            //get the last row for the index and create a new row for the //user to edit
            Row lastRow = dciter.getNavigatableRowIterator().last();
            YardFixedSlotDetailFindAllByBlockRowImpl newRow = (YardFixedSlotDetailFindAllByBlockRowImpl)dciter.getNavigatableRowIterator().createRow();
            newRow.setFixedSlotId(new Integer(21));
            newRow.setUserId("adftest");
            newRow.setModifiedDt(new Timestamp(System.currentTimeMillis()));
            //bug exist here
            newRow.setSlotFromN(new Integer(1));
            //newRow.setSlotToN(new Integer(1));
            newRow.setNewRowState(Row.STATUS_INITIALIZED);
            int lastRowIndex = dciter.getNavigatableRowIterator().getRangeIndexOf(lastRow);
            dciter.getNavigatableRowIterator().insertRowAtRangeIndex( lastRowIndex+1, newRow);
            // make the new row the current row of the table
            dciter.setCurrentRowIndexInRange(lastRowIndex);
            dciter.setCurrentRowWithKey(newRow.getKey().toStringFormat(true));
            //table should have its displayRow attribute set to //"selected"
           // AdfFacesContext.getCurrentInstance().addPartialTarget(slotDetailsTable);
    3. When filling in a new value for SlotFromN column (note that SlotFromN column and FixedSlotId column are the rowKey), hit the exception below:
    [2013-12-04T13:04:28.866+08:00] [DefaultServer] [ERROR] [] [oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter] [tid: [ACTIVE].ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: eb5e281b-6b07-4c17-987e-049792c97dda-000001bf,0] [APP: YPCApp] [DSID: 0000KAvzIaA5qYWFLzmJOA1IbdqZ000003] ADF_FACES-60096:Server Exception during PPR, #7[[
    oracle.jbo.InvalidOperException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-34014. Error message parameters are {0=oracle.jbo.Key[21 null ], 1=root}
    at oracle.jbo.uicli.binding.JUCtrlHierBinding.bringNodeToRangeKeyPath(JUCtrlHierBinding.java:859)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding.bringNodeToRangeKeyPath(FacesCtrlHierBinding.java:122)
    at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowKey(RowDataManager.java:131)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowKey(FacesCtrlHierBinding.java:951)
    at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:527)
    at org.apache.myfaces.trinidad.component.UIXTable.setRowKey(UIXTable.java:760)
    at oracle.adfinternal.view.faces.renderkit.rich.TableRendererUtils._processStampedChildrenForActiveRow(TableRendererUtils.java:2950)
    at oracle.adfinternal.view.faces.renderkit.rich.TableRendererUtils.processFacetsAndChildrenForClickToEdit(TableRendererUtils.java:1604)
    at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.processFacetsAndChildrenForClickToEdit(TableRenderer.java:352)
    at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.decodeChildren(TableRenderer.java:193)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1347)
    at org.apache.myfaces.trinidad.component.UIXCollection.processDecodes(UIXCollection.java:226)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at oracle.adf.view.rich.component.fragment.UIXRegion.decodeChildrenImpl(UIXRegion.java:605)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXForm.processDecodes(UIXForm.java:75)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1365)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1351)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:1124)
    at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1176)
    at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:933)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1574)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:416)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:303)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:208)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:225)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3367)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3333)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
    4. I think problem maybe is related with row key, but I need end user to change rowkey column value. does it allow changing the value of column as row key? I found this problem maybe only occur for new created row. For those existing rows, even I change the value of row key column, no such problem occurred, how do I handle this situation?
    Appriciate if anybody can help.

    Hi Bangaram,
    Thank you for your reply. 
    The error: "Root cause error code is JBO-34014. Error message parameters are {0=oracle.jbo.Key[21 null ], 1=root} "
    I didn't create master records, I just used joint queries for information display of both master and detail. I am trying to create a row in the UI table to create a new detail record and master record already exists.
    The row key for new added row in UI rich table is [21 null ], row key of detail records table composes of 2 columns. 21 is for FixedSlotId and null is for SlotFromN. when I provide a new value for SlotFromN column in UI rich table, problem will occur.

  • Creating row in a recursive view having read-only attribute

    Hi All,
    I am using Oracle JDeveloper 11g Release 2.
    I have a view AppMenusVO with the participation of following entities:
    1. AppMenusEO *(Updateable)* with columns like MenuId, MenuName, MenuIcon, MenuParentId, MenuTaskflowId
    2. AppTaskflowsEO *(Reference)* with columns as TaskflowId, TaskflowName, and TaskflowURL
    3. AppMenusEO as ParentMenus *(Reference)* with columns as ParentMenuId, ParentMenuName
    Next I created a One..Many view link where source and destination entity is the AppMenusVO based on relation (MenuId=MenuParentId). The name of the view accessor is MenuChildren.
    This view is used to create af:treeTable component on the adf page. In order to create new row I am following the blog entry at http://jobinesh.blogspot.com/2010/05/crud-operations-on-tree-table.html.
    I created a business method in the application module with the following specification:
        public void createMenuChildren(RowIterator ri, Key selectedNodeKey) {
            if (ri != null && selectedNodeKey != null) {
                Row[] found = ri.findByKey(selectedNodeKey, 1);
                if (found != null && found.length == 1) {
                    System.out.println("Node found for : " + selectedNodeKey + " Parent Id : " +
                                       found[0].getAttribute("MenuParentId"));
                    Row foundRow = found[0];
                    RowSet childRows = (RowSet)foundRow.getAttribute("MenuChildren");
                    while (childRows.hasNext()) {
                        Row r = childRows.next();
                        System.out.println(r.getAttribute("MenuName"));
                    Row childrow = childRows.createRow();
                    childrow.setAttribute("MenuParentId", foundRow.getAttribute("MenuParentId"));
                    childRows.insertRow(childrow);
                } else {
                    System.out.println("Node not Found for " + selectedNodeKey);
        }When I invoke this method from the adf page it is giving the exception An attemp is made to validate an already invalid region site.
    The Jdeveloper console is also throwing the exception oracle.jbo.ReadOnlyAttrException: JBO-27008: Attribute ParentMenuName in view object AppMenusVO_MenuChildren_ParentMenusVL_AppMenusVO cannot be set.
    I searched Google and OTN but unable to resolve the error.
    The solution I have tried are:
    The default activity on the BTF is marked and is pointing to a valid view.
    Set the activation property of region to immediate ... etc.
    BUT the issue persists.
    Any help to create row programmatically in recursive view where some of the attributes are read-only?
    Thanks in advance
    Best Regards
    Bilal

    Hi Frank,
    Thanks for the response.
    The updateable property of ParentMenuName attribute is Never and is being disabled so I am unable to change its value. Moreover, never in my code I am changing value of this field. What I am doing is trying to create a new row and then insert it into rowset. I don't know how to proceed further.
    One more thing is that I have an LOV on another column MenuParentId which returns value in this field as well. It might be the reason? ...
    Any help will be highly appreciated.
    Thanks
    Regards
    Bilal

  • The newly created row cannot be found with another view

    I'm building a JSP client based on BC.
    I have 2 views based on the single entity.
    I'm creating a new row with one view and want to edit the corresponding row with the other view without intermediate commit.
    However, the last view cannot find the new row.
    For the purpose I get the newly created row's key and trying to find the row at the other view by it's RowKey with the tag <jbo:Row>. Now I have an exception:
    oracle.jbo.JboException: Row was not found using request parameter ...
    Can someone give an advice, please?

    Hi,
    I was a little uncertain. I do not have any view associations in this case.
    I've tried to use " .setAssociationConsistent(true)" - dosen't help.
    I've just changed the standard wizard-generated Browse-Edit UIX/JSP form in such way that I'm using one VO for the browse-table jsp, and some other VO for editing jsp. The editing jsp is by itself divided into a number of tabs.
    Every tab of the editing jsp is based on a specific VO and all of the VOs are based on the single Entity Object to the one table.
    While I am editing the existing records in the table everything goes right, but if I create a new row via the browse page and then try to edit it, I have the exception:
    " Row was not found using request parameter: .... " This thread is continued in another post
    Re: ORA-03113 end of file on communication channel error
    There is a bug with hanlding of viewlink-consistency and DBsequence in Jdev 9.0.2 that leads to this issue as discussed in the other thread.

  • Retain newly created rows after page navigation.

    Hello,
    I have designed two pages. On First page I have to create multiple rows and to assign some values I need to open another page.
    The problem is once we create new rows on view object and if we redirect to any other page its view object is automatically executed and newly created rows will not be retained.!
    I have tested redirection using both methods with retain AM to True, but its not working.
    pageContext.forwardImmediately("page",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null, null, true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    pageContext.setForwardURL("page",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null, null, true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    Please suggest something....
    Thanks,
    Swati

    Hi Krithika, Thanks for replying...
    Krithika wrote:
    If you want to create new row in table and commit to the db, please find this sample:
    http://andrejusb.blogspot.com/2009/11/crud-operations-in-oracle-adf-11g-table.html
    This is done automatically when user clicks on commit button on ADF create form, rows gets commited in database.
    I just need to display these newly created rows on ADF table on the same page below commit button.
    Can you give more details about your usecase..?
    What happens when the same user comes back after closing the session? Do you want still show the blank page/table with out any previous data created by the same user..? If yes, what happens to the previously stored data..?
    Basically, give a brief note on what you are trying to achieve..?
    When user comes back to this page after closing this session, it will not show any rows in the ADF table.
    user will enter new values to create new rows and this time again on click of commit button the newly row created for this session should be shown.
    The previously created rows are already commited to database table
    Hope I am able to explain the requirement. Please let me know for any questions on requirement
    Regards,
    Tanveer

  • Creating a adf page based on webservice data control

    hello
    i am using latest version of jdev 11g from otn.
    i created a VO based on EO and define a view criteria as well. i added that to a AM and exposed it as web service and deployed to a wls server.
    now i wish to created a adf page based on it so i created a ws data control based on the wsdl.
    in the data control section now i see service as findSearchOrder. When i try to drop it on the page it created a adf form with two input boxes findControl and findCriteria.
    So, I am not able to understand how exactly these are going to map to the actual search parameters?
    Please advise

    If you want to retrieve all records, you can set them to null.
    But of course, it depends on what you want to archive (I suppose you want a search form?).
    Please give us your complete JDev version. (Help > About > About tab)

  • Jbo 25017 error while create row

    Hi ,
    jbo 25017 error while creating row
    Getting The above error message which updating Master Detail Page
    Krishna

    Hi Ajay ,
    Posting the EOImpl File
    Method specified in bold is greturning line number as 0..Please check
    public class AplShipmentsEOImpl extends OAEntityImpl {
    /**Gets the attribute value for OtherShipReason, using the alias name OtherShipReason
    public String getOtherShipReason() {
    return (String)getAttributeInternal(OTHERSHIPREASON);
    /**Sets <code>value</code> as the attribute value for OtherShipReason
    public void setOtherShipReason(String value) {
    setAttributeInternal(OTHERSHIPREASON, value);
    /**Gets the attribute value for ForeignShipment, using the alias name ForeignShipment
    public String getForeignShipment() {
    return (String)getAttributeInternal(FOREIGNSHIPMENT);
    /**Sets <code>value</code> as the attribute value for ForeignShipment
    public void setForeignShipment(String value) {
    setAttributeInternal(FOREIGNSHIPMENT, value);
    /**Gets the attribute value for ZoneName, using the alias name ZoneName
    public String getZoneName() {
    return (String)getAttributeInternal(ZONENAME);
    /**Sets <code>value</code> as the attribute value for ZoneName
    public void setZoneName(String value) {
    setAttributeInternal(ZONENAME, value);
    /**Gets the attribute value for PrimeContractNumber, using the alias name PrimeContractNumber
    public String getPrimeContractNumber() {
    return (String)getAttributeInternal(PRIMECONTRACTNUMBER);
    /**Sets <code>value</code> as the attribute value for PrimeContractNumber
    public void setPrimeContractNumber(String value) {
    setAttributeInternal(PRIMECONTRACTNUMBER, value);
    /**getAttrInvokeAccessor: generated method. Do not modify.
    protected Object getAttrInvokeAccessor(int index,
    AttributeDefImpl attrDef) throws Exception {
    switch (index) {
    case SHIPMENTID:
    return getShipmentId();
    case LASTUPDATEDATE:
    return getLastUpdateDate();
    case LASTUPDATEDBY:
    return getLastUpdatedBy();
    case CREATIONDATE:
    return getCreationDate();
    case CREATEDBY:
    return getCreatedBy();
    case LASTUPDATELOGIN:
    return getLastUpdateLogin();
    case APPROVALSTATUS:
    return getApprovalStatus();
    case PROJECTID:
    return getProjectId();
    case TASKID:
    return getTaskId();
    case EXPORGID:
    return getExpOrgId();
    case EXPTYPEID:
    return getExpTypeId();
    case APPROVERID:
    return getApproverId();
    case APPROVEDDATE:
    return getApprovedDate();
    case REJECTIONCOMMENTS:
    return getRejectionComments();
    case EXPCTRLAPPRVID:
    return getExpCtrlApprvId();
    case EXPCTRLAPPRVDATE:
    return getExpCtrlApprvDate();
    case EXPREJECTCOMMENTS:
    return getExpRejectComments();
    case SHIPMENTREASON:
    return getShipmentReason();
    case CLASSIFICATION:
    return getClassification();
    case HAZARDMATLIND:
    return getHazardMatlInd();
    case DCN:
    return getDcn();
    case SHIPTOADDRID:
    return getShipToAddrId();
    case SHIPTOATTN:
    return getShipToAttn();
    case SHIPTOATTNPHONE:
    return getShipToAttnPhone();
    case PUBLICDOMAININD:
    return getPublicDomainInd();
    case ENDUSERADDRID:
    return getEndUserAddrId();
    case PARTYSCREENFLAG:
    return getPartyScreenFlag();
    case PROGNAME:
    return getProgName();
    case PROGMGRID:
    return getProgMgrId();
    case EXPORTPURPDESC:
    return getExportPurpDesc();
    case EXPORTAUTHCODE:
    return getExportAuthCode();
    case DESTCTRLSTMT:
    return getDestCtrlStmt();
    case RMANBR:
    return getRmaNbr();
    case PRIMECONTRACTNBR:
    return getPrimeContractNbr();
    case DESTINATIONDATE:
    return getDestinationDate();
    case SHIPMENTWEIGHT:
    return getShipmentWeight();
    case EXPECTEDRETURNDATE:
    return getExpectedReturnDate();
    case RETURNPAPERWORKIND:
    return getReturnPaperworkInd();
    case PICKUPBUILDING:
    return getPickupBuilding();
    case ROOMNUMBER:
    return getRoomNumber();
    case PICKUPAVAILABILITYTIME:
    return getPickupAvailabilityTime();
    case PRIMARYPOCID:
    return getPrimaryPocId();
    case SPECIALINSTRUCTIONS:
    return getSpecialInstructions();
    case RECEIPTBACKOUTIND:
    return getReceiptBackoutInd();
    case SHIPMENTCOST:
    return getShipmentCost();
    case SHIPCLERKID:
    return getShipClerkId();
    case PACKINGCLERKID:
    return getPackingClerkId();
    case DATESHIPPED:
    return getDateShipped();
    case UNNUMBER:
    return getUnNumber();
    case SHIPDESCRIPTION:
    return getShipDescription();
    case PACKCLERKNOTES:
    return getPackClerkNotes();
    case GOVTBOL:
    return getGovtBol();
    case TOTALNOOFPIECES:
    return getTotalNoOfPieces();
    case IATAHAZARDCODE:
    return getIataHazardCode();
    case SHIPCARRIER:
    return getShipCarrier();
    case PROPVARIFICATIONBY:
    return getPropVarificationBy();
    case SHIPCARRIERSRVLVL:
    return getShipCarrierSrvLvl();
    case OTHERSHIPREASON:
    return getOtherShipReason();
    case FOREIGNSHIPMENT:
    return getForeignShipment();
    case ZONENAME:
    return getZoneName();
    case PRIMECONTRACTNUMBER:
    return getPrimeContractNumber();
    case MAXLINENUM:
    return getMaxLineNum();
    case APLAPPROVERSEO1:
    return getAplApproversEO1();
    case APLSHIPDETAILSEO:
    return getAplShipDetailsEO();
    case APLAPPROVERSEO:
    return getAplApproversEO();
    case APLSHIPLINESEO:
    return getAplShipLinesEO();
    case HRALLORGANIZATIONUNITSEO:
    return getHrAllOrganizationUnitsEO();
    case APLPOCEO:
    return getAplPocEO();
    case POPROJECTSEO:
    return getPoProjectsEO();
    default:
    return super.getAttrInvokeAccessor(index, attrDef);
    /**setAttrInvokeAccessor: generated method. Do not modify.
    protected void setAttrInvokeAccessor(int index, Object value,
    AttributeDefImpl attrDef) throws Exception {
    switch (index) {
    case SHIPMENTID:
    setShipmentId((Number)value);
    return;
    case LASTUPDATEDATE:
    setLastUpdateDate((Date)value);
    return;
    case LASTUPDATEDBY:
    setLastUpdatedBy((Number)value);
    return;
    case CREATIONDATE:
    setCreationDate((Date)value);
    return;
    case CREATEDBY:
    setCreatedBy((Number)value);
    return;
    case LASTUPDATELOGIN:
    setLastUpdateLogin((Number)value);
    return;
    case APPROVALSTATUS:
    setApprovalStatus((String)value);
    return;
    case PROJECTID:
    setProjectId((Number)value);
    return;
    case TASKID:
    setTaskId((Number)value);
    return;
    case EXPORGID:
    setExpOrgId((Number)value);
    return;
    case EXPTYPEID:
    setExpTypeId((Number)value);
    return;
    case APPROVERID:
    setApproverId((Number)value);
    return;
    case APPROVEDDATE:
    setApprovedDate((Date)value);
    return;
    case REJECTIONCOMMENTS:
    setRejectionComments((String)value);
    return;
    case EXPCTRLAPPRVID:
    setExpCtrlApprvId((Number)value);
    return;
    case EXPCTRLAPPRVDATE:
    setExpCtrlApprvDate((Date)value);
    return;
    case EXPREJECTCOMMENTS:
    setExpRejectComments((String)value);
    return;
    case SHIPMENTREASON:
    setShipmentReason((String)value);
    return;
    case CLASSIFICATION:
    setClassification((String)value);
    return;
    case HAZARDMATLIND:
    setHazardMatlInd((String)value);
    return;
    case DCN:
    setDcn((String)value);
    return;
    case SHIPTOADDRID:
    setShipToAddrId((Number)value);
    return;
    case SHIPTOATTN:
    setShipToAttn((String)value);
    return;
    case SHIPTOATTNPHONE:
    setShipToAttnPhone((String)value);
    return;
    case PUBLICDOMAININD:
    setPublicDomainInd((String)value);
    return;
    case ENDUSERADDRID:
    setEndUserAddrId((Number)value);
    return;
    case PARTYSCREENFLAG:
    setPartyScreenFlag((String)value);
    return;
    case PROGNAME:
    setProgName((String)value);
    return;
    case PROGMGRID:
    setProgMgrId((Number)value);
    return;
    case EXPORTPURPDESC:
    setExportPurpDesc((String)value);
    return;
    case EXPORTAUTHCODE:
    setExportAuthCode((String)value);
    return;
    case DESTCTRLSTMT:
    setDestCtrlStmt((String)value);
    return;
    case RMANBR:
    setRmaNbr((String)value);
    return;
    case PRIMECONTRACTNBR:
    setPrimeContractNbr((String)value);
    return;
    case DESTINATIONDATE:
    setDestinationDate((Date)value);
    return;
    case SHIPMENTWEIGHT:
    setShipmentWeight((Number)value);
    return;
    case EXPECTEDRETURNDATE:
    setExpectedReturnDate((Date)value);
    return;
    case RETURNPAPERWORKIND:
    setReturnPaperworkInd((String)value);
    return;
    case PICKUPBUILDING:
    setPickupBuilding((String)value);
    return;
    case ROOMNUMBER:
    setRoomNumber((String)value);
    return;
    case PICKUPAVAILABILITYTIME:
    setPickupAvailabilityTime((Date)value);
    return;
    case PRIMARYPOCID:
    setPrimaryPocId((Number)value);
    return;
    case SPECIALINSTRUCTIONS:
    setSpecialInstructions((String)value);
    return;
    case RECEIPTBACKOUTIND:
    setReceiptBackoutInd((String)value);
    return;
    case SHIPMENTCOST:
    setShipmentCost((Number)value);
    return;
    case SHIPCLERKID:
    setShipClerkId((Number)value);
    return;
    case PACKINGCLERKID:
    setPackingClerkId((Number)value);
    return;
    case DATESHIPPED:
    setDateShipped((Date)value);
    return;
    case UNNUMBER:
    setUnNumber((String)value);
    return;
    case SHIPDESCRIPTION:
    setShipDescription((String)value);
    return;
    case PACKCLERKNOTES:
    setPackClerkNotes((String)value);
    return;
    case GOVTBOL:
    setGovtBol((String)value);
    return;
    case TOTALNOOFPIECES:
    setTotalNoOfPieces((Number)value);
    return;
    case IATAHAZARDCODE:
    setIataHazardCode((String)value);
    return;
    case SHIPCARRIER:
    setShipCarrier((String)value);
    return;
    case PROPVARIFICATIONBY:
    setPropVarificationBy((Number)value);
    return;
    case SHIPCARRIERSRVLVL:
    setShipCarrierSrvLvl((String)value);
    return;
    case OTHERSHIPREASON:
    setOtherShipReason((String)value);
    return;
    case FOREIGNSHIPMENT:
    setForeignShipment((String)value);
    return;
    case ZONENAME:
    setZoneName((String)value);
    return;
    case PRIMECONTRACTNUMBER:
    setPrimeContractNumber((String)value);
    return;
    case MAXLINENUM:
    setMaxLineNum((Number)value);
    return;
    default:
    super.setAttrInvokeAccessor(index, value, attrDef);
    return;
    /**Gets the associated entity PoProjectsEOImpl
    public PoProjectsEOImpl getPoProjectsEO() {
    return (PoProjectsEOImpl)getAttributeInternal(POPROJECTSEO);
    /**Sets <code>value</code> as the associated entity PoProjectsEOImpl
    public void setPoProjectsEO(PoProjectsEOImpl value) {
    setAttributeInternal(POPROJECTSEO, value);
    /**Gets the associated entity AplApproversEOImpl
    public AplApproversEOImpl getAplApproversEO() {
    return (AplApproversEOImpl)getAttributeInternal(APLAPPROVERSEO);
    /**Sets <code>value</code> as the associated entity AplApproversEOImpl
    public void setAplApproversEO(AplApproversEOImpl value) {
    setAttributeInternal(APLAPPROVERSEO, value);
    /**Gets the associated entity HrAllOrganizationUnitsEOImpl
    public HrAllOrganizationUnitsEOImpl getHrAllOrganizationUnitsEO() {
    return (HrAllOrganizationUnitsEOImpl)getAttributeInternal(HRALLORGANIZATIONUNITSEO);
    /**Sets <code>value</code> as the associated entity HrAllOrganizationUnitsEOImpl
    public void setHrAllOrganizationUnitsEO(HrAllOrganizationUnitsEOImpl value) {
    setAttributeInternal(HRALLORGANIZATIONUNITSEO, value);
    /**Gets the associated entity AplPocEOImpl
    public AplPocEOImpl getAplPocEO() {
    return (AplPocEOImpl)getAttributeInternal(APLPOCEO);
    /**Sets <code>value</code> as the associated entity AplPocEOImpl
    public void setAplPocEO(AplPocEOImpl value) {
    setAttributeInternal(APLPOCEO, value);
    /**Gets the associated entity AplApproversEOImpl
    public AplApproversEOImpl getAplApproversEO1() {
    return (AplApproversEOImpl)getAttributeInternal(APLAPPROVERSEO1);
    /**Sets <code>value</code> as the associated entity AplApproversEOImpl
    public void setAplApproversEO1(AplApproversEOImpl value) {
    setAttributeInternal(APLAPPROVERSEO1, value);
    /**Gets the associated entity oracle.jbo.RowIterator
    public RowIterator getAplShipDetailsEO() {
    return (RowIterator)getAttributeInternal(APLSHIPDETAILSEO);
    /**Gets the associated entity oracle.jbo.RowIterator
    public RowIterator getAplShipLinesEO() {
    return (RowIterator)getAttributeInternal(APLSHIPLINESEO);
    public static ShipmentEntityExpert getShipmentEntityExpert (OADBTransaction txn)
    return (ShipmentEntityExpert)txn.getExpert(AplShipmentsEOImpl.getDefinitionObject());
    } // end getShipmentEntityExpert()
    /**Gets the attribute value for MaxLineNum, using the alias name MaxLineNum
    public Number getMaxLineNum()
    OADBTransaction transaction = (OADBTransaction)getOADBTransaction();
    *// mMaxLineNum is in its initial state, so we need to check and*
    *// see if we have lines in both the entity cache and in the*
    *// database to find the current maximum.*
    System.out.println("Inside max line");
    *//Number mMaxLineNum = (Number)getAttributeInternal(MAXLINENUM);*
    System.out.println("Inside max line with line "+mMaxLineNum);
    if (mMaxLineNum == null || mMaxLineNum.equals(new Number(-1)))
    System.out.println("line number is null or negative");
    Number tempNum = new Number(0);
    com.sun.java.util.collections.Iterator fastCacheIterator =
    AplShipLinesEOImpl.getDefinitionObject().getAllEntityInstancesIterator(getDBTransaction());
    System.out.println("line EO "+tempNum);
    while (fastCacheIterator.hasNext())
    System.out.println("inside while loop");
    AplShipLinesEOImpl cachedLine = (AplShipLinesEOImpl)fastCacheIterator.next();
    Number currentShipmentId = getShipmentId();
    Number cachedShipmentId = cachedLine.getShipmentId();
    System.out.println("shipment id is "+currentShipmentId+ "cached id "+cachedShipmentId);
    *// If we find a match for this line, check the shipment number. Remember*
    *// that the cache includes shipments for many lines.*
    if ((cachedShipmentId != null) && (cachedShipmentId.compareTo(currentShipmentId) == 0 ))
    System.out.println("cached is not null inside if ");
    tempNum = cachedLine.getLineNbr();
    System.out.println("gettin line number temp num "+tempNum);
    *// resetLineNum( ) will test the value to see if it's the current max,*
    *// and if it is, set it on our private EO transient attribute.*
    if (tempNum != null)
    System.out.println("reset temp num");
    resetLineNum(tempNum);
    System.out.println("checking Entiry State "+getEntityState());
    *// Now check the database if the header EO isn't new (if it is, we haven't*
    *// saved it so we can't have a line in the database)*
    if (getEntityState() != STATUS_NEW)
    System.out.println("inside entity state");
    ShipmentEntityExpert poExpert = getShipmentEntityExpert(transaction);
    System.out.println("taken Entiry Expert Class");
    AplMaxPoLineVVOImpl maxLineVO =
    *(AplMaxPoLineVVOImpl)poExpert.findValidationViewObject("AplMaxPoLineVVO1");*
    System.out.println("getting Line instance");
    maxLineVO.initQuery(getShipmentId());
    System.out.println("line query initialised");
    if (maxLineVO != null)
    System.out.println("line VO is not null");
    tempNum = (Number)maxLineVO.first().getAttribute(0);
    System.out.println("line tempNum"+tempNum);
    if (tempNum != null)
    System.out.println("line tempNum1"+tempNum);
    resetLineNum(tempNum);
    System.out.println("returing max line num");
    return mMaxLineNum;//(Number)getAttributeInternal(MAXLINENUM);
    *} // end getMaxLineNum()*
    * Increments the maximum lineNum.
    * <p>
    * @return current maximum lineNum + 1
    public Number getNextLineNum()
    System.out.println("In header New Line");
    Number currentMaxLineNum = getMaxLineNum();
    System.out.println("current max line num is "+currentMaxLineNum);
    resetLineNum(currentMaxLineNum.add(new Number(1)));
    System.out.println("returning max number");
    return getMaxLineNum();
    } // end getNextLineNum()
    * Resets the maximum line number whenever newLineNum > mMaxLineNum.
    * <p>
    * @param newLineNum the value to be compared against the current
    * mMaxLineNum for this purchase order.
    public void resetLineNum(Number newLineNum)
    // Number mMaxLineNum = (Number)getAttributeInternal(MAXLINENUM);
    System.out.println("inside reset LIne wiht "+newLineNum);
    if (newLineNum.compareTo(mMaxLineNum) == 1)
    System.out.println("setting to new "+newLineNum);
    setMaxLineNum(newLineNum);
    } // end resetLineNum()
    private void setMaxLineNum(Number lineNum)
    setAttributeInternal(MAXLINENUM, lineNum);
    } // end setMaxLineNum()
    krishna

  • Javascript error while creating rows dynamically (IE)

    hi all,
    as per the requirement i am creating rows dynamically by createElement() method ...
    when i load the page method where i am creating the rows is called on onLoad ... bring the data required .. some method code like this ...
    function createRows()
    var myTable = document.getElementById("itemTable");
              var tBody = myTable.getElementsByTagName('tbody')[0];
              alert(tBody);
              var td;
              var classVar;
              var browser = navigator.appName;
              if(browser=="Microsoft Internet Explorer")
                   classVar = "className";
              }else{
                   classVar = "class";
              <%
              Set keyset = checklistItems.keySet();
              Iterator keySetIterator = keyset.iterator();
              while(keySetIterator.hasNext())
                   String checklistType = (String)keySetIterator.next();
                   %>
                   if ((type == "Show_All") || (type == '<%=checklistType%>'))
                                  var newTypeTR = document.createElement('tr');
                                  var newTypeTD = document.createElement('td');
                                  newTypeTD.setAttribute("width","100%");
                                  newTypeTD.setAttribute(classVar,"font_black_s_bold");
                                  if(browser=="Microsoft Internet Explorer")
                                       newTypeTD.innerText = '<%= checklistType %>';
                                  else
                                       newTypeTD.innerHTML = '<%= checklistType %>';
                                  newTypeTR.appendChild (newTypeTD);
                                  newTypeTR.setAttribute(classVar,"td5");
                                  tBody.appendChild (newTypeTR);
    table is defined in jsp like
    <table width="727" cellSpacing="0">
                   <tr>
                        <td>
                             <div id="checklist_item_div">
                                  <table border="0" id='itemTable' width="100%" cellPadding="4" cellSpacing="0">     
                                  <tbody>
                                       <tr>
                                       </tr>     
                                  </tbody>
                                  </table>
                             </div>
                        </td>
                   </tr>
    </table>
    Now i have a combo box on my page , where onchange i am bringing new data using ajax to fill ....
    and now i want to flush all the rows i created earlier ...and again call the same method as above to create the rors and cols dynamically ...
    so after ajax call my script code to flush all rows and cols like
    var browser=navigator.appName;
                        if(browser=="Microsoft Internet Explorer")
                             itmTable.innerText = "<tbody></tbody>";
                        else
                             itmTable.innerHTML = "<tbody> </tbody>";
    but when i call the createRows function after this , i got the error on the line
    tBody.appendChild (newTypeTR);
    as tBody now getting as undefined .... this problem is with IE (working on IE 7.0)
    works very fine on firefox and safari browsers ...
    please helm me out ...
    Edited by: prashant-kadam on Jun 12, 2008 5:22 AM

    what does this have to do with Java?
    hint: Java != Javascript

  • Most recently created row

    We have an error_log table which will log errors after the execution of a stored proc.
    We have a create_time field which stores the time of creation of the new record.
    How can i view the most recently created row? Is the below mentioned query(courtesy of OTN) Ok? Or are there any other better options?
    select err_msg from (select err_msg from err_log order by create_time desc)
    where rownum=1 ;

    That seems to be quite expensive
    SQL> get t
      1  with t as (select 'test' err_msg, sysdate create_time from dual
      2             union all select 'test2' err_msg, sysdate -1 create_time from dual
      3             union all select 'test3' err_msg, sysdate -2 create_time from dual
      4             union all select 'test4' err_msg, sysdate -3 create_time from dual)
      5  select *
      6    from t, (select max(t.create_time) over(order by create_time desc) maxtime
      7               from t) tab
      8   where t.create_time = tab.maxtime
      9*  and rownum = ceil(abs(sin(42)))
    SQL> /
    ERR_M CREATE_TI MAXTIME
    test  17-JAN-08 17-JAN-08
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=14 Card=1 Bytes=22)
       1    0   TEMP TABLE TRANSFORMATION
       2    1     LOAD AS SELECT
       3    2       UNION-ALL
       4    3         FAST DUAL (Cost=2 Card=1)
       5    3         FAST DUAL (Cost=2 Card=1)
       6    3         FAST DUAL (Cost=2 Card=1)
       7    3         FAST DUAL (Cost=2 Card=1)
       8    1     COUNT (STOPKEY)
       9    8       HASH JOIN (Cost=6 Card=1 Bytes=22)
      10    9         VIEW (Cost=2 Card=4 Bytes=52)
      11   10           TABLE ACCESS (FULL) OF 'SYS_TEMP_0FD9D7BD6_7502F1D5' (TABLE (TEMP)) (Cost=2 Card=4 Bytes=52)
      12    9         VIEW (Cost=3 Card=4 Bytes=36)
      13   12           WINDOW (SORT) (Cost=3 Card=4 Bytes=36)
      14   13             VIEW (Cost=2 Card=4 Bytes=36)
      15   14               TABLE ACCESS (FULL) OF 'SYS_TEMP_0FD9D7BD6_7502F1D5' (TABLE (TEMP)) (Cost=2 Card=4 Bytes=52)
    Statistics
              2  recursive calls
              8  db block gets
              8  consistent gets
              1  physical reads
            648  redo size
            683  bytes sent via SQL*Net to client
            660  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>But if you code it a little bit trickier, it suddenly costs "nothing"
    SQL> get t
      1  with t as (select 'test' err_msg, sysdate create_time from dual
      2             union all select 'test2' err_msg, sysdate -1 create_time from dual
      3             union all select 'test3' err_msg, sysdate -2 create_time from dual
      4             union all select 'test4' err_msg, sysdate -3 create_time from dual)
      5  select *
      6    from  (select err_msg, create_time, row_number() over(order by create_time desc) rn
      7               from t) tab
      8*  where rn = ceil(abs(sin(42)))
    SQL> /
    ERR_M CREATE_TI         RN
    test  17-JAN-08          1
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=9 Card=4 Bytes=104)
       1    0   VIEW (Cost=9 Card=4 Bytes=104)
       2    1     WINDOW (SORT PUSHED RANK) (Cost=9 Card=4 Bytes=52)
       3    2       VIEW (Cost=8 Card=4 Bytes=52)
       4    3         UNION-ALL
       5    4           FAST DUAL (Cost=2 Card=1)
       6    4           FAST DUAL (Cost=2 Card=1)
       7    4           FAST DUAL (Cost=2 Card=1)
       8    4           FAST DUAL (Cost=2 Card=1)
    Statistics
              1  recursive calls
              0  db block gets
              0  consistent gets
              0  physical reads
              0  redo size
            673  bytes sent via SQL*Net to client
            660  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>

  • How to make sure newly created row is editable by default programatically

    Hi All,
    I got a problem with creating new row in single row selection table with on click property enabled for editing mode.
    Function requirement is like: I have Mater-Detail. While creating detail lines, line has to be created with default line number. Eg: Master1 can have line numbers 1,2,3..etc, Master2 can have 1,2,3.. etc.
    In applicationTable for Pattern Create
    Action Listener=”#{CreateAndEditFiscalDocumentBean.createChargeLine}”
    In Table rowSelection="single" and editingMode="clickToEdit"
    Here the problem is:
    When I first come to the page,the first row in the detail table is editable and could able to edit any other row on click . But When I create a new row , I got a new row with line number but it is not editable.
    I want it to be editable on create and previously selected row should be read only. I have tried several ways but nothing is working.
    My observation is, when I call the bean method in Action Listener of application Table in create patteren, I am facing this problem. If I do not call this method, it is working as expected. But I need to call this method because it has to create row with line number.
    I am putting below two scenarios which I have tried. I am not successful in the both the scenarios.
    Could you please help me in achieving expected functionality.
    Many thanks in advance for your time and help.
    Scenario 1:
    Jsff:
    ApplicationTable: createActionListener="#{CreateAndEditFiscalDocumentBean.createChargeLine}"
    Table: rowSelection="single", editingMode="clickToEdit"
    Bean Code:
    public void createChargeLine(ActionEvent actionEvent) {
    FacesContext fc = FacesContext.getCurrentInstance();
    ExpressionFactory factory = fc.getApplication().getExpressionFactory();
    MethodExpression method=factory.createMethodExpression(fc.getELContext(),"#{bindings.createChargeLine1.execute}",String.class,new Class[]{});
    method.invoke(fc.getELContext(),null);
    AMImpl Code:
    public void createChargeLine() {
    ViewObject itemChargeVO = this.getFiscalDocumentCharges();
    ViewObject fiscalDocumentHeaderVO = this.getFiscalDocumentHeader();
    Row toRow = fiscalDocumentHeaderVO.getCurrentRow();
    Row newRow = null;
    Row latestRow = itemChargeVO.first();
    Integer line_number = new Integer(0);
    int numberOfItemLines = 0;
    if (latestRow != null) {
    RowSet rs = itemChargeVO.getRowSet();
    numberOfItemLines = numberOfItemLines + 1;
    if (rs != null) {
    line_number =
    (Integer)rs.first().getAttribute("LineNumber");
    while (rs.hasNext()) {
    numberOfItemLines = numberOfItemLines + 1;
    Row row = rs.next();
    if (line_number.compareTo((Integer)row.getAttribute("LineNumber")) <
    0)
    line_number =
    (Integer)row.getAttribute("LineNumber");
    line_number = line_number + 1;
    newRow = itemChargeVO.createRow();
    newRow.setAttribute("LineNumber", line_number);
    itemChargeVO.insertRowAtRangeIndex(numberOfItemLines + 1, newRow);
    itemChargeVO.setCurrentRow(newRow);
    } else {
    newRow = itemChargeVO.createRow();
    newRow.setAttribute("LineNumber", new Integer(1));
    itemChargeVO.insertRowAtRangeIndex(0, newRow);
    itemChargeVO.setCurrentRow(newRow);
    Scenario 2:
    Bean method changes:
    public void createChargeLine1(ActionEvent actionEvent) {
    Row newLine = ApplicationsTableEventHandler.getInstance().processCreate(getChargeTable());
    newLine.setAttribute("LineNumber", new Integer(1));
    }

    Hi Jerry,
    Please refer to the following blog and check whether you followed all the steps:
    /people/harikrishna.sunku/blog/2008/12/18/work-center-and-navigation-link-creation-in-crm-2007
    You basically need to ensure that your custom work center is assigned to a navigation bar profile; and this navigation bar profile is assigned to your business role.
    Regards,
    Shiromani

  • Setting focus to inputText of newly created row in af:table

    Using Jdev Ps4
    Simple use case:
    I have an af:table with a few columns and a createInsert button.
    When I press the createInsert button, a new record is added to the table.
    How can I set focus to the first inputText of that newly created row?
    I have been looking for a solution online but all the examples online tell us how to set focus to components that already exist and you know the ID of. With the newly created row, you don't have the ID so you cannot set the focus.
    In this topic (which is quite old...) https://kr.forums.oracle.com/forums/thread.jspa?threadID=643924 Frank Nimphius explained that it would be difficult and he would pass it on to the developers.
    I haven't found any information if there are some enhancements in this area to make this work...
    I tried with using plain old javascript by looping through the dom structure but had no success in doing so...
    Thanks
    Yannick
    Edited by: Yannick Ongena on Apr 2, 2012 8:38 AM

    Yannick,
    can you check this?
    how to get focus on newly created row in table?
    ~Abhijit

  • How to create row through VO?

    Hai,
    I wrote code for creation of Row through ViewObject and i called that method using Mbean. But it is Not at all creating Row. Whether it is right?
    ViewObject as=this;
    Row r2=getViewObject().createRow();
    // Row r2=getCurrentRow();
    r2.setAttribute("Sname", Sname);
    r2.setAttribute("Sid", sid);
    r2.setAttribute("Saddress", Sadd);
    r2.setAttribute("Phoneno", Phoneno);
    r2.setAttribute("Pincode", Pincode);
    r2.setAttribute("Mark", mark);
    this.insertRow(r2);
    How can i modify code to create Row?

    Hi,
    I have created the method in ApplicationModuleImpl class
    I am using Oracle 10g XE ----- HR Schema ----> LOCATIONS table
    I have used the following code :
    ViewObjectImpl vo = getLocationsView1();
    Row r = vo.createRow();
    Integer i = new Integer(4000);
    r.setAttribute("LocationId", i);
    r.setAttribute("StreetAddress", "Test");
    r.setAttribute("PostalCode", "Test");
    r.setAttribute("City", "Test");
    r.setAttribute("StateProvince", "Test");
    r.setAttribute("CountryId", "IT");
    vo.insertRow(r);
    System.out.println("Test");
    this.getDBTransaction().commit();
    It inserted the row.
    you were not able to see the row beacuse of commit. - may be
    The row is not inserted in your case because you have not committed - may be .
    Edited by: Moinak on Mar 4, 2011 5:25 AM
    Edited by: Moinak on Mar 4, 2011 5:26 AM

Maybe you are looking for

  • SQL Date Function

    Hi I have problem regarding date function in the following statment and unable to sort out the real cause as yet, i am not finding any materail for using date function in sql where clause any one can help me why is it. Sector Table Sect_Id Varchar2(2

  • Upgrade video card Touch smart 600

      HP touchsmart600-1390 I would like to upgrade the video card.  Is this possible/ and do i have to upgrade the power supply as well?   The present card is GT 230 Invidia 1GB memory.  Thanks!

  • Convert XSD to POJO

    Hi all, I would like to convert a xml schema file (.xsd) to corresponding JAVA objects without using any 3pps like JAXB or XMLBeans. I can probably write down the POJO (getters and setters) for each element/attribute corresponding to the xsd file. Bu

  • ITunes ask for my password, old password saved

    So every time I access my account in iTunes or attempt to purchase something a prompt comes up that states I have entered the wrong password.  How do I go about saving my password so this won't happen in the future?  Apparently an old version is save

  • [quicktime pro] encode

    Hello, I try to encode a video in mp4 isma. Next I have to play this video with another player (osmo4 gpac). There's no problem with a little resolution of the image (QCIF 176x144) but when I choose CIF 352x288, I can't play the video correctly (good