Insert new row to master - detail form using bindingsource

Hi all,
I have a form to analyse price of product, the form include master (textbox:slip ID,datetimepicker : date) and detail(datagridview:slipID,productID,price..)
When I insert new row as below code, all inserted to DB but not show on form, I must close and reopen the form the new row will show, how i must to do to fix it 
please help, thanks
Select data when form load 
ds = New DataSet
damaster = New SqlDataAdapter("select soPTG,ngaybd,ngaykt,khoa = case when sttesign =0 then 'True' else 'False' end from tbl_PTGMaster", conn)
damaster.Fill(ds, "tbl_ptgMaster")
dadet = New SqlDataAdapter("select [SoPTG],[Mahang],[gianhap],[thuesuat],[laigop],[giacu],[giamoi] from tbl_PTGDetail", conn)
dadet.Fill(ds, "tbl_ptgdetail")
ds.Relations.Add("PTG_rel", ds.Tables("tbl_ptgmaster").Columns("SoPTG"), ds.Tables("tbl_ptgdetail").Columns("SoPTG")).ChildKeyConstraint.UpdateRule = Rule.Cascade
BindingMaster.DataSource = ds
BindingMaster.DataMember = "tbl_ptgmaster"
BindingDetail.DataSource = BindingMaster
BindingDetail.DataMember = "PTG_rel"
gridchitiet.DataMember = "tbl_ptgdetail"
txtptgnumb.DataBindings.Add("text", BindingMaster, "soPTG")
dtstart.DataBindings.Add("Text", BindingMaster, "ngaybd")
dtend.DataBindings.Add("Text", BindingMaster, "ngaykt")
cmdlock.DataBinding.Add("Enabled", BindingMaster, "khoa", True, DataSourceUpdateMode.OnPropertyChanged)
setStatus()
SetHeader()
Dim cmdinsert As New SqlCommand("insert into tbl_PTGMaster(SoPTG,ngaybd,ngaykt) values(@SoPTG,@ngaybd,@ngaykt)", conn)
cmdinsert.Parameters.Add("@soPTG", SqlDbType.Char, 10).Value = txtptgnumb.Text
cmdinsert.Parameters.Add("@ngaybd", SqlDbType.DateTime).Value = dtstart.Value
cmdinsert.Parameters.Add("@ngaykt", SqlDbType.DateTime).Value = dtend.Value
damaster.InsertCommand = cmdinsert
damaster.FillSchema(ds, SchemaType.Source)
cmdinsert = New SqlCommand("insert into tbl_PTGDetail(SoPTG,mahang,gianhap) values(@SoPTG,@mahang,@gianhap)", conn)
cmdinsert.Parameters.Add("@SoPTG", SqlDbType.Char, 10).Value = txtptgnumb.Text
cmdinsert.Parameters("@SoPTG").Direction = ParameterDirection.InputOutput
cmdinsert.Parameters.Add("@mahang", SqlDbType.Char, 10, "mahang")
cmdinsert.Parameters.Add("@gianhap", SqlDbType.Decimal, 8, "gianhap")
dadet.InsertCommand = cmdinsert
dadet.FillSchema(ds, SchemaType.Source)
gridchitiet.FinishEditing()
BindingMaster.EndEdit()
damaster.Update(ds, "tbl_PTGMaster")
ds.Tables("tbl_PTGMaster").AcceptChanges()
BindingDetail.EndEdit()
dadet.Update(ds, "tbl_PTGDetail")
ds.Tables("tbl_PTGDetail").AcceptChanges()
BindingMaster.ResetBindings(False)
BindingDetail.ResetBindings(False)

Hello,
The base idea here is if the record is added successfully you would then get the new primary key then manually add the record to the underlying data source. Does not matter if we are talking a single table or a master-detail setup.
The following shows the basics
https://code.msdn.microsoft.com/Adding-new-records-into-bff5eaaf 
All of the above is done without using a DataSet yet the same thing needs to happen with a DataSet, simply focus on the one table.
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

