avi.fatal
(Avi Fatal)
April 30, 2019, 2:42pm
#1
Hi,
I just upgraded to cuba 7.0.4 and after the login I see the following error in one of the screens:
IllegalStateException: WindowInfo is not ScreenFragment - WindowInfo{id='adgroup-browse-frame', descriptor=org.dom4j.tree.DefaultElement@1aaecaef [Element: <screen uri: http://schemas.haulmont.com/cuba/screens.xsd attributes: [org.dom4j.tree.DefaultAttribute@62fb6705 [Attribute: name id value "adgroup-browse-frame"], org.dom4j.tree.DefaultAttribute@1419e5b8 [Attribute: name template value "com/platform/crm/web/adgroupentity/adgroup-browse-frame.xml"]]/>]}
Here us the: adgroup-browse-frame.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
caption="msg://browseCaption"
class="com.platform.crm.web.adgroupentity.AdGroupEntityBrowse"
focusComponent="adGroupEntitiesTable"
lookupComponent="adGroupEntitiesTable"
messagesPack="com.platform.crm.web.adgroupentity">
<dialogMode height="600"
width="800"/>
<layout expand="adGroupEntitiesTable"
spacing="true">
<filter id="filter"
applyTo="adGroupEntitiesTable"
datasource="adGroupEntitiesDs">
<properties include=".*"/>
</filter>
<groupTable id="adGroupEntitiesTable"
width="100%">
<actions>
<action id="create"/>
<action id="edit"/>
<action id="remove"/>
<action id="refresh"/>
</actions>
<columns>
<column id="platform"/>
<column id="name"/>
<column id="adSize"/>
<column id="costPerUnit"/>
<column id="tenantId"/>
<column id="campaign"/>
</columns>
<rows datasource="adGroupEntitiesDs"/>
<rowsCount/>
<buttonsPanel id="buttonsPanel"
alwaysVisible="true">
<button id="createBtn"
action="adGroupEntitiesTable.create"/>
<button id="editBtn"
action="adGroupEntitiesTable.edit"/>
<button id="removeBtn"
action="adGroupEntitiesTable.remove"/>
<button id="refreshBtn"
action="adGroupEntitiesTable.refresh"/>
</buttonsPanel>
</groupTable>
</layout>
</window>
Thanks
artamonov
(Yuriy Artamonov)
April 30, 2019, 2:56pm
#3
Hi,
Most likely, your screen controller inherits AbstractWindow
or AbstractLookup
, but your are trying to use it as frame. It is prohibited since 7.0 and you should change the controller. It should inherit AbstractFrame
instead.
Thanks,
Now I get: IllegalArgumentException: Unable to create screen crm$AdGroupEntity.browse with type FRAGMENT
this is my webscreens.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<screen-config xmlns="http://schemas.haulmont.com/cuba/screens.xsd">
<screen id="crm$CustomerEntity.browse"
multipleOpen="true"
template="com/platform/crm/web/customerentity/customer-entity-browse.xml"/>
<screen id="crm$CustomerEntity.edit"
template="com/platform/crm/web/customerentity/customer-entity-edit.xml"/>
<screen id="crm$EmailTemplate.browse"
template="com/platform/crm/web/emailtemplate/email-template-browse.xml"/>
<screen id="mainWindow"
template="com/platform/crm/web/screens/ext-mainwindow.xml"/>
<screen id="crm$EmailLogEntity.browse"
template="com/platform/crm/web/emaillogentity/email-log-entity-browse.xml"/>
<screen id="crm$EmailLogEntity.edit"
template="com/platform/crm/web/emaillogentity/email-log-entity-edit.xml"/>
<screen id="email-log-frame"
template="com/platform/crm/web/emaillogentity/email-log-frame.xml"/>
<screen id="cubasdbmt$Tenant.browse"
template="com/platform/crm/web/exttenant/ext-tenant-browse.xml"/>
<screen id="cubasdbmt$Tenant.edit"
template="com/platform/crm/web/exttenant/ext-tenant-edit.xml"/>
<screen id="crm$SourceEntity.browse"
template="com/platform/crm/web/sourceentity/source-entity-browse.xml"/>
<screen id="crm$AdGroupEntity.browse"
template="com/platform/crm/web/adgroupentity/ad-group-entity-browse.xml"/>
<screen id="crm$AdGroupEntity.edit"
template="com/platform/crm/web/adgroupentity/ad-group-entity-edit.xml"/>
<screen id="crm$CampaignEntity.browse"
template="com/platform/crm/web/campaignentity/campaign-entity-browse.xml"/>
<screen id="adgroup-browse-frame"
template="com/platform/crm/web/adgroupentity/adgroup-browse-frame.xml"/>
<screen id="crm$CreativeCatalogEntity.browse"
template="com/platform/crm/web/creativecatalogentity/creative-catalog-entity-browse.xml"/>
<screen id="crm$TargetMarketEntity.browse"
template="com/platform/crm/web/targetmarketentity/target-market-entity-browse.xml"/>
<screen id="crm$CountryEntity.browse"
template="com/platform/crm/web/countryentity/country-entity-browse.xml"/>
<screen id="crm$LandingPageEntity.browse"
template="com/platform/crm/web/landingpageentity/landing-page-entity-browse.xml"/>
<screen id="crm$AdEntity.browse"
template="com/platform/crm/web/adentity/ad-entity-browse.xml"/>
<screen id="crm$AdEntity.edit"
template="com/platform/crm/web/adentity/ad-entity-edit.xml"/>
<screen id="utmAd-entity-browse-frame"
template="com/platform/crm/web/adentity/ad-entity-browse-frame.xml"/>
<screen id="crm$ProductEntity.browse"
template="com/platform/crm/web/productentity/product-entity-browse.xml"/>
<screen id="crm$PixelEntity.browse"
template="com/platform/crm/web/pixelentity/pixel-entity-browse.xml"/>
<screen id="crm$ClickEntity.browse"
template="com/platform/crm/web/clickentity/click-entity-browse.xml"/>
<screen id="crm$ClickEntity.edit"
template="com/platform/crm/web/clickentity/click-entity-edit.xml"/>
<screen id="clickentity-browse-frame"
template="com/platform/crm/web/clickentity/clickentity-browse-frame.xml"/>
<screen id="crm$PaymentEntity.browse"
template="com/platform/crm/web/paymententity/payment-entity-browse.xml"/>
<screen id="crm$CertificateEntity.browse"
template="com/platform/crm/web/certificateentity/certificate-entity-browse.xml"/>
<screen id="payment-entity-browse-frame"
template="com/platform/crm/web/paymententity/frame.xml"/>
<screen id="link-builder"
template="com/platform/crm/web/screens/link-builder.xml"/>
</screen-config>
Thanks
ray1
(Ray Offiah)
May 4, 2019, 5:23am
#7
Try deleting the crm$AdGroupEntity.browse
entry from the screens.xml file. I think I had a similar problem and it worked for me.
@ray1 I already tried that, no such screen
.
Thanks
ray1
(Ray Offiah)
May 5, 2019, 8:43am
#9
Ack! Dammit! So you have. Sorry, 'bout that.
Have you tried cleaning the configuration directory, and then cleaning the project to force a complete rebuild? It could be that you have out-of-date artefacts hanging around.
avi.fatal
(Avi Fatal)
May 5, 2019, 8:44am
#10
I will try, I think I meesed up the upgrade. thanks
ray1
(Ray Offiah)
May 5, 2019, 8:48am
#11
You said you’ve already removed them, but in the example you posted, I can still see these entries:
<screen id="crm$AdGroupEntity.browse"
template="com/platform/crm/web/adgroupentity/ad-group-entity-browse.xml"/>
<screen id="crm$AdGroupEntity.edit"
template="com/platform/crm/web/adgroupentity/ad-group-entity-edit.xml"/>
Did you post that example before you removed the browse entry?
avi.fatal
(Avi Fatal)
May 5, 2019, 9:03am
#12
I meant that I have tried it and restore back.
ray1
(Ray Offiah)
May 5, 2019, 9:07am
#13
Ah, I understand now.
Not sure, because it certainly looks like the same problem I was having. Perhaps someone from Cuba can weigh in.
But do try a complete rebuild and see if that helps.
krivopustov
(Konstantin Krivopustov)
May 8, 2019, 6:16am
#14
If in a migrated project you create a screen and it is not opened with No such screen
error, check the web-spring.xml
file and make sure it has the following line:
<gui:screens base-packages="com.company.demo.web"/>
It must point to the base package where to start scanning for screen classes.