Qustion -> com.google.gwt.user.client.rpc.SerializationException

2009-08-19 Thread develo

Nice to meet you.
I didn't know unsolve problem ... T.T



[WARN] Exception while dispatching incoming RPC call
java.lang.RuntimeException:
com.google.gwt.user.client.rpc.SerializationException:
java.lang.reflect.InvocationTargetException
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleExporterProcessingException
(GWTRPCServiceExporter.java:344)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall
(GWTRPCServiceExporter.java:313)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest
(GWTRPCServiceExporter.java:363)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle
(HttpRequestHandlerAdapter.java:49)
at org.springframework.web.servlet.DispatcherServlet.doDispatch
(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService
(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest
(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost
(FrameworkServlet.java:511)
...
...
...
Caused by: com.google.gwt.user.client.rpc.SerializationException: Type
'java.math.BigDecimal' was not included in the set of types which can
be serialized by this SerializationPolicy or its Class object could
not be loaded. For security purposes, this type will not be
serialized.
at
com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize
(StandardSerializationPolicy.java:83)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize
(ServerSerializationStreamWriter.java:591)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject
(AbstractSerializationStreamWriter.java:129)
at com.extjs.gxt.ui.client.data.RpcMap_CustomFieldSerializer.serialize
(RpcMap_CustomFieldSerializer.java:37)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)




I'm setting 'gwt-math 2.1.jar' and 'gwt-math-server-2.1.jar' . This is
add build path.
and to inherit the gwt-math into the gwt.xml.





I don't know.. help me please

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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 question

2009-08-19 Thread Dalla

I think maybe Ian had other ideas than what I suggested above.

Implementering the HasInternationalContactDetails on the
ContactDetails model,
and then returning it from the ContactDetailsInterface would somehow
make the
widget aware of the model... Which I think would break the MVP
pattern...?

On 20 Aug, 07:17, "Dean S. Jones"  wrote:
> This is where I diverged from the typical MVP pattern, the Has*
> interfaces just became to numerous and unwieldy. My solution was to
> make the
> "model" richer, and attach a Map of "state values" to each model
> property. It was then up to the Presenter to interpret the associated
> property state map, and display accordingly.
>
> At first, I had general "model change listeners" drive the UI. I
> wanted to convert to GWT 1.6+ custom events and event handlers(bus),
> but these grew too numerous also still looking for a concise
> solution.
>
> On Aug 19, 8:49 pm, Davis Ford  wrote:
>
>
>
> > You and others have won me over, Ian :)
>
> > I re-factored to all interfaces.  One of my biggest pain points was
> > the crazy number of mock and mock returns I was ending up needing --
> > that, and I needed to included gwt-dev on the classpath, which the
> > codehaus gwt-maven-plugin warns not to do...
>
> > It still blows up kind of big when you have a form with even a
> > reasonable number of widgets on it.  Example, I have 7 text boxes on
> > one form.  For each, I want to get at its value and also set a blur
> > handler...so I end up with:
>
> > interface Display {
> >    HasValue foo();
> >    HasBlurHandlers fooBlur();
> >    ...
>
> > }
>
> > That leads to 14 methods in the interface -- I wish there was some way
> > to collapse this.  I also have 7-8 additional HasClickHandlers, and a
> > number of methods like:
>
> > void displayFooError(boolean toggle, String msg);
>
> > To tell the view to report an error.  So in the end, the interface for
> > *this* particular presenter is fairly large, but so be it, I guess.
>
> > Sorry, to hear your project got hi-jacked.  I enjoy your blog posts --
> > hope you will keep posting stuff on GWT.
>
> > Regards,
> > Davis
>
> > On Wed, Aug 19, 2009 at 7:15 PM, Ian Bambury wrote:
> > > My feeling is that, if you design things properly, you will not need to 
> > > end
> > > up with a bloated interface.
> > > For example, in a registration page, you don't need to have something for
> > > every field if you require name/address/phone number, you just link in to
> > > HasInternationalContactDetails and that widget deals with all the 
> > > associated
> > > problems. You just set it up with hicd.emailRequired(true) and
> > > hicd.phoneRequired(false) and so on. That widget then knows how to set
> > > itself up. If you need to insert current details, you use
> > > hicd.displayDetails(userContactDetails).
> > > You check everything is OK with if(!hicd.isValid())hicd.displayErrors();
> > > You get the user contact details back with hicd.getContactDetails();
> > > All you need in your interface is HasInternationalContactDetails
> > > getContactDetails();
> > > Everything else works from that interface, not yours.
> > > Whatever it is that conforms to that knows all about zip and postal codes
> > > and what to validation apply (because it probably has a country dropdown 
> > > and
> > > can use that) same with phone formats.
> > > The HasInternationalContactDetails widget itself uses other widgets (like
> > > phone number) which can be used elsewhere if needed but at the very 
> > > minimum
> > > break the functionality into manageable units.
> > > I'd love to give this a try, but unfortunately my current project manager
> > > (and funder rolled into one) seems to have just dropped GWT in favour of
> > > Zend and the 'here's an idea for a screenshot, make it work' approach to
> > > system design.
> > > Sigh!
> > > Ian
>
> > >http://examples.roughian.com
>
> > > 2009/8/19 davis 
>
> > >> Point taken Ian.  I think the design tradeoffs are at least on the
> > >> table.  In most cases, I think I'm comfortable with coupling the view<-
> > >> >presenter in a 1:1 relationship -- (i.e. not making universally
> > >> generic presenters that can be used with any view), but I understand
> > >> your argument, and can see the need for this in some scenarios.
>
> > >> On Aug 19, 8:30 am, Ian Bambury  wrote:
> > >> > 2009/8/19 Davis Ford 
>
> > >> > > My basic question is: why not just return TextBox if that is what is
> > >> > > in your view?  The coupling is between 2 classes: view and presenter.
> > >> > > If you later change TextBox to SuperWidgetTextBox, you can re-factor
> > >> > > it in your IDE in 5 seconds and be done with it.
>
> > >> > > Am I missing something?
>
> > >> > If that is the way you want to go then fine.
>
> > >> > What you might be missing is that some of your views may not be using
> > >> > text
> > >> > boxes. One view may be using a text box. Another might use a label,
> > >> > another
> > >> > might use a button, or a text area, or a

Compiling GWT code on server

2009-08-19 Thread Yogesh Bhave
Hi folks,

I am trying to compile GWT code on server (amd 64-bit, Ubuntu). I have gwt
1.6.4 on server. I am compiling code with ant it works fine on
localhost(Ubuntu), same ant script.
But on server it throws error as follow:

#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x7f8d00a8d25a, pid=14267, tid=140243142814032
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b22 mixed mode
linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1f125a]
#

Please help me or give me a proper direction. How can I compile code on
server.

--~--~-~--~~~---~--~~
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: Cookies and client state. Suggestions?

2009-08-19 Thread brett.wooldridge

On Aug 7, 11:52 pm, Jeff Chimene  wrote:
> Well, I'll take a stab at this so that this email doesn't disappear
> into the void. I think these are good design questions.
>
> On Tue, Aug 4, 2009 at 10:55 PM,
>
> brett.wooldridge wrote:
>
> > What we would like to avoid, but seems unavoidable (hence this post),
> > is having the cookie sent with every request to the site.  Because the
> > entire site, from the front page all the way back is one entire GWT
> > application, the "path" (in cookie terms) is always the root of our
> > server.  Therefore, the cookie gets sent with every RPC to every
> > service.
>
> Isn't this part of the HTTP protocol?

Yes it is.  Hence my question.  We could perform authentication
through an iframe with a different URL on the server that is in sub-
path of the server root.  However, GWT doesn't explicitly support
this.  Against, hence my question.  Can a single GWT application be
somehow explicitly (through annotations?) split across a URL space?

> > We would like to stuff additional persistent information down to the
> > client for survivability across visits, such as user preferences, but
> > we don't want this stuff blasted back to us with every request.
>
> How can you ensure real survivability across sessions w/o storing
> preferences on the server? Preferences are lost once the client clears
> cookies. Storing preferences via cookies is a brittle technique, esp.
> if it takes significant time to reestablish those preferences after
> clearing cookies.

On authentication, we re-stuff the client state.  If the client has
cleared their cookies, they will get re-built on login.  Again, this
is something that only needs to occur on first hit to the site.  The
application reads these cookies on the client-side, but as stated we
don't want them blasted back to us on every request.  Again pointing
to the need for any site that maintains a fair amount of client state
in cookies to be able to split an application across a URL space.

> > Right now the
> > typical "payload" is only two or three dozen bytes, but the size of
> > the cookie even though small is actually larger.  We could cut our
> > traffic in half without the cookie being sent back on every request.
>
> OK, but you'll have to stop using HTTP.

There is a solution that is supported very clearly by HTTP and the
Cookie specification -- the cookie path.  This entire post is about
how because GWT does not (seem) to allow splitting an application
across a URL space, no GWT application can properly take advantage of
the path portion of the cookie specification.  Every cookie from a GWT
application by definition will come from the root URL of that
application and therefore will be sent back with every RPC by that
application.

If for example, GWT generated a hidden iframe for each RPC service
interface and the code associated with that RPC loaded from a unique
URL space, specified by the user, for example 'login service' code
loaded from /login, 'mail service' loaded from /mail, etc., then
cookies returned by the login service with path /login would only be
resent in requests to the login service and never to the mail
service.  Of course the user has control (on the server-side) of the
path created for cookies -- I could create a cookie in the root of the
server that of course would be resent on all RPC requests.  But as it
stands, there is no knob to turn or lever to pull to control the URL
space for cookies effectively within GWT.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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 question

2009-08-19 Thread Dean S. Jones

This is where I diverged from the typical MVP pattern, the Has*
interfaces just became to numerous and unwieldy. My solution was to
make the
"model" richer, and attach a Map of "state values" to each model
property. It was then up to the Presenter to interpret the associated
property state map, and display accordingly.

At first, I had general "model change listeners" drive the UI. I
wanted to convert to GWT 1.6+ custom events and event handlers(bus),
but these grew too numerous also still looking for a concise
solution.


On Aug 19, 8:49 pm, Davis Ford  wrote:
> You and others have won me over, Ian :)
>
> I re-factored to all interfaces.  One of my biggest pain points was
> the crazy number of mock and mock returns I was ending up needing --
> that, and I needed to included gwt-dev on the classpath, which the
> codehaus gwt-maven-plugin warns not to do...
>
> It still blows up kind of big when you have a form with even a
> reasonable number of widgets on it.  Example, I have 7 text boxes on
> one form.  For each, I want to get at its value and also set a blur
> handler...so I end up with:
>
> interface Display {
>    HasValue foo();
>    HasBlurHandlers fooBlur();
>    ...
>
> }
>
> That leads to 14 methods in the interface -- I wish there was some way
> to collapse this.  I also have 7-8 additional HasClickHandlers, and a
> number of methods like:
>
> void displayFooError(boolean toggle, String msg);
>
> To tell the view to report an error.  So in the end, the interface for
> *this* particular presenter is fairly large, but so be it, I guess.
>
> Sorry, to hear your project got hi-jacked.  I enjoy your blog posts --
> hope you will keep posting stuff on GWT.
>
> Regards,
> Davis
>
>
>
>
>
> On Wed, Aug 19, 2009 at 7:15 PM, Ian Bambury wrote:
> > My feeling is that, if you design things properly, you will not need to end
> > up with a bloated interface.
> > For example, in a registration page, you don't need to have something for
> > every field if you require name/address/phone number, you just link in to
> > HasInternationalContactDetails and that widget deals with all the associated
> > problems. You just set it up with hicd.emailRequired(true) and
> > hicd.phoneRequired(false) and so on. That widget then knows how to set
> > itself up. If you need to insert current details, you use
> > hicd.displayDetails(userContactDetails).
> > You check everything is OK with if(!hicd.isValid())hicd.displayErrors();
> > You get the user contact details back with hicd.getContactDetails();
> > All you need in your interface is HasInternationalContactDetails
> > getContactDetails();
> > Everything else works from that interface, not yours.
> > Whatever it is that conforms to that knows all about zip and postal codes
> > and what to validation apply (because it probably has a country dropdown and
> > can use that) same with phone formats.
> > The HasInternationalContactDetails widget itself uses other widgets (like
> > phone number) which can be used elsewhere if needed but at the very minimum
> > break the functionality into manageable units.
> > I'd love to give this a try, but unfortunately my current project manager
> > (and funder rolled into one) seems to have just dropped GWT in favour of
> > Zend and the 'here's an idea for a screenshot, make it work' approach to
> > system design.
> > Sigh!
> > Ian
>
> >http://examples.roughian.com
>
> > 2009/8/19 davis 
>
> >> Point taken Ian.  I think the design tradeoffs are at least on the
> >> table.  In most cases, I think I'm comfortable with coupling the view<-
> >> >presenter in a 1:1 relationship -- (i.e. not making universally
> >> generic presenters that can be used with any view), but I understand
> >> your argument, and can see the need for this in some scenarios.
>
> >> On Aug 19, 8:30 am, Ian Bambury  wrote:
> >> > 2009/8/19 Davis Ford 
>
> >> > > My basic question is: why not just return TextBox if that is what is
> >> > > in your view?  The coupling is between 2 classes: view and presenter.
> >> > > If you later change TextBox to SuperWidgetTextBox, you can re-factor
> >> > > it in your IDE in 5 seconds and be done with it.
>
> >> > > Am I missing something?
>
> >> > If that is the way you want to go then fine.
>
> >> > What you might be missing is that some of your views may not be using
> >> > text
> >> > boxes. One view may be using a text box. Another might use a label,
> >> > another
> >> > might use a button, or a text area, or a hyperlink, or a menu item. They
> >> > can
> >> > all display text.
>
> >> > An on/off indicator and a switch are just a boolean and something
> >> > clickable,
> >> > but you don't decide in the presenter that is should be the words 'on'
> >> > and
> >> > 'off' and demand a label, you leave it as boolean and let the view
> >> > decide
> >> > whether to put yes/no, on/off, true/false, a checkbox, an image of a
> >> > lightbulb on and off, etc - and the clickable thing could be a button
> >> > with
> >> > those words, or a p

Re: MVP question

2009-08-19 Thread Dalla

I think I can see where you´re getting at, but I´m a bit confused here
so I need to ask a couple of more questions :-)

Let´s say we return an interface as in your example, our interface
would then look something like

interface ContactDetailsInterface {
HasInternationalContactDetails getContactDetails();
}

You then have your view:
public class ContactDetailsWidget extends Composite implements
ContactDetailsInterface{
}

But where does the HasInternationalContactDetails come in?
Would your model be implementing that interface?
Something like

public class ContactDetails implements HasInternationalContactDetails
{
}

Sorry for the confusion, I´m glad you´re trying to sort things out for
us though :-)


On 20 Aug, 01:15, Ian Bambury  wrote:
> My feeling is that, if you design things properly, you will not need to end
> up with a bloated interface.
> For example, in a registration page, you don't need to have something for
> every field if you require name/address/phone number, you just link in to
> HasInternationalContactDetails and that widget deals with all the associated
> problems. You just set it up with hicd.emailRequired(true) and
> hicd.phoneRequired(false) and so on. That widget then knows how to set
> itself up. If you need to insert current details, you use
> hicd.displayDetails(userContactDetails).
>
> You check everything is OK with if(!hicd.isValid())hicd.displayErrors();
>
> You get the user contact details back with hicd.getContactDetails();
>
> All you need in your interface is HasInternationalContactDetails
> getContactDetails();
>
> Everything else works from that interface, not yours.
>
> Whatever it is that conforms to that knows all about zip and postal codes
> and what to validation apply (because it probably has a country dropdown and
> can use that) same with phone formats.
>
> The HasInternationalContactDetails widget itself uses other widgets (like
> phone number) which can be used elsewhere if needed but at the very minimum
> break the functionality into manageable units.
>
> I'd love to give this a try, but unfortunately my current project manager
> (and funder rolled into one) seems to have just dropped GWT in favour of
> Zend and the 'here's an idea for a screenshot, make it work' approach to
> system design.
>
> Sigh!
>
> Ian
>
> http://examples.roughian.com
>
> 2009/8/19 davis 
>
>
>
>
>
> > Point taken Ian.  I think the design tradeoffs are at least on the
> > table.  In most cases, I think I'm comfortable with coupling the view<-
> > >presenter in a 1:1 relationship -- (i.e. not making universally
> > generic presenters that can be used with any view), but I understand
> > your argument, and can see the need for this in some scenarios.
>
> > On Aug 19, 8:30 am, Ian Bambury  wrote:
> > > 2009/8/19 Davis Ford 
>
> > > > My basic question is: why not just return TextBox if that is what is
> > > > in your view?  The coupling is between 2 classes: view and presenter.
> > > > If you later change TextBox to SuperWidgetTextBox, you can re-factor
> > > > it in your IDE in 5 seconds and be done with it.
>
> > > > Am I missing something?
>
> > > If that is the way you want to go then fine.
>
> > > What you might be missing is that some of your views may not be using
> > text
> > > boxes. One view may be using a text box. Another might use a label,
> > another
> > > might use a button, or a text area, or a hyperlink, or a menu item. They
> > can
> > > all display text.
>
> > > An on/off indicator and a switch are just a boolean and something
> > clickable,
> > > but you don't decide in the presenter that is should be the words 'on'
> > and
> > > 'off' and demand a label, you leave it as boolean and let the view decide
> > > whether to put yes/no, on/off, true/false, a checkbox, an image of a
> > > lightbulb on and off, etc - and the clickable thing could be a button
> > with
> > > those words, or a picture of a switch, or the checkbox.
>
> > > The presenter can be used for all these views. Different views can
> > register
> > > with the same presenter. Users can choose their preferred view and swap
> > > views in and out.
>
> > > Ian
>
> > >http://examples.roughian.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-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
-~--~~~~--~~--~--~---



Weird Bug (sorry)

2009-08-19 Thread Luke

I wouldn't normally ask things like this but I have something weird
going on that I cannot figure out.

I have a class that I am using to get information from the server.
The JSONArray that is returned by calling the function
ServerConnector.getProjectArray() is then evaluated.  The function
that calls this function is supposed to print the information to the
screen.  The output is nothing.

Here is where it gets weird, if I add an window.alert("some string");
before return jsonArray; then the page will print fine.  With out the
alert it will not print.  I am completely confused.  Sorry for asking
about a bug but I don't know if it is something with me or not.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to fire events registered with a HandlerManager?

2009-08-19 Thread jscheller

Hello -

So, I've got a composite that has something like this inside it...

private HandlerManager changeHandlers = new HandlerManager( null );

public HandlerRegistration  addValueChangeHandler(ValueChangeHandler
handler)
   { return changeHandlers.addHandler(ValueChangeEvent.getType(),
handler); }

...and somewhere down the pipeline, I want to actually fire off an
event to anyone who registered a handler when the composite decides
it's represented value has changed and wants the rest of the world to
know. However, the syntax for actually constructing and firing the
event off has got me pulling my hair out.

I've tried variants of sending the event through the change
handlers...

changeHandlers.fireEvent( new ValueChangeEvent("foo") );
changeHandlers.fireEvent( new ValueChangeEvent("foo") );

...and using the static fire() method in the event class itself...

ValueChangeEvent.fire( changeHandlers, "foo");

...and Eclipse complains loudly about all of these constructions. I
mean, I know this can't be that hard, but I can't find any good
examples of things like this using the new (GWT 1.6 or later) event
handlers, and reading the code sends me down a DOM event/Java generics
rabbit hole that I'm frankly not experienced enough to deal with
yet...

Any help appreciated!

Jim


--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread Davis Ford

You and others have won me over, Ian :)

I re-factored to all interfaces.  One of my biggest pain points was
the crazy number of mock and mock returns I was ending up needing --
that, and I needed to included gwt-dev on the classpath, which the
codehaus gwt-maven-plugin warns not to do...

It still blows up kind of big when you have a form with even a
reasonable number of widgets on it.  Example, I have 7 text boxes on
one form.  For each, I want to get at its value and also set a blur
handler...so I end up with:

interface Display {
   HasValue foo();
   HasBlurHandlers fooBlur();
   ...
}

That leads to 14 methods in the interface -- I wish there was some way
to collapse this.  I also have 7-8 additional HasClickHandlers, and a
number of methods like:

void displayFooError(boolean toggle, String msg);

To tell the view to report an error.  So in the end, the interface for
*this* particular presenter is fairly large, but so be it, I guess.

Sorry, to hear your project got hi-jacked.  I enjoy your blog posts --
hope you will keep posting stuff on GWT.

Regards,
Davis

