Filter widget extra

I have been trying to edit the filter widgets, and I can’t find the options to do it properly

I am trying to delete or not show the items highlighted in red, and change the language of some of its components. to no avail.
image

if there is any way to do this ill be greatly appreciated.

The layout of filter control panel may be defined using the controlsLayoutTemplate filter attribute for individual filter. To set it globally use the cuba.gui.genericFilterControlsLayout application property.

@Inject
private Filter filter;

@Subscribe
public void onInit(InitEvent event) {

// Will just show the max results… the rest wont be rendered.
filter.setControlsLayoutTemplate("[max_results]");
filter.createLayout();
}

Thank you for your help…Max!
I see @eparamo posted the solution here, and the elements in fact dissapear, but I am left with this blank space, it takes up a lot of space. Is there a way to remove this along with the other elements?

image

I’m afraid there is no easy way to hide this panel. Maybe you can try to override the FilterDelegate bean (it is responsible for filter behavior) in you project somehow and this panel won’t be rendered at all, but it doesn’t seem to be a good idea.

As I see from your screenshot you don’t have any controls for selecting different filters and modifying the current filter. Only one default filter is always displayed. If it is so, the you probably should not use the Filter component, but just add a panel with regular text fields: Codigo and Nombre on the top of your screen and make dataLoadCoordinator automatically refresh tables when these text fields are changed. See the documentation for examples.