How can i travers the rows of JTable?

Hi all;
i have Jtable with check box column,the user can check the checkbox
of the rows he need to delete & then click on the delete button
my problem is to know the selected rows.
can anyone help me?

Assuming you're just using an Object[][], why not
traverse that array?
for( int i = 0; i < MyObject.length; i++ ) { //
assumes that the checkbox is the first row..
if( MyObject[0].isSelected() )
deleteThisRow();
what will Object[][]  contains?
is there exist method called "isSelected" in the Object class?
please explain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How can I display the rows into columns.

    How can I display the rows into columns. I mean
    Create table STYLE_M
    (Master varchar2(10), child varchar2(10));
    Insert itno style_m
    ('MASTER1','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD1');
    Insert itno style_m
    ('MASTER3','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD3');
    Note : The Master may have any number of childs.
    I want to display like this..
    Master child1, child2, child3, .......(dynamic)
    MASTER1 CHILD1
    MASTER2 CHILD1 CHILD2
    MASTER3 CHILD1 CHILD2 CHILD3
    Sorry for disturbing you. Please hlp me out if you have any slution.
    Thanks alot.
    Ram Dontineni

    Here's a straight SQL "non-dynamic" approach.
    This would be used if you knew the amount of children.
    SELECT
         master,
         MAX(DECODE(r, 1, child, NULL)) || ' ' || MAX(DECODE(r, 2, child, NULL)) || ' ' || MAX(DECODE(r, 3, child, NULL)) children
    FROM
         SELECT
              master,
              child,
              ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r
         FROM
              style_m
    GROUP BY
         master
    MASTER     CHILDREN                        
    MASTER1    CHILD1                          
    MASTER2    CHILD1 CHILD2                   
    MASTER3    CHILD1 CHILD2 CHILD3             Since you said that the number of children can vary, I incorporated the same logic into a dynamic query.
    SET AUTOPRINT ON
    VAR x REFCURSOR
    DECLARE
            v_sql           VARCHAR2(1000) := 'SELECT master, ';
            v_group_by      VARCHAR2(200)  := 'FROM (SELECT master, child,  ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r FROM style_m) GROUP BY master';
            v_count         PLS_INTEGER;
    BEGIN
            SELECT
                    MAX(COUNT(*))
            INTO    v_count
            FROM
                    style_m
            GROUP BY
                    master;
            FOR i IN 1..v_count
            LOOP
                    v_sql := v_sql || 'MAX(DECODE(r, ' || i || ', child, NULL))' || ' || '' '' || ';
            END LOOP;
                    v_sql := RTRIM(v_sql, ' || '' '' ||') ||' children ' || v_group_by;
                    OPEN :x FOR v_sql;
    END;
    PL/SQL procedure successfully completed.
    MASTER     CHILDREN
    MASTER1    CHILD1
    MASTER2    CHILD1 CHILD2
    MASTER3    CHILD1 CHILD2 CHILD3I'll point your other thread to this one.

  • How can I change the content of JTable?

    Dear friends.
    I have an JTable. I create tablemodel for it and fill out it by data.
    In application at the run time I always need to change the content of whole table. For example I have a frame with JTree and JTable. When I click on the tree node I need to retrieve the data about this node in the JTable.
    Advice me please how can I do that and give an example please.
    Thank you.

    SOL I:
    There solution can be simple if u've written a model for it.
    If u are updating the data of the table by the setValueAt() method of the tableModel, in ur calling(mutating code), then just append a sinle line at the end of the method. U just need to fire a data change event corresponding to the event that has happened.
    void setValueAt(Object aValue, int rowIndex, int columnIndex) {
    - - - - - - - ur code
    //then last line can be
    fireTableDataChanged() ;
    OR
    fireTableCellUpdated(int row, int column);
    OR
    fireTableStructureChanged() ;
    depending uopn what has happened.
    SOL II:
    U may also try calling the method fireTableDataChanged(); from the place where the table data is getting mutated.
    like:
    ((AbstractTableModel) table.getModel()).fireTableDataChanged();
    [email protected]

  • How can I select the row after a cfgrid refresh?

    I have a form that is bound to a cfgrid.  The grid is populated from a database.  When you navigate in the grid the data displayed in the form changes to match the selected row.  I can edit the data in the form and update the database.  After updating the data I refresh the cfgrid, which then displays the updated data.
    Unfortunately the cfgrid always highlights the first row, row 0, after a refresh.  I want to highlight the same row that was highlighted when the data was edited and saved.  Can anyone advise as to how I can do that?
    I have tried setting a listener when the grid is initiated that responds whenever the store is refreshed and triggers the function refreshSelection():
    g.getStore().on('load', refreshSelection) ;
    Before the form data is saved, the row number is stored in selectedRow[0].  When the grid is refreshed, refreshSelection is run:
    function refreshSelection() {
    if (0 >= selectedRecords.length)
         return;
    alert('Selected row is Row ' + selectedRecords[0] ) ;
    g.getSelectionModel().selectRow(selectedRecords[0]) ;
    selectedRecords[0] = 0 ;
    The alert shows the correct row number each time, but highlighting the last row viewed works intermittently, and only if the alert line is active.  If I comment out the alert, this fails every time, with row 0 being highlighted.  selectedRecords[0] is reset to 0 after the attempt to select the row so that navigation through the grid, such as choosing "Next Page," will properly highlight the first row of the page rather than the last row number that was edited.
    -Rick

    Massage?
    Why not ask the masseuse who gave you the massage?

  • How can you get the Row at the mouse pointer??

    I got a JTable displaying info. I want to get the Index of the Row I click on.
    I can getX(), getY() with a MouseListener, but I am unable to get the row index related to these coordinates.
    Thanks!
    Olivier

    Sorry.
    That's ridiculous. I just found the rowAtPoint(Point point) method in JTable.
    Solved!!

  • How can I get the row number of display automatically on a table?

    I have a table of measurements, and I would like the row number to be displayed on each row. The challenge is that each time I run the program, the total number of rows will be different, so I would like the numbers to update every time I run the program based on the current number of rows.
    I have attached a picture to illustrate what I am trying to do.
    Solved!
    Go to Solution.
    Attachments:
    picture of table.JPG ‏70 KB

    Find the attached example (saved in version 2009), and you can extract what you need for your code...!!
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Example (Enter Row Header).vi ‏12 KB

  • How can i select the rows from the 3 tables by particular column name?

    Vehicle Passing Summary table structure
              PsngSmry_ID(Number),Vehicle_iD(Number),PsngSmryTime(datetime)
    Vehicle table structure
              Vehicle_iD(Number),VehicleName(VarChar2),VehicleType(VarChar2)
    Here Vehicle_iD is the Primary Key
    Equipment Table Structure
              Eqpmt_id(Number),Vehicle_iD(Number),EqpmtName(VarChar2),EqpmtType(VarChar2)
    Here Eqpmt_id is the Primary Key and Vehicle_iD is the foreign Key
    Equipment Component Table Structure
              Eqpmt_Cmpnt_id(Number) ,Eqpmt_id(Number),EqpmtCmpntName(VarChar2),EqpmtCmpntName(VarChar2),Parent_Eqpmnt_ID(Number)
    Here Eqpmt_Cmpnt_id is the Primary Key and Eqpmt_id is the foreign Key
    The rows in the Vehicle Passing Summary table
         PsngSmry_ID Vehicle_ID     PsngSmryTime
         111111          80986246     2010/10/11
         111112          80986247     2010/10/12
         111113          80986248     2010/10/10
    The rows in the Vehicle Table
         Vehicle_iD     VehicleName     VehicleType
         80986246          Lorry          Four Wheeler
         80986247          Van          Four Wheeler
         80986248          Bus          Four Wheeler
    The rows in the Equipment Table:
         Eqpmt_id     Vehicle_iD     EqpmtName          EqpmtType
         109846          80986246          2 Axle Lorry          CAR
    109821          80986246          4 Axle Lorry          CAR
    109825          80986246          4 Axle Lorry          CAR
         109562          80986247          2 Axle VAn          CAR
    109555          80986247          3 Axle VAn          CAR
    109777          80986247          3 Axle VAn          CAR
         109587          80986248          2 Axle Bus          CAR
    The rows in the Equipment Component Table :
         Eqpmt_Cmpnt_id Eqpmt_id EqpmtCmpntName Parent_Eqpmnt_ID
         20904146          109846          Truck               
         20904147          109846          Truck
         20904148          109846          Axle               20904146
         20904159          109846          Axle               20904146
         20904167          109846          Wheel               20904148
         20904177          109846          Wheel               20904148
         20904185          109846          Wheel               20904159
         20904325          109846          Wheel               20904159
         20904188          109846          Axle               20904147
         20904189          109846          Axle               20904147
         20904195          109846          Wheel               20904188
         20904196          109846          Wheel               20904188
         20904197          109846          Wheel               20904189
         20904398          109846          Wheel               20904189
         10904146          109562          Truck               
         10904147          109562          Truck
         10904148          109562          Axle               10904146
         10904159          109562          Axle               10904146
         10904167          109562          Wheel               10904148
         10904177          109562          Wheel               10904148
         10904185          109562          Wheel               10904159
         10904325          109562          Wheel               10904159
         10904188          109562          Axle               10904147
         10904189          109562          Axle               10904147
         10904195          109562          Wheel               10904188
         10904196          109562          Wheel               10904188
         10904197          109562          Wheel               10904189
         10904398          109562          Wheel               10904189
    Note : In Equipment Component Table,the hierarchy will be Truck-->Axle-->Wheel.So
    1.the Parent_Eqpmnt_ID of Axle is Truck's Eqpmt_Cmpnt_id.
    2.the Parent_Eqpmnt_ID of Wheel is Axle's Eqpmt_Cmpnt_id.
    Now I want to write the store procedure which will take "PsngSmry_ID(Number)" as input and the o/p will be in the format :
         Eqpmt_Cmpnt_id Eqpmt_id EqpmtCmpntName Parent_Eqpmnt_ID
         20904146          109846      Truck     
         20904148          109846      Axle               20904146
         20904167          109846      Wheel               20904148
         20904177          109846      Wheel               20904148     
         20904159          109846      Axle               20904146
         20904185          109846      Wheel               20904159
         20904325          109846      Wheel               20904159
         20904147          109846      Truck
         20904188          109846      Axle               20904147
         20904195          109846      Wheel               20904188
         20904196          109846      Wheel               20904188
         20904189          109846      Axle               20904147
         20904197          109846      Wheel               20904189
         20904398          109846      Wheel               20904189
         10904146          109562          Truck     
         10904148          109562          Axle               10904146
         10904167          109562          Wheel               10904148
         10904177          109562          Wheel               10904148     
         10904159          109562          Axle               10904146
         10904185          109562          Wheel               10904159
         10904325          109562          Wheel               10904159
         10904147          109562      Truck
         10904188          109562      Axle               10904147
         10904195          109562      Wheel               10904188
         10904196          109562      Wheel               10904188
         10904189          109562      Axle               10904147
         10904197          109562      Wheel               10904189
         10904398          109562      Wheel               10904189
    **Please add these columns in the o/p **
    1.EqpmtName and EqpmtType from Eqpmt table
    2.VehicleName and Vehicle Type from Vehicle table
    3.PsngSmryTime from PassingSummary table **
    Can anyone tell me the solution?
    Edited by: 865216 on Jun 22, 2011 2:14 AM

    Hi,
    I am new to this technology;But, just wanted to help you.
    Please refer the code it might be atleast helpful for you.
    But am facing PL/SQL: ORA-00933: error and unable to resolve it.could anyone please correct this code.
    sorry if my code is totally wrong.
    Thank you,
    Rupa
    create or replace procedure Equipment_proc
    is
    begin
    DECLARE
    TYPE EQP_record IS RECORD (
    Vehicle_iD Vehicle.Vehicle_iD%TYPE,
    Eqpmt_Cmpnt_id Equipment_Component.Eqpmt_Cmpnt_id%type,
    EqpmtCmpntName Equipment_Component.EqpmtCmpntName%type,
    Parent_Eqpmnt_ID Equipment_Component.Parent_Eqpmnt_ID%type,
    Eqpmt_id Equipment.Eqpmt_id%type,
    vehicleId NUMBER);
    EQP_rec EQP_record;
    CURSOR EQP_cursor IS
    select a.Vehicle_iD,c.Eqpmt_Cmpnt_id,b.Eqpmt_id,c.EqpmtCmpntName,c.Parent_Eqpmnt_ID
    from Vehicle a,Equipment b,Equipment_Component c
    where a.Vehicle_iD=b.Vehicle_iD
    and b.Eqpmt_id=c.Eqpmt_id
    and a.vehicle_id=&EQP_rec.vehicleId;
    BEGIN
    OPEN EQP_cursor;
         FETCH EQP_cursor INTO EQP_rec;
         dbms_output.put_line(EQP_rec.Vehicle_iD,EQP_rec.Eqpmt_Cmpnt_id||','||EQP_rec.Eqpmt_id||','||EQP_rec.EqpmtCmpntName||','||EQP_rec.Parent_Eqpmnt_ID);
    CLOSE EQP_cursor;
    END;
    END;

  • How can I filter the rows displayed on an ADF Table ? pls help urgent..

    Hi All,
    I have a page with ADF readonly table, based on who is logging in I want to filter the rows to be displayed when the page is firstly loaded. This page is called from the main menu.
    I have created a custom method in the Application Module Impl :
    public void setInvoiceFilter () {
    ViewObject vo = findViewObject("BrowseInvoice1");
    ViewCriteria vc = vo.createViewCriteria();
    ViewCriteriaRow vcr1 = vc.createViewCriteriaRow();
    vcr1.setAttribute("Userid","xxxx");
    vc.add(vcr1);
    vo.applyViewCriteria(vc);
    vo.executeQuery();
    The question is : where and how should I call this method ?
    is this a correct approach ?
    Thank you very much for your help,
    xtanto

    I assume you're talking about a JSF application.
    I think you should be able to do this in the constructor of a backing bean.
    1) Add an operation binding, bound to your service method, to the page's pageDefinition.
    2) On the JSF page flow Overview tab, add a managed property to the backing bean. Call it, say, myMethod, give it type oracle.bindings.OperationBinding, and give it the value #{bindings.nameOfYourOperationBinding}
    3) Add a myMethod field of type OperationBinding, with getter and setter, to your backing bean class.
    4) In the backing bean class's constructor, add code like:
    myMethod.execute();This will execute the method every time the page is loaded.
    Now, if you want to execute the method only the first time the page is loaded, it's a bit trickier. You need to set, and use, a session variable:
    Map sessionVars = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
    if (sessionVars.get("hereBefore") == null)
      myMethod.execute();
      sessionVars.put("hereBefore", "true");
    }

  • How can i know the row number of my table is being modified?

    HI all,
    I have a table in my web dynpro and several columns as checkbox... I put an event OnToggle in these columns.
    Do you know any way to get the row or the row number?
    If i use the method get_static_attributes return to me the selected row not the modified.
    Thanks in advance !

    EDIT: thanks ! is solved, i need to pass CONTEXT_ELEMENT' in the  <ELEMNT_NAME>
    This is my code:
    DATA table_element TYPE REF TO if_wd_context_element.
      DATA row_index TYPE i.
      table_element = wdevent->get_context_element('CONTEXT_ELEMENT').
      IF NOT table_element IS INITIAL.
        row_index = table_element->get_index( ).
      ENDIF.
    Edited by: Husalban RM on Sep 15, 2010 4:53 PM

  • How can I restrict the rows of a SELECT which uses analytical functions?

    Hello all,
    Can anyone please tell me how to restrict the following query:
    SELECT empno,
    ename,
    deptno,
    SUM(sal) over(PARTITION BY deptno) sum_per_dept
    FROM emp;
    I would need just the lines which have sum_per_dept>100, without using a SUBSELECT.
    Is there any way which is specific for analytical functions?
    Thank you in advance,
    Eugen
    Message was edited by:
    misailescu

    SQL> select empno,
      2  ename,
      3  deptno,sum_per_dept
      4  from
      5  (
      6  SELECT empno,
      7  ename,
      8  deptno,
      9  SUM(sal) over(PARTITION BY deptno) sum_per_dept
    10  FROM emp
    11  )
    12  where sum_per_dept>1000;
    EMPNO ENAME      DEPTNO SUM_PER_DEPT
    7839 KING           10         8750
    7782 CLARK          10         8750
    7934 MILLER         10         8750
    7902 FORD           20         6775
    7369 SMITH          20         6775
    7566 JONES          20         6775
    7900 JAMES          30         9400
    7844 TURNER         30         9400
    7654 MARTIN         30         9400
    7521 WARD           30         9400
    7499 ALLEN          30         9400
    7698 BLAKE          30         9400
    12 rows selected
    SQL>
    SQL> select empno,
      2  ename,
      3  deptno,sum_per_dept
      4  from
      5  (
      6  SELECT empno,
      7  ename,
      8  deptno,
      9  SUM(sal) over(PARTITION BY deptno) sum_per_dept
    10  FROM emp
    11  )
    12  where sum_per_dept>9000;
    EMPNO ENAME      DEPTNO SUM_PER_DEPT
    7900 JAMES          30         9400
    7844 TURNER         30         9400
    7654 MARTIN         30         9400
    7521 WARD           30         9400
    7499 ALLEN          30         9400
    7698 BLAKE          30         9400
    6 rows selected
    SQL> Greetings...
    Sim

  • How can I set the row height in iCal

    Hi,
    I have a job that has odd hours, some at 0800 in the morning, some at 2100 at night. To keep track, I use iCal.
    On the monitor of my 13" MacBook, the iCal window only shows 11 or 12 hrs max of each day. I can zoom in or out, which makes the window bigger and smaller, higher and lower, but the iCal data adjust size with it. I can never see a whole day, i.e. 14 hours at once.
    How do I make iCal display more than 11.5 hours of the day?
    Axel

    I found the answer here: https://discussions.apple.com/message/16323733#16323733

  • How can I get the selected rows from two ALV grids at the same time?

    I have a program that uses two ALV grids in one dialog screen. I'm using the OO ALV model (SALV* classes).
    The user can select any number of rows from each grid. Then, when a toolbar pushbutton is pressed, I'd have to retrieve the selected rows from both grids and start some processing with these rows.
    It is no problem to assign event handlers to both grids, and use the CL_SALV_TABLE->GET_SELECTIONS and CL_SALV_SELECTIONS->GET_SELECTED_ROWS methods to find out which rows were marked by the user. Trouble is, this only works when I raise an event in each grid separately, for instance via an own function that I added to the grid's toolbar. So, I can only see the selected rows of the same grid where such an event was raised.
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.
    As it is right now, I can have an own button in both grid's toolbar, select the rows, click on the extra button in each grid (this will tell me what entries were selected per grid). Then, I'd have to click on a third button (the one in the dialog screen's toolbar), and process the selected rows from both grids.
    How can I select the rows, then click on just one button, and process the marked entries from both grids?
    Is it somehow possible to raise an event belonging to each grid programmatically, so that then the corresponding CL_SALV_SELECTIONS->GET_SELECTED_ROWS will work?
    Thanks.

    Hello Tamas ,
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.--->
    is it possible to  have a check box in each grid  & get the selected lines in PAI of the screen ?
    regards
    prabhu

  • How can i get the failed row numbers in batch insertion?

    Afeter execution of batch insert operation into a table, i use OCIAttrGet() to get the error number of insertion, as expected, it returns the correct number. however, when i use OCIParamGet() to get an error handle and then to get the exact failed row numbers , OCIParamGet() returns -2 , means "INVALID_HANDLE". can anyboy tell me why ? how can i get the exact failed rows?
    the snapshot of my code :
    int errNum = 0;
    int nRet = 0;
    nRet = OCIAttrGet((dvoid *)m_pIIOdbc->m_pStmtAll,OCI_HTYPE_STMT,&errNum,
              0,OCI_ATTR_NUM_DML_ERRORS, m_pIIOdbc->m_pErrHandle);
    if (errNum)
         OCIError* pErrHndl;
         int* pRow_off = new int[errNum];
         for (int i = 0; i < errNum; i++)
         nRet = OCIParamGet(m_pIIOdbc->m_pErrHandle,
    OCI_HTYPE_ERROR, m_pIIOdbc->m_pErrHandle, &pErrHndl, i + 1);
         nRet = OCIAttrGet (pErrHndl, OCI_HTYPE_ERROR, &pRow_off, 0,
         OCI_ATTR_DML_ROW_OFFSET, m_pIIOdbc->m_pErrHandle);
              delete []pRow_off;

    now the code is :
    OCIEnv      *m_pEnvHandle;                    
    OCIError      *m_pErrHandle;                         
    OCIError     *m_pErrHandle2;                    
    OCIServer *m_pSrvHandle;                         
    OCISvcCtx *m_pSvcHandle;                         
    OCIStmt *m_pStmtExec;
    OCIStmt *m_pStmtAll;
    OCIError** m_pErrorHndl;     
    int* m_pRowOff; //the array that will contain the failed row numbers
    int     m_nArrayLength; //length of array in once batch operation
    int m_nErrNum; //error number
    int m_nSucCount; //successful record number
    //initialization
    //m_nArrayLength is a parameter passed in, so i can not tell the exact length of the array, dynamic space allocation is needed
    m_pErrorHndl = new OCIError*[m_nArrayLength];
    m_pRowOff = new int[m_nArrayLength];
    //execution
    OCIStmtExecute(
              m_pSvcHandle,
              m_pStmtAll,
              m_pErrHandle,
              (ub4)m_nArrayLength,
              (ub4)0, (OCISnapshot *)NULL, (OCISnapshot *)NULL,
              OCI_BATCH_ERRORS
    //get successful records number
    m_nSucCount = 0;
    OCIAttrGet((dvoid *)m_pStmtAll,OCI_HTYPE_STMT,&m_nSucCount,
              0,OCI_ATTR_ROW_COUNT, m_pErrHandle);
    //get error numbers
    m_nErrNum = 0;
    OCIAttrGet((dvoid *)m_pStmtAll,OCI_HTYPE_STMT,&m_nErrNum,
              0,OCI_ATTR_NUM_DML_ERRORS, m_pErrHandle2);
    //get failed row numbers into the array
    if (m_nErrNum)
              //get failed row numbers into the array
              for (int i = 0; i < m_nErrNum; i++)
                   //initiallize error handles               OCIHandleAlloc((dvoid*)m_pEnvHandle, (dvoid**)&m_pErrorHndl,
                        OCI_HTYPE_ERROR, (size_t)0, (dvoid**)0);
                   OCIParamGet(m_pErrHandle, OCI_HTYPE_ERROR, m_pErrHandle2, (void**)&m_pErrorHndl[i], i);
                   OCIAttrGet (m_pErrorHndl[i], OCI_HTYPE_ERROR, &m_pRowOff[i], 0,
                                            OCI_ATTR_DML_ROW_OFFSET, m_pErrHandle2);
    now, if batch insert is executed, eg, there are 10 records to be inserted, thus m_nArrayLength is set to be 10. There are 5 records of the 10 have exist in database, so some of insert operations will fail. After execution, m_nErrNum is 5, and i can get the failed row numbers.Everything seems go well.
    However, if batch updata is excuted, eg, 10 records to be updated, m_nArrayLength is set to be 10, and also there are 5 records of the 10 have exist in database. After execution, the OCIStmtExecute() returns 1, m_nErrNum got by
    OCIAttrGet((dvoid *)m_pStmtAll,OCI_HTYPE_STMT,&m_nErrNum,
              0,OCI_ATTR_NUM_DML_ERRORS, m_pErrHandle2)
    is 0, and m_nSucNum is 5. Why?? how can I get the rows that fail? i have to know which rows do not exist in database??

  • How can i sort the RowSet?

    I have the 2 (master and detail) entity objects, and corresponding 2 (master and detail) view objects.
    Then i've generated the entity object class for the master EO, this class has methods of getting/setting EO attributes, and method for getting a row iterator for the detail object:
    /**Gets the associated entity oracle.jbo.RowIterator */
    public RowIterator getDetailEO() {
    return (RowIterator)getAttributeInternal(DETAILEO);
    Also in that entity object class i've created a method which gets the rows of the detail table, that correspond to the master record, and perform different action on these detail rows:
    RowSet detailRowSet = (RowSet)getDetailEO();
    detailRowSet.executeQuery();
    The question is - How can i sort the rows in that detail RowSet, i.e. order them by their Id? I know that sort operations can be performed on the ViewObjects, but i can't get detail VO from this RowSet.
    Is there a method of sorting/ordering rows in the RowSet?

    You can actually have methods in the VO that access details from the master and vice versa - you define the generation of these methods in you ViewLink properties.
    http://download.oracle.com/docs/html/B25947_01/bcquerying010.htm#sthref327

  • I can't get the row number of the current selection

    Hi all,
    How can I get the row number of a selection if I don't know the range selected? I need it to store in variable.
    I've tried in many ways, but unsuccesfully.
    Thank's in advance.

    If you already know the document's name, the sheet's name and the table's name, the easy way is :
    --Here you may replace the three values by the current ones
    set dName to 1
    set sName to 1
    set tName to 1
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    tell first cell of the selection range to set {rowNum1, columnNum1} to {address of its row, address of its column}
    tell last cell of the selection range to set {rowNum2, columnNum2} to {address of its row, address of its column}
    end tell
    Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:22:21

Maybe you are looking for

  • Can I convert a book made in iPhoto to a quicktime movie for the web?

    Hi, Please help, I have a great book that I have made in iPhoto and had printed but would like to post it to my mac website for people to be able to view with all the photos, titles, and audio. Is this possible? Thanks. Jim

  • My security question answers don't work, how do I change them?

    I have 4 computers synced to my iTunes account.  It asks me security questions to which I know the answers, but every time I put them in, they are incorrect.  I obviously have 2 computers that work perfectly to download, purchase, make CD's etc.  But

  • Can we call a method by inferring a type ?

    Hi, Pardon my ignorance. Why doesn't type inference help in writing code like this ? <code> public class TypeInferredMethodCall { private interface Base {      public void x(); private static class Derived implements Base {      public void x(){ stat

  • Entourage 2008 and Mavericks OS

    Hi, Since I installed Mavericks I have had problems with Entourage 2008, which I have as part of Office for Mac 2008. 1st, when Entourage starts up, it starts in a "Compose new email" status, with the address block and a blank email. There is nothing

  • Manual BRS, plz urgent

    Dear all, Im facing problems when im preparing manual bank reconciliation statement from T-codes FF67, ->we created 3 GL Accounts(1) outgoing cheques clearing account                                          (2) incoming cheques clearing account