On Wed, Aug 19, 2009 at 7:15 PM, Ian Bambury wrote:
> My feeling is that, if you design things properly, you will not need to end
> up with a bloated interface.
> For example, in a registration page, you don't need to have something for
> every field if you require name/address/phone number, you just link in to
> HasInternationalContactDetails and that widget deals with all the associated
> problems. You just set it up with hicd.emailRequired(true) and
> hicd.phoneRequired(false) and so on. That widget then knows how to set
> itself up. If you need to insert current details, you use
> hicd.displayDetails(userContactDetails).
> You check everything is OK with if(!hicd.isValid())hicd.displayErrors();
> You get the user contact details back with hicd.getContactDetails();
> All you need in your interface is HasInternationalContactDetails
> getContactDetails();
> Everything else works from that interface, not yours.
> Whatever it is that conforms to that knows all about zip and postal codes
> and what to validation apply (because it probably has a country dropdown and
> can use that) same with phone formats.
> The HasInternationalContactDetails widget itself uses other widgets (like
> phone number) which can be used elsewhere if needed but at the very minimum
> break the functionality into manageable units.
> I'd love to give this a try, but unfortunately my current project manager
> (and funder rolled into one) seems to have just dropped GWT in favour of
> Zend and the 'here's an idea for a screenshot, make it work' approach to
> system design.
> Sigh!
> Ian
>
> http://examples.roughian.com
>
>
> 2009/8/19 davis 
>>
>> Point taken Ian.  I think the design tradeoffs are at least on the
>> table.  In most cases, I think I'm comfortable with coupling the view<-
>> >presenter in a 1:1 relationship -- (i.e. not making universally
>> generic presenters that can be used with any view), but I understand
>> your argument, and can see the need for this in some scenarios.
>>
>> On Aug 19, 8:30 am, Ian Bambury  wrote:
>> > 2009/8/19 Davis Ford 
>> >
>> >
>> >
>> > > My basic question is: why not just return TextBox if that is what is
>> > > in your view?  The coupling is between 2 classes: view and presenter.
>> > > If you later change TextBox to SuperWidgetTextBox, you can re-factor
>> > > it in your IDE in 5 seconds and be done with it.
>> >
>> > > Am I missing something?
>> >
>> > If that is the way you want to go then fine.
>> >
>> > What you might be missing is that some of your views may not be using
>> > text
>> > boxes. One view may be using a text box. Another might use a label,
>> > another
>> > might use a button, or a text area, or a hyperlink, or a menu item. They
>> > can
>> > all display text.
>> >
>> > An on/off indicator and a switch are just a boolean and something
>> > clickable,
>> > but you don't decide in the presenter that is should be the words 'on'
>> > and
>> > 'off' and demand a label, you leave it as boolean and let the view
>> > decide
>> > whether to put yes/no, on/off, true/false, a checkbox, an image of a
>> > lightbulb on and off, etc - and the clickable thing could be a button
>> > with
>> > those words, or a picture of a switch, or the checkbox.
>> >
>> > The presenter can be used for all these views. Different views can
>> > register
>> > with the same presenter. Users can choose their preferred view and swap
>> > views in and out.
>> >
>> > Ian
>> >
>> > http://examples.roughian.com
>>
>
>
> >
>



-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

--~--~-~--~~~---~--~~
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

Re: Where/how download gwt 1.7 source code

2009-08-19 Thread James

Hi,

SVN: http://google-web-toolkit.googlecode.com/svn/trunk/
Donwload List: http://code.google.com/p/google-web-toolkit/downloads/list

The source code in jar files as well.

On Aug 20, 8:36 am, irc1258  wrote:
> I'd like to have access to gwt 1.7 source code. I saw somewhere on
> this site that it should be included with the std gwt download. This
> apparently is not the case as it is not in my download of 1.7. Do I
> need to download it from svn? If so, can someone say were exactly it
> is in svn? 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
-~--~~~~--~~--~--~---



Where/how download gwt 1.7 source code

2009-08-19 Thread irc1258

I'd like to have access to gwt 1.7 source code. I saw somewhere on
this site that it should be included with the std gwt download. This
apparently is not the case as it is not in my download of 1.7. Do I
need to download it from svn? If so, can someone say were exactly it
is in svn? 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: Possible to set -localWorkers compiler flag in Eclipse?

2009-08-19 Thread jscheller

On Aug 19, 5:22 pm, "spike2...@googlemail.com"
 wrote:
> But when I press Compile/Browse in the Hosted Mode I still only use 1
> processor, how do I change that?

Are you passing a number after the flag, i.e. "-localWorkers 4" or
similar?
--~--~-~--~~~---~--~~
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: Possible to set -localWorkers compiler flag in Eclipse?

2009-08-19 Thread spike2...@googlemail.com

But when I press Compile/Browse in the Hosted Mode I still only use 1
processor, how do I change that?

On 27 Jul., 19:02, jscheller  wrote:
> Thanks Jason! Too much digging in all the preferences and settings
> trees, only to find this right in front of me... Duh.
--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread Ian Bambury
My feeling is that, if you design things properly, you will not need to end
up with a bloated interface.
For example, in a registration page, you don't need to have something for
every field if you require name/address/phone number, you just link in to
HasInternationalContactDetails and that widget deals with all the associated
problems. You just set it up with hicd.emailRequired(true) and
hicd.phoneRequired(false) and so on. That widget then knows how to set
itself up. If you need to insert current details, you use
hicd.displayDetails(userContactDetails).

You check everything is OK with if(!hicd.isValid())hicd.displayErrors();

You get the user contact details back with hicd.getContactDetails();

All you need in your interface is HasInternationalContactDetails
getContactDetails();

Everything else works from that interface, not yours.

Whatever it is that conforms to that knows all about zip and postal codes
and what to validation apply (because it probably has a country dropdown and
can use that) same with phone formats.

The HasInternationalContactDetails widget itself uses other widgets (like
phone number) which can be used elsewhere if needed but at the very minimum
break the functionality into manageable units.

I'd love to give this a try, but unfortunately my current project manager
(and funder rolled into one) seems to have just dropped GWT in favour of
Zend and the 'here's an idea for a screenshot, make it work' approach to
system design.

Sigh!

Ian

http://examples.roughian.com


2009/8/19 davis 

>
> Point taken Ian.  I think the design tradeoffs are at least on the
> table.  In most cases, I think I'm comfortable with coupling the view<-
> >presenter in a 1:1 relationship -- (i.e. not making universally
> generic presenters that can be used with any view), but I understand
> your argument, and can see the need for this in some scenarios.
>
> On Aug 19, 8:30 am, Ian Bambury  wrote:
> > 2009/8/19 Davis Ford 
> >
> >
> >
> > > My basic question is: why not just return TextBox if that is what is
> > > in your view?  The coupling is between 2 classes: view and presenter.
> > > If you later change TextBox to SuperWidgetTextBox, you can re-factor
> > > it in your IDE in 5 seconds and be done with it.
> >
> > > Am I missing something?
> >
> > If that is the way you want to go then fine.
> >
> > What you might be missing is that some of your views may not be using
> text
> > boxes. One view may be using a text box. Another might use a label,
> another
> > might use a button, or a text area, or a hyperlink, or a menu item. They
> can
> > all display text.
> >
> > An on/off indicator and a switch are just a boolean and something
> clickable,
> > but you don't decide in the presenter that is should be the words 'on'
> and
> > 'off' and demand a label, you leave it as boolean and let the view decide
> > whether to put yes/no, on/off, true/false, a checkbox, an image of a
> > lightbulb on and off, etc - and the clickable thing could be a button
> with
> > those words, or a picture of a switch, or the checkbox.
> >
> > The presenter can be used for all these views. Different views can
> register
> > with the same presenter. Users can choose their preferred view and swap
> > views in and out.
> >
> > Ian
> >
> > http://examples.roughian.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-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: Posting back xml to server

2009-08-19 Thread Ian Bambury
Hi Rahul,
Basically, you get the contents of an XML file on the server and send it as
a string to the GWT client. It gets changed on the client, then you send it
back as a string to the server where a server script writes it back to the
file.

You can send a file from the server to the client and have the user save it
somewhere, but your GWT code can't update the file on the client's machine
using HTML and JavaScript (which is what GWT is) so unless the user updates
the XML in some other way, FileUpload is no use to you.

Ian

http://examples.roughian.com


2009/8/19 Rahul 

>
> hi,
> I am sorry if i was unclear with my issue( because i havent recieved
> any replies yet)
>
> I am getting an xml file from the server using RequestBuilder. Then I
> am modifying the values of the xml and I would like to post back the
> modified xml back to the server. So the next time i get the xml file,
> i get the modified xml file.
>
> I am able to get the file from server and successful modify it, but i
> am not able to get how to send the modified xml back to server.
> I have few options but i have reasons that they would not work:
>
> a) one if to use gwtupload or fileupload widget, but they want a file
> to specified i.e. the path and wht is the path of the xml file that
> has been retrieved by the client?
>
> b) From RequestBuilder, i think there should be a way from this where
> the functionality can be done, but i am searchingt and not able to
> find it
>
> please help!!!
>
>
> On Aug 19, 11:05 am, Rahul  wrote:
> > Hi
> > Would using the Fileupload widget or the gwtupload project solve my
> > purpose?
> >
> > On Aug 18, 1:47 pm, Rahul  wrote:
> >
> > > Hi,
> > > I want to retrieve an XML from the server to my client , changing
> > > values of that xml and want to send the modified xml back to the
> > > server.
> >
> > > Presently i am successful in retrieving the xml and modifying the xml,
> > > but how to send it back?
> >
> > > i am using:
> > > RequestBuilder builder5 = new RequestBuilder
> > > (RequestBuilder.POST,"file.xml");
> >
> > > to post it back to the server
> >
> > > but this is not working
> > > can anyone tell me where am i going wrong?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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: Who is using smartgwt?

2009-08-19 Thread Shawn Brown

Hi,

>   the lack of
> documentation is a serious issue.
> 4) i found the ext architecture to be overly complex
> 5) I might be wrong , but Ext feels to me just like Spring, their open
> source code is just a way to drive , sales of books, trade shows , and
> support contracts.

I went with GXT and am happy with it.  The samples they provide are a
much better source for understanding the architecture that a 3rd party
book I have on it.

Anyway, best luck to the smartGWT team!

--~--~-~--~~~---~--~~
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: GWTENT 0.7 is available for download - A Reflection, AOP, HTML template, UI Binding and Validate(JSR303) framework for GWT

2009-08-19 Thread James

It's depends, I'm using it in production environment.

On Aug 19, 10:35 pm, Eduardo Nunes  wrote:
> do you recommend it to use in production environment?
>
>
>
> On Wed, Aug 19, 2009 at 4:57 AM, James wrote:
>
> > Hi, Guys
>
> >  GWTENT 0.7 now is available for download now, this version add
> > UIBinding and Validate(JSR303) support to GWT and Bug fixes of
> > HTMLTemplate and Reflection.
>
> >  Project web page:http://code.google.com/p/gwt-ent/
>
> >  A showcase web page provided, it's only two screen at this moment,
> > but it's a start.
> >  You can access 
> > here:http://gwtent-showcase.appspot.com/gwtent_showcase/Gwtent_showcase.html
>
> >  Changes In this version:
>
> > 1, New widgets
> >   EnumListBox
> >   RadioSelector
>
> > 2, Binder
> >   EnumListBoxBinder
> >   ListBoxBinder
> >   TextBoxBinder
> >   CheckBoxBinder
> >   RichTextAreaBinder
> >   RadioSelectorBinder
> >   LabelBinder
>
> > 3, Validators
> >   Required
> >   Size
> >   Min
> >   NotEmpty
> >   NotNull
> >   Email
> >   Regular
> >   URL
>
> > 4, Utils Classes
> >   NotifyListener
> >   WebUtils
> >   PageBug integration
>
> > Thanks & Regards
> > James
>
> --
> Eduardo S. Nuneshttp://e-nunes.com.br
--~--~-~--~~~---~--~~
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: url rewrite and gwt

2009-08-19 Thread Bhayat

thanks for help,i sent it to your gmail account

On 19 Ağustos, 17:11, davis  wrote:
> Bhayat -- feel free to email the project to me.  I'll take a look at
> it tonight.  I'll be happy to help you out.
>
> On Aug 19, 9:45 am, Bhayat  wrote:
>
> > yes Davis i am looking at this side in 4 days but i am still in
> > trouble.if you want (of course i will be very happy),i can send u my
> > simple example project ? of course to your gmail account
>
> > On 19 Ağustos, 16:13, davis  wrote:
>
> > > Yep, I have been using urlrewrite successfully in GWT project for a
> > > couple weeks now since I introduced it.  It works great!
>
> > > Here's a sample maven GWT project you can download that uses
> > > urlrewrite:http://zenoconsulting.wikidot.com/blog:16
>
> > > Regards,
> > > Davis
>
> > > On Aug 19, 9:03 am, Ian Bambury  wrote:
>
> > > > 2009/8/19 Bhayat 
>
> > > > > hmm are u sure that url rewrite is impossible in gwt side
>
> > > > Yes.
>
> > > > Rewrites are done on the server, GWT is on the client.
>
> > > > Ian
>
> > > >http://examples.roughian.com-Alıntıyı gizle -
>
> > > - Alıntıyı göster -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



did you forget to inherit a required module? error while building the GWT Project

2009-08-19 Thread sudheer

Hello

