Re: JSON+RequestBuilder vs RequestFactory
Not sure if my first question went in ... Checking to see, if you were able to come up with a resolution to your question ? We have an existing Spring MVC backend, that we would like to hook up to an GWT front-end. Have similar questions/issues in terms of how we would like to communicate with backend (e.g., RequestBuilder, RequestFactory, etc) and if it is possible for GWT and Spring MVC to co-exist. Thanks, Mike On Wednesday, November 17, 2010 1:59:55 AM UTC-6, zixzigma wrote: Hello everyone. What are the benefits of using RequestFactory over JSON/Request Builder. to implement client-side communication/persistence i have to options: 1- using Spring/Spring MVC on the server to handle all the server-side work, and send JSON data to the GWT client. 2- i believe I still can use SpringMVC with RequestFactory, though not as cleanly seperated as the first approach. all the code will be in Java. What are the benefits of using RequestFactory over JSON/ RequestBuilder ? Thank You -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: JSON+RequestBuilder vs RequestFactory
Hello zixzigma, Did you ever come up with a resolution here ? I'm new to GWT, and we currently have a Spring MVC backend, that we would like to communicate with. Were you able to integrate which such a backend ? if so, which option(s) did you go with, and do you have any example of such ? Thanks for any help that you may be able to provide. - Mike On Wednesday, November 17, 2010 1:59:55 AM UTC-6, zixzigma wrote: Hello everyone. What are the benefits of using RequestFactory over JSON/Request Builder. to implement client-side communication/persistence i have to options: 1- using Spring/Spring MVC on the server to handle all the server-side work, and send JSON data to the GWT client. 2- i believe I still can use SpringMVC with RequestFactory, though not as cleanly seperated as the first approach. all the code will be in Java. What are the benefits of using RequestFactory over JSON/ RequestBuilder ? Thank You -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problems with super dev mode: Can't find any GWT Modules on this page
Hi I had similar issue lately. Important thing is that after switching to xsiframe linker you have to compile your application and use it for starting sdm. This way your app.nocache.js file will be built by that newly set linker and sdm scripts will detect it. Without that step nocache.js file will be old (created by std linker) - hence the error. Good thing after changing linker is cleaning the project (and also removing gwt-unitCache folder). Without doing it I had some compilation issues. Greg On Thursday, October 17, 2013 8:11:02 PM UTC+2, crojay78 wrote: Thanks for the reply, Yes I added it my app.gwt.xml Am Donnerstag, 17. Oktober 2013 19:43:13 UTC+2 schrieb crojay78: Hi, i followed a lot of threads at stackoverflow and here in this group concerning the super dev mode. But it still does not work on my side. I have a multi module maven gwt project and want to use super dev with it. Actually it works to start the codeserver with the mvn gwt:run-codeserver and I can see the output [INFO] [INFO] The code server is ready. [INFO] Next, visit: http://localhost:9876/ I started this page and bookmarked the links. After this I am starting my tomcat with eclipse wtp plugin where my application is running. Then I connect to this application my tomcat server. The app is available and works, but for my understanding it should be able to use there the dev on link. But this shows me only the message Can't find any GWT Modules on this page. Any idea what the problem is? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Logging to the server side
Hi You may check this first: http://www.gwtproject.org/doc/latest/DevGuideLogging.html especially this section: http://www.gwtproject.org/doc/latest/DevGuideLogging.html#Remote_Logging Then this: https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/logging/server/RemoteLoggingServiceImpl.java - it's a source for GWT-RPC service which allows remote logging on the server. As the documentation says: GWT currently contains a SimpleRemoteLogHandler which will do this in the simplest possible way (using GWT-RPC) and no intelligent batching, exponential backoffs in case of failure, and so forth. So it's possible but you have to implement it yourself. Greg On Wednesday, October 16, 2013 11:56:07 AM UTC+2, paulo...@gmail.com wrote: Hi, I'm a gwt newbie and i want to send whatever log messages are created on the client side to the server side. My backend is grails and i have implemented a service that receives the logs. Is there any way to implement a gwt rpc async call that will not wait for any answer back? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Issue with development mode plugin and Custom selection script / hosted.html that allows separate debugging of multiple GWT applications on a single page
Hi Please check this: https://groups.google.com/d/msg/google-web-toolkit/5XzZrpBjxnY/IJzN2Z6tfawJhttps://groups.google.com/forum/#!topic/google-web-toolkit/5XzZrpBjxnY On Tuesday, October 8, 2013 7:07:34 PM UTC+2, Jamie Cramb wrote: Hi all, I have a page which has multiple GWT applications running on it. When it comes to development mode / debugging from eclipse (using the dev mode plugin in chrome) we start to hit issues because if we put the gwt.codesvr param in the URL then all of the GWT applications on the page will try to debug and will fail (because the debugger we have running only has the source code for one of the applications in its classpath). My goal is to update the implementation of the bootstrapping process for dev mode to achieve the following: 1. Externalize the decision on which GWT applications on a page should debug based on some other JS function that is resident on the page so it can be controlled via a custom mechanism / server-side decision. 2. Have the ability to assign a custom $hosted URL (e.g. localhost:9997) for each of the GWT applications on a page that should be debugging. I have achieved the first goal by: - Providing my own primary linker (an extension of the IFrameLinker) that overrides the location of the selection script template so that it uses my modified selection script - Making my modified selection script provide a custom isHostedMode() implementation that calls out to a JS function that is resident on the host page for the decision of whether or not to go into dev mode: function isHostedMode() { $wnd.shouldDebug('__MODULE_NAME__'); } I thought I was close to achieving my second goal by: - Using the same primary linker to override the hosted.html location with my own custom hosted.html page. - Making my hosted.html pickup the $hosted URL from a global var resident in the host page instead of trying to pick it up from the gwt.codesvr param: $hosted = decodeURIComponent(parent.debugHostUrl); However, I get a failure (return false) from the following line of code unless I have the gwt.codesvr param in the URL: if (plugin.connect(url, topWin.__gwt_SessionID, $hosted, $moduleName, $hostedHtmlVersion)) { ... } else { ...} On debugging the code everything looks fine going into the plugin.connect() call. Does anyone know: 1. If there is a better approach to achieving my goals? 2. If the dev mode plugin is hard coded in someone to expect the gwt.codesvr param to be in the URL even though the $hosted var is passed in on the call to connect? Thanks in advance. Cheers, Jamie -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: SuggestBox and HasBlurHandlers
Wouldn't a ValueChangeHandler be more appropriate for firing validation? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: java.lang.NullPointerException Error when using rpc
I don't think you can pass raw Object in RPC. Have you tried with String instead? On Sat, Nov 2, 2013 at 6:15 PM, zhenliang@gmail.com wrote: I'm now currently extracting out data from my database using rpc but whenever I click the button it does generates a error and my onFailure command is being triggered always. Below is my Code for the program. public class PleaseWork implements EntryPoint {private TextBox textbox2 = new TextBox();private Label Hi = new Label(New label);@SuppressWarnings(deprecation)public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); Button btnNewButton = new Button(New button); btnNewButton.addClickListener(new ClickListener() { public void onClick(Widget event) { HelpConnectionAsync Abra =(HelpConnectionAsync) GWT.create(HelpConnection.class); ServiceDefTarget target = (ServiceDefTarget) Abra; String moduleRelativeURL = GWT.getModuleBaseURL() + MySQLConnection; target.setServiceEntryPoint(moduleRelativeURL); AsyncCallback callback = new AsyncCallback(){ public void onSuccess (Object result){ textbox2.setText((String)result); Hi.setText(You Pass!);} public void onFailure(Throwable caught) { caught.printStackTrace(); Hi.setText(You fail!);} }; Abra.sensors(callback); } }); rootPanel.add(btnNewButton, 23, 30); rootPanel.add(textbox2,23, 70); rootPanel.add(Hi, 23, 130);} And this is my Serverside code public class MySQLConnection extends RemoteServiceServlet implements HelpConnection { private Connection conn = null; private ResultSet rs = null; private PreparedStatement pstmt = null; public static Connection getConnection() throws Exception { String driver = com.mysql.jdbc.Driver; String url = jdbc:mysql://localhost:3306/temperature; String username = root; String password = 123456; Class.forName(driver); Connection conn = DriverManager.getConnection(url, username, password); return conn; } @Override public String[] sensors() throws Exception { String [] user = null; try { conn = getConnection(); rs = pstmt.executeQuery(SELECT ID, times FROM sensor ORDER BY id DESC LIMIT 1;); // extract data from the ResultSet while (rs.next()) { user = new String[] {rs.getString(1),rs.getString(2)}; } } catch(SQLException e) { e.printStackTrace(); } finally { try { rs.close(); pstmt.close(); conn.close(); } catch (SQLException e) { e.printStackTrace(); } } return user; } } While running the application it generates this error message on the console side which is telling me why onFailure Command is always being triggered but i do not understand about it. java.lang.NullPointerException at com.google.gwt.user.client.rpc.core.java.lang.NullPointerException_FieldSerializer.instantiate(NullPointerException_FieldSerializer.java:16) at com.google.gwt.user.client.rpc.core.java.lang.NullPointerException_FieldSerializer.create(NullPointerException_FieldSerializer.java:25) at com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate(SerializerBase.java:115) at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:396) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:216) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at
CellTable keyboard events troubles in Chrome
Hi All, After a search on the internet and in this group I didn't found help for the issue I have. So I ask here if someone has any advice or workaround. I just tried basic example of CellTable found here http://www.gwtproject.org/doc/latest/DevGuideUiCellWidgets.html, and put the cellTable in an empty VerticalPanel somewhere in my app. In Chrome only, the example doesn't work correctly : almost all keyboard events have no effect. Only Delete, Backspace, CTRL-Z + other CTRLs and ENTER keys work. It is impossible to type in some text : alphanumeric key events have no effect on the content of the cells. With other browsers than Chrome the CellTable example works without any problem ! For the test I use : GWT 2.5.1 Test NOT OK : Chrome 32.0.1687.2 dev-m Aura Test OK : Firefox : 24.0 Test OK : Opera : 12.11 Test OK : Safari : 5.1.7 (no test on IE as I have only IE6, for other tests purpose...) Thank you for your help. Yves /** * A simple data type that represents a contact with a unique ID. */ private static class Contact { private static int nextId = 0; private final int id; private String name; public Contact(String name) { nextId++; this.id = nextId; this.name = name; } } /** * The list of data to display. */ private static final ListContact CONTACTS = Arrays.asList(new Contact(John), new Contact(Joe), new Contact(George)); /** * The key provider that allows us to identify Contacts even if a field * changes. We identify contacts by their unique ID. */ private static final ProvidesKeyContact KEY_PROVIDER = new ProvidesKeyContact() { @Override public Object getKey(Contact item) { return item.id; } }; . initWidget(uiBinder.createAndBindUi(this)); // Create a CellTable with a key provider. final CellTableContact table = new CellTableContact(KEY_PROVIDER); table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED); // Add a text input column to edit the name. final TextInputCell nameCell = new TextInputCell(); ColumnContact, String nameColumn = new ColumnContact, String(nameCell) { @Override public String getValue(Contact object) { // Return the name as the value of this column. return object.name; } }; table.addColumn(nameColumn, Name); // Add a field updater to be notified when the user enters a new name. nameColumn.setFieldUpdater(new FieldUpdaterContact, String() { @Override public void update(int index, Contact object, String value) { // Inform the user of the change. Window.alert(You changed the name of + object.name + to + value); // Push the changes into the Contact. At this point, you could send an // asynchronous request to the server to update the database. object.name = value; // Redraw the table with the new data. table.redraw(); } }); // Push the data into the widget. table.setRowData(CONTACTS); vp.add(table); -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Determining dependencies for split points
The solution that worked for me was to move the code from the runAsync method of split point 1 out of the runAsync call (next to it). This put the relevant code into the initial download part, where I could trace the dependency. On Monday, October 14, 2013 1:00:41 PM UTC-4, Ben Klein wrote: In my GWT application, I have several split points. In the compile report, it says that a certain class has some code loaded in split point 1 and some code loaded in split point 5. How do I find out what is causing the code to load from split point 5? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Determining dependencies for split points
Correction: split point 5, not 1 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: SuggestBox and HasBlurHandlers
How about extending the popup interface SuggestDisplay? You can then handle the callbacks which get fired when the popup is hidden. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Native File Chooser Dialog
It could be that the browser only shows the dialog when processing a user-initiated event (there was something like this introduced in Flash 10 back in the days for security reasons: http://www.adobe.com/devnet/flashplayer/articles/fplayer10_uia_requirements.html ) Try with vanilla JS, and if it behaves the same, then at least one could say GWT is not to blame. On Wednesday, October 30, 2013 10:16:12 AM UTC+1, Tim Hill wrote: Hi there, I am experiencing an annoying issue. What I want to be able to do is: 1. Have a custom file chooser widget (standard gwt-FileUpload hidden/off screen and a simple styled button shown). 2. User clicks the button, the file dialog is shown 3. User selects a file 4. Checks performed on the file (e.g. pixel size) and if not valid, alert box shown and file chooser dialog is shown again Now, I have everything working apart from the re-showing of the file chooser dialog in the last step. I have gone through the steps with the debugger and I can see the code executing the element.click() command in my JSNI function, but the dialog is never shown. Any ideas? Cheers Tim -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Implementation alternatives to improve GWT RequestFactory read and write based use cases
The way RequestFactory is designed, you have to use per-request caches to ensure you only ever have one instance of a given entity within the course of the request. Using Hibernate/JPA, that means using a session-per-request (aka open-session-in-view) pattern. Are you already using it? On Friday, November 1, 2013 1:20:14 AM UTC+1, Doug Gschwind wrote: Hello everyone, We are using GWT 2.5.1, Hibernate 4.x as a JPA 2.x provider, Oracle database 11g, and RequestFactory for our application. One of the areas of our application is slightly slow at read time and is noticeably slower at write time. The use case in particular is a fairly complex editor where the read part of the puzzle is used to render the complex UI and the write part of the puzzle is used to save end user edits made in this complex editor UI. In this particular use case, we use RequestFactory. In other areas of our application we have some GWT-RPC in use, but we are migrating away from its use in favor of using RequestFactory. In our RequestFactory use, we use the ServiceLocator pattern and our ServiceLocator's unconditionally return true from isLive(), for background information. We are not using the Editor framework in this area of the application. We have been working on this set of use cases some time and are quite comfortable with the Domain Model that we have in place, which to simplify looks like the following : class A | -- class B | -- class C | -- class D | -- class E | -- class E1 | -- class E2 | -- class E3 There are OneToMany relationships between the following classes : A - B, B - C, C- D, D- E, E - E1, E - E2, E - E3, with back pointing ManyToOne relationships throughout. Each of these classes are not transportable, in the RequestFactory sense, so we have an EntityProxy for each class. When an end user saves their edits, lots of db query traffic can be seen, which appears to be due to hydrating the entire graph of objects and stitching them together. I suspect that we could reduce the system response time of the save/write use case if all of this ServiceLocator find() infrastructure was subverted since once we read/find the A instance, it can be used to apply all edits without a find() call per node in the graph. Have any of you faced this type of problem and were you able to find an implementation alternative which proved faster by using maybe GWT-JSON or GWT-RPC or some other means? If you got here, thanks for reading and your replies in advance. Doug -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: IntegerBox and Editor framework question
You could also: - use another editor (possibly wrapping or delegating to an IntegerBox) that makes sure getValue is never 'null', or - make the parent editor a ValueAwareEditor and handle the field binding manually in the setValue() and flush() methods On Saturday, November 2, 2013 11:10:55 AM UTC+1, Nicolas Weeger wrote: Hello everyone. I'm using an IntegerBox in an Editor widget, with a POJO having an associated getter and setter for an int, and a SimpleBeanEditorDriver to bind the editor and the POJO. When I call the driver's flush() method, if the contents of the IntegerBox is not a valid integer (empty string for instance), a NPE will be raised when attempting to convert from the IntegerBox's Integer to the setter's int. The obvious workarounds I see are either to manually check the content before calling flush(), or changing my int property to Integer (but in this case I can't have my POJO be a JSON overlay type, something that is useful). Am I missing some obvious solution? Any hints appreciated :) Kind regards Nicolas -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: java.lang.NullPointerException Error when using rpc
Looks to me like this is saying your server-side code throws a NullPointerException, so you get it on the client-side. On Saturday, November 2, 2013 9:15:37 PM UTC+1, zhenli...@gmail.com wrote: I'm now currently extracting out data from my database using rpc but whenever I click the button it does generates a error and my onFailure command is being triggered always. Below is my Code for the program. public class PleaseWork implements EntryPoint {private TextBox textbox2 = new TextBox();private Label Hi = new Label(New label);@SuppressWarnings(deprecation)public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); Button btnNewButton = new Button(New button); btnNewButton.addClickListener(new ClickListener() { public void onClick(Widget event) { HelpConnectionAsync Abra =(HelpConnectionAsync) GWT.create(HelpConnection.class); ServiceDefTarget target = (ServiceDefTarget) Abra; String moduleRelativeURL = GWT.getModuleBaseURL() + MySQLConnection; target.setServiceEntryPoint(moduleRelativeURL); AsyncCallback callback = new AsyncCallback(){ public void onSuccess (Object result){ textbox2.setText((String)result); Hi.setText(You Pass!);} public void onFailure(Throwable caught) { caught.printStackTrace(); Hi.setText(You fail!);} }; Abra.sensors(callback); } }); rootPanel.add(btnNewButton, 23, 30); rootPanel.add(textbox2,23, 70); rootPanel.add(Hi, 23, 130);} And this is my Serverside code public class MySQLConnection extends RemoteServiceServlet implements HelpConnection { private Connection conn = null; private ResultSet rs = null; private PreparedStatement pstmt = null; public static Connection getConnection() throws Exception { String driver = com.mysql.jdbc.Driver; String url = jdbc:mysql://localhost:3306/temperature; String username = root; String password = 123456; Class.forName(driver); Connection conn = DriverManager.getConnection(url, username, password); return conn; } @Override public String[] sensors() throws Exception { String [] user = null; try { conn = getConnection(); rs = pstmt.executeQuery(SELECT ID, times FROM sensor ORDER BY id DESC LIMIT 1;); // extract data from the ResultSet while (rs.next()) { user = new String[] {rs.getString(1),rs.getString(2)}; } } catch(SQLException e) { e.printStackTrace(); } finally { try { rs.close(); pstmt.close(); conn.close(); } catch (SQLException e) { e.printStackTrace(); } } return user; } } While running the application it generates this error message on the console side which is telling me why onFailure Command is always being triggered but i do not understand about it. java.lang.NullPointerException at com.google.gwt.user.client.rpc.core.java.lang.NullPointerException_FieldSerializer.instantiate(NullPointerException_FieldSerializer.java:16) at com.google.gwt.user.client.rpc.core.java.lang.NullPointerException_FieldSerializer.create(NullPointerException_FieldSerializer.java:25) at com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate(SerializerBase.java:115) at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:396) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:216) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at
Re: Event.stopPropagation() not working for KeyDownEvent
I've succeeded by removing the KeyDownHandler and adding this in my login widget: Event.addNativePreviewHandler(new Event.NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent event) { Event nativeEvent = Event.as(event.getNativeEvent()); int c = nativeEvent.getKeyCode(); if (c==KeyCodes.KEY_ENTER) { event.consume(); login_btn.click(); } } }); The alert's onPreviewNativeEvent() is unchanged. On Sunday, November 3, 2013 5:15:02 PM UTC-5, Thad Humphries wrote: I have a user login form that I want submitted if the user presses ENTER in the password field or clicks the login button. So I add a KeyDownHandler: KeyDownHandler kdh = new KeyDownHandler() { @Override public void onKeyDown(KeyDownEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { event.stopPropagation(); login_btn.click(); } } }; password.addKeyDownHandler(kdh); The login button calls the presenter to doLogin(). Before sending the request to the server, the method checks that the fields are filled in. If not, an alert is popped up. I want this alert to hide on ENTER or ESC, so the alert has a method: @Override public void onPreviewNativeEvent(Event.NativePreviewEvent event) { Event nativeEvent = Event.as(event.getNativeEvent()); int c = nativeEvent.getKeyCode(); if (c==KeyCodes.KEY_ENTER || c==KeyCodes.KEY_ESCAPE) { hide(); } } Problem: The alert pops up and disappears all on a single ENTER. Why isn't Event.stopPropagation() stopping the ENTER key? Why should I even need to try since the alert is only created when the error is detected? How can I accomplish this (other than Window.alert())? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: [gwt-contrib] Selection Cell Option value vs Display Value
I realize it's 3 years later, but since nobody had made the issue: https://code.google.com/p/google-web-toolkit/issues/detail?id=8417 On Wednesday, October 13, 2010 1:02:20 PM UTC-4, John LaBanca wrote: Users will probably want to set the ordering of the values. Letting users define the type would be more useful. A while back I started working on a ListBoxCell, which is a custom drop box of options. It allows selection of typed values, and you can render custom options. Hopefully we'll get it into a future GWT version. Thanks, John LaBanca jlab...@google.com javascript: On Wed, Oct 13, 2010 at 12:22 PM, John Tamplin j...@google.comjavascript: wrote: On Wed, Oct 13, 2010 at 12:10 PM, John LaBanca jlab...@google.comjavascript: wrote: Sound reasonable. Can you open an issue to create a ValueSelectionCell that takes an arbitrary type T and a SafeHtmlRenderer to convert the type T to a String. A simpler option would be to accept MapString,String with the key the select value and the value what is displayed. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Re: GWT 2.6.0 will be still Ant based or already Gradle bases? (for OSGI-fy GWT)
On Thursday, October 31, 2013 9:16:57 AM UTC+1, Cristiano wrote: Hi All, I would like to know if the plan for 2.6.0 is to still use Ant or release it already from Gradle. Ant. I ask this because I would to check the feasibility of OSGIfy the GWT-Servlet jar. Having an OSGi compliant GWT-Servlet should make it easier to use GWT on OSGi containers (I suppose it is enough to OSGIfy GWT-Servlet as it is the only Jar I expect to to on the server side). There's requestfactory-client and requestfactory-server too. Some background information: OSGI-fization takes place by modify the META-INF/MANIFEST.MF file of the Jar and adding new headers that allow the jar to be used more friendly in an OSGi environment. This modification is mostly transparent, many much jar lbraries you are using are already OSGIfied or exist in an OSGIfied version (one example among all: the org.eclipse.jdt.core_3.8.3.v20130121-145325.jar that is in GWT-Tools is OSGIfied). Not the best example, as JDT's OSGi nature is an issue for us (need to extract a JAR that's embedded in the JAR; I think it's because of OSGi, but don't know OSGi that much) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [gwt-contrib] Re: GWT 2.6.0 will be still Ant based or already Gradle bases? (for OSGI-fy GWT)
Thank you Thomas, I'm not 100% sure the fact that JDT embed other the Jar due to OSGi, it could be but I've never used that feature. And it sound weird to me as then JDT should be used in an OSGi environment (yes Eclipse is based on OSGi, but I don't think GWT Ant build starts any OSGi environment) I mean, I remember it is possible to do embed jars, but OSGi does not mandate to do that, and in fact I use OSGi exactly for the opposite reason: to not have 20 MB .war files with all the libs embedded in it. In OSGi the manifest is used to declare dependencies, it works at the level of packages (instead of artifacts like Maven), you declare dependencies on packages and packages exported by it. It is a bit complex sometime but allow to have a good modularity for applications. What I would like to do, is to OSGI-fy GWT-Servlet (at first, and if it works the same could be applied to requestfactory) so it can be used inside an OSGi container. In that case, the GWT-Servlet could be deployed as a bundle providing the GWT classe, it will be available as a platform library, and web application will not need to embed it (I remember time ago I was putting libraries in Tomcat endorsed folder, consider it something like that but standardized). I will try to add the BND Ant Task on the GWT Build and if it work I will report it and we can evaluate if it is ok to use it also for the official release. Regards, Cristiano 2013/11/3 Thomas Broyer t.bro...@gmail.com On Thursday, October 31, 2013 9:16:57 AM UTC+1, Cristiano wrote: Hi All, I would like to know if the plan for 2.6.0 is to still use Ant or release it already from Gradle. Ant. I ask this because I would to check the feasibility of OSGIfy the GWT-Servlet jar. Having an OSGi compliant GWT-Servlet should make it easier to use GWT on OSGi containers (I suppose it is enough to OSGIfy GWT-Servlet as it is the only Jar I expect to to on the server side). There's requestfactory-client and requestfactory-server too. Some background information: OSGI-fization takes place by modify the META-INF/MANIFEST.MF file of the Jar and adding new headers that allow the jar to be used more friendly in an OSGi environment. This modification is mostly transparent, many much jar lbraries you are using are already OSGIfied or exist in an OSGIfied version (one example among all: the org.eclipse.jdt.core_3.8.3.v20130121-145325.jar that is in GWT-Tools is OSGIfied). Not the best example, as JDT's OSGi nature is an issue for us (need to extract a JAR that's embedded in the JAR; I think it's because of OSGi, but don't know OSGi that much) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.