Error on opening screen from main menu

When i whant to open a browser screen from main menu, i found that

java.lang.IllegalArgumentException: Unable to create screen cinweb_TblBasPersonas.browse with type FRAGMENT
	at com.haulmont.cuba.web.sys.WebScreens.createScreen(WebScreens.java:177) ~[cuba-web-7.0.0.jar:7.0.0]
	at com.haulmont.cuba.web.sys.WebScreens.create(WebScreens.java:171) ~[cuba-web-7.0.0.jar:7.0.0]
	at com.haulmont.cuba.gui.config.MenuItemCommands$ScreenCommand.run(MenuItemCommands.java:212) ~[cuba-gui-7.0.0.jar:7.0.0]

is thrown if i do not declare

class="com.chortitzer.cinweb.web.bascula.tblbaspersonas.TblBasPersonasBrowse"

in tbl-bas-personas-browse.xml even though it seems to not be an allowed attribute in the new xml schema.

If i open the editor screen from within the browser screen it works fine.

Any tipos on what i am missing in my menu setup?

Hi,

What is the parent class of TblBasPersonasBrowse ?

These are my files involved. In the same folder:

TblBasPersonasBrowse.java

package com.chortitzer.cinweb.web.bascula.tblbaspersonas;

import com.haulmont.cuba.gui.screen.*;
import com.chortitzer.cinweb.entity.bascula.TblBasPersonas;

@UiController("cinweb_TblBasPersonas.browse")
@UiDescriptor("tbl-bas-personas-browse.xml")
@LookupComponent("tblBasPersonasesTable")
@LoadDataBeforeShow
public class TblBasPersonasBrowse extends StandardLookup<TblBasPersonas> {
}

tbl-bas-personas-browse.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd"
        caption="msg://browseCaption"
        focusComponent="tblBasPersonasesTable"
        messagesPack="com.chortitzer.cinweb.web.tblbaspersonas">
    <data>
        <collection id="tblBasPersonasesDc"
                    class="com.chortitzer.cinweb.entity.bascula.TblBasPersonas"
                    view="_local">
            <loader id="tblBasPersonasesDl">
                <query>
                    <![CDATA[select e from cinweb_TblBasPersonas e]]>
                </query>
            </loader>
        </collection>
    </data>
    <dialogMode height="600"
                width="800"/>
    <layout expand="tblBasPersonasesTable"
            spacing="true">
        <filter id="filter"
                applyTo="tblBasPersonasesTable"
                dataLoader="tblBasPersonasesDl">
            <properties include=".*"/>
        </filter>
        <groupTable id="tblBasPersonasesTable"
                    width="100%"
                    dataContainer="tblBasPersonasesDc">
            <actions>
                <action id="create" type="create"/>
                <action id="edit" type="edit"/>
                <action id="remove" type="remove"/>
            </actions>
            <columns>
                <column id="razonSocial"/>
                <column id="rucci"/>
                <column id="ctacte"/>
                <column id="idTblempresas"/>
                <column id="observacion"/>
            </columns>
            <rowsCount/>
            <buttonsPanel id="buttonsPanel"
                          alwaysVisible="true">
                <button id="createBtn" action="tblBasPersonasesTable.create"/>
                <button id="editBtn" action="tblBasPersonasesTable.edit"/>
                <button id="removeBtn" action="tblBasPersonasesTable.remove"/>
            </buttonsPanel>
        </groupTable>
        <hbox id="lookupActions" spacing="true" visible="false">
            <button action="lookupSelectAction"/>
            <button action="lookupCancelAction"/>
        </hbox>
    </layout>
</window>

How did you create this screen? Is it migrated from 6.10?

Is there a record in screens.xml file? New screens should not be registered in screens.xml.

1 Like

Indeed it whas registered in screens.xml and removing it solved my problem. thank you Yuriy.