Iam a newbie to GWT and iam still in the learning stage.When iam
trying to  build my GWT Project,iam getting the following error.I
integrated the spring mail functionality,so iam using the SimplEmail
Notifier.I have a class valled login.java where i included the code
for simpleEmail Notifier.The code goes like below

 public void onClick(ClickEvent event) {
 if(username!=null && username.getText()!=null &&
username.getText().equals("admin")
 && password!=null && password.getText()!=null
&& password.getText().equals("admin")){

 RootPanel.get("header").clear();
 RootPanel.get("mainPane").clear();
 RootPanel.get("loginTitleHeader").clear();
 consturctHomePage(username.getText
(),password.getText());
 EmailNotifierBean emailNotifierBean = new
EmailNotifierBean();
 AbstractEmailNotifier simpleEmailNotifier =
emailNotifierBean.getSimpleEmailNotifier();
 simpleEmailNotifier.sendEmail("Please find the
monitor Activities Below");
 }

 }
This class is in another package.When iam trying to build my code iam
getting the below error.Could somebody please advise

Buildfile: C:\projects\tm\signalSMART\build.xml
libs:
javac:
gwtc:
 [java] Compiling module com.atx.signalsmart.login
 [java]Refreshing module from source
 [java]   Validating newly compiled units
 [java]  Removing units with errors
 [java] [ERROR] Errors in 'file:/C:/projects/tm/
signalSMART/src/com/atx/signalsmart/client/login.java'
 [java][ERROR] Line 85: No source code is
available for type com.atx.signalsmart.beans.EmailNotifierBean; did
you forget to inherit a required module?
 [java][ERROR] Line 86: No source code is
available for type com.atx.signalsmart.mail.AbstractEmailNotifier; did
you forget to inherit a required module?
 [java]Computing all possible rebind results for
'com.atx.signalsmart.client.login'
 [java]   Rebinding com.atx.signalsmart.client.login
 [java]  Checking rule 
 [java] [ERROR] Unable to find type
'com.atx.signalsmart.client.login'
 [java][ERROR] Hint: Previous compiler errors may
have made this type unavailable
 [java][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

BUILD FAILED
C:\projects\tm\signalSMART\build.xml:34: Java returned: 1

Thanks
Sudheer

--~--~-~--~~~---~--~~
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: url rewrite and gwt

2009-08-19 Thread Bhayat

pardon not gmail account your address that is below


On 20 Ağustos, 00:07, Bhayat  wrote:
> thanks for help,i sent it to your gmail account
>
> On 19 Ağustos, 17:11, davis  wrote:
>
> > Bhayat -- feel free to email the project to me.  I'll take a look at
> > it tonight.  I'll be happy to help you out.
>
> > On Aug 19, 9:45 am, Bhayat  wrote:
>
> > > yes Davis i am looking at this side in 4 days but i am still in
> > > trouble.if you want (of course i will be very happy),i can send u my
> > > simple example project ? of course to your gmail account
>
> > > On 19 Ağustos, 16:13, davis  wrote:
>
> > > > Yep, I have been using urlrewrite successfully in GWT project for a
> > > > couple weeks now since I introduced it.  It works great!
>
> > > > Here's a sample maven GWT project you can download that uses
> > > > urlrewrite:http://zenoconsulting.wikidot.com/blog:16
>
> > > > Regards,
> > > > Davis
>
> > > > On Aug 19, 9:03 am, Ian Bambury  wrote:
>
> > > > > 2009/8/19 Bhayat 
>
> > > > > > hmm are u sure that url rewrite is impossible in gwt side
>
> > > > > Yes.
>
> > > > > Rewrites are done on the server, GWT is on the client.
>
> > > > > Ian
>
> > > > >http://examples.roughian.com-Alıntıyı gizle -
>
> > > > - Alıntıyı göster -
--~--~-~--~~~---~--~~
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: JSONValue variable throwing runtime exception.

2009-08-19 Thread Thad

The top-level data is not an array.  It's an object with two keys,
"jewelry" and "metalwork", which contain arrays.  See the diagrams in
http://www.json.org/

You need to call data.keySet() and iterate through the keys.

On Aug 19, 1:25 pm, Tarek  wrote:
> Hi,
>
> I'm trying to parse a JSON value returned by my PHP script. The
> returned JSON string is valid and the project compiles just fine. The
> problem I'm running into is that JavaScript throws a "(TypeError):
> data.isArray() is null".
>
> JavaScript throws that same exception for isTYPE method except for
> isNull (which returns 'null'). I seem to be missing a step or two in
> getting GWT to recognize that my JSON string is a multi-dimensional
> array.
>
> -- BEGIN JSON String --
> {
>     "jewelry": [
>         {
>             "ID": "2",
>             "item": "Minos",
>             "description": "Inspired by an Ancient Minoan urn.",
>             "price": "100",
>             "qty": "1"
>         },
>         {
>             "ID": "4",
>             "item": "Muse",
>             "description": null,
>             "price": "100",
>             "qty": "1"
>         }
>     ],
>     "metalwork": [
>         {
>             "ID": "5",
>             "item": "Magritte Bowls",
>             "description": null,
>             "price": "200",
>             "qty": "1"
>         },
>         {
>             "ID": "6",
>             "item": "Poker Fan",
>             "description": null,
>             "price": "200",
>             "qty": "2"
>         }
>     ]}
>
> --END JSON String--
> Naturally the returned JSON isn't as pretty, but the only thing
> missing are all the tabs and newlines.
>
> Here is how I access it:
> -- BEGIN CODE SNIPPET --
> //inside the onResponseReceived method
> if (200 == response.getStatusCode()){
>         // process the response
>         JSONValue returnedJSON = JSONParser.parse(response.getText());
>         PopulateTable(returnedJSON);}//end if
>
> .
> .
> .
> private void PopulateTable(JSONValue data) {
>         try {
>                 // Everything up to this point is works just fine. 
> Window.Alert
> statements fire just fine
>                 JSONArray itemsArr = data.isArray();
>                 // Anything from the above statement forward doesn't fire so 
> the
> exception must be right there.
>                 .
>                 .
>                 .
>         }//end try
>         catch (Exception e){
>                 Window.alert("Caught Excaption: '" + e.getMessage() + "'.");
>         }//end catch
> -- END CODE SNIPPET --
>
> As far as I'm aware; JSONParser returns type JSONValue and the only
> way to parse that to a JSONArray is the isArray() method. Am I correct
> in that assumption? If so any idea why it's balking when I try to do
> it that way?
>
> Looking forward to your responses.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Using Multiple GWT versions simultaneously

2009-08-19 Thread Nirmal

Hi,

I am currently using GWT 1.4 for my app.

I want to migrate to later versions of GWT but, the codebase is
sufficiently large that I cannot imagine changing all the event
handling if I move to GWT1.7.

So my questions are:

Can I continue using GWT 1.4 for my old modules and use GWT1.7 only
for the new modules?

Are there any other approaches I could use to begin GWT1.7 for my new
code without having to worry about my old code (on GWT1.4)?

Regards,
Nirmal

--~--~-~--~~~---~--~~
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: Proxying server calls with a servlet

2009-08-19 Thread Thomas Broyer



On 19 août, 21:26, Marcelo Sena  wrote:
> Continuing from: 
> http://code.google.com/p/google-web-toolkit/issues/detail?id=3131
>
> >@marceloslacerda: the error when running your unit tests means that the
> >GWTShellServlet is reached, so either you set the servlet-mapping after the 
> >one for
> >the GWTShellServlet in your web.xml
>
> It isn't:
>
>     
>        proxy
>        /thingpad/rpc*
>     
>
>     
>         shell
>         /*
>      
>
> >Or the web.xml isn't taken into account (by default, the 'tomcat' dir is 
> >read/created from/to your current working dir, you can pass ->Dcatalina.base 
> >to explicitly tell the GWTShell which directory to use; your can
> >pass "-logLevel debug" in -Dgwt.args to have the GWTShell output the one it 
> >picked)
>
> Where do I set that?

Depends on how you're launching your unit tests... if you use Eclipse,
then go to your "Run configurations..." and add the -D... in the "VM
arguments" in the Arguments tab.
Instead of the -logLevel argument (-Dgwt.args), just select the
appropriate log level (DEBUG) in the "GWT JUnit" tab, if you're using
the Google Plugin for Eclipse.

> >As for your issue in HostedMode, well, I have no idea.
[...]
> And the war/WEB-INF/web.xml http://pastebin.com/m7efdfd49

The DTD says that  should come *after* 
and , but I guess you would have an error or at least
warning instead of the servlet-mapping just not being used...
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Proxying server calls with a servlet

2009-08-19 Thread Marcelo Sena

Continuing from: 
http://code.google.com/p/google-web-toolkit/issues/detail?id=3131

>@marceloslacerda: the error when running your unit tests means that the
>GWTShellServlet is reached, so either you set the servlet-mapping after the 
>one for
>the GWTShellServlet in your web.xml
It isn't:


   proxy
   /thingpad/rpc*



shell
/*
 


>Or the web.xml isn't taken into account (by default, the 'tomcat' dir is 
>read/created from/to your current working dir, you can pass ->Dcatalina.base 
>to explicitly tell the GWTShell which directory to use; your can
>pass "-logLevel debug" in -Dgwt.args to have the GWTShell output the one it 
>picked)
Where do I set that?

>As for your issue in HostedMode, well, I have no idea.
Maybe a screenshot of the hosted mode spam output could help?
http://bayimg.com/baDhPAacf

Also here is the tomcat/webapps/ROOT/WEB-INF/web.xml 
http://pastebin.com/m738a9086
And the war/WEB-INF/web.xml http://pastebin.com/m7efdfd49
Hope I'm not taking too much of your 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
-~--~~~~--~~--~--~---



Re: Refresh page on loading

2009-08-19 Thread Ian Bambury
Hi Rahul,
For some reason I didn't get the email Chad has replied to.

I'm sure there must be a way to create the layout you want in the right
order first time. Do you have an example?

Refreshing should create exactly the same effect as running it the first
time (all other factors being equal - i.e. you are not setting a bookmark or
anything like that)

Also, I'm not sure I understand what you mean by 'cascading tabs'.

Ian

http://examples.roughian.com


2009/8/19 Chad 

>
> Rahul,
>
> Instead of trying to refresh the page, you should probably defer the
> loading of your buttons, labels, and tabs. Use a DeferredCommand for
> making the call to the method(s) for creating those widgets. It sounds
> like they are loading before something that they rely on loads.
> Although, this may have no effect whatsoever. :-/
>
> HTH,
> Chad
>
> On Aug 18, 9:32 am, Rahul  wrote:
> > Hi,
> > I am loading buttons in individual tabs of a tab panel. In the tab
> > panel i have some labels in order and also some cascading tabs in
> > order.
> > The first time the page is loaded, the buttons (which i want at the
> > bottom) are at the top of each tab and the cascading tabs which i want
> > in order are at the bottom of each tab. But whenever i refresh the
> > page once, everything comes to the place i want. So i figured that if
> > i refresh the page once it has been loaded, i can get the widgets
> > where i want them
> >
> > is this the right approach or theres a better way to do this ?
> >
> > On Aug 17, 11:06 pm, Ian Bambury  wrote:
> >
> >
> >
> > > Why do you want to reload the page as soon as it has just loaded?
> > > Can't you just get it right the first time?
> >
> > > What do you want to happen the second time that didn't happen the first
> > > time?
> >
> > > Ian
> >
> > >http://examples.roughian.com
> >
> > > 2009/8/18 Rahul 
> >
> > > > HI Ian,
> > > > thanks for replying
> > > > i have started looking at some tutorials for javascript
> > > > but i have some more confusion.
> >
> > > > all coding i did in gwt was in java in the client class, so for this
> > > > functionality also i need to code in the client class? or not? i need
> > > > to do javascript for tht. and if i can do in java, what is the
> function
> > > > ( because when searched it always shows me how to do with javascript
> > > > and not in java)
> >
> > > > On Aug 17, 6:00 pm, Ian Bambury  wrote:
> > > > > 2009/8/17 Rahul 
> >
> > > > > > Hi
> > > > > > I want to refresh my webpage once after loading completely. I am
> using
> > > > > > this code for this
> >
> > > > > >
> > > > > >function MyReload()
> > > > > >{
> > > > > >window.location.reload();
> > > > > >}
> > > > > >
> >
> > > > > > and calling
> > > > > >   on body part of my html file
> >
> > > > > > but this is not working
> > > > > > can anyone tell me where am i going wrong?
> >
> > > > > First problem is that you are asking a JavaScript question in a GWT
> group
> > > > > :-)
> >
> > > > > Second problem is that your webpage will loop, endlessly loading
> and
> > > > > reloading. This a pretty basic a mistake, so maybe it would be a
> good
> > > > idea
> > > > > to search for some JavaScript tutorials or sign up to a JavaScript
> > > > > beginners' group.
> >
>

--~--~-~--~~~---~--~~
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: when should we use GWT RPC and HTTP mechanism to communicate to server

2009-08-19 Thread mdwarne

Hi venkl,

We use RPC because it makes things so simple.
For some of our service calls we pass java objects as parameters to
the service.

The response coming back are also java objects. such as lists and
arrays of data etc.
Boolean, integers, dates etc are automatically converted, and arrive
in their native format on either side (client or server).

RPC will automatically convert the java object, and escape any funny
characters and send the objects back and forth from client to server
etc.

If you don't use RPC, then you as the Programmer,  will be responsible
for creating your own messages, and parsing them.  You will also need
to make sure you encode/decode any special HTTP reserved  characters.

RPC is great if you are comfortable using a Java Servlet on the
server.

If  you want to use PHP, or other types of services, then you must use
JSON, or XML etc to pass your data back an forth, unless the response
is simple text.

Mike.

On Aug 19, 2:43 am, venki  wrote:
> Thank you DaveS
>
> Ok cool instance... One more doubt Dave. I understand your example.
> Let us suppose my service is going to use by GWT client only. So in
> this case i can use either GWT RPC or HTTP. So i can do my application
> with out using RPC  also rather i can use HTTP.Can you please tell me
> an instances why should i opt for GWT RPC mechanism only. I mean i am
> expecting the answers that in what cases we are forced to use RPC
> rather than HTTP. If possible can you please tell me the advantages
> RPC over HTTP.
>
> Once again thank you very much for your reply..
>
> Have a good day Dave
>
> On Aug 19, 1:34 pm, DaveS  wrote:
>
>
>
> > Our application uses both, depending on quite a few factors. In some
> > cases we are putting data into Flash (.swf) components, and need it in
> > XML, so we use a 'raw' HTTP request to get the data. In most other
> > cases we use GWT RPC to retreive data from the server, or to initiate
> > actions in the server. There really is no single answer, it just
> > depends on your application.
>
> > We have considered moving away from GWT RPC more than once, thinking
> > we might provide an 'open interface' or web-service interface, but so
> > far the convenience of RPC has been the overwhelming reason we are
> > continuing to use it.
>
> > I guess you could say, if there is no need to make the service
> > available to anything other than your GWT client, then use RPC, but if
> > you want to open the interface to 3rd parties, other apps or anything
> > like that, consider using HTTP.
>
> >   Dave.
>
> > On Aug 18, 5:56 pm, venki  wrote:
>
> > > Hi to all,
>
> > > I am new to GWT. I read GWT communication with server tutorial. It
> > > provides various mechanisms to communicate with the server. Any way i
> > > know how to use GWT RPC and HTTP mechanism to communicate with
> > > server.
>
> > > I request all of you can you give perfect explanation towhenshould
> > > we use RPC mechanism andwhenshould we use HTTP mechanism. I mean at
> > > what type instances we are forced to use particular mechanism.
>
> > > Great 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



ImageBundle png getting downloaded multiple times

2009-08-19 Thread retro

Hi,
   When i go to my app firebug shows the xyz.cache.png being
downloaded once. If i hit refresh i see 4 requests for the same image
strip?

Any ideas why will this happen?

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
-~--~~~~--~~--~--~---



Eclipse 3.5 and GWT Plugin

2009-08-19 Thread Paul Grenyer

Hi All

I've taken the plunge and upgraded to Eclipse 3.5 with the latest
version of the plugin.

However, when I install it (from the update site) I loose my previous
plugins (subclipse, IvyDE, etc) and there's no sign of the GWT plugin
either, although all of my plugins, including GWT, are still listed as
installed.

What gives? :-)

-- 
Thanks
Paul

Paul Grenyer
e: paul.gren...@gmail.com
w: http://www.marauder-consulting.co.uk
b: paulgrenyer.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-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: Posting back xml to server

2009-08-19 Thread Rahul

hi,
I am sorry if i was unclear with my issue( because i havent recieved
any replies yet)

I am getting an xml file from the server using RequestBuilder. Then I
am modifying the values of the xml and I would like to post back the
modified xml back to the server. So the next time i get the xml file,
i get the modified xml file.

I am able to get the file from server and successful modify it, but i
am not able to get how to send the modified xml back to server.
I have few options but i have reasons that they would not work:

a) one if to use gwtupload or fileupload widget, but they want a file
to specified i.e. the path and wht is the path of the xml file that
has been retrieved by the client?

b) From RequestBuilder, i think there should be a way from this where
the functionality can be done, but i am searchingt and not able to
find it

please help!!!


On Aug 19, 11:05 am, Rahul  wrote:
> Hi
> Would using the Fileupload widget or the gwtupload project solve my
> purpose?
>
> On Aug 18, 1:47 pm, Rahul  wrote:
>
> > Hi,
> > I want to retrieve an XML from the server to my client , changing
> > values of that xml and want to send the modified xml back to the
> > server.
>
> > Presently i am successful in retrieving the xml and modifying the xml,
> > but how to send it back?
>
> > i am using:
> > RequestBuilder builder5 = new RequestBuilder
> > (RequestBuilder.POST,"file.xml");
>
> > to post it back to the server
>
> > but this is not working
> > can anyone tell me where am i going wrong?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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
-~--~~~~--~~--~--~---



JSONValue variable throwing runtime exception.

2009-08-19 Thread Tarek

Hi,

I'm trying to parse a JSON value returned by my PHP script. The
returned JSON string is valid and the project compiles just fine. The
problem I'm running into is that JavaScript throws a "(TypeError):
data.isArray() is null".

JavaScript throws that same exception for isTYPE method except for
isNull (which returns 'null'). I seem to be missing a step or two in
getting GWT to recognize that my JSON string is a multi-dimensional
array.

-- BEGIN JSON String --
{
"jewelry": [
{
"ID": "2",
"item": "Minos",
"description": "Inspired by an Ancient Minoan urn.",
"price": "100",
"qty": "1"
},
{
"ID": "4",
"item": "Muse",
"description": null,
"price": "100",
"qty": "1"
}
],
"metalwork": [
{
"ID": "5",
"item": "Magritte Bowls",
"description": null,
"price": "200",
"qty": "1"
},
{
"ID": "6",
"item": "Poker Fan",
"description": null,
"price": "200",
"qty": "2"
}
]
}
--END JSON String--
Naturally the returned JSON isn't as pretty, but the only thing
missing are all the tabs and newlines.

Here is how I access it:
-- BEGIN CODE SNIPPET --
//inside the onResponseReceived method
if (200 == response.getStatusCode()){
// process the response
JSONValue returnedJSON = JSONParser.parse(response.getText());
PopulateTable(returnedJSON);
}//end if
.
.
.
private void PopulateTable(JSONValue data) {
try {
// Everything up to this point is works just fine. Window.Alert
statements fire just fine
JSONArray itemsArr = data.isArray();
// Anything from the above statement forward doesn't fire so the
exception must be right there.
.
.
.
}//end try
catch (Exception e){
Window.alert("Caught Excaption: '" + e.getMessage() + "'.");
}//end catch
-- END CODE SNIPPET --

As far as I'm aware; JSONParser returns type JSONValue and the only
way to parse that to a JSONArray is the isArray() method. Am I correct
in that assumption? If so any idea why it's balking when I try to do
it that way?

Looking forward to your responses.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Automatic resource inclusion for CSS and cache?

2009-08-19 Thread retro

When we use stylesheet in module xml file does GWT compiler keep track
of if the stylesheet changes? I mean does the bootstrap nocache pull
the changed CSS everytime it changes like it does for the cache.html
or do we need to add the appropriate cache headers?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Balloon tooltip/callout widget

2009-08-19 Thread lowecg2004

On accessing the new Adwords interface for the first time I was met
with a balloon tooltip/callout message that read "Welcome to the New
AdWords Interface ...".

I need that widget!  Does anyone know if it is publicly available? If
so I'd be grateful for some info or a link.  I've been hunting for
such a widget for a while now and non so far have been ideal.

Cheers,

Chris.
--~--~-~--~~~---~--~~
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: Gin + JSNI

2009-08-19 Thread Jeff Chimene

On 08/19/2009 07:13 AM, Jeff Chimene wrote:
> On Wed, Aug 19, 2009 at 1:30 AM, Thomas Broyer wrote:
>>
>>
>>
>> On 19 août, 02:37, Jeff Chimene  wrote:
>>>
>>> I think I have a solution. As I understand it, when testing, one
>>> modifies the Gin Appmodule as required?
>>
>> I'd rather use a test-specific module that extends/overrides/
>> overwrites the one used for "production".
> 
> Agreed. That's what I now have.
> 
>>
>>> In this example, I use the "EmptyServer..." provider. When in
>>> production, I use the "Server..." provider.
>> [...]
>>> o The JavaScript overlay type "Server" is as expected, i.e. as described
>>> athttp://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#D...
>>>
>>> o The Gin AppModule is basically:
>>> package com.foo.client.jsnitest.client;
>>> import com.google.gwt.inject.client.AbstractGinModule;
>>> public class AppModule extends AbstractGinModule {
>>>  @Override
>>>  protected void configure() {
>>>   bind(Server.class).toProvider(EmptyServerProvider.class); // test
>>> or
>>>   bind(Server.class).toProvider(ServerProvider.class); // production
>>>  }
>>>
>>> }
>>
>> Why not use a provider method? (I supposed you had reusable classes,
>> that's why I proposed a Provider subclass, but provider methods
>> work very well with a shorter code)
> 
> I don't understand. Isn't this a provider method?
> 
>>> o EmptyServerProvider is basically:
>>> package com.foo.client.jsnitest.client;
>>> import com.google.inject.Inject;
>>> import com.google.inject.Provider;
>>> public class EmptyServerProvider implements Provider {
>>>  private final Server   server;
>>>
>>>  @Inject
>>>  public EmptyServerProvider() {
>>
>> No need for @Inject on a zeo-arg ctor.
> 
> This is a subtle point. So when does one decorate constructors? I had
> hoped that the declarations in AppModule would be sufficent. It seems
> that declarations are sufficent and necessary, but the decoration is
> only sufficient?

Never mind. I was thinking of the MainWidget() when I wrote this. Thanks
for the close inspection of the code!


--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread Dalla

I remember testing this approach when playing around with the GWT Maps
API,
(the GWT specific API for Google Maps), and it didn´t work very well.
It seems like you run into trouble when testing complex Widgets that
make calls to other widgets.
I was using Jmock, not EasyMock, but it should be pretty much the
same.

@Test
public void testPresenter() {
final MapDisplayWidget widget = context.mock
(MapDisplayWidget.class);
final MapWidget map = context.mock(MapWidget.class);
MapData data = new MapData();
HandlerManager eventBus = new HandlerManager(null);

context.checking(new Expectations() {{
final Sequence seq = context.sequence("test");
oneOf(widget).getMap();inSequence(seq);
}});

MapDisplayPresenter presenter = new MapDisplayPresenter
(widget,data,eventBus);
}

Doing this a get an UnsatisfiedLinkError from
com.google.gwt.maps.client.overlay.Overlay...

However, the problem here is that i couldn´t see any resonable way to
access the MapWidgets functions
without returning the entire widget from the interface.


On 19 Aug, 16:09, davis  wrote:
> > If your view interface return a TextBox you can't test the presenter with
> > JUnit, you will need to use GWTTestCase.
>
> Sure you can:
>
> import static org.easymock.classextension.EasyMock.*;
> import com.google.gwt.user.client.ui.TextBox;
>
> public class SomePresenterTestCase {
>
>    private MyPresenter presenter;
>    private MyView view;
>
>   �...@test
>    public void testSomething() {
>        TextBox mockBox = createMock(TextBox.class);
>        MyView mockView = createMock(MyView.class);
>        presenter = new MyPresenter(mockView);
>        expect(mockView.getSomeTextBox()).andReturn(mockBox);
>        replay(mockView);
>        replay(mockBox);
>        TextBox box = presenter.getDisplay().getSomeTextBox();
>        verify(mockView);
>    }
>
>
>
> }
--~--~-~--~~~---~--~~
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 architecture MVP/EventBus (mentioned at Google I/O)

2009-08-19 Thread Zheren

Hi, Everyone

I start to work on my app which has requirement to have some kind of
action buffer in the client side. All the actions will push to this
buffer and make request to server every 2 or 3 seconds. Basically it
is doing batching. So it should be a good use case to use command
pattern to achieve this. My question is if I am not using RPC but
RequestBuilder, what should I achieve this? And for batching, there
are different ways: 1) I can communicate with the server every 5
actions, for example 2) or I can communicate with server every 2
seconds. Can I do both with the command pattern?

Thanks!

On Aug 14, 4:34 pm, plcoirier  wrote:
> > One question though:
>
> > "The first line creates a Java class thanks to the configuration file
> > and a Generator."
> > "For example, with the following configuration file:"
>
> > How is that class generated from the configuration file? (Sorry to ask
> > if it's obvious.)
> > Will the argument of the generated Command always be named "form"? Can
> > it be changed?
>
> I answered these questions here (http://groups.google.com/group/mvp4g/
> browse_thread/thread/d8ee207598bf02fa)
>
>
>
> > " > handlers="rootPresenter" eventObjectClass="java.lang.String" />"
>
> > Isn't "displayMessage" and "onDisplayMessage" redundant? I, for one,
> > wouldn't mind simply:
>
> > " > eventObjectClass="java.lang.String" />"
>
> > and expect "onDisplayMessage" to be called automatically (ie. event
> > "click" fires onClick())
>
> Good idea, I created an issue to make the calledMethod optional.
>
>
>
> > Other than that, +1! It sure got my attention.
>
> 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: RemoteServiceServlet throws NoClassDefFoundError on Tomcat6

2009-08-19 Thread Igor

Just for the record, I've found a workaround: downgrading Tomcat to
version 6.0.18 made the problem go away.
--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread Dalla

I recall getting this error aswell.
The exception "Caused by:
java.lang.ClassNotFoundException:com.google.gwt.core.client.GWTBridge"
is thrown if you try to invoke

GWTMockUtilities.disarm();
GWTMockUtilities.restore();

without having gwt-dev.jar in your classpath.




On 19 Aug, 17:52, Davis Ford  wrote:
> Alejandro -- when you tried it, did you not get:
>
> Caused by: 
> java.lang.ClassNotFoundException:com.google.gwt.core.client.GWTBridge
>
> If so, what GWT version are you using?
>
>
>
>
>
> On Wed, Aug 19, 2009 at 11:33 AM, Alejandro D. Garin wrote:
> > yes david, that seems to work. Personally I still prefer to use interfaces
> > in the view rather than using Widgets.
>
> > Cheers,
>
> > On Wed, Aug 19, 2009 at 12:24 PM, davis 
> > wrote:
>
> >> Here you go...try it with this:
>
> >>http://code.google.com/p/google-web-toolkit/source/browse/releases/1
>
> >> import static org.easymock.classextension.EasyMock.createMock;
> >> import static org.junit.Assert.assertNotNull;
>
> >> import org.junit.After;
> >> import org.junit.Before;
> >> import org.junit.Test;
>
> >> import com.google.gwt.junit.GWTMockUtilities;
> >> import com.google.gwt.user.client.ui.TextBox;
>
> >> public class TestSomething {
>
> >>       �...@before
> >>        public void setUp() throws Exception {
> >>                GWTMockUtilities.disarm();
> >>        }
>
> >>       �...@after
> >>        public void tearDown() throws Exception {
> >>                GWTMockUtilities.restore();
> >>        }
>
> >>       �...@test
> >>        public void testThatEasyMockWorksWithTextBox() {
> >>                TextBox box = createMock(TextBox.class);
> >>                assertNotNull(box);
> >>        }
> >> }
>
> >> On Aug 19, 11:19 am, davis  wrote:
> >> > Probably stems from the constructor doing this:
>
> >> >   /**
> >> >    * Creates an empty text box.
> >> >    */
> >> >   public TextBox() {
> >> >     this(Document.get().createTextInputElement(), "gwt-TextBox");
> >> >   }
>
> >> >http://code.google.com/p/google-web-toolkit/source/browse/releases/1
>
> >> > Anyone have a mock workaround for ui elements they'd like to share?
> >> > Is there a mock framework out there for GWT ui elements?
>
> >> > On Aug 19, 11:14 am, davis  wrote:
>
> >> > > My fault -- I thought you were talking about something else.  It
> >> > > appears you are correct.  It looks like even easy mock class extension
> >> > > can't do it.  Somewhere in the initialization code of TextBox.class it
> >> > > calls GWT.create()...major bummer.
>
> >> > > On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
>
> >> > > > Hi David,
>
> >> > > > I tried your example, but I have this error:
>
> >> > > > Caused by: java.lang.UnsupportedOperationException: ERROR:
> >> > > > GWT.create() is
> >> > > > only usable in client code!  It cannot be called, for example, from
> >> > > > server
> >> > > > code.  If you are running a unit test, check that your test case
> >> > > > extends
> >> > > > GWTTestCase and that GWT.create() is not called from within an
> >> > > > initializer
> >> > > > or constructor.
>
> >> > > > Stacktrace:
>
> >> > > > java.lang.ExceptionInInitializerError
> >> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >> > > >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> >> > > > Source)
> >> > > >     at java.lang.reflect.Method.invoke(Unknown Source)
> >> > > >     at
> >> > > > net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
> >> > > >     at
> >> > > > net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
> >> > > >     at
> >> > > > net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
> >> > > >     at
>
> >> > > > org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassPro
> >> > > >  xyFactory.java:108)
> >> > > >     at
> >> > > > org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
> >> > > >     at
> >> > > > org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
> >> > > >     at
> >> > > > example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
> >> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >> > > >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> >> > > > Source)
> >> > > >     at java.lang.reflect.Method.invoke(Unknown Source)
> >> > > >     at junit.framework.TestCase.runTest(TestCase.java:168)
> >> > > >     at junit.framework.TestCase.runBare(TestCase.java:134)
> >> > > >     at junit.framework.TestResult$1.protect(TestResult.java:110)
> >> > > >     at junit.framework.TestResult.runProtected(TestResult.java:128)
> >> > > >     at junit.framework.TestResult.run(TestResult.java:113)
> >> > > >     at junit.framework.TestCase.run(TestCase.java:124)
> >> > > >     at junit.framework.TestSuite.runTest(TestSuite.java

Re: "Use an Event Bus" - Ray

2009-08-19 Thread Norman Maurer

Thx for mention my project, anyway I need to refactor it a bit to
better use the bind(), unbind() stuff, so maybe not the best starting
point for understand how gwt-presenter should get used..

Bye,
Norman


2009/8/19 java4africa :
>
> Here is another application based on gwt-presenter. It's an IMAP email
> client.
>
> http://svn.apache.org/repos/asf/labs/hupa/src/main/java/org/apache/hupa/
>
> On Aug 18, 11:33 pm, brendan  wrote:
>> I'm just testing out gwt-presenter to achive what you want.  You may
>> also be interested in the gwt-dispatch library, which is a GWT
>> implementation of a 'command pattern' that Ray suggested.
>>
>> http://code.google.com/p/gwt-presenter/
>>
>> gwt-mvp-sample has a branch that shows a more complicated 
>> example.http://code.google.com/p/gwt-mvp-sample/source/browse/#svn/branches/g...
>>
>> On Aug 19, 6:48 am, Nathan  wrote:
>>
>> > Hey GWT peoples,
>>
>> >   In Ray's GWT talk, he suggests using the Event Bus pattern in GWT
>> > applications, to keep things clean.  Does anyone have suggestions on
>> > how to approach this?  Do we think he meant use the EventBus available
>> > athttps://eventbus.dev.java.net/, or just the general Event Bus idea
>> > with a custom implementation for each application, depending on its
>> > needs?  Are there any people out there with a simple, GWT-oriented
>> > (maybe even GWT-optimized) EventBus implementation that covers the
>> > basics, and doesn't increase your GWT app size, that they are willing
>> > to share?
>
> >
>

--~--~-~--~~~---~--~~
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: Error parsing JSON

2009-08-19 Thread Luke Howell

I actually figured out the problem. There were  '\n' characters in the  
string I was trying to parse. Once removed that solved the problem.

Sent via iPhone

On Aug 19, 2009, at 11:02 AM, Jeff Chimene  wrote:

>
> On 08/19/2009 09:00 AM, Jeff Chimene wrote:
>> On 08/19/2009 12:56 AM, Thomas Broyer wrote:
>>>
>>>
>>>
>>> On 19 août, 01:12, Jeff Chimene  wrote:
 On 08/18/2009 04:01 PM, Thomas Broyer wrote:

> Well, JSONParser actually calls eval() *with* the wrapping
> parentheses.

 Are they added in the parent?

 Checking the trunk source, I don't see that concatenation:

  public static JSONValue parse(String jsonString) {
if (jsonString == null) {
  throw new NullPointerException();
}
if (jsonString.length() == 0) {
  throw new IllegalArgumentException("empty argument");
}
try {
  return evaluate(jsonString);
} catch (JavaScriptException ex) {
  throw new JSONException(ex);
}
  }
>>>
>>> From the very same file:
>>>  private static native JSONValue evaluate(String jsonString) /*-{
>>>var v = eval('(' + jsonString + ')');
>>>var func = @com.google.gwt.json.client.JSONParser::typeMap[typeof
>>> v];
>>>return func ? func(v) :
>>> @com.google.gwt.json.client.JSONParser::throwUnknownTypeException
>>> (Ljava/lang/String;)(typeof v);
>>>  }-*/;
>>>
>>
>> Well, yes. But the OP said he's using JSONParser.parse() How does
>> JSONValue.evaluate() get called in that scenario?
>
> Oh, never mind. I figured it out.
>
>
> >

--~--~-~--~~~---~--~~
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-maps custom info window

2009-08-19 Thread luigi

Hi all,

I need some help i try to make a custom info window, i use a
EWindow.js from http://econym.org.uk/gmap/ewindows.htm i put the  and
 in the html
file, and after i create a native method with
public native static void myinfowindows(MapWidget map,Marker mark)/*-
{

var ewindow = new EWindow(map, E_STYLE_1);
map.addOverlay(ewindow);
ewindow.openOnMarker(mark,"blaaasdfasdfads");

}-*/;
and gave me this error:

[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (TypeError): 'EWindow'
is not defined
 number: -2146823279
 description: 'EWindow' is not defined

can you help me, 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



gwt grid data acces

2009-08-19 Thread SanjayR Jain

Hi
I m using a grid(gwtext).Now I want to get the data of all rows for a
particular column.Can you suggest any way for it???
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Formatting parts of typed text

2009-08-19 Thread Pradeep

+1

i have a similar requirement, color coding text based on the current
context. I tried using RichTextArea , but it does not return the
cursor whereabouts in anyway( or does it??)...

Thnx in advance.

Pradeep

On Jul 30, 11:45 pm, John Ky  wrote:
> Hello,
>
> I have a text area in my gwt application.  I want to colour code some text
> as the user is typing into it.  Is it possible to do this?
>
> Thanks,
>
> -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-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
-~--~~~~--~~--~--~---



RPC taking longer with each iteration

2009-08-19 Thread Vikrant Chourasia

Hi,

We have a screen that contains around 350 controls. We are facing a
heavy
performance degradation issue when we repetitively open this screen
and
close the same. When analyzed, what we found taking, comparatively,
longer
each time, is the RPC time (to be more precise what is getting majorly
increased each time is the time difference between the timings when
RPC
gets dispatched from Client and reaches Server).

Following are some stats on the same:

1st RPC call:

Client to Server = 3.196 seconds
Server operations = 1.879 seconds
Server to Client = 0.063 seconds


10th RPC call:

Client to Server = 5.451 seconds
Server operations = 2.569 seconds
Server to Client = 0.094 seconds

Which clearly shows that after 10 RPC calls performance gets degraded
by
around 3 seconds.

There are other operations too that adds to performance degradation
after
continuous iterations, but the one that heavily contributes to the
performance degradation is the RPC one mentioned above.

We are using Internet Explorer 6. What we do on close of this screen
is
clearing the absolute panel and assigning null to the reference of the
screen i.e.

 baseCurrent.getAbsMainPanel().clear();
 baseCurrent = null;

where baseCurrent is the reference of current screen.


Any help would be highly appreciated.

Regards,

Vikrant

--~--~-~--~~~---~--~~
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: "Use an Event Bus" - Ray

2009-08-19 Thread java4africa

Here is another application based on gwt-presenter. It's an IMAP email
client.

http://svn.apache.org/repos/asf/labs/hupa/src/main/java/org/apache/hupa/

On Aug 18, 11:33 pm, brendan  wrote:
> I'm just testing out gwt-presenter to achive what you want.  You may
> also be interested in the gwt-dispatch library, which is a GWT
> implementation of a 'command pattern' that Ray suggested.
>
> http://code.google.com/p/gwt-presenter/
>
> gwt-mvp-sample has a branch that shows a more complicated 
> example.http://code.google.com/p/gwt-mvp-sample/source/browse/#svn/branches/g...
>
> On Aug 19, 6:48 am, Nathan  wrote:
>
> > Hey GWT peoples,
>
> >   In Ray's GWT talk, he suggests using the Event Bus pattern in GWT
> > applications, to keep things clean.  Does anyone have suggestions on
> > how to approach this?  Do we think he meant use the EventBus available
> > athttps://eventbus.dev.java.net/, or just the general Event Bus idea
> > with a custom implementation for each application, depending on its
> > needs?  Are there any people out there with a simple, GWT-oriented
> > (maybe even GWT-optimized) EventBus implementation that covers the
> > basics, and doesn't increase your GWT app size, that they are willing
> > to share?

--~--~-~--~~~---~--~~
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: Error parsing JSON

2009-08-19 Thread Jeff Chimene

On 08/19/2009 09:00 AM, Jeff Chimene wrote:
> On 08/19/2009 12:56 AM, Thomas Broyer wrote:
>>
>>
>>
>> On 19 août, 01:12, Jeff Chimene  wrote:
>>> On 08/18/2009 04:01 PM, Thomas Broyer wrote:
>>>
 Well, JSONParser actually calls eval() *with* the wrapping
 parentheses.
>>>
>>> Are they added in the parent?
>>>
>>> Checking the trunk source, I don't see that concatenation:
>>>
>>>   public static JSONValue parse(String jsonString) {
>>> if (jsonString == null) {
>>>   throw new NullPointerException();
>>> }
>>> if (jsonString.length() == 0) {
>>>   throw new IllegalArgumentException("empty argument");
>>> }
>>> try {
>>>   return evaluate(jsonString);
>>> } catch (JavaScriptException ex) {
>>>   throw new JSONException(ex);
>>> }
>>>   }
>>
>> From the very same file:
>>   private static native JSONValue evaluate(String jsonString) /*-{
>> var v = eval('(' + jsonString + ')');
>> var func = @com.google.gwt.json.client.JSONParser::typeMap[typeof
>> v];
>> return func ? func(v) :
>> @com.google.gwt.json.client.JSONParser::throwUnknownTypeException
>> (Ljava/lang/String;)(typeof v);
>>   }-*/;
>>
> 
> Well, yes. But the OP said he's using JSONParser.parse() How does
> JSONValue.evaluate() get called in that scenario?

Oh, never mind. I figured it out.


--~--~-~--~~~---~--~~
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: Error parsing JSON

2009-08-19 Thread Jeff Chimene

On 08/19/2009 12:56 AM, Thomas Broyer wrote:
> 
> 
> 
> On 19 août, 01:12, Jeff Chimene  wrote:
>> On 08/18/2009 04:01 PM, Thomas Broyer wrote:
>>
>>> Well, JSONParser actually calls eval() *with* the wrapping
>>> parentheses.
>>
>> Are they added in the parent?
>>
>> Checking the trunk source, I don't see that concatenation:
>>
>>   public static JSONValue parse(String jsonString) {
>> if (jsonString == null) {
>>   throw new NullPointerException();
>> }
>> if (jsonString.length() == 0) {
>>   throw new IllegalArgumentException("empty argument");
>> }
>> try {
>>   return evaluate(jsonString);
>> } catch (JavaScriptException ex) {
>>   throw new JSONException(ex);
>> }
>>   }
> 
> From the very same file:
>   private static native JSONValue evaluate(String jsonString) /*-{
> var v = eval('(' + jsonString + ')');
> var func = @com.google.gwt.json.client.JSONParser::typeMap[typeof
> v];
> return func ? func(v) :
> @com.google.gwt.json.client.JSONParser::throwUnknownTypeException
> (Ljava/lang/String;)(typeof v);
>   }-*/;
> 

Well, yes. But the OP said he's using JSONParser.parse() How does
JSONValue.evaluate() get called in that scenario?

--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread Davis Ford

Alejandro -- when you tried it, did you not get:

Caused by: java.lang.ClassNotFoundException:com.google.gwt.core.client.GWTBridge

If so, what GWT version are you using?

On Wed, Aug 19, 2009 at 11:33 AM, Alejandro D. Garin wrote:
> yes david, that seems to work. Personally I still prefer to use interfaces
> in the view rather than using Widgets.
>
> Cheers,
>
> On Wed, Aug 19, 2009 at 12:24 PM, davis 
> wrote:
>>
>> Here you go...try it with this:
>>
>>
>> http://code.google.com/p/google-web-toolkit/source/browse/releases/1.7/user/src/com/google/gwt/junit/GWTMockUtilities.java
>>
>> import static org.easymock.classextension.EasyMock.createMock;
>> import static org.junit.Assert.assertNotNull;
>>
>> import org.junit.After;
>> import org.junit.Before;
>> import org.junit.Test;
>>
>> import com.google.gwt.junit.GWTMockUtilities;
>> import com.google.gwt.user.client.ui.TextBox;
>>
>> public class TestSomething {
>>
>>       �...@before
>>        public void setUp() throws Exception {
>>                GWTMockUtilities.disarm();
>>        }
>>
>>       �...@after
>>        public void tearDown() throws Exception {
>>                GWTMockUtilities.restore();
>>        }
>>
>>       �...@test
>>        public void testThatEasyMockWorksWithTextBox() {
>>                TextBox box = createMock(TextBox.class);
>>                assertNotNull(box);
>>        }
>> }
>>
>> On Aug 19, 11:19 am, davis  wrote:
>> > Probably stems from the constructor doing this:
>> >
>> >   /**
>> >    * Creates an empty text box.
>> >    */
>> >   public TextBox() {
>> >     this(Document.get().createTextInputElement(), "gwt-TextBox");
>> >   }
>> >
>> > http://code.google.com/p/google-web-toolkit/source/browse/releases/1
>> >
>> > Anyone have a mock workaround for ui elements they'd like to share?
>> > Is there a mock framework out there for GWT ui elements?
>> >
>> > On Aug 19, 11:14 am, davis  wrote:
>> >
>> > > My fault -- I thought you were talking about something else.  It
>> > > appears you are correct.  It looks like even easy mock class extension
>> > > can't do it.  Somewhere in the initialization code of TextBox.class it
>> > > calls GWT.create()...major bummer.
>> >
>> > > On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
>> >
>> > > > Hi David,
>> >
>> > > > I tried your example, but I have this error:
>> >
>> > > > Caused by: java.lang.UnsupportedOperationException: ERROR:
>> > > > GWT.create() is
>> > > > only usable in client code!  It cannot be called, for example, from
>> > > > server
>> > > > code.  If you are running a unit test, check that your test case
>> > > > extends
>> > > > GWTTestCase and that GWT.create() is not called from within an
>> > > > initializer
>> > > > or constructor.
>> >
>> > > > Stacktrace:
>> >
>> > > > java.lang.ExceptionInInitializerError
>> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> > > >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>> > > > Source)
>> > > >     at java.lang.reflect.Method.invoke(Unknown Source)
>> > > >     at
>> > > > net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
>> > > >     at
>> > > > net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
>> > > >     at
>> > > > net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
>> > > >     at
>> > > >
>> > > > org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
>> > > >     at
>> > > > org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
>> > > >     at
>> > > > org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
>> > > >     at
>> > > > example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
>> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> > > >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>> > > > Source)
>> > > >     at java.lang.reflect.Method.invoke(Unknown Source)
>> > > >     at junit.framework.TestCase.runTest(TestCase.java:168)
>> > > >     at junit.framework.TestCase.runBare(TestCase.java:134)
>> > > >     at junit.framework.TestResult$1.protect(TestResult.java:110)
>> > > >     at junit.framework.TestResult.runProtected(TestResult.java:128)
>> > > >     at junit.framework.TestResult.run(TestResult.java:113)
>> > > >     at junit.framework.TestCase.run(TestCase.java:124)
>> > > >     at junit.framework.TestSuite.runTest(TestSuite.java:232)
>> > > >     at junit.framework.TestSuite.run(TestSuite.java:227)
>> > > >     at
>> > > >
>> > > > org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
>> > > >     at
>> > > >
>> > > > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>> > > >     at
>> > > >
>> > > > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java

