Open window filtered by selecting a previous window

What is the best way to open an already filtered window with the previous selection of a record. That is, I select a record of the table, then click on a particular button and open the window in browse with the filtered records.
I currently have this, but I do not know how to pass the parameter


public void contactos(Component component) {
    Empresa empresa = empresaTable.getSingleSelected();
    if (empresa != null)
        openWindow("cil$EmpresaContacto.browse", WindowManager.OpenType.DIALOG);
}

For those who can serve, I solved it as follows


public void contactos(Component component) {
    Empresa empresa = empresaTable.getSingleSelected();
    if (empresa != null) {
        openWindow("cil$EmpresaContacto.browse",
                WindowManager.OpenType.DIALOG, ParamsMap.of("empresa", empresa));
    }
}

In the view where I need it


@WindowParam
private Empresa empresa;