Creating Rows

Hi,
I need to create empty document and add columns to that from query and add row from another query.
I am able to create document with columns but after that while adding row it wont list the columns.
How can I do this, Pls help me on this regard.
Regards,
Rao

Rao,
Just to clarify, you are dynamically building the column names from one query, and you are using a separate query to fill the rows?  Do you know the column names in advance that you can configure them in the Document action?  This is the easiest way to build an SAP MII Output document.
If you are building the entire document on the fly, it is a bit tricky because the Column names aren't known in advance.  Remember, the Column names become entries within the Row, so you have to build an xpath expression to accomplish this.
Kind Regards,
Diana Hoppe

Similar Messages

  • 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

  • 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

  • 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.

  • [svn:fx-trunk] 8507: Making measureHeightOfItemsUptoMaxHeight consistent with the way we create rows in the datagrid .

    Revision: 8507
    Author:   [email protected]
    Date:     2009-07-10 10:13:11 -0700 (Fri, 10 Jul 2009)
    Log Message:
    Making measureHeightOfItemsUptoMaxHeight consistent with the way we create rows in the datagrid. MakeRow ensures reported row height is round to the nearest integer, measureHeightOfItemsUptoMaxHeight is now consistent.  Fixes a long standing PrintDataGrid issue.
    Bugs: SDK-20237.
    QE Notes: None
    Doc Notes: None
    Reviewer: Glenn/Alex
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-20237
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as

    Well, you could do the following:
    1) Create a stored procedure that assembles the data into a rowset with rows and fields like the format you want.
    2) Create stored procedures that handle insert, update, and delete.
    3) Create an entity object definition with all transient attributes. Make the attributes match the elements of one row.
    4) Override doDML() in the entity object class to call your procedures (the doc explains how to do this). You might also need to do a bit of research and figure out if you need to override some other method so you can report rows with transient attribute changes only as needing posting. (getPostState(), maybe?)
    5) Create a view object definition with entity-derived attributes based on your EO attributes.
    6) Override the appropriate methods to call your data assembly procedure rather than execute a query (this is also in the doc).
    Still kind of kludgy, but it keeps your business components pretty clean, especially if you use framework classes to do most of the work for you. (I have a partial example of how to do that here.) Of course, it keeps your business components clean by moving the real work to the DB, but some people find that more maintainable that a kazillion business components.
    Hope this helps,
    Avrom

  • Creating rows Using BC4J Data Tags

    Hi!
    I want to create rows using BC4J data tags.
    I have 2 jsp pages: one containig forms and one to insert data.
    Is it possible to insert new rows into 2 or more tables?
    How can I differ the attributes to one table and to another?
    How can I do this?
    Thanks!

    The path is:
    Select "File/New" in the menu.
    Select "BC4J JSP" in the gallery.
    Select "Browse & Edit Form" wizard.
    This is in JDeveloper 9.0.2.
    Charles.

  • 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?

  • 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.

  • 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.

  • Editable ALV in OOPs : default value for newly created rows

    <b>I have created editable ALV using OOPs. </b>
    But my requirement is while creating new rows in ALV, one column value should be filled with some default value automatically(as soon as I press create row icon on toolbar)
    Thanks.

    HI HaReSh
    <b>refer to this code below.hope it might help u.</b>
    *& Report  ZTESTDEMO_INTERACTIVE_LIST_2
    REPORT  ZTESTDEMO_INTERACTIVE_LIST_2.
    TABLES: MARA,MARC,MARD.
    * internal table itab_mara 3 fields matnr, ernam,mtart
    DATA: BEGIN OF ITAB_MARA OCCURS 0,
    MATNR LIKE MARA-MATNR,  " material number
    ERNAM LIKE MARA-ERNAM,  " name of person who create
    MTART LIKE MARA-MTART,  " Material Type
    END OF ITAB_MARA.
    * internal table itab_marc 3 fields matnr, werks,lvorm
    DATA: BEGIN OF ITAB_MARC OCCURS 0,
    MATNR LIKE MARC-MATNR,
    WERKS LIKE MARC-WERKS,  " Plant
    LVORM LIKE MARC-LVORM,  " Flag Material for Deletion at Plant Level
    END OF ITAB_MARC.
    * internal table itab_mard 2 fields
    DATA: BEGIN OF ITAB_MARD OCCURS 0,
    MATNR LIKE MARD-MATNR,
    LGORT LIKE MARD-LGORT,  " Storage Location
    END OF ITAB_MARD.
    SELECT-OPTIONS: S_MTART FOR MARA-MTART.
    INITIALIZATION.
    S_MTART-LOW = 'HALB'.
    S_MTART-HIGH = 'HAWA'.
    S_MTART-OPTION = 'BT'.
    APPEND S_MTART.
    START-OF-SELECTION.
    SELECT MATNR ERNAM MTART FROM MARA INTO TABLE ITAB_MARA WHERE MTART IN
    S_MTART.
    PERFORM DISPLAY.
    TOP-OF-PAGE.
    WRITE:/2(15) 'MATERIAL NO',20(20) 'CREATED BY',45(15) 'MATERIAL TYPE'.
    FORM DISPLAY.
    LOOP AT ITAB_MARA.
    WRITE:/ ITAB_MARA-MATNR UNDER 'MATERIAL NO' HOTSPOT ON,ITAB_MARA-ERNAM
    UNDER 'CREATED BY',ITAB_MARA-MTART UNDER 'MATERIAL TYPE'.
    HIDE: ITAB_MARA-MATNR.
    ENDLOOP.
    ENDFORM.
    AT LINE-SELECTION.
    CASE SY-LSIND.
    WHEN 1.
    SELECT MATNR WERKS LVORM FROM MARC INTO TABLE ITAB_MARC WHERE MATNR =
    ITAB_MARA-MATNR.
    PERFORM DISPLAY1.
    WHEN 2.
    SELECT MATNR LGORT FROM MARD INTO TABLE ITAB_MARD WHERE MATNR =
    ITAB_MARC-MATNR.
    PERFORM DISPLAY2.
    when 3.
    sy-lsind = 0.
    ENDCASE.
    FORM DISPLAY1.
    LOOP AT ITAB_MARC.
    WRITE:/ ITAB_MARC-MATNR HOTSPOT ON, ITAB_MARC-WERKS,ITAB_MARC-LVORM.
    HIDE: ITAB_MARC-MATNR.
    ENDLOOP.
    WRITE:/ SY-LSIND.
    ENDFORM.
    FORM DISPLAY2.
    LOOP AT ITAB_MARD.
    WRITE:/ ITAB_MARD-MATNR, ITAB_MARD-LGORT.
    ENDLOOP.
    WRITE:/ SY-LSIND.
    ENDFORM.
    regards
    ravish
    <b>plz reward for useful ans</b>

Maybe you are looking for

  • Error in Form 16 Report

    Hello, I ran the Form 16 report for an employee by inputting the Emp No, Company code, Taxation year and Name of the Layout set as HR_IN_TAXF16000Y. No other inputs. I got the output and when I try to "Print Form", I am getting the below error when I

  • Any body can recommend a free JDBC driver for sql server 7.0

    The microsoft jdbc driver only use on sql server 2000, but my database system is sql server 7.0 Is there anybody can help me? Thanks a lot!

  • Unable to update apps in iOS 8

    I updated my iPad Air to IOS 8 without difficulty, and some apps updated automatically.  Last night all app update downloads failed - just didn't download.  After going through the troubleshooting, still no luck.  The iPad is working fine otherwise. 

  • Default Premiere Settings in Classroom/AD Environment

    Hello Adobe Community, I'm trying to find a way to be able to have customized settings for both sequence settings, preferences, and export in a college lab setting. I've been able to find ways to "embed" export settings in the main export lists, howe

  • How to kick start SAP SRM???

    Hi SRM Gurus.., I am basically a Spend management consultant working on Ariba Analysis., now I am planning to move towards SAP SRM. Please give me tips is it is useful to future career and How to start learning SAP SRM. In particularhow to kicki star