Re: "Use an Event Bus" - Ray

2009-08-19 Thread pohl



On Aug 18, 1:48 pm, Nathan  wrote:
> Hey GWT peoples,
>
>   In Ray's GWT talk, he suggests using the Event Bus pattern in GWT
> applications, to keep things clean.  Does anyone have suggestions on
> how to approach this?

I've discovered that Ray Ryan actually left very little unspoken in
his presentation, and that one really just needs to watch it enough
times to pick up on some very important sentences that go by
quickly.   In the case of your particular question, here is what he
said:

"We're going to use a GWT class to actually instantiate our event bus
because that's simpler than writing our own.  With GWT 1.6 we re-
vamped our event handling  mechanism, and at the heart of each one of
our widgets is a handy class called a HandlerManager.  There's no
reason you can't use your own instance of HandlerManager to provide
your app-wide event-dispatch services."

In our case, we wrote an EventBus class that is a simple decorator for
HandlerManager, which does all the real work.  The only reason we
wanted to write our wrapper are:  1)  We wanted a central place to log
all the events that get dispatched, and 2)  We needed a no-argument
constructor to let GIN instantiate my EventBus automagically.




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Make selected item visible in ListBox on IE

2009-08-19 Thread El Mentecato Mayor

I have a ListBox that in most cases will have more items than are
visible at a time (visibleItemCount). I then add a new item
dynamically and set it to be selected using setItemSelected(idx,
true).  The item is added to the bottom of the ListBox, which is fine,
but I would like the item to be visible which is not working on IE.

In Firefox 3.5.2 and Chrome 3.0.195.6 the item becomes visible (the
scroll bar moves to the bottom), but in IE 7, the scroll bar doesn't
move so the item is out of view.  I verified that the item is selected
by scrolling to the bottom, but I'd really like this to be
automatic.

Anybody know how can I force the ListBox to show this new (selected)
item?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



private method code gets eliminated in OBFUSCATED mode if only called from native JSNI code

2009-08-19 Thread mgrouch

Hello,

We found that
private java method code gets eliminated in resulting javaScript by
GWT compiler
in OBFUSCATED mode if this private method is only called from native
JSNI code.

Is this GWT compiler bug?

Thanks,
--MG

--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread Nathan Wells

The way I see it (and there is obviously a lot of room for
interpretation based on app needs), you want to actually make your
view (i.e. widgets) as generic as possible, while the work of "what"
should be displayed is up to the presenter. For example, I created a
form-like section that has an interface that defines methods like

void addField(String label, String value);
HasValue addEditableField(String label, String initialValue);
void addFlag(String label, boolean value);
HasValue addEditableFlag(String label, boolean initialValue);

That way, any presenter can use the same interface, which can be
swapped out for user experience reasons.

The idea is, you want the presenter to worry about getting data to and
from the view, not the intricacies of user experience. By the same
token, you don't want your view worrying about anything remotely
resembling your application model.

I realize this isn't the only way to do it, and doing it this way
requires a little bit of work getting components to fit together, but
it makes your architecture much more sane, IMHO.

On Aug 19, 8:14 am, davis  wrote:
> Point taken Ian.  I think the design tradeoffs are at least on the
> table.  In most cases, I think I'm comfortable with coupling the 
> view<->presenter in a 1:1 relationship -- (i.e. not making universally
>
> generic presenters that can be used with any view), but I understand
> your argument, and can see the need for this in some scenarios.
>
> On Aug 19, 8:30 am, Ian Bambury  wrote:
>
> > 2009/8/19 Davis Ford 
>
> > > My basic question is: why not just return TextBox if that is what is
> > > in your view?  The coupling is between 2 classes: view and presenter.
> > > If you later change TextBox to SuperWidgetTextBox, you can re-factor
> > > it in your IDE in 5 seconds and be done with it.
>
> > > Am I missing something?
>
> > If that is the way you want to go then fine.
>
> > What you might be missing is that some of your views may not be using text
> > boxes. One view may be using a text box. Another might use a label, another
> > might use a button, or a text area, or a hyperlink, or a menu item. They can
> > all display text.
>
> > An on/off indicator and a switch are just a boolean and something clickable,
> > but you don't decide in the presenter that is should be the words 'on' and
> > 'off' and demand a label, you leave it as boolean and let the view decide
> > whether to put yes/no, on/off, true/false, a checkbox, an image of a
> > lightbulb on and off, etc - and the clickable thing could be a button with
> > those words, or a picture of a switch, or the checkbox.
>
> > The presenter can be used for all these views. Different views can register
> > with the same presenter. Users can choose their preferred view and swap
> > views in and out.
>
> > Ian
>
> >http://examples.roughian.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-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 question

