How to get the time of browser in the project template

Hello

With Jdev 11.1.2.3

How can I get the time to browsers in the model project?

Groovy accesses the browser time?

I have to do some calculations (based on the time of the browser) for each row returned by a query. I think it would work if I could get time to groovy browser because I was able to perform the calculation in the SQL of my View object.

But I can't seem to find how to get browser in Groovy times? Any ideas?

The other option, is to use JavaScript to get the date of the browser, that should work, but the lines are displayed from a query in an AF:table, I need to apply the calculation to set the color of the table date field based on the calculation of date browser. So a java method should run for each row returned and displayed in the table.

What senses seem to better you experts? I seem to be in a catch 22 here... Any ideas? And there are items that you can reference?

Thanks for the help.

Published by: 966952 on March 11, 2013 05:41

As I said, you can set the inlinestyle of the field you want to change the background of a method of bean that return a style as appropriat

// Bean code: the bean is set as requestScope bena in adfc-config.xml
import javax.el.ELContext;
import javax.el.ExpressionFactory;
import javax.el.ValueExpression;

import javax.faces.application.Application;
import javax.faces.context.FacesContext;

public class TableInlineStyleBean
{
    public TableInlineStyleBean()
    {
        super();
    }

    // get a value

    private Object  getValueExpression(String name)    {
        FacesContext facesCtx = FacesContext.getCurrentInstance();
        Application app = facesCtx.getApplication();
        ExpressionFactory elFactory = app.getExpressionFactory();
        ELContext elContext = facesCtx.getELContext();
        ValueExpression lCreateValueExpression = elFactory.createValueExpression(elContext, name, Object.class);
        return lCreateValueExpression.getValue(elContext);
    }

    public String getCalculateStyle()    {
        //use expression from table or any other EL to do the calculation
        String val = "#{row.CommissionPct}";
        Object obj = getValueExpression(val);
        String color = null;
        if (obj != null)        {
            Number n = (Number) obj;
            // return red as background if CommissionPct > 0.2
            if (n.floatValue() > 0.2)
                color = "background-color:Red;";
        }
        return color;
    }
}

And in the af: table a column (for example CommisionPct)

                            
                                
                            

Timo

Tags: Java

