smartgwt

SmartGWT RestDataSource

六眼飞鱼酱① 提交于 2019-12-01 22:52:56
I'm using SmartGWT/SmartClient LGPL, I can't use the Pro, due to project ties. I would like to create a RestDataSource from a jdbc connection, to be exposed from the server to the SmartGWT client. How could it be done? Any help is greatly appreciated. Have you had a look at the source code for the RestDataSource Edit & Save example from the Showcase ? It's a good starting point. If you want REST on the server I'd recommend Restlet talking to a JDBC backend. You could take the example above and wire it up to your Restlets instead of the XML. Here's a general outline of what you could do if not

Equivalent of Line Separator in smartGWT?

你。 提交于 2019-12-01 21:39:13
Is there an equivalent or alternate for System.getProperty("line.separator"); It gives the below error The method getProperty(String, String) in the type System is not applicable for the arguments (String) Rahul Tripathi I think you need to execute System.getProperty("line.separator") in your server side code and access it using RPC or any other server side gwt communication technique. Check GWT JRE Emulation : GWT includes a library that emulates a subset of the Java runtime library. The list below shows the set of JRE packages, types and methods that GWT can translate automatically. Note

SmartGWT: is it possible to color a a certain row in a list grid?

六眼飞鱼酱① 提交于 2019-12-01 21:15:57
all is it possible to color a certain Row in smartGWT listGrid ? i want to color just 1 row , not all the listGrid In SmartGWT, methods that end with Style (e.g.- get Style, getBaseStyle, getCellStyle, etc.) need to return a CSS class defined elsewhere (.css file, inline css in application load jsp, etc.). Same applies for set Style methods. Unless lot of CSS customizations are done warranting the need for such, using getCellCSSText would probably be the best option. getCellCSSText returns CSS text per cell, and will be called during every redraw. final ListGrid resultsGrid = new ListGrid() {

open/save file in smartGWT

余生颓废 提交于 2019-12-01 14:10:29
I have implemented RPCService, RPCServiceAsync & RPCServieImpl. On clicking a button a service in server side will be called and it will fetch data from DB and file is created. Once the file is created, then i need to open that file in client side and need to prompt a dialog box with open/save options. how can i implement this opening a file part. pls suggest a way to implement t.. Reply pls.. thanks in advance.... @Hambend : I still have one more clarification !.. how to call this doGet method in another servlet i.e. in my onmodule load class i am having lot of widgets in seperate layout and

Drag Drop with XML based DataSource not working in SmartGWT

天涯浪子 提交于 2019-12-01 11:13:14
I am using the example : http://www.smartclient.com/smartgwt/showcase/#tree_interaction_drag_nodes but changed the datasource to XML file and now its not working. The XML used is : <RootNode> <ChildNode> <ChildID>2</ChildID> <Name>ChildNode1</Name> <ReportsTo>1</ReportsTo> </ChildNode> <ChildNode> <ChildID>3</ChildID> <Name>ChildNode1.1</Name> <ReportsTo>2</ReportsTo> </ChildNode> <ChildNode> <ChildID>4</ChildID> <Name>ChildNode2</Name> <ReportsTo>1</ReportsTo> </ChildNode> <ChildNode> <ChildID>5</ChildID> <Name>ChildNode2.1</Name> <ReportsTo>4</ReportsTo> </ChildNode> <ChildNode> <ChildID>6<

Print preview from multiple iframes?

∥☆過路亽.° 提交于 2019-12-01 09:16:34
I have several iframes in a page. I want to show in a print preview all the iframe contents as snapshots of iframes. I used window.print() for individual iframes, and it's working fine, but how do I do it for multiple frames? You need to focus all frames one-by-one and merge in print report. You can achieve it, with this code: HTML : <button id="printButton" onclick="javascript:printPage()" >Print this page</button> <h1 id='header'><b>Awesome Print Report</b></h1> <iframe id="ifr1" src="http://amazon.com"></iframe> <iframe id="ifr2" src="http://amazon.com"></iframe> <iframe id="ifr3" src="http

Drag Drop with XML based DataSource not working in SmartGWT

坚强是说给别人听的谎言 提交于 2019-12-01 09:10:56
问题 I am using the example : http://www.smartclient.com/smartgwt/showcase/#tree_interaction_drag_nodes but changed the datasource to XML file and now its not working. The XML used is : <RootNode> <ChildNode> <ChildID>2</ChildID> <Name>ChildNode1</Name> <ReportsTo>1</ReportsTo> </ChildNode> <ChildNode> <ChildID>3</ChildID> <Name>ChildNode1.1</Name> <ReportsTo>2</ReportsTo> </ChildNode> <ChildNode> <ChildID>4</ChildID> <Name>ChildNode2</Name> <ReportsTo>1</ReportsTo> </ChildNode> <ChildNode>

How to sort records (with code) in a grouped ListGrid?

ぃ、小莉子 提交于 2019-12-01 02:19:59
This is the scenario: I'm working with a listgrid that needs to be grouped, and also needs to have its records ordered within each group. I've already used the ListGrid.sort() and the ListGrid.sort(String, SortDirection) methods but none of them works properly. This problem doesn't show up when the grid isn't grouped (it makes the sort perfectly); and when the sort (with the listgrid is grouped) is made by clicking the column header, works fine but I need to sort it by code (without user interaction) because the header sort option needs to be disabled (and context menu too). I'm using SmartGWT

Smartgwt selectitem key value issue

僤鯓⒐⒋嵵緔 提交于 2019-12-01 02:03:51
I have a SelectItem which I fill through a Map that has this combo is within a listgridfield, so good up there, but when I select any item in the combobox instead of get the description or value of the map puts the key in the listgridfield. How I can do to make me set the value instead of key? now I tried to do with AddChangeHandler but has not worked. I got the next code: final ListGridField measureField = new ListGridField(CdmsConstants.MEASURE_ABB, CdmsConstants.CMB_MEASURE_TITULO, 100); final SelectItem measureComboBox = new SelectItem(); measureComboBox.setDefaultToFirstOption(false);

Support of pagination in smartGWT for ListGrid?

微笑、不失礼 提交于 2019-11-30 15:53:12
问题 I have noticed after some research that smartGWT don't support pagination in the ListGrid but only dynamic scroll. But if I really need pagination, how can I achieve this? Let's say I want something like this with the " next " and " previous " buttons: http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable PS: This example is in GWT, what I want is something similar but in smartGWT 回答1: I'm sorry that there is no Paging component in SmartGWT. But some nice guy has written a