2009-08-19 Thread Alejandro D. Garin
yes david, that seems to work. Personally I still prefer to use interfaces
in the view rather than using Widgets.

Cheers,

On Wed, Aug 19, 2009 at 12:24 PM, davis wrote:

>
> Here you go...try it with this:
>
>
> http://code.google.com/p/google-web-toolkit/source/browse/releases/1.7/user/src/com/google/gwt/junit/GWTMockUtilities.java
>
> import static org.easymock.classextension.EasyMock.createMock;
> import static org.junit.Assert.assertNotNull;
>
> import org.junit.After;
> import org.junit.Before;
> import org.junit.Test;
>
> import com.google.gwt.junit.GWTMockUtilities;
> import com.google.gwt.user.client.ui.TextBox;
>
> public class TestSomething {
>
>@Before
>public void setUp() throws Exception {
>GWTMockUtilities.disarm();
>}
>
>@After
>public void tearDown() throws Exception {
>GWTMockUtilities.restore();
>}
>
>@Test
>public void testThatEasyMockWorksWithTextBox() {
>TextBox box = createMock(TextBox.class);
>assertNotNull(box);
> }
> }
>
> On Aug 19, 11:19 am, davis  wrote:
> > Probably stems from the constructor doing this:
> >
> >   /**
> >* Creates an empty text box.
> >*/
> >   public TextBox() {
> > this(Document.get().createTextInputElement(), "gwt-TextBox");
> >   }
> >
> > http://code.google.com/p/google-web-toolkit/source/browse/releases/1
> >
> > Anyone have a mock workaround for ui elements they'd like to share?
> > Is there a mock framework out there for GWT ui elements?
> >
> > On Aug 19, 11:14 am, davis  wrote:
> >
> > > My fault -- I thought you were talking about something else.  It
> > > appears you are correct.  It looks like even easy mock class extension
> > > can't do it.  Somewhere in the initialization code of TextBox.class it
> > > calls GWT.create()...major bummer.
> >
> > > On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
> >
> > > > Hi David,
> >
> > > > I tried your example, but I have this error:
> >
> > > > Caused by: java.lang.UnsupportedOperationException: ERROR:
> GWT.create() is
> > > > only usable in client code!  It cannot be called, for example, from
> server
> > > > code.  If you are running a unit test, check that your test case
> extends
> > > > GWTTestCase and that GWT.create() is not called from within an
> initializer
> > > > or constructor.
> >
> > > > Stacktrace:
> >
> > > > java.lang.ExceptionInInitializerError
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> > > > at java.lang.reflect.Method.invoke(Unknown Source)
> > > > at
> net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
> > > > at
> net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
> > > > at
> net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
> > > > at
> > > >
> org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
> > > > at
> org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
> > > > at
> org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
> > > > at
> example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> > > > at java.lang.reflect.Method.invoke(Unknown Source)
> > > > at junit.framework.TestCase.runTest(TestCase.java:168)
> > > > at junit.framework.TestCase.runBare(TestCase.java:134)
> > > > at junit.framework.TestResult$1.protect(TestResult.java:110)
> > > > at junit.framework.TestResult.runProtected(TestResult.java:128)
> > > > at junit.framework.TestResult.run(TestResult.java:113)
> > > > at junit.framework.TestCase.run(TestCase.java:124)
> > > > at junit.framework.TestSuite.runTest(TestSuite.java:232)
> > > > at junit.framework.TestSuite.run(TestSuite.java:227)
> > > > at
> > > >
> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
> > > > at
> > > >
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> > > > at
> > > >
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> > > > at
> > > >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> > > > at
> > > >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> > > > at
> > > >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> > > > at
> > > >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> > > >

Re: MVP question

2009-08-19 Thread Alejandro D. Garin
David,

Maybe GWTMockUtilities could help, but didn't tried it.

On Wed, Aug 19, 2009 at 12:19 PM, davis wrote:

>
> Probably stems from the constructor doing this:
>
>  /**
>   * Creates an empty text box.
>   */
>  public TextBox() {
>this(Document.get().createTextInputElement(), "gwt-TextBox");
>  }
>
>
> http://code.google.com/p/google-web-toolkit/source/browse/releases/1.7/user/src/com/google/gwt/user/client/ui/TextBox.java
>
> Anyone have a mock workaround for ui elements they'd like to share?
> Is there a mock framework out there for GWT ui elements?
>
> On Aug 19, 11:14 am, davis  wrote:
> > My fault -- I thought you were talking about something else.  It
> > appears you are correct.  It looks like even easy mock class extension
> > can't do it.  Somewhere in the initialization code of TextBox.class it
> > calls GWT.create()...major bummer.
> >
> > On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
> >
> > > Hi David,
> >
> > > I tried your example, but I have this error:
> >
> > > Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create()
> is
> > > only usable in client code!  It cannot be called, for example, from
> server
> > > code.  If you are running a unit test, check that your test case
> extends
> > > GWTTestCase and that GWT.create() is not called from within an
> initializer
> > > or constructor.
> >
> > > Stacktrace:
> >
> > > java.lang.ExceptionInInitializerError
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > > at java.lang.reflect.Method.invoke(Unknown Source)
> > > at
> net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
> > > at
> net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
> > > at net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
> > > at
> > >
> org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
> > > at
> org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
> > > at
> org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
> > > at example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > > at java.lang.reflect.Method.invoke(Unknown Source)
> > > at junit.framework.TestCase.runTest(TestCase.java:168)
> > > at junit.framework.TestCase.runBare(TestCase.java:134)
> > > at junit.framework.TestResult$1.protect(TestResult.java:110)
> > > at junit.framework.TestResult.runProtected(TestResult.java:128)
> > > at junit.framework.TestResult.run(TestResult.java:113)
> > > at junit.framework.TestCase.run(TestCase.java:124)
> > > at junit.framework.TestSuite.runTest(TestSuite.java:232)
> > > at junit.framework.TestSuite.run(TestSuite.java:227)
> > > at
> > >
> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
> > > at
> > >
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> > > at
> > >
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> > > at
> > >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> > > at
> > >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> > > at
> > >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> > > at
> > >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> > > Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create()
> is
> > > only usable in client code!  It cannot be called, for example, from
> server
> > > code.  If you are running a unit test, check that your test case
> extends
> > > GWTTestCase and that GWT.create() is not called from within an
> initializer
> > > or constructor.
> > > at com.google.gwt.core.client.GWT.create(GWT.java:85)
> > > at
> com.google.gwt.user.client.ui.UIObject.(UIObject.java:140)
> > > ... 30 more
> >
> > > On Wed, Aug 19, 2009 at 11:09 AM, davis  >wrote:
> >
> > > > > If your view interface return a TextBox you can't test the
> presenter with
> > > > > JUnit, you will need to use GWTTestCase.
> >
> > > > Sure you can:
> >
> > > > import static org.easymock.classextension.EasyMock.*;
> > > > import com.google.gwt.user.client.ui.TextBox;
> >
> > > > public class SomePresenterTestCase {
> >
> > > >   private MyPresenter presenter;
> > > >   private MyView view;
> >
> > > >   @Test
> > > >   public void testSomething() {
> > > >   TextBox mockBox = createMock(TextBox.class);
> > > >   MyView mock

Re: MVP question

2009-08-19 Thread Alejandro D. Garin
also I found this article interesting:

http://blog.danielwellman.com/2009/02/mocking-gwt-widgets-with-gwtmockutilities.html

On Wed, Aug 19, 2009 at 12:28 PM, Alejandro D. Garin wrote:

> David,
>
> Maybe GWTMockUtilities could help, but didn't tried it.
>
> On Wed, Aug 19, 2009 at 12:19 PM, davis wrote:
>
>>
>> Probably stems from the constructor doing this:
>>
>>  /**
>>   * Creates an empty text box.
>>   */
>>  public TextBox() {
>>this(Document.get().createTextInputElement(), "gwt-TextBox");
>>  }
>>
>>
>> http://code.google.com/p/google-web-toolkit/source/browse/releases/1.7/user/src/com/google/gwt/user/client/ui/TextBox.java
>>
>> Anyone have a mock workaround for ui elements they'd like to share?
>> Is there a mock framework out there for GWT ui elements?
>>
>> On Aug 19, 11:14 am, davis  wrote:
>> > My fault -- I thought you were talking about something else.  It
>> > appears you are correct.  It looks like even easy mock class extension
>> > can't do it.  Somewhere in the initialization code of TextBox.class it
>> > calls GWT.create()...major bummer.
>> >
>> > On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
>> >
>> > > Hi David,
>> >
>> > > I tried your example, but I have this error:
>> >
>> > > Caused by: java.lang.UnsupportedOperationException: ERROR:
>> GWT.create() is
>> > > only usable in client code!  It cannot be called, for example, from
>> server
>> > > code.  If you are running a unit test, check that your test case
>> extends
>> > > GWTTestCase and that GWT.create() is not called from within an
>> initializer
>> > > or constructor.
>> >
>> > > Stacktrace:
>> >
>> > > java.lang.ExceptionInInitializerError
>> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> > > at java.lang.reflect.Method.invoke(Unknown Source)
>> > > at
>> net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
>> > > at
>> net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
>> > > at
>> net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
>> > > at
>> > >
>> org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
>> > > at
>> org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
>> > > at
>> org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
>> > > at
>> example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
>> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> > > at java.lang.reflect.Method.invoke(Unknown Source)
>> > > at junit.framework.TestCase.runTest(TestCase.java:168)
>> > > at junit.framework.TestCase.runBare(TestCase.java:134)
>> > > at junit.framework.TestResult$1.protect(TestResult.java:110)
>> > > at junit.framework.TestResult.runProtected(TestResult.java:128)
>> > > at junit.framework.TestResult.run(TestResult.java:113)
>> > > at junit.framework.TestCase.run(TestCase.java:124)
>> > > at junit.framework.TestSuite.runTest(TestSuite.java:232)
>> > > at junit.framework.TestSuite.run(TestSuite.java:227)
>> > > at
>> > >
>> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
>> > > at
>> > >
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>> > > at
>> > >
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>> > > at
>> > >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>> > > at
>> > >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>> > > at
>> > >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>> > > at
>> > >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>> > > Caused by: java.lang.UnsupportedOperationException: ERROR:
>> GWT.create() is
>> > > only usable in client code!  It cannot be called, for example, from
>> server
>> > > code.  If you are running a unit test, check that your test case
>> extends
>> > > GWTTestCase and that GWT.create() is not called from within an
>> initializer
>> > > or constructor.
>> > > at com.google.gwt.core.client.GWT.create(GWT.java:85)
>> > > at
>> com.google.gwt.user.client.ui.UIObject.(UIObject.java:140)
>> > > ... 30 more
>> >
>> > > On Wed, Aug 19, 2009 at 11:09 AM, davis > >wrote:
>> >
>> > > > > If your view interface return a TextBox you can't test the
>> presenter with
>> > > > > JUnit, you will need to use GWTTestCase.
>> >
>> > > > Sure you can:
>> >
>> > > > import static org.easymock.classextension.EasyMock.*;
>> > >

Re: MVP question

2009-08-19 Thread davis

Unfortunately, I get this:

Caused by: java.lang.ClassNotFoundException:
com.google.gwt.core.client.GWTBridge

Not sure why, but it appears that this class was designed exactly for
the purpose of allowing EasyMock to mock UI widgets so it doesn't blow
up on GWT.create( ).

If anyone has any insight into why it can't find GWTBridge I would
love to hear it, b/c I'll be needing to do this very soon.

On Aug 19, 11:24 am, davis  wrote:
> Here you go...try it with this:
>
> http://code.google.com/p/google-web-toolkit/source/browse/releases/1
>
> import static org.easymock.classextension.EasyMock.createMock;
> import static org.junit.Assert.assertNotNull;
>
> import org.junit.After;
> import org.junit.Before;
> import org.junit.Test;
>
> import com.google.gwt.junit.GWTMockUtilities;
> import com.google.gwt.user.client.ui.TextBox;
>
> public class TestSomething {
>
>         @Before
>         public void setUp() throws Exception {
>                 GWTMockUtilities.disarm();
>         }
>
>         @After
>         public void tearDown() throws Exception {
>                 GWTMockUtilities.restore();
>         }
>
>         @Test
>         public void testThatEasyMockWorksWithTextBox() {
>                 TextBox box = createMock(TextBox.class);
>                 assertNotNull(box);
>         }
>
> }
>
> On Aug 19, 11:19 am, davis  wrote:
>
> > Probably stems from the constructor doing this:
>
> >   /**
> >    * Creates an empty text box.
> >    */
> >   public TextBox() {
> >     this(Document.get().createTextInputElement(), "gwt-TextBox");
> >   }
>
> >http://code.google.com/p/google-web-toolkit/source/browse/releases/1
>
> > Anyone have a mock workaround for ui elements they'd like to share?
> > Is there a mock framework out there for GWT ui elements?
>
> > On Aug 19, 11:14 am, davis  wrote:
>
> > > My fault -- I thought you were talking about something else.  It
> > > appears you are correct.  It looks like even easy mock class extension
> > > can't do it.  Somewhere in the initialization code of TextBox.class it
> > > calls GWT.create()...major bummer.
>
> > > On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
>
> > > > Hi David,
>
> > > > I tried your example, but I have this error:
>
> > > > Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() 
> > > > is
> > > > only usable in client code!  It cannot be called, for example, from 
> > > > server
> > > > code.  If you are running a unit test, check that your test case extends
> > > > GWTTestCase and that GWT.create() is not called from within an 
> > > > initializer
> > > > or constructor.
>
> > > > Stacktrace:
>
> > > > java.lang.ExceptionInInitializerError
> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > > >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > > >     at java.lang.reflect.Method.invoke(Unknown Source)
> > > >     at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
> > > >     at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
> > > >     at net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
> > > >     at
> > > > org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
> > > >     at 
> > > > org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
> > > >     at org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
> > > >     at example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > > >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > > >     at java.lang.reflect.Method.invoke(Unknown Source)
> > > >     at junit.framework.TestCase.runTest(TestCase.java:168)
> > > >     at junit.framework.TestCase.runBare(TestCase.java:134)
> > > >     at junit.framework.TestResult$1.protect(TestResult.java:110)
> > > >     at junit.framework.TestResult.runProtected(TestResult.java:128)
> > > >     at junit.framework.TestResult.run(TestResult.java:113)
> > > >     at junit.framework.TestCase.run(TestCase.java:124)
> > > >     at junit.framework.TestSuite.runTest(TestSuite.java:232)
> > > >     at junit.framework.TestSuite.run(TestSuite.java:227)
> > > >     at
> > > > org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
> > > >     at
> > > > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> > > >     at
> > > > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> > > >     at
> > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> > > >     at
> > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> > > >     at
> > > > org

Re: MVP question

2009-08-19 Thread davis

Here you go...try it with this:

http://code.google.com/p/google-web-toolkit/source/browse/releases/1.7/user/src/com/google/gwt/junit/GWTMockUtilities.java

import static org.easymock.classextension.EasyMock.createMock;
import static org.junit.Assert.assertNotNull;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.google.gwt.junit.GWTMockUtilities;
import com.google.gwt.user.client.ui.TextBox;

public class TestSomething {

@Before
public void setUp() throws Exception {
GWTMockUtilities.disarm();
}

@After
public void tearDown() throws Exception {
GWTMockUtilities.restore();
}

@Test
public void testThatEasyMockWorksWithTextBox() {
TextBox box = createMock(TextBox.class);
assertNotNull(box);
}
}

On Aug 19, 11:19 am, davis  wrote:
> Probably stems from the constructor doing this:
>
>   /**
>    * Creates an empty text box.
>    */
>   public TextBox() {
>     this(Document.get().createTextInputElement(), "gwt-TextBox");
>   }
>
> http://code.google.com/p/google-web-toolkit/source/browse/releases/1
>
> Anyone have a mock workaround for ui elements they'd like to share?
> Is there a mock framework out there for GWT ui elements?
>
> On Aug 19, 11:14 am, davis  wrote:
>
> > My fault -- I thought you were talking about something else.  It
> > appears you are correct.  It looks like even easy mock class extension
> > can't do it.  Somewhere in the initialization code of TextBox.class it
> > calls GWT.create()...major bummer.
>
> > On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
>
> > > Hi David,
>
> > > I tried your example, but I have this error:
>
> > > Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
> > > only usable in client code!  It cannot be called, for example, from server
> > > code.  If you are running a unit test, check that your test case extends
> > > GWTTestCase and that GWT.create() is not called from within an initializer
> > > or constructor.
>
> > > Stacktrace:
>
> > > java.lang.ExceptionInInitializerError
> > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > >     at java.lang.reflect.Method.invoke(Unknown Source)
> > >     at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
> > >     at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
> > >     at net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
> > >     at
> > > org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
> > >     at org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
> > >     at org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
> > >     at example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
> > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> > >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > >     at java.lang.reflect.Method.invoke(Unknown Source)
> > >     at junit.framework.TestCase.runTest(TestCase.java:168)
> > >     at junit.framework.TestCase.runBare(TestCase.java:134)
> > >     at junit.framework.TestResult$1.protect(TestResult.java:110)
> > >     at junit.framework.TestResult.runProtected(TestResult.java:128)
> > >     at junit.framework.TestResult.run(TestResult.java:113)
> > >     at junit.framework.TestCase.run(TestCase.java:124)
> > >     at junit.framework.TestSuite.runTest(TestSuite.java:232)
> > >     at junit.framework.TestSuite.run(TestSuite.java:227)
> > >     at
> > > org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
> > >     at
> > > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> > >     at
> > > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> > >     at
> > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> > >     at
> > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> > >     at
> > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> > >     at
> > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> > > Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
> > > only usable in client code!  It cannot be called, for example, from server
> > > code.  If you are running a unit test, check that your test case extends
> > > GWTTestCase and that GWT.create() is not called from within an initializer
> > > or constructor.
> > >     at com.google.gwt.core.client.GWT.create(GWT.java:85)
> > >    

Re: "Use an Event Bus" - Ray

2009-08-19 Thread charlie
I've seen this framework before, I'm just wearisome about adopting a 3rd
party solution if google is going to create it's own.

For now though since we can't seem to get an answer of "Is google going to
provide this in GWT" I will be using your framework, thanks for your work on
this!

On Wed, Aug 19, 2009 at 9:12 AM, plcoirier  wrote:

>
> I created this framework http://code.google.com/p/mvp4g/ that allows
> you to use an event bus without creating extra classes. It may
> interest you.
>
>
> On Aug 19, 12:48 am, Thomas Broyer  wrote:
> > On 18 août, 20:48, Nathan  wrote:
> >
> > > Hey GWT peoples,
> >
> > >   In Ray's GWT talk, he suggests using the Event Bus pattern in GWT
> > > applications, to keep things clean.  Does anyone have suggestions on
> > > how to approach this?  Do we think he meant use the EventBus available
> > > athttps://eventbus.dev.java.net/, or just the general Event Bus idea
> > > with a custom implementation for each application, depending on its
> > > needs?  Are there any people out there with a simple, GWT-oriented
> > > (maybe even GWT-optimized) EventBus implementation that covers the
> > > basics, and doesn't increase your GWT app size, that they are willing
> > > to share?
> >
> > Read the slides, Ray uses a HandlerManager as his event bus; this is
> > the same mechanism used for events (so it*is* "GWT-optimized")
> >
>

--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread davis

Probably stems from the constructor doing this:

  /**
   * Creates an empty text box.
   */
  public TextBox() {
this(Document.get().createTextInputElement(), "gwt-TextBox");
  }

http://code.google.com/p/google-web-toolkit/source/browse/releases/1.7/user/src/com/google/gwt/user/client/ui/TextBox.java

Anyone have a mock workaround for ui elements they'd like to share?
Is there a mock framework out there for GWT ui elements?

On Aug 19, 11:14 am, davis  wrote:
> My fault -- I thought you were talking about something else.  It
> appears you are correct.  It looks like even easy mock class extension
> can't do it.  Somewhere in the initialization code of TextBox.class it
> calls GWT.create()...major bummer.
>
> On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
>
> > Hi David,
>
> > I tried your example, but I have this error:
>
> > Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
> > only usable in client code!  It cannot be called, for example, from server
> > code.  If you are running a unit test, check that your test case extends
> > GWTTestCase and that GWT.create() is not called from within an initializer
> > or constructor.
>
> > Stacktrace:
>
> > java.lang.ExceptionInInitializerError
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >     at java.lang.reflect.Method.invoke(Unknown Source)
> >     at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
> >     at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
> >     at net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
> >     at
> > org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
> >     at org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
> >     at org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
> >     at example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >     at java.lang.reflect.Method.invoke(Unknown Source)
> >     at junit.framework.TestCase.runTest(TestCase.java:168)
> >     at junit.framework.TestCase.runBare(TestCase.java:134)
> >     at junit.framework.TestResult$1.protect(TestResult.java:110)
> >     at junit.framework.TestResult.runProtected(TestResult.java:128)
> >     at junit.framework.TestResult.run(TestResult.java:113)
> >     at junit.framework.TestCase.run(TestCase.java:124)
> >     at junit.framework.TestSuite.runTest(TestSuite.java:232)
> >     at junit.framework.TestSuite.run(TestSuite.java:227)
> >     at
> > org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
> >     at
> > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> >     at
> > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> >     at
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> >     at
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> >     at
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> >     at
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> > Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
> > only usable in client code!  It cannot be called, for example, from server
> > code.  If you are running a unit test, check that your test case extends
> > GWTTestCase and that GWT.create() is not called from within an initializer
> > or constructor.
> >     at com.google.gwt.core.client.GWT.create(GWT.java:85)
> >     at com.google.gwt.user.client.ui.UIObject.(UIObject.java:140)
> >     ... 30 more
>
> > On Wed, Aug 19, 2009 at 11:09 AM, davis wrote:
>
> > > > If your view interface return a TextBox you can't test the presenter 
> > > > with
> > > > JUnit, you will need to use GWTTestCase.
>
> > > Sure you can:
>
> > > import static org.easymock.classextension.EasyMock.*;
> > > import com.google.gwt.user.client.ui.TextBox;
>
> > > public class SomePresenterTestCase {
>
> > >   private MyPresenter presenter;
> > >   private MyView view;
>
> > >   @Test
> > >   public void testSomething() {
> > >       TextBox mockBox = createMock(TextBox.class);
> > >       MyView mockView = createMock(MyView.class);
> > >       presenter = new MyPresenter(mockView);
> > >       expect(mockView.getSomeTextBox()).andReturn(mockBox);
> > >       replay(mockView);
> > >       replay(mockBox);
> > >       TextBox box = presenter.getDisplay().getSomeTextBox();
> > >       verify(mockView);
> > >    }
> > > }
--~--~-~--~-

Re: MVP question

2009-08-19 Thread davis

My fault -- I thought you were talking about something else.  It
appears you are correct.  It looks like even easy mock class extension
can't do it.  Somewhere in the initialization code of TextBox.class it
calls GWT.create()...major bummer.

On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
> Hi David,
>
> I tried your example, but I have this error:
>
> Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
> only usable in client code!  It cannot be called, for example, from server
> code.  If you are running a unit test, check that your test case extends
> GWTTestCase and that GWT.create() is not called from within an initializer
> or constructor.
>
> Stacktrace:
>
> java.lang.ExceptionInInitializerError
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
>     at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
>     at net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
>     at
> org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
>     at org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
>     at org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
>     at example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at junit.framework.TestCase.runTest(TestCase.java:168)
>     at junit.framework.TestCase.runBare(TestCase.java:134)
>     at junit.framework.TestResult$1.protect(TestResult.java:110)
>     at junit.framework.TestResult.runProtected(TestResult.java:128)
>     at junit.framework.TestResult.run(TestResult.java:113)
>     at junit.framework.TestCase.run(TestCase.java:124)
>     at junit.framework.TestSuite.runTest(TestSuite.java:232)
>     at junit.framework.TestSuite.run(TestSuite.java:227)
>     at
> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
>     at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>     at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
> only usable in client code!  It cannot be called, for example, from server
> code.  If you are running a unit test, check that your test case extends
> GWTTestCase and that GWT.create() is not called from within an initializer
> or constructor.
>     at com.google.gwt.core.client.GWT.create(GWT.java:85)
>     at com.google.gwt.user.client.ui.UIObject.(UIObject.java:140)
>     ... 30 more
>
> On Wed, Aug 19, 2009 at 11:09 AM, davis wrote:
>
>
>
> > > If your view interface return a TextBox you can't test the presenter with
> > > JUnit, you will need to use GWTTestCase.
>
> > Sure you can:
>
> > import static org.easymock.classextension.EasyMock.*;
> > import com.google.gwt.user.client.ui.TextBox;
>
> > public class SomePresenterTestCase {
>
> >   private MyPresenter presenter;
> >   private MyView view;
>
> >   @Test
> >   public void testSomething() {
> >       TextBox mockBox = createMock(TextBox.class);
> >       MyView mockView = createMock(MyView.class);
> >       presenter = new MyPresenter(mockView);
> >       expect(mockView.getSomeTextBox()).andReturn(mockBox);
> >       replay(mockView);
> >       replay(mockBox);
> >       TextBox box = presenter.getDisplay().getSomeTextBox();
> >       verify(mockView);
> >    }
> > }
--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread davis

Alejandro, what is the command you were running?

I just downloaded the zip, and ran this:

mvn gwt:run -DrunTarget=com.example.User/User.html

It launched the hosted browser ok.  I have a regex check in there that
pops up Window.alert if the url isn't what urlrewrite expects.  You
can delete that code, or point your hosted browser instead to:

http://localhost:/user/abc

and you'll see a form that fills in the textbox with abc, and if you
click the button, it executes GWT-RPC to say hello.

You can also run this:

mvn gwt:run -DrunTarget=com.example.Admin/Admin.html

and you can hit this url:

http://localhost:/admin

It will show that the content is different.

Just for reference, I am using:

C:\TEMP\gwt-prototype>mvn -version
Apache Maven 2.2.0 (r788681; 2009-06-26 09:04:01-0400)
Java version: 1.6.0_14
Java home: C:\Program Files\Java\jdk1.6.0_14\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

Regards,
Davis

On Aug 19, 10:59 am, "Alejandro D. Garin"  wrote:
> Hi David,
>
> I tried your example, but I have this error:
>
> Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
> only usable in client code!  It cannot be called, for example, from server
> code.  If you are running a unit test, check that your test case extends
> GWTTestCase and that GWT.create() is not called from within an initializer
> or constructor.
>
> Stacktrace:
>
> java.lang.ExceptionInInitializerError
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
>     at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
>     at net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
>     at
> org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
>     at org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
>     at org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
>     at example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at junit.framework.TestCase.runTest(TestCase.java:168)
>     at junit.framework.TestCase.runBare(TestCase.java:134)
>     at junit.framework.TestResult$1.protect(TestResult.java:110)
>     at junit.framework.TestResult.runProtected(TestResult.java:128)
>     at junit.framework.TestResult.run(TestResult.java:113)
>     at junit.framework.TestCase.run(TestCase.java:124)
>     at junit.framework.TestSuite.runTest(TestSuite.java:232)
>     at junit.framework.TestSuite.run(TestSuite.java:227)
>     at
> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
>     at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>     at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
> only usable in client code!  It cannot be called, for example, from server
> code.  If you are running a unit test, check that your test case extends
> GWTTestCase and that GWT.create() is not called from within an initializer
> or constructor.
>     at com.google.gwt.core.client.GWT.create(GWT.java:85)
>     at com.google.gwt.user.client.ui.UIObject.(UIObject.java:140)
>     ... 30 more
>
> On Wed, Aug 19, 2009 at 11:09 AM, davis wrote:
>
>
>
> > > If your view interface return a TextBox you can't test the presenter with
> > > JUnit, you will need to use GWTTestCase.
>
> > Sure you can:
>
> > import static org.easymock.classextension.EasyMock.*;
> > import com.google.gwt.user.client.ui.TextBox;
>
> > public class SomePresenterTestCase {
>
> >   private MyPresenter presenter;
> >   private MyView view;
>
> >   @Test
> >   public void testSomething() {
> >       TextBox mockBox = createMock(TextBox.class);
> >       MyView mockView = createMock(MyView.class);
> >       presenter = new MyPresenter(mockView);
> >       expect(mockView.getSomeTextBox()).andReturn(mockBox);
> >       replay(mockView);
> >       replay(mockBox);
> >

Re: Posting back xml to server

2009-08-19 Thread Rahul

Hi
Would using the Fileupload widget or the gwtupload project solve my
purpose?


On Aug 18, 1:47 pm, Rahul  wrote:
> Hi,
> I want to retrieve an XML from the server to my client , changing
> values of that xml and want to send the modified xml back to the
> server.
>
> Presently i am successful in retrieving the xml and modifying the xml,
> but how to send it back?
>
> i am using:
> RequestBuilder builder5 = new RequestBuilder
> (RequestBuilder.POST,"file.xml");
>
> to post it back to the server
>
> but this is not working
> can anyone tell me where am i going wrong?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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 question

2009-08-19 Thread Alejandro D. Garin
Hi David,

I tried your example, but I have this error:

Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
only usable in client code!  It cannot be called, for example, from server
code.  If you are running a unit test, check that your test case extends
GWTTestCase and that GWT.create() is not called from within an initializer
or constructor.

Stacktrace:

java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:619)
at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:612)
at net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:581)
at
org.easymock.classextension.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:108)
at org.easymock.internal.MocksControl.createMock(MocksControl.java:51)
at org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)
at example.publico.client.SimpleTest.testSimple(SimpleTest.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
only usable in client code!  It cannot be called, for example, from server
code.  If you are running a unit test, check that your test case extends
GWTTestCase and that GWT.create() is not called from within an initializer
or constructor.
at com.google.gwt.core.client.GWT.create(GWT.java:85)
at com.google.gwt.user.client.ui.UIObject.(UIObject.java:140)
... 30 more



On Wed, Aug 19, 2009 at 11:09 AM, davis wrote:

>
>
> > If your view interface return a TextBox you can't test the presenter with
> > JUnit, you will need to use GWTTestCase.
>
> Sure you can:
>
> import static org.easymock.classextension.EasyMock.*;
> import com.google.gwt.user.client.ui.TextBox;
>
> public class SomePresenterTestCase {
>
>   private MyPresenter presenter;
>   private MyView view;
>
>   @Test
>   public void testSomething() {
>   TextBox mockBox = createMock(TextBox.class);
>   MyView mockView = createMock(MyView.class);
>   presenter = new MyPresenter(mockView);
>   expect(mockView.getSomeTextBox()).andReturn(mockBox);
>   replay(mockView);
>   replay(mockBox);
>   TextBox box = presenter.getDisplay().getSomeTextBox();
>   verify(mockView);
>}
> }
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



equal Toolbar and Windows Vista

2009-08-19 Thread salvador.ce

Hi,

I need to develop an equal Toolbar and Windows Vista
I'm having difficulty to make transparent. Do you have any example of
how?

Thank you,

Carlos

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Add a style dependent name to a TreeItem

2009-08-19 Thread hriess

Hi,

I want to add a dependent style name to a TreeItem:
TreeItem treeItem = new TreeItem();
treeItem.addStyleDependentName("inactive");
treeItem.setText(shopConstants.shoppingcart());
treePanel.addItem(treeItem);

The css:
.gwt-TreeItem-inactive {
color: #c0c09a;
}

The result is:

Warenkorb


The css class was added to the enclosing div and the css selector
doesn't work.
What is wrong with my code?
I want to mark tree items (links) as inactive - or is there is a
better way to do 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-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: Refresh page on loading

2009-08-19 Thread Chad

Rahul,

Instead of trying to refresh the page, you should probably defer the
loading of your buttons, labels, and tabs. Use a DeferredCommand for
making the call to the method(s) for creating those widgets. It sounds
like they are loading before something that they rely on loads.
Although, this may have no effect whatsoever. :-/

HTH,
Chad

On Aug 18, 9:32 am, Rahul  wrote:
> Hi,
> I am loading buttons in individual tabs of a tab panel. In the tab
> panel i have some labels in order and also some cascading tabs in
> order.
> The first time the page is loaded, the buttons (which i want at the
> bottom) are at the top of each tab and the cascading tabs which i want
> in order are at the bottom of each tab. But whenever i refresh the
> page once, everything comes to the place i want. So i figured that if
> i refresh the page once it has been loaded, i can get the widgets
> where i want them
>
> is this the right approach or theres a better way to do this ?
>
> On Aug 17, 11:06 pm, Ian Bambury  wrote:
>
>
>
> > Why do you want to reload the page as soon as it has just loaded?
> > Can't you just get it right the first time?
>
> > What do you want to happen the second time that didn't happen the first
> > time?
>
> > Ian
>
> >http://examples.roughian.com
>
> > 2009/8/18 Rahul 
>
> > > HI Ian,
> > > thanks for replying
> > > i have started looking at some tutorials for javascript
> > > but i have some more confusion.
>
> > > all coding i did in gwt was in java in the client class, so for this
> > > functionality also i need to code in the client class? or not? i need
> > > to do javascript for tht. and if i can do in java, what is the function
> > > ( because when searched it always shows me how to do with javascript
> > > and not in java)
>
> > > On Aug 17, 6:00 pm, Ian Bambury  wrote:
> > > > 2009/8/17 Rahul 
>
> > > > > Hi
> > > > > I want to refresh my webpage once after loading completely. I am using
> > > > > this code for this
>
> > > > >    
> > > > >        function MyReload()
> > > > >        {
> > > > >                window.location.reload();
> > > > >        }
> > > > >        
>
> > > > > and calling
> > > > >   on body part of my html file
>
> > > > > but this is not working
> > > > > can anyone tell me where am i going wrong?
>
> > > > First problem is that you are asking a JavaScript question in a GWT 
> > > > group
> > > > :-)
>
> > > > Second problem is that your webpage will loop, endlessly loading and
> > > > reloading. This a pretty basic a mistake, so maybe it would be a good
> > > idea
> > > > to search for some JavaScript tutorials or sign up to a JavaScript
> > > > beginners' group.
--~--~-~--~~~---~--~~
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: user roles for GWT applications

