Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

[ ADF, JDev12.1.3 ] How to make appear a loading GIF image while an af:table is loading (through the

FlattitJan 24 2016 — edited Jan 24 2016

Hallo,

in my page fragment I created an af:table dragging a VO instance from the data control; I also created a search button dragging the ExecuteWithParams operation from the same VO instance.

I double clicked the serach button to create the searchButton_action method in the bean that call the ExecuteWithParams operation after performing some operations.

Next to the button I put an ActiveImage whose source is a "loading" gif.

I'd like to make the gif visible  while the search is in progres and make it unvisible when the search ends.


At the beginning I followed this approach.

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

But it didn't worked since the gif never appears. I tried also to set the PartialTriggers property of the image with the ids of the table and search button.

  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 that is to set the Visible property using the Disabled value of the search button that is #{!bindings.MyVOInstanceExecuteWithParams.enabled}

But also this approach didn't worked.

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

What's wrong in my approaches? Could you kindly help me in solving the problem?

Thanks,

Federico

PS

FacesUtils.findComponent is a method that retrieves the component passed as param. It works well since I've used it many other times in my application.

This post has been answered by Timo Hahn on Jan 24 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2016
Added on Jan 24 2016
1 comment
366 views