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.