[ADF, JDev12.1.3] How to display a gif of loading during the loading of the af: table (through the ExecuteWithParams method call)?

Hallo,

in the fragment of my page, I created an af:table you drag an instance of VO for the data control; I also have a search button by dragging the operation ExecuteWithParams of the same instance of VO.

I double clicked on the serach button to create the searchButton_action method in the bean calling the ExecuteWithParams operation after you have made a few operations.

Next to the button, I put a table whose source is a gif of "load".

I would like to make visible the gif while research is underway and make it invisible when the search is complete.


In the beginning, I followed this approach.

In the searchButton_action, I wrote the code to set the visible of the image property.

But it did not work because the gif never appears. I also tried to set the property PartialTriggers of the image with the ID of the button table and search.

  public String searchButton_action() {
    RichActiveImage imgSearch = (RichActiveImage) FacesUtils.findComponent("ImgSearch");
    imgSearch.setVisible(true);
    AdfFacesContext.getCurrentInstance().addPartialTarget(imgSearch);
    // ...
    OperationBinding operationBinding = BindingsUtils.getBindings().getOperationBinding("MyVOInstanceExecuteWithParams");
    // ...
    imgSearch.setVisible(false);
    AdfFacesContext.getCurrentInstance().addPartialTarget(imgSearch);
    // ...
  }

Then I tried with another approach which is to set the Visible property using the value off of the search button which is #{! links.} MyVOInstanceExecuteWithParams.enabled}

But also, this approach has not worked.

I also tried to set the property PartialTriggers of the image with the ID of the button table and search.

What's not in my efforts? You could you kindly help me to solve the problem?

Thank you

Federico

PS

FacesUtils.findComponent is a method that retrieves the item passed as param. It works well since I used it several more times in my application.

Your approach may not work add there is only a single thread of UI work. Your trigger reached the component when the execute with Péan has finished its work.

For your use case there are a few solutions combining JavaScript and client-server events showing a window as long as the operation is running. Read https://blogs.oracle.com/groundside/entry/notification_during_long_running_transactions for all the info.

Timo

Tags: Java

