Add a line of empty in a table when the checkbox enabled

Hi all

I have a custom page with 2 check boxes and a few fields, I do the operation of research by entering a check mark and a few other fields and display data in the table region.

My requirement is when I select the second check box and click a button, such as add new line it must create an empty row in the table, means table should available with an empty line so that the user can insert data.

Please help me on this

Thnaks

Hello

If you work with the advance table so you have a default option to create a blank line, please through the topic "add another line."

Jdev Guide.

If you work the ordinary table area, then you can follow the below proposed code.

Create a new item of type button (no submit button) and handle the event in your controller class PFR

String addRow = pageContext.getParameter (EVENT_PARAM);   "addRow" is an event attached to table

If ("addAnotherRow". Equals (AddRow))

{

am.invokeMethod ("AddRow");

}

In the AMimplementation class:

Public Sub::AddRow()

{

OAViewObject headerVO = (OAViewObject) getsdaPacelineWorkupHeaderUpdateVO1 ();

rowh = (sdaPacelineWorkupHeaderUpdateVORowImpl) headerVO.getCurrentRow () sdaPacelineWorkupHeaderUpdateVORowImpl;

rowh.getPacelineHeaderId ();

OAViewObject lineVO = (OAViewObject) getsdaPacelineWorkupLineUpdateVO1 ();

Line lineRow = lineVO.createRow ();

LineRo row = lineVO.last ();

lineRow.setAttribute ("PacelineHeaderId", rowh.getPacelineHeaderId ());

lineRow.setNewRowState (Row.STATUS_INITIALIZED);

lineVO.last ();

lineVO.next ();

lineVO.insertRow (lineRow);

lineVO.setCurrentRow (lineRow);

lineVO.setCurrentRow (lineVO.last ());

}

Note : replace your name instead of sdaPacelineWorkupHeaderUpdateVO1() vo

Please let me know if you have any questions.

Kind regards

Had

Tags: Oracle Applications

