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

Tags: Java

Similar Questions

  • Under certain conditions changing IMG link Standard report column

    Apex 4.0.2

    I have an application that includes photos of employees. I want to display a link to the column in a report of the employee who opens a page to manage the photos of a given employee. Worked well when using an image of compatible icon for all employees.

    But I want to do is have two images of icons. If a photo already exists. Another case a photo has not yet been added.

    I have included a select with the following CASE statement in the Source of my region.

    (CASE WHEN p.person_id IS NULLTHENIMG alt = "nophoto" src ="#WORKSPACE_IMAGES #nophoto.png" > "
    ON THE OTHERIMG alt = "photo" src ="#WORKSPACE_IMAGES #photo.png" > "
    END) "PHOTO".

    I believe it works. I ran in SQL Developer, and it produces the following-

    < img alt = "photo" src = "#WORKSPACE_IMAGES #photo.png" >

    < img alt = "nophoto" src = "#WORKSPACE_IMAGES #nophoto.png" >

    I created a link to the column as a COLUMN of REPORT STANDARD. I put the TEXT of the LINK to #PHOTO #. I put the binding TARGET, PAGE and EMPTY the CACHE settings. The column displays as empty. Firebug shows an empty TD.

    I remove the binding TARGET settings, PAGE and CLEAR the cache. The img is displayed correctly. Firebug shows the < img > properly. But of course, it is therefore more a link.

    I'm doing something wrong here. But do not know what it is.

    Walt K wrote:

    Apex 4.0.2

    I have an application that includes photos of employees. I want to display a link to the column in a report of the employee who opens a page to manage the photos of a given employee. Worked well when using an image of compatible icon for all employees.

    But I want to do is have two images of icons. If a photo already exists. Another case a photo has not yet been added.

    I have included a select with the following CASE statement in the Source of my region.

    (CASE WHEN p.person_id IS NULL THEN 'nophoto'
         ON THE OTHER 'photo'
    END) "PHOTO".

    I believe it works. I ran in SQL Developer, and it produces the following-

    photo

    nophoto

    I created a link to the column as a COLUMN of REPORT STANDARD. I put the TEXT of the LINK to #PHOTO #. I put the binding TARGET, PAGE and EMPTY the CACHE settings. The column displays as empty. Firebug shows an empty TD.

    I remove the binding TARGET settings, PAGE and CLEAR the cache. The img is displayed correctly. Firebug shows the correctly. But of course, it is therefore more a link.

    I'm doing something wrong here. But do not know what it is.

    That's because the behavior of standard report is to strip the HTML code of column values used in the expressions of HTML, links in the column and the report when the data is exported as CSV files. This is controlled by the attribute of HTML report of band, which by default is set to Yes. Change this setting to No. , and link images to be displayed.

    A solution with a better separation of concerns that are compatible with the Strip HTML and display text default settings is:

    1. Select only the image name in the query [ nvl2(p.person_id, 'photo', 'nophoto') photo is simpler than the previous CASE expression] and make this hidden column
    2. Add a link in the column to the State ('add column link' in the bar of tasks )
    3. Set the property of the new column binding Expression in HTML to#PHOTO#
    4. Specify the column link attributes as required

    Last suggestion would be to display thumbnails of the photos used here where they exist rather than an arbitrary generic image...

  • imaqReadAVIFrame retrieves the empty image under certain conditions?

    Hello

    I'm having a problem where imaqReadAVIFrame (.) is the white recovery (all black images) under certain conditions.  The conditions seem to be when the height of the AVI file is equal to or greater than the width and the height is an odd number.  AVI files created by using the various AVI NI Vision (IMAQ 4.6.1, IMAQdx 4.6.1) functions in an application created in CVI 2012 on a computer running Windows 7 64 bit.  AVI files use MJPEG compressor, and they play back fine in an external program like VLC or Windows Media Player.  Any ideas on what this could be?  My solution for now is to not to allow the creation of AVI files where the height is odd and equal to or greater than the width that is not a boring restriction, but it seems like there's something weird happens with imaqReadAVIFrame().  I can provide some AVI files if necessary, but they are 16 + MB each.

    TStanley,

    I managed to reproduce what you see with your .avi files in a program I wrote.  I built a LabVIEW program that creates an AVI file which can be saved to memory and then uses code from the example finder to read who created the file.  I build the file to your specifications at the height is greater than the width, and the height being an odd number of pixels.  Something interesting about this, however, is that it seems to be a point where an odd height is acceptable.  Once you go below the height of 291 pixels, any odd height then works.  The files that I used are written as read in LabVIEW, but that the configuration should be irrelevant because we are seeing the same issue.  In addition, LabVIEW and LabWindows CVI calling the same dll to actually set up the code.

    In this, I think this question arises from the nature of the way you compress the. AVI file.  If you are interested to read a bit more about it, a useful link can be found here:

    http://www.manifest-tech.com/media_pc/avi_formats.htm

    However, what I think is happening, is it that MJPEG file compression format translates into creating files that cannot be read by our software unless the height in pixels is a multiple of 2 or the size of the file is below a certain limit.  To fix that, there is a simple solution. Compress the file with any of the other compression methods available (DV video, Cinepak Codec, codec Intel IYUV, Microsoft RLE, Microsoft Video) and you will be able to open the file without the black screen.  This worked for me and should solve all your problems.  I hope this gives you a bit of insight.

    Kind regards

    Keith M

    Technical sales engineer

  • Under certain conditions allow a Feedback

    We use integrated installation of APEX flow back. We love this feature but, we will only use it in development. Is that anyway, apart from the use of JavaScript to hide or remove the link, we can have this under certain conditions depending on the environment in which the application is running?

    I know we can go turn off in the properties of the Application, but we have a ton of environments and having to manually press this switch whenever get us a new version of the application becomes tedious. I expect something more by program / data driven. For example, is it possible to return this switch integrated with PL/SQL?

    Thank you

    -Joe

    Create a compilation Option. In the development environment has defined the status on Includeand by default on export to exclude.

    Apply the Option to build on the entry page and the navigation bar of your comments. When the application is imported into a different environment the comments link and the page will not be returned.

  • Under certain conditions create script

    Hi, I want to put a redirect code in my stsytem to help, it is possible to build under certain conditions one < script type = "text/javascript" > tag?

    Any help would be great appricieated

    oooo and meta tags as well!

    You are wanting to add a Javascript within a topic and then conditionalise it so it appears only in some outings? If so, check out this part of the aid for the addition of scripts. Once it is in, you should be able to add a tag of conditional compilation to exclude required results.

    I'm not sure you can conditionalise however meta tags. Maybe if you elaborate a bit on what you're trying to reach.

  • How can I add a page under certain conditions?

    Hello

    I'm trying to find a way to add a page to my form under certain conditions. I tried to create this sequel to 'action', but failed to locate the correct action.

    To sum up, I am trying to add a separate page to my existing form with instructions when a specific check box is selected. The separate page is text only and does not form any entries/field. Is there a relatively simple way to accomplish this task?

    You can enter the code in the script editor. If you do not show you can get it by pressing on (on PC) Ctrl + Shift + F5.

  • Color of the text label changing under certain conditions

    Hello

    I have these labels and I would like to change the color of the text IF the text has some specific value (from an XML created by a program); for example, the default text color is red, but if the text value is 'Yes', the text color should be green.

    Any help much appreciatted, as usual...

    Thank you.

    not sure, but you might be able to get away with something like this:


    http://www.Adobe.com/2006/mxml"layout ="absolute">
       
       
           

    public void changeColor(value:String):uint
    {
    If (value is 'Yes')
    {
    Return 0x007F00;
    }
    on the other
    {
    Return 0x7F0000;
    }
           
    }
               
    ]]>
       
       
       
           
           
           
       

       

    using a single label in a point renderer, passing through the "data.text" value

  • How can I conditionally change the color of the numbers in a digital indicator display?

    I want to change the color of the numbers in an indicator if they are greater than a certain number how can I do this?

    Use an indicator in the table and then the color of the cells according to your needs.

    (You cannot change the property of the individual elements of the table anyway. Properties are global for all items in an array)

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

  • Excel freeze when changing cell color and HP LaserJet CM1415fn is default printer

    We use a HP LaserJet CM1415fn connected via Ethernet. The computer is running Windows 7 x 64 with the latest printer drivers available on the HP Web site as of today.

    When this printer is the default printer, there's a freeze occurring in Excel when we try to change the color of a cell, exactly as described here:

    http://answers.Microsoft.com/en-us/Office/Forum/office_2010-Excel/changing-font-color-causes-Excel-t...

    and here:

    http://answers.Microsoft.com/en-us/Office/Forum/Office_2007-Excel/Excel-not-responding-when-changing...

    Both messages suggested that set the default printer to something else solves the problem and that the problem lies in the driver printer, and indeed, the default printer to something other that our HP printer makes this problem disappear immediately.

    Could you please provide an updated driver or a workaround another that set the default printer to something else?

    To after what I read this peut be bound by printer drivers, but I doubt that the problem is caused by the printer driver. They do refer to is an editor of document to their default the Printers folder, which I do not have is - not - a printer driver. The XPS Document Writer 'prints' documents in a file, it is not really a printer driver at all and it's more a misnomer to consider it as such.

    The description of the problem, it seems always be attached to the Software Suite. If it is a problem that the effects of several printer drivers (according to the user), it wouldn't make sense to assume that the problem is the drivers for the printers belonging to users who have this problem, but the common factor uniting the experiences here, that would be the desktop software.

    What you can do is check the following link to ensure that A) all updates are applied correctly B) driver software is updated through uninstall/reinstall and (C) you ensure that the printer firmware is up to date:

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?cc=us&LC=en&DLC=en&product=4089468

    It is possible, it's a hangup in the software, but if things internally within the program that it would not make sense of how the printer HP programming works.

    I would like to know how it goes!

    -Spencer

    PS Hope you have a wonderful day and that your time is as beautiful as she is here!

  • Under certain conditions see the popup on page (fragment) charge

    Hi Experts,

    We have an obligation to show a popup on the page load, if a certain condition is true.

    I have two fragments (home.jsff and profile.jsff). Initially when the user login, home.jsff is indicated and that there should be no popup.

    When the user goes to profile.jsff and save the changes, it must first redirect to home.jsff and show a popup with the confirmation message.

    I can't create a fragment separated for the popup where we need to redirect to profile.jsff and then redirect to home.jsff as said the requirement that the popup should display the content of home.jsff in the background.

    Also I can't use showPopup behavior during the loading of the page because it's a jsff.

    Please suggest how to implement this.

    Thanks in advance.

    Best regards

    Saurabh

    ... There's an even simpler option

    1. Add a hidden from the fragment output text element

    2 bind the output components text 'value' property to a bean property of manage (pair of getter/setter)

    3. when the getter of the value method is called, check the indicator that you defined for if you want to display the context menu or not

    4. If the indicator is such that the popup needs to be displayed, run the Java Popup

    4.a search the component RichPopup

    4.b set flags of the popup

    4.c unset flag to display the pop-up window (for the next time you need to put it)

    4.d see the popup

    Frank

  • Help with multiple locations on a XY graph under certain conditions

    Hi, I have a question about manipulating a XY Chart.

    (1) whenever the plot crosses the x-axis for value go to the top, I want the plot to change color, so that it crosses 0 will go back to the top, and I want that specific portion having a different color. It's really hard to explain, so I'll post a picture:

    [URL =http://img691.imageshack.us/i/xygraphexample.jpg/] [IMG] http://img691.imageshack.us/img691/4540/xygraphexample.jpg [LINE] [URL]

    As you can see, if the graph we cross the x-axis by decreasing, it should not change color. Only increase.

    I can't understand how to do this. I know it will take more than one location, but how would I randomly change the color as well as detect if its path that goes to the top or not.

    Any help would be appreciated.

    Thank you

    OK - chance I'm not too busy today...

    Usually, I use either screw express, but was looking for a quick solution for you.

    Here's the sample made with only the basic trigger function - no express VI.

    Also added a selectable threshold by the user.

    Then, on the space between the plots, if there is no data in the original, there no data in the colors either.

    See second attachment

  • hide the text label in the section report IR under certain conditions

    Hello
    We have a textlabel and a calculated field in a section of report to the IR 11.1.2.1. Is it possible (in a script) to hide the textlabel and field based on certain conditions, like for example, if the field computes to 'zero '?
    Thank you.

    Use a field instead of the text label. In the Expression Editor you can use the function if() {} else {}

    HTH

    Wayne

  • Change the color of a dynamic text field selection

    Hi all

    Among the requirements of the project, I must provide functionality in my application to be able to change the color of the text box selection. Which does not Flash, I searched the net and found a good example of this with the flash.geom.ColorTransform and TextFormat classes. It works very well with windows. However, it does not work on Mac OS x. I use Flash 8 with ACE 2.0 for development.

    Please see the attached code

    Please advice.
    TIA

    I...

    Flash player version problem... I've upgraded to Adobe Flash Player 9 update 3, version 9.0.115.0 on Mac FF2 number and the color transformation works perfect!

  • How to change the display of a dynamic array limits?

    Hi people,

    I use DW CS4 and PHP. I have a php page with a dynamic array and the repeating region that I built for my client. This table lists our list any active member. Initially, I built the PivotTable to display records that only 50 to 300 + records because both made a long page. My client wants to now all records on a single page, because he does not like to click on through the first Recordset Paging - next - previous - last list to find who he is looking for. I tried to change the behaviour of repeat in all records (rather only 50) region, but it still shows that 50. I don't know that it is because initially when I set up the dynamic table, I limited to 50 it. Is there an easy way to change the dynamic array of 50 to all records, without rebuilding the whole page? I have looked in many places and cannot find a way to change this. Thanks for your help,

    Gail

    If the page in question is - apart from the table - not too complex, the probably simplest is to...

    (a) copy the table * code * to the Clipboard and paste it in, say, a simple text editor such as Notepad

    (b) to rename the current document to something else for backup purposes

    (c) create a new document and insert a simple recordset (must be named identically to allow an easy transition)

    (d) to paste the code in the table in here

Maybe you are looking for

  • Privacy &amp; Security EtreCheck

    I'm trying to solve a problem of security and confidentiality. As an Admin user, I cannot unlock Security & Privacy to make changes now. However, I can still open users and groups. By a different debate, it has been suggested that I have download Etr

  • Flash end 2015 macbook pro os 10 elcappitan

    After checking the allow plugging macros area, a screen poped and ask if I wanted to turn flash off or update Flash.and I accidentally said yes to turn it off. How can I turn flash on. Thank you

  • Error code coming 1097 in DLL call

    Hello I get the error code 1097 in the DLL function call. Please find the DLL by calling the function for more information. Function: GetControllerListTest (Controller * ptrControllertest, char * max_controller);   Parameter Controllertest details: s

  • Customized with no. ButtonField or a transparent border

    I am trying to create a ButtonField custom that has no visible border.  I was able to do this very easily to 4.6 and upward with the api set, but my goal is 4.5.  I have a VerticalFieldManager with a background image and my custom button is really 6

  • Adobe converts not just photocopiing

    tonight I exportd beautifuly leasible document in pdf to be converted to word and the result was just huge photo in word, i.e. do not convert will be the return of the company me fees paid for the service not performed? Thank you Helena