2009-08-19 Thread Phineas Gage

On Aug 19, 4:02 pm, mars1412  wrote:
> just my 2 cents:
>
> hiding or obfuscating will not stop a detrmined attacker anyway,
> so there's no reason to worry about that.
> that does of course not mean, that you shouldn't do it, if it's
> easy: e.g. of course use the OFB mode when compiling the GWT app
>
> just make sure, that all service methods are properly secured on the
> serverside

Yes, hiding or obfuscating doesn't help much. I was hoping for a
secure way for users to never even be able to download administrative
client code at all, without making it a separate GWT application. Even
with runAsync(), users might be able to still retrieve the admin code
unless it's protected on a file level on the server, but you have to
determine which files to protect and preferably make it a seamless
experience for the user so they don't have to provide separate web
server credentials to download the admin client code.

> > 2) Some users will download code that they will not necessarily
> > execute, making the application needlessly larger.
>
> RunAsync should help
>  * if the user doesn't have the required permission to e.g. open an
> admin view, then hide the button or menu-element - the user will
> not see it and it will not get downloaded
>  * if an admin is logged, in you'll of course show the button/
> menuelement
> and if she clicks the button, RunAsync will kick in and the relevant
> code
> will be downloaded

Good point for reducing size. That will be useful, when GWT 2.0 comes
out, as it should be in there. Until then you have to compile on the
trunk to use it, I think.

Thanks for the response.
--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread davis

Point taken Ian.  I think the design tradeoffs are at least on the
table.  In most cases, I think I'm comfortable with coupling the view<-
>presenter in a 1:1 relationship -- (i.e. not making universally
generic presenters that can be used with any view), but I understand
your argument, and can see the need for this in some scenarios.

On Aug 19, 8:30 am, Ian Bambury  wrote:
> 2009/8/19 Davis Ford 
>
>
>
> > My basic question is: why not just return TextBox if that is what is
> > in your view?  The coupling is between 2 classes: view and presenter.
> > If you later change TextBox to SuperWidgetTextBox, you can re-factor
> > it in your IDE in 5 seconds and be done with it.
>
> > Am I missing something?
>
> If that is the way you want to go then fine.
>
> What you might be missing is that some of your views may not be using text
> boxes. One view may be using a text box. Another might use a label, another
> might use a button, or a text area, or a hyperlink, or a menu item. They can
> all display text.
>
> An on/off indicator and a switch are just a boolean and something clickable,
> but you don't decide in the presenter that is should be the words 'on' and
> 'off' and demand a label, you leave it as boolean and let the view decide
> whether to put yes/no, on/off, true/false, a checkbox, an image of a
> lightbulb on and off, etc - and the clickable thing could be a button with
> those words, or a picture of a switch, or the checkbox.
>
> The presenter can be used for all these views. Different views can register
> with the same presenter. Users can choose their preferred view and swap
> views in and out.
>
> Ian
>
> http://examples.roughian.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-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: How to configure Jetty in GWT

2009-08-19 Thread willemsl...@gmail.com

Thanks for your answer, Lothar.

The info on jetty you provided I had already found. What I am actually
looking for is that specific info in the context of GWT 1.7,
So as to be able to use all the debugging features (as well client as
server code debugging) when running my gwt-app in eclipse, in hosted
mode using jetty as a server.

To rephrase my question: how do you configure jndi and container
managed security in the Jetty instance that comes along with GWT 1.7.

Ciao,

W.

On Aug 19, 2:26 pm, Lothar Kimmeringer  wrote:
> willemsl...@gmail.com schrieb:
>
> > I've recently migrated from GWT 1.5.x to 1.7.0 and I'm looking for
> > pointers to articles/documentation/... on:
> > 1) how to configure the JNDI lookup within Jetty (I want to define my
> > database connection details)
>
> http://www.google.de/search?q=jetty+jndi+configuration
>
> > 2) how to configure container managed security within Jetty
>
> http://www.google.de/search?q=jetty+container+managed+security
>
> > If the above are too specific, then maybe just how to configure Jetty
> > in general, within the GWT - eclipse environment.
>
> That I was never doing, I always use the Tomcat-server being
> "shipped" with GWT. But installing a GWT-application is simply
> adding the WAR-file to the web-app-directory or define it as
> specific WebApplication.
>
> Regards, Lothar
--~--~-~--~~~---~--~~
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: Gin + JSNI

2009-08-19 Thread Jeff Chimene

On Wed, Aug 19, 2009 at 1:30 AM, Thomas Broyer wrote:
>
>
>
> On 19 août, 02:37, Jeff Chimene  wrote:
>>
>> I think I have a solution. As I understand it, when testing, one
>> modifies the Gin Appmodule as required?
>
> I'd rather use a test-specific module that extends/overrides/
> overwrites the one used for "production".

Agreed. That's what I now have.

>
>> In this example, I use the "EmptyServer..." provider. When in
>> production, I use the "Server..." provider.
> [...]
>> o The JavaScript overlay type "Server" is as expected, i.e. as described
>> athttp://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#D...
>>
>> o The Gin AppModule is basically:
>> package com.foo.client.jsnitest.client;
>> import com.google.gwt.inject.client.AbstractGinModule;
>> public class AppModule extends AbstractGinModule {
>> �...@override
>>  protected void configure() {
>>   bind(Server.class).toProvider(EmptyServerProvider.class); // test
>> or
>>   bind(Server.class).toProvider(ServerProvider.class); // production
>>  }
>>
>> }
>
> Why not use a provider method? (I supposed you had reusable classes,
> that's why I proposed a Provider subclass, but provider methods
> work very well with a shorter code)

I don't understand. Isn't this a provider method?

>> o EmptyServerProvider is basically:
>> package com.foo.client.jsnitest.client;
>> import com.google.inject.Inject;
>> import com.google.inject.Provider;
>> public class EmptyServerProvider implements Provider {
>>  private final Server   server;
>>
>> �...@inject
>>  public EmptyServerProvider() {
>
> No need for @Inject on a zeo-arg ctor.

This is a subtle point. So when does one decorate constructors? I had
hoped that the declarations in AppModule would be sufficent. It seems
that declarations are sufficent and necessary, but the decoration is
only sufficient?
>
>>   this.server = getEmptyServer();
>>  }
>>
>> �...@override
>>  public Server get() {
>>   return server;
>>  }
>>
>>  public final native Server getEmptyServer() /*-{
>>   var JSONObject = '{"server" : {"id" : ""'}';
>>   return eval('('+JSONObject+')');
>>  }-*/;
>>
>> }
>
> Why didn't you write:
>
> public native Server get() /*-{
>  return {"server": { "id": "" } };
> }-*/;

The JSONObject is actually a much longer string. I truncated it for
the purposes of this email.

> (note that a) get() is native/JSNI, b) there's nothing done at
> construction time, a singleton scope would do it well given that you
> don't get injected a Provider but a Server and c) there's no
> need to parse JSON, just use the JS literal object notation)