Similar Questions

  • Trying to update a table in a second table when the data are different

    Hello;
    I have a the same table in two databases. The database are connected with a DB link. I'm trying to update one table based on the data in the second table when the EMP_ID is but the name does not match.

    The table will look like:
    Table name: EMP
    EMP_ID
    LAST_NAME
    FIRST NAME
    MIDDLE_INITIAL

    My SQL is:
     
    update EMP TARGET 
        set (TARGET.LAST_NAME, TARGET.FIRST_NAME,TARGET.MIDDLE_INITIAL) = ( 
            select SOURCE.LAST_NAME, SOURCE.FIRST_NAME, SOURCE.MIDDLE_INITIAL 
            from EMP@OTHER_DB SOURCE where 
            TARGET.PHYSICIAN_ID = SOURCE.PHYSICIAN_ID 
            and TARGET.LAST_NAME <> SOURCE.LAST_NAME); 
    This refers to a number of update of all lines not the bit I want.

    Any help would be great!

    Hello

    Sky13 wrote:
    Hello;
    I have a the same table in two databases. The database are connected with a DB link. I'm trying to update one table based on the data in the second table when the EMP_ID match

    Do you doctor_id?

    but the name does not match.

    The table will look like:
    Table name: EMP
    EMP_ID
    LAST_NAME
    FIRST NAME
    MIDDLE_INITIAL

    My SQL is:

    
    update EMP TARGET
    set (TARGET.LAST_NAME, TARGET.FIRST_NAME,TARGET.MIDDLE_INITIAL) = (
    select SOURCE.LAST_NAME, SOURCE.FIRST_NAME, SOURCE.MIDDLE_INITIAL
    from EMP@OTHER_DB SOURCE where
    TARGET.PHYSICIAN_ID = SOURCE.PHYSICIAN_ID
    and TARGET.LAST_NAME <> SOURCE.LAST_NAME); 
    

    This refers to a number of update of all lines not the bit I want.

    Any help would be great!

    There is no WHERE clause in the UPDATE statement, so that each row in the target table will be changed.
    If you only want to change the lines that have a match in the source table, then add a WHERE clause (perhaps "WHERE EXISTS (...)) with a subquery miuch very similar to the one you already have), or use the MERGER instead of UPDATE.

    If you want to know, post CREATE TABLE and INSERT statements to recreate the tables they existed before the UPDATE and also post the contents of the table changed after the UPDATE.
    Always tell what version of Oracle you are using.

    Maybe you want something like this:
    {code}
    MERGE INTO the emp target
    WITH THE HELP OF)
    SELECT o.emp_id
    o.last_name
    o.last_name
    o.middle_initial
    OF emp@other_db o
    JOIN emp t ON o.emp_id = t.emp_id
    AND o.last_name! = t.last_name
    ) source
    WE (target.emp_id = source.emp_id
    WHEN MATCHED THEN UPDATE
    SET target.last_name = source.last_name
    target.first_name = source.first_name,
    target.middle_initial = source.middle_initial,
    ;
    {code}
    assuming that emp is unique, at least in other_db.

    It will work in Oracle 10 (and more). In Oracle 9, MERGER still requires a WHEN MATCHED clause, so add one if you must. No matter what he does; the subquery USE will only return matches.

    Published by: Frank Kulash, October 10, 2011 16:45

  • In the column of table when the values are grater that maximum linear axis it does not show the bar

    Hi guys,.

    In the column of table when the values are grater than there maximum linear axis it does not show the Bar.But I want to display the bar up to the maximum limit of the axis is linear without changing the limit max.

    Consider following the example:

    The values are 80 90 200 300

    and here is the result:

    Left: when I don't put maximum property of linear axis.

    Right: when I put in maximum property of linear axis to 200.

    Untitled.jpg

    Law 4th bar is not visible because the value of this bar is 300 which is excedding maxium. But I want the 4th bar to appear identical to 3 bar.

    How can I do this?

    Thanks in advance.

    Then you should change the value of Y to the maximum value.

    Another option, you should consider is changing the Render item column to reflect that the value is greater than the specified maximum value.

  • Apex 4.2: The button "Add a line" does not not in table form

    Hello

    We have an application migrated from 3.2 to 4.2 Apex

    Afterwards, the 'Add Row' button does not work. When I try to click that, new line is not get added.

    I even tried to delete the tabular form and creates a new array of 4.2 Apex environment itself, but of no use, new line is not get added.

    "Also, is to launch a page fault"Message: 'length' is null or not an object"

    Browsed little of the previous announcement in OTN for this problem and found that by changing the theme, this problem can be solved.

    'Length' is null or not an object for tabular forms V4 error

    Apex 4: the 'Add Row' button doesn't work is not in tabular form

    The user is comfortable with the current theme and does not change the theme.

    Current theme used is "blue-gray - 13.

    Is it by a patch or workaround, we will be able to do the work of button "Add a line" normal.

    Kindly guide me in this issue. Thanks in advance.

    Kind regards

    Shiva

    OK, my dyslexia kicked in.  Modify the report model and correct the field before the lines replacing the #STATIC_REGION_ID # #REGION_STATIC_ID #.

    ***

  • Line layout selection/evidence code table of the adf

    Hi all

    I use Jdev12c and you want to programmatically select a row in a table. It's the line should be highlighted and the graph of the child should also be updated to the selected line. If I can get one of these features that is also sufficient.

    I have DCIteratorBinding instance for the table, but do not receive good method/how to get there. The size of table is 20.

    Thank you!

    viewObject.setCurrentRow (row); did not work for me it turns that I greeted the multipleSelection on the table and this is the main reason for which even after refresh of the VO of the selection of some random lines in the main table is not removed even if detail table/chart refreshes to display the data corresponding to the first line of the main table.

    So I removed the selection of the main table (using following code) gives me the very view that when the page is loaded first time (i.e. no line selected in the child master and graph/table table were given corresponding to the first row in the main table).

            UIComponent component = JSFUtils.findComponentInRoot (tableId);
            If (component instanceof richeTableau) {}
                Table richeTableau = component (richeTableau);
                Set of rows RowKeySet = table.getSelectedRowKeys ();
                rowSet.clear ();
                System.out.println ("removed from the line selection table:" + tableId);
  • problem with adf table when the component is added in the column of the table.

    Hi all

    I use jdev 11.1.1.5.0 version.

    use case: I created an adf table that is based on the original Version. DC now I added a component of group select a radio (which contain 4 approved, rejected, radio button back, no) in the table of the adf.
    I have table with many rows for example in the first row select approved and the next row I select reject now when I get the value of a radio button group in backing bean by using the component binding I had the last selected value. (in this case to reject).

    And the second is that when I set the value for the current by using binding as line radio button

    rb.setValue("R") then reject option selected for all lines.

    so my question is--

    How can I get and set the value of the group to select a radio at the level of the line using the element binding.

    Hello

    I don't see a reason to not use a transitional attribute for the radioGroup in your previous answer.

    Here's the example I tried.

                            
                                
                                
                                
                                
                                
                            
    

    Where DeptnoRadio is the transitional attribute, I created (which will be a few random values between A and E) and EnableDisable is another temporary variable of type Boolean that returns true or false depending on certain conditions.

    Now, for each row, the value is different (and the corresponding radio button is selected) and thereafter, which match the condition, the option is disabled.

    Arun-

  • Af fill: table when the page is loaded.

    Hello

    I am required to complete the table on the page loading. In the newspapers, it indicates that the SELECT view query is run before displaying the page. However "No data to display" is displayed.

    When clicking on the link 'Search' of af: corresponding QuickQuery, it displays the data.

    JSPX table code is as follows:

    < af:table summary = "list of countries".
    value = "#{bindings." CountrySetupVO1.collectionModel}.
    var = "row".
    lines = ' #{bindings. " CountrySetupVO1.rangeSize}.
    emptyText = "#{bindings." CountrySetupVO1.viewable? "{'No data to display.': 'Access Denied.'}".
    contentDelivery = "immediate".
    fetchSize = "#{bindings." CountrySetupVO1.rangeSize}.
    rowBandingInterval = '0 '.
    selectedRowKeys = ' #{bindings. " CountrySetupVO1.collectionModel.selectedRow}.
    selectionListener = "#{bindings." CountrySetupVO1.collectionModel.makeCurrent}.
    rowSelection = 'single '.
    partialTriggers =": qryId1: cb3: cb1"id = "t1"
    styleClass = "AFStretchWidth" >

    Suggestions please!
    Thank you
    Amar

    The component causes the framework call ViewObject.executeEmptyRowSet () when you navigate to the page for the 1st time. Try setting InitialQueryOverriden = true on the region corresponding search link in the PageDef in order to change this behavior. You can get more information in this blogpost:
    Dimitarhttp://jobinesh.blogspot.com/2009/11/displaying-pre-executed-query-result-in.html

    Dimitar

  • inserting data in a table when the record button

    Hi all

    I have a form that displays all fields in a table. It contains an adjustment column that has the value null by default and also an indicator of adjustment which is by default set to NO.

    Now when the form is run the user has the option to add a value in this column adjustment and this value is stored in another table order_adjustment. Entries should be included in the adjustment table only when there is a change in the column setting and for the value that was changed
    create table order_adjustement
    ( 
      adjustment_id number,
      oe_line_id number,
      adjustment_cnt number,
      created_by varchar2(100),
      created_date date,
      modified_by varchar2(100),
      modified_date date
    )
    I created a procedure in my form to insert my adjustment value
    PROCEDURE p_adjustment IS
    BEGIN
      insert into order_adjustement
      ( 
        adjustment_id     ,
        oe_line_id        ,
        adjustment_cnt    ,
        created_by        ,
        created_date      
      ) 
      values 
      (
        order_adjustment_seq.nextval,
        :oe_lines.oe_line_id,
        :oe_lines.adjusted_cnt,
        user,
        sysdate
       );
      
    END;
    I used relaxation during the new item on this field of setting instance but the problem is that his spare no not not the value that I'm passing it the first time but if I change these values, so these values are stored in the table.

    Published by: Kevin CK on August 17, 2010 15:34

    Hello

    Kevin CK wrote:
    Entries should be included in the adjustment table only when there is a change in the column setting and for the value that was changed

    Well, I prefer to use the database, it will be more effective.
    But if you want to use forms then try using the code below in the UPDATE to the block level.

    IF (GET_ITEM_PROPERTY('adjustment_field_name',DATABASE_VALUE) != :adjustment_field_name OR
        (GET_ITEM_PROPERTY('adjustment_field_name',DATABASE_VALUE) IS NULL AND :adjustment_field_name IS NOT NULL))  THEN
         p_adjustment;  -- here procedure which will insert records...
    END IF;
    

    -Clément

  • Call a rowDisclosureEvent from a tree Table when the button is clicked.

    Hi all

    I use Jdeveloper 11.2.5.

    I want to know how can I call the rowDisclosureEvent of a TreeTable at the click of a button.

    Code:

    {} public void collpaseAll (RowDisclosureEvent event)
    depth int = treeTable.getDepth ();
    if(Depth>0) {}
    return;
    }
    RowKeySet discloseRowKeySet = treeTable.getDisclosedRowKeys ();
    RowKeySet addedRowSet = event.getAddedSet ();
    Iterator addedRowKeyIter = addedRowSet.iterator ();
    {if (addedRowKeyIter.hasNext ())}
    discloseRowKeySet.clear ();
    Object firstKey = addedRowKeyIter.next ();
    discloseRowKeySet.add (firstKey);
    treeTable.setSelectedRowKeys (addedRowSet);
    treeTable.setRowKey (firstKey);
    AdfFacesContext adfFacesContext = null;
    adfFacesContext = AdfFacesContext.getCurrentInstance ();
    adfFacesContext.addPartialTarget (treeTable.getParent ());
    }
    }

    {} public void collapse (ActionEvent event)
    Add the code in the event here...

    }

    What should go after add code here event so that it can call the above method.

    Why down? If you want to just close all open nodes, you can do it inside the actionListener to the button.

        public void collapseTreeListener(ActionEvent actionEvent)
        {
            RowKeySet lDisclosedRowKeys = treeTable.getDisclosedRowKeys();
            lDisclosedRowKeys.removeAll();
            treeTable.setDisclosedRowKeys(lDisclosedRowKeys);
            // PPR refresh a jsf component
            AdfFacesContext.getCurrentInstance().addPartialTarget(treeTable);
        }
    

    Timo

  • How insert/DML data in the table when the data in the related table changes

    Hello guys!

    I came across a problem that I need to get fixed. Because I don't know how to start and get it resolved I wanted to ask you for your expertise.

    The scenario is as follows:

    I have a table 'a' in my 10g database and a view "ab" which combined table 'a' with 'b' table in a view. However, the 'b' table is a table in another schema Manager database. and accessible (read only right) via a database link.

    Now here it is: whenever the data changes in table "b", for example 2 new sets of data is inserted, I need to insert automatically the 2 values of these 2 sets of data in my table "a". Same procedure for update and delete in table "b".

    The action that inserts data into the table 'a' must be initialized in my database, I have limited access to the other. Can I somehow use a trigger my reviews of "ab" to insert data into the table "a"? Or is it possible to use the "change notification procedure database" using the view as the reference?

    Desperately need help and example of all suspicion/code greatly appreciated. I am very new to Oracle and not very fond of PL/SQL routines. So please be so kind as to give me more details.

    Thanks in advance - I hope you have any ideas how I can get this problem resolved.

    Sebastian

    >

    ... it does not, since the DDL operations are not permitted on the remote databases (ORA-02021). I can't create the trigger on a view either. :-(
    So what ways are left to insert data into the table 'a' when the related table changes?

    Please, help if you have an idea!

    Yes,
    You can't perform the DDL (create the trigger...) on remote databases as you can see...
    Try to create this trigger in the local database that will make DML (insert into...) on the remote database.

        CREATE OR REPLACE TRIGGER local_forward_pt_after_insert
         AFTER INSERT
             ON N2K_INV_PT
             FOR EACH ROW
    
         BEGIN
             -- Insert records into table "a"
             INSERT INTO TBL_PUNKTDATEN@remote_database_sid
              ( INT_NUMMER,
                STR_GEBIET
                 )
             VALUES
              ( :new.INT_INV_PT_NR,
                :new.GEBIET );
         END;
    

    Thank you

    Good luck

  • Turn off the lines in the region of the table when the page loads in standard page using the CO Extension

    Hi all

    I have a requirement in standard page OAF, When page load I need to disable a region advanced table standard page column and if we add the new line this column must be activate.

    Please help an emergency.

    Kind regards

    Manoj Kumar belaid.

    Maury,

    You will have to go with SPEL. Create an extra in your VO and default attribute set to true.

    Use as the SPEL for the disabled/ReadOnly property of the column.

    Reference: advice of Oracle of Johny: OAF: Spel liaison

    See you soon

    AJ

  • Select from another table, when the query returns no result

    Hello

    I have a question where I'm supposed to retrieve the address of an account id-based billing. However, the table of billing may not have an address. There is a table of addresses that always has an address for an account. If the billing address exists, it should be used, so I can't use the address table. Is it possible in a select statement to query to the billing address and if it does not exist, use the address table.

    SELECT * FROM accounts a, b billings WHERE a.accountid = b.accountid

    Any help will be greatly appreciated.

    Thank you.

    user10407139 wrote:
    Hello

    I have a question where I'm supposed to retrieve the address of an account id-based billing. However, the table of billing may not have an address. There is a table of addresses that always has an address for an account. If the billing address exists, it should be used, so I can't use the address table. Is it possible in a select statement to query to the billing address and if it does not exist, use the address table.

    SELECT * FROM accounts a, b billings WHERE a.accountid = b.accountid

    Any help will be greatly appreciated.

    I think you need to explain more clearly if

    -you only have a couple of "billing" columns which is empty and in this case, you want to use the columns from the table 'accounts '.

    - or you have a join with another table that doesn't return data, for example a foreign key "address_id" "billing" is zero and therefore the join to other tables 'address' will return all the data

    In the first case, you have already been provided with some examples here, how to use NVL or similar functions to achieve, even if the first post first evaluates the information of 'accounts' and if it is white using information from "billing". According to your description you need the other way around. The second post a subquery recursive useless in my opinion.

    In the latter case, you should probably use an "outer" join so that the data in your table "bills" are returned, even if the join to another table is not at all the lines.

    SELECT
    NVL(AD1.ADDRESS_ATTR1, AD2.ADDRESS_ATTR1) as ADDRESS_ATTR1,
    NVL(AD1.ADDRESS_ATTR2, AD2.ADDRESS_ATTR2) as ADDRESS_ATTR2,
    NVL(AD1.ADDRESS_STREET, AD2.ADDRESS_STREET) as ADDRESS_STREET,
    ...
    FROM accounts a
    INNER JOIN billings b
    ON a.accountid = b.accountid
    LEFT OUTER JOIN address ad1
    ON b.address_id = ad1.address_id
    INNER JOIN address ad2
    ON a.address_id = ad2.address_id;
    

    In this way you pick up the address stored in the "invoices" table, if it existed, otherwise you pick up the address assigned to the "accounts" table I used an inner for the second address join join because you said that the account always has an assigned address.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • Add on tool bar appears, but add ons, and new custom toolbar only appears when the Customize window open - toolbar does not name in list of the toolbar?

    I used view = > toolbars = > and ticked all the toolbars that I want to appear. BUT add it to the toolbar appears blank (i.e. toolbar but no add ons). AND the new custom toolbar that I created is not yet listed in the toolbars available for check or not. The only way I can get to show upward (but no function) is by clicking the Customize button. The toolbar remains open as long as the window is customize, and I can add/remove/rearrange icons, but not use any of their functions (for example. I added a new button to the custom toolbar window, but when I click of course nothing happens, because another window - window customize - is still open). I need a way to lock the toolbar, so I can access buttons to use it please!
    BTW use Windows 8 and just went from IE (and fearing that I'll have to downgrade...)
    TNX so much.

    In my opinion, which suggests that what you were actually doing was to customize the toolbar of the addons. Firefox is quite flexible and you can for example put the print icon on the toolbar of the modules or the bookmarks toolbar, and not only on a new designed user a custom toolbar.

    Many modules are designed by their developers do not make use of the toolbar of the add-on. Some add-ons appear on other menus. Collusion shows also in the Tools menu. Some use the page modules interface for results or settings.

  • Delete rows in a table when the columns from two tables match

    Hello

    I have following two tables.

    ===========================================

    create the table empbooth as

    (

    Select 1 empid, 1 double cabin Union all the

    Select option 2, Union 1 double all the

    Select 3, Union 1 double all the

    Select option 4, Union 2 double all the

    Select option 5, 2 double

    );

    create the table attsht as

    (

    Select 1 empid, 240 reg, 0 unpaid all double union

    Select option 2, reg 200, 0 unpaid of all the double union

    Select 3, 240 reg, 0 unpaid all double them union

    Select 4 480 reg, 0 unpaid all double union

    Select 5 240 reg, unpaid double 0

    );

    =================================================

    I want to remove rows from attsht where corresponding booth (which is stored in the empbooth table) is 1.

    The condition is 'where attsht.empid = empbooth.empid and empbooth.booth = 1 '.

    I use oracle 10g.

    Help, please

    delete from attsht where a.empid in (select b.empid from empbooth b where b.booth = 1)

    or

    remove from attsht a

    where exists (select null

    of empbooth b

    where b.booth = 1

    and b.empid = a.empid)

  • How to add a block of decision in a campaign when the user has downloaded a pdf file

    Hi all

    We have implemented a campaign flow and check if users open and by e-mail. Now, we want to follow if they have visited the page destination and from there if they have downloaded a pdf file.

    Is it possible to have these as decision in a stream of campaign block?

    Thank you

    Hi Alex,

    Have you managed to make it work?

    Gary

Maybe you are looking for