Re: GWT RPC mechanism

2011-11-25 Thread Tomasz Gawel
it is serialized to text but not json. - you can catch a glimpse of it in firebug :) however you can overwrite it - look at http://timepedia.blogspot.com/2009/04/gwt-rpc-over-arbitrary-transports-uber.html -- You received this message because you are subscribed to the Google Groups "Google Web

Re: attach listeners/handlers to widget, then do some DOM-stuff - listeners gone?

2011-11-25 Thread Tomasz Gawel
paste some code to enable more valid answer ;) ... but probably the matter is the fragment below > then i attach the whole thing to a div. everything works except the > handlers - they simply are never called. if you create a panel (and some widget in its hierarchy) an then attach the panel's ele

Re: jquery?

2011-10-25 Thread Tomasz Gawel
hi, main gwt strong point is "maintainability, team work support, and refactoring support which comes from java and java tools (and are not specific to gwt) and are not available in javascript and not possible be available in javascript. javascript is extremely flexible and powerful scripting lan

Re: future of gwt & who use gwt

2011-10-25 Thread Tomasz Gawel
hi thomas, thanks for link to infoq article about dart - so... it seems my guess is possibly right :) - but it's long long way ahead. as to mentioned issue with hashmap - i find it feature rather than problem. and that case is even not java-javascript but ie specific implementation issue. and as

Re: future of gwt & who use gwt

2011-10-24 Thread Tomasz Gawel
I still don't understand the need for dart. if it would be cross-compiled so where is the advantage over gwt? in gwt we have the language that we allready know and tools that were worked out over years. if it will be incorporated into browser as virtual machine than just why not to incorporate th

Re: JSNI - interactive chart

2011-10-15 Thread Tomasz Gawel
it seems that it is not possible to write iframe's content directly in html. you can add it programatically which seems even more convenient (but i wanted to avoid it do to some inconsistency between browser as to when cotnentDocument of an iframe becames available to code - there can happen some d

Re: Global Event Bus ?

2011-10-14 Thread Tomasz Gawel
package samples; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.core.client.JsDate; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONP

Re: Global Event Bus ?

2011-10-14 Thread Tomasz Gawel
If you want to pass objects between to separately compiled gwt modules via javascript it can only be object that extend JavaScriptObject or primitives. but these can also be your custom overlay objects defined on both sides. for example when module A knows about com.google.gwt.core.client.JsDate a

Re: native callback going into the eternal void

2011-10-13 Thread Tomasz Gawel
use double ()() @com.webfair.gwt.components.client.CalendarBox::test() is only the signature of method to call it use @com.webfair.gwt.components.client.CalendarBox::test() (); -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to th

Re: JSNI - interactive chart

