smartgwt

SmartGWT ComboBoxItem get all Records

天涯浪子 提交于 2020-01-06 08:26:45
问题 How can I get all Records from a SmartGWT ComboBoxItem? I add the Records as a Datasource. Did not found any way to retrive all Records. Thank you in advance! 回答1: Try RecordList recordList=comboBoxItem.getValueAsRecordList(); Record[] records=recordList.getRange(0, recordList.getLength()); 回答2: RecodList support toArray method to get all records. RecordList recordList=comboBoxItem.getValueAsRecordList(); recordList.toArray() 来源: https://stackoverflow.com/questions/23337604/smartgwt

I have a modal Window implemented in SmartGWT - how can I close it when someone clicks off of the window?

半腔热情 提交于 2020-01-06 04:35:46
问题 I've created a class that extends the Window SmartGWT class, and it is set to be modal. I am trying to make the Window close when a user clicks off the window. I have tried to link it up to a FocusChangedHandler with no luck. Has anyone done something like this before? /** * Sets up a modal Dialog box that lets the user edit attributes associated * with the properties of the {@link LabElement} that are given. * * @author Therin Irwin */ public class EditorDialog extends Window { final

how to display columns as rows in ListGrid in Smart gwt?

有些话、适合烂在心里 提交于 2020-01-06 03:53:24
问题 I am a new bee to Smart gwt. Basically I have my data structure as: A |_____ B1 |__C1 |__C2 |__C3 |_ B2 So i have created my ListGridRecord as follows: public class VEPAreaRecord extends ListGridRecord{ public VEPAreaRecord(){ } /** * @param vepAreaName * @param checkStations */ public VEPAreaRecord(String vepAreaName, String[] checkStations) { setVepAreaName(vepAreaName); setCheckStations(checkStations); } /** * @return the vepAreaName */ public final String getVepAreaName() { return

SmartGWT - Display date in yyyy/MM/dd format

这一生的挚爱 提交于 2020-01-06 02:19:29
问题 I want to have the possibility to display a date with the possibility to enter the date manually. For this I've uset the attribute useTextField set to true like: setAttribute("useTextField", true); Now I want the format of date to be yyyy/MM/dd. I've tryed with setAttribute("displayFormat ", "TOJAPANSHORTDATE"); setAttribute("inputFormat ", "YMD"); but nothing happen. I need to use attributes. What attribute should I use? And with what value? Please, need help. Thanks you a lot. 回答1: You can

My response.sendRedirect isn't working

蓝咒 提交于 2020-01-05 05:50:06
问题 I have a SmartGWT app and in it a Filter in which I'm trying to figure out (on login) if the request should be forwarded (e.g. desktop to mobile). The code executes and the browser makes a get request but doesn't get a response and doesn't do a redirect. I've tried with http://google.com and that didn't work too so it must be something else. public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws ServletException, IOException { HttpServletRequest request =

GWT : JSON Parsing in client side and server side with same api

倾然丶 夕夏残阳落幕 提交于 2020-01-04 14:08:28
问题 We use org.json api to parse json on server side and GWT JsonParser to parse JSON on client side. Is there a api that we can use that can be used on both the client side and server side? 回答1: You are looking for GWT AutoBean: http://code.google.com/p/google-web-toolkit/wiki/AutoBean With AutoBeans you juset define the structure of your JSON and the GWT Compiler handles the rest. 回答2: I am writing this in comparison to using autobeans or GWT-RCP - if you are using Java on the server.

using wildcards in a filter for ListGrid (SmartGWT)

≡放荡痞女 提交于 2020-01-03 01:43:03
问题 I'm having the following ListGrid: ListGridField eml = new ListGridField(EmlSearchItem.EMAIL, EmlSearchItem.EMAIL_TITLE); emlGrid = new ListGrid(); emlGrid.setWidth("70%"); emlGrid.setHeight("60%"); emlGrid.setFields(eml); emlGrid.setAutoFetchData(true); emlGrid.setSelectionType(SelectionStyle.SINGLE); emlGrid.setAllowFilterExpressions(true); emlGrid.setShowFilterEditor(true); emlGrid.setAutoFetchTextMatchStyle(TextMatchStyle. SUBSTRING); according to the JavaDoc setting

SMARTGWT DataSource (GWT-RPC-DATASource) LISTGRID

大城市里の小女人 提交于 2020-01-02 03:13:50
问题 I have a problem with datasource binding in ListGrid with smartGWT. I have GWT-RPC-DataSource and i have set it as my datasource grid.setDataSource(ds); On one button click I have some changes in my datasource and I am generating new datasource and rebinding with smartgwt's grid. but it fails. I have tried grid.redraw() function to redraw the grid. Below is my class for GWTRPCDATASOURCE public abstract class GwtRpcDataSource extends DataSource { /** * Creates new data source which

set the values in Listgrid (smartGWT)

Deadly 提交于 2019-12-31 05:20:28
问题 I am trying to use smart Gwt, Listgrid. I am using both com.google.gwt.user.client.ui and smart gwt. I have value in a ListGridRecords[] records. I am unable to set the values in table. this piece of code is in composite. public TableDocument(Action action) { initWidget(getTablePanel()); } private HorizontalPanel getTablePanel() { if (tablePanel == null) { tablePanel = new HorizontalPanel(); tablePanel.setSize("144px", "75px"); addtable(); } public void addtable() { // TODO Auto-generated

smart gwt comboBoxItem deosn't filter based on user input

余生长醉 提交于 2019-12-25 06:50:57
问题 ComboBoxItem buildings = new ComboBoxItem("buildings", "Building Names") { public Criteria getPickListFilterCriteria() { Criteria criteria = new Criteria(); criteria.setAttribute("dependentString", grid.getSelectedRecord().getAttribute("company")); criteria.setAttribute("dependentString2", "office"); return criteria; } }; buildings.setOptionDataSource(CommonLookupDS.getLookupDS(LookupTypesClient.LOOKUP_BUILDINGS_BY_TYPE)); buildings.setValueField("key"); buildings.setDisplayField("value");