Selectively hiding a row in a Table based on the value of the column

I have a data control that is populated from pro-grammatically, based on the user's selection in the page one of wanting to hide some lines on page 2 at the same time, I don't want to delete the value binding, is there to hide the lines instead of column?

To the table of the ADF, to hide the lines according to the requirement, use the visible property on each of the columns.

For example, if you do not want to display all the lines that have IDs Director like 200 or 201.

 
                        
                            
                                
                            
                        
                        
                            
                        
                        
                            
                        
                        
                            
                        
                    

Thank you
Nini

Tags: Java

Similar Questions

  • Comparison of the data of several rows in a table - based on the primary key

    Currently I have a select statement that returns hundreds of records.  Each returned record is linked to A NUMBER of ORDER this order number has a recipe.  (a bit like a cooking recipe).  Each recipe has many records in the database related to this order number and records should be compared to records in a table that bind to a specific primary key...  (I have already developed the logic to isolate what PK I need).  If all these records that are returned by the select statement below does not match all the records containing PK in the table below, I need to get the next PK and compare all these recordings for select statements return.

    See below for a better understanding. Need a good example detailed on how to solve my problem here.

    Just to help you understand:

    Each element of the recipe is 3 parts (side, ref_des, part_number).  1 single recipe can have several parts (where the part_number), and each of these pieces should be placed on the lower side or top of the Board that is there "side" comes into play.  Same thing with Ref_Des.

    What is going on

    Select statement returns the RECIPE of ORDER NUMBER A.  There will be multiple records returned by this query.

    Select the Return statement:

    • Side
    • Ref_Des
    • Part_Number

    Example of return:

    B c17 75145-2

    T f14 89242-8

    B s12 45123-3

    etc,

    In general - what I need to do:

    There is a table called AUTO_RECIPE_DETAILS.  I take all of the records returned by the select query above and compare for each record in this table relating to the recipe 30319-000001.  30319-000001 a number of records.  It is the primary key for a whole recipe as seen above.  This primary key is bound the number of data records in this table.  The comparison is to see if all records under RECIPE_NAME 30319 -000001 match all the records returned by the select statement.

    IF IT DOES NOT MATCH: recover the following recipe in this table below 30319 -000002 and make the same comparison.

    Here's a perfect example of what the table looks like: (AUTO_RECIPE_DETAILS)


    RECIPE_NAME SIDE REF_DES PART_NUM

    -30319-000001 C16 87595-1 B

    -30319-000002           T B14 74150-4

    -30319-000001 T B14 34251-2          

    -30319-000001            T F24 84180-7

    -30319-000002 T B12 13710-8          



    It is the solution to my original question.  By this thread, it's the right answer and I hope this helps someone who is trying to compare two arrays element-by-element.  In the end, the advice given in this thread were correct and I will be using all of your suggestions and the scrapping of this.  Thank you everyone for your help though.

    FOR index_p IN pid_recipe. FIRST... pid_recipe. LAST

    LOOP

    Result WHEN the OUTPUT = 1;

    FOR index_d IN details_recipe. FIRST... details_recipe. LAST

    LOOP

    IF (pid_recipe (index_p). SIDE = details_recipe (index_d). SIDE)

    AND (pid_recipe (index_p). REF_DES = details_recipe (index_d). REF_DES)

    AND (pid_recipe (index_p). PART_NUM = details_recipe (index_d). PART_NUM)

    THEN

    EXIT;

    ON THE OTHER

    DBMS_OUTPUT. Put_line("IT WAS NOT a MATCH");

    result: = 1;

    EXIT;

    END IF;

    END LOOP;

    END LOOP;

    DBMS_OUTPUT. Put_line('LOOP OUT');

  • Select all radio buttons in a table based on the value of selectOneChoice

    Hi all

    I have a selectOneChoice with two values

    positive i.

    II. negative

    1.png

    created vo and am

    I have an adfTable with selectOneRadio added as a transitional attribute.

    The table is created on the vo.

    2.png

    what I have to do is, when the user select positive of selectOneChoice all the positive radiobutton in the adfTable must be selected and the same for negative also.

    3.png

    I can get the value of the selectOneChoice in the bean using valueChangeEvent.

    But I need assistance in the selection of all positive values in adfTable using the selectOneChoice value.

    Reference would be useful.

    Thank you very much

    Kind regards

    Jean-Felix

    Hi all

    Let me post the answer, hope this helps someone.

    selectOneChoice

    Positive P

    N negative

    on selectOneChoice event ValueChangeListener

    to loop through the rows of the adfTable

    If valueChangeEvent.getNewValue () is equal to 'p '.

    Assign PositiveRadiobtn attribute 'p '.

    otherwise set it to "n".

    Kind regards

    Jean-Felix

  • Select/deselect all rows in a table

    Hi Experts,

    11.1.2 JDEV


    I have a form in which a richeTableau with only two Columns.Also a radio button group with two point (select all / deselect all).

    My use is,

    When I select the option button, if it is SELECT ALL, all lines must be selected
    If it's ALL DESELECT, all lines are deselection

    Current follwing method is used for all the ranks of selection,

    {} public void selectAllRowsInTable (rt richeTableau)
    RKS RowKeySet = new RowKeySetImpl();
    Model CollectionModel = (CollectionModel) rt.getValue ();
    ROWCOUNT int = model.getRowCount ();

    for (int i = 0; i < rowcount; i ++) {}
    model.setRowIndex (i);
    Key of the object = model.getRowKey ();
    RKS. Add (Key);
    }

    rt.setSelectedRowKeys (rks);
    }

    is there a simple alternative way to select/deselect all rows in a Table?

    Thankz in advance

    PMS

    Hello

    If you do not want to do in the view layer, this is the way to go. However, if you use BC as a model, you can have a transition attribute in the original Version (with the Boolean type) and set its value to true / false based on the checkbox.

    Arun-

  • divide the table based on the number of lines

    Hello

    I am trying to split a table based on the number of lines and then treat.
    Say I have a TEST_XXX table that contains 50 lines, what I would do is.
    to access multiple lines of 10. How can we achieve this?

    What I thought is, once the table is created and the line are filled.
    Add a new column to the table and perform a procedure that inserts of 1 to 10 first lines
    and 2 to 10 lines and 3 to 10 next ranks... etc. Based on this, that we can treat
    the first set of lines then play next or etc...

    is there a better way to do it?

    Code to create the table:
    CREATE TABLE TEST_XXX
    (
      A_ID   VARCHAR2(10),
      B_ID   NUMBER,
      c_ID   VARCHAR2(10),
      D_ID   NUMBER
    )
    Code to add lines:

    DECLARE
    BEGIN
      FOR I IN 1..50
      LOOP
          INSERT INTO TEST_XXX VALUES('ABCDE',123,'ZYXWV',321);
      END LOOP;
      COMMIT;
    END;
    The original problem is, I have a huge table, and I write a sql query to process,
    When I treat him by selecting all the values in the table, it is very slow.
    But when I have treat small Coulon (say 100 rows), it works very well.
    That's how I got the approach described above in mind.

    You can use NTILE.

    See:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions101.htm#SQLRF00680
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:47910227585839

  • Is there an easy way to filter a 2D table based on the values in two fields?

    Y at - it an easy way to filter a 2D table based on the values of one of the fields. In my attached VI the output array has the following format:

    Ident Frame Type bytes TimeStamp data

    10:57:07.621 3AD00016 POUVEZ 8 0000000000000000 data frame

    10:57:07.622 3AD00017 CAN data frame 8 000005E000000000

    10:57:07.624 3AD00018 POUVEZ 8 0000000003300000 data frame

    10:57:07.625 2DC00000 POUVEZ 8 0000000000000000 data frame

    10:57:07.626 3AD00019 POUVEZ 4 0000030000000000 data frame

    I would like to delete all lines that do not have an "Ident" between the values of 3AD00000 and 3AD0001E. So for the data above the fourth row would be removed. The only way I can see to do this is to form a 1 d table. Is there a better approach?

    Thank you.

    Hi chuck72352,

    After you've sorted your data, you can use the function InRange. Combined with a "search in 1 table D", you get the range you really want.

    Mike

  • insert into the table based on the difference in line (or using less)

    Hello

    Oracle Version: 11g

    Operating system: Solaris 10.

    I was wondering if it is possible to insert data in a table based on the operator 'less' Please?

    We have a very large table in a database, we moved to a different database. The table is cleared by a line for a certain range of dates, and we wondered if it is possible to insert this line of data in the remote database using the difference of rank between the two tables.

    Here's the query that we are running:

    SELECT ID , TO_CHAR (creation_datetime, 'yyyy-mm-dd')
    from TABB10 
    where TO_CHAR (creation_datetime, 'yyyy-mm-dd')='2014-03-18' 
    minus 
    SELECT ID , TO_CHAR (creation_datetime, 'yyyy-mm-dd')
    from TABB10@TABB_LINK.APDB00 
    where TO_CHAR (creation_datetime, 'yyyy-mm-dd')='2014-03-18'
    

    TO_CHAR (CR ID

    ---------------------- ----------

    2.4111E + 17-18 / 03 / 2014

    Any ideas please?

    Thank you

    If I don't get me wrong, you can insert as below

    INSERT INTO REMOTE_TABLE@DBLINK

    SELECT ID, TO_CHAR (creation_datetime, "yyyy-mm-dd")

    of TABB10

    where TO_CHAR (creation_datetime, 'yyyy-mm-dd') ='' 2014-03-18

    less

    SELECT ID, TO_CHAR (creation_datetime, "yyyy-mm-dd")

    of TABB10@TABB_LINK. APDB00

    where TO_CHAR (creation_datetime, 'yyyy-mm-dd') ='' 2014-03-18

    Concerning

  • How to update the password on the other table based on the mod

    Hello

    I need to update the password for the other table based on the mod.

    I have two table 'user' and 'reset '.


    User:

    Username username password date_exp

    s232322 Bobby John sdds4545df4r 10/12/2010
    s454566 George Bill f444556gh76 07/14/2010
    s343466 Bill Clinton fgf54tyujkkkhj 06/12/2011
    .
    .
    .


    Reset:

    Series encrypt decrypt

    fgf5656fg 0 Watellemon
    1 dfggf5665 lime juice
    dfdffd545 2 applesalad
    3 54r4gggt airlines
    construction of 4 hg44hh63
    5 fgf4343yh security
    .
    .
    .

    How can I update the password of a table to another table "reset"?

    Ex: query

    Update user set password = (select Encrypt reset where mod (length (username), 10))


    If mod (length (username), 10) is 0, it should take series "0" encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 1, it should take serial '1' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 2, it should take series '2' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 3, it should take series '3' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 4, it should take series '4' encrypt the password and update the password in the table "user".
    ....


    Please help me write an update query.




    Thank you
    Nihar

    Hi, Nihar,

    You almost had it! You just need to correlate the subquery for the main UPDATE statement, like this:

    UPDATE     user_table     u     -- USER is a built-in function; it's not a good table name
    SET     password = ( SELECT  encrypt
                   FROM    reset     -- RESET isn't a very good table name, either
                   WHERE   serial     = MOD ( LENGTH (u.username)
                                             , 10
                                   )
                 );
    
  • How to highlight the line of the ADF table based on the value of the column?

    Hi all

    I use jdev 10.1.3.4. I want to highlight a table row or a cell based on the value of the column.

    Lets say, I have a table emp with column empid, empname and sal. I want to emphasize the lines that have sal = 10000.

    How can I achieve this? Please help me with this.

    Thank you
    Abhijit

    Hello

    You want to highlight the lines? or set a different color for the lines? If it's the second, you can set the inline style based on the salary. (+ Edit: well, never mind, both are same :)) +)

    Something like

    
    

    If you want the entire line to be a different color, you have 2 options.

    1. define the same style inline for all columns in the table (good if you want to do only for a single table).
    2. create a style class and apply the styleclass based on the value of sal (preferably if you want the same behavior in all of your application).

    Arun-

    Published by: joel Ramamoorthy, October 23, 2009 16:56

  • SQL script to insert values into a table based on the type of user

    Hello

    I have a requirement where I need to insert (username, groupname) in a table based on the user name.

    We have two types of user accounts:

    (1) user name, which starts with "DV" example: "DVPATM."

    regular user 2) example: 'PATM '.

    If the user name begins with "DV" under instruction insert should kick in

    insert into < tablename > (username, groupname) VALUES (< username > ' < groupname1 >).

    otherwise below insert statement should kick in

    insert into < tablename > (username, groupname) VALUES (< username > ' < groupname2 >).

    I need to use SQL or stored only procedure.

    Please suggest

    Thanks in advance

    All things being constant, you could use decode/case just for groupname by examining the first character t the user name, for example

    insert into (username, groupname) VALUES (, (substr ( , 1, 2) the case when "DV" then else end));

    Fixed edit: value for OTHERS, as noted by Frank

  • Select the fields in the table based on the selection + valueChangeListener

    I have an af:table with selectonebooleanbox and some entry box.

    Once selected through the box of selectoneboolean lines I want to activate the input box that is initially disabled.

    I have a property called isEnabled is related to the inputBox like this

    < af:inputText value = "#{row.quantity}" disabled = "#{row.isEditable}" > "

    ValuechangeListener I can set this property to false so that the field becomes editable, but the table or list of the tobe table should refresh on the selection of each selectOneBoolean.

    Any poniters how to do this?

    JDeveloper 11.1.4 and jsf pure application (adf as display technology)

    JSF code:

    < af:table value = "#{createOpportunity.dataList}" var = 'row' "
    rowBandingInterval = binding = "#{demo.t1 '0'}" id = "t21" > "
    < af:column headerText = "Model" >
    < af:selectBooleanCheckbox text = "#{row.modelRange} '"
    Label = "Label 1"id = "sbc1" value ="#{row.selected}".
    valueChangeListener = "#{createOpportunity.enableEditing}" / >
    < / af:column >
    < af:column headerText = "Description" >
    < af:outputText value = "#{row.description}" / >
    < / af:column >


    < af:column >
    < af:inputText value = "#{row.quantity}" disabled = "#{row.isEditable}" > "
    < af:convertNumber type = "number" integerOnly = "true" / >
    < / af:inputText >
    < / af:column >
    < / af:table >

    Screw the bean code

    {} public void enableEditing (ValueChangeEvent valueChangeEvent)

    for (dataItem ModelDescription: dataList) {}
    If (dataItem.isSelected ()) {}
    dataItem.setIsEditable (true);
    }
    }
    }


    Thnks.

    Published by: Wannabe Java Guru on March 9, 2011 03:04

    Published by: Wannabe Java Guru on March 9, 2011 05:12

    Add the code snippet in the value change listener and see if help to:

    valueChangeEvent.getComponent () .processUpdates (FacesContext.getCurrentInstance ());

    That is to say

    {} public void enableEditing (ValueChangeEvent valueChangeEvent)
    valueChangeEvent.getComponent () .processUpdates (FacesContext.getCurrentInstance ());
    System.out.println ("in enableEditing");
    selectedDataList = new ArrayList ();
    for (dataItem ModelDescription: dataList) {}
    If (dataItem.isSelected ()) {}
    dataItem.setIsEditable (true);
    }
    }
    }

    Thank you
    Nini

  • Selection of a column in a table based on a value

    Hello

    I'm stuck with a little problem here. I need to fill a column based on a value. I have an xml that looks like this to make it simple. (Don't worry, I'm not managing the status of a stock of candy ;-)))
    I have to build in rtf.

    <? XML version = "1.0" encoding = "UTF-8"? >
    -< ROWSET >
    -< ROW >
    < CANDY > Bubble gum < / CANDY >
    without SUGAR < > < / SUGAR >
    < / ROW >
    -< ROW >
    < CANDY > candy cinnamon < / CANDY >
    without SUGAR < > < / SUGAR >
    < / ROW >
    -< ROW >
    < CANDY > candy Gummy < / CANDY >
    < SUGAR > < / SUGAR >
    < / ROW >
    < / LINES >


    I have a table with two columns. I need to put on the left column candy SUGAR-free"and right the"tart ".
    Is there a condition to get there. Or what I have to do two table a column next to each other and adapt if condition in the for each.

    Best regards

    Olivier

    Have the same structure of table with two columns and each conditions in each of your columns.
    Say in column1: text to be printed
    Column2: text to be printed

    Hope this is what you want

  • Filter the rows in a table, based on criteria in two columns

    Is there a way easy to filter a 2d array, based on the values in two columns? For example in my attached VI the output array has the following format:

    10:57:07.776

    Quick response:

    Convert your table 2d in a cluster table where the order of pole defines how broken are managed (first fields are equa on both serach the second point in cluster)

    Run by a kind of 1 table and convert back to a 2d array.

    Faster approach:

    Group only fields serach and an index. Do the research and then use the index to reorganize the original array.

    Ben

  • How update the column in the table based on the value selected in apex4.1

    Hi all
    I have the following tables,
    leave_type table,it has the following fields,
    1.emp_name,
    2.sick
    3.casual
    and it has the values as follows,
    emp_name                  sick             casual
    guru                           10                10
    mishra                         10                10
    leave_master table and it includes the following fields
    1.emp_name,
    2.leave_type
    3.no_of_days
    I have the form based on the table "leave_master"
    Here, the leave_type has the LOV which includes.
    sick and casual.

    When the form is filled out and clicked on the button submit,
    I need to update the column leave_type in table leave_type,
    for example,.
    if 
    emp_name:guru
    leave_type:sick
    no_of_days:3
    then I want to update the leave_type column,
    sick sick = - no_of_days for the 'guru' of name
    That is to say, ill = 10-3 = 7

    then the leave_type of the table must be,
    emp_name                       sick             casual
    guru                                 7                10
    mishra                              10               10
    someone can such me what code or method I can use?
    Thank you.

    Published by: Gurujothi on May 24, 2012 21:54

    Published by: Gurujothi on May 24, 2012 21:54

    Try something like this...

    BEGIN
    IF: PXX_LEAVE_TYPE = "Sick" THEN
    UPDATE LEAVE_TYPE
    THE PATIENT VALUE = SICK -: PXX_NO_OF_DAYS
    WHERE EMP_NAME =: PXX_EMP_NAME;
    ON THE OTHER
    UPDATE LEAVE_TYPE
    DEFINE CASUAL = CASUAL -: PXX_NO_OF_DAYS
    WHERE EMP_NAME =: PXX_EMP_NAME;
    END IF;
    COMMIT;
    END;

  • Hide the line of adf table based on the transient attribute does not

    I have a JSF page where the user can insert new line in View object . this View object contains a transitional attribute which indicates whether or not the record is newly created.

    On the same page, I have a table adf which is bounded on the city view object . This table should show only newly created records. my approach is to use expression language of in the renditions property to hide all the other lines that are not newly created. I changed the render property for the columns of the table as: rendered="#{row.bindings.RowStatus.inputValue eq'new'}" , but the table does not show anything.

    Then, I tried to change the made not for the column property, but to the outputText inside the same way. It worked, but the problem is that the blank line is always on display.

    So, basically because I do not hide the entire line, instead I'm hiding the text in the lines and lines with spaces empty is still on display in the page aside.

    The Table of JSF page where the made property is applied on outputText inside the column:

    <af:table value="#{bindings.UplodedFilesView1.collectionModel}" var="row"
      rows
    ="#{bindings.UplodedFilesView1.rangeSize}"
      binding
    ="#{CreatSR_UserBean.fileTable}">

      
    <af:column sortProperty="#{bindings.UplodedFilesView1.hints.FileName.name}"
      headerText
    ="File Name" id="c1">

      
    <af:outputText value="#{row.bindings.FileName.inputValue}" id="it1"
      rendered
    ="#{row.bindings.RowStatus.inputValue eq'new'}"/>

      
    </af:column>

      
    </af:table>

    I use Jdeveloper with ADF technology 11.1.2.3

    Thanks Timo,

    You are right. Its to late to hide lines after stamping in the row set. I solve the problem by filtering the view object, based on the transitional attribute in the section of liaison page. The steps as follows: (assuming that the object from view with the temporary attribute has been created, and the transient attribute contains the filtered values)

    1. Drag the view object on the page and also make the Table (in my case it might otherwise listen)
    2. On the page, go to the connection tab.
    3. Double-click the object desired in the links column.
    4. New window will appear titled with (change the binding tree)
    5. Check the option (enable filtering)
    6. Select the (filter attribute) and (filter value) for the selected filter attribute.
    7. Select (Display attribute) you want to appear in the page.
    8. Press OK

Maybe you are looking for