2011-10-13 Thread Tomasz Gawel
public class TestChart implements EntryPoint { static class YourChart extends Widget { private static final String HTML_BEGIN = ""; private static final String HTML_END = ""; public YourChart(JSONObject userConf) { t

Re: JSNI - interactive chart

2011-10-13 Thread Tomasz Gawel
chart.js script uses document.write() to write chart markup. in case you put this dynamically in your HTML Widget's it would reload the page (document.write behaviour). the only possibility to create it on runtime in gwt is to put it into generated iframe. -- You received this message because you

Re: Adding external jar to client side

2011-10-12 Thread Tomasz Gawel
sorry in point 3 not javac but java -cp gwt-dev.jar:your-lib.jar com.google.gwt.dev.Compiler (replace : with ; on win) as its not compiled with javac :) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to

Re: Adding external jar to client side

2011-10-12 Thread Tomasz Gawel
to include external gwt library in jar: 1. library jar should have gwt.xml inside it with arbitrary name identyfing the lib. for example file named YourLibrary.gwt.xml with contents as below: 2. gwt.xml file in project that uses it should inherit it with: 3. make sure your has the librar

Re: Convert Java bean Object to JSON in GWT 2.4

2011-10-12 Thread Tomasz Gawel
As to JSON: Have you tried Google GSON library ? http://code.google.com/p/google-gson/ And second question: Do you really need JSON? RequestFactory does not suit your case? http://code.google.com/intl/pl/webtoolkit/doc/latest/DevGuideRequestFactory.html -- You received this message because you a

Re: Full page in GWT or just parts?

2011-10-12 Thread Tomasz Gawel
@Uemit you can write one module to be used in all pages and use code splitting feature to download only what is needed by the particular page. i do that this way. another habit i worked out over years using gwt is to use onModuleLoad method only to register js callbacks. how does the module behave

Re: Why widgets arent more flexible? inner widget, inner html, etc..

2011-10-11 Thread Tomasz Gawel
hi, look at this thread: http://groups.google.com/group/google-web-toolkit/browse_thread/thread/c134d12aadd1e4f8 if you want to create custom widget that treats its node's content in the way HTMLPanel does you probably need to write ElementParser. in this case look at this post: http://cafebab3.

Re: Custom UIBinder Widget, problem expecting only widgets

2011-10-10 Thread Tomasz Gawel
hi, as far as gwt 2.1. HTMLPanel was treated somohow special by uibinder. (i'm not sure if it hasn't changed in newer versions) normally a widget in ui binder could contain text or html when implemented hasText and hasHTML interfaces. then the content of the node in ui.xml was parsed as text or htm

Re: How to intercept GWT RPC

2011-10-05 Thread Tomasz Gawel
If you work with spring you probably have a spring controller that extends RemoteServiceServlet implementation. (look at this topic comment) you can stick interceptor on handleRequest method as normally in Spring you would do :). or if you need to get some piece of information from decoded payloa

Re: iframe with GWT

2011-10-05 Thread Tomasz Gawel
and the example without a line of JSNI :) but be aware of same-domain restriction when retrieving reference iframe's content. public class IframeStyleExample implements EntryPoint { public static StyleElement addStyleSheet(FrameElement frameElement, String cssText)

Re: Using Spring servlets in GWT web apps

2011-10-03 Thread Tomasz Gawel
as to gwt-rpc simply make your RemoteServiceServlet implementation also implement Spring's Controller interface. The rest goes straightforward. Simply call doPost in your handleRequest implementation and return null (no ModelAndView needed as doPost from RemoteServiceServlet writes all needed direc

Re: JQuery like animation

2011-08-19 Thread Tomasz Gawel
1. But Animation class in gwt seems to be quite handy. All you need is bunch of custom interpolation functions. But these are easy to be taken from MooTools (i did take se below :)) - (easing functions in jquery behave slightly different so simple rewriting it in java drops off). 2. Manuel - great

Re: MVP in the Real World

2011-08-19 Thread Tomasz Gawel
I used to implement every more complex widget as pair Presenter-View (view as inner class). -- 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

Re: UIBinder for inner class

