Set current row background color

during post-query process, if record meets condition,
i would like to set the color of entire line.
thank you
[email protected]

Hi Jim,
create a visual_attribute named e.g. PQR and set the desired background color.
In post-query trigger:
declare
     currec number := Get_block_property('block1', current_record);
begin     
if "condition" then
     set_item_instance_property('item1',     currec,visual_attribute,'PQR');
     set_item_instance_property('item2',     currec,visual_attribute,'PQR');
     set_item_instance_property('item3',     currec,visual_attribute,'PQR');
end if;
end;
Good luck,
Monica

Similar Messages

  • How to set JTable row background color

    Hello,
    I have seen JTable with rows having alternate background color (mostly white and light blue). How can i set the same.
    Thanks,
    Deepak

    Well, i am new user to forum and so have no idea if this question has been asked previously "countless" times.Which is why you "search first" and "ask later". How to you expect to find out what valuable information is in the forum without learning how to do a simple search. This goes for any forum on the web you might use, so don't use the "I'm a new user" excuse.

  • Row background color in dataTable control based on criteria

    It is relatively straightforward to give a pattern of color to rows in a dataTable control, for instance to alternate colors from white to gray.
    However, I have not yet figured how the row background color could be decided based on data fields associated with each row. For instance, I would like to set the row background color based on the value of a boolean attribute associated with the row, e.g. white if value is false and gray if it is true.
    Is there an easy way to do this?
    Martin

    of the text, but not the whole cell. I need to find a
    way to change the span at the row level (on the <tr>
    tag). ANy ways to do this?
    MartinThis is a question of how to let the renderer adjust its behaviour depending on the current state of the model. My renderer changes the background for the selected row by changing the style class:
            writer.startElement("tr", table);
              if (table.getRowSelector())
                   if (table.isAtSelectedRow())
                        writer.writeAttribute("class", "selectedRow", null);
    etc.(of course, to be able to do this you must write your own renderer)
    erik

  • WorkOrderList TileView Row & Selected Row Background Color Change

    Hi,
         can we change the background color of WorkorderList TileView Row & Selected Row Background color ?. Actually i am trying to change the color of both in WorkOrderList but it not reflecting any color on my Agentry client. I used a style on Tile List View Data/Style.
    but these applied style on Rows & Selected Rows are not working in Agentry client.
    if any other alternate solution exist in Agentry, please guide me.
    i am using following...
      sap mobile platform-2.3.3
    Thanks & Regard
    Manish Kumar
    Tags edited by: Michael Appleby

    Hi Jason
          Yes using Image we can achieve that goal but i want to use a background color instead of Image background. Finally I used a background color on label and set the that label field on Screen. And It's showing the background color on WorkOrderList Row & Selected Row that what i wanted. But on both Row & Selected TileView Screen showing white outline that i don't want and also i could not remove the default Selected Blue Background Color.
         Please guide me how to remove white outline and default Blue Selected Background color.
    Thanks & Regard
    Manish Kumar

  • How to set Analysis graphics background color to Transparent? not White.

    How to set Analysis graphics background color to Transparent? not White.
    thanks
    Edited by: user13257485 on 2010-8-15 下午11:53
    Edited by: user13257485 on 2010-8-15 下午11:55

    Hi,
    We almost had the same requirement, but we just needed to color a specific column.
    Here goes the solution to that, you might do the same for your row highlighting
    Changes are required in jsff and one method to be added in backing bean
    1. JSFF :
    <af:column headerText="Amount"
                     id="c4" width="100"
                     inlineStyle="#{backingBeanScope.BackingBean.cellColor}">2. Backing Bean
    //searchResultTableVO is Table's VO
    public String getCellColor() {
          FacesContext ctx = FacesContext.getCurrentInstance();
          ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
          ValueExpression ve = ef.createValueExpression(ctx.getELContext(), "#{row}", FacesCtrlHierNodeBinding.class);
          FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding)ve.getValue(ctx.getELContext());
          Row row = node.getRow();
        if(row.equals(searchResultTableVO.getCurrentRow())){
    //You can add your inline style for font-style too
          return "background-color:Red;";
             return null;
      }Hope this is helpful :)
    Regards,
    Neha..

  • Current date background color

    In 10.9.1 Calendar, how do you change the "current date background color"? The default is pink.

    Hello,
    There is no easy way to do this. The only thing I can think of is this.
    1) In your calendar template add this.
    In the "Day Open Format","Today Open Format","Non-Day Open Format","Weekend Open Format" add id="#DD##MM##YYYY#" to the containing HTML tag, usually a TD. This will give you a way to identify the table cells.
    2) Now add some javascript. This will change 1/31/2005 to have a background color of red.
    <script>
    // Simple crossbrowser function to grab elements on the page
    function html_GetElement(pNd){
    switch(typeof (pNd)){
    case 'string':node = document.getElementById(pNd); break;
    case 'object':node = pNd; break;
    default:node = null; break;
    return node;
    // now change the color
    html_GetElement("31012005").style.backgroundColor="red";');
    </script>
    While that works for 1 day you want a range. So, printing the javascript from pl/sql would give you the flexibility to do anything.
    Here's a simple example to highlight 1/12/2005 - 1/28/2005.
    declare
    i number;
    begin
    htp.p('<script>');
    -- This is a simple function to grab elements in the page
    -- Same function from above
    htp.p(' function html_GetElement(pNd){
    switch(typeof (pNd)){
    case "string":node = document.getElementById(pNd); break;
    case "object":node = pNd; break;
    default:node = null; break;
    return node;
    for i in 12..28 loop
    -- build the ID to be passed
    htp.p(' html_GetElement("'||i||'012005").style.backgroundColor="red";');
    end loop;
    htp.p('</script>');
    end;

  • Setting a default background color

    Hi All,
    I would like to set a default background color for all the
    components that I'm going to draw. What is the best
    way to achieve this?
    Thanks.
    Syed

    You can set using UIManager of the Look and Feel.
    UIManger.put("Button.background", Color.blue);
    will set the color of all the JButtons to blue. Like that you can change for all the components you need.
    Mohan

  • AdvancedDataGrid Row background color

    Hope someone can help, I wish to highlight an entire row or rows that match a value. I assumed the stylefunction would get me there but I have not found the style refering to the row background color.
    Any help please.
    Thank You

    The solution I found was to extend the data grid class, add override to the draw background and add a rowcolorfunction. When using item renderers you must use the style function with the alternatingItemColors so the renderer gets the color correct and not opaque.
    Thanks looking saisri2k2.

  • LOV switcher and set current Row

    Hi
    I have a LOV switcher attached to one of the columns in the view object.
    It works fine while switching the LOV's in mostly all conditions.
    But its failing for one case.
    We are using checkboxex to select a row , and do a operation in the row.
    To do this, the button on which the operation is performed ...
    1)we have checked which row has the transient value of check box as checked
    2) Set the current row of the iterator to the row that comes from the selected check box index..
    3) Called the operation.
    But as the code go to step two and the current row is set to the required row, all the LOV 's in all the rows start showing the Default LOV which is selected in the LOV switcher, if i do a f5 fr the page, the original values are restored.
    Also if the VO fecth size is 25 , it gives wrong value for 25 rows, if i scroll through the table again it automatically shows the correct value.
    This has been taking a lot of out time to debug the issue.
    I guess its somethng to do with LOV switcher , set current row and the table getting refreshed incorrectly on set current row

    Hi Timo ,
    Thanks fr the reply..
    Jdev 11.1.1.4
    Code for checkbox selection
    DCBindingContainer dcbindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator =
    dcbindings.findIteratorBinding(iteratorName);
    Row[] rowSet = iterator.getAllRowsInRange();
    Integer selectCount = 0;
    for (Row row : rowSet) {
    Object selAtt = row.getAttribute(selectAttribName);
    if (selAtt != null && (Boolean)selAtt == true) {
    System.out.println("Row selected");
    selectCount++;
    if (selectCount > 1) {
    System.out.println("More than one row selected!");
    throw new ValidationException("More than one row selected");
    else{
    iterator.setCurrentRowWithKey(row.getKey().toStringFormat(true));
    } else {System.out.println("Row not selected");}
    I actually sorted the issue out
    had to write
    iterator.refresh(Row.REFRESH_CONTAINEES); after iterator.setCurrentRowWithKey(row.getKey().toStringFormat(true));
    But not sure if thts correct ...

  • Setting the Border background color

    Post Author: gravy
    CA Forum: .NET
    Hi,
    Using the API I'm trying to set the Border background color to transparent but I can't. I want to set the background color to match what the designer does when you uncheck the Background option on the Border tab of a TextObjects properties.
    Can anyone help?

    What release are your using?
    do you want to set this dynamically, for one portlet or all. you may what to use
    'Themes'
    "Jorgeana" <[email protected]> wrote:
    >
    Does someone have a sample of setting the portlet border and background
    color ?
    I´m having problems using "setPortletBGColor" !! Tks

  • Advanceddatagrid grouped row background color

    Hi All,
    How to create a grouped row background color in advancedatagrid eg:
    Features
    Product 1
    Product 2
    Group1
       aa
    copy
    copy
       aa
    copy
    copy
    Group 2
       bb
    copy
    copy
       bb
    copy
    copy
    Thanks,
    srinath

    The solution I found was to extend the data grid class, add override to the draw background and add a rowcolorfunction. When using item renderers you must use the style function with the alternatingItemColors so the renderer gets the color correct and not opaque.
    Thanks looking saisri2k2.

  • How to set text and background color of current row in a adf table?

    Hi,
    In jdev 11.1.2.3,
    How to set text fond and background color of current row in a adf table?
    I tried to set Background color in table property, but that is not what i want.
    Thanks.

    Hi,
    We almost had the same requirement, but we just needed to color a specific column.
    Here goes the solution to that, you might do the same for your row highlighting
    Changes are required in jsff and one method to be added in backing bean
    1. JSFF :
    <af:column headerText="Amount"
                     id="c4" width="100"
                     inlineStyle="#{backingBeanScope.BackingBean.cellColor}">2. Backing Bean
    //searchResultTableVO is Table's VO
    public String getCellColor() {
          FacesContext ctx = FacesContext.getCurrentInstance();
          ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
          ValueExpression ve = ef.createValueExpression(ctx.getELContext(), "#{row}", FacesCtrlHierNodeBinding.class);
          FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding)ve.getValue(ctx.getELContext());
          Row row = node.getRow();
        if(row.equals(searchResultTableVO.getCurrentRow())){
    //You can add your inline style for font-style too
          return "background-color:Red;";
             return null;
      }Hope this is helpful :)
    Regards,
    Neha..

  • Problem dynamically setting row background color in a report

    Hi guys,
    I want a PPR Classic SQL Report to dynamically show a background color depending on what value is stored in the column of the record.
    To illustrate what I've tried consider the following:
    1. I created a PPR Report on DEPT (this is the report I want to use with record backgrounds)
    2. I created a PPR javascript call that I trigger somewhere in the page
    function refreshReport(pField, pValue){
      var region = $v('P2_DEPT_RID');
      var link ='f?p=' + $v('pFlowId') + ':' + $v('pFlowStepId') + ':' + $v('pInstance') +'::::' + pField +':'+ pValue;
      html_PPR_Report_Page(this, region, link);
    The updating of the report works fine by the way.
    3. I changed the code in the HTML Expression of the column definition of "DNAME" of the DEPT report. I used jQuery to set the class of the <tr> element of the position the field is in.
    This is the value I want to dynamically check on
    <div id="dept_#DEPTNO#">#DNAME#</div>
    <SCRIPT type=text/javascript>
    $('#dept_#DEPTNO#').parent().parent().children().removeClass('t20data');
    if ('#DNAME#' == 'RESEARCH'){
          $(function(){    
            $('#dept_#DEPTNO#').parent().parent().addClass('voorhaal_kan');
    }else{
             $(function(){    
                $('#dept_#DEPTNO#').parent().parent().addClass('sscc_ok');
    </SCRIPT>4. I created some CSS like so:
    tr.voorhaal_kan{border:1px solid #AAA;border-left:none;border-top:none;background-color:#FFDD44;padding:2px 8px;}
    tr.sscc_ok {border:1px solid #AAA;border-left:none;border-top:none;background-color:#CCFFCC;padding:2px 8px;}
    tr.sscc_manco {border:1px solid #AAA;border-left:none;border-top:none;background-color:#FF3300;padding:2px 8px;}
    tr.sscc_geel {border:1px solid #AAA;border-left:none;border-top:none;background-color:#FFFF66;padding:2px 8px;}Now the problem is, the first time I load the page, the javascript in the HTML Expression works fine! It checks the value, and colors the <tr> beautifully. But, when i Refresh the report using PPR (calling the javascript function), the report is reloaded just fine, but the javascript bit in the HTML Expression is skipped for some reason resulting with a regular background color found in "t20Standard td.t20Data" . Alerts won't fire either in the code, hence the assumption of the code skipping.
    Any ideas on how this problem can be solved?

    Hey Rutger,
    I know you've already done a lot of work in another direction, but would it be possible for your purposes to use the SQL to do what you need. check out this link:
    How to perform a conditional column format based on column value
    and Conditional coloring of Database Column
    I hope those may help or give you other ideas.
    -Marc

  • ADF Table row background color change ???

    Hi All
    i got below sql view object
    SELECT DEPARTMENT_ID,JOB_ID,COUNT(*) FROM EMPLOYEES GROUP BY DEPARTMENT_ID,ROLLUP(JOB_ID)
    By using this i will get each department_id, jobid's and total employes count in each department
    and i will get rollup for each departments ie i will get total employees.
    So i want to change the back ground of the total row.
    DepartmentId     JobId     Count1
    SA_REP 1
    1
    10     AD_ASST     1
    10     1 < this row in RED back ground in JSF page
    20     MK_MAN     1
    20     MK_REP     1
    20     2 < this row in RED back ground in JSF page
    30     PU_MAN     1
    30     PU_CLERK     5
    30     6< this row in RED back ground in JSF page
    40     HR_REP     1
    40     1< this row in RED back ground in JSF page
    50     ST_MAN     5
    50     SH_CLERK     20
    50     ST_CLERK     20
    50     45< this row in RED back ground in JSF page
    any kind of help is welcome...
    thanks
    Ravi

    Hi,
    you can do this by setting the background color of the outputText component that is the cell component e.g. in a read only table. Use the inlineStyle property to set the background-color but get the string from a managed bean. For each row you get a call to the managed bean and you can use JSF value binding
    FacesContext.getCurrentInstance().getApplication().createValueBinding()
    to access #{row} so that you can determine the value of a row column. Based on this you return a color
    Frank

  • Need to Set Current Row when Using Built-in Data Control Delete Operation?

    I have an af:table bound to a ViewObject (VO) collection (no Entity Object) - within each row, I include a column that contains a 'Remove' command button so the user can remove the row. I add the command button by dragging/dropping the built-in delete operation from the VO on the Data Control Palette. When I use this as is (no changes), the Remove button always deletes the first row in the collection, not the selected row. Do I need to add code to set the current row, and if so can someone please provide an example and specify where I need to add? thanks.
    ------ .jspx af:table with command button to remove each row ------
    <af:table value="#{bindings.ListView1.collectionModel}" var="row"
    rows="#{bindings.ListView1.rangeSize}"
    first="#{bindings.ListView1.rangeStart}"
    // note: I don't have any code added for selectedRow or makeCurrent - assuming this is built-in?
    selectionState="#{bindings.ListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.ListView1.collectionModel.makeCurrent}">
    <af:column>
    <af:commandButton actionListener="#{bindings.Delete.execute}"
    text="Remove"
    disabled="#{!bindings.Delete.enabled}"/>
    </af:column>
    ---------- corresponding pagedef file ------------
    <bindings>.....
    <action id="Delete" IterBinding="ListView1Iterator"
    InstanceName="SrchDataControl.ListView1"
    DataControl="SrchDataControl" RequiresUpdateModel="false"
    Action="30"/>
    </bindings>
    Note: I also tried solution posted on following thread, but again, only first row is deleted, not the selected row?: Delete and Commit
    Message was edited by:
    javaX

    I just want to delete (or remove) it from the VO. Data for this VO is not on the database.
    The function is doing what I want it to do (delete from the VO), its just always deleting the first row, versus the selected row. I select the command button next on a column next to an item further down in the list and it deletes the first row. The problem is setting the selected row to be removed - I thought setting the current row would be taken care of by the SelectListener?
    selectionState="#{bindings.MyIspListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.MyIspListView1.collectionModel.makeCurrent}"

Maybe you are looking for

  • Invoice document not appearing in follow-on document list

    Dear All, I am customizing Classic scenario for my client. In our process, Shopping cart only created in SRM 5.0 system where as all follow-on document - PR/PO/GR/IV will be created on back-end SAP ECC 6.0 system. My Issue: 1. Shopping cart appears i

  • [Security]   Row-level security in ADF

    Hi all, I want to implement row-level security in my application, the scenario is like this: There are several users that connect to the application These users are authenticated in some way (XML file, OID, DB) When each user wants to access (Select,

  • Not junk!

    When I checkin the 'sent' folder on any mail I have sent it always opens with 'you marked this mail as junk'. Does anyone know why this should be? Also, I often find mail in the junk folder from friends who are in my address book.I don't understand w

  • Where did my calendars go when I switched to Lion/iCloud?

    I just switched to Lion and iCloud, because of the imminent loss of MobileMe's calendar sync'ing, and found that iCal failed to import a number of calendars that I had stored in MobileMe.  I went to me.com, converted to iCloud there, and saw it say t

  • MOVED: Installing Windows 7. N-vidia and Catalyst problem.

    This topic has been moved to Windows 7. https://forum-en.msi.com/index.php?topic=130331.0