Similar Questions

  • I'm new to CC.  I discovered that I had to download first CS6 inorder to get it. (May not yet know how to get the title templates, etc. cannot understand instructions; but I spread) I see that it still says trial.  How can I get the

    I'm new to CC.  I discovered that I had to download first CS6 in@order to get it. (May not yet know how to get the title templates, etc. cannot understand instructions; but I spread) I see that it still says trial.  How can I get the full thing.  I am a Subscriber complete cc

    I don't know what you've done, but here are the instructions to install the PProCS6 and the callback with a cloud account

    Yet the instructions http://helpx.adobe.com/encore/kb/encore-cs6-installed-cc.html if you have a subscription

    - and the difference in the Cloud application manager 2015 https://forums.adobe.com/thread/1906752

    Still will not run as a trial, it is enabled when you install and activate PProCS6

  • get the project name to use in a procedure?

    How to get the project name to use in a procedure?
    example of < % = odiRef.getOption ("COMPATIBLE") % > - but the name of the project or your ID?
    the 11 ODI.
    Thank you

    Published by: ODI Dev user on 12/01/2010 16:42

    Hello

    Why you want to get the name of the project? When you place a repository of development to a repository of execution, where there is no concept of projects, what value do you offer you to get?

    BOS

  • How to get the Subvi (the virtual path is in .exe) reference in Run Time System

    Hello world

    The problem is how to get the reference of the Sub - VI in run time system, when the Subvi is in .exe after construction.

    More details:

    Top of page vi called the Subvi dynamically, so that the Subvi is always included, and the source object is the application.exe.

    After the above configuration, the Sub - VI will be the application.exe. For example, the path of Subvi est...\application.exe\SubVI.vi

    So, how to get the reference of the Subvi in Run Time System?

    I can't do it when you use 'open reference VI' with le...\application.exe\SubVI.vi path in the run time system.

    In fact, I can create a file to include the Subvi, rather than build the Subvi in application.exe, then I can get the convenintly reference. But this isn't my favourate average.

    Thank you

    chenyin

    That is the problem. Call a Subvi dynamic means users could change, but it is also very attractive.

    The dynamic call should be used in a user control, but some parade can avoid problems.

    It depends on why you use dynamic calls...-online 2 main ways:

    -Dynamic call are used to maintain a scalable framework for the code without acting on the executable file-online a single VI distribution managed by the administrator/developer

    -Dynamic call are used to provide a collection of "external" characteristic that could be enriched by the administrator/developer. For example, you provide your customers a set of selectable custom signal filters in the executable.

    In 2 cases, you are only able to assess the skills of the users to know if there is a risk of damage, if there is a change.

    So to stay only master a parade might be to provide dynamic VI without a schema, but with the problem of maintenance, since no in-place editing and more attention to manage distribution.

    Another way is to hide the actual distribution to user-online call dynamic VI but it without name as *.vi but others (a repellent name as system of OS name ) or simply without extension in order to attract not user... but that's debatable...

    Another more difficult but more secure method is to create a consistency check before your routine (version, user, modified date,...)

  • How to get the time of the device

    Hello

    I'm developing an application in which I send location of the device in lat, long for every 10 minutes.  I want to send some time also with lat, long. This time must be peripheral situation updates for every 10 minutes.  Can someone tell me how do I do this?

    It is not obvious to your OP exactly what you ask.

    Ask you in a certain way a consistent recording time no matter what time zone are you in?

    Or are you just asking how to get the date and time?

    If it's the last QDateTime is one of the ways to get the date and time...

    http://developer.BlackBerry.com/native/reference/Cascades/QDateTime.html

    If you ask for the first answer more complex, you will probably need to check the time against an external clock (say GMT) and then re-reading use the contact information you have saved to determine what the weather was (including a calculation of DST) at this point in this particular time zone.

    Relying on the phone to change accurately that it is time that you move in time zones will not give accurate results.

  • How to get the container of the grid Center in a browser

    How to get the container of the grid Center in a browser

    . Grid {}

    width: 80%;

    margin: auto;

    }

  • How to get the query execution time without running...?

    Hello

    I had one condition... as follows...
    I had 3 sql statements. I need to run only sql what runtime is very less.

    Can someone help me, how to get the time query and run this query without using explain plan... ?

    Thank you
    Rajesh

    I can't think in any way at all to get the query execution time without running the query.

    You might get an estimate ( approximation ) If you are using explain plan.

    But you have governed to explain plan for a reason, so I can't help you.
    Why you do not want to use don't explain plan?

  • How to get the content incorporate the swf file in Swf Loader on the run time

    How to get the content incorporate the swf file in Swf Loader on the run time

    [Bindable]

    [Embed(source="assets/index.swf")]

    private var SWFSRC: Class;

    < mx:SWFLoader id = "_swfloader" source = "{SWFSRC}" / >

    It might be Loader (DisplayObjectContainer (_swfLoader.content) .getChildAt (0)) content

  • How to get the run time on page

    Hello

    I want to display the clock running and the user that loggin.

    Pls knows me how to get the running time display and the user name which connect you.


    thakns
    Kumar

    Hello

    You can use javascript clock and substitution string APP_USER
    This place at the source of the HTML region

    &APP_USER.
    
    

    Use styles to get look like you entered and span tag

    BR, Jari

  • How to get the items on a loop at the same time during the execution of the loop for

    Hello

    I am a student. I would like to know how to get the outside loop counter values For in parallel so that the loop runs rather than obtaining the value finally outside the loop for future prospects for the answers.

    Thank you

    Frederick

    You already said yes, and you have said some of the different ways (registrants, locals, reference, queue, etc.). Since the information was provided to your request, the thread can be considered closed? If you want details about how to implement something, you must provide the details on what you are doing.

  • How to get the second and third weekend of every month over a period of time?

    Hello

    No idea how to get the second and third weekend of every month on a given period without use of CLAUSE?

    Thanks in advance.

    Try it below,

    SELECT CASE WHEN TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'SAT '.

    THEN ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)) + 1

    WHERE TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'Sun '.

    THEN ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)) + 6

    Of OTHER NEXT_DAY (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), "SAT") + 1

    END as second_weekendday,

    BOX WHEN TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'SAT '.

    THEN ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)) + 7

    WHERE TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'Sun '.

    THEN ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)) + 7

    Of OTHER NEXT_DAY (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), "SAT") + 7

    END AS third_weekendday

    FROM (SELECT SYSDATE startdate,

    SYSDATE + 300 enddate

    THE DOUBLE)

    CONNECT BY LEVEL<=>

  • How to get the icons to display correctly in the Finder?

    At the time of the "classic" Mac OS, if the icons are not correctly display in the Finder, we could 'rebuild the desktop file' to correct the problem. I've recently updated to Yosemite, and most things work well, but for some reason, most of the files in the Finder .webloc now show as blank icons (but not all; a few show the correct icon). There is no model, I can see: some very old .webloc files now show a white icon (where I know that their icons used to be correct), while the most recent show the icon of correct - although I just created four (by dragging the URL of the Safari, the usual method) which are all empty. Sometimes they appear with the older icon, with the symbol @ (although those who seem to have changed vacuum after running and restart maintenance). I tried from an external disk, repair permissions and repair the file system, as well as cleaning with the utility of Maintenance (which clears the web browser and other caches), nothing works. Does anyone know how to get the computer to display these icons correctly?

    May be a corrupt .plist.

    Make a backup, preferably 2 backups on 2 separate drives.

    Go to Finder and select your user folder. With this Finder window as the windshield, select Finder/display/display options for presenting or order - J.  When the display options opens, check "show the library folder. This should make your visible user library folder in your user folder.  Select the library. Then go to Preferences/com.apple.finder.plist and com.apple.desktop.plist.  Move the .plists on your desktop.

    Relaunch the Finder by restarting the computer and test. If it works fine, delete the plists from the desktop.

    If the same, return the .plists to where you obtained since, by crushing the latest.

    Thanks to leonie for certain information contained in this.

  • How to get the text have the same effect as the video?

    Hello

    For the first time post here, but I wonder how to get the text of the titles have the same effect as the video behind her.

    For my video, I use 'bad tv' and other effects such as Gaussian that obviously changes the appearance of video, creating the look of VHS. However, I then inserted text via the title, but it normally appears. How can I make this text have the same effects as the video behind it?

    A friend told me I might need to add text to the video first, then do the effects, I have not tried, but wonder if there is an easier way, as this would require me to restart.

    EDIT: That's what I'm looking for. https://youtu.be/7_2PHQI89dI?t=24s The text has the same effect as the video.

    Thank you

    One way is to create a clip made up based on the title and the original clip. Then apply the effect.

    Another way is to use an adjustment layer.

    Good luck.

    Russ

  • How to get the video intro off my google home screen I already saw it, where is the firefox logo used to be.

    How to get the video intro off my google home screen I already saw it, where is the firefox logo used to be. I started with the last update that I rebooted.

    Hello
    to change the homepage when opening firefox-press 'Alt' and click on tools-> Options.

    Main menu, you can change the URL.

    If the problem persists, you can follow these simple steps:

    Enter about: config in the address bar and press ENTER. Accept the message of 'dragons' to see the Advanced preferences screen. Use the above search box to enter the below pref.

    You can assign an empty string to stop your Firefox to retrieve "extracts" and brandLogo changes the browser.aboutHomeSnippets.updateUrl pref. Right-click this pref and select Edit then clear the value as pref in the box that appears, and then click OK. Who will also disable "snippets" that appear under the container of the research on the default home page.

    Then you must open the folder of your profile, via help > Troubleshooting Information > profile folder > > button view folder. Then close Firefox. Your profile file open with Firefox closed (Firefox '3-bar' menu key > exit/Quit), wait or two minutes, then remove the storage\moz-safe-about + home folder in the Firefox profile folder to remove the brandLogo and stored in IndexedDB code snippets to make Firefox use the default brandLogo and a defined default code snippet.

    If you later change your mind about these changes, you can reset the pref browser.aboutHomeSnippets.updateUrl via the context menu and Reset allows to retrieve the default value using the storage\moz-chest-fort-about + home folder again.

  • How to get the card working on Tecra M1 WLAN?

    I just bought a 2nd hand Tecra M1. Great! It has installed XP but no Toshiba tool. I can't access my WLAN router. Seems like if WIFI connection is not yet installed. As I know from my Satellite Pro M30, there are Toshiba tools for this, they work smarter.

    Maybe I need drivers - WXP is material unknown when starting up - might be the WLAN device - who knows.
    When I check the network connections, I find 1934 and LAN adapter, but no WLAN device. I have already run the XP Wizard for WLAN connections, SSID and hexagonal key; but no WLAN device presents itself.

    Then, someone a idea how to get the job of WLAN?
    Is it possible to get the Toshiba M1 software or can I use my software SatPro?

    Thank you Jan so far

    It's good that you will find yourself, I think most of us would point on your ad when you have users with a similar problem. Sometimes it s really useful to have users like you who will investigate their cases.

    I'm now long enough a Member here, but every time I have met people who have solved problems like that, then I must say how much I appreciate it. :)

    Welcome and good weekend

  • Satellite A500 PSAM3A - how to get the HARD market under Vista 64-bit disk Protection System

    Hello

    I would like to know how to get the HARD drive Protection system up and running under Vista Home Premium 64 bit operating system. I downloaded the program 64 bit of Toshiba for this program and install it I tried but doesn't seem to work. I have uninstalled and try to install the program, but still does not work.

    Unable to find the problem, why it won't work. If anyone knows how to solve this problem it would be a great
    help for me. If anyone knows how to solve this problem please answer me as soon as possible.

    Thank you for your time.

    Kind regards
    Nigel.

    Hello!

    What you downloaded exactly on the Toshiba site?

    As written Akuma you must install first added value Package you will find also on the Toshiba site. Check this box!

    An interesting thing: it does not work if you are using the preinstalled operating system? It should have everything installed for your laptop.

    Good bye

Maybe you are looking for