Hello,
we are currently working to update to V14.1-p20260213/Power.
We are using ui.xmls and ds.xmls to create the uis of our app. In most cases this works even after the update.
To load the screens we use the RPCManager.loadScreen method with the allGlobals flag.
In the following description I have replaced all internal data but the important parts should all be available.
Now for my problem. We have a button which should create a window in which a few datasources are needed.
For that window an ui.xml exists.
For the first call this works. But after closing the window and pressing the button again which should create a new window I can't create it because of the datasources.
In the developer console this error appears:

This Syntax error comes from the answer of the screenLoader which returns:
[
]
[
]
[
]
[
]
[
]
isc.ListGrid.create({
ID:"DIALOG_ListGrid",
autoDraw:false,
autoFetchData:false,
dataSource:"datasource1",
height:"100%",
fields:[
{
align:"left",
name:"NAME",
title:"title",
width:80,
showIf:"true",
optionDataSource:"datasource2",
valueField:"PLC",
displayField:"PLC",
canEdit:true,
autoFetchDisplayMap:true,
multiple:true
}
],
autoSaveEdits:false,
showFilterEditor:true,
filterOnKeypress:true,
canEdit:false,
groupByMaxRecords:1000,
fetchDelay:1000,
allowFilterExpressions:true,
canMultiSort:"true",
sortField:"PLC",
canMultiGroup:"true",
groupStartOpen:"none",
selectionType:"simple",
selectionAppearance:"checkbox"
})
isc.DynamicForm.create({
ID:"DIALOG_DynamicFormLeft",
autoDraw:false,
width:"30%",
fields:[
{
name:"Display",
value:"Display",
_constructor:"HeaderItem"
},
{
name:"NAME",
rowSpan:0,
title:"Title",
width:"100%",
_constructor:"CheckboxItem"
}
],
layoutAlign:"center",
titleWidth:12
})
isc.DynamicForm.create({
ID:"DIALOG_DynamicFormRight",
autoDraw:false,
width:"70%",
fields:[
{
name:"Name",
value:"value",
_constructor:"HeaderItem"
},
{
name:"MessageTypeSelectItem",
showTitle:false,
multiple:true,
optionDataSource:"datasource5",
valueField:"MESSAGETYPE",
displayField:"MESSAGETYPE",
autoFetchDisplayMap:"true",
_constructor:"SelectItem"
}
],
layoutAlign:"center",
titleWidth:12
})
isc.VLayout.create({
ID:"DIALOG_DynamicForm_VLayoutDynamicFormRight",
autoDraw:false,
height:"100%",
members:[
DIALOG_DynamicFormRight
]
})
isc.HLayout.create({
ID:"DIALOG_DynamicForm_Layout",
autoDraw:false,
members:[
DIALOG_DynamicFormLeft,
DIALOG_DynamicForm_VLayoutDynamicFormRight
]
})
isc.IButton.create({
ID:"DIALOG_Select_All",
autoDraw:false,
height:36,
width:36,
icon:"/icon/ic_set_unset_check_2.svg",
iconSize:27,
prompt:"Select all (Can be used for 75 rows or less)"
})
isc.IButton.create({
ID:"DIALOG_ResetFilter",
autoDraw:false,
height:36,
width:36,
icon:"/icon/ic_reset.svg",
iconSize:27,
prompt:"Reset filter"
})
isc.HLayout.create({
ID:"DIALOG_ToolBar",
autoDraw:false,
height:56,
members:[
DIALOG_Select_All,
DIALOG_ResetFilter
],
layoutMargin:12,
membersMargin:12,
backgroundColor:"#F2F2F2"
})
isc.Label.create({
ID:"DIALOG_ListGridTitle",
autoDraw:false,
height:20,
contents:"Device Selection",
styleName:"titleText"
})
isc.VLayout.create({
ID:"DIALOG_MAIN_Layout",
autoDraw:false,
members:[
DIALOG_DynamicForm_Layout,
DIALOG_ListGridTitle,
{
autoDraw:false,
height:3,
_constructor:"LayoutSpacer"
},
DIALOG_ListGrid,
DIALOG_ToolBar
],
layoutMargin:20
})
isc.IButton.create({
ID:"DIALOG_Ok",
autoDraw:false,
height:36,
icon:"/icon/ic_confirm.svg",
iconSize:27,
prompt:"Ok",
visibility:"inherit"
})
isc.IButton.create({
ID:"DIALOG_Cancel",
autoDraw:false,
height:36,
icon:"/icon/ic_cancel.svg",
iconSize:27,
prompt:"Cancel",
visibility:"inherit"
})
isc.HLayout.create({
ID:"DIALOG_ButtonLayout",
autoDraw:false,
height:48,
width:"100%",
align:"center",
members:[
DIALOG_Ok,
DIALOG_Cancel
],
layoutMargin:12,
membersMargin:12
})
isc.Window.create({
ID:"DIALOG",
autoDraw:false,
height:"90%",
overflow:"auto",
width:850,
autoCenter:true,
isModal:true,
autoSize:false,
title:"title",
showMinimizeButton:false,
showMaximizeButton:true,
showFooter:false,
items:[
DIALOG_MAIN_Layout,
DIALOG_ButtonLayout
],
showModalMask:true
})
-------------------------------------------------------------------------------------------------------------------------------------------------
In our ui.xml we have multiple datasources defined like this:
<DataSource ID="datasource2"/>
<DataSource ID="datasource3"/>
<DataSource ID="datasource4"/>
<DataSource ID="datasource5"/>
<DataSource>
<loadID>datasource1</loadID>
</DataSource>
and any other configuration doesn't work. If I use loadID for the other datasources or the ID for datasource1 it throws the errors above when I open the window a second time.
The datasources are not special in any way. This is our reduced datasource1 so no internal data is shown:
<?xml version="1.0" encoding="UTF-8"?>
<DataSource
ID="datasource1"
autoDeriveSchema="false"
serverType="sql"
tableName="TABLE"
requiresRole="ROLE">
<fields>
<field name="NAME" tableName="TABLE" type="text"/>
</fields>
<operationBindings>
<operationBinding operationType="fetch">
<selectClause>DISTINCT $defaultSelectClause</selectClause>
<tableClause>TABLE LEFT JOIN OTHER_TABLE ON TABLE.field = OTHER_TABLE.field
</tableClause>
<whereClause>($defaultWhereClause)</whereClause>
</operationBinding>
</operationBindings>
</DataSource>
To compare, this is our reduced datasource2:
<?xml version="1.0" encoding="UTF-8"?>
<DataSource
ID="datasource2"
autoDeriveSchema="false"
serverType="sql"
tableName="TABLE3"
requiresRole="ROLE">
>
<fields>
<field name="FIELD" type="text"/>
</fields>
<operationBindings>
<operationBinding operationType="fetch">
<selectClause>DISTINCT TABLE.FIELD</selectClause>
<orderClause>FIELD ASC</orderClause>
</operationBinding>
</operationBindings>
</DataSource>
Now I want to know when I have to use loadID and when the ID or if there is a setting so we don't have to change all of our ui.xmls as we have used the pattern with loadID everywhere in our project. Unfortunately I found nearly nothing to loadID in the docu or in the forum. I only found a bugfix in the release notes for GWT3.1 and this forum post from 2017 which says loadID is correct https://forums.smartclient.com/forum...xml#post249706
we are currently working to update to V14.1-p20260213/Power.
We are using ui.xmls and ds.xmls to create the uis of our app. In most cases this works even after the update.
To load the screens we use the RPCManager.loadScreen method with the allGlobals flag.
In the following description I have replaced all internal data but the important parts should all be available.
Now for my problem. We have a button which should create a window in which a few datasources are needed.
For that window an ui.xml exists.
For the first call this works. But after closing the window and pressing the button again which should create a new window I can't create it because of the datasources.
In the developer console this error appears:
This Syntax error comes from the answer of the screenLoader which returns:
[
]
[
]
[
]
[
]
[
]
isc.ListGrid.create({
ID:"DIALOG_ListGrid",
autoDraw:false,
autoFetchData:false,
dataSource:"datasource1",
height:"100%",
fields:[
{
align:"left",
name:"NAME",
title:"title",
width:80,
showIf:"true",
optionDataSource:"datasource2",
valueField:"PLC",
displayField:"PLC",
canEdit:true,
autoFetchDisplayMap:true,
multiple:true
}
],
autoSaveEdits:false,
showFilterEditor:true,
filterOnKeypress:true,
canEdit:false,
groupByMaxRecords:1000,
fetchDelay:1000,
allowFilterExpressions:true,
canMultiSort:"true",
sortField:"PLC",
canMultiGroup:"true",
groupStartOpen:"none",
selectionType:"simple",
selectionAppearance:"checkbox"
})
isc.DynamicForm.create({
ID:"DIALOG_DynamicFormLeft",
autoDraw:false,
width:"30%",
fields:[
{
name:"Display",
value:"Display",
_constructor:"HeaderItem"
},
{
name:"NAME",
rowSpan:0,
title:"Title",
width:"100%",
_constructor:"CheckboxItem"
}
],
layoutAlign:"center",
titleWidth:12
})
isc.DynamicForm.create({
ID:"DIALOG_DynamicFormRight",
autoDraw:false,
width:"70%",
fields:[
{
name:"Name",
value:"value",
_constructor:"HeaderItem"
},
{
name:"MessageTypeSelectItem",
showTitle:false,
multiple:true,
optionDataSource:"datasource5",
valueField:"MESSAGETYPE",
displayField:"MESSAGETYPE",
autoFetchDisplayMap:"true",
_constructor:"SelectItem"
}
],
layoutAlign:"center",
titleWidth:12
})
isc.VLayout.create({
ID:"DIALOG_DynamicForm_VLayoutDynamicFormRight",
autoDraw:false,
height:"100%",
members:[
DIALOG_DynamicFormRight
]
})
isc.HLayout.create({
ID:"DIALOG_DynamicForm_Layout",
autoDraw:false,
members:[
DIALOG_DynamicFormLeft,
DIALOG_DynamicForm_VLayoutDynamicFormRight
]
})
isc.IButton.create({
ID:"DIALOG_Select_All",
autoDraw:false,
height:36,
width:36,
icon:"/icon/ic_set_unset_check_2.svg",
iconSize:27,
prompt:"Select all (Can be used for 75 rows or less)"
})
isc.IButton.create({
ID:"DIALOG_ResetFilter",
autoDraw:false,
height:36,
width:36,
icon:"/icon/ic_reset.svg",
iconSize:27,
prompt:"Reset filter"
})
isc.HLayout.create({
ID:"DIALOG_ToolBar",
autoDraw:false,
height:56,
members:[
DIALOG_Select_All,
DIALOG_ResetFilter
],
layoutMargin:12,
membersMargin:12,
backgroundColor:"#F2F2F2"
})
isc.Label.create({
ID:"DIALOG_ListGridTitle",
autoDraw:false,
height:20,
contents:"Device Selection",
styleName:"titleText"
})
isc.VLayout.create({
ID:"DIALOG_MAIN_Layout",
autoDraw:false,
members:[
DIALOG_DynamicForm_Layout,
DIALOG_ListGridTitle,
{
autoDraw:false,
height:3,
_constructor:"LayoutSpacer"
},
DIALOG_ListGrid,
DIALOG_ToolBar
],
layoutMargin:20
})
isc.IButton.create({
ID:"DIALOG_Ok",
autoDraw:false,
height:36,
icon:"/icon/ic_confirm.svg",
iconSize:27,
prompt:"Ok",
visibility:"inherit"
})
isc.IButton.create({
ID:"DIALOG_Cancel",
autoDraw:false,
height:36,
icon:"/icon/ic_cancel.svg",
iconSize:27,
prompt:"Cancel",
visibility:"inherit"
})
isc.HLayout.create({
ID:"DIALOG_ButtonLayout",
autoDraw:false,
height:48,
width:"100%",
align:"center",
members:[
DIALOG_Ok,
DIALOG_Cancel
],
layoutMargin:12,
membersMargin:12
})
isc.Window.create({
ID:"DIALOG",
autoDraw:false,
height:"90%",
overflow:"auto",
width:850,
autoCenter:true,
isModal:true,
autoSize:false,
title:"title",
showMinimizeButton:false,
showMaximizeButton:true,
showFooter:false,
items:[
DIALOG_MAIN_Layout,
DIALOG_ButtonLayout
],
showModalMask:true
})
-------------------------------------------------------------------------------------------------------------------------------------------------
In our ui.xml we have multiple datasources defined like this:
<DataSource ID="datasource2"/>
<DataSource ID="datasource3"/>
<DataSource ID="datasource4"/>
<DataSource ID="datasource5"/>
<DataSource>
<loadID>datasource1</loadID>
</DataSource>
and any other configuration doesn't work. If I use loadID for the other datasources or the ID for datasource1 it throws the errors above when I open the window a second time.
The datasources are not special in any way. This is our reduced datasource1 so no internal data is shown:
<?xml version="1.0" encoding="UTF-8"?>
<DataSource
ID="datasource1"
autoDeriveSchema="false"
serverType="sql"
tableName="TABLE"
requiresRole="ROLE">
<fields>
<field name="NAME" tableName="TABLE" type="text"/>
</fields>
<operationBindings>
<operationBinding operationType="fetch">
<selectClause>DISTINCT $defaultSelectClause</selectClause>
<tableClause>TABLE LEFT JOIN OTHER_TABLE ON TABLE.field = OTHER_TABLE.field
</tableClause>
<whereClause>($defaultWhereClause)</whereClause>
</operationBinding>
</operationBindings>
</DataSource>
To compare, this is our reduced datasource2:
<?xml version="1.0" encoding="UTF-8"?>
<DataSource
ID="datasource2"
autoDeriveSchema="false"
serverType="sql"
tableName="TABLE3"
requiresRole="ROLE">
>
<fields>
<field name="FIELD" type="text"/>
</fields>
<operationBindings>
<operationBinding operationType="fetch">
<selectClause>DISTINCT TABLE.FIELD</selectClause>
<orderClause>FIELD ASC</orderClause>
</operationBinding>
</operationBindings>
</DataSource>
Now I want to know when I have to use loadID and when the ID or if there is a setting so we don't have to change all of our ui.xmls as we have used the pattern with loadID everywhere in our project. Unfortunately I found nearly nothing to loadID in the docu or in the forum. I only found a bugfix in the release notes for GWT3.1 and this forum post from 2017 which says loadID is correct https://forums.smartclient.com/forum...xml#post249706
Comment