MVP best practices, how to expose a view to a presenter?
Hi guys, I've been trying to find the best answer to the question above for a while now. Here is the problem: * assume you have a view with textbox and a vertical panel. The textbox is used for searching, the vertical panel to display the found results. In order to decouple everything, we'll define 2 interfaces: interface ISearchView { void populateResults (ListString results); setPresenter (ISearchPresenter p); } interface ISearchPresenter { void doSearch (String query); } * using the code above, I can safely bind events in view, that dispatch business execution to a presenter (set via #setPresenter). Everything is very clean organized. However, when I'm implementing an Activity, here is how it would look like: class SearchActivity extends AbstractActivity implements ISearchPresenter { @Override public void start(final AcceptsOneWidget panel, EventBus eventBus) { ISearchView view = clientFactory.getSearchView(); view.setPresenter (this); panel.setWidget (view); } @Override public void onSearch (String query) { // Execute some sync/async call. clientFactory.searchService().search (query, ...); // HOW DO I SEND RESULTS BACK TO VIEW?? } } I don't know how to access the view instance, in order to populate it with some results. One way, which I honestly think it's uberly wrong -- is to access it through clientFactory.getSearchView. But this basically forces me to have a singleton scope of that view. Not acceptable, imo. The example http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html doesn't include this case (by coincidence or ...) Thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/ODhMpq8LQOgJ. 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: MVP best practices, how to expose a view to a presenter?
That sounds right :). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/0QtPu3f_BQIJ. 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: השב: Re: building custom event differently to avoid boiler plate coding?
You shouldn't use custom events for every possible event in your app, imo -- or, even better, identify the best events that match as much as possible. What you're suggesting by this is removing the strong-type event definitions provided by Java. Of couse, you can work with a class called Event, that merely has a String name and Object data, but this defeats the purpose of what GWT is suggesting -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Y_ZKLyl29DkJ. 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: Database jdbc
GWT library supports a limited subset of JRE. Some classes and packages are not and will never be supported. Those two are probably not supported, check this link: http://www.gwtapps.com/doc/html/jre.html And besides, when you're developing a client you wouldn't want to handle ClassNotFoundException, no? That makes no sense, this exception is probably thrown by the db connector implementation, you need to hide it. Same deal goes with the other exception. Try to have event-based exceptions (say, NotLoggedInException, InvalidInputException etc). -- 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: RequestBuilder and StatusCode=0
Same Origin Policy - you cannot call another host, or same host with different port. XML-RPC implementation will not allow you to do that. Actually, the XmlHttpRequest that is ajax core and used for all the calls will not allow you to do that (so the browser will actually limit you there). You could use REST, or have a proxy implementation (you proxy to a servlet using XML-RPC and the servlet is doing the call to that host, using http client). -- 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: RequestBuilder and StatusCode=0
It should return something, maybe there is a problem with the servlet. Try to do the GET by hand (wget, curl, etc) and see its response. If that is ok, maybe url is miss-spelled. Maybe Accept header is wrong, etc. I'm currently using this method in a couple of places (in case you're wondering if it 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-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: Styeling a ListBox
Form elements are implemented by the browser, you are very limited in terms of customization (both Ui and functional). I remember an old post where somebody was asking how to customize an upload form - same issue - you cannot do that. What you can do is have a custom 3rd party (or your own) widget that mimics that functionality. Alex. On Mar 2, 6:38 pm, Ben Imp benlee...@gmail.com wrote: You can probably simulate a red border by surrounding the list box with a div, which you could add a border color to. IE should actually listen to that one. I don't think you can style the drop down arrow at all. From my understanding, form elements are kind of limited in how you can alter their appearance. -Ben On Mar 2, 9:27 am, K upadhya...@gmail.com wrote: Hi, I wish to change the way ListBox looks using CSS - Change the border color - Tried using the usual border-color:red. Worked on Firefox. No effect on IE Still the standard blue color - Change the Color of the arop down arrow. No idea how to go about doing it. regards K -- 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: Compiler Output Size
How many locales do you have? On Mar 3, 3:50 pm, Thomas Broyer t.bro...@gmail.com wrote: You can reduce the number of files being generated by using soft permutationshttp://code.google.com/p/google-web-toolkit/wiki/SoftPermutations, in your case, as the permutation explosion is due to locales, you could use runtime localeshttp://code.google.com/webtoolkit/doc/latest/DevGuideI18nLocale.html#...instead. -- 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: maintain two html pages in gwt
You can create 2 projects, or 2 modules in GWT that have entry-points (especially if you share code between the two modules). On Mar 3, 1:48 pm, Jeff Schwartz jefftschwa...@gmail.com wrote: On Thu, Mar 3, 2011 at 1:59 AM, Dhanu Musham dhanunjaya.mus...@gmail.comwrote: hi, can i maintain two html pages in gwt, one for Login.html and after successful login then shows actual my application, Why can't you just manipulate the DOM to display one or the other view? With GWT this is a very easy thing to do and it is the preferred approach. else for one html page, how can i manage login validation checking server and how can i redirect actual my application 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- *Jeff Schwartz*http://jefftschwartz.appspot.com/http://www.linkedin.com/in/jefftschwartz follow me on twitter: @jefftschwartz -- 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: Integrating GIN into HelloMVP sample from GWT
@AnnotatedWith is the annotation you're looking for. or @Named, but personally I do prefer the first one. http://code.google.com/p/google-guice/wiki/BindingAnnotations Basically what you can do is replace the code below - public Activity getActivity (Place place) if (place instanceof GoodbyePlace) { . } with public Activity getActivity (@GoodbyePlace Place place) { return new GoodbyePlace ((GoodbyePlace) place, clientFactory); } You will probably notice I've changed the method a bit, the implementation selection decision (whether the method returns a GoodbyePlace or something else) is not there anymore. So you will need to adjust to this. The change is a bit more subtle, you're exchanging runtime type info with static compile time GIN functionality. Alex D. On Mar 2, 1:22 am, ciosbel andrew...@gmail.com wrote: https://groups.google.com/forum/#!topic/google-web-toolkit/LtGZpCxQAVY might help? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: Integrating GIN into HelloMVP sample from GWT
Yes, but you just get rid of the new operator. That's just half of fix, you're still type-casting after 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-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: Image element will hang test execution
I guess this thread is closed. I couldn't find the error though :| -- 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, Eclipse, and testing touch events
Well multitouch is a simplified way to have mouse clicks mouse drag. You can click programatically in GWT, so I don't see why not. Of course, it won't be anywhere near the experience that comes by using a real device, but for testing alone it 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-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: Image element will hang test execution
Greg, thanks for your reply. I've given a test example above that hangs... I don't understand what you mean by all those steps :). Just copy-paste the code above and run it as a gwt testcase. On Feb 24, 5:48 pm, Greg Dougherty dougherty.greg...@mayo.edu wrote: Right before this object's constructor, try to create the image object on its own. If that doesn't work, try to create the image as the first think your app does. If that does work, you've got something in your app breaking the image. If that doesn't work, you have a bad image. If they both work, then you've got a problem somewhere in your object, so try allocating the Image at different points of the constructor, until you've found the command that breaks the Image loading process. You can also try a different Image, to see if the SPECIFIC Image is the problem there, or if any image is a problem. IOW, at this point we have no idea whether or not it's a GWT problem, and (since you haven't given us the code necessary to replicate the problem) noway to help you if it IS a GWT problem. Greg On Feb 24, 5:54 am, Alex D. alex.dobjans...@gmail.com wrote: Still no idea guys? On Feb 23, 6:19 pm, Alex D. alex.dobjans...@gmail.com wrote: Hi, The code below will not finish (gets hanged in the Image constructor): public class ATest extends GWTTestCase { // . init code // public void testShouldNotHang () { // Create an empty image final Image img = new Image(); } } The hang happens on Image:237 = Event.sinkEvents(image.getElement(), Event.ONLOAD); Now, I'm not trying to test the Image constructor, but I have complex components that cannot be modified for testing purposes, and the happen to have Image inside. I have searched but I couldn't find any answer ... nobody else had this issue? 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Image element will hang test execution
Still no idea guys? On Feb 23, 6:19 pm, Alex D. alex.dobjans...@gmail.com wrote: Hi, The code below will not finish (gets hanged in the Image constructor): public class ATest extends GWTTestCase { // . init code // public void testShouldNotHang () { // Create an empty image final Image img = new Image(); } } The hang happens on Image:237 = Event.sinkEvents(image.getElement(), Event.ONLOAD); Now, I'm not trying to test the Image constructor, but I have complex components that cannot be modified for testing purposes, and the happen to have Image inside. I have searched but I couldn't find any answer ... nobody else had this issue? 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Image element will hang test execution
Hi, The code below will not finish (gets hanged in the Image constructor): public class ATest extends GWTTestCase { // . init code // public void testShouldNotHang () { // Create an empty image final Image img = new Image(); } } The hang happens on Image:237 = Event.sinkEvents(image.getElement(), Event.ONLOAD); Now, I'm not trying to test the Image constructor, but I have complex components that cannot be modified for testing purposes, and the happen to have Image inside. I have searched but I couldn't find any answer ... nobody else had this issue? 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.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Persistence based on GAE and GWT serialization
Hi guys, I started experimenting with GAE (Google AppEngine) and I find persistence coding-style beautiful. But, there is the problem with use with GWT, since the annotations import from javax.jdo.annotations package (with obviously is unknown to GWT) and the PersistenceManagerFactory acts very similar to Hibernate's session mechanism (attaching objects returned by a query to the manager). Do you know of any *good* solutions for this matter? I ended up coding a second mirror class (like UserVO which reflects the members of User - at least the ones that are serializable) and a mapping mechanism from persistence classes = VO classes, which is used on server-side when handling RPC objects. While this may work, it increased the code needed by 170% (number taken from 1 persistence class of mine, Greeting + the two additional classes, GreetingVO, GreetingDataObject). Is there a better way than this (like ignoring certain imports)? 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.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT more entry points on one html
Hello, I was wondering if I can make 2 or more GWT application embedded on one page. I know this is possible, but, it there a way to make them communicate with each other? It seems to me that the only way is through history tokens, but this coupling is too weak. I have to be sure that the tokens that I set will actually be processes by the second application. Moreover, did anyone try to make 2 GWT applications in 2 HTML files and, say, from one GWT app load the second HTML using the HTML widget (here I don't consider the full HTML for the second one, since embedding in such a way doesn't require head or title tag for second HTML file anymore). Cheers, Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-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 links are not working with Internet Expolrer
The answer is simple, just don't use IE (any version) :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: parse xml problem
What is the parser that you're using? Maybe you can modify your xml structure to return what you need. Since xml allows any number of children per node, it may be easier to write simpler xmls that to parse a complex one :) On Oct 24, 7:35 am, AyeAyeAung [EMAIL PROTECTED] wrote: root menu type=FFolder 1 menu type=SFolder 1 Shortcut 1/menu menu type=SFolder 1 Shortcut 2/menu menu type=FFolder 1 Folder 1 menu type=SShortcut1/menu menu type=FShortcut2/menu /menu menu type=SFolder 1 Shortcut 3/menu /menu menu type=FFolder 2 menu type=FFolder 2 Folder 1/menu menu type=FFolder 2 Folder 2/menu menu type=SFolder 2 Shortcut 1/menu /menu menu type=FFolder 3 menu type=SFolder 3 Shortcut 1/menu menu type=FFolder 3 Shortcut 2/menu /menu menu type=SShortcut 1/menu /root Hi all, I have a problem parsing this xml. First, I tried to get node list with getChildNodes(). It returns 4 nodes, that's what I want. Then, I tried to get next node list with if a node has child by hasChildNodes() and if it's type is F. In this stage, I can't use getChildNodes(), but I tried to get node list with getElementByTagName(menu), it return all elements under that node. I wonder why I can't get node list with getChildNodes(). I want only child element of eg. Folder1(Folder 1 Shortcut 1, Folder 1 Shortcut 2, Folder 1 Folder 1, Folder 1 Shortcut 3) not including child of Folder1 Folder1(Shortcut1, Shortcut2). Any help! Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-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 -~--~~~~--~~--~--~---
compiling java sources from other projects with GWTCompiler
Hi, I have created 2 projects in Eclipse, one is intended to be the base code for the other (and many more in the future). However, I have encountered an issue concerning the GWTCompiler. How do I specify in what extra directories should it look for source code? I know I can make a gwt user module (specifically create a .gwt.xml file in the base project and jar the .java, .class and that .gwt.xml file), but I don't consider that a viable option, especially when the base project is under development and changes quite frequently. I have referenced the base project and the gwt specific libraries (such that Eclipse doesn't signal any errors). Still, as complex as GWTCompiler is, I haven't found such an option, like setting source directories. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Tab panel Css
Use this method: void TabPanel::add(Widget w, Widget tabWidget) To add images, just create the resources (images you want to use) and do something like this: Images[] tabImages = new Image [5]; tabImage [0] = new Image (url1); tabImage [1] = new Image (url2); // etc tabPanel.add (absolutePanel_2, tabImages [1]); // Replace Tab with tabImages [1] The spacing could be set through CSS styles. try .gwt-TabPanel .gwt- TabPanelItem or something similar. If it doesn't work, use the decorated version of panel. Or you could try to apply a style on image widget (but you might end up having spaces from left/right of the image to the end of the tab item, not spaces between items) On Oct 3, 11:12 pm, Ananda Rao [EMAIL PROTECTED] wrote: Hi all, i know how to create the tab panel. but not able to add the image and add css to it.. my code is final RootPanel rootPanel = RootPanel.get(); final TabPanel tabPanel = new TabPanel(); rootPanel.add(tabPanel, 0, 0); tabPanel.setSize(747px, 355px); final AbsolutePanel absolutePanel = new AbsolutePanel(); tabPanel.add(absolutePanel, Tab); absolutePanel.setHeight(100px); final AbsolutePanel absolutePanel_1 = new AbsolutePanel(); tabPanel.add(absolutePanel_1, Tab); absolutePanel_1.setHeight(300px); final AbsolutePanel absolutePanel_2 = new AbsolutePanel(); tabPanel.add(absolutePanel_2, Tab); absolutePanel_2.setHeight(300px); tabPanel.selectTab(0); i want to give space between the tabs buttons and also i want add image to the tab buttons.. can any one help me in this. if possible please give me example along with code. thanks in advance Regards Ananda --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: colorating a tab
GWT has default styles for all its widgets. For example, Button class has the style .gwt-Button. The same applies for other widgets, including more complex ones. What you see in firebug, .gwt-TabBar is the default style for TabBar, and .gwtTabBarItem (the next style on the same line) is the style for TabBarItem which is furthermore cascaded (derived) from .gwtTabBar. When you don't set any styles for a widget, it uses its default style (and further, cascades the style for complex widgets). You said the code overwrote your styles defined in main.css, this is because you don't have the required styles names in your CSS file (main.css). Otherwise, GWT would load the styles from your file. If you want other names for your styles, just define them and use setPrimaryStyleName (...). Furthermore (let's say you have a generic setting for a widget and you want further customization for a specific one), use setStyleDependentName (...). To finish, I haven't checked the following case: if I set a style name, let's say shyStyle for a TabBar, I don't know if GWT knows the styles for subitems, like .shyStyle .getTabBarItem Hope it helps, cheers. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: creating a custom MenuItem - ?
You could try creating a custom class that extends Composite :) This was our solution for creating a left sided tab panel (like the regular one you can find in GWT, but tabs are not up, but on left). On Oct 3, 10:08 am, gsmd [EMAIL PROTECTED] wrote: I'm thinking of putting a Button and a TextBox to MenuBar. Is there an easy/described way of extending MenuItem in order to achieve that? Any hints? TIA. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Radio Button Bug?
It looks like you are using the code in a wrong way, maybe you are doing something recursive there. On Oct 3, 1:06 pm, Arji [EMAIL PROTECTED] wrote: Hi Guys, Is this a bug in the GWT? Or maybe I'm implementing it the wrong way. Can anyone try this, having 2 Radio Buttons on the same group, both have added Listeners (CheckboxListenerAdapter). Sometimes it is throwing the slow script message. Is anyone experiencing this? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Weird problem with shared code
The type must be known for instanced objects, not generic object passing to methods. In GWT, I can't do the following: Object o = new Object (); Instead, I can do this: Object o = new ListBox (false); (altough I surely would typecast again to ListBox so that I can do something with that object). What is that thing about honoring JavaBean? :) I don't know how, but we have solved the problem, but just by coincidence. Up until now, I couldn't find a reasonable explanation for what happened or what the problem was. On Oct 3, 3:52 pm, olivier nouguier [EMAIL PROTECTED] wrote: Hi, Since GWT 1.4, IsSerializable is not necessary, Serializable is enough. 1:) AFAIK the Type must be known at compile time so setObject(Object o) is out ! You should have a base Serializable class (know at compile time) 2:) The JavaBean contract must be honored : That getThat / setThat(That that). On Fri, Oct 3, 2008 at 1:07 PM, Alex D [EMAIL PROTECTED] wrote: Hello everybody, I have encountered a very weird problem with shared code between client and server. The client is GWT compatible Java code and the server is pure Java. We have created a serializable class, Request (public class Request implements IsSerializable) which we want to use to exchange data between client and server code. The class was included in the .rpc file generated by the compiler, so it's indeed serializable. Moreover, inside this class we have a method that sets the object for this request; inside this method, an encoding protocol is obtained via object's class name (if this is a list, we typecast it to List and get the first element's class name - if the size is != 0). The code for all protocols is compatible with GWT, since it compiles successfully, the request object arrives at the servlet and the response back. However, writing any of the following lines of code has no effect: request.setObject (o) or request.getObject () It acts as if they don't exist, in either client/server code. I have print-lined before and after the request in servlet, and all prints BEFORE the request sets a list of objects work, BUT all after DON'T; this would indicate that setting an object is a problem, BUT then, the function exists successfully, since client code receives the request. You would ask 'if you get a new request back, what's the problem?' The problem is handling this request, since I have agents that handle the object inside this request, so ... request.getObject () - again, something breaks, because I used Window.alert(...) just before getting the object and again one just after. The second one doesn't get executed, but no errors, no exceptions!! I should mention that hosted mode works just fine and I am able to display the object (so it's handled correctly). Is there any problem if I use a shared package/classes (within same project) for both client and server code? How would I detect this problem since I don't get any errors? Sorry for the long post, I hope you have the patience to read it :) -- Quand le dernier arbre sera abattu, la dernière rivière asséchée, le dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas comestible - proverbe indien Cri --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: any plans to offer java bean support in future?
Why would you need this kind of code in GWT? On Oct 3, 3:50 pm, mwaschkowski [EMAIL PROTECTED] wrote: Hi All, I've been using a 3rd party wysiwyg tool to create my gwt interface, and one thing I've run into is that gwt does not support java bean type customization. The following was suggested: General JavaBean support would be good which would include standardize support for property accessors, default constructors, custom editors, customizers, Beans.isDesignTime(), etc. see:http://www.instantiations.com/forum/viewtopic.php?f=11t=2174sid=301... The thing that I would need is custom editors. Would there be any plans in the future to support this kind of thing? Thanks very much, Mark --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: colorating a tab
Does anybody know if it's possible to specify one or more CSS file(s) (not styles, but rather files containing styles) from client code? (currently I link them within HTML file). On Oct 3, 4:01 pm, Thomas Broyer [EMAIL PROTECTED] wrote: On 3 oct, 12:12, Zied Hamdi [EMAIL PROTECTED] wrote: Hi folks, I'm new to GWT (but I read the tutorial). I need to give my tabs a different color, and this is what I see in my firebug: .gwt-TabBar .gwt-TabBarItem {standard.css (line 870) background:#D0E4F6 none repeat scroll 0%; color:black; cursor:pointer; font-weight:bold; margin-left:6px; padding:3px 6px; text-align:center;} .gwt-TabBar-Into .gwt-TabBarItem {main.css (line 55) background:#EE none repeat scroll 0%; color:#6F6F6F; } so the standard css background and color are overriding my locally defined attrs in main.css. Is it due to a bad configuration? or is it the way it is supposed to work? How is the main.css included? It might be a priority problem: if main.css is loaded before standard.css (which will probably be the case if main.css is not GWT-injected with a stylesheet in your module's gwt.xml), given that the two selectors have the same specificity [1], their rules are evaluated in the order they've been loaded, so the background and color set in standard.css will override the one set in your main.css. Try adding an !important to your rules and see if they're applied (with !important, the rules in standard.css won't override your own ! important rules, even though they are evaluated after them). If that's the case, try to find a way for your stylesheet to be loaded after standard.css (and remove the !important, which is bad practice and recommended for user-stylesheets only [2]), either by getting your main.css injected by GWT, or by inheriting StandardResources (instead of Standard) and calling the standard.css by yourself... If I were you however, I'd file a bug to have the injected stylesheet come *before* the existing ones so that the ones already present in the page override the injected stylesheets... [1]http://www.w3.org/TR/CSS21/cascade.html#specificity [2]http://www.w3.org/TR/CSS21/cascade.html#important-rules --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Calling an external servlet within Hosted Mode
Hello, I am new to GWT (3 months of experience) and we are running an servlet inside an application server which we want to call from within hosted mode. The problem is not necessarily local (my case), since hosted mode is great for debugging and really time-saving. The problem is as follows: You have client-side code which you run in hosted mode. After you define your interface, any servlet that implements it can be queried via RPC (through interface's methods). So you decide to make server- side code available and connect it with your applications through GWT = the servlet should handle the requests from/to the application that calls it. How do we set the target URL of the servlet path in the config module .gwt.xml ? Is it something we're missing? Since the ServiceDefTarget.setServiceEntryPoint function needs a relative, how can I specify an absolute URL for the servlet? Thanks a lot, bye --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---