Problem with instances of type interface with sw-responsive

Hi!

I find some problems when I try to use the sw-responsive-addon:

pruebafinal

Do you know if this is an issue of the addon or is it that it is necessary to add some parameter?

Thanks

Hi!

Аt first sight this is not an exception of the add-on. Could you clarify which version of CUBA do you use? If it is possible could you provide a small sample project where it is reproduced?
I have tried this with v7 version and there is no exception.

Hi!

For example…

Java:

package com...;
import com.haulmont.cuba.gui.components.ButtonsPanel;
import com.haulmont.cuba.gui.components.GroupTable;
import com.haulmont.cuba.gui.components.Table;
import com.haulmont.cuba.gui.screen.*;
import com...;
import de.diedavids.cuba.userinbox.web.WithEntitySharingSupport;

import javax.inject.Inject;
import java.util.logging.Filter;

@UiController("....")
@UiDescriptor("cargo-browse.xml")
@LookupComponent("cargoesTable")
@LoadDataBeforeShow
public class CargoBrowse extends StandardLookup<Cargo> implements WithEntitySharingSupport  {

@Inject
private Filter filter;

@Inject
protected GroupTable<Cargo> cargoesTable;


@Inject
protected ButtonsPanel buttonsPanel;

@Override
public Table getListComponent() {
        return cargoesTable;
        }

@Override
public ButtonsPanel getButtonsPanel() {
        return buttonsPanel;
        }
        }

xml:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd"
        xmlns:swr="http://strangeway.org/xsd/responsive/sw-responsive.xsd"
        caption="msg://browseCaption"
        focusComponent="cargoesTable"
        messagesPack="...">
    <data readOnly="true">
        <collection id="cargoesDc"
                    class="..."
                    view="cargo-edit-view">
            <loader id="cargoesDl">
                <query>
                    <![CDATA[select ...]]>
                </query>
            </loader>
        </collection>
    </data>
    <dialogMode height="600"
                width="800"/>
    <layout
            spacing="true">
        <swr:responsiveLayout>
        <swr:row>
            <swr:column>
        <filter id="filter"
                applyTo="cargoesTable"
                dataLoader="cargoesDl">
            <properties include=".*"/>
        </filter>
        <groupTable id="cargoesTable"
                    width="100%"
                    dataContainer="cargoesDc">
            <actions>
                <action id="create" type="create"/>
                <action id="edit" type="edit"/>
                <action id="remove" type="remove"/>
            </actions>
            <columns>
                <column id="numeroOrden"/>
                <column id="claseCargo"/>
                <column id="importe"/>
                <column id="descripcionCargo"/>
            </columns>
            <rowsCount/>
            <buttonsPanel id="buttonsPanel"
                          alwaysVisible="true">
                <button id="createBtn" action="cargoesTable.create"/>
                <button id="editBtn" action="cargoesTable.edit"/>
                <button id="removeBtn" action="cargoesTable.remove"/>
            </buttonsPanel>
        </groupTable>
        <hbox id="lookupActions" spacing="true" visible="false">
            <button action="lookupSelectAction"/>
            <button action="lookupCancelAction"/>
        </hbox>
            </swr:column>
        </swr:row></swr:responsiveLayout>
    </layout>
</window>

It seems that <swr:column> does not contain <swr:content> element. Try to add this element and place your table in it. Note that only one component can be placed in <swr:content>.

Demo project with responsive add-on: https://github.com/cuba-platform/sw-responsive-demo

See also the original docs on Grid System from Vaadin add-on: https://github.com/JarekToro/responsive-layout/wiki/The-Grid-System

I add the <swr:content> element and appears the problem with the filter:

Unable to find an instance of type 'interface java.util.logging.Filter'

I remove the filter and that works. But I need the filter component in this table ¿it’s there any way?

Probably, it is also not placed in <swr:content> element.

I placed the filter component in and out of <swr:content>and appears the problem.

This code works fine for me:

<swr:responsiveLayout id="responsiveLayout" width="100%" spacing="true">
    <swr:row spacing="true">
        <swr:column height="100%" width="100%">
            <swr:content>
                <filter id="filter"
                        applyTo="customersTable"
                        dataLoader="customersDl">
                    <properties include=".*"/>
                </filter>
            </swr:content>
        </swr:column>
        <swr:column height="100%" width="100%">
            <swr:content>
                <groupTable id="customersTable"
                            width="100%"
                            height="100%"
                            dataContainer="customersDc">
                    ...
                    <buttonsPanel id="buttonsPanel"
                                  alwaysVisible="true">
                       ...
                    </buttonsPanel>
                </groupTable>
            </swr:content>
        </swr:column>
       ...
    </swr:row>
</swr:responsiveLayout>

You can try it. If an exception is still invoked, please, attached a demo project with a problem.