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..

Similar Messages

  • Numeric Control - Text and Background Color changes when operating inc/dec arrows

    Hi,
    I'm developing an application that has a panel with black background and green or red numbers. I've added numeric controls and configured the text color and text background color attributes accordinglingy. I set the numeric control to hot or validate  control mode and show the inc/dec arrows, since I want to be able to incr/decr the numbers.
    The problem is that when I run the application and I hit the inc/dec arrows, then the colors inside the numeric control frame become inverted: the black background becomes white and the green number becomes cyan. I've created a callback function assosicated with the numeric control and tried forcing the text and background color, in the EVENT_VAL_CHANGED section, using the SetCtrlAttrribute() function, but to no avail. Also added ProcessDrawEvents didn't help.
    When I mouse click again outside the numeric control, then it reverts back to its original colors (green text, black background).
    Any suggestions as to how I can fix this ?
    I want it to keep its original colors at all times, even when I'm clicking the incr/decr arrows...
    Kind regards,
    pgriep
    Solved!
    Go to Solution.

    Ok, now I see what's happening.
    The effect you are seeing is a resul of standard numeric control behaviour combined with the black bcakground: when you use arrows to increment/decrement a numeric control its value will be automatically highlighted; on the default background you'll see the white area and figures highlighted in black (white numbers on balck background). If you set the background to black the system will automatically change the colors used to highlight the text, and that's what you're seeing.
    By the way, this does not happens if you use up and down keys on the keyboard: text is not highlighted so colors are not changing.
    Additionally, this is not only valid for numerics: see the behaviour of the string controls on the bottom of your panel when you tab up to them. This effect does not happen on controls set as indicator like the big clock in the upper part of the panel.
    The only way I can see to overcome this behaviour is to hide control built-in arrows and create your own up and down buttons with which you can manipulate the numeric control. I am attaching a modified version of your project with buttons on the left numeric; sorry for the poor aesthetic:  I have used some arrow icons I had on my disk, you may want to create your own arrows with the colors and shape you prefer.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?
    Attachments:
    ModifiedApplication.zip ‏9 KB

  • 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..

  • How do I change the background color of a row in a table indicator?

    Hello,
      How do I change the background color of a row in a table indicator? I know how to change the background color in a active cell, but that is not what I want. My first intent is to make the background color of the first row a unique color, such as green, just to highlight the top row of the table.
    Regards,
    Kaspar
    Regards,
    Kaspar

    I have done this before by using a for loop to change the active cell of a row in order to give the appearance that the whole row is turning the color at once.
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • How do you change the background color of certain rows in a Datagrid?

    How do you change the background color of certain rows in a
    Datagrid?

    Hee is a great example:
    http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=487
    Tracy

  • Setting fonts and Background color

    Hi,
    Is there anyway to set the font and background color on a jLabel? Thanks for your help!

    ...emmmm lets see... for the font and the background...
    maybe setFont and maybe setBackground!
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.html

  • How to change foreground and background color using CC SDK?

    Hello all,
    I am just starting to study the sdk (Mac CC). Currently, I am seeking the answer to change foreground and background color using CC SDK?
    Is it possible to do so? In addition, will the Image Mode such as RGB, CYMK or Grayscale be effecting such solution?
    Thanks in advance.

    These are NOT dropdown menus. They are dropdown LISTS.
    http://web.me.com/toad.hall/Demo1/Drop_DownMenus.html
    And from the links in the Google search you can learn that a list item has no style.
    And a dropdown list behaves differently from dropdown menus. Here's how it looks on Mobile Safari :

  • How can I make FF use custom visited/unvisited link colors but allow the website to choose the other text and background colors?

    websites often choose colors that I have trouble distinguishing between but overriding the other colors can cause color defects on certain websites.

    Add code like this to userContent.css in the chrome folder.<br />
    There can however still be problems with clickable elements that use background images.
    Remove that link from the history to restore that background image.
    *http://kb.mozillazine.org/userContent.css
    *http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    *ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    <pre><nowiki>a:visited, a:visited * {
    color:#CC33CC!important;
    background-color:#F8F8F8;
    </nowiki></pre>

  • Logon Page - Trademark text and background color

    Hi Guys,
    I just customized the Logon Page of the Portal successfully. The only two things which are missing are the trademark as well as a new background color. So ... can anybody tell how to:
    1. Change the SAP Trademark text in the Logon Page?
    2. Change the background color of the background page?
    Hopefully I can do it in the portal. Thanks for your answers and your help.
    Best regards
    Alexander

    Alexander,
    In addition to the tips you already got from the other members...
    1. The Background colour is the background colour that is defined in the theme assigned in the Default Portal Desktop (defaultDesktop) that is located in the folder: pcd:portal_content/every_user/general/. By default the Tradeshow theme is selected in this desktop if you create your own theme and assign it to this desktop and set it as default then the background colour of your theme will be the background colour visible in the login page....
    2. The Trademark text is a "Locale text" this means that the strin is not visible in the code but referenced by a variable based on the language of the browser. You can find this copywrite text in the following location:
    a. Download the com.sap.portal.runtime.logon.par file from your Portal
    b. Import it in NWDS or unzip it.
    c. inside the structure look for the folder PORTAL-INF\lib
    d. there is a .jar file called umelogonbase.jar. extract this file with winzip
    e. inside the structure you now see allot of .properties files.. look for the loginLabels_<yourcountrycode>.properties and inside this file look for the variable called "COPY_RIGHT" there you can edit it.
    f. do this for all the languages you need and create a new par file again in your customer namespace so that you don't overwrite the one from SAP.
    Good Luck,
    Benjamin Houttuin

  • How to set full screen background color in new Pages

    I just updated to Mavericks and the new Pages...I often use a certain background color when I work in full screen mode, but that color is gone withe the upgrade and I don't see how to specify a color any longer...any ideas?
    Thx.

    Given over 90 removed features in Pages 5, I guess they were busy "not noticing" a lot more than the background color:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&mforum=iworktipsn trick
    Peter

  • Menu text and background colors

    The menus in Acrobat Reader on Windows 7 seem to use:
    - System colors for text,
    - Forced grey for background color.
    My Windows 7 is setup to have light grey text on dark background. All other programs honor this. The result in Reader is that I have light grey text on grey background, which is not readable:
    The same is valid for the bookmarks field, as shown above.
    It's either:
    - take system colors for both background and foreground (preferred)
    - force colors for both background and foreground.
    You'd think that Adobe would know about that kind of problems...
    Is there a work-around?

    You have to clear your browser history/cache or all of the links you have visited in the past (while previewing) will show as the visited style which is a white background and black text.

  • Change text and background color when multiple tracks of text

    I am finishing up a project and the client wants the final title card to be white background with colored text. I have read a bit about how to do this but I can't fit it into my situation. My text is on four different tracks, each piece of text "For more information," "email address", "contact", "phone number" So I need to change each one. But the way that I have read about it, it seems those answers are only for one level of text.
    Help?

    You should probably be using boris title 3D rather than the default text generator.  title 3D is part of the fcp default install and is available in the same generator options where the text generator is found under Boris.
    It will allow you to conbine fonts, font sizes, etc in the same clip.
    And then you'll just have to put a color matte on a video track under the clip.
    You can of course just put all your text clips on a track above the color matte and manually change the color of all the text.

  • Images are ghosted, text and background colors are reverted

    My 12 in Powerbook fell from its stand on the wireless keyboard. Now all images are ghosted and the text has gone from black to white and the background has gone from white to black. On startup everything is fine until everything is loaded, then the changes kick in, colors reverse, and the images become ghosted. What do I do?

    Joseph
    It might be possible that the "Switch to white on black" setting in Universal Access has been activated.
    Try pressing the following key combination: apple-alt-control-8
    EDIT: It may be worth checking out the PowerBook with the Apple Hardware Test.
    2.0GHz MacBook, 15" 1.25GHz/12" 1GHz PBs, 2xPPC Mac minis, 12" iBook G4,   Mac OS X (10.4.8)   Cube, 2xTAMs, iPod 4G & nano 2G, 1G & 2G iPs, AEBS, AX

  • Getting the background color from a row

    I'm displaying a table that has alternating row colors for odd and even... when I click on a row I am changing the color to blue. When I click on a different row I want to set the background color back to what it was for the originally selected row and change the currently selected row to blue. This worked just fine when I had the colors hard coded into the code... but as soon as I started using style sheets it stoped working,
    My questions is how do I get the background color from a row... for instance, the following alert dislays nothing. How can I get the actual color out for the row?
    var tableElem = document.getElementById('table');
    var rowElem;
    rowElem = tableElem.rows[0];
    alert(rowElem.bgColor);
              

    If you're working with style sheets, then ignore the background color. You don't want to care what color is actully being used, only that the correct style is in place.
    Worry instead about the className property for your row:<style>
    .highlightRow {
       color: white;
       background-color: gray;
    .normalRow {
       color: black;
       background-color: white;
    </style>
    var tableElem = document.getElementById("table");
    var rowElem = tableElem.rows[0];
    alert(rowElem.className);
    <table id="table">
    <tr class="normalRow"><td>...</td></tr>
    <tr class="highlightRow"><td>...</td></tr>
    </table>

  • How can I change fullscreen background color, so that it is the same when viewing on mac and iPad? I want this to be able to use MathType in widget text.

    How can I change fullscreen background color, so that it is the same when viewing on mac and iPad? I want this to be able to use MathType in widget text.
    As an example, html widget has white background on iPad, and black on mac. The same goes for interactive widget.
    The MathType text inserted is inserted as a image, and will have the same color when in fullscreen as when not. So I need the textcolor to be the same in both views. Anyone know how to fix this?

    We're still not communicating. This is why I wanted an example .iba.
    Here's a re-creation of my own, going off what you described. You said "all html widgets and all gallery widgets" have this problem. So I inserted a blank HTML widget and a blank Gallery widget, and typed into both. Inserted a MathType equation into both. I don't see any difference when I preview it on my Mac compared to the preview on the iPad. I want to help, but I can't help if I can't duplicate the issue.
    I've attached the screen shots and the .iba file [link to .iba file].
    Feel free to email me directly at bobm at dessci dot com. If you're uncomfortable giving some information here, tell me anything you want in email. I work for the "MathType company", Design Science.

Maybe you are looking for

  • CONFIRMATION OF PROCES ORDER

    What do we confirm during confirmation of proces order?

  • HP LaserJet 1020 Wi-Fi SOLUTION (after 10.6.3 update)

    HP LaserJet 1020 Wi-Fi SOLUTION (after 10.6.3 update) Our 1020 stopped printing via Airport . . . SOLUTION: * Take usb printer cable from Airport base, and plug into Mac * "Add Printer" in System Preferences * Choose "HP Laserjet xxx.224" driver (tip

  • How do I install Mountain Lion on a blank harddrive?

    I'm currently living in a Snow Leopard world and thinking of switching to Mountain Lion. My question is, if I have a blank hard drive how do I install the OS? Do I have to have to install Snow Leopard first and then upgrade or is there a way to skip

  • Why can't i logg in to my itunes account on my iphone 5

    Is anyone else having issues with logging in to their Itunes account on the Iphone 5? I have entered my user name and password several times and it will not allow me to logg in. HELP

  • Change mail service to SMTP only

    Our company was running all its mail for two domains internally on Mac OS X Server 10.6. We recently switched over to Google Apps for our email. However, Google's SMTP server is SLOW, so I thought I'd try to use the SMTP server from our 10.6 Server t