How to change the background color of a single row

Hi OTN,
I am using JDeveloper 11.1.1.2 with ADF faces in view layer.My issue is How to change the background color of a single row in af:table ?.

How to highlight ADF table row based on column value?
Found by searching

Similar Messages

  • How to change the background color of a desktop??

    any ideas how to change the background color of a desktop?? Now the default color is blue. I couldn't fine the API in JDesktopPane on doing that..
    JDesktopPane desktop = new JDesktopPane(); //(textArea);

    Try the method setBackground. For me it's work.

  • How to change the background color of a sequence?

    I'm using Premiere Pro CS5 on Win7 x64.  I've imported a JPEG that's a different size than my 1920 x 1080 frame.  The background of this JPEG is white, but the background of the sequence is black (by default), so the borders of the JPEG make it stand out.  I want the JPEG to blend into the sequence background by making the sequence background white.  How can I change the sequence background color?  Thanks.

    Jim and Ann are correct. I can see where someone used to After Effects might ask that question though because in AE you can change the background color of the composition. Same with Photoshop.
    However, I think it would confuse things if changing the background color were to be allowed in Premiere Pro. Black tells me something. I suppose white could tell me the same thing, but at this time it is not possible in Premiere Pro.

  • How to change the background color of a cell in datagrid using flex3

    i want to change the background color of a cell.....how can i achieve this.....and also i want to know how a spacing cane be done between cells in a datagrid...plzzz help me???

    The only way I can see to do this is to use an item renderer for your cells.  This is really scruffy and would need tyding up, and maybe with a little more time could do better or someone else may have an idea but none the less this works.
    Define a custom component as below;
    This has logic to see what the value of the data is proveided by the dataprovider for the row, and if it matches the conditions in this case is equal to 5 sets the background color.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="88" height="26" dataChange="doColor()" borderColor="#000000" borderStyle="solid"
        backgroundAlpha="1">
        <mx:Script>
            <![CDATA[
                private function doColor():void {
                    if (data.value == 5) {
                        setStyle('backgroundColor', 0xcccccc);
                    } else {
                        setStyle('backgroundColor', 0xffffff);
            ]]>
        </mx:Script>
    </mx:Canvas>
    Now just apply the item renderer in the datagrid and that will do it.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  xmlns:ns1="*">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                [Bindable]
                private var ac:ArrayCollection = new ArrayCollection([
                    {value : 1},
                    {value : 2},
                    {value : 3},
                    {value : 4},
                    {value : 5},
                    {value : 6},
                    {value : 7},
                    {value : 8},
                    {value : 9},
                    {value : 10}
          ]]>
        </mx:Script>
        <mx:DataGrid x="40" y="36" width="408" height="193" dataProvider="{ac}">
            <mx:columns>
                <mx:DataGridColumn headerText="Column 1" dataField="value" itemRenderer="MyComp"/>
                <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    I hope this helps
    Andrew

  • How can I change the background color of odd/even rows in a panelCollection

    Hi everyone.
    I'm using a panelCollection and I need to change the backgroung color for odd/even rows in the table,
    how can I do this, using a stylesheet, is there a special selector or property for this?
    globalResultCollection (UIPanelCollection object) , is a collection of UITable elements, and it's working fine.
    I just want to change the defaul background color for rows.
    Thanks
    <af:panelCollection id="GLOBAL_RESULT_COLLECTION"
    binding="#{admin.view.globalResultCollection}"
    styleClass="globalResultCollectionRegion"
    clientComponent="true">
    <f:facet name="menus">
    <af:menu id="GLOBAL_OPERATION_MENU"
    binding="#{admin.view.globalOperationMenu}" />
    </f:facet>
    <f:facet name="toolbar">
    <af:toolbar inlineStyle="width:100%"
    binding="#{admin.view.globalOperationToolbar}"
    id="OPERATION_TOOLBAR"/>
    </f:facet>
    </af:panelCollection>

    Hi,
    use this:
    af|table::data-row af|column::data-cell { background-color: #CCCCFF; }
    af|table::data-row af|column::banded-data-cell { background-color: #FFCCCC; }
    Regards,
    s o v i e t

  • How to change the background color only for one HTML-Portlet?

    Hi all,
    I have created a HTML-Portlet in my root-page. The root page have a style: Main-Style.
    I want to change the background-color only for this one HTML-Portlet:
    <html>
    <header><title>Test</title></header>
    <body bgcolor="#999999">
    Test
    </body>
    </html>
    But this does not work...
    When I use the CSS, then it will change the background-color for the root-page too.
    Thans
    Leonid Pavlov

    could you try this
    <table bgcolor="#999999">
    <tr>
    <td>
    test
    </td>
    </tr>
    </table>
    I don't think you need <html><header><title>Test</title></header>
    <body></body></html> for your HTML-Portlet.

  • How to change the background color of a cell based on other cell background

    Hi,
    Sorry if this is a basic question - I am new to XML. I want to create a table column, with no data in it. I then want to change the background color of the column based on the background color of other columns. I.E.
    - If there are 3 or less cells in this row that are not green, color this cell green.
    - If there are 4 or less cells in this row that are not green, and 3 or less are not red, color this cell yellow.
    - If there are 4 or less cells in this row that are not green, and 3 or more are red, color this cell red.
    If there are 5 or more cells in this row that are not green, color this cell red.
    Many thanks for any assistance.

    Okay - I have this resolved.
    1. Create two variables (Yellow and Red):
    <?xdoxslt:set_variable($_XDOCTX, 'Yellow', 0)?>
    <?xdoxslt:set_variable($_XDOCTX, 'Red', 0)
    2. For each cell, set the background based on their individual traffic light criteria, and update the associated color variable by 1. By default the backgrd color is set to Yellow so I only have to check for the lower and upper bounds:
    <?choose:?>
    <?when:number(CHECKED_IN)<=1?>
    <?attribute@incontext:background-color;'Lime'?>
    <?end when?>
    <?when:number(CHECKED_IN)>3?>
    <?attribute@incontext:background-color;'Red'?>
    <?xdoxslt:set_variable($_XDOCTX, 'Red', xdoxslt:get_variable($_XDOCTX, 'Red') +1)?>
    <?end when?>
    <?otherwise?>
    <?xdoxslt:set_variable($_XDOCTX, 'Yellow', xdoxslt:get_variable($_XDOCTX, 'Yellow') +1 )?>
    <?end otherwise?>
    <?end choose
    3. I now want a cell that is Red if any of the cells in the row is red. Its yellow of there are 3 or more yellow cells in the row, and no reds. Otherwise its green. First, create an empty cell and make the default color green. Then add:
    <?if: number(xdoxslt:get_variable($_XDOCTX,'Red')) > 0?>
    <?attribute@incontext:background-color;'Red'?>
    <?end if?>
    <?if: number(xdoxslt:get_variable($_XDOCTX,'Yellow')) >= 3 and number(xdoxslt:get_variable($_XDOCTX,'Red')) = 0?>
    <?attribute@incontext:background-color;'Yellow'?>
    <?end if?>
    4. Finally, reset the variables for the next row:
    <?xdoxslt:set_variable($_XDOCTX, 'Yellow', 0)?>
    <?xdoxslt:set_variable($_XDOCTX, 'Red', 0)

  • How to change the Background color of a cell in JTable

    hi!
    Actually i want to change the background color of few cells in JTable
    is there any method to make this change in JTable ?
    and also is it possible to have 5 rows with single column and 5 rows with 3 columns in a single JTable

    i want to change the background color of few cells in JTableDepending on your requirements for the coloring of cells it may be easier to override the prepareRenderer() method of JTable:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=610474

  • How to change the background color ?

    Hi !
    I wonder if I could change the background color in my webpage http://web.mac.com/wiktorkidziak/iWeb/ (I mean the white part) using iWeb ?
    Regards,
    Wiktor

    Open the Page Inspector and use Page Background to change to whatever you want. You can also change the colour of the Browser Background in the same place.

  • How to change the background color of  a Tab Canvas

    Hi All,
    I accidentally changed existing background color of a tab Canvas to ' gray' which is not matching with main canvas (which has default).
    How can I change background color to default. Please help me.
    -Thanks

    In the property palette of the tab page, click on the "Background Color" property and click the "Inherit" button on the top of the property palette, this will revert the value of the property to the default when the tab page was created which is <Unspecified>.
    But if your tab page has inherited the color from a property class it will revert to what was specified in the property class.
    Tony

  • How to change the background color of a button when the button is emphasized

    Hi,
    I have a button that is in the "emphasized" state, I realized there is a default color "light blue" when the button is emphasized. is there any way I can change this default color? so if mu button goes to emphasized state I can control which color it should be
    I am using "Halo" for the theme, and I was not able to change the Focus color through the "Appearance Window" in Flash Builder 4
    any help would be appreciated

    Take a look at the accentColor flag of <s:Button>. It looks like you can do it there. But, it also looks like emphasized needs to be "true" and that you may need to interrupt the button's automatic update event... I've never tried to do this though. And, I imagine you only need to listen to button state changes if you want to dynamically control the emphasized color. If you just want to set a static value other than the default, it looks like setting emphasized to true and the uint of the accentColor will do the trick...

  • How to change the background color of a screen field

    Hi All,
    I have created a screen, in the output, the fields in the screen are having same color with the screen.
    My client want the fields to be in the gray color.
    For more clarification,
    Goto SE11, Enter any table name, Click on display
    In the next screen, observe the fields
    Name, Short text, Last changed, Status are in the same color with the screen. Where as their values...
    MARA, Material Master: General Data, etc are in the screen with gray background, I want in that way.
    Any hint...
    Thanks,
    Kal Chand

    hi
    As i understand, in your scree u have taken "pushbutton" instead of taking  "I/O field"
    So make ur fields to "I/O fields"
    Reward if it is helpful.
    Thanks
    Siva Kumar

  • How to change the background color of a view in Web Dynpro?

    Has somebody an idea how to do that? Also is it possible to change the bg of a TransparenContainer?

    i think you cannot do that with transparent container.
    try with group. color option is also very limited.

  • How to change the background color for lookup column options in sharepoint 2007

    Hi,
    I have a custom List with 10 fields,and in the edit form we want to display only 6 fields,
    So I have customized it with sharepoint designer 2007 ,designed a new custom edit form(Insert->ShaerPoint Controls->Custom List Form)
    We are using IE8 Browser,and the site has JQuery 1.8 loaded .
    The lookup columns is getting rendered as textbox and dropdown arrow image,instead of select html element.
    When we click on arrow image,its displaying the values magically,So I am unable to highlight the options with text "ABC" in yellow background color
    basically in the input textbox its storing all the lookup values as "ID|value "in choices attribute (I saw this in browser dev tools)
    I tried to set the textbox color everytime it loses focus using blur,however its always returning the previous value instead of current selected value.
    Is there any way we can achieve this,Any solutions/thoughts
    Thanks everyone..

    hi i bet you need to amend your jquery script to get onclick values and put it with like append HTML if you want to use Jquery.
    Also did you know you could use javascript in calculated column with type number?
    Check:
    http://sharepointwijzer.nl/sharepoint-blog/tech/icc-html-calculated-column-sharepoint-view
    Imposible is nothing

  • How to change the font color of a particular row in af:table

    I have a <af:table> bounded to a readonly ViewObject and this view object is a collection of an sql query. Now when this table is rendered i want font color of the specific attributes to be changed based on certain logic.
    Eg. If my af:table is showing a resultset which has Attributest like ... EmployeeName | BalanceLeave . Then i want that the BalanceLeave value shoud be displayed in RED color if leave balance attribute value is more than 20.
    Please help me on this.

    For this you use the styleClass property of the attribute and use an EL bound to a managed bean to return the desired style.
    Something like this to switch the color public class ColorSwitchBean {
        public ColorSwitchBean() {
            super();
        String mStyleClass = null;
    String mColorSyle = null;
        public String getStyleClass() {
            FacesContext fc = FacesContext.getCurrentInstance();
            ELContext elc = fc.getELContext();
            ExpressionFactory elf = fc.getApplication().getExpressionFactory();
            String sval =
                (String)elf.createValueExpression(elc, "#{row.City}", Object.class).getValue(elc);
            if (sval.startsWith("S"))
                mStyleClass = "red_background";
            else if (sval.startsWith("M"))
                mStyleClass = "green_background";
            else
                mStyleClass="";
            return mStyleClass;
         public void setStyleClass(String aStyleClass) {
            mStyleClass = aStyleClass;
        public void setColorSyle(String mColorSyle) {
            this.mColorSyle = mColorSyle;
        public String getColorSyle() {
          FacesContext fc = FacesContext.getCurrentInstance();
          ELContext elc = fc.getELContext();
          ExpressionFactory elf = fc.getApplication().getExpressionFactory();
          String sval =
              (String)elf.createValueExpression(elc, "#{row.City}", Object.class).getValue(elc);
          mColorSyle = "";
          if (sval.startsWith("S")) {
              mColorSyle = "background-color:Red";
          else if (sval.startsWith("M")) {
              mColorSyle = "background-color:Green";
          return mColorSyle;
    }and this inside the table:- <af:column sortProperty="City" sortable="true" headerText="#{bindings.Departments.hints.City.label}" id="c1" styleClass="#{ColorSwitchBean.styleClass}">
      <af:outputText value="#{row.City}" id="ot2" /> Timo

Maybe you are looking for

  • UI element in WebDynpro

    Hi everyone, I am trying to get the properties of a button in a webdynpro by doing : IWDButton button = (IWDButton)wdContext.getCurrentElement().getAttributeValue("Go_ctx"); button.setEnabled(false); I get a CastClassException. Can someone help ? Tha

  • ABAP WP Issue in SAP MMC

    Dear Guru's, After upgrading kernel 133 in our solution manager, we're unable to see anything in ABAP WP Table of SAP MMC. But, we are able to login to SAP and work on it. Closed and reopened the MMC, still we are facing the issue. Kindly suggest wha

  • Restored iDVD 6, doesn't work in Snow Leopard (10.6.4)

    I recently had to restore iDVD from my Tiger restore disc, (I foolishly deleted it, stupid I know) and now whenever I try and open iDVD it says the version of iDVD is not compatible with the OS. I'm pretty sure I just need to update iDVD, but I am ha

  • Add photos.

    How can I add photos in Indesign? Are there some option for link pictures in order to avoid add pictures one by one. For example, if I´m doing a catalogue and have 100 different models and in each page I need add a pictures acording with model  how c

  • Vendor Evaluation process (with QM module not implemented)

    Hi Can I have more input on Vendor Evaluation process (with QM module not implemented)  please ?