Background-color ADF

Hi , good time
(Jdev 11.1.1.7)
i want to set background color for each colomn that has a special condition in adf:table .
I use a function to return a string and assign it to its style
inlineStyle="#{testBean.backGroundColor1}">
testBean is request scope ..
now
i dont see any chane ion the page !!!!!!
when i set background-color  ,,, i see changes . but it is not all that i expect . == >
                  inlineStyle="background-color:Fuchsia;"  this code sets background color of column to Fuchsia but background of inputbox still is white
How can i set background of an  af:column programmatic?               .

The inputText field is not the column, if you set the background-color on a column, it will not color it's children. You have to style the components you want styling applied to. If you have a column with an input text, and you want both to be styled, you have to style both. Background-color is not inherited. I reread your second message, and it seems like you should NOT style the column, only the contents of that column.
I would normally do something like this, using the row to determine the value. Your backing bean probably doesn't know what row is being iterated.
{sorry for hand-jammed coding errors}
<af:column>
     <af:inputText inlineStyle="background-color:#{row.attribute.value gt 0? none : red}"/>
</af:column>

Similar Messages

  • Change the background color of selected row in adf table

    Hi,
    Can somebody guide me in changing the background color of a row when its being selected. In my ADF table, one of the column is of type Command Link. So whenever i click this command link on any particular row that complete row color should change as an indication of that row being selected.
    Please guide me to do this. I referred to other forum posts, but they couldnt meet my need.
    Thanks
    ri

    Hi Frank,
    you're right. This should work. But the result is not perfect from my point of view.
    I use
    <af:table ...>
      <af:column ...>
        <af:outputText value="#{row.col1}" inlineStyle="#{row.mystyle}"/>
      </af:column>
    </af:table>and I get e.g. this in HTML:
    <table ...>
      <tr>
        <td class="af_column_cell-text OraTableBorder1111"><span style="font-weight:bold;">qqq</span></td>
      </tr>
    </table>while I would prefer to get somethig like this:
    <table ...>
      <tr>
        <td style="font-weight:bold;"><span>qqq</span></td>
      </tr>
    </table>, which looks much smarter. Is it possible?
    Thanks,
    Alexandre.

  • ADF calendar date cell  background color change

    Hi,
    I am new to jdeveloper / ADF.
    I coded per the below calender sample in my jdeveloper and it runs fine.
    http://www.oracle.com/technetwork/developer-tools/jdev/calendar-091799.html
    The current date cell shows in yellow color background. How/where can I change that color.
    Also the small calendar look up for the start/end date-time setting allows the user set the start/end time upto HH/MIN/seconds. How can I remove the seconds
    Thanks for all your help.

    You can create a new skin for your application and use the following selector which we deliver..
    .AFCalendarTodayBackground:alias
    background-color: blue;
    ALternatively, you can use the specific selector
    af|calendar af|calendar::day-of-week:today {
    background-color: blue;
    You can also see other ways of customizing your look and feel of the calendar component by referencing the hosted demo for skinning the calendar component.
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/calendar.jspx

  • ADF Skin commandButton background color

    HI I use Jdev 11.1.2.3.0 I want to change the color of a commandButton I used:
    af|commandButton {color: orange;
                                  background-image: none;
                                     background-color:green;
    in (http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/commandButton.jspx)
    and followed this tutorial (https://blogs.oracle.com/shay/entry/styling_specific_adf_components_with)
    as shown in this picture (http://img820.imageshack.us/img820/7456/avc8.png)
    the icon button gets colored but not the actual commandButton obviously is not shown when I run it.
    My skin code:
    af|commandButton
      background-image: none;
      background-color: Fuchsia;

A: ADF Skin commandButton background color

Yeah, that skin selector will apply to all buttons with those classes. If you need to limit the styling based on EL, I would do something like this
styleClass="#{condition ? 'trueClass' : 'falseClass'}"
and in the skin this should be specific enough
af|commandButton.trueClass {}
If not, you would have to do something like this, but not 100% sure if that dot shouldn't have a space before it or be a colon possibly off the top of my head
af|commandButton:text-only.trueClass

Yeah, that skin selector will apply to all buttons with those classes. If you need to limit the styling based on EL, I would do something like this
styleClass="#{condition ? 'trueClass' : 'falseClass'}"
and in the skin this should be specific enough
af|commandButton.trueClass {}
If not, you would have to do something like this, but not 100% sure if that dot shouldn't have a space before it or be a colon possibly off the top of my head
af|commandButton:text-only.trueClass

  • ADF Messages and background color

    I'm using the ADF components and I need to know how to change the background color the the af:messages component.
    It's currently tied to the accent background color in the xss file, but I would like to make it something else. Anyone know what style to change in the xss file?
    Thanks.
    - Jeff

    Yeah, that skin selector will apply to all buttons with those classes. If you need to limit the styling based on EL, I would do something like this
    styleClass="#{condition ? 'trueClass' : 'falseClass'}"
    and in the skin this should be specific enough
    af|commandButton.trueClass {}
    If not, you would have to do something like this, but not 100% sure if that dot shouldn't have a space before it or be a colon possibly off the top of my head
    af|commandButton:text-only.trueClass

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

  • 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

  • ADF Faces: Background color of components?

    Hi,
    In my application I use panelPage component to get a basic layout. From [1] I know that I can use several facets wo place my components on special places.
    I tried this with the "search" facet as well as the "infoSupplemental". Both have a different background color. When I add selectOneChoice or commandButton components, they have a white background box around them. How can I tell the components to match the background color of "surrounding" component.
    Regards,
    Stephan
    [1] http://download.oracle.com/docs/cd/B25221_04/web.1013/b25386/web_getstarted004.htm#CHDCJCGF

    Well, seems like the CSS parser does not expect inherit as a colorvalue :) Is this a known bug?
    oracle.adfinternal.view.faces.style.PropertyParseException: Invalid color: inherit
         at oracle.adfinternal.view.faces.style.util.CSSUtils.parseColor(CSSUtils.java:196)
         at oracle.adfinternal.view.faces.style.CSSStyle.parseProperty(CSSStyle.java:116)
         at oracle.adfinternal.view.faces.style.BaseStyle.getParsedProperty(BaseStyle.java:163)
         at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.TecateRenderer._parseValue(TecateRenderer.java:535)
    <af:commandButton inlineStyle="background-color:inherit;" text="#{bundle.search_action_save_label}" />

  • 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

  • How to apply background color to link button in Flex 2

    I need to apply background color to link button as the Rollover color has  on its over event.How is this possible in Flex 2 ?I am using the above  in Xcelsius as custom component so if I apply graphics and draw rect  method it does not have any effect.Please help.

    These might help:
    http://jdevadf.oracle.com/adf-richclient-demo/components/skinningKeys/column.jspx
    http://jdevadf.oracle.com/adf-richclient-demo/components/skinningKeys/table.jspx

  • Change background color of a selected line of text in textfield

    I have a list of items in a dynamic text field. When a line is clicked I would like to highlight it, or change the background color. Any ideas?

    By default, the generated application uses the oracle skin family. This skin generates the buttons as images with rounded edges so you cannot change the background color. If you change the skin-family to "minimal" in the adf-faces-config.xml, then you can change the background color of the buttons by adding a property like this to the button template:
    inlineStyle="background-color:red;"
    However, a cleaner way to do this, is by creating a custom skin, so you do not have to modify the generator templates at all. See the following link for more info on ADF Faces skinning:
    http://www.oracle.com/technology/products/jdev/101/howtos/adfskins/index.html
    In addition, using the Check for Updates feature in JDeveloper, you can install additional sample skins.
    Steven Davelaar,
    JHeadstart Team.

  • FormatType="number" sets different background color too

    Hi all!
    I have an af:table element and af:column inside that has formatType="number" to get the right-justified text. But beside right aligning the column values the column becomes gray. I don't like having text columns white and number columns gray in the same table. Is this a deliberate feature?
    I would like to set the background color to white, but background-color property for this column is not considered. If I set the background-color property for af_outputText inside this column I also don't get the desired look.
    Thanks!
    Take care!

    Hi Frank!
    I've created ADF read-only table for my view object. If I run the page immediately after this, all columns are white with gray headers which is OK. Then I change only the formatType property for one column:
    <af:column sortProperty="Mass"
                     sortable="false"
                     headerText="#{bindings.MyView.labels.Mass}"
                     formatType="number">
      <af:outputText value="#{row.Mass}">
      <f:convertNumber groupingUsed="false"
                                pattern="#{bindings.MyView.formats.Mass}"/>
      </af:outputText>
    </af:column>This makes the text in this column to be right aligned but also the column becomes gray.
    Hope to hear some more suggestions from you.
    Thanks, bye!

  • Skinning af|messages background color based on error type

    Hi,
    I would like to skin background color of af|messages body depending on the message type. For example, if message raised is of type "Warning", I would like the af|messages body's background color to be yellow. If message raised is "Error", then I would like the background to be orange and if the message is of type "Info", then I would like background to be green.
    I wonder if this is possible and if any has any idea on how to achieve this would be highly appreciated.
    Thanks
    Using JDeveloper 10.1.3 and Standalone OC4J 10.1.3.

    Hi samsam,
    You should post ADF questions to the JDeveloper & ADF forum: JDeveloper and ADF
    I guess you get more help there...
    Groeten,
    HJH

  • Calendar Activity instance using calendar cell background color

    Hi ,
    We have a requirement to show activity instance belong to a certain provider in calendar using the calendar cell background color, instead of the color of activity. Is this possible? If so, how to implement it?
    I checked the calendar skin keys here:
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/calendar.jspx
    but only find some keys related to activity like "af|calendar::month-time-activity", "af|calendar::all-day-activity" and "af|calendar::month-time-activity". These highlight the activity with color, but not the whole calendar cell.
    I saw there is a skin key called "af|calendar::month-grid-cell" which set the background color of the calendar cells for the month. This is similar to what I am looking for, but I would like the cell's background color for the cells of the activity instance only, not all the cells in the month.
    Any ideas?
    Thanks
    -Mina

    Hi Mina,
    There is a way to highlight cells corresponding to activity by using skinning, but you have to set the backgroud color property: af|calendar::month-time-activity{ background-color: Blue; }
    Georgiana :)

  • How to give Common Background color for all JPanels in My Swing application

    Hi All,
    I am developing a swing application using The Swing Application Framework(SAF)(JSR 296). I this application i have multiple JPanel's embedded in a JTabbedPane. In this way i have three JTabbedPane embedded in a JFrame.
    Now is there any way to set a common background color for the all the JPanel's available in the application??
    I have tried using UIManager.put("Panel.background",new Color.PINK);. But it did not work.
    Also let me know if SAF has some inbuilt method or way to do this.
    Your inputs are valuable.
    Thanks in Advance,
    Nishanth.C

    It is not the fault of NetBeans' GUI builder, JPanels are opaque by default, I mean whether you use Netbeans or not.Thank you!
    I stand corrected (which is short for +"I jumped red-eyed on my feet and rushed to create an SSCCE to demonstrate that JPanels are... mmm... oh well, they are opaque by default... ;-[]"+)
    NetBeans's definitely innocent then, and indeed using it would be an advantage (ctrl-click all JPanels in a form and edit the common opaque property to false) over manually coding
    To handle this it would be better idea to make a subclass of JPanel and override isOpaque() to return false. Then use this 'Trasparent Panel' for all the panels where ever transparency is required.I beg to differ. From a design standpoint, I'd find it terrible (in the pejorative sense of the word) to design a subclass to inconsistently override a getter whereas the standard API already exposes the property (both get and set) for what it's meant: specify whether the panel is opaque.
    Leveraging this subclass would mean changing all lines where a would-be-transparent JPanel is currently instantiated, and instantiate the subclass instead.
    If you're editing all such lines anyway, you might as well change the explicit new JPanel() for a call to a factory method createTransparentJPanel(); this latter could, at the programmer's discretion, implement transparency whichever way makes the programmer's life easier (subclass if he pleases, although that makes me shudder, or simply call thePanel.setOpaque(false) before returning the panel). That way the "transparency" code is centralized in a single easy to maintain location.
    I had to read the code for that latter's UI classes to find out the keys to use (+Panel.background+, Label.foreground, etc.), as I happened to not find this info in an authoritative document - I see that you seem to know thoses keys, may I ask you where you got them from?
    One of best utilities I got from this forum, written by camickr makes getting these keys and their values very easy. You can get it from his blog [(->link)|http://tips4java.wordpress.com/2008/10/09/uimanager-defaults/]
    Definitely. I bit a pair of knucles off when discovered it monthes after cumbersomely traversing the BasicL&F code...
    Still, it is a matter-of-fact approach (and this time I don't mean that to sound pejorative), that works if you can test the result for a given JDK version and L&F, but doesn't guarantee that these keys are there to stand - an observation, but not a specification.
    Thanks TBM for highlighting this blog entry, that's the best keys list device I have found so far, but the questions still holds as to what specifies the keys.
    Edited by: jduprez on Feb 15, 2010 10:07 AM

  • Maybe you are looking for

    • Problems uploading a text file with line feed characters from Windows

      Hi, I am using the FM GUI_UPLOAD to load a text file in which at the end of each line there is a line feed character. When I upload the file, the FM interprets the entire file as ONE record; it does not recognize the line feed character at the end of

    • Can the XML style sheet be embedded in the report file?

      My customer would like to be able to share test reports with several locations. The problem is that sending just the XML report file is not enough. The report file points to a style sheet that must exist at the specified path on the destination PC. I

    • Something about "runU" folder

      Hello Guys! Excuse me, perhaps a stupid question for an SAP Administrator but could someone clarify for me the sense of the "runU" folder on here XI 3.0 system (NW04, WAS 640, unicode). E:\usr\sap\DX3\DVEBMGS05\SYS\exe\run E:\usr\sap\DX3\DVEBMGS05\SY

    • Business Objects Universes generation

      Hi everyone, We wish to install and use Web Intelligence (Business Objects Enterprise Premium). I understand that Web Intelligence requires universes and that they can be generated via Universe Designer or Universe Builder. With these tools, we can g

    • Caliculate Variance Actual Vs Plan data

      Hello Friends, I have a requirement like below in BPS I have Char Material, fiscal year and version and Keyfig as Amount and i want to display Actual 2008 vs Plan 2009 data Ex Mat......Actual Amt2008........Plan Amt 2009......Variance AA.........100.