Smart GWT listGrid record details view
Stack : SmartGWT v2.4, GWT sdk 2.1 Mozilla 3.6
I am fairly new to Smart GWT, but have so far got the ListGrid component working. Our requirement is to show additional details of the record selected in the ListGrid.
ListGrid -->select record --> send request to server to fetch details of the record --> show details of the record
Question: 1. What is the best approach to send HTTP GET request and rendering the JSON 开发者_JAVA技巧response. 2. We considered using DetailsViewer and Dynamic form. Though DetailsViewer.setData(...) works when we pass the current selected ListGrid record, we want to get more details that is not held in the ListGrid row.
Tried setting a RestDatasource for detailsViewer, it doesnt show the fetched record in detailsViewer, although we can verify from firebug that the request from datasource is hitting the server(running a java spring MVC application and returns JSON).
Can you please help what is the best possible approach to retreive JSON data for a record detail shown in ListGrid from server and show it in a form as read only?
Thanks Sandeep
1.Just add record click handler to every field of ListGrid. 2.On click event of row, fetch the details you want to display for that particular row. 3.now create a new Widget containing popupPanel and pass the above result to it... 4.You may display these details by adding an HTML String in popup or u may add a new grid to display the details neatly.
精彩评论