Current column in af:table

Dear Experts,

I use JDev 11.1.1.7.0. I have a task to create a button that does something with the name of the column that is currently selected in an af:table component.

How can I get the name of the column that is currently selected in a bean?

Thank you for your time and consideration, Atanas.

Hello

You can use the method getSelectedColumns of the richeTableau. (With the help of the binding table or findComponentInRoot)

After that, you will need to browse this collection and use the method of findComponentInRoot of JSFUtils (and Pier to the RichColumn component) to find the column as this method returns the ID of the selected columns.

Name of the column is in the RichColumn getHeaderText method.

Kind regards

Ruben.

Tags: Java

Similar Questions

  • Disable the previous dating date picker in the column in a table

    can someone please help.

    on the date column in a table, need to disable previous dates.

    Current functionality. But when the validation page gets updated and the user is able to select earlier dates.



    To restrict the datePicker for new lines changed the URL of the button 'Add Row '.

    javascript:myAddRow();

    In the page edit, I added this to "Javascript > function and Variable global statement.

    function myAddRow()

    { apex.widget.tabular.addRow();

    $("td[headers='DETAIL_DATE'] input:last")

    .datepicker("option","changeMonth",false)

    .datepicker("option","minDate",$v("P2_MASTER_MONTH_MINDATE"))

    .datepicker("option","maxDate",$v("P2_MASTER_MONTH_MAXDATE")); };

    https://Apex.Oracle.com

    w/u/p: nani5048/test/test

    App 92603 5 page

    Thank you

    Nani

    I created a dynamic action

    the loading of the page

    $("td [en-têtes = 'STATUS_DATE'] entrée")

    . DatePicker ("option", "minDate", $v ("P5_MASTER_MONTH_MINDATE"));

    as well as the global javascript function

    function myAddRow() {}

    apex.widget.tabular.addRow ();

    $("td [en-têtes = 'STATUS_DATE'] entrée")

    . DatePicker ("option", "minDate", $v ("P5_MASTER_MONTH_MINDATE"));

    }

  • How to set the value of a column in a table according to another column?

    Hello world!

    I use Apex 4.1.
    My question is how can I set the value of a column in a table according to another column?
    I have a table and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    I tried to use javascript as
     $('input[name=f02]').live('change', function(){
    if($(this).val()!='1'){
    $('input[name=f03]').val("test")}
    }); 
    for the development of the column note to test if the value typed in the content of the column is not 1, but this code assigns the value to all the lines and I need to set only the specified line.

    Can someone give me a hint in any way to do this if possible?

    Kind regards
    drama9346

    You will need create a process on your page type PLSQL and develop this process "we demand" of the page. In this process, you can run the PLSQL you need. That is to say to retrieve the note value as described in your PC:

    and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    In this process, you must provide a return value of the call, and you can do this by using htp.p. Example:

    DECLARE
       --putting x01 in a var to simplify
       l_test_var VARCHAR2(200) := apex_application.g_x01;
       l_return VARCHAR2(200);
    BEGIN
       -- a simplistic test
       IF LENGTH(l_test_var) BETWEEN 10 AND 20 THEN
          l_return := 'String is between 10 and 20';
       END IF;
    
       --this will write l_return to the buffer, and the ajax callback will receive this
       htp.p(l_return);
    END;
    

    And the code that I wrote above, which is javascript, would need to go where your current code is that binds to the onchange event. The result should be that, when a change is made to this element, an ajax request is made on the server. When the call is finished, it will be the value returned in the item you want.

  • SQL-modify the columns in a table

    I need to change a column in a table exiciting in production,

    What are the steps I need to follow before using below command

    ALTER TABLE table_name modify column_name data_Type;

    Hello

    If you want to increase the size that existing then you can try what you did...

    You cannot change datatype below what - this current...

    SQL> alter table test modify emptype varchar2(30);
    
    Table altered.
    
  • How to set current row in the table after use the button tab on inputText

    Hi all
    My first post.., I am beginner in ADF and I'll try to explain my problem.

    For now we use ADF 11 g (11.1.1.4), in a jsff page I have a table with a column of inputText.
    On the the inputText valueChangeListener, I invoke a method in a bean viewScope that call an EJB method, make some services to the EJB on the modified line. After that, I update the VO and the table (because other values in the row have been changed) and reset the focus on the inputText even modified by the user with javaScript, because the focus was lost after updating.
    So far, everything works fine.

    When I use the arrow keys to change the selected line in the table, this is excellent work (focus is always in the inputText next or previous), but if the user tries the key tab allows you to change the current line, the inputText on the line that has the focus, but the current row in the table is not changed (I think that is normal).

    My question: How can I change the current line after the tab key in this case?

    I don't know if it is really clear, not easy to explain, do not hesitate to ask for more details.
    Thanks in advance.

    Hello

    My question: How can I change the current line after the tab key in this case?

    Use a client event to listen to the keyboard entry and intercept the tab. Use af:serverListener to call the server to set the rowKey on the table and deliver a PPR for the table to repaint

    See example 11 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples

    to learn more on how to use the client listener and the receiving server

    Frank

  • How to upgrade a minimum value of column column in another table?

    Hi all

    I created a few tables as below, and it need to update a column in a table with a minimum value of the column of another table...

    Scenarios explained as follows:
    CREATE TABLE T_20 (CONTROL NUMBER(10) NOT NULL,
                                PO NUMBER(10) NOT NULL,
                                AMENDNO NUMBER(3) NOT NULL,
                                FACTOR VARCHAR2(3) NOT NULL,
                                COMMENT_X VARCHAR2(40),
                                FLAG VARCHAR2(1))
    
    
    SQL> alter table t_20 add constraint t_20_pk primary key (control, po, amendno, factor);
    
    SQL> DESC T_20;
     Name                                      Null?    Type
     --------------------------           -------- --------------
     CONTROL                           NOT NULL NUMBER(10)
     PO                                     NOT NULL NUMBER(10)
     AMENDNO                          NOT NULL NUMBER(3)
     FACTOR                             NOT NULL VARCHAR2(3)
     COMMENT_X                                      VARCHAR2(40)
     FLAG                                                 VARCHAR2(1)
    
    Table altered.
    
    CREATE TABLE T_30 (CONTROL NUMBER(10) ,
                                PO NUMBER(10) ,
                                AMENDNO NUMBER(3) ,
                                FACTOR VARCHAR2(3) ,
                                AMOUNT NUMBER(10,2),
                              USER_NAME VARCHAR2(4))
    SQL> /
    
    Table created.
    
    SQL> INSERT INTO T_20 VALUES(101,1000,01,'MSC','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1000,02,'MSC','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1001,00,'NDP','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1001,01,'NDP','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(102,1002,00,'ABC','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    
    SQL>  INSERT INTO T_30 VALUES(101,1000,NULL,'MSC','400','A')
      2   /
    
    1 row created.
    
    SQL>  INSERT INTO T_30 VALUES(101,1000,NULL,'MSC','500','S')
      2   /
    
    1 row created.
    
    SQL>  INSERT INTO T_30 VALUES(101,1001,NULL,'NDP','600','I')
      2   /
    
    1 row created.
    
    SQL>  INSERT INTO T_30 VALUES(101,1001,NULL,'NDP','700','R')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_30 VALUES(102,1002,NULL,'ABC','800','L')
      2  /
    
    SQL> SELECT * FROM T_20
      2  /
    
     CONTROL     PO         AMENDNO      FACTOR     COMMENT_X         F 
    ----------         ----------    ----------        --------          --------------            ---- 
     101       1000          1       MSC       NO COMMENT           Y 
     101       1000          2       MSC       NO COMMENT           Y 
     101       1001          0       NDP       NO COMMENT           Y 
     101       1001          1       NDP       NO COMMENT           Y 
     101       1002          0       ABC       NO COMMENT           Y 
    
    SQL> SELECT * FROM T_30;
    
       CONTROL         PO     AMENDNO         FAC     AMOUNT  USER                            
    ----------      ---------   ----------   ---      ----------      ----                            
           101         1000        null         MSC        400      A                               
           101         1000        null        MSC        500       S                               
           101         1001        null         NDP        600      I                               
           101         1001        null         NDP        700       R                               
           101         1002        null        ABC        800       L                               
    NOW I WANT TO UPDATE T_30 THAT LOOKS AT BELOW:

    By top T_30 initially AmendNo pass is null in T_30. Now I want to update
    column based on a minimum value of AMENDNO in the column T_20
    best way I can explain is:

    In the table T_20
    For CONTROL 101-> there are two numbers with 1000 but with different Amendno like 1, 2 in.
    and
    In the T_30 Table for CONTROL 101-> there are two IN. with 1000 but currently null. REQUIREMENT IS NOW
    THE TWO DOCUMENTS SHOULD BE UPDATED WITH MIN (AMENDNO) FOR THIS CONTROL T_20. IN THIS CASE FOR THIS CONTROL
    101 MIN (AMENDNO) IS '1' (1, 2)

    SO 101 RECORDS (BOTH) OF NOW T_30 SHOULD BE UPDATED WITH '1' AS AMENDNO

    Once again 101 now have one another IN '1001' with two different 0.1 IN. now T_30 AmendNo should be updated with min (0.1) which is
    '0'

    production is expected to be lower after update:
    SQL> SELECT * FROM T_30;
    
       CONTROL      PO              AMENDNO  FAC     AMOUNT      USER                            
    ----------       ----------   ----------      ---        ---------     ----                            
           101       1000         1          MSC        400                      A                               
           101       1000         1          MSC        500          S                               
           101       1001         0          NDP        600           I                               
           101       1001         0          NDP        700           R                               
           101       1002         0          ABC        800           L  
    Propose any query pls...

    Thanks in advance...

    I'll try level better to format the pure code in the post...

    Concerning
    Prasanth

    Try this

    update t_30 x
       set amendno = (
                       select amendno
                         from (
                                select control, po, factor, min(amendno) amendno
                                  from t_20
                              ) y
                        where x.control = y.control
                          and x.po = y.po
                          and x.factor = y.factor
                     )
     where exists (
                       select amendno
                         from (
                                select control, po, factor, min(amendno) amendno
                                  from t_20
                              ) y
                        where x.control = y.control
                          and x.po = y.po
                          and x.factor = y.factor
                 )
              
    
  • Select cursor for update: multiple columns of different tables

    Hello

    I have two tables test1 and test2. I want to udpate the column (DEPT_DSCR) from the TEST1 and TEST2 using select for update and current tables of the... with the cursor.

    I have a code drafted as follows:
    DECLARE
    v_mydept1 TEST1. TYPE % DEPT_CD;
    v_mydept2 TEST2. TYPE % DEPT_CD;
    CURSOR C1 IS SELECT TEST1. DEPT_CD, TEST2. DEPT_CD OF TEST1, TEST2 WHERE TEST1. DEPT_CD = TEST2. DEPT_CD AND TEST1. DEPT_CD IS 'AA' FOR THE UPDATE OF TEST1. DEPT_DSCR, TEST2. DEPT_DSCR;
    BEGIN
    OPEN C1;
    LOOP
    FETCH C1 INTO v_mydept1, v_mydept2;
    WHEN EXIT C1% NOTFOUND;
    UPDATE TEST1 SET DEPT_DSCR IS "PLSQL1" WHERE CURRENT OF C1;.
    SETTING A DAY TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1.
    END LOOP;
    COMMIT;
    END;

    The code above when it is run, declares that it runs successfully. But it does not update the columns you want [DEPT_DSCR].

    It works only when we want to update one or more columns of the same table... i. e by providing these columns after ' to UPDATE THE.
    I don't know what exactly is the problem when you want to update several columns of different tables.

    Can someone help me on this?

    user12944938 wrote:
    But it's more the notion of compensation and understanding.

    See the link below:
    http://download.Oracle.com/docs/CD/B10501_01/AppDev.920/a97269/pc_06sql.htm

    See the section RESTRICTION in the link above.

    Twinkle

  • RollbackToSP will be working if the column in the table has been abandoned?

    Hi all

    I would really appreciate an opinion on these two scenarios in OWM.

    Scenario one

    Steps to follow:



    Savepoint1, created may 20
    DIAL THE DBMS_WM. CreateSavepoint ('LIVE', 'RRR_Test');


    May 21 change us a table with version:


    DBMS_WM EXEC. BEGINDDL ('users');



    -remove unused column

    ALTER table drop column field users_LTS;



    EXEC DBMS_WM.COMMITDDL ('users');



    3 roll back at the point of backup created on 20 may
    DIAL THE DBMS_WM. RollbackToSP ('LIVE ',' RRR_Test);





    End of the scenario



    Question: Will the OWM correctly changes rollback made to the schema of the table USERS?









    Second scenario





    1 Savepoint1 created may 20
    DIAL THE DBMS_WM. CreateSavepoint ('LIVE', 'RRR_Test');



    May 21 change us a table with version:


    DBMS_WM EXEC. BEGINDDL ('users');



    -remove unused column

    ALTER table drop column field users_LTS;



    EXEC DBMS_WM.COMMITDDL ('users');



    3 roll back at the point of backup created on 20 may
    (1) add the domain of the column to the schema

    (2) rollback
    DIAL THE DBMS_WM. RollbackToSP ('LIVE ',' RRR_Test);



    End of the scenario



    Question: given that the pattern is exactly the same as it was originally, this will work?


    Your ideas are welcome.

    Thank you

    Serge

    Published by: sbornow on May 27, 2009 11:29

    Hi Serge,

    When you add the column to the table, it will be added to all versions/workspaces for this table. All of the current versions, as well as all the historical lines, will contain this new column with a null value or the default value.

    None of DBMS_WM restore procedures will be affected by the DDL changes, or a restore will return all DDL changes made since the backup was created. A backup point cannot become invalid. The restoration works on the level of the line, based on the columns of the primary key (which is not editable by the DOF). So the resulting table will have the same lines as he did at the time that the backup point has been created, adjusted for any changes in the column that has been done on the non-primary key columns.

    Kind regards
    Ben

  • How to remove columns from the table on the master 1-0?

    I have an array of 96 columns with strings. I also have the array of int 96-elemets (mask) with 1 and 0.

    What I want to do is to is to remove (or hide - but I read that it is not possible) all the columns with index corresponding to 0 in the mask table.

    example:

    columns in the table

    1 2 3 4 5

    mask

    0 1 0 0 1

    I want to remove the columns 1, 3 and 4 and leave only 2 and 5 in my table.

    How can I do?

    If I create loop for with i as the index of the column, when I do DeleteTableColumns() columns number decreases, and I get an error of range out of

    Or do I have an option to hide the unnecessary columns (not set their width to 1, it's very ugly-looking)?

    Please help me (())

    Hello rovnyart!

    1. removal of columns in the table:

    I suspect that the reason why you get the out-of-range error is due to fact that in your loop, you delete the columns in the table, you'll eventually end up by referring to a column that no longer exists, because the other columns before it have been deleted. While you remove each column of your table in the loop for example, the column index number will move, because you deleted the other columns in front of her.

    To resolve this, even if you delete a column in your loop, make sure that you take also into account that the index of the column is moved because of the removed columns.

    2 hide columns in table:

    You can use the ATTR_COLUMN_VISIBLE attribute to hide columns in the table:

    http://forums.NI.com/T5/LabWindows-CVI-idea-exchange/add-attr-column-visible-attribute-for-table-Col...

    http://zone.NI.com/reference/en-XX/help/370051Y-01/CVI/uiref/cviattrcolumnvisible_column/

    3 alternatives:

    Note that another alternative would also use a tree instead, control as the tree control also supports the hidable columns:

    http://forums.NI.com/T5/LabWindows-CVI/table-hide-column/TD-p/569773

    Best regards!

    -Johannes

  • How to calculate the sum of the values of some columns in a table

    Hello

    I want to get the column just the average of the values of some columns not all columns of the table.what I have to change exactly in this block diagram.even if the table size is 25 average, I want the division as the number of values in each column (= number of lines)

    just like that:


  • How can, during the collection of data, start a new column in my table every 100 data points?

    Hello! I have a problem with my data - I get in a wide range of 1 x 1000, but it's the repeated measures, each taking about 500 data points. I want to break this table for this data string start a new column in my table every 500 points given. I don't know how to do it-please help!

    datacompiler100 wrote:

    Hey thanks for the sponsor and the first off I must apologize for the State, I am attaching my VI. I put the part of the VI that I am working on (my team has access, so didn't post everything here) and also attached the data file (when just written in a spreadsheet file, not through the attached VI). I want to convert the long row of data and then start a new column every 50, 100, 5 points (user-defined).

    Using the data from the file, you can reshape everything simply (as you already!), followed by transposition (since you want columns instead of rows). 2D arrays must always be rectangular, so the last column is filled with zeros if necessary. Is that what you want?

    Of course if you try to add a new column in a file, that will not work. You can only add lines in an existing file because of the way the data is organized. To add columns, the entire file must be read, intertwined and all re-written new data in the file.

  • How can I insert a number to a specific index (row and column) to a table

    I had the most with function 'insert into array' problem because of its counter-intuitiveness. I want to insert a number I got inside a loop IN a table. The ROW and COLUMN of this table I want enter the number is specified by the number of loops of two loops FOR. It did not work.

    So, I have isolated and tested this function further. Frankly, I initialized a table 2D with ZEROS and plugged into the "insert into array" function (on top of entry). I then put the number '1' for the index (line) and the number "2" for the index (column) and then put the entry number "6" for the "new item/sub-table. Then, I hung a picture of 2-D (indicator) output to the output of the function "insert into array. When I did all that, it means I want to just put the number '6' in line '1' and the column '2'... This isn't letting me do it.

    How can I do this SIMPLE?

    Hi Darrell h...,

    Looks like you can use the function "autoindexing. Take your value and connect it to your loop, it will be a default autoindexing. Right-click on the last tunnel of output and select Create indicator, the result is your table.

    It will be useful.

    Mike

  • histogram with just a few columns from a table

    I want to get a histogram of a few columns from a table (4 - 6-... 22)


  • Insert columns to a table in another

    How can we insert the columns in a table in another table, to every strange place this table in which inserts must be made? In short, the columns of a table into another table bt possibly between the table already detected.

    Here's an example, feel free to ask the question if it is not clear to you.

    It may be useful

  • Insert a column in the table (perhaps a silly question?)

    This may seem a stupid question, but is - it possible in Labview to insert a new column in a table that is established? For example, if I have a 2 column table is it possible to insert a new column between two columns? If not is there another tool such as a table or something I should use, and how do you use it?

    Thank you

    Hi LV.

    Use the Vi 'insert Array"as shown:

    RGS,

    Lucither

Maybe you are looking for