Re: file upload set filter
Yes I am talking about in GWT fileupload component. On Jul 21, 9:58 am, aditya sanas 007aditya.b...@gmail.com wrote: how to embed form input type=file name=pic id=pic accept=image/gif, image/jpeg / /form into gwt file upload...? -- Aditya On Wed, Jul 21, 2010 at 2:00 AM, lineman78 linema...@gmail.com wrote: http://www.w3schools.com/TAGS/att_input_accept.asp On Jul 20, 2:01 pm, Paachu binu...@gmail.com wrote: Hi, I need to upload one csv file into my application. I am using FileUpload compontent to upload the File. But when I use FileUpload, the FileUploadDialog displayed All files.. I need to set it only for csv files . How can I set filter for that? thanks Paachu. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: DockLayoutPanel MVP and events
Hi Thomas Thanks for your reply, I have started to look into the ActivityManager and Place patterns, but have not found lots of documentation. Is there any examples? Is gwt-p going to be standard for 2.1 or will google release there own implementation? Thanks On 14 Juli, 17:07, Thomas Broyer t.bro...@gmail.com wrote: On 8 juil, 10:39, xworker blomqvist.andr...@gmail.com wrote: Hi Very new to GWT and MVP. Trying to expand the contacts example with a DockLayoutPanel with a tree navigation in the west section. Using MVP and ui:bindings. Got an DockLayoutPanelView and Presenter. Inside is a tree component to the west and a content component in center. How will I get the events from the tree component? The generally adopted way of doing things in GWT is to have custom events go through the event bus. In this case, you're talking about navigation, so maybe the concept of place would be better than just some custom event. I encourage you to look at gwt-platform, gwt- presenter and other MVP frameworks for GWT, and/or look at the Activity concept from the upcoming GWT 2.1. Using actvities, you'd have an ActivityManager managing your center. The tree would use the PlaceController.goTo to navigate to a new place. An ActivityMapper (that you passed to the ActivityManager in the constructor) would map the place to an Activity (a presenter), and the ActivityManager will manage the current Activity for the display it manages, i.e.it will stop() the current activity if its ok (willStop returns true) and then only start the new Activity, which will call the Display back to show its view. The tree would probably also listen to PlaceChangeEvent on the event bus to update the selected item depending on the current place (in case some other component calls the PlaceController.goTo) My DockViewPresenter: public class DockPresenter implements Presenter { public interface Display { Widget asWidget(); } private final ContactsServiceAsync rpcService; private final HandlerManager eventBus; private final Display display; private ContactsPresenter contactsPresenter; private TreePresenter treePresenter; public DockPresenter(ContactsServiceAsync rpcService, HandlerManager eventBus, Display view) { this.rpcService = rpcService; this.eventBus = eventBus; this.display = view; contactsPresenter = new ContactsPresenter(rpcService, eventBus, new ContactsView()); treePresenter = new TreePresenter(rpcService, eventBus, new MyTree()); } public void bind() { contactsPresenter.bind(); treePresenter.bind(); } public void go(final HasWidgets container) { bind(); container.clear(); container.add(display.asWidget()); } } As you can see I am creating the two presenters for the content and the tree, but I dont know how to get the events (clicks, selections) from them. They seem to be swallowed be the dock. I'm guessing I should register handlers in the bind() method, but how? When navigating to the tree component without the dock, events works fine. TreePresenter: public class TreePresenter implements Presenter { public interface Display { HasSelectionHandlersTreeItem getTree(); Widget asWidget(); } private final ContactsServiceAsync rpcService; private final HandlerManager eventBus; private final Display display; public TreePresenter(ContactsServiceAsync rpcService, HandlerManager eventBus, Display view) { this.rpcService = rpcService; this.eventBus = eventBus; this.display = view; } public void bind() { display.getTree().addSelectionHandler(new SelectionHandlerTreeItem() { public void onSelection(SelectionEventTreeItem event) { TreeItem item = (TreeItem) event.getSelectedItem(); GWT.log(Node selected +item.getText()); } }); } Thanks- Dölj citerad text - - Visa citerad text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
gwt-gadgets and maven
Hi, I'm trying to develop a simple gadget using gwt-gadgets, Eclipse and Maven. If i follow the procedure described in the gwt-gadgets Getting started page (http://code.google.com/p/gwt-google-apis/wiki/ GadgetsGettingStarted), my gadget is fully functional on iGoogle. Now I try to convert this project to be compatible with Maven (and use is depencies management, so useful in many case). The gadget compile successfully with the maven-gwt-plugin but when i add my gadget to iGoogle it seems that gadget.* scripting is not present, here follows the errors of the Chrome JavaScript console : Uncaught TypeError: Cannot call method 'getUrlParameters' of undefined Uncaught TypeError: Cannot call method 'runOnLoadHandlers' of undefined What I'm doing wrong ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Opening a file
I think this must be a server side issue should not be posted here. -- Aditya On Wed, Jul 21, 2010 at 11:08 AM, rajan kochhar rajan_kochhar2...@yahoo.com wrote: I am trying to read an excel file as follows: public class LMSServiceImpl extends RemoteServiceServlet implements LMSService{ public String getExcel(String path) { String r=null; try { File file = new File(D:/q.xls); FileInputStream is = new FileInputStream(file); Workbook workBook = Workbook.getWorkbook(is); Sheet sheet = workBook.getSheet(0); System.out.println(No of sheets=+workBook.getNumberOfSheets()); r=+sheet.getRows(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return r; } } I am getting an exception : java.security.AccessControlException: access denied (java.io.FilePermission D:\q.xls read) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:166) at java.lang.SecurityManager.checkRead(Unknown Source) at java.io.FileInputStream.init(Unknown Source) at com.cummins.lms.server.LMSServiceImpl.getExcel(LMSServiceImpl.java: 29) 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.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java: 100) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 562) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 188) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Can someone please help in
Re: trying to run bikeshed app and got error in Loading module 'com.google.gwt.core.XSLinker'
I'm having the same issue with the M2 version of GWT 2.1.0. Is this a known issue? On Jun 16, 12:34 am, Otto von...@gmail.com wrote: Hi, I was playing around with GWT and learning it and found the bikeshed source code. I got it to compile but when I try to run it I get errors. As you can see it seems the root of my problem is in module XSLinker: [TRACE] Loading inherited module 'com.google.gwt.user.User' - [TRACE] Loading inherited module 'com.google.gwt.core.Core' - [TRACE] Loading inherited module 'com.google.gwt.core.XSLinker' - [ERROR] Line 22: Unexpected element 'when-linker-added' Can anyone help me with this? In case it's helpful, here is my full classpath and startup command (I am using IntelliJ 9.0 with GWT plugin). C:\Program Files\Java\jdk1.6.0_18\bin\java -Xmx256m -Didea.launcher.port=7532 -Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 95.214\bin -Dfile.encoding=windows-1252 -classpath C:\tools\gwt-2.0.3\gwt-dev.jar; C:\code\gwt\bikeshed\src; C:\Program Files\Java\jdk1.6.0_18\jre\lib\alt-rt.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\charsets.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\deploy.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\javaws.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\jce.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\jsse.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\management-agent.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\plugin.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\resources.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\rt.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\dnsns.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\localedata.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\sunjce_provider.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\sunmscapi.jar; C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\sunpkcs11.jar; C:\code\gwt\bikeshed\out\production\Bikeshed; C:\code\gwt\bikeshed\war\temp-libs\validation-api-1.0.0.GA- sources.jar; C:\code\gwt\bikeshed\war\temp-libs \com.springsource.org.apache.log4j-1.2.15.jar; C:\code\gwt\bikeshed\war\temp-libs\slf4j-api-1.5.11.jar; C:\code\gwt\bikeshed\war\temp-libs\validation-api-1.0.0.GA.jar; C:\code\gwt\bikeshed\war\temp-libs\hibernate-validator-4.0.2.GA.jar; C:\code\gwt\bikeshed\war\temp-libs\slf4j-log4j12-1.5.11.jar; C:\code\gwt\bikeshed\war\temp-libs\appengine-tools-api.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib; C:\code\gwt\bikeshed\war\WEB-INF\lib\gwt-dev.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\gwt-servlet.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\gwt-user.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\appengine-api-1.0-sdk-1.3.1.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\appengine-jsr107cache-1.3.1.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\appengine-api-labs-1.3.1.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\geronimo-jpa_3.0_spec-1.1.1.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\jdo2-api-2.3-eb.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\geronimo-jta_1.1_spec-1.1.1.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\jsr107cache-1.1.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\datanucleus-core-1.1.5.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\datanucleus- appengine-1.0.5.final.jar; C:\code\gwt\bikeshed\war\WEB-INF\lib\datanucleus-jpa-1.1.5.jar; C:\tools\gwt-2.0.3\gwt-user.jar; C:\Program Files\JetBrains\IntelliJ IDEA 95.214\lib\idea_rt.jar com.intellij.rt.execution.application.AppMain com.google.gwt.dev.DevMode -war C:\Documents and Settings\wachtero\.IntelliJIdea90\system\gwt \bikeshed.bikeshed4543e1b7\Bikeshed.a8b6db14\run\www -gen C:\Documents and Settings\wachtero\.IntelliJIdea90\system\gwt \bikeshed.bikeshed4543e1b7\Bikeshed.a8b6db14\run\gen -startupUrl Expenses.html com.google.gwt.sample.expenses.gwt.Expenses Thank you! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: VerticalPanel inside ScrollPanel inside StackPanel - no scrollbars?
Not sure abt the ScrollPanel but, I have also found out ( the hard way) VerticalPanel ( table based ) does not work well with layout panels (div based) .. Try using a DockLayoutPanel - with all widgets added to the north - instead... may be worth a try. - Prashant On 21-07-2010 10:58, Magnus wrote: Hi Prashant, I have done everything you said, with some losings, but also without success (scrollbars): - I changed the StackPanel into a StackLayoutPanel - then, the CSS padding (10px) has no effect anymore (the stack is aligned directly at the left edge, without space, but ok) - I added overflow:auto to the inner CSS container, which is a VerticalPanel - but there is no scrollbar... Why doesn't ScrollPanel work here? Magnus On Jul 21, 5:32 am, Prashant Hegdeprashant.he...@gmail.com wrote: The way I would go about doing this is as follows, see if this works for you or gives any hints: 0. Make sure you are in STANDARDS mode. 1. Use StackLayoutPanel and add it to your parent LayoutPanel ( mixing StackPanel with a DockLayoutPanel gives unpredictable results - so some one has said I have found out the hard way ) 2. Set the width and height to 100% 3. For the container widget ( FlowPanel / HTMLPanel ) you add to the StackLayoutPanel, put a CSS overflow: auto. This indicates that if whatever the container contains grows beyond the container then a scroll bar is shown. If you have a container within a container, and overflow setting should be on the right container - just above the element whose overflow you want to control. Firebug usually helps me figure out this. Review the container hierarchy using Firebug to make sure that there are no intermediate containers which makes your setting ineffective. Hope this helps. On 21-07-2010 05:34, Magnus wrote: Hi, I want to show the contents of a log file inside a StackPanel. The log file itself is a class LogPanel based on a VerticalPanel. Because the log file grows, I added an intermediate ScrollPanel (see code below). The problem: The ScrollPanel never shows scrollbars. Instead, it grows as the LogPanel grows, beyond the size of the containing StackPanel. I would like the ScrollPanel to occupy all available space within the StackPanel and to show scrollbars, when the inner LogPanel gets bigger. The demo of the StackPanel class in the GWT showcase application assumes that there is enough room for the contents. Can you help? Thanks! Magnus - public class MyStackPanel extends StackPanel { public MyStackPanel () { super (); setSize(100%,100%); // we are in the west edge of a DockLayoutPanel } public void add (LogPanel log) { ScrollPanel p = new ScrollPanel (); p.add(log); add (p,Log); p.setSize (100%,100%); } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
User Management without Google-Accounts
Hi everyone, I want to have a User-Management without forcing the users off my application to have Google-Accounts or something like this. The plan is, that the users should register on my site, and the applcation shall do the management like: - What is the user abc allowed to do and so pn. Users have own data in the datastore. Other users shouldn´t be allowed to access this data. To make this possible I want to store something like a User_ID in every dataset, to make shure, that the data are not shuffeled. I have questions, on how to realize this: - How can I get the userID (stored in datastore in the class Users) on the server, without having the id as parameter?? I don´t want something like this: String myService(String userID, Object data), remember, that I want to have my own dataobjects for the user management - Is it possible to realize this via cookies oder httpsessions? - Does the Google Api provides some functionality for an own user- management? Thanks for your replys. Greets Alex -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: create hyperlink using GWT
On 21 juil, 03:55, Lu chenglu.annal...@gmail.com wrote: Hi, After getting a bunch of urls from the sever side, I want to dispay them in the format of hyperlinks on the client side. In this case, I didn't use history at all so I choose to use 'new HTML()'. tableLeft.setWidget(index, 0, new HTML(a href='www.google.com'text/ a)); Can't you use tableLeft.setHTML instead? If I do like this, the address of url will become 'http:// 127.0.0.1:/www.google.com'rather than the one i want. How can I fix that? Fix your HTML! If you mean http://www.google.com, why do you give www.google.com? Try it in any web page, with or without GWT. It's HTML 101. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: DockLayoutPanel MVP and events
On 21 juil, 10:15, xworker blomqvist.andr...@gmail.com wrote: Hi Thomas Thanks for your reply, I have started to look into the ActivityManager and Place patterns, but have not found lots of documentation. Is there any examples? You could look at the Scaffold app in bikeshed (in the SVN repo), but it's a bit convoluted as it's code generated by Spring Roo. The basic idea is: - create activities, which will generally be your presenters; and in the start() method, make sure you call the Display back with the view (which should implement IsWidget); you generally do this in the onSuccess of a GWT-RPC or RequestFactory call. - create places, which can really by whatever you like (you'll be the one responsible for instantiating them), you can make singletons, or parameterized places (arguments in the constructor, and property accessors). - create an ActivityMapper to map places to activities (i.e. for a given screen region) - create an ActivityManager with the mapper created above and the event bus - setup the activitymanager's display with a display that knows where to show the activities' widgets (the screen region, removing the previous widget before adding the new one) - call goTo on a PlaceController (created with the very same eventbus as the activitymanager) to go from place to place Repeat the ActivityMapper/ActivityManager/Display steps for each screen region of your app. Keep in mind that a Place is global (where am I?) whereas an activity is the response to this place in a specific screen region. Is gwt-p going to be standard for 2.1 or will google release there own implementation? There's no relation between GWTP and GWT (other than GWTP relying on GWT). Activities and Places *are* Google's own implementation. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: VerticalPanel inside ScrollPanel inside StackPanel - no scrollbars?
Hi, I've got it working now. The actual hierarchie is: DockLayoutPanel - StackLayoutPanel - ScrollPanel - VerticalPanel. However, what is this all about with these multiple classes for one and the same thing: DockPanel - DockLayoutPanel StackPanel - StackLayoutPanel ... What's the difference, e. g. between StackPanel and StackLayoutPanel, and when should I use which? Thanks Magnus On Jul 21, 12:13 pm, Prashant Hegde prashant.he...@gmail.com wrote: Not sure abt the ScrollPanel but, I have also found out ( the hard way) VerticalPanel ( table based ) does not work well with layout panels (div based) .. Try using a DockLayoutPanel - with all widgets added to the north - instead... may be worth a try. - Prashant On 21-07-2010 10:58, Magnus wrote: Hi Prashant, I have done everything you said, with some losings, but also without success (scrollbars): - I changed the StackPanel into a StackLayoutPanel - then, the CSS padding (10px) has no effect anymore (the stack is aligned directly at the left edge, without space, but ok) - I added overflow:auto to the inner CSS container, which is a VerticalPanel - but there is no scrollbar... Why doesn't ScrollPanel work here? Magnus On Jul 21, 5:32 am, Prashant Hegdeprashant.he...@gmail.com wrote: The way I would go about doing this is as follows, see if this works for you or gives any hints: 0. Make sure you are in STANDARDS mode. 1. Use StackLayoutPanel and add it to your parent LayoutPanel ( mixing StackPanel with a DockLayoutPanel gives unpredictable results - so some one has said I have found out the hard way ) 2. Set the width and height to 100% 3. For the container widget ( FlowPanel / HTMLPanel ) you add to the StackLayoutPanel, put a CSS overflow: auto. This indicates that if whatever the container contains grows beyond the container then a scroll bar is shown. If you have a container within a container, and overflow setting should be on the right container - just above the element whose overflow you want to control. Firebug usually helps me figure out this. Review the container hierarchy using Firebug to make sure that there are no intermediate containers which makes your setting ineffective. Hope this helps. On 21-07-2010 05:34, Magnus wrote: Hi, I want to show the contents of a log file inside a StackPanel. The log file itself is a class LogPanel based on a VerticalPanel. Because the log file grows, I added an intermediate ScrollPanel (see code below). The problem: The ScrollPanel never shows scrollbars. Instead, it grows as the LogPanel grows, beyond the size of the containing StackPanel. I would like the ScrollPanel to occupy all available space within the StackPanel and to show scrollbars, when the inner LogPanel gets bigger. The demo of the StackPanel class in the GWT showcase application assumes that there is enough room for the contents. Can you help? Thanks! Magnus - public class MyStackPanel extends StackPanel { public MyStackPanel () { super (); setSize(100%,100%); // we are in the west edge of a DockLayoutPanel } public void add (LogPanel log) { ScrollPanel p = new ScrollPanel (); p.add(log); add (p,Log); p.setSize (100%,100%); } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: VerticalPanel inside ScrollPanel inside StackPanel - no scrollbars?
Hi You may be interested in reading http://code.google.com/intl/fr/webtoolkit/doc/latest/DevGuideUiPanels.html Olivier On 21 juil, 13:35, Magnus alpineblas...@googlemail.com wrote: Hi, I've got it working now. The actual hierarchie is: DockLayoutPanel - StackLayoutPanel - ScrollPanel - VerticalPanel. However, what is this all about with these multiple classes for one and the same thing: DockPanel - DockLayoutPanel StackPanel - StackLayoutPanel ... What's the difference, e. g. between StackPanel and StackLayoutPanel, and when should I use which? Thanks Magnus On Jul 21, 12:13 pm, Prashant Hegde prashant.he...@gmail.com wrote: Not sure abt the ScrollPanel but, I have also found out ( the hard way) VerticalPanel ( table based ) does not work well with layout panels (div based) .. Try using a DockLayoutPanel - with all widgets added to the north - instead... may be worth a try. - Prashant On 21-07-2010 10:58, Magnus wrote: Hi Prashant, I have done everything you said, with some losings, but also without success (scrollbars): - I changed the StackPanel into a StackLayoutPanel - then, the CSS padding (10px) has no effect anymore (the stack is aligned directly at the left edge, without space, but ok) - I added overflow:auto to the inner CSS container, which is a VerticalPanel - but there is no scrollbar... Why doesn't ScrollPanel work here? Magnus On Jul 21, 5:32 am, Prashant Hegdeprashant.he...@gmail.com wrote: The way I would go about doing this is as follows, see if this works for you or gives any hints: 0. Make sure you are in STANDARDS mode. 1. Use StackLayoutPanel and add it to your parent LayoutPanel ( mixing StackPanel with a DockLayoutPanel gives unpredictable results - so some one has said I have found out the hard way ) 2. Set the width and height to 100% 3. For the container widget ( FlowPanel / HTMLPanel ) you add to the StackLayoutPanel, put a CSS overflow: auto. This indicates that if whatever the container contains grows beyond the container then a scroll bar is shown. If you have a container within a container, and overflow setting should be on the right container - just above the element whose overflow you want to control. Firebug usually helps me figure out this. Review the container hierarchy using Firebug to make sure that there are no intermediate containers which makes your setting ineffective. Hope this helps. On 21-07-2010 05:34, Magnus wrote: Hi, I want to show the contents of a log file inside a StackPanel. The log file itself is a class LogPanel based on a VerticalPanel. Because the log file grows, I added an intermediate ScrollPanel (see code below). The problem: The ScrollPanel never shows scrollbars. Instead, it grows as the LogPanel grows, beyond the size of the containing StackPanel. I would like the ScrollPanel to occupy all available space within the StackPanel and to show scrollbars, when the inner LogPanel gets bigger. The demo of the StackPanel class in the GWT showcase application assumes that there is enough room for the contents. Can you help? Thanks! Magnus - public class MyStackPanel extends StackPanel { public MyStackPanel () { super (); setSize(100%,100%); // we are in the west edge of a DockLayoutPanel } public void add (LogPanel log) { ScrollPanel p = new ScrollPanel (); p.add(log); add (p,Log); p.setSize (100%,100%); } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: $_POST is empty when request made using RequestBuilder
Hello Again, For a second I thought the I managed to solve the SOP by following and applying Google's tutorial found in http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html But I realized that I was doing a GET request and not a POST request :/ So I guess I am back to square 1. I read somewhere on the net that JNSI works only for GET request... Is this correct? Is there a way to make a POST request to a PHP page (port 80) without violating the SOP? a link to an example or manual would be really great. Thanks again for the help and tips. Musab On Jul 20, 3:35 pm, malrawi musab.alr...@gmail.com wrote: Thanks Rob, The problem was because I wasn't encoding the URL, Now when I think about it, it is kind of strange because the logs show that a request was sent but the only problem was with the $_POST, You would expect not being able to send the request if you don't encode the url and not send a request with no parameters. What was interesting too, the fact that getStatusCode() returned 0. I checked the group and it seems that it has something to do with SOP (correct me please if I am wrong). Would having the GWT application in the same folder as the PHP project solve this issue? Please, are there any other work arounds to the SOP issue? Thanks again Musab On Jul 19, 5:09 pm, RPB robbol...@gmail.com wrote: Apologies if this is a double-post, the thread didn't seem to update the first time. I don't see anything in particular that is wrong with your code, but the following works for me if you want to give it a try: public void postPHPRequest(String url, String postData){ url = URL.encode(url); RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); try { builder.setHeader(Content-Type, application/x-www-form- urlencoded); @SuppressWarnings(unused) Requestreq = builder.sendRequest(postData, new RequestCallback() { public void onError(Requestrequest, Throwable exception) { fireErrorEvent(Failed to send therequest: + exception.getMessage()); } public void onResponseReceived(Requestrequest, Response response) { String output = response.getText(); } }); } catch (RequestException e) { fireErrorEvent(Failed to send therequest: + e.getMessage()); } } You can look at 'output' which should display any echos you have in your PHP. Hopefully this will help you debug out what is happening. If this doesn't work check that you are not violating the SOP (same origin policy). There are other threads on this forum with more info on this. Good luck, Rob On Jul 18, 1:44 pm, malrawi musab.alr...@gmail.com wrote: Hi, I am really new to GWT, I tried searching the net for hours to get an answer to my problem with no luck. Here is what I am doing: I am creating a simple EntryPoint which shows some text fields, when the user clicks on a button I want to send aPOSTrequestto a php page. The PHP page says that myrequestparameters are not set. Right before I send therequestI display therequestdata and they look right. As the code shows, I am setting the content type, I am appending the parameters properly, I don't know what is wrong. I didn't want to use FormPanel because it seemed like I wouldn't be able to send arequestasynchronously (correct me if I am wrong, my conclusion was based on Javadoc's examples also some examples on the net) Here is the code: RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); builder.setHeader(Content-type, application/x-www-form- urlencoded); StringBuffer requestData = new StringBuffer(); // parameters is a HashMap if (parameters != null ){ requestData.append(?); SetString keys = parameters.keySet(); for (String key : keys ){ requestData.append(URL.encode(key)); requestData.append(=); requestData.append(URL.encode(parameters.get(key))); requestData.append(); } } try { Window.alert(requestData.toString()); builder.sendRequest(requestData.toString(), handler);} catch ( Exception e){ Window.alert(e.getMessage()); } Please help. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Starting with GWT
Hi there! I'm starting a project and the candidate architecture will be GWT 2.0.4 + Spring 3.0 + SpringGWTRPC + Hibernate 3.3 + Gilead. So far, the GWT project have been created and I'm integrating it with spring. My first thought was to separate in two maven modules nested in a main project: parent - web - services (spring services, daos, model) My only concern with this lies on the gilead and the domain objects. From what I've seen so far, you need to inform gwt about you domain classes in order to it be able to serialize it right? Considering they'll be on a different jar, how can I do this? Create a separate gwt module? Regards -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Starting with GWT
well the way i did it and i am sure that this is not the optimal way. Since they dont want to use maven in here i had to create the package *.share.* on svn and share it by the gwt module and any other module/project that needs to use those classes. so when i ran eclipse and import it, it looks like a linked package. regards, Rudolf Michael On Wed, Jul 21, 2010 at 3:28 PM, Vinicius Carvalho viniciusccarva...@gmail.com wrote: Hi there! I'm starting a project and the candidate architecture will be GWT 2.0.4 + Spring 3.0 + SpringGWTRPC + Hibernate 3.3 + Gilead. So far, the GWT project have been created and I'm integrating it with spring. My first thought was to separate in two maven modules nested in a main project: parent - web - services (spring services, daos, model) My only concern with this lies on the gilead and the domain objects. From what I've seen so far, you need to inform gwt about you domain classes in order to it be able to serialize it right? Considering they'll be on a different jar, how can I do this? Create a separate gwt module? Regards -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
XSL Transformation, AccessControlException, NoClassDefFoundError and SyntheticRepository
Hi, I would like to use an xsl transformation inside an HttpServlet. The code is essentially the following: File xslfile = new File(test.xsl); TransformerFactory factory = TransformerFactory.newInstance(); factory.setAttribute( debug, true ); Transformer transformer = factory.newTransformer(new StreamSource( xslfile ) ); I already made sure that the xsl file is valid and I defined it as resource-file inside appengine-web.xml If I now call the servlet the first time, the following error occurs: java.lang.ExceptionInInitializerError at com.sun.org.apache.bcel.internal.classfile.JavaClass.init(JavaClass.java: 109) at com.sun.org.apache.bcel.internal.classfile.JavaClass.init(JavaClass.java: 228) at com.sun.org.apache.bcel.internal.generic.ClassGen.getJavaClass(ClassGen.java: 174) at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.translate(Stylesheet.java: 735) at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java: 354) at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java: 429) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java: 795) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java: 617) at com.axag.invoiceedit.server.MY SERVLET.doGet(MY SERVLET:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: java.security.AccessControlException: access denied (java.io.FilePermission PATH TO MY PROJECT'S SRC DIRECTORY read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java: 323) at java.security.AccessController.checkPermission(AccessController.java: 546) at java.lang.SecurityManager.checkPermission(SecurityManager.java: 532) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:166) at java.lang.SecurityManager.checkRead(SecurityManager.java:871) at java.io.File.exists(File.java:731) at com.sun.org.apache.bcel.internal.util.ClassPath.getPathComponents(ClassPath.java: 143) at com.sun.org.apache.bcel.internal.util.ClassPath.getClassPath(ClassPath.java: 169) at com.sun.org.apache.bcel.internal.util.SyntheticRepository.clinit(SyntheticRepository.java: 86) ... 36 more FEHLER: 'null' SCHWER WIEGENDER FEHLER: 'Die Formatvorlage konnte nicht kompiliert werden.' javax.xml.transform.TransformerConfigurationException: Die Formatvorlage konnte
Re: UTF-8 Encoding Problem
On 20 juil, 09:37, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: Welcome all , now i face a problem with UTF-8 Encoding Problem how to support it in GWT project GWT expects all your source files to be UTF8-encoded (Java source and *.properties used for I18N). GWT produces UTF8-encoded files. You'll generally have your HTML host page UTF8-encoded as well (with the appropriate Content-Type HTTP response header, or a meta charset=UTF-8 in the HTML's head) http://code.google.com/webtoolkit/doc/latest/FAQ_Troubleshooting.html#International_characters_don't_display_correctly -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Dynamica menu integration with GWT
Hi, I am working with the GWT SDK 2.0.4, and SDK App engine 1.3.1. Facing the problem to integrate the dynamic menu integration with the GWT. In my jsp file the menu is display based on the login credentials. So for each user menu is differ. I got GWT Menu to my jsp page but 1) It display same menu for all user.2) the date related to the user after login is not shown by clicking the menuitem. It’s because of the Object related to the login credentials is not integrated with GWT to Jsp page. At the GWT project my code is as bellow. Command cmdTest = new Command() { // at the time of clicking menuitem public void execute() { PropertiesManager.getInstance(DEBUG).isActive(MenuItem); //Window.open(WebApp/request/select_type.jsp,_self,); } }; Window.open is working and give me the requested page but the login related parameters is not fetched with it. I want to check it at the time on selecting menuitem PropertiesManager.getInstance(USER).isActive(MenuItem); PropertiesManager class is on my jsp application. Now after including jar for the PropertiesManager at the time of gwt compile Project it gives me error like. Compiling module com.web.component.Menu Validating newly compiled units [ERROR] Errors in 'file:/D:/gwtworkspace/Menu/src/com/web/ component/client/Menu.java' [ERROR] Line 32: No source code is available for type com.web.test.property.PropertiesManager; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'com.web.component.client.Menu' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly I inherited the module in the Menu.gwt.xml inherits name='com.web.test.property.PropertiesManager'/ Still the same message is displayed. I want My application object to the gwt project. Siraj Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: DockLayoutPanel inside custom DecoratorPanel
On 20 juil, 14:00, Jean-luc Chasseriau jean...@kernub.net wrote: Hi all, I'm getting the same behavior, only the north part of the DockLayoutPanel is displayed. Need to set DockLayoutPanel's height in pixel to make it work. Running gwt 2.1.0 M2, here is the structure: Menu extends Composite Menu() { panel = new FlowPanel(); panel.add( new HTML( menu ) ); initWidget( panel ); } Application extends Composite Application() { indexPanel = new DockLayoutPanel( PX ); indexPanel.addNorth( new HTML(north blah), 50 ); indexPanel.addWest( new HTML(west blah), 50 ); indexPanel.addEast( new HTML(east blah), 50 ); indexPanel.add( new Menu() ); appDecorator = new DecoratorPanel(); appDecorator.setWidget( indexPanel ); appDecorator.setStylePrimaryName( custom_decorator ); initWidget( appDecorator ); } RootLayoutPanel.get().add( new Application() ); Few tests: 1) this code, not more: the custom_decorator is displayed, without center, with north overwriting in the borders. 2) adding: appDecorator.setSize( 100%, 100% ); the decorator is properly rendered, and the center is 100%,100%, but, only north is displayed from the DockLayoutPanel 3) adding: indexPanel.setSize( 100%, 100% ); AND appDecorator.setSize( 100%, 100% ); = same as (2) 4) adding: indexPanel.setHeight( 100%); AND appDecorator.setSize( 100%, 100% ); = same as (2) 5) adding: indexPanel.setSize( 300px, 300px ); AND appDecorator.setSize( 100%, 100% ); finally! DockLayoutPanel is rendered! Conclusion: Need to fix the height in PIXEL to get it work properly. GWT team? http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideUiPanels.html#Recipes Search for Using a LayoutPanel without RootLayoutPanel, then look for RequiresResize and ProvidesResize, which says: The purpose of these two interfaces is to form an unbroken hierarchy between all widgets that implement RequiresResize and the RootLayoutPanel, which listens for any changes (such as the browser window resizing) that could affect the size of widgets in the hierarchy. = keywords: unbroken hierarchy In your case, maybe you could just implement RequiresResize on your Application composite to delegate to indexPanel.onResize(), and give both your widgets a size of 100%. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
RE: file upload set filter
Just keep all files and try the file name with extension CSV (eg. Xyz.csv) Thanks Regards == Mohammed Rahman System Admin KOJ - Head Quarters Tel: 00971 (04) 3355232 Ext: 1339 Fax: 00971 (04) 3355231 Mob : 00971 (50) 9774048 Email : mrah...@kojamjoom.com : i...@kojamjoom.com United Arab Emirates == From: google-web-toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of aditya sanas Sent: Wednesday, July 21, 2010 8:59 AM To: google-web-toolkit@googlegroups.com Subject: Re: file upload set filter how to embed form input type=file name=pic id=pic accept=image/gif, image/jpeg / /form into gwt file upload...? -- Aditya On Wed, Jul 21, 2010 at 2:00 AM, lineman78 linema...@gmail.com wrote: http://www.w3schools.com/TAGS/att_input_accept.asp On Jul 20, 2:01 pm, Paachu binu...@gmail.com wrote: Hi, I need to upload one csv file into my application. I am using FileUpload compontent to upload the File. But when I use FileUpload, the FileUploadDialog displayed All files.. I need to set it only for csv files . How can I set filter for that? thanks Paachu. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com mailto:google-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Gwt program is not working in IE8
Hi, I am using eclipse 3.4.2 with gwt 2.0 , when i run gwt program using firefox and chrome it is working fine but when i try to run same program in IE8 (internet explorer) it is not showing any result , only small module it work not with complex module . I have also added emulateIE7 in head of jsp with is given below html head meta http-equiv=X-UA-Compatible content=IE=EmulateIE7 / /html also added replace-with in module gwt.xml file like module rename-to='Payment' !-- Inherit the core Web Toolkit stuff.-- inherits name=com.google.gwt.core.Core/ inherits name=com.google.gwt.dom.DOM/ inherits name=com.google.gwt.user.UserAgent/ replace-with class=com.google.gwt.user.client.impl.DOMImplOpera when-type-is class=com.google.gwt.user.client.impl.DOMImpl/ when-property-is name=user.agent value=opera/ /replace-with replace-with class=com.google.gwt.user.client.impl.DOMImplSafari when-type-is class=com.google.gwt.user.client.impl.DOMImpl/ when-property-is name=user.agent value=safari/ /replace-with replace-with class=com.google.gwt.user.client.impl.DOMImplIE8 when-type-is class=com.google.gwt.user.client.impl.DOMImpl/ when-property-is name=user.agent value=ie8/ /replace-with replace-with class=com.google.gwt.user.client.impl.DOMImplIE6 when-type-is class=com.google.gwt.user.client.impl.DOMImpl/ when-property-is name=user.agent value=ie6/ /replace-with replace-with class=com.google.gwt.user.client.impl.DOMImplMozilla when-type-is class=com.google.gwt.user.client.impl.DOMImpl/ when-property-is name=user.agent value=gecko1_8/ /replace-with replace-with class=com.google.gwt.user.client.impl.DOMImplMozillaOld when-type-is class=com.google.gwt.user.client.impl.DOMImpl/ when-property-is name=user.agent value=gecko/ /replace-with ... . /module When i try to change IE8 setting using developer tools like browser mode :IE8 or IE8 compatible view,and Document mode :IE8 standard, it is working but when i try to change to different mode it is not working can any one help me over this. thanks in advance . -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: AJAX of type GET ( and not POST)?
btw: here a sample XMLHttpRequest r = XMLHttpRequest.create(); r.setOnReadyStateChange(new ReadyStateChangeHandler() { @Override public void onReadyStateChange(XMLHttpRequest xhr) { Window.alert(GET got done); } }); r.open(GET, http://www.google.com;); r.send(); On 20 Jul., 18:51, mk munna.kaka.ch...@gmail.com wrote: Is there a way to make AJAX async call of type GET ( instead of POST). (RequestBuilder is ok but still is there a easier way) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: getting date/time on client?
hello you can send you number to me now i can call you as soon as i can goodbye On Tue, Jul 20, 2010 at 9:07 PM, Magnus alpineblas...@googlemail.comwrote: Hi, works thanks! Magnus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Java Type Mapping or Compiler Extension
hello folks, I wanted to use already existings beans transparently on the client. The issue is, that they have BigInteger members, which cannot be translated to JS. Now, I did not want to write adapters or TOs but rather patch the GWT compiler to know how to translate such classes. In my case I want the BigInteger to become an String on the client, how to accomplish this? BTW: i am only interested in translation concerns, in case there are some unsupported ops on that type, like new BigInteger(5).add(new BigInteger(5)); the compiler should endup with an error. - is there an option to the GWT module descriptor to give a hint for translation of particular types? - or are there extension points in the code of gwt compiler and, maybe, a little documentation on it so I can patch the sources? thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Can you use GWT with the spring framework (spring mvc)?
Can you use GWT with the spring framework (spring mvc)? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Did anybody try Cross site communication?
Hello GWT Users, I just wanted to check if anybody had success with Cross domain communication. I followed Google documentation: http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html handl...@com.google.gwt.sample.stockwatcher.client.stockwatcher::handleJsonResponse(Lcom/ google/gwt/core/client/JavaScriptObject;)(jsonObj); handleJsonResponse is not getting called. Any thoughts? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
IncompatibleRemoteServiceException caused by different RPC Protocol Versions (server: 5, client 6)
Hi folks, i just upgraded one of my projects from 2.0.4 to 2.1.0.M2. The whole reason was to use the new Data Presentation Widgets, which indeed are very cool and working. On the other hand I went into problems on my RPC calls. It seems like the protocol for this has changed: from version 5 up to 6. While debugging I got deeper into the GWT code and so found the corresponding lines. As you can see in the stack trace below, the exception text tells me to reload the browser, but this does'nt help. May anyone know why the server (on jetty) is still using version 5? Or is there another way to force the server/client to use a specific version? I would be very glad if anybody can tell. [WARN] dispatchService: An IncompatibleRemoteServiceException was thrown while processing this call. com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This application is out of date, please click the refresh button on your browser. ( Expecting version 5 from client, got 6. ) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader.java: 432) at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:236) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 186) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:488) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: $_POST is empty when request made using RequestBuilder
Got this from old thread : http://development.lombardi.com/?p=611 I hope it helps. -VM On Wed, Jul 21, 2010 at 7:55 AM, malrawi musab.alr...@gmail.com wrote: Hello Again, For a second I thought the I managed to solve the SOP by following and applying Google's tutorial found in http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html But I realized that I was doing a GET request and not a POST request :/ So I guess I am back to square 1. I read somewhere on the net that JNSI works only for GET request... Is this correct? Is there a way to make a POST request to a PHP page (port 80) without violating the SOP? a link to an example or manual would be really great. Thanks again for the help and tips. Musab On Jul 20, 3:35 pm, malrawi musab.alr...@gmail.com wrote: Thanks Rob, The problem was because I wasn't encoding the URL, Now when I think about it, it is kind of strange because the logs show that a request was sent but the only problem was with the $_POST, You would expect not being able to send the request if you don't encode the url and not send a request with no parameters. What was interesting too, the fact that getStatusCode() returned 0. I checked the group and it seems that it has something to do with SOP (correct me please if I am wrong). Would having the GWT application in the same folder as the PHP project solve this issue? Please, are there any other work arounds to the SOP issue? Thanks again Musab On Jul 19, 5:09 pm, RPB robbol...@gmail.com wrote: Apologies if this is a double-post, the thread didn't seem to update the first time. I don't see anything in particular that is wrong with your code, but the following works for me if you want to give it a try: public void postPHPRequest(String url, String postData){ url = URL.encode(url); RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); try { builder.setHeader(Content-Type, application/x-www-form- urlencoded); @SuppressWarnings(unused) Requestreq = builder.sendRequest(postData, new RequestCallback() { public void onError(Requestrequest, Throwable exception) { fireErrorEvent(Failed to send therequest: + exception.getMessage()); } public void onResponseReceived(Requestrequest, Response response) { String output = response.getText(); } }); } catch (RequestException e) { fireErrorEvent(Failed to send therequest: + e.getMessage()); } } You can look at 'output' which should display any echos you have in your PHP. Hopefully this will help you debug out what is happening. If this doesn't work check that you are not violating the SOP (same origin policy). There are other threads on this forum with more info on this. Good luck, Rob On Jul 18, 1:44 pm, malrawi musab.alr...@gmail.com wrote: Hi, I am really new to GWT, I tried searching the net for hours to get an answer to my problem with no luck. Here is what I am doing: I am creating a simple EntryPoint which shows some text fields, when the user clicks on a button I want to send aPOSTrequestto a php page. The PHP page says that myrequestparameters are not set. Right before I send therequestI display therequestdata and they look right. As the code shows, I am setting the content type, I am appending the parameters properly, I don't know what is wrong. I didn't want to use FormPanel because it seemed like I wouldn't be able to send arequestasynchronously (correct me if I am wrong, my conclusion was based on Javadoc's examples also some examples on the net) Here is the code: RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); builder.setHeader(Content-type, application/x-www-form- urlencoded); StringBuffer requestData = new StringBuffer(); // parameters is a HashMap if (parameters != null ){ requestData.append(?); SetString keys = parameters.keySet(); for (String key : keys ){ requestData.append(URL.encode(key)); requestData.append(=); requestData.append(URL.encode(parameters.get(key))); requestData.append(); } } try { Window.alert(requestData.toString()); builder.sendRequest(requestData.toString(), handler);} catch ( Exception e){ Window.alert(e.getMessage()); } Please help. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to
Spring Security UI Conditional Rendering
I am running GWT2.0.4 and Spring Security 3.03. I am able to authenticate with Spring Security but have not found a good way to conditionally render Widgets and Panels based on ROLES from Spring Security. For example: In the StockWatcher program, if a user has a ROLE_ADMIN then I want to allow that person to add a addPanel. But If the user has a role such as ROLE_GUEST who is not a ROLE_ADMIN, that user should not see the panel I would like to do something like: public void onModuleLoad() { . // Assemble Main panel. mainPanel.add(stocksFlexTable); if(SpringSecurityRole == ROLE_ADMIN){ mainPanel.add(addPanel); } mainPanel.add(lastUpdatedLabel); .. } I know UI conditional rendering can be easily accomplished using jsp and the Spring Security tags (as shown below). But we don't want to use jsp sec:authorize access=hasRole('ROLE_ADMIN') input type=submit value=Add / /sec:authorize I have searched gwt forums , google groups and other GWT book forum and Spring book forums and have not found a good solution. I've tried the acris security http://code.google.com/p/acris/wiki/Introduction but the roles don't seem to come from Spring Security but rather its own implementation. It uses Spring Security for server side security not UI conditional rendering. UI conditional rendering ROLES come from its own filter sk.seges.acris.security.server.SessionRemoteServiceFilter and user define Grants interface. I've also tried gwt-incubator lib http://code.google.com/p/gwt-incubator-lib/ but that seems to only cover authentication and no conditional rendering. I've seen some news feed about calling back to Spring Security but didn't know how to accomplish the actual calls. DoCheckUserAuth checkAuth = new DoCheckUserAuth(); boolean b = checkAuth.askServerAboutUser(); if(b){ RootPanel.get(formPoint).set(new PrivateForm);} else { RootPanel.get(messagePoint).set(new Label(Please, pass authorization)); Your help is much appreciated -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Send String from GWT TO PHP
hi, please see documentnation on RequestBuilder class, there is a good sample On 20 Jul., 20:20, bhargava bhargav...@gmail.com wrote: Hi all, I need to send a string from my gwt platform on glassfish to a website running(using php) on apache server. I know that i need to use JSONP . Is there any tutorial which can provide me a good idea on how to use json in gwt to send a string variable to another server? Thank you -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: create hyperlink using GWT
you have to provide full qualified url, so in your case it should be: tableLeft.setWidget(index, 0, new HTML(a href='http:// www.google.com'text/a)); br, On 21 Jul., 12:42, Thomas Broyer t.bro...@gmail.com wrote: On 21 juil, 03:55, Lu chenglu.annal...@gmail.com wrote: Hi, After getting a bunch of urls from the sever side, I want to dispay them in the format of hyperlinks on the client side. In this case, I didn't use history at all so I choose to use 'new HTML()'. tableLeft.setWidget(index, 0, new HTML(a href='www.google.com'text/ a)); Can't you use tableLeft.setHTML instead? If I do like this, the address of url will become 'http:// 127.0.0.1:/www.google.com'ratherthan the one i want. How can I fix that? Fix your HTML! If you meanhttp://www.google.com, why do you givewww.google.com?Try it in any web page, with or without GWT. It's HTML 101. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
HTML5 DnD mouse events - Drop not fired, but others are
Hey All, I've been trying to implement support for HTML5 drag 'n' drop events in GWT 2.0.3. Thus far i've managed to override the default DOMImpl with a custom class that supports the events: i've overridden : public native int eventGetTypeInt(String eventType) to include... // other events case drop: return 0x10; case dragenter: return 0x20; case dragexit: return 0x40; case dragover: return 0x80; and: protected native void sinkEventsImpl(Element elem, int bits) { // other sinkers if (chMask 0x10) elem.ondrop = (bits 0x10) ? @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent : null; if (chMask 0x20) elem.ondragenter = (bits 0x20) ? @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent : null; if (chMask 0x40) elem.ondragexit = (bits 0x40) ? @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent : null; if (chMask 0x80) elem.ondragover = (bits 0x80) ? @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent : null; As well as making Events and their associated handlers for these events. My problem is that in the browser (FF 3.6), dravover, dragexit, dragenter work (the events are triggered at least), but **drop** does not. Has anybody had any luck achieving this, or care to share an existing implementation? Is there anything you notice immediately that i'm doing wrong? Harry -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[CHROME] DialogBox seems to interfere with scrolling a ScrollPanel when mouse is over a widget...
Hello guys, This is ONLY RELEVANT TO GOOGLE CHROME. I've been googling for this for a while now, so excuse me if it is a known issue, but I could not find the answer. I have this code inside an entry point class. Panel createScrollableStuff() { VerticalPanel vp = new VerticalPanel(); for(int i = 0; i != 100; ++i) { HorizontalPanel hp = new HorizontalPanel(); hp.add(new Label(Hello)); hp.add(new Button(Click me)); vp.add(hp); } ScrollPanel sp = new ScrollPanel(vp); sp.setHeight(30em); sp.setWidth(30em); return sp; } public void onModuleLoad() { RootPanel.get(rootPanel).add(createScrollableStuff()); DialogBox db = new DialogBox(true, true); db.setGlassEnabled(true); db.add(createScrollableStuff()); db.center(); } It creates a list of widgets inside a scrolling list, both in a dialog box, and directly on the page itself. Now, if I hover my mouse over a button and scroll, the list will scroll on the page, but NOT in the dialog box... what's going on? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
External library on GWT server side.
Hi all, I faced with following problem. I want to you use cryptix library on the server side of my app. I creared classfile : [code] package com.rfo.cabinet.server; import java.util.Random; import cryptix.provider.md.MD5; public class TestHash { ... public static String encrypt() {..} } [/code] Then I'm using it in RPSImpl: [code] public class GreetingServiceImpl extends RemoteServiceServlet implements GreetingService { ... String sid = this.getThreadLocalRequest().getSession().getId(); String encryptedSid = TestHash.encrypt(sid); Cookie cookie = new Cookie(Sid,encryptedSid); this.getThreadLocalResponse().addCookie(cookie); ... } [/cpde] Progect is pompiling well but when I call this service, I'm getting next exception: [code] 21.07.2010 11:21:42 com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [127971130224] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.rfo.cabinet.client.GreetingService.sendLogin(java.lang.String,java.lang.String) throws java.lang.IllegalArgumentException' threw an unexpected exception: java.lang.NoClassDefFoundError: cryptix/provider/md/MD5 at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 378) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 581) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 188) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: java.lang.NoClassDefFoundError: cryptix/provider/md/MD5 at com.rfo.cabinet.server.TestHash.encryptToBytes(TestHash.java:71) at com.rfo.cabinet.server.TestHash.encrypt(TestHash.java:82) at com.rfo.cabinet.server.GreetingServiceImpl.sendLogin(GreetingServiceImpl.java: 34) 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.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java: 100) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 562)
Re: AJAX of type GET ( and not POST)?
yeah, use the com.google.gwt.xhr.client.XMLHttpRequest class br On 20 Jul., 18:51, mk munna.kaka.ch...@gmail.com wrote: Is there a way to make AJAX async call of type GET ( instead of POST). (RequestBuilder is ok but still is there a easier way) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: $_POST is empty when request made using RequestBuilder
hi! so if you really need to go for HTTP POST rather than get, then do so, remove the '?' from post body, these would be required for CGI doing GET but not in this case. you dont need to go for JSNI!! SOP cannot be workarounded on the client solely. You have to write simple gateway service which you call from the client (via RequestBuilder or XMLHttpRequest) and the data is posted via socket from the backend to the destination server. also refer to this howto: http://code.google.com/intl/de-DE/webtoolkit/doc/latest/FAQ_Server.html#How_can_I_dynamically_fetch_JSON_feeds_from_other_web_domains greets, On 21 Jul., 13:55, malrawi musab.alr...@gmail.com wrote: Hello Again, For a second I thought the I managed to solve the SOP by following and applying Google's tutorial found inhttp://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html But I realized that I was doing a GET request and not a POST request :/ So I guess I am back to square 1. I read somewhere on the net that JNSI works only for GET request... Is this correct? Is there a way to make a POST request to a PHP page (port 80) without violating the SOP? a link to an example or manual would be really great. Thanks again for the help and tips. Musab On Jul 20, 3:35 pm, malrawi musab.alr...@gmail.com wrote: Thanks Rob, The problem was because I wasn't encoding the URL, Now when I think about it, it is kind of strange because the logs show that a request was sent but the only problem was with the $_POST, You would expect not being able to send the request if you don't encode the url and not send a request with no parameters. What was interesting too, the fact that getStatusCode() returned 0. I checked the group and it seems that it has something to do with SOP (correct me please if I am wrong). Would having the GWT application in the same folder as the PHP project solve this issue? Please, are there any other work arounds to the SOP issue? Thanks again Musab On Jul 19, 5:09 pm, RPB robbol...@gmail.com wrote: Apologies if this is a double-post, the thread didn't seem to update the first time. I don't see anything in particular that is wrong with your code, but the following works for me if you want to give it a try: public void postPHPRequest(String url, String postData){ url = URL.encode(url); RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); try { builder.setHeader(Content-Type, application/x-www-form- urlencoded); @SuppressWarnings(unused) Requestreq = builder.sendRequest(postData, new RequestCallback() { public void onError(Requestrequest, Throwable exception) { fireErrorEvent(Failed to send therequest: + exception.getMessage()); } public void onResponseReceived(Requestrequest, Response response) { String output = response.getText(); } }); } catch (RequestException e) { fireErrorEvent(Failed to send therequest: + e.getMessage()); } } You can look at 'output' which should display any echos you have in your PHP. Hopefully this will help you debug out what is happening. If this doesn't work check that you are not violating the SOP (same origin policy). There are other threads on this forum with more info on this. Good luck, Rob On Jul 18, 1:44 pm, malrawi musab.alr...@gmail.com wrote: Hi, I am really new to GWT, I tried searching the net for hours to get an answer to my problem with no luck. Here is what I am doing: I am creating a simple EntryPoint which shows some text fields, when the user clicks on a button I want to send aPOSTrequestto a php page. The PHP page says that myrequestparameters are not set. Right before I send therequestI display therequestdata and they look right. As the code shows, I am setting the content type, I am appending the parameters properly, I don't know what is wrong. I didn't want to use FormPanel because it seemed like I wouldn't be able to send arequestasynchronously (correct me if I am wrong, my conclusion was based on Javadoc's examples also some examples on the net) Here is the code: RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); builder.setHeader(Content-type, application/x-www-form- urlencoded); StringBuffer requestData = new StringBuffer(); // parameters is a HashMap if (parameters != null ){ requestData.append(?); SetString keys = parameters.keySet(); for (String key : keys ){ requestData.append(URL.encode(key)); requestData.append(=);
Re: $_POST is empty when request made using RequestBuilder
btw: you can of course abuse HTML resource reference tags allowing SOP ( like SCRIPT, IMG, IFRAME ) but they all do only support HTTP GET. If your service you gonna talk with requires HTTP POST, there is no other way you can also patch your DNS but this is for sure not the way you look for... best, On 21 Jul., 13:55, malrawi musab.alr...@gmail.com wrote: Hello Again, For a second I thought the I managed to solve the SOP by following and applying Google's tutorial found inhttp://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html But I realized that I was doing a GET request and not a POST request :/ So I guess I am back to square 1. I read somewhere on the net that JNSI works only for GET request... Is this correct? Is there a way to make a POST request to a PHP page (port 80) without violating the SOP? a link to an example or manual would be really great. Thanks again for the help and tips. Musab On Jul 20, 3:35 pm, malrawi musab.alr...@gmail.com wrote: Thanks Rob, The problem was because I wasn't encoding the URL, Now when I think about it, it is kind of strange because the logs show that a request was sent but the only problem was with the $_POST, You would expect not being able to send the request if you don't encode the url and not send a request with no parameters. What was interesting too, the fact that getStatusCode() returned 0. I checked the group and it seems that it has something to do with SOP (correct me please if I am wrong). Would having the GWT application in the same folder as the PHP project solve this issue? Please, are there any other work arounds to the SOP issue? Thanks again Musab On Jul 19, 5:09 pm, RPB robbol...@gmail.com wrote: Apologies if this is a double-post, the thread didn't seem to update the first time. I don't see anything in particular that is wrong with your code, but the following works for me if you want to give it a try: public void postPHPRequest(String url, String postData){ url = URL.encode(url); RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); try { builder.setHeader(Content-Type, application/x-www-form- urlencoded); @SuppressWarnings(unused) Requestreq = builder.sendRequest(postData, new RequestCallback() { public void onError(Requestrequest, Throwable exception) { fireErrorEvent(Failed to send therequest: + exception.getMessage()); } public void onResponseReceived(Requestrequest, Response response) { String output = response.getText(); } }); } catch (RequestException e) { fireErrorEvent(Failed to send therequest: + e.getMessage()); } } You can look at 'output' which should display any echos you have in your PHP. Hopefully this will help you debug out what is happening. If this doesn't work check that you are not violating the SOP (same origin policy). There are other threads on this forum with more info on this. Good luck, Rob On Jul 18, 1:44 pm, malrawi musab.alr...@gmail.com wrote: Hi, I am really new to GWT, I tried searching the net for hours to get an answer to my problem with no luck. Here is what I am doing: I am creating a simple EntryPoint which shows some text fields, when the user clicks on a button I want to send aPOSTrequestto a php page. The PHP page says that myrequestparameters are not set. Right before I send therequestI display therequestdata and they look right. As the code shows, I am setting the content type, I am appending the parameters properly, I don't know what is wrong. I didn't want to use FormPanel because it seemed like I wouldn't be able to send arequestasynchronously (correct me if I am wrong, my conclusion was based on Javadoc's examples also some examples on the net) Here is the code: RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); builder.setHeader(Content-type, application/x-www-form- urlencoded); StringBuffer requestData = new StringBuffer(); // parameters is a HashMap if (parameters != null ){ requestData.append(?); SetString keys = parameters.keySet(); for (String key : keys ){ requestData.append(URL.encode(key)); requestData.append(=); requestData.append(URL.encode(parameters.get(key))); requestData.append(); } } try { Window.alert(requestData.toString()); builder.sendRequest(requestData.toString(), handler);} catch ( Exception e){ Window.alert(e.getMessage()); }
Re: support F5 to load current page
On 20 juil, 11:30, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: Welcome all , i face a problem with pressing F5 button to load current page i use history manager to make next back in my project now after pressing the f5 button it return to the first page in my projects how to fix this problem In your onModuleLoad, are you using the current History.getToken() (or History.fireCurrentHistoryState()) ? If not, then that's probably the problem. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Remove event handlers or not?
On 20 juil, 01:32, jay jay.gin...@gmail.com wrote: Ah, so that's good for handlers of *DOM* events [e.g., using addDomHandler()]. For logical events [those added via addHandler()], however, it seems like you may still need to manually remove listeners. Is that correct? As long as the handler don't have a reference on the widget (or whichever object you attached the handler), no. If the widget is garbage collected, its internal HandlerManger will also be, and your handler too (unless you have another reference to it). Exception: if you keep a reference to the HandlerRegistration, you're also responsible for calling remove() (but why would you keep a HandlerRegistration around otherwise?) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: remove old javascript file
Hi, the bootstrap code should never be cached. Assume you are deploying a new version. The bootstrap code refers the browser/locale specific JS using an own strong name. If you cache the bootstrap file, it may happen that old bootstrap code refers to old strong named file which are no more existing. Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 23:13, bhomass bhom...@gmail.com wrote: I found a number of conflicting comments concerning this. And, even if they are in sync, I have questions on how to set cache control. 1. you stated - *Never Cache* - The bootstrap module- name.nocache.js, and your host html/jsp page falls under this category. The browser should never cache. but the first reference above says (2) Changing occasionally (public / equal for all users) Examples: index.html, mymodule.nocache.js which sounds like you should cache for short time. I am unsure how I would set the cache control for the module.nocache.js. The js file is cotained in the app.hmtl. do I set meta http-equiv=Cache-Control content=no-store in the header of that page? should I use no-store or no-cache? 2. you stated - *Cache for sometime* - Every other file falls under this category. In general, you should use ClientBundle so that files don't end in this category. GWT generated js/html files will never come under this category. You can choose to set an expires header ranging from a few hours to a few days, depending on how frequently you change your code. I can be sure whether you are saying to use client bundle so that nothing ever get cached for sometime. if so, why do you also specify set an expires header ranging from a few hours to a few days? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Java Type Mapping or Compiler Extension
ok, got it - using the super-source/ tag in the gwt descriptor does do the trick On 21 Jul., 12:14, cokol eplisc...@googlemail.com wrote: hello folks, I wanted to use already existings beans transparently on the client. The issue is, that they have BigInteger members, which cannot be translated to JS. Now, I did not want to write adapters or TOs but rather patch the GWT compiler to know how to translate such classes. In my case I want the BigInteger to become an String on the client, how to accomplish this? BTW: i am only interested in translation concerns, in case there are some unsupported ops on that type, like new BigInteger(5).add(new BigInteger(5)); the compiler should endup with an error. - is there an option to the GWT module descriptor to give a hint for translation of particular types? - or are there extension points in the code of gwt compiler and, maybe, a little documentation on it so I can patch the sources? thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Remove event handlers or not?
On 20 juil, 01:23, Blagoja Chavkoski baze...@gmail.com wrote: Hi, I have some small question related to events..but other way around: How can we fire a native(browser) event in gwt 2.xx ?! On 1.6 there was a method.Document.fireXXXEvent but not in the newer relies. DomEvent.fireNativeEvent would call the appropriate handlers on the given HasHandlers; or Element.dispatchEvent to really dispatch the event at the DOM level (with bubbling et al.). There's some ongoing work to have EventTarget implement the same methods as the same-name interface from DOM3EVENTS, i.e. hold the dispatchEvent method; so it might be a little different again in GWT 2.1 (though I doubt the current interface will go away, maybe just be deprecated) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: AJAX of type GET ( and not POST)?
Hi, what do you expect from using GET instead of POST? Basically POST could definitely transfer many bytes, GET may have a limit. (In the past they talked about 2K limit for an url, which may no more apply) It is more effort necessary to do a CSRF/XSRF with POST, so I consider POST somewhat more secure. (However, I consider most recent GWT-RPC to be save against CSRF/XSRF) Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 18:51, mk munna.kaka.ch...@gmail.com wrote: Is there a way to make AJAX async call of type GET ( instead of POST). (RequestBuilder is ok but still is there a easier way) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: th vs td elements (assistive technology)
On 20 juil, 21:19, Thad thad.humphr...@gmail.com wrote: My application uses FlexTables mostly to present database records of one sort or another: Query a table on the server, get back a list of records, and select a row to edit a record or to open a file indexed to that record via a document management system. The tables are not fixed; they are whatever the user finds when he logs into a particular server. If you don't have cells spanning multiple rows or columns, I'd go with a Grid rather than a FlexTable (performs much better). But what you're asking is even better served by the new CellTable coming in GWT 2.1, which will also use a thead for column headers and tfoot for column footers. In the mean time, have a look at the different tables in the GWT-Incubator project; I don't know how they display headers and footers (thead? th? td?) but at least they perform even better than Grid or FlexTable, and can give you sortable columns, scrollable tables with fixed columns headers and footers, paging of data, etc. (I haven't used them, so don't ask me how they really work, I'm currently prototyping against 2.1m2, thus using CellTable) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT response is allowing only boolean value in IE
Hi Raj, this is probably a problem with GWT-Ext. I never experienced such a problem on pure GWT Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 16:57, rajendra dasari rajendra.a...@gmail.com wrote: Hi Stefan Bachert, You are correct, I am using both GWT and GWT-Ext, but i don't know why it is working in FireFox fine, and in IE it is going to infinite loop(i.e. it is not at all send back to the response to client side), --- Raj, INDIA. On Tue, Jul 20, 2010 at 7:44 PM, Stefan Bachert stefanbach...@yahoo.dewrote: Hi Raj, this does not look like GWT. Do you use GXT (GWT-Ext)? Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 07:24, raj rajendra.a...@gmail.com wrote: Hi All, I am new to GWT, when i am passing GWT response from server as String value, it is going to infinite state in IE. But in Mozilla String response is getting well with html tag pSuccess/p . Here is the code what i am doing is At client request: save.addListener(new ButtonListenerAdapter() { @Override public void onClick(com.gwtext.client.widgets.Button button, EventObject e) { String strLoadMsg = Saving...; strURL = strSericeURL + method=saveCameraSession; formPanelList.getForm().submit(strURL, null, Connection.POST,strLoadMsg, true); formPanelList.getForm().addListener(new FormListener() { @Override public void onActionFailed(Form form, int httpStatus, String responseText) { } @Override public void onActionComplete(Form form, int httpStatus, String responseText) { Window.alert(responseText); //here is the response Success should come } @Override public boolean doBeforeAction(Form form) { // TODO Auto-generated method stub return true; } }); } }); At server response: String resp = Success; response.getWriter().print(resp); After completion of request, the response is going to infinite loop in IE. If you found any solution please share it. Thanks in Advance, Raj. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: iframe JS code linker
On 20 juil, 17:06, opichals opich...@gmail.com wrote: Hi! Commonly JS frameworks' .js files are simply added to the .html file as script tags. GWT linker by default creates an iframe that contains all the JS code script tags inside kept separate from the rest of the application page markup. I have been searching for the reason that led to having that separate iframe for the generated JavaScript application code and found no answer for on the web. I can imagine it is useful for modularization reasons... basically to simplify the application linker and HTML generation process. I fail to see any other reason for this. Is it just the linker reason or is there some other e.g. performance benefit or something that would be further motivation to have the JS code in a separate iframe? There are two reasons IIRC: - iframe gives you a sandbox for free, so you don't mess with other scripts in the web page *and* they don't mess with your script (note that the XS linker uses the module pattern, so it shouldn't a problem either, except maybe when you also use runAsync) - some browsers (particularly those coming from Redmond) won't cache gzipped *.js files coming from SSL/TLS, but will cache *.html (this is from memory, it might be unrelated to gzipping or to SSL/TLS, but it's at least one of those) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sync AJAX ( instead of async)
It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Share user input data within MVP + Lady_Gaga
On 21 juil, 01:54, PhilBeaudoin philippe.beaud...@gmail.com wrote: Another approach that wasn't mentioned but that I use quite frequently is to use the history and pass the information as parameters in the history token. This is made really easy in frameworks like gwt- presenter and gwt-platform and has a number of advantages provided the parameter is serializable (and small enough). For example, it could let the user bookmark the detail page of Lady_Gaga. A bit trickier when the presenter is a dialog box, but totally doable. This has the drawback that you cannot cancel navigation (because in this case it's about navigation, not any custom event), e.g. for cases where you changed some values in a form but didn't save them. But this is easily solved by frameworks with the concept of places, that generally have 2 events: place change requested (cancellable) and place change (in case the first wasn't cancelled). It just moves the problem though, it doesn't really solve it (what if you didn't serialize 'enough' information into the place?) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Event Handler Registrations
On 20 juil, 22:57, Nathan Wells nwwe...@gmail.com wrote: What is the purpose of registering event handlers? I originally thought it was to avoid memory leaks, but that doesn't seem to be true, given that the whole point of the handler API was to avoid accidental memory leaks, making so that developers didn't have to worry about it. Is it just to allow the code that is registering the handler to later de-register it? Originally, removeHandler wasn't public, so HandlerRegistration was the only way to remove a previously added handler. People have asked that removeHandler be made public (and not @Deprecated), and they apparently had compelling-enough arguments. HandlerRegistration can still be used in cases where you need event- and handler-agnostic (and even target-agnostic) ways of unregistering events. I think gwt-presenter (or some other MVP framework) uses this to automatically unregister all added handlers without the need to code anything. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Upload Maximum Size file giving Memory Out of rage error
Hi Raj, I think this will not work in general. On 32 Bit-System Java is limit to somewhat betwenn 1.5-2GByte memory. Uploading GByte Files may excete this limit. I suspect an upload may need twice twice the memory in java. I would consider a different mechanism when uploading such big files (java-applet, flash, WebDAV..) Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 15:40, rajendra dasari rajendra.a...@gmail.com wrote: Hi , Thanks for giving suggetion, this is not related to GWT, but i am facing when i set upload maximum file size to(1024MB - 2GB), but it is giving same error, i am using the what ever you sent URL only i used. --- Raj On Tue, Jul 20, 2010 at 6:27 PM, Arthur Kalmenson arthur.k...@gmail.comwrote: As Rudolf said, this has nothing to do with GWT. Perhaps you should look at apache commons upload Streaming API: http://commons.apache.org/fileupload/streaming.html -- Arthur Kalmenson On Tue, Jul 20, 2010 at 3:04 AM, raj rajendra.a...@gmail.com wrote: Hi All, I am uploading more than 500MB file it is giving this exception [ERROR] Error for /com.winfoware.voxforce.Index/services java.lang.OutOfMemoryError: Java heap space at org.apache.commons.fileupload.disk.DiskFileItem.get(DiskFileItem.java: 329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:488) [ERROR] Out of memory; to increase the amount of memory, use the - Xmx flag at startup (java -Xmx128M ...) [ERROR] 500 - POST /com.mycomp.xxx.Index/services?method=fileupload (127.0.0.1) 3302 bytes Request headers Host: 127.0.0.1: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.1.10) Gecko/20100504 Firefox/3.5.10 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: JSESSIONID=1c875d6p9xi9v Referer: http://127.0.0.1:/Index.html?gwt.codesvr=127.0.0.1:9997 Content-Type: multipart/form-data; boundary=---6410314616234 Content-Length: 730633459 Response headers Content-Type: text/html; charset=iso-8859-1 Content-Length: 3302 Even I am setting Java heap memory size to 1028MB in eclipse for my testing in development mode i am not able to upload a file. i was saw some forums setting java heap size java -Xms5m -Xmx1028m MyApp can you please give me suggetions how to resolve this problem using eclipse and tomcat. Thanks in advance , Raj, INDIA -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit
Re: Opening a file
The server application has no way of magically accessing client files. Depending on how the web server is configured, it might not be allowed to access files on the server itself. After all, the operators of a web server might be hosting web applications from many different sources. Those operators don't want these applications to interfere with each other or the operations of the server itself. How is your server configured? I assume the file name D:/q.xls is a placeholder for something else; otherwise, you could include it in your WAR file. If the real file comes from your client, use an upload control and an upload handler. Eric -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Upload Maximum Size file giving Memory Out of rage error
Hi Stefan Bachert, Thanks for giving suggestion, i will try on this issue as you told for increasing memory. --- Raj. On Wed, Jul 21, 2010 at 7:54 PM, Stefan Bachert stefanbach...@yahoo.dewrote: Hi Raj, I think this will not work in general. On 32 Bit-System Java is limit to somewhat betwenn 1.5-2GByte memory. Uploading GByte Files may excete this limit. I suspect an upload may need twice twice the memory in java. I would consider a different mechanism when uploading such big files (java-applet, flash, WebDAV..) Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 15:40, rajendra dasari rajendra.a...@gmail.com wrote: Hi , Thanks for giving suggetion, this is not related to GWT, but i am facing when i set upload maximum file size to(1024MB - 2GB), but it is giving same error, i am using the what ever you sent URL only i used. --- Raj On Tue, Jul 20, 2010 at 6:27 PM, Arthur Kalmenson arthur.k...@gmail.comwrote: As Rudolf said, this has nothing to do with GWT. Perhaps you should look at apache commons upload Streaming API: http://commons.apache.org/fileupload/streaming.html -- Arthur Kalmenson On Tue, Jul 20, 2010 at 3:04 AM, raj rajendra.a...@gmail.com wrote: Hi All, I am uploading more than 500MB file it is giving this exception [ERROR] Error for /com.winfoware.voxforce.Index/services java.lang.OutOfMemoryError: Java heap space at org.apache.commons.fileupload.disk.DiskFileItem.get(DiskFileItem.java: 329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:488) [ERROR] Out of memory; to increase the amount of memory, use the - Xmx flag at startup (java -Xmx128M ...) [ERROR] 500 - POST /com.mycomp.xxx.Index/services?method=fileupload (127.0.0.1) 3302 bytes Request headers Host: 127.0.0.1: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.1.10) Gecko/20100504 Firefox/3.5.10 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: JSESSIONID=1c875d6p9xi9v Referer: http://127.0.0.1:/Index.html?gwt.codesvr=127.0.0.1:9997 Content-Type: multipart/form-data; boundary=---6410314616234 Content-Length: 730633459 Response headers Content-Type: text/html; charset=iso-8859-1 Content-Length: 3302 Even I am setting Java heap memory size to 1028MB in eclipse for my testing in development mode i am not able to upload a file. i was saw some forums setting java heap size java -Xms5m -Xmx1028m MyApp can you please give me suggetions how to resolve this problem using eclipse and tomcat. Thanks in advance , Raj, INDIA -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com . To
Re: Can you use GWT with the spring framework (spring mvc)?
Check out the the GWT + Spring Roo integration demo shown at Google IO. It was pretty slick. Roo is basic Spring MVC. On Jul 20, 10:19 pm, Gitted sahmed1...@gmail.com wrote: Can you use GWT with the spring framework (spring mvc)? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT and maven
hi, I am trying to run a GWT project by calling the main in DevMode. This works fine. However, I want to use the maven plugin for gwt. The output of web-inf and war structure differs. The files are not located where DevMode.main would normally look for them. The files are not located, and it wont run. Can you help me please -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT response is allowing only boolean value in IE
Hi Stefan Bachert, ok, thanks for responding. -- Raj. On Wed, Jul 21, 2010 at 7:41 PM, Stefan Bachert stefanbach...@yahoo.dewrote: Hi Raj, this is probably a problem with GWT-Ext. I never experienced such a problem on pure GWT Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 16:57, rajendra dasari rajendra.a...@gmail.com wrote: Hi Stefan Bachert, You are correct, I am using both GWT and GWT-Ext, but i don't know why it is working in FireFox fine, and in IE it is going to infinite loop(i.e. it is not at all send back to the response to client side), --- Raj, INDIA. On Tue, Jul 20, 2010 at 7:44 PM, Stefan Bachert stefanbach...@yahoo.dewrote: Hi Raj, this does not look like GWT. Do you use GXT (GWT-Ext)? Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 07:24, raj rajendra.a...@gmail.com wrote: Hi All, I am new to GWT, when i am passing GWT response from server as String value, it is going to infinite state in IE. But in Mozilla String response is getting well with html tag pSuccess/p . Here is the code what i am doing is At client request: save.addListener(new ButtonListenerAdapter() { @Override public void onClick(com.gwtext.client.widgets.Button button, EventObject e) { String strLoadMsg = Saving...; strURL = strSericeURL + method=saveCameraSession; formPanelList.getForm().submit(strURL, null, Connection.POST,strLoadMsg, true); formPanelList.getForm().addListener(new FormListener() { @Override public void onActionFailed(Form form, int httpStatus, String responseText) { } @Override public void onActionComplete(Form form, int httpStatus, String responseText) { Window.alert(responseText); //here is the response Success should come } @Override public boolean doBeforeAction(Form form) { // TODO Auto-generated method stub return true; } }); } }); At server response: String resp = Success; response.getWriter().print(resp); After completion of request, the response is going to infinite loop in IE. If you found any solution please share it. Thanks in Advance, Raj. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Needing help, building a Login
Hi @ all, I want to build a Suer-Management System, where Users can Login und persist personal Data. I found this article below, as a little how-to-guide. http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ What I want, is to save a session id on the client, recieved from the server when logging in. Then for future RPC´s I want to automatically send the session-Id whit it, to identify the users. In the tutorial they say, send the session-Id within the payload of future RPC. My question is, how can I do this? How can I modify the payload, to send the session-Id with the RPC? The following question will be, how can I read this Id from the payload on the server? It would be nice if someone can help me. Greets Alex -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Window close listener is not working
Hi All, I am facing problem on Close listener in GWT-Ext Window . com.gwtext.client.widgets.event.WindowListener, it is having all override methods for Window. When onclose of Window it is calling onClose () method and onbeforeClose() methods. the problem is i am not able to close that window, but it is calling those two methods, the code I am using is: window.addListener(new WindowListener() { @Override public boolean doBeforeClose(Panel panel) { // TODO Auto-generated method stub jsTerminateVideoWindow(fVideoId); panel.clear(); return true; } @Override public void onClose(Panel panel) { // TODO Auto-generated method stub window.hide(); window.clear(); panel.destroy(); jsTerminateVideoWindow(fVideoId); panel.clear(); } - more methods we have to override Any body knows this issue please provide me a solution. Thanks in advance, Raj. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: gwt-gadgets and maven
Unfortunately, the latest gwt-gadgets release hasn't been pushed to Maven. We're working on it. On Wed, Jul 21, 2010 at 5:29 AM, yoann.per...@gmail.com yoann.per...@gmail.com wrote: Hi, I'm trying to develop a simple gadget using gwt-gadgets, Eclipse and Maven. If i follow the procedure described in the gwt-gadgets Getting started page (http://code.google.com/p/gwt-google-apis/wiki/ GadgetsGettingStarted), my gadget is fully functional on iGoogle. Now I try to convert this project to be compatible with Maven (and use is depencies management, so useful in many case). The gadget compile successfully with the maven-gwt-plugin but when i add my gadget to iGoogle it seems that gadget.* scripting is not present, here follows the errors of the Chrome JavaScript console : Uncaught TypeError: Cannot call method 'getUrlParameters' of undefined Uncaught TypeError: Cannot call method 'runOnLoadHandlers' of undefined What I'm doing wrong ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Eric Z. Ayers Google Web Toolkit, Atlanta, GA USA -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
JNDI datasources in GWT 2.1.0 M2 hosted mode
Has anyone successfully got JNDI datasources up and running under Milestone 2? The class packages changed from mortbay to eclipse as I understand it. My jetty-env.xml file (DOES NOT WORK): Configure class=org.eclipse.jetty.webapp.WebAppContext New id=MySQLMSA class=org.eclipse.jetty.plus.jndi.Resource Arg/Arg Argjdbc/MyDataSource/Arg Arg New class=org.apache.commons.dbcp.BasicDataSource Set name=driverClassNamecom.mysql.jdbc.Driver/Set Set name=urljdbc_url/Set Set name=usernamedb_user/Set Set name=passworddb_pass/Set /New /Arg /New /Configure Under Milestone 1, this jetty-web.xml works: Configure class=org.mortbay.jetty.webapp.WebAppContext New id=DS class=org.mortbay.jetty.plus.naming.Resource Argjava:comp/env/jdbc/MySQLMSA/Arg Arg New class=org.apache.commons.dbcp.BasicDataSource Set name=driverClassNamecom.mysql.jdbc.Driver/ Set Set name=urljdbc_url/Set Set name=usernamedb_user/Set Set name=passworddb_pass/Set /New /Arg /New /Configure -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sync AJAX ( instead of async)
There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijević Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Spring Security UI Conditional Rendering
Conditional rendering (i.e. hiding certain UI) would have to be done manual or using something like Acris or Errai Workspace: http://www.jboss.org/errai/Components/Workspaces.html. At the end of the day, unless you're adding additional generator conditions to strip non-admin parts based on authority, there's not much you can do to prevent the user from opening firebug or web inspector and looking at all your hidden elements. Spring Security (AFAIK) strips out the conditionally rendered pieces because it sends back the entire page (web 1.0 style). So your options are as follows: 1) pull out the permissions from Spring Security, store it client side and do conditional rendering yourself by hiding ui pieces. 2) use a framework like Acris or Errai workspace. 3) build out some custom UIBinder parsers and some generators to physically remove the conditionally rendered parts, then modify the selector script to pull the appropriate generated files based on authentication. The last option is going to be a huge amount of work and really doesn't give you additional benefit. The user can be as malicious as they want on the client side (unhide admin functionality) as long as you never trust anything that comes from the client side. -- Arthur Kalmenson On Tue, Jul 20, 2010 at 6:46 PM, seanrocket seanrocketjohnc...@gmail.com wrote: I am running GWT2.0.4 and Spring Security 3.03. I am able to authenticate with Spring Security but have not found a good way to conditionally render Widgets and Panels based on ROLES from Spring Security. For example: In the StockWatcher program, if a user has a ROLE_ADMIN then I want to allow that person to add a addPanel. But If the user has a role such as ROLE_GUEST who is not a ROLE_ADMIN, that user should not see the panel I would like to do something like: public void onModuleLoad() { . // Assemble Main panel. mainPanel.add(stocksFlexTable); if(SpringSecurityRole == ROLE_ADMIN){ mainPanel.add(addPanel); } mainPanel.add(lastUpdatedLabel); .. } I know UI conditional rendering can be easily accomplished using jsp and the Spring Security tags (as shown below). But we don't want to use jsp sec:authorize access=hasRole('ROLE_ADMIN') input type=submit value=Add / /sec:authorize I have searched gwt forums , google groups and other GWT book forum and Spring book forums and have not found a good solution. I've tried the acris security http://code.google.com/p/acris/wiki/Introduction but the roles don't seem to come from Spring Security but rather its own implementation. It uses Spring Security for server side security not UI conditional rendering. UI conditional rendering ROLES come from its own filter sk.seges.acris.security.server.SessionRemoteServiceFilter and user define Grants interface. I've also tried gwt-incubator lib http://code.google.com/p/gwt-incubator-lib/ but that seems to only cover authentication and no conditional rendering. I've seen some news feed about calling back to Spring Security but didn't know how to accomplish the actual calls. DoCheckUserAuth checkAuth = new DoCheckUserAuth(); boolean b = checkAuth.askServerAboutUser(); if(b){ RootPanel.get(formPoint).set(new PrivateForm);} else { RootPanel.get(messagePoint).set(new Label(Please, pass authorization)); Your help is much appreciated -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to fix this GAE-related problem: Must be called from a blob upload callback request.
I'm trying to persist blobs using GAE and assign them to the user who has uploaded the blob. I've took the following sample code as a starting point: http://code.google.com/intl/en-US/appengine/docs/java/blobstore/overview.html Uploading blobs works fine as you can see here: lox.loxal.org Create Task To assign a blob to a certain user I need the blob's BlobKey... So I try to use this (Scala code)... val req: HttpServletRequest = this.getThreadLocalRequest val blobs: java.util.Map[java.lang.String, BlobKey] = blobstoreService.getUploadedBlobs(req) val blobKey: BlobKey = blobs.get(myFile) ...in the server-side code to return the BlobKey. But val blobs: java.util.Map[java.lang.String, BlobKey] = blobstoreService.getUploadedBlobs(req) throws this exception: Caused by: java.lang.IllegalStateException: Must be called from a blob upload callback request. How can I use HttpServletRequest data in server-side code without getting this exception? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Best way to handle header panel html
Hi -- Totally new GWT developer here. My application has a header panel that will contain a couple divs with a branding logo and some login/logout buttons and status text. Whats the best way to handle this in GWT: 1) I can create an HTML widget and hand it a string I concatenate together 2) I could use a panel widget of some sort and add the elements as child widgets 3) use UI Binder (not familiar with this) 4) another approach I don't know about? I know this is basic GWT 101 type stuff here, but I'm a newbie just looking for some guidance -- whats the best practice in this case Thanks! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sync AJAX ( instead of async)
On 21/07/10 16:10, Nathan Wells wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. I sincerely hope that my web browser would fail to honour this! Delaying page close is deeply antisocial --- when I press the close button, I want it to *close*. Otherwise there's too much scope for abuse. -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ } │ --- Conway's Game Of Life, in one line of APL signature.asc Description: OpenPGP digital signature
Re: Best way to handle header panel html
UI Binder is the way to go. Bite the short-term learning curve once and you'll reap long-term efficiency gains. Luke. On Jul 21, 10:53 am, David Vree david.h.v...@gmail.com wrote: Hi -- Totally new GWT developer here. My application has a header panel that will contain a couple divs with a branding logo and some login/logout buttons and status text. Whats the best way to handle this in GWT: 1) I can create an HTML widget and hand it a string I concatenate together 2) I could use a panel widget of some sort and add the elements as child widgets 3) use UI Binder (not familiar with this) 4) another approach I don't know about? I know this is basic GWT 101 type stuff here, but I'm a newbie just looking for some guidance -- whats the best practice in this case Thanks! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sync AJAX ( instead of async)
indeed it could be a valid use case; but not without a constraint, just imagine I wanna close my browser and your sync onunload() request would take 5 secs to be processed by server - what happens then? its evil! imho, if you want to process the response afterwards, like printing it out to the user, anyway you should convince him about it - so the user is not surprised that his browser gonna hang for few seconds. and here you can alert() him about that, or even acquire a confirm()ation - in both cases you can use it as an sync point on the browser while processing async request On 21 Jul., 17:10, Nathan Wells nwwe...@gmail.com wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijeviæ Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sync AJAX ( instead of async)
I understand that asynchronous is the way to go and sometimes we change UI design just to support async. But atleast in our project, there are functional requirements where sync is the only solution. (BTW: sync is not as bad. I understand that javascript in browser is single threaded but it's used by a single user to do a single task. And if sync response is required to meet functional need than we got to do sync. It does not effect scalability of whole app ) Anyway any body used any hack to support sync. (Is JSNI the only way to go?) On Jul 21, 9:10 am, Nathan Wells nwwe...@gmail.com wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijeviæ Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sync AJAX ( instead of async)
I see, i think google just did not want to make a tool which can be abused resulting in frustrated users :) but anyway, you can endeed get it simpler than just hacking JSNI from scratch - extend the XMLHttpRequest class and add a new method open() which flags the underlying connection as async (by simply provide 'false' instead of 'true'). Unfortunately you cannot override any methods since they are final :D but you can look into the source and grab the line from method body (actually just 2 lines) br On 21 Jul., 18:00, mk munna.kaka.ch...@gmail.com wrote: I understand that asynchronous is the way to go and sometimes we change UI design just to support async. But atleast in our project, there are functional requirements where sync is the only solution. (BTW: sync is not as bad. I understand that javascript in browser is single threaded but it's used by a single user to do a single task. And if sync response is required to meet functional need than we got to do sync. It does not effect scalability of whole app ) Anyway any body used any hack to support sync. (Is JSNI the only way to go?) On Jul 21, 9:10 am, Nathan Wells nwwe...@gmail.com wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijeviæ Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT app looks ugly in IE6
Hi, my GWT app works great under current browsers, but it looks ugly under IE6: http://www.lfstad-chess-club.de:8080/ics/ Should I spent effort in finding out the reasons or isn't it worth the work? Thanks Magnus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT and maven
Have you gone through what the Google Eclipse Plugin's FAQ[1] has? http://code.google.com/eclipse/docs/faq.html#gwt_with_maven On Jul 21, 9:36 am, lam lama.gh...@gmail.com wrote: hi, I am trying to run a GWT project by calling the main in DevMode. This works fine. However, I want to use the maven plugin for gwt. The output of web-inf and war structure differs. The files are not located where DevMode.main would normally look for them. The files are not located, and it wont run. Can you help me please -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Upload Maximum Size file giving Memory Out of rage error
stop doing that, its not your intention to load the entire filestream into the memory?! :-) you'd be better off with streaming, so on doPost() in your servlet you could acquire a stream from the request and forward it to your outputstream on the file system, so only the internal buffer is used. IN case of huge upload I would not use tools which provides you API on byte[] level. Apache also has support for fileupload - but its is not that package which is used to access forms data (there is no streaming support) br, On 21 Jul., 16:34, rajendra dasari rajendra.a...@gmail.com wrote: Hi Stefan Bachert, Thanks for giving suggestion, i will try on this issue as you told for increasing memory. --- Raj. On Wed, Jul 21, 2010 at 7:54 PM, Stefan Bachert stefanbach...@yahoo.dewrote: Hi Raj, I think this will not work in general. On 32 Bit-System Java is limit to somewhat betwenn 1.5-2GByte memory. Uploading GByte Files may excete this limit. I suspect an upload may need twice twice the memory in java. I would consider a different mechanism when uploading such big files (java-applet, flash, WebDAV..) Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 15:40, rajendra dasari rajendra.a...@gmail.com wrote: Hi , Thanks for giving suggetion, this is not related to GWT, but i am facing when i set upload maximum file size to(1024MB - 2GB), but it is giving same error, i am using the what ever you sent URL only i used. --- Raj On Tue, Jul 20, 2010 at 6:27 PM, Arthur Kalmenson arthur.k...@gmail.comwrote: As Rudolf said, this has nothing to do with GWT. Perhaps you should look at apache commons upload Streaming API: http://commons.apache.org/fileupload/streaming.html -- Arthur Kalmenson On Tue, Jul 20, 2010 at 3:04 AM, raj rajendra.a...@gmail.com wrote: Hi All, I am uploading more than 500MB file it is giving this exception [ERROR] Error for /com.winfoware.voxforce.Index/services java.lang.OutOfMemoryError: Java heap space at org.apache.commons.fileupload.disk.DiskFileItem.get(DiskFileItem.java: 329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:488) [ERROR] Out of memory; to increase the amount of memory, use the - Xmx flag at startup (java -Xmx128M ...) [ERROR] 500 - POST /com.mycomp.xxx.Index/services?method=fileupload (127.0.0.1) 3302 bytes Request headers Host: 127.0.0.1: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.1.10) Gecko/20100504 Firefox/3.5.10 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: JSESSIONID=1c875d6p9xi9v Referer: http://127.0.0.1:/Index.html?gwt.codesvr=127.0.0.1:9997 Content-Type: multipart/form-data; boundary=---6410314616234 Content-Length: 730633459
Re: Sync AJAX ( instead of async)
Thanks cokol for A+ responses. On Jul 21, 10:10 am, cokol eplisc...@googlemail.com wrote: I see, i think google just did not want to make a tool which can be abused resulting in frustrated users :) but anyway, you can endeed get it simpler than just hacking JSNI from scratch - extend the XMLHttpRequest class and add a new method open() which flags the underlying connection as async (by simply provide 'false' instead of 'true'). Unfortunately you cannot override any methods since they are final :D but you can look into the source and grab the line from method body (actually just 2 lines) br On 21 Jul., 18:00, mk munna.kaka.ch...@gmail.com wrote: I understand that asynchronous is the way to go and sometimes we change UI design just to support async. But atleast in our project, there are functional requirements where sync is the only solution. (BTW: sync is not as bad. I understand that javascript in browser is single threaded but it's used by a single user to do a single task. And if sync response is required to meet functional need than we got to do sync. It does not effect scalability of whole app ) Anyway any body used any hack to support sync. (Is JSNI the only way to go?) On Jul 21, 9:10 am, Nathan Wells nwwe...@gmail.com wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijeviæ Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Did anybody try Cross site communication?
if you just tried to get the example working, maybe you mistyped something? On 21 Jul., 02:09, VM thinker...@gmail.com wrote: Hello GWT Users, I just wanted to check if anybody had success with Cross domain communication. I followed Google documentation: http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html handl...@com.google.gwt.sample.stockwatcher.client.stockwatcher::handleJsonResponse (Lcom/ google/gwt/core/client/JavaScriptObject;)(jsonObj); handleJsonResponse is not getting called. Any thoughts? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: AJAX of type GET ( and not POST)?
Thanks cokol and Stefan I expect cache from GET On Jul 21, 8:07 am, Stefan Bachert stefanbach...@yahoo.de wrote: Hi, what do you expect from using GET instead of POST? Basically POST could definitely transfer many bytes, GET may have a limit. (In the past they talked about 2K limit for an url, which may no more apply) It is more effort necessary to do a CSRF/XSRF with POST, so I consider POST somewhat more secure. (However, I consider most recent GWT-RPC to be save against CSRF/XSRF) Stefan Bachert http::/gwtworld.de due to recent cases, I am sorry, I won't do free personal support. inquiries for professional GWT support are welcome. On 20 Jul., 18:51, mk munna.kaka.ch...@gmail.com wrote: Is there a way to make AJAX async call of type GET ( instead of POST). (RequestBuilder is ok but still is there a easier way)- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to control the pixel sizes of a Grid?
Hi Andreas, may I come back to your code? I have build my chess game on your idea using SimplePanels for the cells. It always worked great, but today I found that it looks ugly under IE6. What would you do in this case? Is IE6 so old that you can ignore it? Thanks Magnus On Jun 28, 12:24 pm, andreas horst.andrea...@googlemail.com wrote: Here's code I'd use to create a simplistic chess board: // the chess board with no spaces Grid cb = new Grid(10, 10); cb.setCellPadding(0); cb.setCellSpacing(0); cb.setBorderWidth(0); // assembles the board by inserting colored panels for (int i = 1; i 9; i++) { // panels of the top row SimplePanel pHTop = new SimplePanel(); pHTop.setPixelSize(40, 20); pHTop.getElement().getStyle().setBackgroundColor(red); // panels of the bottom row SimplePanel pHBottom = new SimplePanel(); pHBottom.setPixelSize(40, 20); pHBottom.getElement().getStyle().setBackgroundColor(red); // panels of the left column SimplePanel pVLeft = new SimplePanel(); pVLeft.setPixelSize(20, 40); pVLeft.getElement().getStyle().setBackgroundColor(green); // panels of the right column SimplePanel pVRight = new SimplePanel(); pVRight.setPixelSize(20, 40); pVRight.getElement().getStyle().setBackgroundColor(green); // insert the border cells cb.setWidget(0, i, pHTop); cb.setWidget(9, i, pHBottom); cb.setWidget(i, 0, pVLeft); cb.setWidget(i, 9, pVRight); for (int j = 1; j 9; j++) { // the inner chess board panels SimplePanel cP = new SimplePanel(); cP.setPixelSize(40, 40); // switches between black and white if (j % 2 == 0) { cP.getElement().getStyle().setBackgroundColor( i % 2 == 0 ? black : white); } else { cP.getElement().getStyle().setBackgroundColor( i % 2 == 0 ? white : black); } cb.setWidget(i, j, cP); } } // there it is RootPanel.get().add(cb, 1, 1); Programmatic styles are of course not as good as using stylesheets, consider this just a demo. On 28 Jun., 11:51, andreas horst.andrea...@googlemail.com wrote: Where exactly are the vertical spaces? From what I see, there are no spaces between the cells of the top and bottom row and the spaces between the cells in the left and right column are of the same color as the image background, so I assume there are actually also no spaces, correct me on this one? For better debug you could also assign a border and background color to the Grid. If none of these colors will be visible you can be sure that there are no spaces or anything left. For the inner cells I can not say if there are any spaces. Also I assume your style pnl-r adds the red border to the Grid? If there were any spaces left caused by the border width you would see a red Grid. I think you got what you wanted... BTW: I think you do not need to set the cell dimensions manually; Grid will automatically adjust cell dimensions so that the cell widgets fit, in other words a columns width for example will be adjusted so that the cell widget with the biggest width is completely visible; same goes for rows and heights and so on BTW2: the two for-blocks in init() can be realized in one single for- block since they iterate over exactly the same interval (0-9) On 28 Jun., 11:27, Magnus alpineblas...@googlemail.com wrote: Here is the screenshot: http://yfrog.com/j7chessboardj Magnus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sync AJAX ( instead of async)
Don't get me wrong... I'm about as opposed to synchronous requests as everyone else... I'm just saying that in some cases it might be justifiable. On Jul 21, 10:32 am, mk munna.kaka.ch...@gmail.com wrote: Thanks cokol for A+ responses. On Jul 21, 10:10 am, cokol eplisc...@googlemail.com wrote: I see, i think google just did not want to make a tool which can be abused resulting in frustrated users :) but anyway, you can endeed get it simpler than just hacking JSNI from scratch - extend the XMLHttpRequest class and add a new method open() which flags the underlying connection as async (by simply provide 'false' instead of 'true'). Unfortunately you cannot override any methods since they are final :D but you can look into the source and grab the line from method body (actually just 2 lines) br On 21 Jul., 18:00, mk munna.kaka.ch...@gmail.com wrote: I understand that asynchronous is the way to go and sometimes we change UI design just to support async. But atleast in our project, there are functional requirements where sync is the only solution. (BTW: sync is not as bad. I understand that javascript in browser is single threaded but it's used by a single user to do a single task. And if sync response is required to meet functional need than we got to do sync. It does not effect scalability of whole app ) Anyway any body used any hack to support sync. (Is JSNI the only way to go?) On Jul 21, 9:10 am, Nathan Wells nwwe...@gmail.com wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijeviæ Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to control the pixel sizes of a Grid?
Hey Magnus, to be honest I was very glad to read this post: http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html Besides, what exactly is looking ugly? Me personally, I would not spend much time in fixing it for IE6 if it can not be fixed by slightly adjusting the UI setup in such a way that it still works correctly on modern browsers. Regards, Andreas On 21 Jul., 19:00, Magnus alpineblas...@googlemail.com wrote: Hi Andreas, may I come back to your code? I have build my chess game on your idea using SimplePanels for the cells. It always worked great, but today I found that it looks ugly under IE6. What would you do in this case? Is IE6 so old that you can ignore it? Thanks Magnus On Jun 28, 12:24 pm, andreas horst.andrea...@googlemail.com wrote: Here's code I'd use to create a simplistic chess board: // the chess board with no spaces Grid cb = new Grid(10, 10); cb.setCellPadding(0); cb.setCellSpacing(0); cb.setBorderWidth(0); // assembles the board by inserting colored panels for (int i = 1; i 9; i++) { // panels of the top row SimplePanel pHTop = new SimplePanel(); pHTop.setPixelSize(40, 20); pHTop.getElement().getStyle().setBackgroundColor(red); // panels of the bottom row SimplePanel pHBottom = new SimplePanel(); pHBottom.setPixelSize(40, 20); pHBottom.getElement().getStyle().setBackgroundColor(red); // panels of the left column SimplePanel pVLeft = new SimplePanel(); pVLeft.setPixelSize(20, 40); pVLeft.getElement().getStyle().setBackgroundColor(green); // panels of the right column SimplePanel pVRight = new SimplePanel(); pVRight.setPixelSize(20, 40); pVRight.getElement().getStyle().setBackgroundColor(green); // insert the border cells cb.setWidget(0, i, pHTop); cb.setWidget(9, i, pHBottom); cb.setWidget(i, 0, pVLeft); cb.setWidget(i, 9, pVRight); for (int j = 1; j 9; j++) { // the inner chess board panels SimplePanel cP = new SimplePanel(); cP.setPixelSize(40, 40); // switches between black and white if (j % 2 == 0) { cP.getElement().getStyle().setBackgroundColor( i % 2 == 0 ? black : white); } else { cP.getElement().getStyle().setBackgroundColor( i % 2 == 0 ? white : black); } cb.setWidget(i, j, cP); } } // there it is RootPanel.get().add(cb, 1, 1); Programmatic styles are of course not as good as using stylesheets, consider this just a demo. On 28 Jun., 11:51, andreas horst.andrea...@googlemail.com wrote: Where exactly are the vertical spaces? From what I see, there are no spaces between the cells of the top and bottom row and the spaces between the cells in the left and right column are of the same color as the image background, so I assume there are actually also no spaces, correct me on this one? For better debug you could also assign a border and background color to the Grid. If none of these colors will be visible you can be sure that there are no spaces or anything left. For the inner cells I can not say if there are any spaces. Also I assume your style pnl-r adds the red border to the Grid? If there were any spaces left caused by the border width you would see a red Grid. I think you got what you wanted... BTW: I think you do not need to set the cell dimensions manually; Grid will automatically adjust cell dimensions so that the cell widgets fit, in other words a columns width for example will be adjusted so that the cell widget with the biggest width is completely visible; same goes for rows and heights and so on BTW2: the two for-blocks in init() can be realized in one single for- block since they iterate over exactly the same interval (0-9) On 28 Jun., 11:27, Magnus alpineblas...@googlemail.com wrote: Here is the screenshot: http://yfrog.com/j7chessboardj Magnus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: support F5 to load current page
i use History.fireCurrentHistoryState() on the first page module load what can i do ??? On Jul 21, 4:08 pm, Thomas Broyer t.bro...@gmail.com wrote: On 20 juil, 11:30, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: Welcome all , i face a problem with pressing F5 button to load current page i use history manager to make next back in my project now after pressing the f5 button it return to the first page in my projects how to fix this problem In your onModuleLoad, are you using the current History.getToken() (or History.fireCurrentHistoryState()) ? If not, then that's probably the problem. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Possible to access GWT-RPC serializer?
Thanks guys. Yau: that's an interesting technique, but not quite what I need (which is to marshal/unmarshal on the client side for local storage). Olivier, I can't quite make out how your stuff would work, but I see it's basically annotation based and generates the marshal/ unmarshal code - which is what I actually ended up doing myself. For those interested, I've implemented an annotation of my own (@JsonSerializable). All you need to do is add this to the classes (or enum types) that need serialization, and the processor looks at the public fields and generates the marshal/unmarshal code. Works for the basic Java types as well things like enum and ArrayList and handles nested classes (which I use a lot). Pretty neat and extremely handy, if you're considering local storage. Except, implementing annotations is a pain if it's the first time (it was for me and took me a couple of days to implement/test), so once my project eases up, I'll try to upload the library for others who might want to use local storage this way. I can tell you the results are excellent. If you want to see this in operation and decide if it's worth the effort, check out my app at http://herdcall.com - it's beta right now, but it's open at this time. You don't need to set up an account, log in with your Facebook or Gmail login (LinkedIn, Twitter, and Yahoo! not operational yet). Everything is cached in local storage, including your friend (herd) list, for which you'll see dramatic improvement in load time. On Jul 16, 2:18 am, Olivier Monaco olivier.mon...@free.fr wrote: Hi Sekhar, You have some framework like piriti (http://code.google.com/p/piriti/) for JSON serialization of data. It can be a good start. However, it does not use overlays: it copy JSON values to POJO fields. Maybe you can be interested in my code:http://code.google.com/p/tyco/source/browse/?repo=tikray The idea is to define interfaces for data. A generator automatically create implementation for GWT with zero-overhead (no field copy, just wrappers arround JSON value that will be removed by the GWT optimizer). This part starts to work with (many) limitations. The second part is to create some Java proxy to use the same mechanisms on server. I'm owrking on. Maybe this code can help you. Olivier On 15 juil, 18:03, Sekhar sek...@allurefx.com wrote: Thanks guys, yes looks like JSON is the way to go. POJO-JSON should be easy (using the JSON API), but the other way is a bit tricky. I don't think overlays help because the JavaScript side never sees the objects (just the string) and the JSON-POJO process shouldn't depend on the specific class. As I understand overlays (http://goo.gl/fNzG), you need to (1) have the object in JS and (2) know the attributes. I'm experimenting with rolling my own, will post back results. On Jul 15, 8:08 am, Paul Stockley pstockl...@gmail.com wrote: You could use JSON and javascript overlay types to access the information in a type safe way. On Jul 15, 10:55 am, Stefan Bachert stefanbach...@yahoo.de wrote: Hi Sekhar, this is my first thought. Just use JSON. Then you can use eval to read it. However, I do not know any method to export a object to json string. But this should not be too complicated to do yourself, or lookout for such a library Stefan Bacherthttp://gwtworld.de On 15 Jul., 01:34, Sekhar sek...@allurefx.com wrote: Thanks, yeah - sawhttp://goo.gl/fTloafterIposted. So, I guess we'll need to implement something of our own, like a simple to/from JSON strings. Any other thoughts/suggestions? On Jul 14, 3:37 pm, Thomas Broyer t.bro...@gmail.com wrote: On 14 juil, 21:41, Sekhar sek...@allurefx.com wrote: Guys, I'm trying to use HTML5 Local Storage and am wondering how I can save the data from the server as a string. Since GWT-RPC already serializes/deserializes Java serializable objects, is there a way to access its serialization functions to marshal the data to/from the Local Storage strings? You can gain access to the GWT-RPC serialization code (provided your objects are used in a GWT-RPC somewhere, so the GWT compiler generates the appropriate serialization/deserialization code), but it won't be of any help in your case, as GWT-RPC serialization is asymmetric (for performance reasons). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to control the pixel sizes of a Grid?
Hi Andreas, the most ugly thing concerns the chess board, which I set up with SimplePanels based on your idea: There are gaps between the columns. Look at this: http://yfrog.com/0nappdp I find that most web apps still work good with old browsers, and I am not sure if my app should look better with IE6... Magnus On Jul 21, 7:15 pm, andreas horst.andrea...@googlemail.com wrote: Hey Magnus, to be honest I was very glad to read this post: http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-mode... Besides, what exactly is looking ugly? Me personally, I would not spend much time in fixing it for IE6 if it can not be fixed by slightly adjusting the UI setup in such a way that it still works correctly on modern browsers. Regards, Andreas On 21 Jul., 19:00, Magnus alpineblas...@googlemail.com wrote: Hi Andreas, may I come back to your code? I have build my chess game on your idea using SimplePanels for the cells. It always worked great, but today I found that it looks ugly under IE6. What would you do in this case? Is IE6 so old that you can ignore it? Thanks Magnus On Jun 28, 12:24 pm, andreas horst.andrea...@googlemail.com wrote: Here's code I'd use to create a simplistic chess board: // the chess board with no spaces Grid cb = new Grid(10, 10); cb.setCellPadding(0); cb.setCellSpacing(0); cb.setBorderWidth(0); // assembles the board by inserting colored panels for (int i = 1; i 9; i++) { // panels of the top row SimplePanel pHTop = new SimplePanel(); pHTop.setPixelSize(40, 20); pHTop.getElement().getStyle().setBackgroundColor(red); // panels of the bottom row SimplePanel pHBottom = new SimplePanel(); pHBottom.setPixelSize(40, 20); pHBottom.getElement().getStyle().setBackgroundColor(red); // panels of the left column SimplePanel pVLeft = new SimplePanel(); pVLeft.setPixelSize(20, 40); pVLeft.getElement().getStyle().setBackgroundColor(green); // panels of the right column SimplePanel pVRight = new SimplePanel(); pVRight.setPixelSize(20, 40); pVRight.getElement().getStyle().setBackgroundColor(green); // insert the border cells cb.setWidget(0, i, pHTop); cb.setWidget(9, i, pHBottom); cb.setWidget(i, 0, pVLeft); cb.setWidget(i, 9, pVRight); for (int j = 1; j 9; j++) { // the inner chess board panels SimplePanel cP = new SimplePanel(); cP.setPixelSize(40, 40); // switches between black and white if (j % 2 == 0) { cP.getElement().getStyle().setBackgroundColor( i % 2 == 0 ? black : white); } else { cP.getElement().getStyle().setBackgroundColor( i % 2 == 0 ? white : black); } cb.setWidget(i, j, cP); } } // there it is RootPanel.get().add(cb, 1, 1); Programmatic styles are of course not as good as using stylesheets, consider this just a demo. On 28 Jun., 11:51, andreas horst.andrea...@googlemail.com wrote: Where exactly are the vertical spaces? From what I see, there are no spaces between the cells of the top and bottom row and the spaces between the cells in the left and right column are of the same color as the image background, so I assume there are actually also no spaces, correct me on this one? For better debug you could also assign a border and background color to the Grid. If none of these colors will be visible you can be sure that there are no spaces or anything left. For the inner cells I can not say if there are any spaces. Also I assume your style pnl-r adds the red border to the Grid? If there were any spaces left caused by the border width you would see a red Grid. I think you got what you wanted... BTW: I think you do not need to set the cell dimensions manually; Grid will automatically adjust cell dimensions so that the cell widgets fit, in other words a columns width for example will be adjusted so that the cell widget with the biggest width is completely visible; same goes for rows and heights and so on BTW2: the two for-blocks in init() can be realized in one single for- block since they iterate over exactly the same interval (0-9) On 28 Jun., 11:27, Magnus alpineblas...@googlemail.com wrote: Here is the screenshot: http://yfrog.com/j7chessboardj Magnus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT app looks ugly in IE6
depends on your target audience. The majority of IE6 users are either enterprise or people who are running XP SP1. On Jul 21, 10:11 am, Magnus alpineblas...@googlemail.com wrote: Hi, my GWT app works great under current browsers, but it looks ugly under IE6:http://www.lfstad-chess-club.de:8080/ics/ Should I spent effort in finding out the reasons or isn't it worth the work? Thanks Magnus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: file upload set filter
Well, first of all if you notice the link I posted earlier, none of the browsers implement the spec. If you would like to do it anyway in case they ever do, you will have to do a getElement and manually set the property through the DOM API. Remember every GWT widget is just a wrapper of an HTML element. On Jul 20, 10:58 pm, aditya sanas 007aditya.b...@gmail.com wrote: how to embed form input type=file name=pic id=pic accept=image/gif, image/jpeg / /form into gwt file upload...? -- Aditya On Wed, Jul 21, 2010 at 2:00 AM, lineman78 linema...@gmail.com wrote: http://www.w3schools.com/TAGS/att_input_accept.asp On Jul 20, 2:01 pm, Paachu binu...@gmail.com wrote: Hi, I need to upload one csv file into my application. I am using FileUpload compontent to upload the File. But when I use FileUpload, the FileUploadDialog displayed All files.. I need to set it only for csv files . How can I set filter for that? thanks Paachu. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Send String from GWT TO PHP
There are examples around that are coppied directly from a book, I believe it was GWT in Action. If you are using GWT 2.0+ a JSONP API was added... http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/jsonp/client/JsonpRequestBuilder.html On Jul 21, 6:15 am, cokol eplisc...@googlemail.com wrote: hi, please see documentnation on RequestBuilder class, there is a good sample On 20 Jul., 20:20, bhargava bhargav...@gmail.com wrote: Hi all, I need to send a string from my gwt platform on glassfish to a website running(using php) on apache server. I know that i need to use JSONP . Is there any tutorial which can provide me a good idea on how to use json in gwt to send a string variable to another server? Thank you -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sync AJAX ( instead of async)
Could you get the same effect by preventing user input during your server request, either by finding all of the controls/links and disabling them or overlaying something that receives and swallows all events? At least that way, you're not locking up the browser completely. Is there some other functional requirement that makes synchronous requests a requirement? -Brian On Jul 21, 12:00 pm, mk munna.kaka.ch...@gmail.com wrote: I understand that asynchronous is the way to go and sometimes we change UI design just to support async. But atleast in our project, there are functional requirements where sync is the only solution. (BTW: sync is not as bad. I understand that javascript in browser is single threaded but it's used by a single user to do a single task. And if sync response is required to meet functional need than we got to do sync. It does not effect scalability of whole app ) Anyway any body used any hack to support sync. (Is JSNI the only way to go?) On Jul 21, 9:10 am, Nathan Wells nwwe...@gmail.com wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijeviæ Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: XSL Transformation, AccessControlException, NoClassDefFoundError and SyntheticRepository
From what I can tell it is failing while compiling the stylesheet. I would suggest taking app engine out of the loop altogether first and just so it in a static main to make sure it is compiling. If it works as a static main than it is probably the file IO. To test this I recommend to try just reading the file to the log to make sure that you actually have a hold of the file. I have found that the most reliable way to read in a file is not to use the File constructor, but assuming the name of your class is XsltService: XsltService.class.getResourceAsStream(test.xsl); // Assuming test.xsl is in the same folder as the class file, set to /test.xsl if it is in the root. On Jul 21, 6:42 am, Jan jan.morl...@googlemail.com wrote: Hi, I would like to use an xsl transformation inside an HttpServlet. The code is essentially the following: File xslfile = new File(test.xsl); TransformerFactory factory = TransformerFactory.newInstance(); factory.setAttribute( debug, true ); Transformer transformer = factory.newTransformer(new StreamSource( xslfile ) ); I already made sure that the xsl file is valid and I defined it as resource-file inside appengine-web.xml If I now call the servlet the first time, the following error occurs: java.lang.ExceptionInInitializerError at com.sun.org.apache.bcel.internal.classfile.JavaClass.init(JavaClass.java: 109) at com.sun.org.apache.bcel.internal.classfile.JavaClass.init(JavaClass.java: 228) at com.sun.org.apache.bcel.internal.generic.ClassGen.getJavaClass(ClassGen.java: 174) at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.translate(Stylesheet.java: 735) at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java: 354) at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java: 429) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java: 795) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java: 617) at com.axag.invoiceedit.server.MY SERVLET.doGet(MY SERVLET:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: java.security.AccessControlException: access denied (java.io.FilePermission PATH TO MY PROJECT'S SRC DIRECTORY read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java: 323) at
MenuBar + UiBinder
Hi there! Just starting here, so apologize for the noob question: I have a uitemplate: ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style .important { font-weight: bold; } /ui:style g:DockLayoutPanel unit=EM g:north size=3 g:MenuBar ui:field=mainMenu /g:MenuBar /g:north g:center g:LabelBody/g:Label /g:center /g:DockLayoutPanel /ui:UiBinder and my Widget: public MainTabPanel() { initWidget(uiBinder.createAndBindUi(this)); Command cmd = new Command() { public void execute() { Window.alert(Clicked); } }; MenuBar regraMenu = new MenuBar(true); regraMenu.addItem(Search Rule,cmd); regraMenu.addItem(Add Rule,cmd); regraMenu.addItem(Edit Rule,cmd); mainMenu.addItem(Rules,regraMenu); } But when it loads, the first menu entry: Rules is shown, but mouse- over does not displays its children, and when clicked, an exception occurs: 15:23:50.957 [ERROR] [com.arkhi.Application] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeError): doc.getBoxObjectFor is not a function fileName: http://127.0.0.1: lineNumber: 4 stack: ([object HTMLBodyElement],[object HTMLTableCellElement])@http://127.0.0.1::4 @:0 (null,458781,[object MouseEvent],[object HTMLDivElement],[object GWTJavaObject])@http://127.0.0.1:/com.arkhi.Application/ hosted.html?com_arkhi_Application:56 ([object MouseEvent])@http://127.0.0.1::92 ((function (evt) {var listener, curElem = this;while (curElem ! (listener = curElem.__listener)) {curElem = curElem.parentNode;}if (curElem curElem.nodeType != 1) {curElem = null;}if (listener) {if (__gwt_makeJavaInvoke(1)(null, 393249, listener)) {__gwt_makeJavaInvoke(3)(null, 458781, evt, curElem, listener);}}}), [object HTMLDivElement],[object Object])@http://127.0.0.1::32 @:0 (null,27,(function (evt) {var listener, curElem = this;while (curElem !(listener = curElem.__listener)) {curElem = curElem.parentNode;}if (curElem curElem.nodeType != 1) {curElem = null;}if (listener) {if (__gwt_makeJavaInvoke(1)(null, 393249, listener)) {__gwt_makeJavaInvoke(3)(null, 458781, evt, curElem, listener);}}}), [object HTMLDivElement],[object Object])@http://127.0.0.1:/ com.arkhi.Application/hosted.html?com_arkhi_Application:56 ([object MouseEvent])@http://127.0.0.1::3 at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java: 195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java: 120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java: 507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java: 264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java: 91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188) at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) 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: 157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java: 1669) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java: 401) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java: 222) at java.lang.Thread.run(Thread.java:619) What did I miss here? Regards -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Focus problems moving from RootPanel to RootLayoutPanel
I'm testing moving my application from a RootPanel to RootLayoutPanel. Given my layout, it's not a 1-to-1 swap, and the end result is some focusing problems with my logon from. My HTML page contains an iframe for GWT history, an iframe that serves as target for downloading files (so I don't have to open a browser window), a form for logging on, and a div for my application that RootPanel.get(String) retrieves. The logon form's action is attached via JSNI. The HTML page carries and onload() script that focuses the cursor in the username field. After logon, the form is hidden and the application div shows. On logout, I hide and clear the main panel and show the logon form. This works fine in all browsers. However RootLayoutPanel has no get(String) method. So I call get().add(new ScrollPanel(myAppPanel)), bypassing the old div. This *seems* to work well, but if the user clicks *anywhere* on the page, the form loses focus. The focus cannot be regained unless the user tabs through the browser window waiting for the username to highlight. Looking in Firebug, I think the problem is a div of GWT's making: div style=position: absolute; z-index: -32767; left: -20cm; top: -20cm; width: 10cm; height: 10cm;nbsp;/div Is that's what's doing it? What is this div for? How can I get around this focus problem, or do I need to stick with RootPanel? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT app looks ugly in IE6
Google has dropped its support for IE6 on YouTube and Google Docs. I don't see a reason for supporting it if you haven't a REALLY good reason. On Jul 21, 6:11 pm, Magnus alpineblas...@googlemail.com wrote: my GWT app works great under current browsers, but it looks ugly under IE6:http://www.lfstad-chess-club.de:8080/ics/ Should I spent effort in finding out the reasons or isn't it worth the work? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: MenuBar + UiBinder
Sorry, I was missing the correct user.agent on my user.agent in the module. Fixed now On Jul 21, 3:31 pm, Vinicius Carvalho viniciusccarva...@gmail.com wrote: Hi there! Just starting here, so apologize for the noob question: I have a uitemplate: ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style .important { font-weight: bold; } /ui:style g:DockLayoutPanel unit=EM g:north size=3 g:MenuBar ui:field=mainMenu /g:MenuBar /g:north g:center g:LabelBody/g:Label /g:center /g:DockLayoutPanel /ui:UiBinder and my Widget: public MainTabPanel() { initWidget(uiBinder.createAndBindUi(this)); Command cmd = new Command() { public void execute() { Window.alert(Clicked); } }; MenuBar regraMenu = new MenuBar(true); regraMenu.addItem(Search Rule,cmd); regraMenu.addItem(Add Rule,cmd); regraMenu.addItem(Edit Rule,cmd); mainMenu.addItem(Rules,regraMenu); } But when it loads, the first menu entry: Rules is shown, but mouse- over does not displays its children, and when clicked, an exception occurs: 15:23:50.957 [ERROR] [com.arkhi.Application] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeError): doc.getBoxObjectFor is not a function fileName:http://127.0.0.1: lineNumber: 4 stack: ([object HTMLBodyElement],[object HTMLTableCellElement])@http://127.0.0.1::4 @:0 (null,458781,[object MouseEvent],[object HTMLDivElement],[object GWTJavaObject])@http://127.0.0.1:/com.arkhi.Application/ hosted.html?com_arkhi_Application:56 ([object MouseEvent])@http://127.0.0.1::92 ((function (evt) {var listener, curElem = this;while (curElem ! (listener = curElem.__listener)) {curElem = curElem.parentNode;}if (curElem curElem.nodeType != 1) {curElem = null;}if (listener) {if (__gwt_makeJavaInvoke(1)(null, 393249, listener)) {__gwt_makeJavaInvoke(3)(null, 458781, evt, curElem, listener);}}}), [object HTMLDivElement],[object Object])@http://127.0.0.1::32 @:0 (null,27,(function (evt) {var listener, curElem = this;while (curElem !(listener = curElem.__listener)) {curElem = curElem.parentNode;}if (curElem curElem.nodeType != 1) {curElem = null;}if (listener) {if (__gwt_makeJavaInvoke(1)(null, 393249, listener)) {__gwt_makeJavaInvoke(3)(null, 458781, evt, curElem, listener);}}}), [object HTMLDivElement],[object Object])@http://127.0.0.1:/ com.arkhi.Application/hosted.html?com_arkhi_Application:56 ([object MouseEvent])@http://127.0.0.1::3 at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChann elServer.java: 195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java: 120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java: 507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java: 264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.j ava: 91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188) at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) 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.jav a: 157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java : 1669) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan nelServer.java: 401) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java : 222) at java.lang.Thread.run(Thread.java:619) What did I miss here? Regards -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT 2.1 with roo: custom changes to .ui.xml files overwritten (major issue)
Hi, Before filling a bug with this, I'd like to understand the intended behavior of roo 1.1 final version. A common use case, which I just tried, is developing a small app, and customizing the generated .ui.xml files. For example, for Employee entity, I have changed EmployeeDetailsView.ui.xml. Then I've added another field to the entity, resulting in EmployeeDetailsView.ui.xml being regenerated and my changes lost on mvn gwt:compile. Changes to ScaffoldShell.ui.xml were preserved. I'd rather have roo/maven detect the file was changed and ask me to overwrite or not. I'd also expect it to preseve changes to other files, e.g. I might add an auto-completion widget and handle it myself in the edit view. Do these use cases make sense? How should them be handled with roo +gwt ? PS: also posted here http://forum.springsource.org/showthread.php?p=310300#post310300 Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: XSL Transformation, AccessControlException, NoClassDefFoundError and SyntheticRepository
as already states by cause Caused by: java.security.AccessControlException: access denied you are not allowed to access the filesystem neither for read nor for write - I remember there was a workaround for this issue, like putting the resource into classpath or such, then you can get the stream via getResourceAsStream(foo.xslt) from the classloader. this should be stated in appengine faq good luck, On 21 Jul., 20:23, lineman78 linema...@gmail.com wrote: From what I can tell it is failing while compiling the stylesheet. I would suggest taking app engine out of the loop altogether first and just so it in a static main to make sure it is compiling. If it works as a static main than it is probably the file IO. To test this I recommend to try just reading the file to the log to make sure that you actually have a hold of the file. I have found that the most reliable way to read in a file is not to use the File constructor, but assuming the name of your class is XsltService: XsltService.class.getResourceAsStream(test.xsl); // Assuming test.xsl is in the same folder as the class file, set to /test.xsl if it is in the root. On Jul 21, 6:42 am, Jan jan.morl...@googlemail.com wrote: Hi, I would like to use an xsl transformation inside an HttpServlet. The code is essentially the following: File xslfile = new File(test.xsl); TransformerFactory factory = TransformerFactory.newInstance(); factory.setAttribute( debug, true ); Transformer transformer = factory.newTransformer(new StreamSource( xslfile ) ); I already made sure that the xsl file is valid and I defined it as resource-file inside appengine-web.xml If I now call the servlet the first time, the following error occurs: java.lang.ExceptionInInitializerError at com.sun.org.apache.bcel.internal.classfile.JavaClass.init(JavaClass.java: 109) at com.sun.org.apache.bcel.internal.classfile.JavaClass.init(JavaClass.java: 228) at com.sun.org.apache.bcel.internal.generic.ClassGen.getJavaClass(ClassGen.jav a: 174) at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.translate(Style sheet.java: 735) at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java: 354) at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java: 429) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemp lates(TransformerFactoryImpl.java: 795) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTran sformer(TransformerFactoryImpl.java: 617) at com.axag.invoiceedit.server.MY SERVLET.doGet(MY SERVLET:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn gineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) at
Re: Sync AJAX ( instead of async)
...in that case it would be an option to show up a modal dialog asking the user to get some coffee :-) @mk youre welcome! On 21 Jul., 20:20, Brian Reilly brian.irei...@gmail.com wrote: Could you get the same effect by preventing user input during your server request, either by finding all of the controls/links and disabling them or overlaying something that receives and swallows all events? At least that way, you're not locking up the browser completely. Is there some other functional requirement that makes synchronous requests a requirement? -Brian On Jul 21, 12:00 pm, mk munna.kaka.ch...@gmail.com wrote: I understand that asynchronous is the way to go and sometimes we change UI design just to support async. But atleast in our project, there are functional requirements where sync is the only solution. (BTW: sync is not as bad. I understand that javascript in browser is single threaded but it's used by a single user to do a single task. And if sync response is required to meet functional need than we got to do sync. It does not effect scalability of whole app ) Anyway any body used any hack to support sync. (Is JSNI the only way to go?) On Jul 21, 9:10 am, Nathan Wells nwwe...@gmail.com wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijeviæ Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: External library on GWT server side.
hi, as the cause indicates java.lang.NoClassDefFoundError: cryptix/ provider/md/MD5 means that the class could not be found, means is not in the classpath. I guess you uploaded your application on googles appengine? however, make sure, that the .jar file of your crypter library resides in WEB-INF/lib folder! best, On 21 Jul., 13:22, Alexander Ustinov alexander.s.usti...@gmail.com wrote: Hi all, I faced with following problem. I want to you use cryptix library on the server side of my app. I creared classfile : [code] package com.rfo.cabinet.server; import java.util.Random; import cryptix.provider.md.MD5; public class TestHash { ... public static String encrypt() {..}} [/code] Then I'm using it in RPSImpl: [code] public class GreetingServiceImpl extends RemoteServiceServlet implements GreetingService { ... String sid = this.getThreadLocalRequest().getSession().getId(); String encryptedSid = TestHash.encrypt(sid); Cookie cookie = new Cookie(Sid,encryptedSid); this.getThreadLocalResponse().addCookie(cookie); ... } [/cpde] Progect is pompiling well but when I call this service, I'm getting next exception: [code] 21.07.2010 11:21:42 com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [127971130224] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.rfo.cabinet.client.GreetingService.sendLogin(java.lang.String,java.lang .String) throws java.lang.IllegalArgumentException' threw an unexpected exception: java.lang.NoClassDefFoundError: cryptix/provider/md/MD5 at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 378) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 581) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServi ceServlet.java: 188) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServi ceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(Abstract RemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn gineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: java.lang.NoClassDefFoundError: cryptix/provider/md/MD5 at com.rfo.cabinet.server.TestHash.encryptToBytes(TestHash.java:71) at com.rfo.cabinet.server.TestHash.encrypt(TestHash.java:82) at
Jetty login-config realm problems with GWT 2.0
I am trying to define a security realm for jetty under hosted mode, but get the following: 00:10:38.130 [WARN] Configuration problem at login-config auth- methodBASIC/auth-method realm-namegenomix/realm-name /login- config java.lang.NullPointerException at org.mortbay.jetty.webapp.WebXmlConfiguration.initLoginConfig(WebXmlConfiguration.java: 883) at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java: 359) at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java: 289) at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java: 222) at com.google.gwt.dev.ServletValidator.create(ServletValidator.java: 69) at com.google.gwt.dev.ServletValidator.create(ServletValidator.java: 52) at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:356) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1057) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:783) at com.google.gwt.dev.DevMode.main(DevMode.java:275) My jetty-web.xml has: ?xml version=1.0? !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN http://jetty.mortbay.org/configure.dtd; Configure class=org.mortbay.jetty.webapp.WebAppContext Get name=SecurityHandler Set name=UserRealm New class=org.mortbay.jetty.security.HashUserRealm Set name=namegenomix/Set Set name=configSystemProperty name=user.home//Properties/ genomix.realm.properties/Set /New /Set /Get /Configure The web.xml has the usual security stuff: web-app ... security-constraint web-resource-collection web-resource-nameEverything/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameuser/role-name /auth-constraint /security-constraint security-role role-nameuser/role-name /security-role login-config auth-methodBASIC/auth-method realm-namegenomix/realm-name /login-config /web-app The exception happens in initLoginConfig on the line: UserRealm[] realms=ContextHandler.getCurrentContext().getContextHandler().getServer().getUserRealms(); and results because ContextHandler.getCurrentContext() returns null. When dev mode is started this method is called twice, and the exception happens on the second call. For the first call this method does not throw an exception, but realms is empty, and an Unknown realm warning is logged. It looks like maybe I am supposed to define the realm in jetty.xml, but it is not clear to me how this would be done for the instance of jetty launched by GWT. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Invocation Exception at Run time
hm, seems like you dont have a transparent proxy, intstead your backend may be breaking the output, please post the doFilter() method of your proxy filter from the backend which actually handles the request br, On 20 Jul., 18:16, kiss_...@yahoo.com praveenshett...@gmail.com wrote: Hi, Actually our application deals with monitoring the websites. when we make the request through our application we start storing all the resources required by the site (like jpeg,png,hlp,html,js etc) sent the by the webiste in the DB. and then subsequently store all the responses until the request is completed. just like recording all the steps required to access the url that can be played back.. Note : Requesting site comprises of GWT,JSON,Ajax,JSNI scripts. And our Application environment : Eclipse 3.2.2 jdk 1.4.2 ( we may not support higher version of JDK) Now the issue is 1. Normal browser opens the site without any problem 2. through our application the same browser is experiencing Technical Error. Our investigation through firebug(Mozilla) reveals that when opening to the normal browser its giving error while loading the a. a = Type Error: null has no properties { message=null has no properties, more...} after that its is resolving a object is a=haf([object Object] XX. But when the browser opened through our application its giving a =TypeError: null has no properties { message=null has no properties, more...} after that it is continuously giving exception like. a=com.google.gwt.user.client.rpc.Invocation Exception at the end its throwing Technical exception. Thanks in advance. :) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: XSL Transformation, AccessControlException, NoClassDefFoundError and SyntheticRepository
This seems very similar to issue 4267. The issue is the GWT is setting a system property, overriding the default transformer factory. This causes the appengine server to get the wrong transformer factory. The exception you are getting is not exactly the same as the bug, but the circumstances are very similary. A workaround is, in your servlet, set the system property yourself to the java default. This should fix the server (although it might cause an issue in the GWT client, if you are using XML). Note that this is only an issue in the development server and not in production. Here is the issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=4267 Please go and check this issue so it get's some attention. Here is the line of code to set the property on the server to work around the GWT bug: // // When using GWT with appengine, we must override the // default TransformerFactory because GWT writes an invalid // default that causes an exception when trying to // render a XML Representation. This works around the bug. // System.setProperty(javax.xml.transform.TransformerFactory, com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl); On Jul 21, 5:42 am, Jan jan.morl...@googlemail.com wrote: Hi, I would like to use an xsl transformation inside an HttpServlet. The code is essentially the following: File xslfile = new File(test.xsl); TransformerFactory factory = TransformerFactory.newInstance(); factory.setAttribute( debug, true ); Transformer transformer = factory.newTransformer(new StreamSource( xslfile ) ); I already made sure that the xsl file is valid and I defined it as resource-file inside appengine-web.xml If I now call the servlet the first time, the following error occurs: java.lang.ExceptionInInitializerError at com.sun.org.apache.bcel.internal.classfile.JavaClass.init(JavaClass.java: 109) at com.sun.org.apache.bcel.internal.classfile.JavaClass.init(JavaClass.java: 228) at com.sun.org.apache.bcel.internal.generic.ClassGen.getJavaClass(ClassGen.jav a: 174) at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.translate(Style sheet.java: 735) at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java: 354) at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java: 429) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemp lates(TransformerFactoryImpl.java: 795) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTran sformer(TransformerFactoryImpl.java: 617) at com.axag.invoiceedit.server.MY SERVLET.doGet(MY SERVLET:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn gineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) at
Re: Sync AJAX ( instead of async)
I wrote a loading mask that creates a transparent mask over the window to stop input. After a second or two an animated loading message fades into view. That way if the request is quick you don't get a message flashing on and off. On Jul 21, 3:36 pm, cokol eplisc...@googlemail.com wrote: ...in that case it would be an option to show up a modal dialog asking the user to get some coffee :-) @mk youre welcome! On 21 Jul., 20:20, Brian Reilly brian.irei...@gmail.com wrote: Could you get the same effect by preventing user input during your server request, either by finding all of the controls/links and disabling them or overlaying something that receives and swallows all events? At least that way, you're not locking up the browser completely. Is there some other functional requirement that makes synchronous requests a requirement? -Brian On Jul 21, 12:00 pm, mk munna.kaka.ch...@gmail.com wrote: I understand that asynchronous is the way to go and sometimes we change UI design just to support async. But atleast in our project, there are functional requirements where sync is the only solution. (BTW: sync is not as bad. I understand that javascript in browser is single threaded but it's used by a single user to do a single task. And if sync response is required to meet functional need than we got to do sync. It does not effect scalability of whole app ) Anyway any body used any hack to support sync. (Is JSNI the only way to go?) On Jul 21, 9:10 am, Nathan Wells nwwe...@gmail.com wrote: There is only one case I know of where synchronous should be used: when you want to do a server call and get a response when the user is leaving the page. If you don't use synchronous here, you will fail to get the response from whatever asynchronous call you made when the page exits. On Jul 21, 8:14 am, Dimitrijeviæ Ivan dim...@gmail.com wrote: It is strongly recommended to avoid using AJAX on synchronous way! Remember that A in AJAX is for Asynchronous. So you should consider and use this as a feature not as a problem. Using AJAX on Synchronous way is a very common anti pattern in AJAX programming. On Jul 20, 9:09 pm, Prakash prakash.masilam...@gmail.com wrote: Its not possible with GWT. refer below link.http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html Regards, Prakash M. On Jul 20, 10:06 am, mk munna.kaka.ch...@gmail.com wrote: How to make an GWT AJAX call Sync (instead of async) billion years back we used to use a flag as below. how to do it from GWT. AJAX.open(GET, url, false); It's just that for a particular requirement we have to have call sync- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Needing help, building a Login
hi, you dont need to care for session ids, unless cookies are disabled, since almost every servlet container (tomcat, appengine,etc) creates a new sessionid for every request it does not recognize and this sessionid is sent back with a cookie. from now on, the browser automatically sends a cookie for EVERY request from the page, including RPC calls - so you just save whatever you want on the serverside via request.getSession().setAttribute(USER,user); it will work out if you want to support users with cookies disabled, this would be a bit tricky and needs some conventions On 21 Jul., 16:41, AlexG alexander.gauss.ax...@googlemail.com wrote: Hi @ all, I want to build a Suer-Management System, where Users can Login und persist personal Data. I found this article below, as a little how-to-guide. http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecur... What I want, is to save a session id on the client, recieved from the server when logging in. Then for future RPC´s I want to automatically send the session-Id whit it, to identify the users. In the tutorial they say, send the session-Id within the payload of future RPC. My question is, how can I do this? How can I modify the payload, to send the session-Id with the RPC? The following question will be, how can I read this Id from the payload on the server? It would be nice if someone can help me. Greets Alex -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Opening a file
hi actually, this is a question to googles appengine forum, appengine implies many restriction, such as those, you cannot access the filesystem, put the excel file into classpath and access the stream via getResourceAsStream(foo.xls) from your classloader br, On 21 Jul., 16:26, Eric erjab...@gmail.com wrote: The server application has no way of magically accessing client files. Depending on how the web server is configured, it might not be allowed to access files on the server itself. After all, the operators of a web server might be hosting web applications from many different sources. Those operators don't want these applications to interfere with each other or the operations of the server itself. How is your server configured? I assume the file name D:/q.xls is a placeholder for something else; otherwise, you could include it in your WAR file. If the real file comes from your client, use an upload control and an upload handler. Eric -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Dev plugin for firefox 3.7
I'm having the same problem ... just built development plugin from trunk but FF 4.0 still displays its Plugin required... stuff. Working on Ubuntu with actually only newest versions of browsers (Chrome dev channel and FF 3.6 4.0). At least for FF 3.6 a working development plugin exists. Hope this will change soon... Does anyone have a working setup for this combination?: - Ubuntu - GWT Development Mode - Browser supporting Websockets What about other OS? I had it running with FF 4.0 and development plugin build from trunk like two weeks ago but apparently it does not work anymore. Regards, Andreas On 7 Jul., 23:15, 01fetischist 01fetisch...@googlemail.com wrote: Doesn't work withFirefox4.0 beta1 andFirefox4.0 beta2pre (nightlybuild). Tested with gecko1.9.3 plugin-sdk from google and with self build gecko2.0b2pre sdk. I still get the Development Mode requires the Google Web Toolkit Developer Plugin page. Any hints? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Mouse Over Image
Hi, i want to do the following, i want to display a label when the user passes the mouse over the image and i want to hide the label when the user takes out the mouse from the image. Just like a toolkit. What i did is the following, what am i missing? final Label lblRecyclerBin = new Label(Recycler Bin); lblRecyclerBin.setVisible(false); RootPanel.get().add(lblRecyclerBin); final Image imgRecyclerBin = new Image(images/icons/trashcan.png); imgRecyclerBin.setHeight(40px); imgRecyclerBin.setWidth(40px); imgRecyclerBin.setStylePrimaryName(reflex); imgRecyclerBin.addMouseOverHandler(new MouseOverHandler() { public void onMouseOver(MouseOverEvent arg0) { lblRecyclerBin.setVisible(true); RootPanel.get().setWidgetPosition(lblRecyclerBin, imgRecyclerBin.getAbsoluteLeft(), imgRecyclerBin.getAbsoluteTop()); } }); -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.