smartgwt

Giving the delete button a hover tooltip in gwt

爱⌒轻易说出口 提交于 2019-12-12 01:51:52
问题 In this picture, as you can see there are the red deletion buttons, how do I create a hover tooltip for these buttons? Is it the same as setShowHover(true) ? Code: HoverCustomizer customGroupTooltips = new HoverCustomizer() { @Override public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) { if (colNum == 1) { return "tooltip message"; } else if (colNum == 2) { return "delete"; } return null; } }; ListGridField name = new ListGridField(FIELD_NAME); ListGridField

SmartGWT/GWT: Show a PDF on client side

╄→尐↘猪︶ㄣ 提交于 2019-12-12 01:33:08
问题 I have an already generated PDF on my server-side,I would like some help on showing the pdf when clicking a button on the client side. How should I create the conextion with the server and client using the shared? Thank you for your help. 回答1: Create a servlet and call it from client side on clicking a button. String servletName = GWT.getModuleBaseURL().replace("/" + GWT.getModuleName(), "") + "pdf_download_servlet"; Window.open(servletName, "", ""); For a servlet code please have a look at

Getting the number of visible columns in a ListGrid in SmartGWT?

你说的曾经没有我的故事 提交于 2019-12-12 01:24:18
问题 I'm trying to get the number of visible columns (ListGridField) in a ListGrid. Is there an easy solution for that? 回答1: Here's the solution using ListGrid.fieldIsVisible(String fieldName) method: private int getNumVisibleColumns(ListGrid grid) { int count = 0; for (ListGridField field : grid.getFields()) { if (grid.fieldIsVisible(field.getName())) { count++; } } return count; } 回答2: you can loop through the columns in the ListGrid and call ListGridField.getHidden() to count which ones are

gwt: creating an instance of Window causes application to hang out

谁说我不能喝 提交于 2019-12-11 17:37:52
问题 Inside a legacy application, i am creating a new class MyForm, and modify the existing class MyPanel by adding a reference to MyForm: import com.smartgwt.client.widgets.layout.VLayout; public class MyPanel extends VLayout { public static MyForm myForm = null; public MyPanel() { myForm = new MyForm();//the line causing trouble } } and: public class MyForm extends com.smartgwt.client.widgets.Window { private static TextItem myTextItem; public MyForm() { //other lines of code myTextItem.setValue

display seconds in DateTimeItem (SmartGWT)

拈花ヽ惹草 提交于 2019-12-11 16:53:12
问题 when reading SmartGWT DateTimeItem: accept 12 hour format I found that using TimeDisplayFormat offers the options to display the seconds as, e.g. dateTimeItem.setTimeFormatter(TimeDisplayFormat.TOPADDED24HOURTIME); well, but there was no change in the displaying of the date. As the code states that TimeDisplayFormat is deprecated, and one should use the DateDisplayFormatter instead, I tried dateTimeItem.setDateFormatter(DateDisplayFormat.TOSERIALIZEABLEDATE); , but still no change. The value

SmartGWT getOffsetHeight after layout is drawn

余生颓废 提交于 2019-12-11 13:26:12
问题 I need get offsetHeight of Vlayout, but until i know that it's drawn. How I can check that, this component is drawn ? 回答1: How I can check that, this component is drawn ? You can override the onDraw method of Canvas and add some custom functionality there. @Override protected void onDraw() { super.onDraw(); //your code } Alternatively you can add a draw handler to the component: addDrawHandler(new DrawHandler() { @Override public void onDraw(DrawEvent event) { //Do stuff } }); 来源: https:/

SmartGwt get VLayout height after add members

允我心安 提交于 2019-12-11 13:23:14
问题 I have problem a with getting VLayout height after I add a member to it VLayot layout = new VLayout(); in presenter I have code display.getAnswerPanel().removeMembers(display.getAnswerPanel().getMembers()); which clear all members, and I add another (I have buttons, when I clik them, it clears all VLayout and adds new members) layout.addMember(new Button("Example")); I need to get offsetHeight of this VLayout on start and everytime I click the button, my problem is that in first time when I

How can unit-tests use SmartGWT classes?

非 Y 不嫁゛ 提交于 2019-12-11 12:08:39
问题 In our SmartGWT web application, we pass our domain objects from the server to the client and back (via GWT serialization). To show/edit the data at client side in a DynamicForm or a GridList, we have to convert it into a Record (or ListGridRecord) and after editing back into our domain objects. I would like to write a unit test for this conversion method, but a straightforward attempt in JUnit fails, since the record's getAttribute and setAttribute methods are implemented by JSOHelper

custom treenode smartgwt

你离开我真会死。 提交于 2019-12-11 11:47:45
问题 I am very inexperienced with SmartGWT and have the following issue: I managed to make a Library of different kinds of documents in a tree. For some documents I want to show three icons, which are representing links to other websites, further i want to show some description under them. I tried to write my own CustomTreeNode, also I looked at setCellFormatter() and tried to overwrite it with no luck. Can you give me some Tips and hints how to achieve the desired functionality and what I have to

SMARTGWT - SectionStackSection - deleting an Item from the Section possible?

半城伤御伤魂 提交于 2019-12-11 10:34:25
问题 im using SmartGWT 4. I have an SectionStack with some SectionsStackSections in it. Now i added some DynamicForms with TextItems, Checkboxes etc. to the a Section. I also added an delete button for each Dynamic Form What I want now is, when i click on the delete button the DynamicForm should be deleted from the Section but.. I can't find any delete function in a SectionStackSection there is a Function for the DynamicForms called "removeFromParent" but it doesn't seem to work.. Does anyone got