Similar Messages

  • How to create a master detail form using single table

    Hi,
    how to create a master detail form using single table.
    Regards,
    M. Satish

    Hi
    how to create a master detail form using single table.Make the Master ur pks the details the rest of ur data base field in the detail it's a mater of organizing fields on a form M-Detail...
    Now What ?
    Regards,
    Amatu Allah

  • Insert a row in master detail view & jboRowKey parameter

    Hi
    I hava a minor problem.
    On JSP page I have edit form for master view, beyond edit form is browse of detail view. I would like to insert or edit a row on master view and after update and commit, a would like to stay on the same page to insert some rows into detail view.
    When I editing rows it is Ok, becose jboRowKey parameter is always the same (to find proper row on master view).
    Problem appears when I want to Insert a row into master view, becose after transaction is commited, jboRowKey parameter is changed.
    Primary key on master table is sequence and it is inserted by (preinsert) trigger before commit.
    If anybody has some idea to solve this problem, please help.
    Gorazd

    Without knowing exactly the technology you are using, (JDev version, BC4J JSP tags/Components tags?),
    In general with BC4J after you do a commit, you do not necessarily have a record pointer on the new record that you just insert on the master table, so you would have to locate it again.
    Here is one way you could do this.
    After you commit your new inserted record, you could go back to a master "browse" page which shows the records of your master table along with a link to it's corresponding detail page. Encoded in the link you could pass the rowkey of the master record as a parameter and then in the detail page you could locate the master record that was clicked on by using the Find operation of the Row tag. When the master row is located, you automatically would be pointing to the correct detail records.
    In this case since the master was just created, there wouldn't be any detail records yet. You could then create new detail records for the new master..
    Let me know if this helps..
    -Chris

  • Master-Detail Form using Oracle XE...

    Hi ,
    Which type of page (blank , form , ....) should i select in order to create a master - detail form (dept - emp tables on SCOTT schema) in one and just one page (no tabs)...????
    And also . . . is it possible the above form to be used for both inserts , updates and deletes...????
    Many thanks ,
    Simon

    Hi Simon,
    Use form then Master Detail Form.
    You can insert, delete, and update rows.
    http://htmldb.oracle.com/pls/otn/f?p=26372
    for example of Master - Details - Details solution (not a form).
    Konstantin

  • Auto Query in Master Detail Form using dynamic page doesn't work

    I created a Master-Detail form, and implement AutoQuery using a dynamic page
    with the following code :
    <HTML>
    <BODY>
    <ORACLE>DECLARE
    nre_ VARCHAR2(100);
    BEGIN
    nre_ := emp_nre;
    if nre_ is not null then
    net_portal.Popula_Agregados(nre_);
    net_portal.Popula_Docs_Agregados (nre_);
    htp.p('<iframe id=myFrame name="myFrame" frameborder=0 width="250%"
    height="300"
    src="/pls/portal/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=
    3
    388118140&p_arg_names=_show_header&p_arg_values=NO&p_arg_names=_cad_nre_cond&p_a
    rg_values=%3D&p_arg_names=cad_nre&p_arg_values='||nre_||'">
    </iframe>');
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    htp.p(SQLERRM);
    END;
    </ORACLE>
    </BODY>
    </HTML>
    It works fine when we access the first time to the page, but if i press the
    save button after inserting or updating a detail record, the header record is
    lost. How can i avoid this situation ?

    I changed query:
    select
    Replace(
    '<img src="#IMAGE_PREFIX#ed-item.gif" border="0" alt="EditMap" usemap="#editmap***id***"></img>
    <map name="editmap***id***">
    <area shape="rect" coords="0,0,16,16" href="http://apex.oracle.com/pls/otn/f?p=&APP_ID.:'
    || decode ( type, 'FOLDER', '33', '22' )
    || ':&APP_SESSION.::&DEBUG.::P'
    || decode ( type, 'FOLDER', '33', '22' )
    || '_ID,P'
    || decode ( type, 'FOLDER', '33', '22' )
    || '_CALLING_PAGE:' || id || ',&APP_PAGE_ID." ></area></map>' ,
    '***id***', id
    ) Edit,
    id,
    type,
    name,
    decode ( type, 'FOLDER', 33, 22 ) target
    from tThe idea is - each img uses its own map.
    It works now.
    Check:
    http://apex.oracle.com/pls/otn/f?p=20980:13
    Lev
    Edited by: le on Nov 3, 2010 11:11 AM

  • Populate row of master detail form with selection from LOV?

    Hi Guys,
    Total noobe, Hope you can help me out with a project I am working on in Oracle Apex 4.1 with 11g XE
    I am sure this is a simple enough issue but I just can’t see the solution.
    I have a table called ‘STOCK’ this contains all new parts and delivery details.
    ‘STOCK_ID’ NUMBER PK
    ‘DELIVERY DATE ‘ DATE
    ‘PART’ VARCHAR2
    ‘PART_SN’ VARCHAR2
    ‘PART_AN’ VARCHAR2
    ‘INSTALLED’ CHECKBOX
    I have a table that list all the current physical locations of hardware for example
    ID, Till number, store location etc…
    I have an table to list the devices and modification to the hardware in these store locations.
    Move Date, Device, Device Serial number, Device Asset Number, Comments
    I have a report & form that displays all the current physical locations of hardware and a master detail form linked to this to add devices and modifications to each store location.
    I have a LOV setup on the Devices column that is based on a simple select query
    SELECT PART from STOCK
    ORDER BY 1
    This provides me the list of parts in the stock table.
    What I need to figure out is how do I get the data from the ‘STOCK’ table when I select a part in the LOV to auto populate ‘DEVICE_SN’ ‘DEVICE_AN’ in my master detail tubular form. this information is contained in the 'PART_SN' & 'PART_AN' columns of the STOCK table.
    I also need to figure out how to identify the part because by default the LOV only displays one column and I have no idea which part I am selecting other than by name. i could use a popup LOV and scan a barcode into the search box and get the retuen value to display the part name in the field.
    I also would like to reduce the number of records displayed in the LOV by using the ‘INSTALLED’ checkbox i.e. if checked this part has been used and will not be available for selection. The ‘PART_SN’ field can be duplicated as we often get the same part back again as a replacement after repair but this should be valaditated against i.e if the parts is ticked as installed and not available for selection in the list it can be added again this could possibly be validated based on the ‘DELIVERY DATE‘?
    I hope this make some sense to you guys if you need any further details let me know.
    Cheers
    Darren

    Hi,
    I am from the Oracle Forms background too and I have been using Oracle Apex for a while. Oracle Forms is just like client-server application although it uses the Forms servlet to render its Web front-end. I think...if you're really trying to develop true-Web application, you should try to forget such features as "master with many details" in Oracle Forms. Loading all the details in a single page will cause overheads anyway. When you discover more about ajax and such third-party javascript libraries as jquery and mootools, you'll have a different mind of Web development.
    Thanks.
    Andy

  • How to display more rows in Master-detail form

    I am working on APEX3.2.
    I have a master-detail form. The detail form always display 15 rows. However, my customer wants the detail display all the rows. I tries to configure the Number of Rows in the report. It doesn't work. How do I do it?
    Thanks a lot!

    Hi:
    To increase number of rows displayed you have to set Number of Rows and pay attention to both Number of Rows (Item) and Maximum Row Count.
    After that if didn't work, sign out or close the browser then open it again. Sometimes it keeps the value in current session.
    Saad,

  • How to access detail-rows in master-detail form?

    I have a master-detail form(one to many relationship). The master and detail are in separate blocks. The detail rows are displayed in a tabular form.
    I need to access the detail-rows since the database writes for the detail rows will be managed by a procedure.
    I have been looking through the documentation and have been unable to find any syntax for iterating through the detail-rows.
    Any help is appreciated. Thanks.

    go_block(detail)
    first_record;
    in a loop while not last_record
    -- do your stuff
    next_record;
    end loop;

  • About having multiple blank  rows on master detail form

    Can I have multiple blank rows on detail form when I create master detail form?
    please help me
    shuyue

    Let me answer my own question.
    Set the number of rows to 500 and it will dynamically set to the number of rows.

  • Add Row in Master Detail Form

    Hi all,
    I wonder if there is a way to just Add Row in the master detail (tabular) form without actually submitting the page. So if user has updated any existing row before clicking the Add Row button, the update should not be submitted by Add Row button click. If this is possible, then I want to submit (insert) the newly added row as well as any updates made to the existing rows when user click the "apply changes" button.
    Any luck?
    Thanks for the help.
    Milaan

    Hi Andy,
    Thanks for your response. Here is what I am doing... On submit I am calling another page (popup) for user to enter electronic signature. So when they add row (which is a submit), it calls the electronic signature page popup, and only upon entering the signature (nuisance at this point) it adds a row in the tabular form. Is there a way to change this behavior to not to submit the page every time user click Add row button?
    Thnx
    Milaan

  • Unable to create new rows in master detail

    Hi, I am new to ADF
    I am using Jdeveloper 11.1.1.6, I have two tables customer and contacts, customerId is a foriegnKey in contacts. when customer is deleted all the contacts need to be deleted.
    I have created an association (1 to * customer to contacts) between customerEO & contactsEO (checked Composite association, implement cascade delete option), and a view link (1 to * customerVO to contactsVO).
    I am testing the viewlink through AM, not using JSF
    when i am trying to create new row in details(contacts) table, the customer id is populating in details table.
    when i am trying to commit to database (Details table) i am getting the following error
    java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (CONTACT_CUSTOMERID_FK) violated - parent key not found
    ORA-06512: at line 1
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
         at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1111)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3904)
         at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9417)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1512)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:429)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6893)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
         at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
    Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (CONTACT_CUSTOMERID_FK) violated - parent key not found
    ORA-06512: at line 1
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
         at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1111)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
    Can you please help me how to solve this issue
    Thanks & Regards
    Ani
    Edited by: 987691 on Feb 12, 2013 2:50 PM
    Edited by: 987691 on Feb 12, 2013 2:54 PM

    Here is My CustomerEO.xml file_
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
    <!---->
    <Entity
    xmlns="http://xmlns.oracle.com/bc4j"
    Name="CustomerEO"
    Version="11.1.1.61.92"
    InheritPersonalization="true"
    DBObjectType="table"
    DBObjectName="XX_CUSTOMER"
    AliasName="CustomerEO"
    BindingStyle="OracleName"
    UseGlueCode="false"
    xmlns:validation="http://xmlns.oracle.com/adfm/validation"
    RowClass="customer.model.CustomerEOImpl">
    <DesignTime>
    <AttrArray Name="_publishEvents"/>
    <Attr Name="_codeGenFlag2" Value="Init|Access"/>
    <Attr Name="_isCodegen" Value="true"/>
    </DesignTime>
    <Attribute
    Name="Customerid"
    ColumnName="CUSTOMERID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.DBSequence"
    ColumnType="NUMBER"
    TableName="XX_CUSTOMER"
    PrimaryKey="true"
    IsUpdateable="while_insert"
    DefaultValue="@0"
    Domain="oracle.jbo.domain.DBSequence"
    RetrievedOnInsert="true">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="Firstname"
    IsNotNull="true"
    Precision="50"
    ColumnName="FIRSTNAME"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="50"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Firstname_Rule_0"
    ResId="customer.model.CustomerEO.Firstname_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="Firstname_Rule_1"
    ResId="customer.model.CustomerEO.Firstname_Rule_1"
    ValName="Precision : (50)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Firstname_Rule_2"
    OnAttribute="Firstname"
    Pattern="^[a-zA-Z(\s)]*$"
    Inverse="false"
    ResId="customer.model.CustomerEO.Firstname_Rule_2"/>
    </Attribute>
    <Attribute
    Name="Middlename"
    Precision="10"
    ColumnName="MIDDLENAME"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="10"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Middlename_Rule_0"
    ResId="customer.model.CustomerEO.Middlename_Rule_0"
    ValName="Precision : (10)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Middlename_Rule_1"
    ResId="customer.model.CustomerEO.Middlename_Rule_1"
    OnAttribute="Middlename"
    Pattern="^[a-zA-Z(\s)]*$"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="Lastname"
    IsNotNull="true"
    Precision="50"
    ColumnName="LASTNAME"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="50"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Lastname_Rule_0"
    ResId="customer.model.CustomerEO.Lastname_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="Lastname_Rule_1"
    ResId="customer.model.CustomerEO.Lastname_Rule_1"
    ValName="Precision : (50)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Lastname_Rule_2"
    ResId="customer.model.CustomerEO.Lastname_Rule_2"
    OnAttribute="Lastname"
    Pattern="^[a-zA-Z(\s)]*$"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="Dob"
    IsNotNull="true"
    ColumnName="DOB"
    SQLType="TIMESTAMP"
    Type="oracle.jbo.domain.Date"
    ColumnType="DATE"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="7"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Dob_Rule_1"
    ResId="customer.model.CustomerEO.Dob_Rule_1"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:MethodValidationBean
    Name="Dob_Rule_0"
    ResId="customer.model.CustomerEO.Dob_Rule_2"
    MethodName="validateDob"/>
    </Attribute>
    <Attribute
    Name="Address1"
    IsNotNull="true"
    Precision="100"
    ColumnName="ADDRESS1"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="100"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Address1_Rule_0"
    ResId="customer.model.CustomerEO.Address1_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="Address1_Rule_1"
    ResId="customer.model.CustomerEO.Address1_Rule_1"
    ValName="Precision : (100)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Address1_Rule_2"
    ResId="customer.model.CustomerEO.Address1_Rule_2"
    OnAttribute="Address1"
    Pattern="^[a-z0-9A-Z(\s)]*$"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="Address2"
    Precision="100"
    ColumnName="ADDRESS2"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="100"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Address2_Rule_0"
    ResId="customer.model.CustomerEO.Address2_Rule_0"
    ValName="Precision : (100)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Address2_Rule_1"
    ResId="customer.model.CustomerEO.Address2_Rule_1"
    OnAttribute="Address2"
    Pattern="^[a-z0-9A-Z(\s)]*$"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="City"
    IsNotNull="true"
    Precision="30"
    ColumnName="CITY"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="30"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="City_Rule_0"
    ResId="customer.model.CustomerEO.City_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="City_Rule_1"
    ResId="customer.model.CustomerEO.City_Rule_1"
    ValName="Precision : (30)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="City_Rule_2"
    ResId="customer.model.CustomerEO.City_Rule_2"
    OnAttribute="City"
    Pattern="^[a-zA-Z(\s)]*$"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="Country"
    IsNotNull="true"
    Precision="30"
    ColumnName="COUNTRY"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="30"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Country_Rule_0"
    ResId="customer.model.CustomerEO.Country_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="Country_Rule_1"
    ResId="customer.model.CustomerEO.Country_Rule_1"
    ValName="Precision : (30)"
    Subtype="PRECISION_SCALE"/>
    </Attribute>
    <Attribute
    Name="State"
    IsNotNull="true"
    Precision="30"
    ColumnName="STATE"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="30"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="State_Rule_0"
    ResId="customer.model.CustomerEO.State_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="State_Rule_1"
    ResId="customer.model.CustomerEO.State_Rule_1"
    ValName="Precision : (30)"
    Subtype="PRECISION_SCALE"/>
    </Attribute>
    <Attribute
    Name="Gender"
    IsNotNull="true"
    Precision="5"
    ColumnName="GENDER"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="5"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Gender_Rule_0"
    ResId="customer.model.CustomerEO.Gender_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="Gender_Rule_1"
    ResId="customer.model.CustomerEO.Gender_Rule_1"
    ValName="Precision : (5)"
    Subtype="PRECISION_SCALE"/>
    </Attribute>
    <Attribute
    Name="Primaryphone"
    IsNotNull="true"
    Precision="12"
    ColumnName="PRIMARYPHONE"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER"
    DefaultValue="###-###-####">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="12"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Primaryphone_Rule_0"
    ResId="customer.model.CustomerEO.Primaryphone_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="Primaryphone_Rule_1"
    ResId="customer.model.CustomerEO.Primaryphone_Rule_1"
    ValName="Precision : (12)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Primaryphone_Rule_2"
    ResId="customer.model.CustomerEO.Primaryphone_Rule_2"
    OnAttribute="Primaryphone"
    Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="Secondaryphone"
    Precision="12"
    ColumnName="SECONDARYPHONE"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER"
    DefaultValue="###-###-####">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="12"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Secondaryphone_Rule_0"
    ResId="customer.model.CustomerEO.Secondaryphone_Rule_0"
    ValName="Precision : (12)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Secondaryphone_Rule_1"
    ResId="customer.model.CustomerEO.Secondaryphone_Rule_1"
    OnAttribute="Secondaryphone"
    Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="Email"
    IsNotNull="true"
    Precision="100"
    ColumnName="EMAIL"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="100"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Email_Rule_0"
    ResId="customer.model.CustomerEO.Email_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="Email_Rule_1"
    ResId="customer.model.CustomerEO.Email_Rule_1"
    ValName="Precision : (100)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Email_Rule_2"
    ResId="customer.model.CustomerEO.Email_Rule_2"
    OnAttribute="Email"
    Pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="Fax"
    Precision="12"
    ColumnName="FAX"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER"
    DefaultValue="###-###-####">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="12"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Fax_Rule_0"
    ResId="customer.model.CustomerEO.Fax_Rule_0"
    ValName="Precision : (12)"
    Subtype="PRECISION_SCALE"/>
    <validation:RegExpValidationBean
    Name="Fax_Rule_1"
    ResId="customer.model.CustomerEO.Fax_Rule_1"
    OnAttribute="Fax"
    Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
    Inverse="false"/>
    </Attribute>
    <Attribute
    Name="Languages"
    IsNotNull="true"
    Precision="50"
    ColumnName="LANGUAGES"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="XX_CUSTOMER">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="50"/>
    </DesignTime>
    <validation:PreDefinedValidationBean
    Name="Languages_Rule_0"
    ResId="customer.model.CustomerEO.Languages_Rule_0"
    ValName="Mandatory"
    Subtype="MANDATORY"/>
    <validation:PreDefinedValidationBean
    Name="Languages_Rule_1"
    ResId="customer.model.CustomerEO.Languages_Rule_1"
    ValName="Precision : (50)"
    Subtype="PRECISION_SCALE"/>
    </Attribute>
    <AccessorAttribute
    Name="ContactsEO"
    Association="customer.model.CustomerEOtoContactsEO"
    AssociationEnd="customer.model.CustomerEOtoContactsEO.ContactsEO"
    AssociationOtherEnd="customer.model.CustomerEOtoContactsEO.CustomerEO"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
    <Key
    Name="SysC007004">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007004"/>
    <Attr Name="_checkCondition" Value='"CUSTOMERID" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC007005">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007005"/>
    <Attr Name="_checkCondition" Value='"FIRSTNAME" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Firstname"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007006">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007006"/>
    <Attr Name="_checkCondition" Value='"LASTNAME" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Lastname"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007007">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007007"/>
    <Attr Name="_checkCondition" Value='"DOB" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Dob"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007008">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007008"/>
    <Attr Name="_checkCondition" Value='"ADDRESS1" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Address1"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007009">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007009"/>
    <Attr Name="_checkCondition" Value='"CITY" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.City"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007010">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007010"/>
    <Attr Name="_checkCondition" Value='"STATE" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.State"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007011">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007011"/>
    <Attr Name="_checkCondition" Value='"COUNTRY" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Country"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007012">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007012"/>
    <Attr Name="_checkCondition" Value='"GENDER" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Gender"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007013">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007013"/>
    <Attr Name="_checkCondition" Value='"PRIMARYPHONE" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Primaryphone"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007014">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007014"/>
    <Attr Name="_checkCondition" Value='"EMAIL" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Email"/>
    </AttrArray>
    </Key>
    <Key
    Name="SysC007015">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C007015"/>
    <Attr Name="_checkCondition" Value='"LANGUAGES" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Languages"/>
    </AttrArray>
    </Key>
    <Key
    Name="XxCustomerdetailsPk"
    PrimaryKey="true">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="XX_CUSTOMERDETAILS_PK"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="customer.model.CustomerEO.Customerid"/>
    </AttrArray>
    </Key>
    <ResourceBundle>
    <PropertiesBundle
    PropertiesFile="customer.model.CustomerModelBundle"/>
    </ResourceBundle>
    </Entity>

  • Number of Rows on Master - Detail Form

    I want to dynamically display the number of detail rows.
    I can get the number of rows to be displayed by entering this PL/SQL code before displaying the page:
    declare
    cnt number;
    begin
    SELECT count(*) into cnt FROM table WHERE client = "Ford";
    end;
    How do I tell the 'Number of Detail Rows to Display' field on the 'Options for Detail Row' page to use this value?

    Let me answer my own question.
    Set the number of rows to 500 and it will dynamically set to the number of rows.

  • Master Detail Form - Problem using built in wizard

    Hi There
    We are working on Application express 2.2.
    We are facing problems for a master detail form using Wizard. The
    details are as follows : >>
    1) Master table : TS_ENTRY_TXN
    trans_id P.K.
    2) Detail table : TS_ENTRY_TXN_DETAIL
    a)trans_id
    b)sub_trans_id Composite P.K.(trans_id,sub_trans_id) & these are
    based on sequences.
    If i try to build a master detail form using the Wizard, the options
    for providing P.K. for master & detail are listed which we used.
    As it is a master detail form, we want to carry trans_id to the detail
    for updations/insertions which doesn't happen.
    The MRU fails with oracle error :
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1,
    ORA-01400: cannot insert NULL into
    ("TS_APEX"."TS_ENTRY_TXN_DETAIL"."ENTRY_ID"), insert into
    "TS_APEX"."TS_ENTRY_TXN_DETAIL" ( "ENTRY_ID", "SUB_ENTRY_ID",
    "SMR_ID", "TASK_ID", "SUB_TASK_ID", "TIME_SPENT", "REMARKS") values (
    :b1, :b2, :b3, :b4, :b5, :b6, :b7)
    Is there any other way to build master detail wihout wizard.
    Could you please suggest us better way to complete this task.

    If I'm reading this correctly, then one of the columns in your detail tables' primary key is also the foreign key pointing to your master table? If that's the case, then that's not supported by the wizard. For the wizard generated master-detail form to work properly, you'll have to have a foreign key column in your detail table which is not part of your detail table's primary key.
    Hope this helps,
    Marc

  • Problem in Master Detail form when using ADF table for Detail

    hi,
    jdev version-11.1.2.1.0
    i have create Master detail form using datacontrol drag as ADF Master Form Detail Table.
    Now when i create a new row in Detail table using CreateInsert button a blank new row created on the top of detail table.
    and other row show that data of previous record based on master.
    problem is that i want when i click on createInsert button all row of detail table should be blank and when user fill two or three row then commit.
    Thanks in Advance

    Hi,
    if a detail table has data, then createInsert adds to these. If you want to hide existing rows, create a new View Object instance and set its "Retrieve from the Database" option to "No Rows". The use an af:switcher to change the table shown when the user clicks the createInsert button. There is a bit of coding required to have this use case in ADF, but its mostly declarative. Bottom line is that there is no automated option other than creating new rows in a separate page or dialog if you are bothered by existing rows
    Frank

  • Master Detail form - Problems

    We are facing problems for a master detail form using Wizard. The details are as follows : >>
    1) Master table : TS_ENTRY_TXN
    trans_id P.K.
    2) Detail table : TS_ENTRY_TXN_DETAIL
    a)trans_id
    b)sub_trans_id Composite P.K.(trans_id,sub_trans_id) & these are based on sequences.
    If i try to build a master detail form using the Wizard, the options for providing P.K. for master & detail are listed which we used.
    As it is a master detail form, we want to carry trans_id to the detail for updations/insertions which doesn't happen.
    The MRU fails with oracle error :
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01400: cannot insert NULL into ("TS_APEX"."TS_ENTRY_TXN_DETAIL"."ENTRY_ID"), insert into "TS_APEX"."TS_ENTRY_TXN_DETAIL" ( "ENTRY_ID", "SUB_ENTRY_ID", "SMR_ID", "TASK_ID", "SUB_TASK_ID", "TIME_SPENT", "REMARKS") values ( :b1, :b2, :b3, :b4, :b5, :b6, :b7)
    Is there any other way to build master detail wihout wizard.
    Could you please suggest us better way to complete this task.

    Hi San Mat,
    I would never recommend having a composite PK on any table. Use the sub_trans_id as the PK in its own right and have trans_id as a Foreign Key pointing to the master table.
    However, given your existing table structure, what you need to do is add a Default value for the ENTRY_ID field on the child table that points to the Page Item used for the PK field on the master table (you've said trans_id but do you mean ENTRY_ID??). On the column's Column Attributes page, set Default Type to Item (Application or page item name) and the Default to P1_ENTRY_ID (or whatever the name is of field is on the master table's form that holds the PK)
    When a new row is added to the child table, the ENTRY_ID from the master table is inserted automatically.
    Regards
    Andy

Maybe you are looking for

  • Problem saving as PDF from MS Publisher

    Window's 7 (ver 6.1) MS Publisher 2007 (SP2) I have a postcard document that I'm trying to save as a PDF. The document saved fine but I had to change the size slightly (increased the custom size from 4 x 6 to 4.25 x 6.25). Now, instead of the full do

  • Sync phone and outlook calendar on VISTA 64

    I am using VISTA 64 bit os.  I have a 8300 running 4.5 and the desktop application is 4.6.0.6.  I can sync everything by the Calendar. It will read both the 8300 and Outlook but then errors out.  There really is not error message, vista just puts up

  • How can I define payload authorizations in Runtime Workbench?

    Hi there, I am trying to define JAVA-authorizations in our PI-landscape. My recent problem is that I am trying to give our developers the opportunity to read message payloads in the Runtime Workbench. So far I have only been able to do this with admi

  • SQL Developer Data Modeling pricing

    I just downloaded the EA version of SQL Developer Data Modeling. I read in the release notes that the production release won't be free - any idea about the pricing ? Matthias

  • Selecting a column in a table according to a value

    Hi, I am stuck with a little problem here. I need to fill a column according to a value. I have an xml that will looks like this to make it simple. (Don't worry, I am not managing the status of a stock of Candy ;-)) I have to build in rtf. <?xml vers