Hi,
I have a list that is populated through a RestDatasource. An example of the XML that the server returns on a GET request:
Notice the xmlns:xsi and the xsi:type attributes added to the records.
This data is displayed correctly in the ListGrid. When I click on a row in the grid, the user is allowed to edit the data in a separate form. This also works fine by calling listGrid.edit(event.getRecord()).
However, when I save the edited record, the response sent back to the server looks like this:
Notice that the attributes now are nodes for each record:
This makes my server side code break, as JAXB is unable to find matching javabean properties for these nodes. Is there any way to not make SmartGWT add these schema related attributes as nodes in the corresponding response?
Thanks
Rolf
I have a list that is populated through a RestDatasource. An example of the XML that the server returns on a GET request:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response> <endRow>1</endRow> <startRow>0</startRow> <status>0</status> <totalRows>2</totalRows> <data> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="basicGameType"> <description>Description 1</description> <id>340</id> </record> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="basicGameType"> <description>Description 2</description> <id>395</id> </record> </data> </response>
This data is displayed correctly in the ListGrid. When I click on a row in the grid, the user is allowed to edit the data in a separate form. This also works fine by calling listGrid.edit(event.getRecord()).
However, when I save the edited record, the response sent back to the server looks like this:
Code:
<request> <data> <basicGameType> <description>New description</description> <xmlns:xsi>http://www.w3.org/2001/XMLSchema-instance</xmlns:xsi> <xsi:type>basicGameType</xsi:type> <id>340</id> <showPrizeTable>false</showPrizeTable> </basicGameType> </data> <oldValues> <description>Description 1</description> <xmlns:xsi>http://www.w3.org/2001/XMLSchema-instance</xmlns:xsi> <xsi:type>basicGameType</xsi:type> <id>340</id> <showPrizeTable>false</showPrizeTable> </oldValues> <dataSource>basicGameType</dataSource> <operationType>update</operationType> <operationId></operationId> <startRow></startRow> <endRow></endRow> <sortBy></sortBy> <textMatchStyle></textMatchStyle> <componentId>isc_OID_12</componentId> </request>
Code:
<xmlns:xsi>http://www.w3.org/2001/XMLSchema-instance</xmlns:xsi> <xsi:type>basicGameType</xsi:type>
Thanks
Rolf
Comment