I think I understand your question above about why I didn't use a
Provider (although I'm pretty sure I did..).
Are you looking for something like:

MainWidget(Provider server){}

If so, I could not get that to work. What seems to happen is that a
new Server instance gets generated. (I don't really know, I did not
examine the generated JavaScript)

> (NB: I'm in the process of moving to GIN, so I haven't yet faced this
> issue, but I'll probably also use GWT 2.0 and its new "single JSO
> impl" feature that allows a JSO to implement an interface, provided
> it's the only class that implements it; that way, you can use a JSO in
> production and a mock in your tests, and your tests therefore no
> longer depends on JSNI an can be run in pure Java, which also means
> lot faster!)

I could not seem to build the incubator trunk under 2.0 (I'm sure it
does, I just could not get it to work). So, I'm using the current .jar
which I think only goes to 1.7

--~--~-~--~~~---~--~~
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: "Use an Event Bus" - Ray

2009-08-19 Thread plcoirier

I created this framework http://code.google.com/p/mvp4g/ that allows
you to use an event bus without creating extra classes. It may
interest you.


On Aug 19, 12:48 am, Thomas Broyer  wrote:
> On 18 août, 20:48, Nathan  wrote:
>
> > Hey GWT peoples,
>
> >   In Ray's GWT talk, he suggests using the Event Bus pattern in GWT
> > applications, to keep things clean.  Does anyone have suggestions on
> > how to approach this?  Do we think he meant use the EventBus available
> > athttps://eventbus.dev.java.net/, or just the general Event Bus idea
> > with a custom implementation for each application, depending on its
> > needs?  Are there any people out there with a simple, GWT-oriented
> > (maybe even GWT-optimized) EventBus implementation that covers the
> > basics, and doesn't increase your GWT app size, that they are willing
> > to share?
>
> Read the slides, Ray uses a HandlerManager as his event bus; this is
> the same mechanism used for events (so it*is* "GWT-optimized")
--~--~-~--~~~---~--~~
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: url rewrite and gwt

2009-08-19 Thread davis

Bhayat -- feel free to email the project to me.  I'll take a look at
it tonight.  I'll be happy to help you out.


On Aug 19, 9:45 am, Bhayat  wrote:
> yes Davis i am looking at this side in 4 days but i am still in
> trouble.if you want (of course i will be very happy),i can send u my
> simple example project ? of course to your gmail account
>
> On 19 Ağustos, 16:13, davis  wrote:
>
> > Yep, I have been using urlrewrite successfully in GWT project for a
> > couple weeks now since I introduced it.  It works great!
>
> > Here's a sample maven GWT project you can download that uses
> > urlrewrite:http://zenoconsulting.wikidot.com/blog:16
>
> > Regards,
> > Davis
>
> > On Aug 19, 9:03 am, Ian Bambury  wrote:
>
> > > 2009/8/19 Bhayat 
>
> > > > hmm are u sure that url rewrite is impossible in gwt side
>
> > > Yes.
>
> > > Rewrites are done on the server, GWT is on the client.
>
> > > Ian
>
> > >http://examples.roughian.com-Alıntıyı gizle -
>
> > - Alıntıyı göster -
--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread davis


> If your view interface return a TextBox you can't test the presenter with
> JUnit, you will need to use GWTTestCase.

Sure you can:

import static org.easymock.classextension.EasyMock.*;
import com.google.gwt.user.client.ui.TextBox;

public class SomePresenterTestCase {

   private MyPresenter presenter;
   private MyView view;

   @Test
   public void testSomething() {
   TextBox mockBox = createMock(TextBox.class);
   MyView mockView = createMock(MyView.class);
   presenter = new MyPresenter(mockView);
   expect(mockView.getSomeTextBox()).andReturn(mockBox);
   replay(mockView);
   replay(mockBox);
   TextBox box = presenter.getDisplay().getSomeTextBox();
   verify(mockView);
   }
}
--~--~-~--~~~---~--~~
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: user roles for GWT applications

2009-08-19 Thread mars1412

just my 2 cents:

> 1) Even though users cannot execute, for example, administrative RPC
> methods, by reverse engineering the JavaScript they may still be able
> to read sensitive information regarding the format or nature of the
> available administrative requests. Careful developers may be able to
> avoid revealing such information, but it may not be easy to instruct
> every developer on the team on how to avoid revealing subtle but
> security-sensitive clues about the system.

hiding or obfuscating will not stop a detrmined attacker anyway,
so there's no reason to worry about that.
that does of course not mean, that you shouldn't do it, if it's
easy: e.g. of course use the OFB mode when compiling the GWT app

just make sure, that all service methods are properly secured on the
serverside

>
> 2) Some users will download code that they will not necessarily
> execute, making the application needlessly larger.

RunAsync should help
 * if the user doesn't have the required permission to e.g. open an
admin view, then hide the button or menu-element - the user will
not see it and it will not get downloaded
 * if an admin is logged, in you'll of course show the button/
menuelement
and if she clicks the button, RunAsync will kick in and the relevant
code
will be downloaded



--~--~-~--~~~---~--~~
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: url rewrite and gwt

2009-08-19 Thread Bhayat

yes Davis i am looking at this side in 4 days but i am still in
trouble.if you want (of course i will be very happy),i can send u my
simple example project ? of course to your gmail account

On 19 Ağustos, 16:13, davis  wrote:
> Yep, I have been using urlrewrite successfully in GWT project for a
> couple weeks now since I introduced it.  It works great!
>
> Here's a sample maven GWT project you can download that uses
> urlrewrite:http://zenoconsulting.wikidot.com/blog:16
>
> Regards,
> Davis
>
> On Aug 19, 9:03 am, Ian Bambury  wrote:
>
>
>
> > 2009/8/19 Bhayat 
>
> > > hmm are u sure that url rewrite is impossible in gwt side
>
> > Yes.
>
> > Rewrites are done on the server, GWT is on the client.
>
> > Ian
>
> >http://examples.roughian.com- Alıntıyı gizle -
>
> - Alıntıyı göster -
--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread Alejandro D. Garin
On Wed, Aug 19, 2009 at 9:30 AM, Ian Bambury  wrote:

> 2009/8/19 Davis Ford 
>
>>
>> My basic question is: why not just return TextBox if that is what is
>> in your view?  The coupling is between 2 classes: view and presenter.
>> If you later change TextBox to SuperWidgetTextBox, you can re-factor
>> it in your IDE in 5 seconds and be done with it.
>>
>> Am I missing something?
>
>
If your view interface return a TextBox you can't test the presenter with
JUnit, you will need to use GWTTestCase.

--~--~-~--~~~---~--~~
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: url rewrite and gwt

2009-08-19 Thread Ian Bambury
But you are not doing what Bhayat asked for
Ian

http://examples.roughian.com


2009/8/19 davis 

>
> Yep, I have been using urlrewrite successfully in GWT project for a
> couple weeks now since I introduced it.  It works great!
>
> Here's a sample maven GWT project you can download that uses
> urlrewrite: http://zenoconsulting.wikidot.com/blog:16
>
> Regards,
> Davis
>
> On Aug 19, 9:03 am, Ian Bambury  wrote:
> > 2009/8/19 Bhayat 
> >
> >
> >
> > > hmm are u sure that url rewrite is impossible in gwt side
> >
> > Yes.
> >
> > Rewrites are done on the server, GWT is on the client.
> >
> > Ian
> >
> > http://examples.roughian.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-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
-~--~~~~--~~--~--~---



user roles for GWT applications

2009-08-19 Thread Phineas Gage

I would like to implement a GWT application where users log in and are
assigned roles, as is typical in many web applications. Based on their
role, they would be able to see and use different areas of the
application.

The trouble when using GWT is, because the entire application is
transmitted to the browser (deferred binding is the exception, but
more on that later), even people who have no permission to view a
certain part of the application have downloaded the (albeit
obfuscated) JavaScript code. There was a good discussion about this
pertaining to the case of wanting to create an "admin area" of an
application:

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/2b32e4d4011076c/cd8553caf7aa6994?lnk=gst&q=role#cd8553caf7aa6994

The general consensus was that it's sufficient to protect the data and
not the UI. This may be true, in that when a user authenticates, the
server now knows that user's role, and each subsequent RPC made with a
session ID associated with that user undergoes a role check. Users are
denied if they try to execute RPC methods when they don't belong to
all of the roles required to execute that method. However, it's still
less than ideal for at least two reasons:

1) Even though users cannot execute, for example, administrative RPC
methods, by reverse engineering the JavaScript they may still be able
to read sensitive information regarding the format or nature of the
available administrative requests. Careful developers may be able to
avoid revealing such information, but it may not be easy to instruct
every developer on the team on how to avoid revealing subtle but
security-sensitive clues about the system.

2) Some users will download code that they will not necessarily
execute, making the application needlessly larger.

So there are a couple of possible solutions to this:

1) If you're only talking about a single role, like administrator,
create a separate GWT application for administration and protect that
on your web server. Yes, it might be less than ideal in that you can't
easily share the same interface with the regular user application, but
it should solve the problem.

2) One possibility that could generalize to more roles is to use
deferred binding (http://code.google.com/webtoolkit/doc/1.6/
DevGuideCodingBasics.html#DevGuideDeferredBinding). Using replacement
with deferred binding, entire code paths might be compiled out of the
application for example by, in the user case, not including the
administrative tabs.

But then you'd have to figure out exactly which files in the war need
to be protected (this might not be easy and when re-compiles occur if
their name changes you'd have to do it again) and protect them on the
web server at a file level.

Also, if you have more than just a couple of roles you'd have an
explosion in the amount of code that needs to be generated on a
compile and on the size of the application stored on the server,
because each role would be a new axis for deferred binding. I think
this would be 2^R, where R is the number of roles. So if you've got 5
roles, you've got 32 versions of your code. If you multiply that for 5
browsers and 4 languages, now you're talking about 640 versions of
your code. It starts to get impractical, doesn't it? Especially when
the code in each version is largely duplicated.


So has anyone thought of a better solution to this problem, or does
anyone know if something is planned for a future GWT release? I didn't
see this referred to in the Google I/O video on 2.0 (http://
code.google.com/events/io/sessions/GwtPreviewGoogleWebToolkit2.html).
As far as I can tell, the new code splitting stuff is just for
reducing the download size and startup 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
-~--~~~~--~~--~--~---



Re: Server side

2009-08-19 Thread ALEXEI BARBONI
OPS, MY BAD FOLKS

My Jar file doesn't have the jar's necessary.

My apologize.

2009/8/18 Alexei Telles 

> Hello guys.
>
> I'm trying finally to make my GWT application works client and server
> sides.
> I have a simple service (just one method for now).
>
> This method, on the server side, uses a Jar file (created for me) to
> connect in my database (MySql) using hibernate.
>
> I am having a problem to use hibernate (the java method that uses
> hibernate is in the jar file - that is in the class path of my GWT
> project).
>
> It throws me an exception when I am configuring hibernate
> SessionFactory sessionFactory = new Configuration().configure
> ("guardian.hibernate.cfg.xml").buildSessionFactory();
>
> I don't know if you guys use hibernate, but I am sure this problem is
> in my GWT project, because if I create a basic java project and try to
> use this Jar file (that uses hibernate) everithing works fine.
>
> The exception is:
>
> Aug 18, 2009 1:28:29 PM
> com.google.appengine.tools.development.ApiProxyLocalImpl log
> SEVERE: [1250602109691000] javax.servlet.ServletContext log: Exception
> while dispatching incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method
> 'public abstract java.util.List
> br.com.engsys.voippanel.client.VoippanelService.getCallHistory
> (java.lang.String,java.lang.String,java.lang.String)' threw an
> unexpected exception: java.lang.ExceptionInInitializerError
>at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
> (RPC.java:360)
>at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
> (RPC.java:546)
>at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
> (RemoteServiceServlet.java:166)
>at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
> (RemoteServiceServlet.java:86)
>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:
> 487)
>at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1093)
>at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> (TransactionCleanupFilter.java:43)
>at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1084)
>at com.google.appengine.tools.development.StaticFileFilter.doFilter
> (StaticFileFilter.java:124)
>at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1084)
>at org.mortbay.jetty.servlet.ServletHandler.handle
> (ServletHandler.java:360)
>at org.mortbay.jetty.security.SecurityHandler.handle
> (SecurityHandler.java:216)
>at org.mortbay.jetty.servlet.SessionHandler.handle
> (SessionHandler.java:181)
>at org.mortbay.jetty.handler.ContextHandler.handle
> (ContextHandler.java:712)
>at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 405)
>at
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
> (DevAppEngineWebAppContext.java:54)
>at org.mortbay.jetty.handler.HandlerWrapper.handle
> (HandlerWrapper.java:139)
>at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:313)
>at org.mortbay.jetty.handler.HandlerWrapper.handle
> (HandlerWrapper.java:139)
>at org.mortbay.jetty.Server.handle(Server.java:313)
>at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 506)
>at org.mortbay.jetty.HttpConnection$RequestHandler.content
> (HttpConnection.java:844)
>at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
>at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>at org.mortbay.io.nio.SelectChannelEndPoint.run
> (SelectChannelEndPoint.java:396)
>at org.mortbay.thread.BoundedThreadPool$PoolThread.run
> (BoundedThreadPool.java:442)
> Caused by: java.lang.ExceptionInInitializerError
>at br.com.engsys.guardian.persistence.HibernateUtil.
> (HibernateUtil.java:13)
>at br.com.engsys.guardian.db.DaoApplications.getApplications
> (DaoApplications.java:57)
>at br.com.engsys.business.User.(User.java:15)
>at
> br.com.engsys.voippanel.server.VoippanelServiceImpl.getCallHistory
> (VoippanelServiceImpl.java:23)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:57)
>at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:616)
>at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
> (RPC.java:527)
>... 27 more
> Caused by: java.lang.NoC

Re: NullPointerException when annotations are used

2009-08-19 Thread davis

Just a follow-up -- in case anyone else here ever encounters this
issue.  I found the root cause.

Running mvn clean gwt:compile fails for me because I now have order-
dependency in the build.

