1 Reply Latest reply: Mar 25, 2013 4:30 PM by redy007 RSS

    Manually creating Add Row Button in tabular form in APEX 4.2

    redy007
      Hello all,

      I tried to create tabular form manually by SQL report - Denes' solution( http://apex.oracle.com/pls/apex/f?p=31517:170:9915790172855::::: ). I have problem with add row buton. Just one row is inserted by click. When repeat the action (click the button) previous row disappear and it's repleaced by new one (blank).


      Button is set
      action when button clicked:
      redirect to page in this aplication
      reuquest: ADD_ROWS1

      Source:
      SELECT apex_item.checkbox (30,
      empno,
      'onclick="highlight_row(this,' || ROWNUM || ')"',
      NULL,
      ':',
      'f30_' || LPAD (ROWNUM, 4, '0')
      ) delete_checkbox,
      empno,
      apex_item.hidden (31, empno)
      || apex_item.text (32,
      ename,
      80,
      100,
      'style="width:170px" readonly="readonly"',
      'f32_' || LPAD (ROWNUM, 4, '0')
      )
      || apex_item.hidden (33, wwv_flow_item.md5 (ename)) ename
      FROM emp
      UNION ALL
      SELECT apex_item.checkbox
      (30,
      NULL,
      'onclick="highlight_row(this,' || ROWNUM || ')"',
      NULL,
      ':',
      'f30_' || LPAD (9900 + LEVEL, 4, '0')
      ) delete_checkbox,
      NULL,
      apex_item.hidden (31, NULL)
      || apex_item.text (32,
      NULL,
      80,
      100,
      'style="width:170px"',
      'f32_' || LPAD (9900 + LEVEL, 4, '0')
      )
      || apex_item.hidden (33, NULL) ename
      FROM DUAL
      WHERE :request = 'ADD_ROWS1'
      CONNECT BY LEVEL <= 1;


      APEX version is 4.2
      DB version is (I don't know, it's on apex.oracle.com)

      Please could you help me?
        • 1. Re: Manually creating Add Row Button in tabular form in APEX 4.2
          redy007
          update: I add branch to page itself. In request is &REQUEST
          Now I am able to to add new row and remove new row when I click next time. Is there any way how to add a row and save a session state without use of collection?

          By the way in url it's http://apex.oracle.com/pls/apex/f?p=29665:1:9032698941466:&REQUEST:NO::: after rows were removed and http://apex.oracle.com/pls/apex/f?p=29665:1:9032698941466:ADD_ROWS1:NO:RP:: when were added.