Similar Questions

  • [ADF, JDev12.1.3] How to resize and style default popup of the message of faces?

    Hallo,

    popups messages of faces that I take the floor in managed beans or auto-affichent by the application to show errors (e.g., https://dl.dropbox.com/s/hsje8m0meci2wai/FacesMessage.png?dl=0) do not adjust automatically based on the content.

    I would like to know how I can fix this problem and:

    Thank you

    Federico

    Well, for automatic resizing, you can use this workaround: https://agungor.wordpress.com/2014/05/14/handling-un-resizable-facesmessage-popup/

    Also, if I remember correctly, you can download the fix for this problem for Oracle Support(if you have support contract).

    Inline messages you must provide the id of the component when you create messages of faces.

    For global inline messages you need to af:messages component.

    As an alternative, you can use something like this: Awasthi (Jdev/ADF) Ashish Blog: better interface user-display the notification message of jQuery (for error, warning, info) to Oracle ADF

    Dario

  • [ADF, JDev12.1.3] How to manage cookies (configure/create/read) in the ADF applications?

    Hallo,

    I would like to create a cookie in my ADF application.

    To start I used the code shown in this thread code example for create / read a cookie value? but the cookie seems to not be created.

    It is not present in Firebug or it can be retrieved by the code.

        Cookie userCookie = new Cookie("myCookie", "hello");
        userCookie.setMaxAge(-1);
        FacesContext ctx = FacesContext.getCurrentInstance();
        ((HttpServletResponse) ctx.getExternalContext().getResponse()).addCookie(userCookie);
    
    
        Cookie retrieveCookie = (Cookie) ctx.getExternalContext().getRequestCookieMap().get("myCookie");
        if (retrieveCookie != null)
          System.out.println("My cookie is: " + retrieveCookie.getName() + " " + retrieveCookie.getValue());
    

    What's not in the code?

    There may be something to confiure in the application of the ADF?

    Thank you

    Federico

    1. Cookie userCookie is new Cookie ("MyCookie", "Hello");.
    2. userCookie.setMaxAge(-1);
    3. FacesContext ctx = FacesContext.getCurrentInstance ();
    4. (Ctx.getExternalContext () m:System.NET.FtpWebRequest.GetResponse ()) .addCookie (userCookie) (HttpServletResponse);
    5. Cookie retrieveCookie = ctx.getExternalContext () .getRequestCookieMap () .get ("myCookie") (Cookie);
    6. If (retrieveCookie! = null)
    7. System.out.println ("my cookie is:" + retrieveCookie.getName () + "" + retrieveCookie.getValue ());

    Is - this code is run from the same method in java?

    If this will not work (cookie is added to the http response if you can't get this until the next http request arrives)

    Dario

  • [ADF, JDev12.1.3] How to display totals for numeric columns in an af:table?

    Hallo,

    I have a VO with numeric columns. I dragged the VO to UI to create an af:table.

    I would like to know if ADF allows you to easily add a footer to the af: table that automatically show the total of each digital line.

    This is to avoid creating a just another VO only to calculate and show the totals.

    Thank you

    Federico

    Why so complicated?

    Groovy is your friend here. Cech Tech Blog of Rohan Walia: ADF - Groovy for a Total of a column in a Table amount or do you it directly in the DB using Analytics functionms as shown here Andrejus Baranovskis Blog: Analytic Functions Oracle for Total and averaging in British Colombia ADF

    Timo

  • [ADF, JDev12.1.3] How to get the column headers, request of VO and VO bind vars used by an af:table?

    Hallo,

    I want to create a method that takes as a parameter the id of an af:table (used to display the search results) and returns:

    • the column headings of the af: table
    • Visible property (true/false) of the columns af:table
    • the actual query of the VO instance used to create the af: table
    • the values of real bind variables passed to the query of the instance of VO

    I would like to create a servlet which takes the parameters reruns the query and returns a report Excel/PDF file that contains exactly the same columns and same of the af records: table.

    I'm a little confused on who use the code to achieve this... you kindly help me?

    I did a similar qustion here Re: [ADF, JDev12.1.3] how to export an af:table to Excel in an ADF Essentials application? but then I guessed that it was preferable to create a new thread.

    Thank you

    Federico

    For this, you can use this type of code

    Context LocaleContext = _adfTableBinding.getLocaleContext ();

    for (attr AttributeDef: attributeDef) {}

    Label As String = attr.getUIHelper () .getLabel (context);

    _logger.info ("Attritbute name:" + attr.getName () + "column name:" + attr.getColumnName () + "Col4Query name:" + attr.getColumnNameForQuery () +)

    "Name:"+ label);

    }

    which produces this output

    Timo

  • How to display two or more files on the screen at the same time in format "cascade" or "tile"?

    How to display two or more files on the screen at the same time in format "cascade" or "tile"?

    What types of files,

    He each file separately.

    Right-click your taskbar, and then click the option side by side...

    Breaking of Windows,

    http://Windows.Microsoft.com/en-us/Windows7/products/features/snap

    http://Windows.Microsoft.com/en-us/Windows7/arrange-Windows-side-by-side-on-the-desktop-using-snap

  • How to display this window that lists all the devices of storage connected to my PC?

    How to display this window that lists all the devices of storage connected to my PC? It lists each device, how much space is used and how much is free? I sometimes open it by accident, but I can never find it when I'm looking for it.

    original title: storage devices

    Beginning

    Control Panel

    If you the small icons view do the following:

    Administration tools

    Computer management

    Storage

    Disk Managment

    If you have the category view do the following:

    System and security

    Administration tools

    Computer management

    Storage

    Disk management

  • How to display time in 010403 format if the entry is transmitted as ' 1 hour, 4 minutes, 3 seconds"sql query

    How to display time in 010403 format if the entry is transmitted as ' 1 hour, 4 minutes, 3 seconds"sql query @.

    Hello

    You can try:

    Select lpad (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] + ""), 2, '0')

    || LPAD (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] +', 1, 2), 2, '0')

    || LPAD (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] +' 1, 3), 2, '0')

    Double;

    but this requires maximum 99 hours/minutes/seconds ago in your entry.

  • How to make windows require a password during the installation of new programs?

    How to make windows require a password during the installation of new programs?

    Hello

    You will not be able to circumvent the password that appears before the execution of actions (installing a new program) in a non administrator account.  If you are logged on as administrator, and again, you get the command prompt, you can disable UAC (User Account Control) to stop the password dialog window.

    However, as a work around you can right-click on the installation of the program files and select run as administrator. Check if this is useful.

    Let me know if I can help you with this question or any problem related to Windows.

  • [ADF, JDev12.1.3] How to create a reusable/configurable SelectOneChoiche that displays a range of years?

    Hallo,

    in my application, I would use SelectOneChoiche components a range of years including start/end of the year can be different based on other values/conditions of display.

    I found this thread helpful Andrejus Baranovskis Blog: select a choice with select elements Tag which explains how to fill a PLOUGHSHARE of a managed bean.

    Would it be possible (and how) to create a reusable component (something to drag them to the design-time user interface) configurable with expressions of start/end of year?

    This would avoid as me to write the code to fill the SOC whenever I need one of them.

    Thank you

    Federico

    You can see this example ADF practice: component example declarative ADF which shows how to create a component declarative which shows a decimal lov.

    This Oracle magazine article Oracle ADF: Build Your Own is another example that will guide you throughout the process.

    Timo

  • [ADF, JDev12.1.3] How/where to set the session timeout

    Hallo,

    After a few minutes of inactivity, the browser displays a message to inform that the session is not more active and only OK been must be clicked to refresh the page.

    If a dialog box "btf" has been opened on the left, it becomes...

    I would like to know what is the right place/method to set a deadline.

    If possible I would like that when the timeout checks, the application performs a redirect to a page I like (for example the login page).

    The application of ADF Essentials and is deployed to the GlassFish application server.

    My concern is... what should happen to the open operation / pending when the time-out occurs?

    For example, the user is modifying an af:table but it has not clicked validate or cancel...

    Thank you

    Federico

    I would like to know what is the right place/method to set a deadline.

    For java web applications, you can set the session timeout in the web.xml file. (this is the global settings associated with all sessions)

    If you wish, you can set the timeout of session by program (and this is related only to the current http session).

    If possible I would like that when the timeout checks, the application performs a redirect to a page I like (for example the login page).

    http://fortunefusionminds.blogspot.com/2014/04/how-to-redirect-to-custom-page-whenever.html

    ADF: Session expires management redirect to login page | Bungbutan

    ADF developers World: Detection and handling of user session expiry

    My concern is... what should happen to the open operation / pending when the time-out occurs?

    Well, session is destroyed, it will destroy all instances of AM and do rollback.

    See also: Andrejus Baranovskis Blog: ADF BC Application Module Instance Timeout and reliance Timeout of Session Web

    Dario

  • [ADF, JDev12.1.3] How to set a variable to bind a VO (where clause) in a managed bean?

    Hallo,

    I have a request based on VO.

    The query contains a where clause clause and a bindi variable.

    In a managed bean I would like to access the iterator of VO setting the value of the bind variable and read the result.

    I found this code it is good start, but I do not know how to set the variable binding.

    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    DCIteratorBinding iter = (DCIteratorBinding ) bindings.get("MyVO1Iterator");
    iter.execute();
    
    
    

    You kindly help me?

    Also, I would like to know if it is generally advisable to use VO directly in controlled beans or whether it would be best to create in the AppModuleImpl methods that do this and return the result.

    In my case for example of the VO will return max 1 plug so I'm in doubt, if the creation of a method in the AM that returns a custom class, which attributes contain values of the line of VO.

    Sorry if these questions may seem artificial, but I am a beginner, I have many doubts and so I would be happy to receive some tips regarding best practices.

    Thank you

    Federico

    You can use:

    iter.getViewObject().setNamedWhereClauseParam("yourBindVar", value);
    

    Note that this approach is used if you have bind variable in the where clause.

    To set variables bind to ViewCriteria, you must use VarableValueManager.

    This post may be useful for you: binary: how to set the Bind variable values at run time?

    Also, I would like to know if it is generally advisable to use VO directly in controlled beans or whether it would be best to create in the AppModuleImpl methods that do this and return the result.

    You must set "use VO directly.

    For example, from the point of architecture, is probably best to use the method in the model project which will set the bind variable and execute the query.

    Or you can use the ExecuteWithParams operation in your the view layer.

    In my case for example of the VO will return max 1 plug so I'm in doubt, if the creation of a method in the AM that returns a custom class, which attributes contain values of the line of VO.

    Not to complicate your life

    All VO lines are represented as ViewRowImpl class if you already have "custom class".

    Finally, you can generate your own ViewRowImpl class if it is necessary for this.

    Dario

  • Re: How to display records of newlyadded first in the table

    Hi all

    I use Jdev 11.1.2.3.0

    My requirement is I have a table in this table, I have a table and the form. Here, I want to display newly added records, first in the table.but that table always shows of old recordings first.so how do I display it.can someone help out me.

    Thank you

    G.Shilpa.

    You can control the line newly inserted into the table of the ADF

    http://lucbors.blogspot.in/2010/12/ADF-11g-how-to-control-where-new-row-is.html

    ttp://mjabr.WordPress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/

  • How to display prices with which we won the most?

    Hello guys!

    I try to learn a few new skills in oracle sql if I was looking for examples on the web. I found this one, with 6 questions. I did all the tables and all the connections. I knew solve 5 questions but that, finally one seems too difficult for me.

    I don't know how to display tables with which we won the most. We do need to check what Denis is rendered which course and anyone who paid that invoice, what kind of prices was also on this Bill (normal od student).

    I would be really happy if you guys could help me.

    Thank you very much!

    Here is the printscreen of my E-R model and my oracle sql code:

    http://imgur.com/oM5IbTL,
    http://pastebin.com/c1CqF3K8

    If you don't understand anything, despite my bad English or anythning else, feel free to ask. I would be really happy if we could solve this problem!

    As far as I know, bill and section have no impact on this problem.  As Frank said, this looks like a Top - N type problem.  You is a way to get answer:

    dev1 > select gains, num_students, lesson_name, course_name

    2 from (select course_name, lesson_name, num_students, gains,

    3 dense_rank() ON rn (salary desc order)

    4 of (select c.name course_name, l.lesson_name,)

    5 count (vr.id) num_students,

    6 sum recipes (p.price)

    7 of course c

    8 Join Conference l

    9 l.fk_course = c.id

    Join the 10 visit vg

    11 on l.id = vg.fk_lecture

    join 12 visitor RV

    13 on vg.fk_visitor = vr.id

    price of 14 p join

    15 p.fk_course = c.id

    Group 16 by c.name, l.lesson_name))

    where the 17 rn = 1;

    LESSON_NAME NUM_STUDENTS PROFIT COURSE_NAME

    ------------------ --------------------- ------------ ----------

    C++, programming 3 750 programming

    Java programming programming 3 750

    If you really don't want that one line returned with a tie, then you replace dense_rank, row_number or do something like:

    Select course_name, lesson_name, num_students, recipes

    from (select c.name course_name, l.lesson_name,)

    Count (VR.ID) num_students,

    Sum revenue (p.Price)

    of course c

    join the l Conference

    on l.fk_course = c.id

    Join visit vg

    on vg.fk_lecture = l.id

    Join the vr visitor

    On vg.fk_visitor = vr.id

    Join the price p

    on p.fk_course = c.id

    C.name group, l.lesson_name

    order by 4 desc)

    where rownum = 1;

    This structure returns a single line in the case of links, but there is no way to predict which of the related rows will be returned.

    John

  • How to display more than 200 lines in the table?

    Hi Experts,

    Is it possible to display more than 200 rows in a Table.
    When I query table, it has 1000 rows, I want to display all 1000 rows in the table.

    When I have a query, the values are displayed up to 201 lines only,
    When I then click on 200 and 201 he throws Exception says
    * "The query exceeded 200 lines. Potentially more rows exist, please restrict your query. » *

    I would like to know how to display every 1000 lines in a table without Exception.

    Any idea will be highly appreciated.

    Thank you
    Pascaline

    The number of rows retrieved is controlled by the option to profile ' FND: view object Fetch Size Max. I think that 200 is the default value. PL see these Docs MOS

    386402.1 - query exceeded 200 lines
    275876.1 - oracle Application Framework profile Options version 11i (11.5.10)

    HTH
    Srini

Maybe you are looking for

  • change the text of the toolbar

    I currently have "Lage icons & text" chosen for my items on toolbars. I really need them both, unfortunately, some of the text that he chews a lot of space. I would like to find a way to change them shorter. For example, 'Zoom In' becomes 'Z' or 'Adb

  • Tecra M3 - BSOD if I install the graphics driver

    I bought a Tecra M3 about 4 years ago. He has recently started to give the BSOD. I started in safe mode, and it is fine. I uninstalled the graphics driver and rebooted and it works - just without the graphics driver. As soon as I reinstall the graphi

  • programming of nodal attribute based on a condition

    Hello I created a subvi, which displays a nodal configuration window function of the State (display or initialize) I don't want the front to display each time is it possible to insert a program inside the condition below ti determine during which the

  • On battery

    I have an Acer Aspire notebook 5742-6977. It shows the battery must be replaced. Where can I get one? and I can use it without the battery until I will have a new and up to how long can be used directly on food

  • How do I activate my wifi so I can connect my ipod

    Im trying to connect my ipod with my computer at home but its lock and I need to know how to do the Wi - Fi connection and unlock it so my ipod can connect to it