mvn clean wipes out the classes/* directory

gwt:compile then tries to compile the GWT code, but needs classes b/c
it tries to resolve the class specified by the @GinModules annotation.

I discovered this via a total fluke.  I changed some whitespace in the
Eclipse IDE and saved, and lo and behold gwt:compile worked from cmd
line.  I cleaned everything and tried gwt:compile again and it
failed.  Eclipse auto-build creates the /classes/* folder gwt:compile
needs.

I just need to fix my pom.xml to get the order straight (compile java
classes first, then gwt:compile)

Hope this helps anyone else that might run into this subtle issue.

On Aug 18, 5:01 pm, davis  wrote:
> Thank god for online source.  line 704 of TypeOracleMediator:
>
> http://code.google.com/p/google-web-toolkit/source/browse/releases/1
>
> if (expectedElementValueType.isArrayType()  <-- NPE
>
> the object is passed into the method from above (line 441-442):
>
> TypeBinding expectedElementValueType = mvp.binding.returnType;
> Object elementValue = getAnnotationElementValue(logger,
> expectedElementValueType, expressionValue);
>
> It seems "mvp.binding.returnType" returns null -- anyone familiar with
> GWT code know what might be the root cause?
>
> On Aug 18, 4:46 pm, davis  wrote:
>
> > I just added google-gin to my project.  I set it up and configured it
> > properly, and I've been running hosted mode all day, and it has been
> > doing DI just fine -- as expected.
>
> > However, now when I try to compile, I get this stack trace:
>
> >  Refreshing TypeOracle
> > [INFO]          Processing types in compilation unit: file:/C:/SVN/da-
> > gwt-webapp/src/main/java/com/example/client/presenter/gin/
> > LoginGinjector.java
> > [INFO]             Found type 'LoginGinjector'
> > [INFO]                Resolving annotation '@GinModules
> > (com.example.client.presenter.gin.UserModule.class)'
> > [INFO]                   [ERROR]
> > [INFO] java.lang.ClassNotFoundException:
> > com.example.client.presenter.gin.UserModule
>
> > which stems from this:
>
> > [INFO] [ERROR] Unexpected
> > [INFO] java.lang.NullPointerException
> > [INFO]  at
> > com.google.gwt.dev.javac.TypeOracleMediator.getAnnotationElementValue
> > (TypeOracleMediator.java:704)
> > [INFO]  at
> > com.google.gwt.dev.javac.TypeOracleMediator.createAnnotationInstance
> > (TypeOracleMediator.java:442)
>
> > I am using GWT 1.7.0.  A google search showed several others have
> > similar issues when annotations are added to their project.
>
> > I'm using maven to build (codehaus plugin), and it has the correct
> > classpath:
>
> > C:\Program Files\Java\jdk1.6.0_14\jre\bin\java -Xmx512m -classpath
>
> > "C:\SVN\da-gwt-webapp\war\WEB-INF\classes";
> > "C:\Docume~1\dford\.m2\repository\com\google\gwt\inject\gin\1.0-
> > SNAPSHOT\gin-1.0-SNAPSHOT.jar"
>
> > [other stuff deleted]
>
> > gin-1.0-SNAPSHOT.jar I built today from SVN revision 109 of google-
> > gin.  The annotation class for @GinModules does exist in the jar at
> > com.google.gwt.inject.client.GinModules
>
> > I'm at a loss for why this is failing.  Can someone help?
>
> > Thanks!
>
> > Davis
--~--~-~--~~~---~--~~
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: url rewrite and gwt

2009-08-19 Thread davis

Yep, I have been using urlrewrite successfully in GWT project for a
couple weeks now since I introduced it.  It works great!

Here's a sample maven GWT project you can download that uses
urlrewrite: http://zenoconsulting.wikidot.com/blog:16

Regards,
Davis

On Aug 19, 9:03 am, Ian Bambury  wrote:
> 2009/8/19 Bhayat 
>
>
>
> > hmm are u sure that url rewrite is impossible in gwt side
>
> Yes.
>
> Rewrites are done on the server, GWT is on the client.
>
> Ian
>
> http://examples.roughian.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-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: url rewrite and gwt

2009-08-19 Thread Ian Bambury
2009/8/19 Bhayat 

>
> hmm are u sure that url rewrite is impossible in gwt side


Yes.

Rewrites are done on the server, GWT is on the client.


Ian

http://examples.roughian.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-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: url rewrite and gwt

2009-08-19 Thread Bhayat

hmm are u sure that url rewrite is impossible in gwt side,and also i
use tomcat server but i couldnt find .htaccess file.where is it or
where can i find it 
in tomcat server how can i do this and how can i get this file and gwt
project together

On 7 Ağustos, 16:29, twdarkflame  wrote:
> You dont do this in gwt, but rather using a .htaccess file on your
> sever.
>
> I dont know the precise process myself, but its basicaly writting a
> few lines in a text file, renaming it ".htaccess", then putting it on
> the route of the sever.
> This file can make it so that...as far as gwt is concerned...the "/
> catagory/blah" is actualy a query string "?Catagory_Blah" or something
>
> On Aug 7, 1:43 pm, Bhayat  wrote:
>
> > In gwt url rewrite is possible.how can i make it ? for example when i
> > use category button,my category panel is opened but i also want to
> > make url rewrite so "./category"  must be writed
>
> > How can i make this?
> > Do you have any document or link ?
--~--~-~--~~~---~--~~
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: integrate GWT into SVN

2009-08-19 Thread Tobe

Issn't there any way to move the libraries and other files of GWT to
another location?

On Aug 5, 11:03 am, Tobe  wrote:
> Now, I have a SVN project with PHP where I want to integrate GWT.
> Therefore the src and war folders shall be located in the trunk
> folder. What do I have to change in the .gwt.xml (or
> somewhere else) that GWT can find the Entry-Point to compile it in
> Eclipse?
>
> On Jul 22, 12:54 pm,Tobe wrote:
>
>
>
> > Maybe it seemed to easy for me but I think it's all I need :)
>
> > On Jul 1, 1:48 pm, Ian Bambury  wrote:
>
> > > I can't advise on the plugin as I don't use it, but the way I do GWT/PHP
> > > development is to set up a lightweight web server (I use Abyss) and point
> > > the document root at the project's war directory (using different ports 
> > > you
> > > can run as many of these setups as you want)
> > > Then you can run the GWT app from Eclipse with the noserver option and it
> > > all just works.
>
> > > Ian
>
> > >http://examples.roughian.com
>
> > > 2009/7/1Tobe
>
> > > > One other questions refering to the GWT plugin for Eclipse. How can I
> > > > integrate GWT into my existing PHP project (PDT) so that I can run it
> > > > together with GWT like a normal GWT project - e.g. clicking "Run" to
> > > > start the shell and the page in hosted mode?
>
> > > > On Jun 27, 11:14 pm, Ian Bambury  wrote:
> > > > > This isn't *really* what GWT is designed for. Ideally, you have a 
> > > > > single
> > > > > page and 'ajax-in' everything you need later as and when and if you 
> > > > > need
> > > > it.
> > > > > You *could* use one GWT project to enhance a number of PHP pages by
> > > > getting
> > > > > it to add widgets via an id, or by wrapping existing elements (also 
> > > > > via
> > > > an
> > > > > id).
>
> > > > > If you GWT app just had a whole load of 'if this id exists do
> > > > such-and-such'
> > > > > lines, then you could use the same GWT app to enhance a number of 
> > > > > pages
> > > > and
> > > > > the app would only have to be downloaded once.
>
> > > > > Alternatively, you could write an app for each page. It depends on 
> > > > > what
> > > > your
> > > > > curremt PHP setup does, and what you want GWT to do for it.
>
> > > > > Ian
>
> > > > >http://examples.roughian.com
>
> > > > > 2009/6/27Tobe
>
> > > > > > Hello,
> > > > > > I have an existing project based on PHP and want to use GWT permit
> > > > > > some JavaScript actions on the page. Is there a documentation how to
> > > > > > integrate GWT, e.g. which files I have to copy and how I can change
> > > > > > the GWT file and directory schema to my personal one of the existing
> > > > > > project?
--~--~-~--~~~---~--~~
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: when should we use GWT RPC and HTTP mechanism to communicate to server

2009-08-19 Thread venki

Thank you DaveS

Ok cool instance... One more doubt Dave. I understand your example.
Let us suppose my service is going to use by GWT client only. So in
this case i can use either GWT RPC or HTTP. So i can do my application
with out using RPC  also rather i can use HTTP.Can you please tell me
an instances why should i opt for GWT RPC mechanism only. I mean i am
expecting the answers that in what cases we are forced to use RPC
rather than HTTP. If possible can you please tell me the advantages
RPC over HTTP.

Once again thank you very much for your reply..

Have a good day Dave

On Aug 19, 1:34 pm, DaveS  wrote:
> Our application uses both, depending on quite a few factors. In some
> cases we are putting data into Flash (.swf) components, and need it in
> XML, so we use a 'raw' HTTP request to get the data. In most other
> cases we use GWT RPC to retreive data from the server, or to initiate
> actions in the server. There really is no single answer, it just
> depends on your application.
>
> We have considered moving away from GWT RPC more than once, thinking
> we might provide an 'open interface' or web-service interface, but so
> far the convenience of RPC has been the overwhelming reason we are
> continuing to use it.
>
> I guess you could say, if there is no need to make the service
> available to anything other than your GWT client, then use RPC, but if
> you want to open the interface to 3rd parties, other apps or anything
> like that, consider using HTTP.
>
>   Dave.
>
> On Aug 18, 5:56 pm, venki  wrote:
>
> > Hi to all,
>
> > I am new to GWT. I read GWT communication with server tutorial. It
> > provides various mechanisms to communicate with the server. Any way i
> > know how to use GWT RPC and HTTP mechanism to communicate with
> > server.
>
> > I request all of you can you give perfect explanation towhenshould
> > we use RPC mechanism andwhenshould we use HTTP mechanism. I mean at
> > what type instances we are forced to use particular mechanism.
>
> > Great 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWTENT 0.7 is available for download - A Reflection, AOP, HTML template, UI Binding and Validate(JSR303) framework for GWT

2009-08-19 Thread Eduardo Nunes

do you recommend it to use in production environment?

On Wed, Aug 19, 2009 at 4:57 AM, James wrote:
>
> Hi, Guys
>
>  GWTENT 0.7 now is available for download now, this version add
> UIBinding and Validate(JSR303) support to GWT and Bug fixes of
> HTMLTemplate and Reflection.
>
>  Project web page: http://code.google.com/p/gwt-ent/
>
>  A showcase web page provided, it's only two screen at this moment,
> but it's a start.
>  You can access here: 
> http://gwtent-showcase.appspot.com/gwtent_showcase/Gwtent_showcase.html
>
>  Changes In this version:
>
> 1, New widgets
>   EnumListBox
>   RadioSelector
>
> 2, Binder
>   EnumListBoxBinder
>   ListBoxBinder
>   TextBoxBinder
>   CheckBoxBinder
>   RichTextAreaBinder
>   RadioSelectorBinder
>   LabelBinder
>
> 3, Validators
>   Required
>   Size
>   Min
>   NotEmpty
>   NotNull
>   Email
>   Regular
>   URL
>
> 4, Utils Classes
>   NotifyListener
>   WebUtils
>   PageBug integration
>
>
> Thanks & Regards
> James
>
> >
>



-- 
Eduardo S. Nunes
http://e-nunes.com.br

--~--~-~--~~~---~--~~
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: MVP question

2009-08-19 Thread Ian Bambury
2009/8/19 Davis Ford 

>
> My basic question is: why not just return TextBox if that is what is
> in your view?  The coupling is between 2 classes: view and presenter.
> If you later change TextBox to SuperWidgetTextBox, you can re-factor
> it in your IDE in 5 seconds and be done with it.
>
> Am I missing something?
>

If that is the way you want to go then fine.

What you might be missing is that some of your views may not be using text
boxes. One view may be using a text box. Another might use a label, another
might use a button, or a text area, or a hyperlink, or a menu item. They can
all display text.

An on/off indicator and a switch are just a boolean and something clickable,
but you don't decide in the presenter that is should be the words 'on' and
'off' and demand a label, you leave it as boolean and let the view decide
whether to put yes/no, on/off, true/false, a checkbox, an image of a
lightbulb on and off, etc - and the clickable thing could be a button with
those words, or a picture of a switch, or the checkbox.

The presenter can be used for all these views. Different views can register
with the same presenter. Users can choose their preferred view and swap
views in and out.

Ian

http://examples.roughian.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-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: lost the text box or dialog box focus in IE

2009-08-19 Thread Thomas Broyer

[why did you mail me in private rather than replying to the list?]

On Wed, Aug 19, 2009 at 1:44 PM, ramesh chiluveri wrote:
> Hai Thomas,
>
> I am also facing same problem.I gone through the link which u sent,but
> i  didn't find any solution.

We faced this issue when we started developing our app a bit more than
a year ago; we ended up using a GlassPanel (from GWT-Incubator) and a
non-modal popup.

> I am using GWT1.5 version.

Which 1.5? 1.5.3? Do you reproduce it in the Showcase sample?

> I am facing this issue only in IE.

It only affects IE yes.

-- 
Thomas Broyer

--~--~-~--~~~---~--~~
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: How to configure Jetty in GWT

2009-08-19 Thread Lothar Kimmeringer

willemsl...@gmail.com schrieb:

> I've recently migrated from GWT 1.5.x to 1.7.0 and I'm looking for
> pointers to articles/documentation/... on:
> 1) how to configure the JNDI lookup within Jetty (I want to define my
> database connection details)

http://www.google.de/search?q=jetty+jndi+configuration

> 2) how to configure container managed security within Jetty

http://www.google.de/search?q=jetty+container+managed+security

> If the above are too specific, then maybe just how to configure Jetty
> in general, within the GWT - eclipse environment.

That I was never doing, I always use the Tomcat-server being
"shipped" with GWT. But installing a GWT-application is simply
adding the WAR-file to the web-app-directory or define it as
specific WebApplication.


Regards, Lothar

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to configure Jetty in GWT

2009-08-19 Thread willemsl...@gmail.com

Hi,

I've recently migrated from GWT 1.5.x to 1.7.0 and I'm looking for
pointers to articles/documentation/... on:
1) how to configure the JNDI lookup within Jetty (I want to define my
database connection details)
2) how to configure container managed security within Jetty

If the above are too specific, then maybe just how to configure Jetty
in general, within the GWT - eclipse environment.

Or should I venture down the -noserver path ?

Ciao,

W.

--~--~-~--~~~---~--~~
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: Is gwt1.6/1.7 supports/compatible with gears

2009-08-19 Thread evergreen_suni



hi  Sumit,


Sorry for late reply..

Actually i want to store my applications html , java files into google
gears.I want to make my application as offline.But i dont know how to
do it.Could you please help me?I am using gwt1.7 and google plugins
for eclipse.


Please reply
--~--~-~--~~~---~--~~
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: How to getAttribute and setAttribute on GWT + GAE like HttpSession ?

2009-08-19 Thread Parmeet Kohli

I guess the easiest way would be to make a method on the server end
which returns these values, and you can call these methods from the
client side (using GWT RPC)



On Aug 19, 2:58 pm, jlc488  wrote:
> Thanks for your kind reply.
>
> Just wondering, If I want to access any of values from the client side
> which I've setted on the server side.
>
> Is there any way to access it from the client side?
>
> Thanking you
>
> On Aug 13, 5:52 pm, Parmeet Kohli  wrote:
>
> > Hi,
>
> >    You can use the following:
>
> > HttpServletRequest request = this.getThreadLocalRequest();
> > HttpSession session = request.getSession();
> > session.setAttribute(key, value);
> > int temp = session.getAttribute(key);
>
> > This ofcourse is on the server side. Hope it helps !!
>
> > Parmeet
>
> > On Aug 12, 12:46 pm,jlc488 wrote:
>
> > > Hello,
>
> > > I have a question about session management on GWT + GAE.
>
> > > Actually I have implemented using cookies to store email id and some
> > > other information.
>
> > > However, cookies are stored on client side computer and I think It
> > > lacks of security problems.
>
> > > So, I was thinking of using session like HttpSession or something that
> > > supports GWT + GAE environment.
>
> > > You know I can just use setAttribute to store any object and using
> > > getAttribute to retrieve information that I need.
>
> > > I've been searching keywords like "session", "session management",
> > > "gwt session", "gae session" and etc.
>
> > > I can not find the answer that I really need.
>
> > > Can you guys guide me some ideas or the proper way to implement it If
> > > I am approaching it wrong way??
>
> > > Thanks
>
> > > Best wishes to you 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-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: How to getAttribute and setAttribute on GWT + GAE like HttpSession ?

2009-08-19 Thread jlc488

Thanks for your kind reply.

Just wondering, If I want to access any of values from the client side
which I've setted on the server side.

Is there any way to access it from the client side?

Thanking you

On Aug 13, 5:52 pm, Parmeet Kohli  wrote:
> Hi,
>
>    You can use the following:
>
> HttpServletRequest request = this.getThreadLocalRequest();
> HttpSession session = request.getSession();
> session.setAttribute(key, value);
> int temp = session.getAttribute(key);
>
> This ofcourse is on the server side. Hope it helps !!
>
> Parmeet
>
> On Aug 12, 12:46 pm,jlc488 wrote:
>
> > Hello,
>
> > I have a question about session management on GWT + GAE.
>
> > Actually I have implemented using cookies to store email id and some
> > other information.
>
> > However, cookies are stored on client side computer and I think It
> > lacks of security problems.
>
> > So, I was thinking of using session like HttpSession or something that
> > supports GWT + GAE environment.
>
> > You know I can just use setAttribute to store any object and using
> > getAttribute to retrieve information that I need.
>
> > I've been searching keywords like "session", "session management",
> > "gwt session", "gae session" and etc.
>
> > I can not find the answer that I really need.
>
> > Can you guys guide me some ideas or the proper way to implement it If
> > I am approaching it wrong way??
>
> > Thanks
>
> > Best wishes to you 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-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: Servlet is not getting called in my GWT application.Why?

2009-08-19 Thread Lothar Kimmeringer

Srihari.Ch schrieb:
> But, my requirement is, Whatever the url we pass in my flash code:
> (i.e., URLRequest() parameter), the servlets must call successfully
> when we use either of the both url's :
> [B]http://localhost/Application.html[/B].
> [B]http:///Application.html[/B].

localhost is in general resolved to 127.0.0.1 which is the
local machine. Any client not running on the same machine
as the server will fail to reach the servlet/server.

> Please, help me by providing a solution.

There is no solution for this problem, as long as there is
no "do-what-I-mean extension" to the DNS-system.

> It is urgent

I'm not sure how the above requirement came to life, but
in flash there should be a method like in Java-Applets or
GWT to get the base-URL of the page the flash is embedded
into, allowing to create the corresponding URL for the
retrieval of further data.


Regards, Lothar

--~--~-~--~~~---~--~~
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: Servlet is not getting called in my GWT application.Why?

2009-08-19 Thread Srihari.Ch

Hi Lothar,

Now my problem has moved forward with some good-work.
As you know, My system has set-up Apache server & as well as
Apache tomcat server to deploy the applications in my machine, so that
it can be treated as server machine & all the other systems connected
in LAN are treated as client systems.
Now, the problem/issue i am being facing is:

Case-1:
When I mention the URLRequest() parameter in my flash code as:
[B] var request:URLRequest= new URLRequest("http://localhost:8080/
servlet/getViews");[/B]
Then it works only in my system[server] and not works in any other
systems when they run my application using the url: [B]http://
localhost/Application.html[/B].
[B][I] Here,  means IP-Address of my system which
is treated as server now.[/B][/I]

Case-2:
When I mention the URLRequest() parameter in my flash code as:
[B] var request:URLRequest= new URLRequest("http://:
8080/servlet/getViews");[/B]
[B][I] Here,  means IP-Address of my system which
is treated as server now.[/B][/I]
 Then, it works in other client systems.
In case of server system,  If I run the application as [B]http://
/Application.html[/B], then it works fine.
else if I run the application as [B]http://localhost/Application.html[/
B], it is again unable to catch the servlet

But, my requirement is, Whatever the url we pass in my flash code:
(i.e., URLRequest() parameter), the servlets must call successfully
when we use either of the both url's :
[B]http://localhost/Application.html[/B].
[B]http:///Application.html[/B].


Please, help me by providing a solution.
It is urgent
Thanks in advance..

Srihari.Ch


On Aug 18, 2:11 pm, "Srihari.Ch"  wrote:
> Thanks Lothar.
>
> On Aug 18, 1:45 pm, Lothar Kimmeringer  wrote:
>
>
>
> > Srihari.Ch schrieb:
>
> > >> After checking Google, the error-code is returned e.g. if the
> > >> URL being specified can't be "found". Check out your request-
> > >> log and see if the request the flash is performing lead to a
> > >> 404-response (or something else than a 200). Personally I
> > >> think it will be a 404 because your URL above does not
> > >> fit the mapping you've defined.
>
> > >       Can you please tell me how to check the error-code which you
> > > mentioned above.
>
> > Open the request log of your web server with the text-editor of
> > your choice and read the content.
>
> > > Or else, Can you tell me what to do in order to move
> > > near to the solution?
>
> > Fix the URL. I don't think that "/webapps/ROOT/" should be
> > really a part of it. The correct URL I can't tell, because
> > I don't know your server-configuration.
>
> > Regards, Lothar
>
> This is the error I found in "Apache2.2/conf/error.log" file:
> [Tue Aug 18 10:41:57 2009] [error] [client 127.0.0.1] File does not
> exist: D:/websites/mymdworld/webapps/ROOT/servlet, referer:
> file:///C|/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/ROOT/DynaAccess.swf
> [Tue Aug 18 10:42:05 2009] [error] [client 127.0.0.1] File does not
> exist: D:/websites/mymdworld/webapps/ROOT/servlet, referer:
> file:///C|/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/ROOT/DynaAccess.swf
>
> Please, Can you explain me with an example on your own?
>
> In my system:
> Tomcat6.0 is present in /Tomcat6.0/
>                      &&
> Apache2.2 is present in /Apache2.2/ folders respectively.
>
> Thanks in advance...
> Srihari.Ch
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



URL rewrite problem

2009-08-19 Thread Bhayat

we can try to create web application with using gwt framework but i
coudt'n find enough document or information about how can be done url
rewriting.i have tried for a week but i couldnt manage.

Can any one that use url rewriting in hosted mode or in tomcat
server ?
if u can do this,did you use .htaccess or tuckey(url rewrite filter).

please if you have any document that show how to use url rewritng in
gwt clearly and show step by step,write link :(
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



GWTENT 0.7 is available for download - A Reflection, AOP, HTML template, UI Binding and Validate(JSR303) framework for GWT

2009-08-19 Thread James

Hi, Guys

  GWTENT 0.7 now is available for download now, this version add
UIBinding and Validate(JSR303) support to GWT and Bug fixes of
HTMLTemplate and Reflection.

  Project web page: http://code.google.com/p/gwt-ent/

  A showcase web page provided, it's only two screen at this moment,
but it's a start.
  You can access here: 
http://gwtent-showcase.appspot.com/gwtent_showcase/Gwtent_showcase.html

  Changes In this version:

1, New widgets
   EnumListBox
   RadioSelector

2, Binder
   EnumListBoxBinder
   ListBoxBinder
   TextBoxBinder
   CheckBoxBinder
   RichTextAreaBinder
   RadioSelectorBinder
   LabelBinder

3, Validators
   Required
   Size
   Min
   NotEmpty
   NotNull
   Email
   Regular
   URL

4, Utils Classes
   NotifyListener
   WebUtils
   PageBug integration


Thanks & Regards
James

--~--~-~--~~~---~--~~
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: when should we use GWT RPC and HTTP mechanism to communicate to server

2009-08-19 Thread DaveS

Our application uses both, depending on quite a few factors. In some
cases we are putting data into Flash (.swf) components, and need it in
XML, so we use a 'raw' HTTP request to get the data. In most other
cases we use GWT RPC to retreive data from the server, or to initiate
actions in the server. There really is no single answer, it just
depends on your application.

We have considered moving away from GWT RPC more than once, thinking
we might provide an 'open interface' or web-service interface, but so
far the convenience of RPC has been the overwhelming reason we are
continuing to use it.

I guess you could say, if there is no need to make the service
available to anything other than your GWT client, then use RPC, but if
you want to open the interface to 3rd parties, other apps or anything
like that, consider using HTTP.

  Dave.

On Aug 18, 5:56 pm, venki  wrote:
> Hi to all,
>
> I am new to GWT. I read GWT communication with server tutorial. It
> provides various mechanisms to communicate with the server. Any way i
> know how to use GWT RPC and HTTP mechanism to communicate with
> server.
>
> I request all of you can you give perfect explanation to when should
> we use RPC mechanism and when should we use HTTP mechanism. I mean at
> what type instances we are forced to use particular mechanism.
>
> Great 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Gin + JSNI

2009-08-19 Thread Thomas Broyer



On 19 août, 02:37, Jeff Chimene  wrote:
>
> I think I have a solution. As I understand it, when testing, one
> modifies the Gin Appmodule as required?

I'd rather use a test-specific module that extends/overrides/
overwrites the one used for "production".

> In this example, I use the "EmptyServer..." provider. When in
> production, I use the "Server..." provider.
[...]
> o The JavaScript overlay type "Server" is as expected, i.e. as described
> athttp://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#D...
>
> o The Gin AppModule is basically:
> package com.foo.client.jsnitest.client;
> import com.google.gwt.inject.client.AbstractGinModule;
> public class AppModule extends AbstractGinModule {
> �...@override
>  protected void configure() {
>   bind(Server.class).toProvider(EmptyServerProvider.class); // test
> or
>   bind(Server.class).toProvider(ServerProvider.class); // production
>  }
>
> }

Why not use a provider method? (I supposed you had reusable classes,
that's why I proposed a Provider subclass, but provider methods
work very well with a shorter code)

> o EmptyServerProvider is basically:
> package com.foo.client.jsnitest.client;
> import com.google.inject.Inject;
> import com.google.inject.Provider;
> public class EmptyServerProvider implements Provider {
>  private final Server   server;
>
> �...@inject
>  public EmptyServerProvider() {

No need for @Inject on a zeo-arg ctor.

>   this.server = getEmptyServer();
>  }
>
> �...@override
>  public Server get() {
>   return server;
>  }
>
>  public final native Server getEmptyServer() /*-{
>   var JSONObject = '{"server" : {"id" : ""'}';
>   return eval('('+JSONObject+')');
>  }-*/;
>
> }

Why didn't you write:

public native Server get() /*-{
  return {"server": { "id": "" } };
}-*/;

(note that a) get() is native/JSNI, b) there's nothing done at
construction time, a singleton scope would do it well given that you
don't get injected a Provider but a Server and c) there's no
need to parse JSON, just use the JS literal object notation)


(NB: I'm in the process of moving to GIN, so I haven't yet faced this
issue, but I'll probably also use GWT 2.0 and its new "single JSO
impl" feature that allows a JSO to implement an interface, provided
it's the only class that implements it; that way, you can use a JSO in
production and a mock in your tests, and your tests therefore no
longer depends on JSNI an can be run in pure Java, which also means a
lot faster!)
--~--~-~--~~~---~--~~
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: lost the text box or dialog box focus in IE

2009-08-19 Thread Thomas Broyer



On 19 août, 07:37, "dsreevani...@gmail.com" 
wrote:
> Hi all,
>
>   we are developing the project using gwt. I am facing one problem
> that is we are displaying 2 text boxes in dialog box. set the focus
> for the first text box using dereffered command. when ever we are
> opening the page first it displays that dialog box. its working fine
> in FF. but when ever we are opening in IE its opening fine when ever
> moues click on outside of the dialog box present browser (IE) is
> minimized and other browser opens or maximized.

This bug has been fixed for a while, which version of GWT are you
using?

http://code.google.com/p/google-web-toolkit/issues/detail?id=2390

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



StackPanel IE8 standard mode problem

2009-08-19 Thread MiSt

I've some problems with Stackpanel in ie8 (standard mode) GWT 1.7

My StackPanel has  width and height set explicitly in pixels but under
ie8 it looks much  higher than its size

It turned  out that removing line 142 from StackPanel:
DOM.setElementProperty(tdb, "height", "100%");

solves the issue and StackPanel still working under firefox, chrome
and opera.

So why this this line in stack panel is needed ?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   >