table cell color dynamically and programmatically based on a condition of entry

Hello
We use Jdev 11.1.1.6.0 for my ADF development.
In our page Jspx, we have three components:
1. a reading table used with an additional column "Error box" in the form of input text
2. a text entry accepts employeeID running,
3. a command button on the occasion of the red cell in the column of the error box against the received EmployeeID

Required functionality:
1. the user will be entered EmployeeID (which has the error of data) in the input text and press the command button
2.internally, by programming, there is a bean method call from IE button which will accept the entry and check the rowKey in the table corresponding to the EmployeeID using the Iterrator function and retrieve the exact id of this cell in the column ErrorBox.
3. after obtaining the id, highlight the cell in the column of the error in red box.

I used the following excerpt from the bean to have the feature but does not work and also there is no error indicating that:

* if (row.getAttribute ("EmployeeId")! = null) {*}
* if (row.getAttribute("EmployeeId").toString () .equalsIgnoreCase ((String) component.getValue ())) {*}
RowSetIterator empRSIter = iter.getRowSetIterator ();
Line currentRow = empRSIter.getRowAtRangeIndex (i);
String tableId = table.getClientId (facesContext);
RKS RowKeySet = table.getSelectedRowKeys ();
inputId tableId = + ': ' + i + ': ' + 'ot10;
org.apache.myfaces.trinidad.render.ExtendedRenderKitService service;
Service = org.apache.myfaces.trinidad.util.Service.getRenderKitService (facesContext, ExtendedRenderKitService.class);
service.addScript (facesContext, "field var = AdfPage.PAGE.findComponentByAbsoluteId (" "+ inputId +"'");") field.style.backgroundColor = "red"; ») ;

We strive to highlight the error in the table in the column of the error against the EmployeeId box has received. But we cannot get the functionality. Please suggest.
Thank you
Charrier

Hello

1. you must maintain the value of the string in a bit more broad (try pageFlowScope, for example) IE - value = "#{pageFlowScope.myBean.empId} '"
2. Add a partialTriggers for the score table the ID of the text input.
3.

#{row.EmployeeId == backingBeanScope.myBean.empId ?'backgroundcolor:red;':'backgroundcolor:black;'}">
{code}
should be
{code}
#{row.EmployeeId == pageFlowScope.myBean.empId ?'background-color:Red;':''}"> 

Arun-

Tags: Java

Similar Questions

  • ADF Table cell color based on the value of this field

    Dear all,
    I want to create a table for our new application that contains a table that is used to represent the data in a table or matrix format.
    and each cell of the table should be filled with a color of three colors, based on the value belongs to who will for example: (1-8-> green, 9-20 - yellow etc.).
    I don't know how to implement this. Help, please...

    Rognard

    Please post in the subforum that is appropriate for your question.

    http://forums.Oracle.com/forums/Ann.jspa?annID=599

    This blocking thread

  • Change table cell color according to the input data

    Hi, I have a table in a form and I want the cells to have a dark in each cell if it has not entered data, but the cell background color to change white if no text is entered in the cell. Is it possible to do?  Thank you.

    You can use the fillColor for this property. It depends on your table structure how you do this. If you have relatively small table say 3 columns. 3 rows and then in each cell of sortient / calculate event you can put the following script.

    If (Cell1.rawValue == null & Cell2.rawValue == null & Cell3.rawValue == null)
    {
    Row1.fillColor = "255,0,0";
    }
    else {}
    Row1.fillColor = "255,255,255";
    }

    If you have a larger table, then you must create a function for it.

    Thank you

    Sidonie.

  • AF:table cell color is not displayed in Mozilla

    Hi all
    I have a table where I show a few colors based on the data in this particular cell, that coming from the database.
    I've implemented this using Internet Explorer 7. So far, everything is ok.
    Now I'm testing it in mozilla and IE 8, the color does not appear in these browsers.
    I'll put hexcolor inside each cell.
    Pls tell me how can I bring color in Mozilla and Exlorer 8 also. ?
    background-color:#{row.GroupColor}
    Studio Edition Version 11.1.1.2.0
    Firefox 8.0
    Explorer 8



    Kind regards
    Rognard

    column inlineStyle works for me... THAT IS TO SAY 8
    background - color:RGB (148,222,255);

  • Insert data into the same table based on certain conditions

    Hello. I'm new to this forum.
    I have to write a stored procedure to insert data in a table MYTABLE say, having a structure like:

    Col1 Col2 Col3... TotalInstallments CurrentInstallment PaidAmount MonthYear
    I have to insert all the data that it is in the same table (MYTABLE) except change some fields based on certain conditions:

    1. if PaidAmount > 0 & & CurrentInstallment < TotalInstallment then

    CurrentInstallment = CurrentInstallment + 1

    2. in the field MonthYear I have data ex. 01/2012, 11/2012 formate(month/year)...

    So, I have to insert data by incrementing the month and year. for example:

    If currentdata is 11/2012 next data will be 12/2012

    But following will be 01, 2013
    I have to select all records that belongs to the previous month (across the field MonthYear) and put the audit on each record selected and insert data and then turns them into table (MYTABLE) even.

    How to achieve that?

    Thank you.

    978184 wrote:
    Hello. I'm new to this forum.
    I have to write a stored procedure to insert data in a table MYTABLE say, having a structure like:

    Col1 Col2 Col3... TotalInstallments CurrentInstallment PaidAmount MonthYear
    I have to insert all the data that it is in the same table (MYTABLE) except change some fields based on certain conditions:

    1. if PaidAmount > 0 & CurrentInstallment

    CurrentInstallment = CurrentInstallment + 1

    2. in the field MonthYear I have data ex. 01/2012, 11/2012 formate(month/year)...

    So, I have to insert data by incrementing the month and year. for example:

    If currentdata is 11/2012 next data will be 12/2012

    But following will be 01, 2013
    I have to select all records that belongs to the previous month (across the field MonthYear) and put the audit & on each of the selected data record and insert then turns them into table (MYTABLE).

    You can do this way:

    This is not tested, but if you can provide the example of table structure and data (IN create table and insert scripts), it can be put to the test.

    insert into your_table
    (col1, col2, col3...current_installment, month_field)
    select col1, col2, col3..,
           current_installment +
           case when paidamount > 0 and current_installment < total_installment then
            row_number() over (
                                partition by column1, column2,.. columnn      -->You may choose partition if you want the
                                                                              --Increment of Current_installment to reset after particular combination ends
                                order by primary_key        -->Order the Increment, you may choose to add more columns to order by
                              )
          else
            0                                               --> if condition is not met, then Add 0
          end curr_installment,
          add_months(to_date(month_field, 'MM/YYYY'), 1) nxt_month
      from your_table;
    
  • scrolling table cell - request help

    Hello

    I have a scrollable table cell (300px wide and 400 px high) which can contain images and text. The contents of the cell should be scrollable.

    I'm just a beginner, but not very skilled in Dreamweaver CS3 on a PC. I worked a bit with CSS.

    If someone could help me, I would really appreciate it especially if you are able to direct me to the video tutorial in which this is demonstrated. I have a subscription on Lynda.com and Kelby Training online but see nothing on this subject.

    I have read several posts on 'scrollables DIVs' on the forum but have not been able to apply them successfully.

    I would be grateful to anyone who helps.

    Thank you very much.

    Jane

    Looking to add a text box may also contain images?

    Almost looks like a CSS overflow style.

    Something like this:

    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut developed and pain magna aliquyam erat, sed diam voluptua. At vero eos and accusam and justo duo dolores and ea rebum. STET clita kasd gubergren, no sea takimata sanctus is Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut developed and pain magna aliquyam erat, sed diam voluptua. At vero eos and accusam and justo duo dolores and ea rebum. STET clita kasd gubergren, no sea takimata sanctus is Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut developed and pain magna aliquyam erat, sed diam voluptua. At vero eos and accusam and justo duo dolores and ea rebum. STET clita kasd gubergren, no sea takimata sanctus is Lorem ipsum dolor sit amet.

  • Change cell color in a table based on the input

    Hi guys

    Please refer to my example, I have attached. I had a 2d with som information table. 1 row = 1 component information and it's electric. This table is put in a table when you press "Update" in the front panel. My goal is that based on index 1 of table (col2 'Edge'), the color of the TableRow should change color. If the contents of the line is S20-1, the color should be red and so on. It works a little bit, but I'll have a few bugs:

    -You must press "Reset" twice in order to remake the Whiteboard.

    -The first colorchange also changes the color of the entire table. I want my whiteboard and lines to change color (header and TableRow unused must be white).

    You can change the first element in the array constant of S20 - 1-S20 - 3 and you will see that my program brings to the whole blue table on the first colorchange.

    Is this a mistake on my part? Or is this a bug in LV (which I doubt)?

    Property nodes are running up and down, and you have the reverse order. You set the color first, and then the active cell, which means that the colour be trolling a run.

    Your code is also too complicated. Here's a quick draft how this could be done. Let me know if you have any questions.

  • Dynamic cell colors based on values - Classic report

    Hello
    I have a requirement where certain columns in my classic report should change the color according to the percentage.
    I referred to the following code:
    SELECT e.*,   
    CASE     WHEN sal < 1000     THEN 'red'    
                 WHEN sal BETWEEN 1000 AND 2000     T
                 wHEN 'yellow'    WHEN sal > 2000     THEN 'green'  
    END the_color FROM emp e 
    But my requirement is quite complicated, I already do a lot of calculations on the existing columns:
    ex:
    ROUND(((COUNT(CASE WHEN class ='A' THEN 1 END)/
    nullif((SUM(CASE WHEN class ='B' THEN 1 END)+ SUM(CASE WHEN class ='C' THEN 1 END)),0))*100),1) as Percentage 
    Can someone help me to modify this code for the column, so that cells (not lines) of my changes to report Classic color dynamically, say what percentage of the above code is > = 75 it must be green, less than 50 means red.

    Thank you!

    Example query:

    select cust.*
    , case when credit_limit > 5000 then 'red' else 'green' end as bg_color
    from (
    select
     CUSTOMER_ID,
     CUST_FIRST_NAME,
     round(dbms_random.value(1000,9000)) as CREDIT_LIMIT
    from #OWNER#.DEMO_CUSTOMERS
    ) cust
    

    In the definition of the column in CREDIT_LIMIT, set the HTML Expression < div style = "background-color: #BG_COLOR #" > #CREDIT_LIMIT # < / div >

    See the result: http://apex.oracle.com/pls/apex/f?p=41715:3

    You can also create html together in SQL but I would like to split logic (SQL) and the user interface.
    Another option might be to create dynamic Action (after discounting the report area) and to create a combination of astute selector and a piece of JavaScript, but I guess it's easier.

  • Under certain conditions changing cell color in a dynamic array.

    I'm developing an application where I'd like to set the background color of a cell in a PivotTable based on the value of the cell content. I have two questions:

    the first is that when I use the following EL in the property of inlinestyle, I get the cell colored but not completely just the bottom of the text.

    < af:forEach elements = "#{bindings." Var MyView1.attributeDefs}' = 'def' >
    < af:column headerText = "#{bindings." MyView1.labels [def.name]}"id ="c1 ".
    attributeChangeListener = "#{backingBeanScope.backing_my.c1_attributeChangeListener} '"
    rowHeader = "true" >
    < af:outputText value = "#{row [def.name]}" id = 'ot1' "
    GT = inlineStyle "#{row [def.name] 10000?' background-color: Red;':"} "/ >
    < / af:column >
    < / af:forEach >

    the second issue is that I want to only apply it to all the columns after the first column have a valid numeric value. I get a NumberFormatException when a nonnumeric value is encountered. Thank you for your help... :)

    As always, you should mention your jdev version...
    You did not mention what you want in a different color. However you can test yourself with a normal component. Play with styles until you get the result you want. Then copy the inlineStyle into your dynamic table. The string can be very long, you be better off using a skin in the first place.

    You second problem cannot be handled only in a managed bean method. Call a method in a managed bean to check if the value of the cell is a number valid and then apply the style for the element.

    Assemble the two solutions, you end up with a method to a bean that checks the value and returns the inlinestyle or the styleclass string.

    Timo

  • Interactive report based on the hidden column cell color

    Hello

    APEX 5.0.1 used here.

    How can I set the color of a specific cell (or column) based on a hidden column?

    Seems the link that I can't use the built-in feature because I need the custom color returned by my request.

    I tried to set the color with javascript by iterate over each line, by taking the value. text() of the color column and value

    This color-specific cell. It works, but it requires the column is visible.

    A column containing a hexadecimal value of the color does not look good...

    I tried to hide / display: no column complete but this messes up the layout.

    THX

    the force says:

    APEX 5.0.1 used here.

    How can I set the color of a specific cell (or column) based on a hidden column?

    Seems the link that I can't use the built-in feature because I need the custom color returned by my request.

    I tried to set the color with javascript by iterate over each line, by taking the value. text() of the color column and value

    This color-specific cell. It works, but it requires the column is visible.

    A column containing a hexadecimal value of the color does not look good...

    I tried to hide / display: no column complete but this messes up the layout.

    Specify the color of cell required using the hidden column and a data attribute to the property Expression of HTML in the column:

    #VISIBLE_COLUMN_ALIAS#

    Apply a static ID of the visible column to serve as a selector, jQuery, and you can access the invisible color value in your JS code in dynamic action to run the JavaScript Code using the dataset property.

  • Change the background color of a table cell, depending on the selection in a drop-down list

    I have a drop-down list wrapped in a subform in a table cell. Users can choose green, yellow or red, and I want the background color to change according to their choice.

    Can you tell me why this script does not work? I'm sure that some of you, dear friends can see in a second.


    If (this. ListItem == "green") {}

    Subform1.DropDownList1.fillColor = "000,128,000"; BackgroundFill = "solid";

    }

    If (this. ListItem == 'yellow') {}

    Subform1.DropDownList1.fillColor = "255,128,000";

    }

    If (this. ListItem == 'red') {}

    Subform1.DropDownList1.fillColor = "255,000,000;

    }


    Thank you

    Hello

    I think you should be able to use the following code in the event change of the dropdownlist control.

    Form1. #subform [0]. Table1.row2.DropDownList1::change - (JavaScript, client)

    If {(xfa.event.change=="green)"}

    this.fillColor = "000,128,000";

    }

    If {(xfa.event.change=="yellow)"}

    this.fillColor = "255,128,000";

    }

    If {(xfa.event.change=="red)"}

    this.fillColor = "255,000,000;

    }

    Concerning

    Bruce

  • Balancing the columns with grids of fluid and CSS3 'table-cell '.

    I try to balance the height of by-side columns, and I'm happy to use ' display: table-cell "that I've seen work. But I can't make it work with DW flow layout grid. I have an example here: http://leighjackson-co-nz-dev.web4.pbstaging.com/htm/test-2a.htm

    I want the right div, color, below the image, to be full height, identical to the div of the text to the left of it. It doesn't seem to work.

    Any suggestions?

    Sorry, CSS display: table does not work on the floating divs.   The alignment is done with the width of the cells in the table, divs.

    {#div1}

    Width: 100%;

    Auto margin: 0;

    Display: table;

    border-collapse: collapse;

    }

    #div2 {display: table-row;}}

    {#div3}

    Display: table-cell;

    Width: 50%;

    background: #D8E9B6;

    vertical-align: top;

    }

    {#div4}

    Display: table-cell;

    Width: 50%;

    background: #CCE6FF;

    vertical-align: bottom;

    }

    HTML:

    Content for the div3...

    Content for the div3...

    Content for the div3...

    Content for the div3...

    Content for the div3...

    Content for div4 here...

    Nancy O.

  • find by content en cells replace stroke and fill color

    I've generated in InDesign CS3, a catalog with hundreds of tables.

    Unfortunately there is a mistake or two in the tables of construction. In a way, I need to replace a contour of a cell color and also a fill color.

    So my question is if there is a way to InDeisgn CS3 for automatically...

    • research in a document for the cells in a table with "Black_EN text color" AND "Black_EN fill color" and change this particular cell line color in Black_EN
    • research in a document for the cells in a table with the color of the text 'Black_EN' AND 'fill color black' and change the fill color of particular cell in Black_EN

    Can someone help me with a usable script? I'm a newie to scripts so that any help is useful!

    Thanks in advance, Pascal (form Belgium)

    Aaahh... the old adage of an image equal to a thousand words. In this case, the words are long enough, because the image is > 280K.

    O - kay. You may have a lot of tables, some bad colors, but the text is still the appropriate color. How does this sound: you click inside any table, and the script checks the current (*) text color. And then it assigns all the traits that color, and fill each cell with a 50% fill pattern. This means that you can select a table, run the script, select the next, run the script, etc. until done (or totally bored, everything which comes first).

    (*) In fact, the color of the text of the first character in the upper-left cell. I hope this isn't a problem.

    The script is quite indifferent to your selection: any where inside, in the text or with a cell, row, column, or even the entire selected table is no problem.

    Like enough! (see English people choke on our Dutch gees)

    table = app.selection[0];
    if (table.hasOwnProperty("baseline"))
     table = table.parent;
    if (table instanceof Cell)
     table = table.parent;
    if (table instanceof Column)
     table = table.parent;
    if (table instanceof Row)
     table = table.parent;
    if (!(table instanceof Table))
    {
     alert ("Echt niet in een tabel!");
     exit(0);
    }
    color = table.cells[0].characters[0].fillColor;
    black = app.activeDocument.swatches.item("Black");
    table.cells.everyItem().properties = {
     topEdgeStrokeColor:color,
     bottomEdgeStrokeColor:color,
     leftEdgeStrokeColor:color,
     rightEdgeStrokeColor:color };
    for (aCell=0; aCell		   
  • Cell color table export LabVIEW

    Hi all

    I have a question about how to export a table on the front panel.

    My panel shows before this Panel.

    I want to export it, but when I export in the simplified picture, it shows only the data without the color of the cell.

    Is there a simple way to export this entire table with cell color in a bitmap file or inside a sheet of Word?

    Thank you

    Hi Jessica,.

    When the SIMPLIFIED image is not enough, then don't use it!

    Get 'real' picture to help invoke nodes in this table control. Store then the image data receive with these ordinary ImageFile functions:

  • Help with a script to search for text in a table cell and apply the cell style

    Hello

    I build the script which Jongware wrote in his post here http://indesignsecrets.com/tackling-tables-through-scripting.php - I am trying to create a variable in which I can add a number of different parts of the text, in this case it's different parts of the United Kingdom i.e. 'London', 'East', 'Scotland' etc. I just need the script to apply the cell Style - 'District Cell' - to any cell that contains text in the variable. Here's the script, if anyone can help I would be grateful.

    function checkWhichTable()
    {
    // ensure the user made a selection
    if (app.selection.length != 1)
    return null;
    var currentTable = app.selection[0];
    if (currentTable.hasOwnProperty("baseline"))
    {
    currentTable = app.selection[0].parent;
    }
    while (currentTable instanceof Cell || currentTable instanceof Row || currentTable instanceof Column)
    currentTable = currentTable.parent;
    if (!(currentTable instanceof Table))
    {
    // No table selected
    return null;
    }
    return currentTable;
    }
    app.doScript(checkUserSelection, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Process Table");
    
    
    function checkUserSelection ()
    {
    var a_table = checkWhichTable();
    if (a_table == null)
    {
    if (confirm("No table selected. Do you want to process *all* tables?") == false)
    return;
    allTables = app.activeDocument.stories.everyItem().tables.everyItem().getElements();
    for (aTable=0; aTable<allTables.length; aTable++)
    {
    processTable (allTables[aTable]);
    }
    } else
    {
    processTable (a_table);
    }
    }
    function processTable(table)
    {
    // do something here!
    
    
    //Find Text in Cell and apply Cell Style
    var textInCell=['London', 'Scotland', 'South West'];
    for (i=0; i<table.cells.length; i++)
    {
    if (table.cells[i].texts[0].contents==textInCell)
    table.cells[i].appliedCellStyle = "District Cell";
    }
    
    
    
    
    }
    

    Hello

    Change this feature:

    function processTable(table)
    {
    //Find Text (exactly as it is) in Cell and apply Cell Style
    var
      textInCell=['London', 'Scotland', 'South West'],
      mFound, cFound;
    
    app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^(" + cities.join("|") + ")$";
    mFound = table.findGrep();
    while( cFound = mFound.pop() )
      cFound.parent.appliedCellStyle = "District Cell";
    }
    

    Jarek

Maybe you are looking for

  • How to get the "SETTINGS" at the time I opened FIREFOX?

    I clicked on SETTINGS and asked a white page. I want the back page that has ' HISTORY, DOWNLOADS, etc. when I open FIREFOX.»

  • Satellite A210 - error during recovery

    Hi all I received a Satellite A210 (opportunity, about two years old) by a friend. The laptop does not work at the moment. When the laptop is turned on, it displays a message "Missing Operating System". I tried using the recovery disk supplied with t

  • BIOS update failed with the Satellite A210-17Z

    I was asked by Tempro to update the BIOS of my laptop Satellite A210-17Z.I agreed but the laptop turns off before completing the update of the BIOS. As a result, I can no longer boot my computer. Looking for a solution on the internet, I have read th

  • Questions on Satellite A300-1BI

    Hello everyone, this is my first post here and I would like to know a few things: 1 USB sleep & charge I plug my mp3 on USB and doesn´t the load, I need to enable something for this switch. Te computer is plugged in and no battery.2. What is the late

  • video converter to play the video in the central unit of car stereo sony xav 63

    Hello I'm not able to play the video in sony xav 63, please can you suggest some video converter I downloaded a video converter, but it does not come when I tried with the device in my car. Thank you Josiane