Re: Mouse Over Image
I believe you need to use the add(Widget, x, y) method on root panel when you add it in the first place so that it sets it as position absolute. Why not just use the alt text on an image(setTitle)? It is a lot less work and is accessable, meaning the alt text is what screen readers look to in order to describe an image for a blind person. On Jul 21, 2:16 pm, nacho vela.igna...@gmail.com wrote: 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.
Re: GWT app looks ugly in IE6
Most large corporations in the US still use IE6 as the primary browser and XP as the primary OS. My company just recently approved the regular use of FF, but you must request it and it is several versions behind the latest. Chrome is regularly rejected. Some computers on our network have IE7, but this is a manual upgrade. I think the latest stat was the 75% of all business computers still run XP, which is why M$ recently agreed to extend support. As long as you aren't targeting people that will be browsing from work computers (i.e. your site will probably be blocked by these companies anyways) you will be fine in forgoing any special tweaking. On Jul 21, 12:37 pm, Alexander Orlov alexander.or...@loxal.net wrote: 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: file upload set filter
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. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How can multiple tabs in the same browser can share the same session?
Depends on your definition of session and if you are using container managed security and if that is the case it can depend on your server. The default session manager for glassfish uses cookies, therefore as long as the user has cookies enabled they will be able to maintain a session as long as that cookie is alive. The problem is that IE and Firefox treat session cookies differently. FF will share session cookies across tabs while IE = 7 will not. There are reports that IE8 will share session cookies across tabs. As we have seen with v8 of IE they are conforming to the rest of the browsers as long as they don't have to maintain bugs from IE6 due to compatibility(the box model bug comes to mind). On Jul 16, 5:40 am, cooolcat coolcat_y...@hotmail.com wrote: Hey, I just started reading about GWT. It is really amazing and the documentation is pretty good. But I still didn't find something useful how GWT works with multiple tabs in the same browser. I guess, when I call the same application in two different tabs, I will have two different sessions. I would like to use the same session, expecially when a user logged in. How can I do this? Can I check in a new tab if a user already logged in, and how can I access this data? Any help is greatly 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: JAXB GWT How I can use JAXB generated classes on client side
It is not possible to convert POJO to XML without using some sort of library, but Jersey does have the ability to do JSON. I use JAXB to generate my server side classes and JAX-RS to marshal to XML and JSON depending on the Accepts header. This is fairly easy to do using a services context resolver annotated with provider and consumes/ produces application/json. I then have written a generator(no I can't provide it, but it is possible) so that I can write an interface for a POJO and it will generate the overlay type for me, but if you are working on a smaller project manually writing the overlay types is the best solution. On Jul 15, 8:27 am, chris chris.hins...@gmail.com wrote: Thank you for the advice and it appears that this would work for server but not for client marshalling. I have been investigating a way to use JAXB to marshall soap requests on the client side but have not found a way as of yet. I would love to get rid of soap all together but unfortunately that will not be possible. Has anyone found a way to marshall the POJO to XML on the client? Thanks, Chris Hinshaw On Jul 15, 1:27 am, Frederic Conrotte frederic.conro...@gmail.com wrote: There is no problem in using JAXB along with GWT. See this thread for explanations:http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=J... On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- 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: is there any json parser that can parse UTF-8 json text
Jersey is a project for implementing REST services, but would probably be overkill for your situation. You could simply write a servlet with a doGet method if you are handling any marshaling yourself. The Jersey project allows you to expose methods to specific URLs and any marshaling/unmarshaling is handled under the covers by these things called providers. It is intended to be used with JAXB to write an XSD from which you generate POJOs with JAXB and Jersey serializes them to XML, but custom providers can also serialize to JSON or you can write custom message body writers for your own protocol. For the simple case you are talking about I would just write a class that extends HttpServlet and overrides the doGet method and writes to the response directly. http://www.javafaq.nu/java-example-code-1022.html On Jul 15, 1:05 am, Alex monsterno...@gmail.com wrote: for client side i have alwasy use com.google.gwt.json.client.JSONParser without any problem. its for my server side. im not trying to convert the json string into java class, but rather i just need to send the string representation of a json object that was extracted from a json array to client side. so its like i have a txt file that contains json array, inside the array has many json object, i just need to randomly pick any one of the json object in that array and send it to client app. does the jersey project thingy able to do that? On Jul 15, 2:39 am, lineman78 linema...@gmail.com wrote: I use overlay types via the javascript JSON.parse method for the client side, which is available in newer browsers and you need to include json2.js for older browsers(eval is also an alternative). For server side, I suggest using the Jersey project with a JSON context provider as shown here: http://blogs.sun.com/enterprisetechtips/entry/configuring_json_for_re... On Jul 14, 7:56 am, Jaroslav Záruba jaroslav.zar...@gmail.com wrote: Have you tried these? for server-side (GAE) *com.google.appengine.repackaged.org.json.JSONObject.JSONObject(String arg0)* for client *com.google.gwt.json.client.JSONParser* I haven't tried japanese or chinese characters though, rather stuff like this: Pøíli¹ ¾lu»ouèký kuò úpìl ïábìlské ódy On Wed, Jul 14, 2010 at 3:43 PM, Alex monsterno...@gmail.com wrote: i tried gson, but it give me error. this is the code i used public class Test { private static final String charEncoding=UTF-8; private static final String fileName=c:\\test.txt; public static void main(String args[]){ try{ File file=new File(fileName); if(file.canRead()){ FileInputStream inStream=new FileInputStream(file); InputStreamReader reader=new InputStreamReader(inStream, charEncoding); JsonParser parser=new JsonParser(); JsonElement jsonA=parser.parse(new BufferedReader(reader)); System.out.println(jsonA.isJsonArray()); System.out.println(jsonA.toString()); } }catch(IOException e){ e.printStackTrace(); } } } the jar from json.org dun work too. so is there any json parser that can parse UTF-8 json text (japanese and chinese character in particular) -- 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: Caution: SmartGwt loadup size is big
SmartGWT is only a GWT wrapper on a javascript library so it is expected that you would have this problem. If you can stand the licensing, GXT is supposed to be a pure GWT implementation of their javascript library, so unused portions of the library are not included. Due to licensing I have not used it, so I can't speak to it's effectiveness. The best solution would be to try and find a project that has the specific widget you want without the overhead. On Jul 14, 5:22 pm, mk munna.kaka.ch...@gmail.com wrote: We have a tiny widget from SmartClient's SmartGwt. And it had increased the intial loadup size between webserver and browser by 2.3MB +.( js, css) Thus be cautious if you think this can hamper performance. (If anybody has solution to above than plz share ). FYI: We do changed header of script to cache all SmartClient's scripts forever. -- 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 Navigation Problem
Look at the history api On Jul 14, 4:16 pm, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: Hi all , i face a problem With Navigation . now i have multiple panel added to the RootPanel ( clear the panel and add the next panel ) now i want to support next back for these panels how i can do it ??? -- 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: JAXB GWT How I can use JAXB generated classes on client side
Personally, I prefer to use Jersey vs GWT RPC because it is more flexible and exposes standard interfaces. For instance, in our group there are both Java and C# guys, so if our webservices have the ability to support multiple standards everyone can use them. I have Jersey set up so that depending on the Accept header it will serve your either XML, JSON or Java serialization. Also, with very little work I can also create SOAP services. I think GWT-RPC is a very nice protocol and is nice for people on small project or don't have to worry about flexability or external interfaces and have complete control of all design decisions in their project, but when you are working in large groups where you don't always have a say in all potential interfaces, then it is better to just use open standards. I have done a few personal GWT projects where I have used RPC, so I am not against it by any means. On Jul 15, 12:10 pm, David Vree david.h.v...@gmail.com wrote: I don't want to hijack your thread, but I am new to this and am wondering why you don't use GWT-RPC to do the client/server communication? On Jul 15, 12:40 pm, lineman78 linema...@gmail.com wrote: It is not possible to convert POJO to XML without using some sort of library, but Jersey does have the ability to do JSON. I use JAXB to generate my server side classes and JAX-RS to marshal to XML and JSON depending on the Accepts header. This is fairly easy to do using a services context resolver annotated with provider and consumes/ produces application/json. I then have written a generator(no I can't provide it, but it is possible) so that I can write an interface for a POJO and it will generate the overlay type for me, but if you are working on a smaller project manually writing the overlay types is the best solution. On Jul 15, 8:27 am, chris chris.hins...@gmail.com wrote: Thank you for the advice and it appears that this would work for server but not for client marshalling. I have been investigating a way to use JAXB to marshall soap requests on the client side but have not found a way as of yet. I would love to get rid of soap all together but unfortunately that will not be possible. Has anyone found a way to marshall the POJO to XML on the client? Thanks, Chris Hinshaw On Jul 15, 1:27 am, Frederic Conrotte frederic.conro...@gmail.com wrote: There is no problem in using JAXB along with GWT. See this thread for explanations:http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=J... On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- 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: Eclipse debugger not running in hosted mode?
Are you running in the embedded server? On Jul 15, 2:05 pm, David Vree david.h.v...@gmail.com wrote: I have tried to use the Eclipse debugger with the sample application in hosted mode, so I know it works. But in my own application (a multi-module maven project) the stop point I put on OnModuleLoad isn't triggering. I've tried many different things. Any ideas? -- 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: Eclipse debugger not running in hosted mode?
You have to make sure you start it with Debug As not Run As On Jul 15, 8:20 pm, David Vree david.h.v...@gmail.com wrote: I believe so, but I don't know how to tell for sure. I can tell you that the Development Mode tab in Eclipse gets focus, and provides me the following URL: http://127.0.0.1:/index.html?gwt.codesvr=127.0.0.1:9997 When I put that URL in the browser the app runs. But no stopping from within Eclipse! On Jul 15, 8:38 pm, lineman78 linema...@gmail.com wrote: Are you running in the embedded server? On Jul 15, 2:05 pm, David Vree david.h.v...@gmail.com wrote: I have tried to use the Eclipse debugger with the sample application in hosted mode, so I know it works. But in my own application (a multi-module maven project) the stop point I put on OnModuleLoad isn't triggering. I've tried many different things. Any ideas? -- 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: Mixed content warning on Chrome (skull and bones)
I believe this is expected behavior, even gmail does this if you have https turned on. What is keeping you from using https for loading the js? The browser doesn't know that the request you are sending doesn't contain any sensitive data, therefore this is a desired behavior as usually there is not real reason not to make a request once an SSL session has been established because at that point a symmetric block cipher is used which has very little overhead. On Jul 14, 10:17 am, Danny Goovaerts danny.goovae...@gmail.com wrote: I've deployed my GWT application over https. To allow caching of the javascript files, I load the bootstrap script over http : script language=javascript src=http://www.cellamea.eu/cellamea/ cellamea.nocache.js/script As expected, this gives amixed content warning on Internet Explorer. On Firefox and Safari, the site loads normally. On Chrome (version 6.0.458.1 dev) however, I get a red skull and bones icon in the URL address bar instead of the green padlock icon. I think that this is even more scary for the users than the mixed content warning on IE. Is this the expected behaviour on Chrome or do should I do something different? Thanks in advance, Danny -- 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: is there any json parser that can parse UTF-8 json text
I use overlay types via the javascript JSON.parse method for the client side, which is available in newer browsers and you need to include json2.js for older browsers(eval is also an alternative). For server side, I suggest using the Jersey project with a JSON context provider as shown here: http://blogs.sun.com/enterprisetechtips/entry/configuring_json_for_restful_web On Jul 14, 7:56 am, Jaroslav Záruba jaroslav.zar...@gmail.com wrote: Have you tried these? for server-side (GAE) *com.google.appengine.repackaged.org.json.JSONObject.JSONObject(String arg0)* for client *com.google.gwt.json.client.JSONParser* I haven't tried japanese or chinese characters though, rather stuff like this: Příliš žluťoučký kuň úpěl ďábělské ódy On Wed, Jul 14, 2010 at 3:43 PM, Alex monsterno...@gmail.com wrote: i tried gson, but it give me error. this is the code i used public class Test { private static final String charEncoding=UTF-8; private static final String fileName=c:\\test.txt; public static void main(String args[]){ try{ File file=new File(fileName); if(file.canRead()){ FileInputStream inStream=new FileInputStream(file); InputStreamReader reader=new InputStreamReader(inStream, charEncoding); JsonParser parser=new JsonParser(); JsonElement jsonA=parser.parse(new BufferedReader(reader)); System.out.println(jsonA.isJsonArray()); System.out.println(jsonA.toString()); } }catch(IOException e){ e.printStackTrace(); } } } the jar from json.org dun work too. so is there any json parser that can parse UTF-8 json text (japanese and chinese character in particular) -- 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: How can i debug an GWT application in IE 7?
There are a few options. There is the new IE developer toolbar: http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038displaylang=en The other option is to compile detailed and get the line number and browse to it using VIM(don't use notepad, large files tend to freeze your computer, download GVIM). This method has been successful for me in the past. On Jul 13, 11:23 pm, nacho vela.igna...@gmail.com wrote: I'm getting an error in the generated js in my app running on ie7. And all i get in the ie console is Argument not valid an the line of the script that is causing the trouble: 44756 :P -- 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: Mixed content warning on Chrome (skull and bones)
Agreed, I had not thought of the caching issue, although this could also be fixed by having your server set the cache-control header to public when serving static content(doesn't work in FF2). An example of how to do this can be seen here: http://onjava.com/pub/a/onjava/2004/03/03/filters.html While I agree that the icon may be a little scary to uninformed users, I think it is probably better that way for the reasons I specified before. At the same time, I wish both IE and Chrome would specify which parts of the page are not secure so that advanced users can know if there is something fishy going on. Just last night I had 2 of my friends who are very non-technical ask me about security when it comes to using free wifi. They have no clue what SSL is and it is much easier for me to tell them to not put in any sensitive information unless there is a lock icon on their screen. In your purposes you are only loading javascript that has not data through an unencrypted connection, but what is to keep you from doing jsonp and sending unencrypted data, which from the browsers perspective looks exactly the same, loading a javascript file. But from the users perspective one is sending personal information over an unencrypted connection and they should be notified because it is fairly serious. On Jul 14, 1:51 pm, Danny Goovaerts danny.goovae...@gmail.com wrote: I'm not worried about the overhead for the encryption. I want to load the js over http because browsers do not cache content that is loaded over https. As my application is fairly large (800k, split into several deferred pieces, some of which are 200k) I want to have it cached as much as possible. This is not such an issue when using the application over Wifi, but it can be an issue when using it on mobile devices, provided they that they do caching of decent sized components (seehttp://www.yuiblog.com/blog/2010/06/28/mobile-browser-cache-limits/ ). I'd just whish that Google had picked another icon than the red skull and bones. On 14 jul, 20:30, lineman78 linema...@gmail.com wrote: I believe this is expected behavior, even gmail does this if you have https turned on. What is keeping you from using https for loading the js? The browser doesn't know that the request you are sending doesn't contain any sensitive data, therefore this is a desired behavior as usually there is not real reason not to make a request once an SSL session has been established because at that point a symmetric block cipher is used which has very little overhead. On Jul 14, 10:17 am, Danny Goovaerts danny.goovae...@gmail.com wrote: I've deployed my GWT application over https. To allow caching of the javascript files, I load the bootstrap script over http : script language=javascript src=http://www.cellamea.eu/cellamea/ cellamea.nocache.js/script As expected, this gives amixed content warning on Internet Explorer. On Firefox and Safari, the site loads normally. On Chrome (version 6.0.458.1 dev) however, I get a red skull and bones icon in the URL address bar instead of the green padlock icon. I think that this is even more scary for the users than the mixed content warning on IE. Is this the expected behaviour on Chrome or do should I do something different? Thanks in advance, Danny -- 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: TablayoutPanel - how to align tabs on right (top)
As far as I can tell, there is no official way to do this, and there is no way to do it in CSS due to the layout being set directly on the elements. I have developed a bit of a workaround but this could be broken by subsequent GWT releases as they make changes to the way the tab panel lays itself out. This is only a partial solution, but you can take the idea and run with it. If you are dynamically adding tabs you will need to change the float when they are created. public TabPanelRight() { // INIT TABS HERE // set the tab divs to float:right instead of float:left for (Element el:getChildElementsWithClass(tabPanel.getElement(), gwt-TabLayoutPanelTab)) el.setAttribute(style, float:right;); // clearing left gets overriden by the layout, there is probably a better way to do this tabPanel.setVisible(false); DeferredCommand.addCommand(new Command(){ @Override public void execute() { getChildElementsWithClass(tabPanel.getElement(), gwt- TabLayoutPanelTabs).get(0).getStyle().clearLeft(); tabPanel.setVisible(true); }}); } private ListElement getChildElementsWithClass(Element parent, String styleClass) { ListElement toReturn = new ArrayListElement(); NodeListNode children = parent.getChildNodes(); for (int i = 0; i children.getLength(); i++) { Node child = children.getItem(i); if (child.getNodeType() == Node.ELEMENT_NODE) { for (String className: ((Element)child).getAttribute(class).split( )) if (className.equals(styleClass)) toReturn.add((Element)child); toReturn.addAll(getChildElementsWithClass((Element)child, styleClass)); } } return toReturn; } On Jul 13, 9:49 am, Trevis trevistho...@gmail.com wrote: I would also like to know the answer to this question. My ui drafts are mocked that way. I figured that by the time I got around to doing layout that I'd stumble into the answer. I have t dug I to it myself yet but I am geting close to needing to know. I'm sure that I could just change the standard.css file but I hope that there is an official way to do this. On Jul 12, 2:48 pm, Akshay Kumar kumar.aks...@gmail.com wrote: Hi, I assume, by rtl, you meant right-to-left. Then, no, my UI designer gave me this design to have the tab-headers on the right. I do not want to go back to UI-designer that its not possible, unless I have tried my options. thanks, Tkshay On 13 July 2010 00:19, Stefan Bachert stefanbach...@yahoo.de wrote: Hi, Did you want to support a rtl language? When yes, try to switch to it. Some widget support it. Stefan Bachert http://gwtworld.de On 11 Jul., 13:46, Akshay Kumar kumar.aks...@gmail.com wrote: I am using TabLayoutPanel (in UiBinder xml), and the tab handles ( headers) are by default on top-left. Cant seem to figure out any api option to align the tab-headers on the top-right. I tried TabPanel also but without any luck. something like this: [ Tab1 ]_[ Tab2 ]_[ Tab3 ]_ | | | | | | | | | | |_| -- 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%2Bunsubs cr...@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: Deploy static content in Webserver and Dynamic in App server
Please be more specific on the form of communication you would like to do and how you are handling the DNS for having 2 servers handling requests(i.e. different subdomains, ports, etc.). Remember, because of the SOP you can only make data requests to the same server and port the page originated from, unless you are willing to play around with JSONP. On Jul 13, 6:24 pm, my explo...@gmail.com wrote: I am trying to deploy an application built with GWT. Would like to know how to create a build so that I can deploy static content on the Webserver and dynamic content on app server. I use Websphere(App Server), IBM Httpd server(Webserver). Please do not suggest me that I can put all into one war file and deploy into App Server. My real question is separation of duties between Web App Server. Thanks in Advance for the support. -MY -- 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: difference in alignment on different browsers
Sorry for the late response, align is not a valid css property, use text-align:left; On Jul 10, 11:31 pm, Vik vik@gmail.com wrote: any help on this plz... Thankx and Regards Vik Founderwww.sakshum.comwww.sakshum.blogspot.com On Fri, Jul 9, 2010 at 10:35 AM, Vik vik@gmail.com wrote: hie thanks looks helpful... The firebug shows following layout td align=center fieldset table clogroup/colgroup tbody . . . and so on /tbody in firebug i add align=left to tbody then it fixes the issue. However, in css if add following it doesn't work: fieldset table tbody { align: left; } any advise plz Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Thu, Jul 8, 2010 at 9:40 PM, lineman78 linema...@gmail.com wrote: IE seems to be inheriting the align=center from the parent td. the simple way is to add align=left on the form table, but you could add it to each cell individually using the cell formatter. Depending on the GWT panels you are using there are multiple different ways to solve this. Essentially the difference is inheritance in IE vs Gecko/ Webkit. On Jul 8, 9:43 am, Vik vik@gmail.com wrote: Hie Check out pleasehttp:// 1.latest.sakshumweb20.appspot.com/ui/page/DonorRegister.jsp and notice the alignment of fields in IE Vs chrome/firefox The one coming in chrome or firefox is the desired one. So how to fix it for IE? And I thought i dont need to take care cross browser stuff using gwt Thankx and Regards Vik Founderwww.sakshum.comwww.sakshum.blogspot.com -- 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: Passing data between modules - MVP architecture
May I also suggest that you look at an approach based on GWT exporter so you can make calls between the modules directly. I have been playing around with making a GWT based plugable portal architecture based on this approach and have been partially successful in my limited experimentation. On Jul 9, 9:35 am, grandanat marian.strug...@gmail.com wrote: Hello all. I Have a simple scenario: -a GWT application with an application controller that handles history and initialize modules. ( a module is an entity formed by a presenter + view - classic MVP, nothing special) -from a module should be opened another module and pass init data to it, and then after child module finishes its job to return another response data. I followed two approaches and i would like to comment them. 1.eventBuss approach - pass data within events. i have StartChildModuleEvent event that encapsulates a module parent ID, and some init data, and an ExitChildModuleEvent event that encapsulates some return data. 2 callback approach. i added to my modules a callBack handler public abstract class ModuleCallBackHandlerD, T implements DataCallBackHandlerT { private ModuleID parentID; private D initData; private T returnData; public ModuleCallBackHandler(ModuleID parentID) { this.parentID = parentID; } public ModuleCallBackHandler(ModuleID parentID, D initData) { this.parentID = parentID; this.initData = initData; } public void onCancel(){ } public void onFailure(Throwable caught){ Window.alert(AppGin.injector.getAppConstants().msg_moduleError() + : + caught.getMessage()); // caught.printStackTrace(); } public ModuleID getParentID() { return parentID; } public D getInitData() { return initData; } public T getReturnData() { return returnData; } } and when i want to init a child module i instantiate a new callback AppGin.injector.getAppController().doStartChildModule(ModuleID.ITEMSEARCH, new ModuleCallBackHandlerString, Item(getModuleID(), itemID) { @Override public void onSuccess(Item result) { //do some stuff - update this module with received data } }); I would like some opinions regarding this two approaches. Thanks all -- 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 get the loading symbol while the application is loading in gwt 2.0.3
You will need to implement it in html and hide it once the application loads. You might have to move the script tag out of the head to the bottom of the body to allow it to paint the page before fetching. On Jul 9, 2:44 pm, gourineni rakesh rg...@msstate.edu wrote: Hi, I am using gwt 2.0.3 in an Eclipse project. When I run the java code in eclipse I get the url n by pasting it in the web browser I need to wait for some time to get the application.So I need to get The application is loading while I wait for the appliocation to load . I have no idea how to do this plz help me. thanls in advance. Regards, Rakesh. -- 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: Shared CSS
Yeah, all you need is a simple EntryPoint class that just calls StyleInjector.injectCss in the onModuleLoad method. On Jul 8, 8:48 pm, Hethcox heth...@gmail.com wrote: Thanks for all the great suggestions. The shared library has a gwt.xml file but is not an EntryPoint. Can I just pick a class in the library and have it implement EntryPoint to get the shared CSS loaded? To answer the other follow-up questions, I am deploying each app as a separate war file. All of the styles are set through code, so the class names can be obfuscated. John On Jul 8, 6:25 pm, lineman78 linema...@gmail.com wrote: There are many possible solutions for the generic problem you face. You will need to be more specific about your final deployment architecture if you would like a more specific answer of which is best. Are these GWT apps all going to be deployed within the same WAR? EAR? Separate EARs? Is the only thing referencing these classes GWT objects, or do the class names need to remain unobfuscated? If you are willing to go through using a CssResource and obfuscating the class names I would suggest creating a common module and inherit the module whenever you need to use the classes. In the entry point for the common module you would inject the style. If the css must remain unobfuscated, it depends on your final deployment. If they are in different WARs, then I would again create a common module, but add a public path to the module so that if you inherit the module it will write the script to it: module inherits name=com.google.gwt.user.User / source path=client/ public path=www/ stylesheet src=Library.css/ entry-point class=com.ams.common.client.gwt.client.CommonEntryPoint/ /module Put the file Library.css into com/ams/common/client/gwt/www If they are all in 1 WAR, the best method would be to manually copy the file to the WAR root and add the link to your html files. On Jul 7, 10:27 am, Hethcox heth...@gmail.com wrote: Hello, I have a GUI library that is used by several GWT apps. I would like the widgets in the library to use a standard sets of CSS classes from the library so that they don't have to be copied and maintained in the apps that use the library. The library is deployed as a jar currently, but that can change. I've read a lot of posts on this topic, but none of them seems to do the trick. My target platform is JBoss and the closest solution I've found so far is to put the library CSS file in ROOT.war/css at deploy- time. Is there a build-time trick to get the GWT apps to deploy the CSS file when it cross-compiles the library widgets? Cheers, John -- 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: difference in alignment on different browsers
IE seems to be inheriting the align=center from the parent td. the simple way is to add align=left on the form table, but you could add it to each cell individually using the cell formatter. Depending on the GWT panels you are using there are multiple different ways to solve this. Essentially the difference is inheritance in IE vs Gecko/ Webkit. On Jul 8, 9:43 am, Vik vik@gmail.com wrote: Hie Check out pleasehttp://1.latest.sakshumweb20.appspot.com/ui/page/DonorRegister.jsp and notice the alignment of fields in IE Vs chrome/firefox The one coming in chrome or firefox is the desired one. So how to fix it for IE? And I thought i dont need to take care cross browser stuff using gwt Thankx and Regards Vik Founderwww.sakshum.comwww.sakshum.blogspot.com -- 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: Shared CSS
There are many possible solutions for the generic problem you face. You will need to be more specific about your final deployment architecture if you would like a more specific answer of which is best. Are these GWT apps all going to be deployed within the same WAR? EAR? Separate EARs? Is the only thing referencing these classes GWT objects, or do the class names need to remain unobfuscated? If you are willing to go through using a CssResource and obfuscating the class names I would suggest creating a common module and inherit the module whenever you need to use the classes. In the entry point for the common module you would inject the style. If the css must remain unobfuscated, it depends on your final deployment. If they are in different WARs, then I would again create a common module, but add a public path to the module so that if you inherit the module it will write the script to it: module inherits name=com.google.gwt.user.User / source path=client/ public path=www/ stylesheet src=Library.css/ entry-point class=com.ams.common.client.gwt.client.CommonEntryPoint/ /module Put the file Library.css into com/ams/common/client/gwt/www If they are all in 1 WAR, the best method would be to manually copy the file to the WAR root and add the link to your html files. On Jul 7, 10:27 am, Hethcox heth...@gmail.com wrote: Hello, I have a GUI library that is used by several GWT apps. I would like the widgets in the library to use a standard sets of CSS classes from the library so that they don't have to be copied and maintained in the apps that use the library. The library is deployed as a jar currently, but that can change. I've read a lot of posts on this topic, but none of them seems to do the trick. My target platform is JBoss and the closest solution I've found so far is to put the library CSS file in ROOT.war/css at deploy- time. Is there a build-time trick to get the GWT apps to deploy the CSS file when it cross-compiles the library widgets? Cheers, John -- 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: gson module problem
The easiest way to convert between JSON and GWT objects is to use overlay objects. Unfortunately, there is no type checking by doing this, but you get the best performance. Now, if you need to support older versions of IE you will need to include json2.js in your project, but you can use the JSON.parse and JSON.stringify functions to convert between javascript objects and a JSON string. http://code.google.com/p/google-web-toolkit/wiki/OverlayTypes On Jul 7, 10:41 am, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: i need to convert JSON to/From Java Object how to do it ? i don't know how to use this way On Jul 6, 10:35 pm, eggsy84 jimbob...@hotmail.com wrote: Hi all, With the latest versions of GWT you don't have to use any other libraries. GWT now comes with something known as Javascript Overlays that you can utilise to convert JSON into Objects. See here: http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsOver... Also I have made a bit of a discussion on my blog here: http://eggsylife.co.uk/2010/04/22/gwt-2-jsonp-and-javascript-overlays... Hope this helps, Eggsy On Jul 6, 1:38 pm, Harald Pehl harald.p...@googlemail.com wrote: You cannot use gson in GWT. Seehttp://groups.google.com/group/google-gson/browse_thread/thread/6c3d6... for more infos. If you need a JSON parser for GWT take a look at Piriti (http:// code.google.com/p/piriti/). - Harald On 6 Jul., 12:30, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: Welcome , i add gson lib version 1.4 and i face a problem when trying to inherit it in the gwt.xml file how i can fix this problem ??? thanks , ahmed shoeib -- 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: gson module problem
Looks like you are using client side code on the server. You need to make sure you have a clear understanding of how you are handling communications. It looks to me that you have JSNI is a server class. Remember, anything that has a nitave method cannot be loaded by the server unless that native method is JNI not JSNI. My preferred method of communication is to use Jersey(JAX-RS) for the server-side JSON generation and use the RequestBuilder/OverlayType method for the client side. This is not the only way to do this, this is just the method that I have chosen to use the most modular and open approach. If you are only going to be communicating back and forthe between your own application, why not use GWT's RPC. But if you are set on JSON, I would suggest not writing any client code first, just the server and use your browser to access the webservice and ensure that you are indeed getting the expected JSON, then once you have verified that you can use RequestBuilder to access the same URL and get the JSON as a string at which point you can process it into an overlay type and use it within GWT. On Jul 7, 5:05 pm, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: The Problem line java.lang.UnsatisfiedLinkError: com.apphuset.eventbuddy.server.MembersServiceImpl.asArrayOfMember_JSON(Ljava/ lang/String;)Lcom/google/gwt/core/client/JsArray; at com.apphuset.eventbuddy.server.MembersServiceImpl.asArrayOfMember_JSON(Native Method) at com.apphuset.eventbuddy.server.MembersServiceImpl.doPost(MembersServiceImpl.java: 43) 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) On Jul 7, 8:29 pm, Marcus Vinícius Bastos de Andrade mynameisf...@gmail.com wrote: Use JSON in GWT ? It looks like PHP programming! On Wed, Jul 7, 2010 at 1:41 PM, Ahmed Shoeib ahmedelsayed.sho...@gmail.comwrote: i need to convert JSON to/From Java Object how to do it ? i don't know how to use this way On Jul 6, 10:35 pm, eggsy84 jimbob...@hotmail.com wrote: Hi all, With the latest versions of GWT you don't have to use any other libraries. GWT now comes with something known as Javascript Overlays that you can utilise to convert JSON into Objects. See here: http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsOver... Also I have made a bit of a discussion on my blog here: http://eggsylife.co.uk/2010/04/22/gwt-2-jsonp-and-javascript-overlays... Hope this helps, Eggsy On Jul 6, 1:38 pm, Harald Pehl harald.p...@googlemail.com wrote: You
Re: Urgent!!!!!!!!!!!!!!!!!!!!!!!!!!! GWT 2 Memory leak
If it is an obvious problem in your code, you should be seeing memory leaks in all browsers(which I believe you said you have). If that is the case, you should be able to use the Speed Tracer plugin for chrome. It tells you how many instances of which objects are being created so that you can try and debug where you are holding a reference to the object. Remember, in javascript there is no concept of weak or soft references, so you have to be holding on to an object somewhere in the DOM in order for there to be a memory leak. A memory leak is not something that people here will be able to help you solve directly, we can only give you pointers on ways to narrow down the search. Also, if you are using flash, it is a common source of memory leaks and it would explain the leaks persisting beyond the single page(this could also be explained by a Java applet because only one JVM is used throughout the entire browser). On Jul 6, 6:15 pm, tarik kandil tarikkan...@gmail.com wrote: First, I would like to mention that I am using GWT2.0. I have a problem in a data table that I have developed using JQuery, I have many widgets, and I am using gwittir binding. Besides, I am using bindable collection in my datatable. After analysing my application, I found that there are some elements that are not deleted in IE6. Also, the memory keeps incrceasing all the time. Even if i change to a new page or i refresh the memory keeps increasing when i filtre or go to another page or I do any action(memory leak). Can you please tell me how to avoid the increasing of the memory through the whole application, add methods to delete elements when i go from page to page, or something like this. Thank you in advance. 2010/7/6 Matthias Groß f0r7y@googlemail.com Hi, I doubt that you will get any definite answers if you don't provide a more thorough analysis of your problem. Generally just try to release all references to heavy-weight objects you don't need anymore as soon as possible. This holds true especially for global instances, e.g. singletons. If that doesn't help consider using weak references (see http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/WeakReference.html). /Matthias P.S.: Also use less exclamation marks 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Tarik Kandil Consultant Informatique -- 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.
Standards Mode + Decorated Popup Panel + IE == FAIL
I am having a problem where I have changed to standards mode in order to use layout panels, but it seems to have broken decorated popup panel in IE(the popup shows, but the rest of the screen turns white behind it). I have taken a very rough look with Firebug Lite and didn't see anything obvious and was just wondering if anyone else has seen this problem. Again, I have not done a whole lot of debugging yet, but I am in standards mode with IE6 and a DockLayoutPanel as my root. When I click on the button to pop up the popup shows up, but everything else goes white, but as soon as you resize the window everything paints correctly again. Is there a way to tell the browser to manually do a repaint maybe? -- 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: Layout UI Objects and GWT Themes
Yeah, I am using the webkit and moz border radius for now. I understand that I could use decorated panel inside the tabs, but from what I know you can't tell decorated panel to do just rounded corners on the top. I think what I may do is just use css3 stuff and when it comes to browser selection use that to push a modern browser. I just wish that the GWT themes was fully supported with all the 2.0 stuff including ClientBundle. On Jun 15, 8:05 am, Stefan Bachert stefanbach...@yahoo.de wrote: Hi, Old widgets uses a 9-box (a table with 3x3 entry). CSS3 allows to similate a 9 box with border images. However, images inccrease download time. And CSS3 allows to apply rounded corner (-o/-moz/-webkit/-border- radius) Without a modern browser you still have to take 9 box. Stefan Bacherthttp://gwtworld.de On Jun 14, 7:57 pm, lineman78 linema...@gmail.com wrote: Does anyone know if there is a way to theme the new layout-based panels? I.E. TabLayoutPanel to look like DecoratedTabPanel. I know that they limited the amount of style classes involved in the new tab panel, so I cannot figure out a way to retrofit the DecoratedTabPanel styles to the TabLayoutPanel, such as rounded corner tabs. -- 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.
Layout UI Objects and GWT Themes
Does anyone know if there is a way to theme the new layout-based panels? I.E. TabLayoutPanel to look like DecoratedTabPanel. I know that they limited the amount of style classes involved in the new tab panel, so I cannot figure out a way to retrofit the DecoratedTabPanel styles to the TabLayoutPanel, such as rounded corner tabs. -- 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: Exchange datas between modules
See GWT Exporter. This allows you to inject unobfuscated javascript functions so you can call them through JSNI from the other module. If you don't want to include exporter, all you have to do is inject the functions through JSNI on module load. DISCLAIMER: this is untested, you might have to modify to get it to work/compile. public abstract class ModuleEntryPoint implements EntryPoint { protected abstract String getModuleId(); public abstract void recieveData(String data); public void onModuleLoad() { injectCallback(this, getModuleId()); } private native void injectCallback(ModuleEntryPoint instance, String moduleId)/*-{ if ($wnd.moduleDataInterfaces == undefined) $wnd.moduleDataInterfaces = []; $wnd.moduleDataInterfaces[moduleId] = function(data) { return instan...@com.google.example.moduleentrypoint::recieveData(Ljava/lang/ String;)(data); } }-*/; public static native void sendData(String moduleId, String data)/*- { if ($wnd.moduleDataInterfaces != undefined) $wnd.moduleDataInterfaces[moduleId](data) ; }-*/; } On May 12, 8:36 am, djd alex.dobjans...@gmail.com wrote: No easy way to do this, One way is to use JSNI, write to DOM in one module, read in the 2nd. The problem here is serialization of these 2 events (read write) - meaning u should be sure the data was actually written before reading them. Another way is to set a callback to DOM that listens to data :) (in the module that needs reading). And write with the 2nd module (after you have set the callback). Or you could eliminate these indirect methods and use a 3rd module that connects those 2 :) - which I actually suggest. Regards package module1 method1 (Data data) { module2.class2.method2 (data); } when you consider a more complex case, you need to explain what you are going to do?. Stefan Bacherthttp://gwtworld.de On 12 Mai, 08:43, Stefan Ludwig tapir0...@gmail.com wrote: Hi, how I can exchange datas between two GWT modules? I there a way? Or/ and how can I dispatch an event in another module (like button click)? Thanks Stefan -- 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 athttp://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 athttp://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 athttp://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.
Widget from DOM element
I have had difficulty finding this and figure it must be something stupid I can't find, but how do you create a widget from an element already in the DOM so you can get eventing, or one not in the DOM so you can add it to a panel? -- 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 can I override gwt standard stylesheet with ClientBundle
Use the @external annotations in your css. On Apr 20, 3:52 pm, Vaibhav vkaka...@gmail.com wrote: If I want to change DatePicker object look and feel with ClientBundle how can I do this? How can I override gwt standard stylesheet of other gwt objects using ClientBundle? -- 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 athttp://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: Issue with deferred binding
The underlying class is not using deferred binding, therefore your replace-with is never considered. In order for deferred binding to work, you must use GWT.create(); What I would suggest you do is do your own request builder implementation. There are many ways you can do this, but to do defferred binding you have to call GWT.create somewhere along the way and it must match or be a sub class of the class listed in when-type-is. On Apr 16, 12:41 pm, snctln catlin.s...@gmail.com wrote: [Sorry in advance for the lengthy post, I just posted this question over on stack overflow and copy/pasted the question here for more visibilty, so this is formatted with markup and all links referenced are at the bottom of the post] I developed a web app using GWT about 2 years ago, since then the application has evolved. In its current state it relies on fetching a single XML file and parsing the information from it. Overall this works great. A requirement of this app is that it needs to be able to be ran from the filesystem (file:///..) as well as the traditional model of running from a webserver (http://...) Fetching this file from a webserver works exactly as expected using a [RequestBuilder][1] object. When running the app from the filesystem Firefox, Opera, Safari, and Chrome all behave as expected. When running the app from the filesystem using IE7 or IE8 the [RequestBuilder.send()][2] call fails, the information about the error suggests that there is a problem accessing the file due to violating the [same origin policy][3]. The app worked as expected in IE6 but not in IE7 or IE8. So I looked at the source code of [RequestBuilder.java][4] and saw that the actual request was being executed with an XMLHttpRequest GWT object. So I looked at the source code for [XMLHttpRequest.java][5] and found out some information. Here is the code (starts at line 83 in XMLHttpRequest.java) public static native XMLHttpRequest create() /*-{ if ($wnd.XMLHttpRequest) { return new XMLHttpRequest(); } else { try { return new ActiveXObject('MSXML2.XMLHTTP.3.0'); } catch (e) { return new ActiveXObject(Microsoft.XMLHTTP); } } }-*/; So basically if an XMLHttpRequest cannot be created (like in IE6 because it is not available) an ActiveXObject is used instead. I read up a little bit more on the IE implementation of XMLHttpRequest, and it appears that it is only supported for interacting with files on a webserver. I found a setting in IE8 (Tools-Internet Options-Advanced-Security-Enable native XMLHTTP support), when I uncheck this box my app works. I assume this is because I am more of less telling IE to not use their implementation of XmlHttpRequest, so GWT just uses an ActiveXObject because it doesn't think the native XmlHttpRequest is available. This fixes the problem, but is hardly a long term solution. I can currently catch a failed send request and verify that it was trying to fetch the XML file from the filesystem using normal GWT. What I would like to do in this case is catch the IE7 and IE8 case and have them use a ActiveXObject instead of a native XmlHttpRequest object. There was a posting on the GWT google group that had a supposed solution for this problem ([link][6]). Looking at it I can tell that it was created for an older version of GWT. I am using the latest release and think that this is more or less what I would like to do (use [GWT deferred binding][7] to detect a specific browser type and run my own implementation of XMLHttpRequest.java in place of the built in GWT implementation). Here is the code that I am trying to use package com.mycompany.myapp.client; import com.google.gwt.xhr.client.XMLHttpRequest; public class XMLHttpRequestIE7or8 extends XMLHttpRequest { // commented out the override so that eclipse and the ant build script don't throw errors //@Override public static native XMLHttpRequest create() /*-{ try { return new ActiveXObject('MSXML2.XMLHTTP.3.0'); } catch (e) { return new ActiveXObject(Microsoft.XMLHTTP); } }-*/; // have an empty protected constructor so the ant build script doesn't throw errors // the actual XMLHttpRequest constructor is empty as well so this shouldn't cause any problems protected XMLHttpRequestIE7or8() { } }; And here are the lines that I added to my module xml replace-with class=com.mycompany.myapp.client.XMLHttpRequestIE7or8 when-type-is class=com.google.gwt.xhr.client.XMLHttpRequest/ any when-property-is name=user.agent value=ie7 / when-property-is name=user.agent value=ie8 / /any /replace-with From what I can tell
Re: GWT Login/ Logout/ Remember Me (with concern in preventing Cross-Site Request Forgeries) Example
I suggest using container managed security so that you don't have to deal with most of this. I have implemented a GWT-based form login, but it required some hackery because of the way tomcat/glassfish handle redirecting for form login using request dispatching, therefore causing your moduleBaseUrl to be off and not being able to load any of the successive resource files. I was able to work around this using a jsp to do a meta redirect so that the browser would go to the real url. On Apr 7, 3:57 pm, Sripathi Krishnan sripathikrish...@gmail.com wrote: For general ideas on how to implement remember me, the thread you started on stackoverflowhttp://stackoverflow.com/questions/2594960/best-pratice-to-implement-...should get you answers. I will try to answer the GWT specific things you should be doing over here. If you haven't already, please readhttp://groups.google.com/group/Google-Web-Toolkit/web/security-for-gw Its a bit dated, and will perhaps take you a while to go through it, but it is definitely worth reading if you are concerned about security. Once you have implemented remember-me, it is important that your website doesn't have XSS (cross site scripting) or CSRF (cross site request forgery) loopholes. Additionally, you must use a SSL certificate (https) to protect the cookie from a man-in-the-middle attack. Some suggestions for XSS and CSRF from a GWT perspective - *Cross Site Scripting* - Within GWT code, be wary of innerHTML() and eval() methods. Make sure that whatever string you pass to these methods is trusted. If its not trusted, you'd have to escape the stringshttp://www.530geeks.com/encode.jspappropriately. GWT takes care of things everywhere else. - If you are using JSNI, make sure you don't insert untrusted content into the dom. Same as above, use escaping if the strings are not trusted. - If you use an external javascript library, make sure it doesn't have loopholes. - Finally, if you use a jsp/servlet to generate the html, make sure that it doesn't echo input parameters without first escaping them. *Cross Site Request Forgery* - If you use GWT RPC (whether the legacy one or the new deRPC), you are already protected. GWT sets custom request headers before making a RPC call. It also uses post with a custom content type. These cannot be forged using a script/image/iframe/form from another domain. - If you use RequestBuilder to download JSON / XML, then you are on your own. Follow the best practices laid down by OWASPhttp://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29_ GWTs security noteshttp://groups.google.com/group/Google-Web-Toolkit/web/security-for-gw...also has notes on how to protect against csrf. --Sri On 8 April 2010 02:36, Manuel Carrasco Moñino man...@apache.org wrote: GWT (client side) has nothing to do with HttpOnly cookies because the browser can not read them using javascript. You have to face it in the server side, sending a cookie from your servlet to the browser with the HttpOnly attribute set, the browser will remember it, and the next time it loads the GWT application it has to ask the server via RPC to know if the user has the appropriate cookies, if not you have to show the login screen. -Manolo On Wed, Apr 7, 2010 at 8:17 PM, yccheok yancheng.ch...@gmail.com wrote: Does anyone have a good code example, on how to implement login/logout/ remember me feature, using GWT, with concern on Cross-Site Request Forgeries. My plan is to use HttpOnly : http://www.codinghorror.com/blog/2008/08/protecting-your-cookies-http... However, I am not sure whether that will be sufficient enough. 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-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 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
Re: gwt rpc - Client did not send 199 bytes as expected - RPCServletUtils.readContentAsUtf8
I remember having this problem with IE6 on older versions of GWT, I'm not sure it is fixed as since OOPHM I don't use IE anymore. On Apr 14, 12:25 pm, Simon Botting simon.bott...@enbuenosaires.com wrote: Hi, The following exception is thrown for around 5% of the requests that are made through gwt rpc on our production server - the number of bytes changes (in this case its 199) 04/13 21:36:20 ERROR in web.HibernateSessionRequestFilter.doFilter(line:57): Exception while dispatching incoming RPC call javax.servlet.ServletException: Client did not send 199 bytes as expected at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8(RPCServletUtils.java:185) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.readContent(AbstractRemoteServiceServlet.java:179) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:215) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) I think this is the version of the src file: http://code.google.com/p/google-web-toolkit/source/browse/branches/sn... I suspect that it's something to do with the fact that the html page that hosts the gwt module is in charset iso-8859-1 and not in utf-8, although I'm surprised that it only happens periodically in 5% of the cases, perhaps its a particular browser / version combination. The site is a spanish language site, so its very possible that the information sent would have characters with accents. Has anyone else had this problem is there a way that I can indicate to GWT that the charset of the page is iso-88591. Any suggestions greatly appreciated. Cheers Simon -- 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: Loading please wait + Animated GIF
I have noticed the same issue. I know that javascript runs single threaded, but I believe that the gif animation should run on a seperate thread. Have you run this experiment on browsers that use a different threading model like the newer version of Chrome (soon coming to FF). Just because javascript is single threaded doesn't mean that the rendering engine needs to be on that same thread. On Apr 13, 4:30 am, Yogesh yogeshrn...@gmail.com wrote: Hi, I am showing a Loading, please wait.. message along with an animated gif. For this I have added following in my host page. div id=loadingimg src=loading.gif/ Loading Please wait../div I have usedhttp://www.ajaxload.info/ to generate a simple loading GIF image. And onModuleLoad() I am am removing this div before adding actual components into Rool Panel. This is working fine. The issue is that the animation of the GIF is not displayed. I found out that when javascript code in mymodule.nocache.js starts running in browser, the animation of GIF stops. I even wrote following HTML page to test this. When I click on Click me button, I just run some big for loop in javascript. When the javascript is running, the animation of GIF is stopped. script function bigJS() { for (var i=1; i=1000; i++); alert('done');} /script BODY div id=loadingimg src=loading.gif/ Loading Please wait../div input id=btnClick name=btnClick type=button value=Click me! onclick=bigJS() / /BODY Anyone know how to display the animated GIF properly? -- 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: -port keeps disappearing
I have had not problems with the following changes to the default settings: Server Tab: Uncheck Run built-in server GWT Tab: Change the url to the URL of the html file associated with the module. (http://localhost:8080/ams/index.html) There should be no need to modify the arguments directly if you just change those 2 settings. The other stuff is internal eclipse plugin stuff that you shouldn't be messing with. On Apr 13, 4:55 am, Ian Bambury ianbamb...@gmail.com wrote: So why doesn't the embedded server do it that way? Still seems like a bug to me. Ian http://examples.roughian.com On 13 April 2010 10:24, Thomas Broyer t.bro...@gmail.com wrote: On Apr 13, 7:19 am, Abdullah Shaikh abdullah.shaik...@gmail.com wrote: OK, but is it not required to specify the port no. of my external server ? I am using port 8080. Not at all. You can specify a -startupUrl so the DevMode appends the ?gwt.codesrv= and you just have to copy/paste it to your browser; e.g. -startupUrl http://myserver:8080/myapp.php -- 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: Scrollbars for VerticalPanel?
I don't see why you would need this. Whenever you use RootPanel is adds it directly to the document body. I suggest using firebug to debug this problem and check out the html directly. Make sure you or one of your inherited modules is not calling Window.enableScrolling(false);. RootLayoutPanel, from my understanding will give you the effect that you specified, but if you do not use layout panels you should not experience this issue. A VerticalPanel is essentially a one columned table. The html in firebug from calling RootPanel.get().add(new VerticalPanel()); should look like this: body table/ /body On Apr 12, 2:37 am, Gilbert Corrales gcorra...@gmail.com wrote: good timing, we just went thru the same headache a couple of days ago as we are using GWT to build our admin website. the problem that you are facing is that by default the RootPanel and the RootLayoutPanel will wrap everything you put on with a couple of divs that will intentionally remove any scroll from your components while at same time expecting your root widget to take over all of the screen, at least this is what we found out checking the html it generates... and this might not fit everyone's wishes. now to fix this, we found that adding a ScrollPanel as the root widget and then inside of it the VerticalPanel get things rolling. if you use UiBinder it will look something like this: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' g:ScrollPanel g:VerticalPanel g:LabelMake it grow and grow/g:Label /g:VerticalPanel /g:ScrollPanel /ui:UiBinder if not you can pretty much do the same with code. hope this helps :) cheers! p.s we are putting a blog post right now with a little bit more detail on this as we found no help elsewhere, will update when it's live. -- 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 download a JSON object from my GWT server?
I would suggest using jersey services with a custom services context resolver. Put the following file in the same package as your jersey services and replace **SerializableObject** with all of your root elements. Then check out the getting started guide on jersey.dev.java.net @Provider public abstract class ServicesContextResolver implements ContextResolverJAXBContext { private JAXBContext jsonContext; private static final Class?[] types = {**SerializableObject**.class}; public ServicesContextResolver() { try { jsonContext = new JSONJAXBContext(JSONConfiguration.natural().build(), types); } catch (JAXBException e) { e.printStackTrace(); } } @Override public JAXBContext getContext(Class? objectType) { return jsonContext(); } } On Apr 9, 8:23 am, Sripathi Krishnan sripathikrish...@gmail.com wrote: You need to set the HTTP header *addHeader(Content-Disposition,attachment; filename=some-file-name.json* ); --Sri On 8 April 2010 23:36, Sherry mywacco...@gmail.com wrote: Hi, I would like to have my application return a JSON object for download. I'm trying to simulate the behavior that happens when I access the page: http://search.twitter.com/trends/current.json?exclude=hashtags; in which the Chrome browser automatically downloads a file current.json . I've tried to print the JSON string into the output or through a JSP but it doesn't work (I need to return this JSON file into an XMLHttpRequest object). I've copied the current.json file I downloaded from the twitter link above into my WAR folder, but when I access it through Chrome it just opens its contents in the browser, and I would like to be able to download it, as in the twitter link. Can anyone direct me how to force this download to happen? Thank you Sherry. -- 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.
Hosted mode problem with JSO
I am trying to write a generator to handle JSON overlay types for me, but have run into a problem in hosted mode. I have an object that contains an array of JSOs so i do JavaScriptObject jso = messages.getMessages[0]; and I get the following problem: java.lang.ClassCastException: com.google.gwt.core.client.JavaScriptObject$ cannot be cast to [Lcom.google.gwt.core.client.JavaScriptObject; I think it has something to do with some trick OOPHM does to get it to work, but I was hoping someone familiar with hosted mode and OOPHM could help me find a fix for this. public interface LogMessages extends JSONObject { public JavaScriptObject[] getLogMessages(); } -- 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: Single Origin Policy ByPass With IE8
Yes, it will also inherit any authentication/sessions from the browser. All you need to do is make your servlets support it and inject scripts with the servlet's urls into the page. On Apr 6, 8:11 am, Abdullah Shaikh abdullah.shaik...@gmail.com wrote: Does that mean that I can even call https using JSONP ? - Abdullah On Tue, Apr 6, 2010 at 1:47 AM, lineman78 linema...@gmail.com wrote: You should switch your project over to use JSONP. I was able to do so with minimal headaches assuming you can add the capability server side. I developed a solution based on the code posted here: http://www.gwtsite.com/how-to-access-web-services-with-gwt/ By using JSONP you will never have to worry about SOP problems on any browser instead of exploiting what I believe is a security hole in IE8 because all other browsers consider different ports to violate SOP. I wouldn't be surprised if this is patched. On Apr 5, 12:47 pm, powwow jimmy.w...@gmail.com wrote: OMG! This one nearly killed our project. When SOP was introduced in development mode for GWT 2.0 our project screeched to a halt. We have a huge application with a GWT front end communicating with a Rails server doing JSON requests. We had GWT running onhttp://127.0.0.1: and needed to connect to the rails server which ran onhttp:// 127.0.0.1:3000. The only difference was the port. Our application HAD to run in IE (no Firefox or Chome). We had hundreds of JSON calls doing GET, POST, PUT, DELETE all using RequestBuilder to communicate. We tried ProxyServer scripts to forward urls to the Rails server, but many were just too basic not being able to handle PUTs, DELETEs, form uploads, headers and everything else. Half the calls worked, and half the calls failed. We didn't have time to program the perfect ProxyServer servlet. We tried all the hacks including the Eclipse built in proxy server, enabling cross domain communication in IE in the options, lowering browser security levels, installing and uninstalling software, etc., all with no luck. But we found something that did work for the time being. Here is a work around if you need to bypass SOP: Use IE 8! We used IE7 and it didn't work, but IE8 works! -- 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: Architectural ideas for a multi-app/module project
You can use the GWT Exporter project to create interfaces between them all and include the modules separately. I have been playing with a similar path, but unfortunately am unable to share the code. Essentially each sub-module populates an Element and the underlying software asks for that element through some JSNI calls and the element is then added to the UI. On Apr 6, 4:58 am, Jon Vaughan jsvaug...@gmail.com wrote: Hi all. I'm beginning to build a set of GWT applications for a client. The clients customers will purchase a set of these applications (not necessarily all of them) and when deployed these applications will work together (imagine, for example, a 'Contacts' app, a 'Billing' app, 'Timerecording' etc), linking back and forward between information in each. The client has a requirement that each app is independently deployable. This would rule out the option of a monolithic compile despite its many advantages (optimization, memory footprint etc) - However they would also like the apps to all exist in a single window, to prevent confusion about pop-ups etc - And all of this has to work on relatively low powered machines and be IE6 compatible Possible options are iframes or a portal framework but in my view both of those are fairly horrible. Iframes are going to mean history and inter app communication issues. Portal frameworks mean an extra layer of effort, especially working out how to integrate the inter-portal communication with gwt. Alternatively I need to work out how to circumvent their independently deployable requirement. Certainly there are enormous advantages to the single GWT compile. The problem for the client is that if the UI has a common custom widget used in a couple of the apps, modifying it would mean retesting all apps that make use of it. One solution to this I suppose is total codebase independence, with no common dependencies, or versioned widgets somehow, and I could argue for that style of approach. So I was wondering, does anyone have any alternative ideas, or thoughts about how they would approach the same situation Thanks Jon -- 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: JavaScriptObject deep copy.
I would think this would be easier: public static final native JavaScriptObject deepCopy(JavaScriptObject obj) /*-{ return eval('{'+JSON.stringify(obj)+'}'); }-*/; I haven't tested the above code, but it should work. On Apr 4, 8:51 pm, Dean Huffman huffman.d...@gmail.com wrote: Since it took me 3 hours to figure out why this doesn't work and I could not find any other post on the subject, here is one way to do a deep copy of a JavaScriptObject using JSNI. public static final native JavaScriptObject deepCopy(JavaScriptObject obj) /*-{ if (Object.prototype.toString.call(obj) === '[object Array]') { var out = [], i = 0, len = obj.length; for ( ; i len; i++ ) { out[i] = arguments.callee(obj[i]); } return out; } if (typeof obj === 'object') { var out = {}, i; for ( i in obj ) { if (i != __gwt_ObjectId) { out[i] = arguments.callee(obj[i]); } } return out; } return obj; }-*/; -- 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: Single Origin Policy ByPass With IE8
You should switch your project over to use JSONP. I was able to do so with minimal headaches assuming you can add the capability server side. I developed a solution based on the code posted here: http://www.gwtsite.com/how-to-access-web-services-with-gwt/ By using JSONP you will never have to worry about SOP problems on any browser instead of exploiting what I believe is a security hole in IE8 because all other browsers consider different ports to violate SOP. I wouldn't be surprised if this is patched. On Apr 5, 12:47 pm, powwow jimmy.w...@gmail.com wrote: OMG! This one nearly killed our project. When SOP was introduced in development mode for GWT 2.0 our project screeched to a halt. We have a huge application with a GWT front end communicating with a Rails server doing JSON requests. We had GWT running onhttp://127.0.0.1: and needed to connect to the rails server which ran onhttp://127.0.0.1:3000. The only difference was the port. Our application HAD to run in IE (no Firefox or Chome). We had hundreds of JSON calls doing GET, POST, PUT, DELETE all using RequestBuilder to communicate. We tried ProxyServer scripts to forward urls to the Rails server, but many were just too basic not being able to handle PUTs, DELETEs, form uploads, headers and everything else. Half the calls worked, and half the calls failed. We didn't have time to program the perfect ProxyServer servlet. We tried all the hacks including the Eclipse built in proxy server, enabling cross domain communication in IE in the options, lowering browser security levels, installing and uninstalling software, etc., all with no luck. But we found something that did work for the time being. Here is a work around if you need to bypass SOP: Use IE 8! We used IE7 and it didn't work, but IE8 works! -- 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.
Generated CSSResource not injected when using UIBinder
I am using the UIBinder sample code that is generated by eclipse and I have run into one minor problem. The CSS is not being injected. Here is the code: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder ui:style .important { font-weight: bold; } /ui:style div Hello, span class={style.important} ui:field=nameSpan / /div /ui:UiBinder public class SubModulePanel extends UIObject { private static SubModulePanelUiBinder uiBinder = GWT .create(SubModulePanelUiBinder.class); interface SubModulePanelUiBinder extends UiBinderElement, SubModulePanel { } @UiField SpanElement nameSpan; public SubModulePanel(String firstName) { setElement(uiBinder.createAndBindUi(this)); nameSpan.setInnerText(firstName); } } getFrontEndRootPanel().getElement().appendChild( new SubModulePanel(Plugin 1; Instance: + getArgs().get(Instance)).getElement()); I checked it with firebug and it does have an obfuscated class name, but the CSS is never injected. I don't know if it matters but all this is called through a runAsync. Is there a way to inspect the generated classes with eclipse? I tried to inject the CssResource into the SubModulePanel class so I could inject it manually, but also had problems with that. -- 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: Generated CSSResource not injected when using UIBinder
I just compiled this and the problem seems to only exist in hosted mode. On Apr 5, 2:25 pm, lineman78 linema...@gmail.com wrote: I am using the UIBinder sample code that is generated by eclipse and I have run into one minor problem. The CSS is not being injected. Here is the code: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder ui:style .important { font-weight: bold; } /ui:style div Hello, span class={style.important} ui:field=nameSpan / /div /ui:UiBinder public class SubModulePanel extends UIObject { private static SubModulePanelUiBinder uiBinder = GWT .create(SubModulePanelUiBinder.class); interface SubModulePanelUiBinder extends UiBinderElement, SubModulePanel { } @UiField SpanElement nameSpan; public SubModulePanel(String firstName) { setElement(uiBinder.createAndBindUi(this)); nameSpan.setInnerText(firstName); } } getFrontEndRootPanel().getElement().appendChild( new SubModulePanel(Plugin 1; Instance: + getArgs().get(Instance)).getElement()); I checked it with firebug and it does have an obfuscated class name, but the CSS is never injected. I don't know if it matters but all this is called through a runAsync. Is there a way to inspect the generated classes with eclipse? I tried to inject the CssResource into the SubModulePanel class so I could inject it manually, but also had problems with that. -- 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: Restlet GWT Client example
You will most likely have to add a submit listener and build up the json object and then use code similar to that found here: http://wiki.restlet.org/docs_1.1/13-restlet/144-restlet/190-restlet.html There is no automatic mappings... only projects like GXT and smartGWT have direct mapping for their pro versions. You can probably abstract it out if you would like. From the quick look at this API it looks very inefficient. The more efficient approach in my opinion is to use Jersey(which it looks like this uses as the base for its server side code) and Object Overlays like i mentioned before. It doesn't offer any type protection, but if you are controlling both ends you should be fine. On Apr 2, 3:44 am, dgiscool dgisc...@gmail.com wrote: I am using RESTLET for my REST implementation both on client and server side. I will be using JSON. So the GWT client will be communicating with RESTLET based web services using JSON. I want to understand: If I use FormPanel in GWT then how can I pass the parameters and Form data using POST ? Does any one have a sample code ? Thanks, Deep On Apr 2, 4:19 am, lineman78 linema...@gmail.com wrote: You have to be more specific on how you want to send the data. Are you using Jersey for your REST implementation. Are you restricting it to XML, or are you capable of doing JSON. If you can do JSON it is very nice cause GWT has a direct loading method that has low overhead. If you want to use XML you will have to build the DOM manually. To use with the form object you will want to add a submit listener from which you will build the data object you are going to send and use the RequestBuilder to send it. You can also make it use the default html form functionality by setting the action of the form, but this method is generally not used in an AJAX application. This wiki shows both the old and new way to implement JSON overlay types.http://code.google.com/p/google-web-toolkit/wiki/OverlayTypes All you need to do is create a native static method like this: class Customer extends JavaScriptObject{ public static native Customer fromJson(String jsonString) /*-{ return eval('{'+jsonString+'}'); }-*/; } On Mar 31, 10:58 pm, dgiscool dgisc...@gmail.com wrote: Hi, I am trying to develop a GWT client that will call RESTful web services on the server side. Can some one please provide a example code that demonstrates how to send a POST HTTP request using GWT FormPanel ? Any help will be appreciated. On Restlet site, I do not find such examples. Thanks in advance for your help. -Deep Chand -- 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: Calling JSNI function from another JSNI function
It should work... assuming myFunction in your first JSNI method is actually a call to desktopShare I can only see one problem in this code. desktopShare is a static method and as such doesn't require the instance when making the JSNI call. Just remove the x before the @. On Apr 1, 2:28 am, Ajith ajith.ad.ku...@gmail.com wrote: HI, Is it possible to call one JSNI function from another JSNI function? I have a method setShowTrigger(this,elem,screenURL,inputStr,true); which I am calling in Moduleload of a GWT class. I wrote show trigger like public native void setShowTrigger(MainLayout x, Element elem, String screenURL, String inputStr, boolean b)/*-{ $wnd.showBlueApp = function () { x...@com.mypackage.ui.client.mainlayout::myFunction(Lcom/google/gwt/ user/client/Element;Ljava/lang/String;Ljava/lang/String;Z) (elem,screenURL,inputStr,b); }; }-*/; My function is implimented as public static native int desktopShare(Element elem, String screenURLValue, String actionURL,boolean wholeDesktop)/*-{ var shareWholeDesktop = 0; var returnVal = -1; if (elem != null) { if (wholeDesktop) { shareWholeDesktop = 1; } var screenURL =screenURLValue ; alert(Inside the perform function); //alert(rtmpUrl+ rtmpUrl); //alert(rtmpStream+ rtmpStream); //alert(recordingFlags+ recordingFlags); //alert(publisherId+ publisherId); //alert(screen url = +{screenURL:\+screenURL+\}); elem.setProperty({screenURL:\+screenURL+\}); var inputStr = actionURL; //alert(inputStr+reg=+publisherId); returnVal = elem.performAction(actionURL); alert(returnVal from share+ returnVal); return returnVal; } }-*/; Is it possible to make call like this? Is there any way? I have a html page witha button , Onclick of that I need to call showBlueApp () function . I have included GWT script in the HTML page also. Please help me on this. -- 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: Restlet GWT Client example
You have to be more specific on how you want to send the data. Are you using Jersey for your REST implementation. Are you restricting it to XML, or are you capable of doing JSON. If you can do JSON it is very nice cause GWT has a direct loading method that has low overhead. If you want to use XML you will have to build the DOM manually. To use with the form object you will want to add a submit listener from which you will build the data object you are going to send and use the RequestBuilder to send it. You can also make it use the default html form functionality by setting the action of the form, but this method is generally not used in an AJAX application. This wiki shows both the old and new way to implement JSON overlay types. http://code.google.com/p/google-web-toolkit/wiki/OverlayTypes All you need to do is create a native static method like this: class Customer extends JavaScriptObject{ public static native Customer fromJson(String jsonString) /*-{ return eval('{'+jsonString+'}'); }-*/; } On Mar 31, 10:58 pm, dgiscool dgisc...@gmail.com wrote: Hi, I am trying to develop a GWT client that will call RESTful web services on the server side. Can some one please provide a example code that demonstrates how to send a POST HTTP request using GWT FormPanel ? Any help will be appreciated. On Restlet site, I do not find such examples. Thanks in advance for your help. -Deep Chand -- 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: Dynamic Module Loading
Yeah, there is 1 problem I have with your solution and a separate issue your solution doesn't address. The problem I have with your solution is that iFrames can't inherit size. One behavior I like is that you can stack the modules and they will fit tightly against the other and the one below will move if the upper one's height changes, i.e. a disclosure panel. The issue that your issue doesn't seem to resolve is that I would like to dynamically add the modules to the page as they are added and would like the main module to not know anything about them other than the fact that they extend an abstract sub module and the location of the module's nocache.js. On Mar 31, 2:14 am, Olivier Monaco olivier.mon...@free.fr wrote: Hi, I don't know if I'll answer your question but we working on a main GWT- module with pluggable sub-modules. Each sub-modules is an ui- independant part of the whole application. To avoid interferences, each module loads into its own iframe. I wrote a messaging system that allow each module to communicate with each other (JSON serialization, auto-discovery of other modules...). Olivier On 31 mar, 03:10, lineman78 linema...@gmail.com wrote: I know this is a common request of people trying to make pluggable applications. It seems that every time someone comes up with a solution to this problem the GWT team changes the way the core linkers work and break the solution. I was wondering if anyone knows a way to dynamically load a module either with a new linker, or a different method than the traditional appending a new script element to the end of the body. I try to append a script element to the end of the body and it completely blows the document away and freezes the page in a loading mode. I found an email exchange between members of the GWT contributors group in December where they discuss new methods for the default linkers using dynamic iframes. I have been exploring this capability since 1.5 and every time I revisit it the method(hack job) I used the last time will not work. I would really like a more consistent method. Every forum I have seen where someone asks this someone inevitably asks why, so let me head off this question by explaining. I have run into this in a few different situations, one when trying to integrate GWT portlets into Liferay(Java portlet). The second situation is in trying to create a dynamic binding of sorts. I have been trying to figure out a way to create a GWT portal where you could install modules and they could be added and removed dynamically without having to recompile the core, creating something similar to iGoogle or Liferay in a GWT/J2EE 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: Dynamic Module Loading
I agree with everything you have said and this is the approach I am experimenting with except for one problem. Since 2.0 it is not possible to load modules dynamically. I have written a jsp that will add all the installed plug-ins' scripts to the head when the page is loaded, but unfortunately this causes a lot of unnecessary start-up loading. I am going to look into putting the entire instantiation under a runAsync and that should hopefully fix the problem. It would still be nice to load the modules dynamically, but i guess it isn't a huge deal to make them reload after installing a plug-in. On Mar 31, 12:12 pm, Sripathi Krishnan sripathikrish...@gmail.com wrote: GWT's architecture is orthogonal to your requirement of dynamic module loading / pluggable sub-modules, so whatever solution you find will be a hack and not maintainable. One of the core philosophies of GWT - *If something can be done at compile time, do it*. The key benefit of such a philosophy is performance. GWT scores over a lot of other frameworks because of its monolithic, closed-world compile. Any framework for dynamic module loading needs to defer a few operations to runtime, and that is a cost GWT core is unwilling to pay (thats what I understand). Having said that, you can still achieve what you want. Define an API (in terms of javascript methods) for your module, and use GWT Exporterhttp://code.google.com/p/gwt-exporter/to export the methods. That way, your GWT modules can inter-operate with hand-written javascript or with other pre-compiled GWT code. You can also dynamically add new modules to a page if you wish to do so. Any shared/common will however get download multiple times as part of each modules nocache.js + guid.cache.html, and there is nothing you can do about it. --Sri On 31 March 2010 21:48, lineman78 linema...@gmail.com wrote: Yeah, there is 1 problem I have with your solution and a separate issue your solution doesn't address. The problem I have with your solution is that iFrames can't inherit size. One behavior I like is that you can stack the modules and they will fit tightly against the other and the one below will move if the upper one's height changes, i.e. a disclosure panel. The issue that your issue doesn't seem to resolve is that I would like to dynamically add the modules to the page as they are added and would like the main module to not know anything about them other than the fact that they extend an abstract sub module and the location of the module's nocache.js. On Mar 31, 2:14 am, Olivier Monaco olivier.mon...@free.fr wrote: Hi, I don't know if I'll answer your question but we working on a main GWT- module with pluggable sub-modules. Each sub-modules is an ui- independant part of the whole application. To avoid interferences, each module loads into its own iframe. I wrote a messaging system that allow each module to communicate with each other (JSON serialization, auto-discovery of other modules...). Olivier On 31 mar, 03:10, lineman78 linema...@gmail.com wrote: I know this is a common request of people trying to make pluggable applications. It seems that every time someone comes up with a solution to this problem the GWT team changes the way the core linkers work and break the solution. I was wondering if anyone knows a way to dynamically load a module either with a new linker, or a different method than the traditional appending a new script element to the end of the body. I try to append a script element to the end of the body and it completely blows the document away and freezes the page in a loading mode. I found an email exchange between members of the GWT contributors group in December where they discuss new methods for the default linkers using dynamic iframes. I have been exploring this capability since 1.5 and every time I revisit it the method(hack job) I used the last time will not work. I would really like a more consistent method. Every forum I have seen where someone asks this someone inevitably asks why, so let me head off this question by explaining. I have run into this in a few different situations, one when trying to integrate GWT portlets into Liferay(Java portlet). The second situation is in trying to create a dynamic binding of sorts. I have been trying to figure out a way to create a GWT portal where you could install modules and they could be added and removed dynamically without having to recompile the core, creating something similar to iGoogle or Liferay in a GWT/J2EE 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.comgoogle-web-toolkit%2bunsubscr
Re: Problem using java projects in GWT
I think the 2 of us are answering different questions. I believe the problem he is having is that the GWT compiler is not allowing him to use objects from a previous Java project he had done(I am assuming it has some algorithms or POJOs that he doesn't want to replicate). The GWT compiler won't allow you to reference these objects even if they are in the classpath because they are not part of an included module. Your responses assume his problem is a classpath problem, but eclipse would be yelling at you for that one, not just the compiler. Also, Lucas I forgot to mention, my approach will still not work if the source(*.java) files are not in your classpath as the GWT compiler requires the uncompiled source. On Mar 30, 9:33 pm, Neil neiltol...@gmail.com wrote: In our projects, we just use our source code path directly. When launching the project in DevMode from within Eclipse, the launch config's classpath contains both the default classpath plus the /src directory. When compiling the project in Ant, we reference the source path directly in the gwt Compiler call: java classname=com.google.gwt.dev.Compiler fork=true maxmemory=512M failonerror=true arg line=-war ${temp.war} / arg value=com.x.ModuleName / classpath path location=src / path location=${temp.classes}/ /classpath /java Basically, the GWT Compiler needs both the compiled code and the source code to successfully compile the module. Hope that helps. Neil Olsonhttp://www.intertech.com/blog On Mar 30, 8:23 pm, lineman78 linema...@gmail.com wrote: You cannot use source code from a java project in GWT directly. All GWT code must be in the client path of a module. i.e. sura.ticketcheck.bo.Instancia is not part of a GWT module. There is one workaround I have gotten to work(only once, so no guarantee). 1) Create a file BoModule.gwt.xml in your source folder under the following path: sura/ticketcheck 2) Put the following text into the file: ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 2.0.3//EN http://google-web-toolkit.googlecode.com/svn/tags/2.0.3/ distro-source/core/src/gwt-module.dtd module inherits name=com.google.gwt.user.User / source path=bo / /module 3) In your src/ticketcheckGWT/xxx.gwt.xml put inherits name=sura.ticketcheck.BoModule/ Essentially what you are doing is tricking the GWT compiler into thinking that sura.ticketcheck has a module who's source is in the folder 'bo'. This should work as long as all files within package sura.ticketcheck.bo don't import outside of that package except standard java objects that are available through the com.google.gwt.user.User module. I have run into this several times and sometimes you just have to rewrite(copy and paste) stuff into a GWT project. On Mar 30, 1:25 pm, Lucas Rios lucasri...@gmail.com wrote: Hi everybody I'm trying to use a Java project in GWT but I have had some problems because I can't compile the GWT project. I have done this: 1.Make a xxx.gwt.xml in the java project. 2. Add a external JAR (java project) in the java build path of the GWT project. In Projects and libraries tabs. 3. Reference a xxx.gwt.xml in GWT projects (gwt.xml) 4. And last compile the GWT project... showing me those errors Compiling module ticketcheckGWT.Ticketcheck_GWT Validating newly compiled units [ERROR] Errors in 'file:/D:/Sura_desarrollo/Ticketcheck%20GWT/src/ticketcheckGWT/client/Ticketcheck_GWT.java' [ERROR] Line 488: No source code is available for type sura.ticketcheck.bo.Instancia; did you forget to inherit a required module? [ERROR] Errors in 'file:/D:/Sura_desarrollo/Ticketcheck%20GWT/src/ticketcheckGWT/client/ServiciosTicketcheck.java' [ERROR] Line 13: No source code is available for type sura.ticketcheck.bo.Instancia; did you forget to inherit a required module? [ERROR] Errors in 'file:/D:/Sura_desarrollo/Ticketcheck%20GWT/src/ticketcheckGWT/client/ServiciosTicketcheckAsync.java' [ERROR] Line 12: No source code is available for type sura.ticketcheck.bo.Instancia; did you forget to inherit a required module? [ERROR] Errors in 'jar:file:/D:/Lucas%20Ríos/GWT/gwanted/gwanted-core.jar!/org/gwanted/gwt/core/client/logger/TimeLoggerImpl.java' [ERROR] Line 92: Parameter 'widgetLoadTime': type 'long' is not safe to access in JSNI code For additional info see: file:/D:/Escritorio/eclipse-jee-galileo-win32/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.2.0.1_2.0.1.v201002021445/gwt-2.0.1/doc/helpInfo/longJsniRestriction.html Finding entry point classes [ERROR] Unable to find type 'ticketcheckGWT.client.Ticketcheck_GWT' [ERROR] Hint: Previous compiler errors may have
Dynamic Module Loading
I know this is a common request of people trying to make pluggable applications. It seems that every time someone comes up with a solution to this problem the GWT team changes the way the core linkers work and break the solution. I was wondering if anyone knows a way to dynamically load a module either with a new linker, or a different method than the traditional appending a new script element to the end of the body. I try to append a script element to the end of the body and it completely blows the document away and freezes the page in a loading mode. I found an email exchange between members of the GWT contributors group in December where they discuss new methods for the default linkers using dynamic iframes. I have been exploring this capability since 1.5 and every time I revisit it the method(hack job) I used the last time will not work. I would really like a more consistent method. Every forum I have seen where someone asks this someone inevitably asks why, so let me head off this question by explaining. I have run into this in a few different situations, one when trying to integrate GWT portlets into Liferay(Java portlet). The second situation is in trying to create a dynamic binding of sorts. I have been trying to figure out a way to create a GWT portal where you could install modules and they could be added and removed dynamically without having to recompile the core, creating something similar to iGoogle or Liferay in a GWT/J2EE 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: Problem using java projects in GWT
You cannot use source code from a java project in GWT directly. All GWT code must be in the client path of a module. i.e. sura.ticketcheck.bo.Instancia is not part of a GWT module. There is one workaround I have gotten to work(only once, so no guarantee). 1) Create a file BoModule.gwt.xml in your source folder under the following path: sura/ticketcheck 2) Put the following text into the file: ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 2.0.3//EN http://google-web-toolkit.googlecode.com/svn/tags/2.0.3/ distro-source/core/src/gwt-module.dtd module inherits name=com.google.gwt.user.User / source path=bo / /module 3) In your src/ticketcheckGWT/xxx.gwt.xml put inherits name=sura.ticketcheck.BoModule/ Essentially what you are doing is tricking the GWT compiler into thinking that sura.ticketcheck has a module who's source is in the folder 'bo'. This should work as long as all files within package sura.ticketcheck.bo don't import outside of that package except standard java objects that are available through the com.google.gwt.user.User module. I have run into this several times and sometimes you just have to rewrite(copy and paste) stuff into a GWT project. On Mar 30, 1:25 pm, Lucas Rios lucasri...@gmail.com wrote: Hi everybody I'm trying to use a Java project in GWT but I have had some problems because I can't compile the GWT project. I have done this: 1.Make a xxx.gwt.xml in the java project. 2. Add a external JAR (java project) in the java build path of the GWT project. In Projects and libraries tabs. 3. Reference a xxx.gwt.xml in GWT projects (gwt.xml) 4. And last compile the GWT project... showing me those errors Compiling module ticketcheckGWT.Ticketcheck_GWT Validating newly compiled units [ERROR] Errors in 'file:/D:/Sura_desarrollo/Ticketcheck%20GWT/src/ticketcheckGWT/client/Ticketcheck_GWT.java' [ERROR] Line 488: No source code is available for type sura.ticketcheck.bo.Instancia; did you forget to inherit a required module? [ERROR] Errors in 'file:/D:/Sura_desarrollo/Ticketcheck%20GWT/src/ticketcheckGWT/client/ServiciosTicketcheck.java' [ERROR] Line 13: No source code is available for type sura.ticketcheck.bo.Instancia; did you forget to inherit a required module? [ERROR] Errors in 'file:/D:/Sura_desarrollo/Ticketcheck%20GWT/src/ticketcheckGWT/client/ServiciosTicketcheckAsync.java' [ERROR] Line 12: No source code is available for type sura.ticketcheck.bo.Instancia; did you forget to inherit a required module? [ERROR] Errors in 'jar:file:/D:/Lucas%20Ríos/GWT/gwanted/gwanted-core.jar!/org/gwanted/gwt/core/client/logger/TimeLoggerImpl.java' [ERROR] Line 92: Parameter 'widgetLoadTime': type 'long' is not safe to access in JSNI code For additional info see: file:/D:/Escritorio/eclipse-jee-galileo-win32/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.2.0.1_2.0.1.v201002021445/gwt-2.0.1/doc/helpInfo/longJsniRestriction.html Finding entry point classes [ERROR] Unable to find type 'ticketcheckGWT.client.Ticketcheck_GWT' [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 If somebody know how I can solve it please help me Thank for all Regards LucasRR -- 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: Can't load the same module twice???
I am considering 2 usecases. The first being an integration with the Liferay Java portal where we would essentially have many portlets all with the same portlet wrapper all using different deferred binding. For instance, I would write one module to wrap all of our portlets and write an ant script to change the module.gwt.xml's replace-with line and recompile to produce all of our components. We essentially have 2 possible ways of displaying our portlets. One is a custom portlet with no user management completely written in GWT, and the other is Liferay (JSR Portlet spec). I would like to have them all use the same code with minimal wrapper work, which is why I decided on the approach I just explained. Also, I have been contemplating a way to write a pure GWT portal implementation that would be completely plugable. From the (limited) research I have done, I cannot find an easy way to make GWT pluggable without seperating it into several modules, and I could see a case where someone would like to put the same portlet on the page twice with different data/configuration. I have been working on a way to make this work, and I believe I have. I think this could also be modified for all the work to be done as a Linker, but I am not familiar enough with them to do that yet, private static native JavaScriptObject fixWnd()/*-{ orig_wnd = $wnd; while($wnd.parent != $wnd) $wnd = $wnd.parent; if (orig_wnd == $wnd) return null; $doc = $wnd.document; return orig_wnd; }-*/; private static final JavaScriptObject originalWindow = fixWnd(); public static native String getQueryParam(String queryParam) /*-{ return @com.gwt.client.GWTClient::originalWindow.gup(queryParam); }-*/; public void onModuleLoad() { if (originalWindow == null) throw new RuntimeException(not meant to be run as a standalone); Alerter alerter = ((Alerter) GWT.create(Alerter.class)); RootPanel.get(container_ + getQueryParam(uuid)).add (alerter.getWidget()); } /tester/GWTTester.html !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=content-type content=text/html; charset=UTF-8 titleindex/title script type=text/javascript function gup( name ) { name = name.replace(/[\[]/,\\\[).replace(/[\]]/,\\\]); var regexS = [\\?]+name+=([^#]*); var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ; else return results[1]; } /script /head body style=margin:0; script type=text/javascript language=javascript src=tester.nocache.js/script /body /html /index.html !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=content-type content=text/html; charset=UTF-8 titleindex/title /head body style=margin:0; iframe src=tester/GWTTester.html?alerter=hellouuid=1 style=display:none;/iframe iframe src=tester/GWTTester.html?alerter=goodbyeuuid=2 style=display:none;/iframe iframe src=tester/GWTTester.html?uuid=3 style=display:none;/ iframe div id=container_3/div div id=container_2/div div id=container_1/div /body /html On Dec 30, 9:39 am, Jason Essington jas...@greenrivercomputing.com wrote: I can't think of a single usecase where it would be appropriate to load a module twice ... It would be effectively the same as loading YUI, or Dojo, or jQuery twice, Once it is there the first time there's no need to load it again, the code is already there. If you are simply trying to place a panel in multiple places on the page, that can be done from the single invocation of your module, look for the container elements in the DOM and add your panel (widgets) RootPanel.get(contianer1).add(myStuff); RootPanel.get(container2).add(anotherInstanceOfMyStuff); -jason On Dec 29, 2009, at 6:39 PM, Ian Bambury wrote: Why would you want to run it twice? What effect are you trying to produce? Ian http://examples.roughian.com 2009/12/30 lineman78 linema...@gmail.com Can someone please tell me if it is possible to load the same module twice. If so, how? I have tried including the script tag twice, which used to work in older versions of gwt, but no longer works. I was thinking that once it is loaded you could call the onModuleLoad function manually, but cannot find how that would work. Another thing I noticed is that if you do include the script tag twice, it writes the code to the dom twice, but it is only executed once. If it is by design that you can only run a module once by including the script tag, maybe this ought to be prevented. I also tried using the cross site linker, which is what i believe i used before to get this to work. module define-linker name=xs class=com.google.gwt.core.linker.XSLinker/ add-linker name=xs/ inherits name=com.google.gwt.user.User
Can't load the same module twice???
Can someone please tell me if it is possible to load the same module twice. If so, how? I have tried including the script tag twice, which used to work in older versions of gwt, but no longer works. I was thinking that once it is loaded you could call the onModuleLoad function manually, but cannot find how that would work. Another thing I noticed is that if you do include the script tag twice, it writes the code to the dom twice, but it is only executed once. If it is by design that you can only run a module once by including the script tag, maybe this ought to be prevented. I also tried using the cross site linker, which is what i believe i used before to get this to work. module define-linker name=xs class=com.google.gwt.core.linker.XSLinker/ add-linker name=xs/ inherits name=com.google.gwt.user.User / source path=client / define-property values=hello,goodbye,default name=alerter / property-provider name=alerter ![CDATA[ var alerter = $wnd.gwttester_alerter; if (alerter == null){ alerter = default; } return alerter; ]] /property-provider replace-with class=com.gwt.client.alert.impl.HelloAlerter when-type-is class=com.gwt.client.alert.Alerter / when-property-is name=alerter value=hello / /replace-with replace-with class=com.gwt.client.alert.impl.GoodbyeAlerter when-type-is class=com.gwt.client.alert.Alerter / when-property-is name=alerter value=goodbye / /replace-with replace-with class=com.gwt.client.alert.impl.DefaultAlerter when-type-is class=com.gwt.client.alert.Alerter / when-property-is name=alerter value=default / /replace-with entry-point class=com.gwt.client.GWTClient/entry-point /module html head meta http-equiv=content-type content=text/html; charset=UTF-8 titleindex/title /head body div script type=text/javascriptvar gwttester_alerter = 'hello';/ script script type=text/javascript language=javascript src=com.gwt.GWTTester.nocache.js/ /div div script type=text/javascriptvar gwttester_alerter = 'goodbye';/ script script type=text/javascript language=javascript src=com.gwt.GWTTester.nocache.js/ /div /body /html -- 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 run GWT 2.0 RC2's hosted mode with another server?
I have been having an issue with my project setup running in -- noServer since 1.6.? that I'm hoping you could help me with. I am getting the error 17:01:38.826 [ERROR] [dashboard] Unable to find 'dashboard.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? with the following module: ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 1.7.1// EN http://google-web-toolkit.googlecode.com/svn/tags/1.7.1/distro- source/core/src/gwt-module.dtd module rename-to=dashboard entry-point class='com.example.dashboard.client.Dashboard'/ inherits name=com.google.gwt.user.User / inherits name=com.google.gwt.visualization.Visualization / inherits name=com.google.gwt.http.HTTP/ inherits name=com.google.gwt.maps.GoogleMaps / stylesheet src=common.css/ /module Using the following dashboard.html: html head titleDashboard/title /head body style=margin: 0; !-- OPTIONAL: include this if you want history support -- iframe src=javascript:'' id=__gwt_historyFrame style=width: 0; height: 0; border: 0/iframe script type=text/javascript language=javascript src=dashboard.nocache.js/script /body /html On Dec 4, 3:13 pm, Chris Ramsdale cramsd...@google.com wrote: Jan, It looks like you found an issue on our side. Given your project settings, the GPE is attempting to load GwtShell with the -style arg which has been removed. We have a fix in place for the 2.0 launch and in the meantime, if you want to continue using the RC2 plugin and SDK, you can do the following: 1. Uncheck the Use Google Web Toolkit setting within your project properties 2. Add a war/WEB-INF directory structure to your app 3. Add a web.xml to the WEB-INF directory with the following contents: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app 4. Check the Use Google Web Toolkit settings within your project properties This workaround will trigger the plugin to launch DevMode (instead of GwtShell) without the -style arg. - Chris On Thu, Dec 3, 2009 at 7:07 AM, Jan Ehrhardt jan.ehrha...@googlemail.comwrote: The idea was, to prevent the existences of 'war/*' in my GWT project. With the current stable version of the plugin and GWT 1.7.1 everything works well. So the problem is, that my GWT project does not have any server code and no host page or anything else. The current version works the following way: - GWT (Web App launch configuration) app is launched in hosted mode without the build in server. - Instead of a host page in the same project, the host page comes from an independent server. - The hosted browser loads the host page (from the specified URL), detects the existence of a GWT module (included as JavaScript) and replaces the JavaScript with the Java Code from the classpath. The interesting point is, that the text field to specify the URL is removed from the GWT tab in the web app launch configuration (plugin version for GWT 2.0 RC2). So the question is, how can I point the OOPHM to my host page's URL (on any server)? At least some words on what I'm currently doing in Eclipse 3.5 with the released version of the plugin and GWT 1.7.1: I've got a plain Java project and make a GWT project out of it by right click on the project - Google - WebToolkit Settings. In these GWT settings I check 'Use Google Web Toolkit' and then OK. This makes my Java project a GWT project. I create a new Web App launch configuration for this project, disable 'Run build in server' and on the GWT tab I insert my host pages URL (http://localhost:8080/my-app-which-runs-totaly-independent-on-a-tomcat). That's it. It works. Interestingly it's not required to specify any GWT module in any configuration so far. The presence of the module's XML configuration on the classpath and the presence of a previously compiled version of the module in the loaded HTML page is enough to tell hosted browser, what to do. The GWT Eclipse plugin doesn't even recognize the XML file since the included module isn't shown in any settings or configuration interface. But it works. Regards Jan Ehrhardt On Tue, Dec 1, 2009 at 5:03 PM, Chris Ramsdale cramsd...@google.comwrote: Based on the fact that the plugin is attempting to launch GWTShell, it may not recognize your app as a web app. This is typically the case when it doesn't find a war/WEB-INF/web.xml file in the project root. Can you confirm that this directory structure is in place? Also, what version of GWT and GPE were you using to previously build your application? On Tue, Dec 1, 2009 at 1:56 AM, Jan Ehrhardt jan.ehrha...@googlemail.com wrote: I'm using the Web App launch configuration and the plugin version, which
Code Splitting
Is code splitting available yet in some sort of semi-finished form. I am about to start a rather large portlet project that is going to have several main applications (known as components to those familiar with Joomla) and would like to defer the loading of each of the components until that area of the application is accessed. I found some examples of this for pre 1.4 with dynamic module loading, but I don't think differed binding would work correctly for my application, as from what I understand the code to decide the implementation class is only run once and not every time gwt.create is run. If code splitting is available, could someone please provide an example of how I might write my factory class. Here is my first instinct of how it should be used. public final class ComponentFactory { public static Component getComponent(String pageArg, String[] otherArgs) { if (arg == null) return new BlogComponent(otherArgs); } } public final class ComponentWrapper extends Panel implements HistoryListener { ... public void onHistoryChanged(HistoryEvent e) { GWT.runAsync(){ public void run() { clear(); add(ComponentFactory.getComponent(HistoryManager.getPageArg(), HistoryManager.getArgs())); } }; } } --~--~-~--~~~---~--~~ 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.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
GWT Compiler Question
Is there any way to tell the compiler not to put the files in a folder named after the package name. i.e., if my module is com.google.test.TestApp and I compile with -war www, it puts all the files under ./www/com.google.test.TestApp. I was wondering if there is a way to get it to just put all the files in ./www? I am building a rather large project that I am building with an ant script and I am having to move all the files after they are compiled and moving over 6000 files is taking a long time. --~--~-~--~~~---~--~~ 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.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
JSNI Special Character Problem
Hello all, I am currently working with using JAX-RS to retrieve data from my server in JSON format, and the default marshaller adds the '@' symbol to the beginning of variable names for attributes. I am using the method of casting the JSON to a JavaScriptObject using the eval(json) function. The problem is that the object looks like this: { '@firstName':'Ted' } and I am using the native method to get the object: public final native String getFirstName()/*-{ return th...@firstname; }-*/; which of course gives an error because it is expecting a package name:variable after that @ symbol. My question is if there is a way to escape the character so that the JSNI parser will ignore it and pass the literal, because we are having some issues getting JAX-RS to use a different JSON format. Basically the overall structure of this portion of the project follows that described here: http://code.google.com/webtoolkit/tutorials/1.5/JSON.html --~--~-~--~~~---~--~~ 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.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT Portlet Load problem
I have been working on integrating GWT into a Liferay portlet and am having one major problem. When I drop the code on the page the screen goes blank, in debugging this I have been able to determine the problem through my access logs. Even though the context of the portlet is /GWTTest, it tries to load the javascript from /web/guest. If I go to another url and come back to the portal the js is loading from the right location. I had read that using the cross-site linker solved some of these problems, but I cannot see any difference between the std linker and the xs and am unsure if it is even working. If someone could give me some pointers on how to go about solving this problem, it would be helpful. Thanks module inherits name=com.google.gwt.core.Core / add-linker name=xs/ inherits name='com.google.gwt.user.User'/ entry-point class='com.*.portal.client.GWTTest'/ servlet path=/GWTTestService class=com.*.portal.server.GWTTestServiceImpl/ /module --~--~-~--~~~---~--~~ 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.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT RPC Security Concern
I believe that if you use container managed security for your entire GWT app it will require authentication to access the servlets too. In fact I just tested it and that is correct(FROM ACCESS LOG: '127.0.0.1 matt 06/Mar/2009:18:17:36 + POST /SEESuite/ rssParser HTTP/1.1 200 3082' notice this request is authenticated as the user matt). We are doing this Unfortunately if you are handling your own security within your module, you will have to somehow handle your own security in the servlets also, which in turn creates a lot of security issues. I believe if you call the application with SSL the RPC calls will also use SSL, but I have not tested this. Also, I know RPC has a lot of built in security and error checking that would make it difficult for the person trying to access the servlets directly without intemate knowledge of the RPC package structure because I know every once in a while I get traces in my logs that say expected xx bits and recieved xx, aborting rpc call. On Mar 6, 9:22 am, erincarikan erincari...@gmail.com wrote: Excuse my illiteracy about gwt, I just started working on GWT last week. Yesterday I implemented my first rpc application and one thing makes me worried a little bit. I will compile and all the content will work on client and it will rpc server code without any authentication if I am not mistaken. So can anyone who figures out the url consume this service? If so, This is definitely not what I wanted, because I have to add rpc functionality to a pci compliant system which will break the requirements. I read the security article but I didn't see any references to this situation at all, so I thought maybe I am missing something it's not a problem but still not sure about it. Also without authentication and object validation system will be open to object injections. If I am right about my concerns, Can anybody give me a security model example? --~--~-~--~~~---~--~~ 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.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT RPC Security Concern
Yes, this approach can work, but there is one small drawback. If you aren't planning on making it a ssl application you will have to use ssl for the rpc/json authentication request. This is so that the packets cannot be intercepted on unsecure wireless. I believe container managed security has this built in. There are some approaches that work around this, such as md5 hashing on the client side before sending, all make it more difficult, but none are as secure as ssl. The drawback to container managed security is that the default authenticator is not friendly and ugly. You would have to deploy an unauthenticated jsp or jsf to do pretty authentication that would forward you once authenticated. You might also consider LDAP, CAS or Open SSO as other forms of authentication that have a lot of infrastructure provided. On Mar 6, 11:56 am, erincarikan erincari...@gmail.com wrote: Thanks for the reply, Frankly I never used container managed security before, but now I am reading about it. Another approach I was thinking about was checking encrypted passwords in servlet from the db, I found something like this in the wiki which looks like a simple and good approach to me: http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecur... On Mar 6, 1:20 pm, lineman78 linema...@gmail.com wrote: I believe that if you use container managed security for your entire GWT app it will require authentication to access the servlets too. In fact I just tested it and that is correct(FROM ACCESS LOG: '127.0.0.1 matt 06/Mar/2009:18:17:36 + POST /SEESuite/ rssParser HTTP/1.1 200 3082' notice this request is authenticated as the user matt). We are doing this Unfortunately if you are handling your own security within your module, you will have to somehow handle your own security in the servlets also, which in turn creates a lot of security issues. I believe if you call the application with SSL the RPC calls will also use SSL, but I have not tested this. Also, I know RPC has a lot of built in security and error checking that would make it difficult for the person trying to access the servlets directly without intemate knowledge of the RPC package structure because I know every once in a while I get traces in my logs that say expected xx bits and recieved xx, aborting rpc call. On Mar 6, 9:22 am, erincarikan erincari...@gmail.com wrote: Excuse my illiteracy about gwt, I just started working on GWT last week. Yesterday I implemented my first rpc application and one thing makes me worried a little bit. I will compile and all the content will work on client and it will rpc server code without any authentication if I am not mistaken. So can anyone who figures out the url consume this service? If so, This is definitely not what I wanted, because I have to add rpc functionality to a pci compliant system which will break the requirements. I read the security article but I didn't see any references to this situation at all, so I thought maybe I am missing something it's not a problem but still not sure about it. Also without authentication and object validation system will be open to object injections. If I am right about my concerns, Can anybody give me a security model example?- 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-Toolkit@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 RPC Security Concern
Generally there should not be any problems with you using SSL in your application. That being said, there are a few ways you could have got yourself into trouble when trying to switch over. 1) You did not use GWT.getModuleBaseUrl when creating your RPC classes or making local references. 2) If you are using flash that is doing data/object requests locally it sometimes has issues with SSL. 3) You may need to add aliases to your SSL cert as it was generated with what you installed the app server with. Good luck with your ventures into the security world :) On Mar 6, 1:30 pm, erincarikan erincari...@gmail.com wrote: I am planning to make it a ssl application, so that nobody can eavesdrop, malform login data, As far as I know, I don't need to modify anything(code) in gwt project to accomplish that, right? I believe that web server should be handling all those details. Is there any drawbacks about using ssl? Also in addition to that Acegi seems like a good way to go. I just read an article about setting that up, it seems a little bit complicated, but I believe after painful set up I'll be able to add another page to my resume:) On Mar 6, 2:25 pm, lineman78 linema...@gmail.com wrote: Yes, this approach can work, but there is one small drawback. If you aren't planning on making it a ssl application you will have to use ssl for the rpc/json authentication request. This is so that the packets cannot be intercepted on unsecure wireless. I believe container managed security has this built in. There are some approaches that work around this, such as md5 hashing on the client side before sending, all make it more difficult, but none are as secure as ssl. The drawback to container managed security is that the default authenticator is not friendly and ugly. You would have to deploy an unauthenticated jsp or jsf to do pretty authentication that would forward you once authenticated. You might also consider LDAP, CAS or Open SSO as other forms of authentication that have a lot of infrastructure provided. On Mar 6, 11:56 am, erincarikan erincari...@gmail.com wrote: Thanks for the reply, Frankly I never used container managed security before, but now I am reading about it. Another approach I was thinking about was checking encrypted passwords in servlet from the db, I found something like this in the wiki which looks like a simple and good approach to me: http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecur... On Mar 6, 1:20 pm, lineman78 linema...@gmail.com wrote: I believe that if you use container managed security for your entire GWT app it will require authentication to access the servlets too. In fact I just tested it and that is correct(FROM ACCESS LOG: '127.0.0.1 matt 06/Mar/2009:18:17:36 + POST /SEESuite/ rssParser HTTP/1.1 200 3082' notice this request is authenticated as the user matt). We are doing this Unfortunately if you are handling your own security within your module, you will have to somehow handle your own security in the servlets also, which in turn creates a lot of security issues. I believe if you call the application with SSL the RPC calls will also use SSL, but I have not tested this. Also, I know RPC has a lot of built in security and error checking that would make it difficult for the person trying to access the servlets directly without intemate knowledge of the RPC package structure because I know every once in a while I get traces in my logs that say expected xx bits and recieved xx, aborting rpc call. On Mar 6, 9:22 am, erincarikan erincari...@gmail.com wrote: Excuse my illiteracy about gwt, I just started working on GWT last week. Yesterday I implemented my first rpc application and one thing makes me worried a little bit. I will compile and all the content will work on client and it will rpc server code without any authentication if I am not mistaken. So can anyone who figures out the url consume this service? If so, This is definitely not what I wanted, because I have to add rpc functionality to a pci compliant system which will break the requirements. I read the security article but I didn't see any references to this situation at all, so I thought maybe I am missing something it's not a problem but still not sure about it. Also without authentication and object validation system will be open to object injections. If I am right about my concerns, Can anybody give me a security model example?- 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-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web
GWT DateTimeFormat Bug?
I am using the com.google.gwt.i18n.client.DateTimeFormat.parse method to parse data from thmy RSS feed. I am having a problem because we want all of our RSS feed dates to be in GMT-00:00 and it is throwing an error when my current time zone(GMT-07:00) is on Dec 01 and the dateTime it is parsing is on Dec 02. An example of the code is as follows: DateTimeFormat dtf = DateTimeFormat.getFormat(EEE, dd MMM HH:mm:ss ); pubDate = dtf.parse(node.getFirstChild().getNodeValue().replace(GMT, GMT-00:00).replace(Z, GMT-00:00)); java.lang.IllegalArgumentException: Tue, 02 Dec 2008 06:24:49 GMT-00:00 at com.google.gwt.i18n.client.DateTimeFormat.parse (DateTimeFormat.java:1120) at com.google.gwt.i18n.client.DateTimeFormat.parse (DateTimeFormat.java:601) Which should parse to Mon, 01 Dec 2008 11:24:49 GMT-07:00 Also, can anyone tell me why GMT, Z or UTC are not in the time zone abbreviations? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---