2011-08-19 Thread Tomasz Gawel
use @UiTemplate annotation to point where the ui.xml file exists. ui template can accept relative path or full package JNDI path (however eclipse plugin sometimes behaves quirky with custom paths) for example: public class SomeWidget extends Composite { public static interface UI {

MVP widgets where to put support for i18n - into view or presenter

2011-08-19 Thread Tomasz Gawel
Hi, as MVP pattern suits perfectly when it comes to designing gwt widgets (e.g. widgets - as presenter and "layout" inner class as view - for more about see http://www.youtube.com/watch?v=PDuhR18-EdM) i still have a dillema where to put support for messages (with possibility to change messages in r

Re: Create Canvas widget from CanvasElement

2011-08-11 Thread Tomasz Gawel
i suppose it's a bug . in majority of widgets constructor with Element argument is protected. even a comment in source code of canvas it should be protected not private: /** * Protected constructor. Use {@link #createIfSupported()} to create a Canvas. */ private Canvas(CanvasElement elem

Re: use ui:text from

2011-08-11 Thread Tomasz Gawel
but to the original question ;) you don,t need markup at all :). ui:text element has been introduced because you could not use {messages.messageKey} in plain text not as attribute. as title is an attribute it is not needed in that case. just write: -- You received this message because you ar

Re: use ui:text from

2011-08-11 Thread Tomasz Gawel
not exactly, ui:name and ui:description are for messages that uibinder generates from templates (e.g.: the default set messages - the other you should provide anyway as files). the proper how-to is in the link to docs you gave above. ui:text is used when you have messages in resources that you ex

Re: After using Context menu, how to trigger the browsers default one? (on, say, an image)

2011-07-27 Thread Tomasz Gawel
unregistering the ContextMenuHandler does not work? I assume you have sth like this: class YourWidget extends Composite implements ContextMenuHandler { HandlerRegistration registration; public YourWidget(){ final HTML html = new

Re: xxx.ui.xml is not in GWT client package

2011-07-27 Thread Tomasz Gawel
And did you try to take use of @UiTemplate annotation to point the actual location of ui.xml file? -- 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 fro

Re: Declare an array of panels in UiBinder

2011-07-25 Thread Tomasz Gawel
Alex, But if your widgets are to be inserted at runtime what you expect to define in uibinder template? a list or an array? it's not the right place because these are visiual templates, and a visual container for widgets is just a panel (or a div if u use htmlpanel as root container), Have i missed

Re: GWT frameworks?

2011-07-25 Thread Tomasz Gawel
still nobody mentioned gwt-query - which btw is truely a framework. while i dont like it's jquery-like naming convention - i stay impressed with the code itself, especially selector engine ;). as to gxt and smart gwt - it was not sth i was looking for so i abandoned using it. gwt itself is a frame

Re: Declare an array of panels in UiBinder

2011-07-25 Thread Tomasz Gawel
Yes, you're right. It's a mistake. I copied your method signature and forgot to remove void after adding FocusPanel as a return type. -- 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@g

Re: Declare an array of panels in UiBinder

2011-07-25 Thread Tomasz Gawel
Sorry i haven't noticed vp is panel not list ;) so in java you have sth like that: List slots; @UiField FlowPanel slotTargetPanel; @UiFactory FocusPanel void addSlot() { FocusPanel slot = new FocusPanel(); slots.add(slot); return slot; } in ui.xml: Some sampl

Re: Declare an array of panels in UiBinder

2011-07-25 Thread Tomasz Gawel
Assuming you do not use FocusPanel in other cases in this Widget just anototate addSlot with @UiFactory and return newly created slot from it: @UiFactory FocusPanel void addSlot() { final FocusPanel fp = new FocusPanel(); vp.add(fp); return fp; }

Re: Error in ant build

2011-07-24 Thread Tomasz Gawel
Petr, .. but it seems you probably have a typo ;) (or your packeage has name clien not 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 fr

Re: Load compiled GWT module in a GWT application !

2011-07-23 Thread Tomasz Gawel
hi Saeed, wrap a gagdet with iframe and public javascript api. in application that loads the simply make native wrapper to gadget api. -- 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-toolki

Re: How to get readyState from GWT Frame object?

2011-07-22 Thread Tomasz Gawel
and sample usage: class UsageExample { public static void useItLikeThat(){ Frame frame = new Frame("http://www.example.com/example.pdf";); new ReadyStateWatch(frame).addReadyStateChangeHandler( new ValueChangeHandler() {

Re: How to get readyState from GWT Frame object?

2011-07-22 Thread Tomasz Gawel
hi, try something like this: (I'm not sure if there is any "built in" solution but this "native patch" should work ;) ) public class ReadyStateWatch { public static enum ReadyState { COMPLETE { @Override public String toString() { return "complete";

Re: Sub-classing UiBinder based Widgets

2011-07-22 Thread Tomasz Gawel
@Alex, When you extend Composite not Widget/UiObject, you "init it" with initWidget() not setElement - you cannot provide UI implementations that takes use of existing DOM Nodes in html page. without this exception thera no other differences. -- You received this message because you are subscribe