Re: How does registerForProxyType works

2011-06-15 Thread Joshua Kappon
Disregard my last post, it doesn't work with multiple clients, only
with one.

On Jun 15, 9:37 am, Joshua Kappon  wrote:
> You need to cause a version change on the object to cause an update
> EntityProxyChange event.
> are you changing the version on the object once one of the clients is
> changing it?
>
> On Jun 15, 12:18 am, Aldo Neto  wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > Thanks for the hint, but unless I'm doing something wrong I'm still not
> > being notified. Please note that when I say "other clients" I mean different
> > users working on different machines accessing the same table on the same
> > server.
>
> > As I said, I expected that everyone would be notified when registering
> > to registerForProxyType(). If this is not the case, the only thing that
> > comes to my mind is to periodically request for all the entries that I'm
> > interested. But again, I'd expect to have a way to PUSH the information I
> > need, and this is what I'm not being able to do.
>
> > Am I missing something? Any other idea?
>
> > Thanks
>
> > On Tue, Jun 14, 2011 at 3:49 PM, Juan Pablo Gardella <
>
> > gardellajuanpa...@gmail.com> wrote:
> > > If you propage a event via eventBus don't work?
>
> > > 2011/6/14 Aldo Neto 
>
> > >> Hi,
>
> > >> I need to implement a dynamic table that is populated based on values of 
> > >> a
> > >> given entity on the server by many clients simultaneously. I thought
> > >> that registerForProxyType() would solve all problems of mine, but then I
> > >> made some quick tests and found that it is not called when a different
> > >> client performs changes to that table. Is this correct? I mean, If I 
> > >> have 2
> > >> persons working on the same table and one updates an entry there, should 
> > >> I
> > >> expect to be notified on both clients? If not, is there an easy way to do
> > >> that?
>
> > >> Thanks,
> > >> Aldo
>
> > >> --
> > >> You received 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.
>
> > >  --
> > > You received 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.

-- 
You received 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 does registerForProxyType works

2011-06-15 Thread J.Ganesan
If you are on Google App Engine Channel API is useful, perhaps. If you
are not on Google App Engine, websocket is the way to go for client-to-
client communication.

J.Ganesan
www.DataStoreGwt.com

On Jun 15, 2:18 am, Aldo Neto  wrote:
> Hi,
>
> Thanks for the hint, but unless I'm doing something wrong I'm still not
> being notified. Please note that when I say "other clients" I mean different
> users working on different machines accessing the same table on the same
> server.
>
> As I said, I expected that everyone would be notified when registering
> to registerForProxyType(). If this is not the case, the only thing that
> comes to my mind is to periodically request for all the entries that I'm
> interested. But again, I'd expect to have a way to PUSH the information I
> need, and this is what I'm not being able to do.
>
> Am I missing something? Any other idea?
>
> Thanks
>
> On Tue, Jun 14, 2011 at 3:49 PM, Juan Pablo Gardella <
>
>
>
>
>
>
>
> gardellajuanpa...@gmail.com> wrote:
> > If you propage a event via eventBus don't work?
>
> > 2011/6/14 Aldo Neto 
>
> >> Hi,
>
> >> I need to implement a dynamic table that is populated based on values of a
> >> given entity on the server by many clients simultaneously. I thought
> >> that registerForProxyType() would solve all problems of mine, but then I
> >> made some quick tests and found that it is not called when a different
> >> client performs changes to that table. Is this correct? I mean, If I have 2
> >> persons working on the same table and one updates an entry there, should I
> >> expect to be notified on both clients? If not, is there an easy way to do
> >> that?
>
> >> Thanks,
> >> Aldo
>
> >> --
> >> You received 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.
>
> >  --
> > You received 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.

-- 
You received 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: JClassType source and isGenericType()

2011-06-15 Thread Adolfo Panizo Touzon
JClassType[] typeArgs =

 type.getImplementedInterfaces()[0].isParameterized().getTypeArgs();

JClassType elementType = typeArgs[0];


Did you try with getTypeArgs(); 


2011/6/14 pansen 

> hi,
>
> assuming i'm in a generator and receive a ``JClassType source`` which
> is in that case a ``org.test.Foo``.
>
> then ``souce.isGenericType()`` returns ``null``
> but ``source.getParameterizedQualifiedSourceName()`` returns
> "org.test.Foo".
> whereas ``source.getSimpleSourceName()`` only returns "Foo"
>
> ...which is a problem for me.
>
> what can i call to see this is a specialization of a generic? e.g.
> something like ``source.base().isGenericType()``.
>
> what can i call to see the specialization of this class - in this case
> i want the result of "Bar".
>
> thx a lot, andi
>
> --
> You received 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.
>
>


-- 
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

-- 
You received 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: JQuery slider alternate

2011-06-15 Thread Deepak Singh
Hi All,

Any idea is greatly welcome.

On Sat, Jun 11, 2011 at 4:44 PM, Deepak Singh wrote:

> Hi All,
>
> I am using gwtquery just because of JQuery two way slider component. I need
> to know that is there any similar kind of component available in GWT/3rd
> part widgets?
>
> Regards
> Deepak
>

-- 
You received 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: JQuery slider alternate

2011-06-15 Thread Alain Ekambi
Maybe you could just wrap that with a GWT API ?

2011/6/15 Deepak Singh 

> Hi All,
>
> Any idea is greatly welcome.
>
> On Sat, Jun 11, 2011 at 4:44 PM, Deepak Singh wrote:
>
>> Hi All,
>>
>> I am using gwtquery just because of JQuery two way slider component. I
>> need to know that is there any similar kind of component available in
>> GWT/3rd part widgets?
>>
>> Regards
>> Deepak
>>
>
>  --
> You received 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 API for  non Java based platforms
http://code.google.com/p/gwt4air/
http://www.gwt4air.appspot.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: Intercept basic authentication popup

2011-06-15 Thread koma
same prob.

Firefox supports something like *mozBackgroundRequest*
*Not sure how to set this property for a JSONP call though. Even then, only 
works for FF, chromium has a ticket 
open, 
found nothing about IE.
*
*
*
*
*
*I'd like to save my credentials locally (Gadget preferences) but the Basic 
auth dialog makes this impossible.*

*
*

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/oy6rOq9CjN0J.
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: JQuery slider alternate

2011-06-15 Thread Deepak Singh
I am wrapping it currently with gwtquery and working fine. But i dont want
to use JQuery at all. Thus i am looking for similar component in gwt.
Any idea ?

Thanks


On Wed, Jun 15, 2011 at 3:59 PM, Alain Ekambi
wrote:

> Maybe you could just wrap that with a GWT API ?
>
> 2011/6/15 Deepak Singh 
>
>> Hi All,
>>
>> Any idea is greatly welcome.
>>
>> On Sat, Jun 11, 2011 at 4:44 PM, Deepak Singh 
>> wrote:
>>
>>> Hi All,
>>>
>>> I am using gwtquery just because of JQuery two way slider component. I
>>> need to know that is there any similar kind of component available in
>>> GWT/3rd part widgets?
>>>
>>> Regards
>>> Deepak
>>>
>>
>>  --
>> You received 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 API for  non Java based platforms
> http://code.google.com/p/gwt4air/
> http://www.gwt4air.appspot.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.
>

-- 
You received 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: JClassType source and isGenericType()

2011-06-15 Thread lemaiol
How is it defined?

is it something like:

private Foo value;

or like:

private FooBar value;

where FooBar is "public class FooBar extends Foo {..."

If it is the first, the problem is type erasure in Java generics. From
the "declaration" of the field, you cannot read the type. If you use
the second, it should work because the generic typeis "captured /
fixed" in the FooBar class definition.

If the second does not work, tell me and I will send you a working
example.

cheers,
Berto

On Jun 14, 10:27 pm, pansen  wrote:
> hi,
>
> assuming i'm in a generator and receive a ``JClassType source`` which
> is in that case a ``org.test.Foo``.
>
> then ``souce.isGenericType()`` returns ``null``
> but ``source.getParameterizedQualifiedSourceName()`` returns
> "org.test.Foo".
> whereas ``source.getSimpleSourceName()`` only returns "Foo"
>
> ...which is a problem for me.
>
> what can i call to see this is a specialization of a generic? e.g.
> something like ``source.base().isGenericType()``.
>
> what can i call to see the specialization of this class - in this case
> i want the result of "Bar".
>
> thx a lot, andi

-- 
You received 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: Local filesystem access

2011-06-15 Thread gwt_user
Thanks Juan!

Does anyone has any other recommendation?

Thanks in advance!

On Jun 14, 10:01 am, Juan Pablo Gardella 
wrote:
> I think you can use gwt4air (use flash) .
>
> Juan
>
> 2011/6/14 gwt_user 
>
>
>
>
>
>
>
> > Hi,
>
> > We need to be able to access physical files system from GWT
> > application. Does anyone have any suggestions?
>
> > 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.

-- 
You received 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 MVP GIN - problem with nested views and presenters

2011-06-15 Thread ricu
Anybody? Maybe someone has the same architecture without GIN. What is
your experience?

On 13 lip, 21:16, ricu  wrote:
> Hi!
>
> We are usingGINin our application which is constructed in MVP style.
> We tried to follow some best practices described in GWT pages and here
> in GWT group so we design the application in the following manner:
> 1) We have multiple main screens(pages) that have activities attached
> to them. They are build in MVP  style where presenters are also
> activities.
> 2) Every main screen is a collection of some sub-widgets which can
> also be created from some other sub-sub-widgets, so you can say that
> we are nesting views and their presenters.
> 3) The main views are singletons. Our sub-widgets are not singletons
> because we are reusing them.
> 4) All of our presenters aren't singletons.
> 5) They are created usingGIN
>
> GINBinding example:
> bind(SubWidgetView.class).to(SubWidget.class);
> bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
>
> Injecting sub-widget into main widget through constructor example:
> @Inject
> public MainWidget(SubWidget widget1)
>
> Injecting sub-widget's interface into presenter through constructor
> example:
> @Inject
> public SubWidgetPresenter(SubWidgetView widget1)
>
> The problem is that we get two objects of the sub-widget class, one
> for injecting the into main widget and the other one for while
> injecting into it's presenter. The first one is  shown on the screen
> but the other one is bind to the presenter. When presenter changes its
> view, it changes the view that was not bin to the main widget and we
> can't see anything.
>
> So our solution would be to create one sub-widget per main-widget but
> we don't know how to do it and if we do, we don't know how to inject
> that object of the sub-widget into the recreating presenter.
>
> Marko

-- 
You received 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: Pluggable modules

2011-06-15 Thread Daniel G
Hi Berto,
Hi Mike,

can you give me some more details about your plugin-design? What
architecture are you using for the several applications, MVC or MVP?

Regards,
Daniel

On 11 Jun., 20:36, lemaiol  wrote:
> HI Mike,
>
> If I got it right, you want a main GWT application (own WAR) and
> several other GWT applications (own WAR each) that could be loaded
> altogether in the same host page (the one from the main application)
> and communicate using a "dispatching" interface (maybe an event bus).
> I have implemented exactly this for a customer and it is definitely
> possible.
>
> The problem is mainly how to communicate GWT classes which have been
> compiled and "linked" in different applications. Also when the Java
> classes are the same (shared through a common library) the GWT compile
> process produces a result that is neither linked together because of
> the separated compilations nor linked together at load time. JSNI
> comes to the rescue allowing the embedding of native JS code that
> remains the same even after the compile process (ignored by GWT
> compiler).
>
> I used JavaScriptObject classes to define the plugins common data
> model and implemented a pair of JSNI classes to do the gluing. I also
> used a server side mechanism to configure the plugins repository and
> to generate the GWT host page dynamically. This will load the plugins
> from the remote web applications and generate some required
> structures.
>
> If this is what you need, just tell me which details you are
> interested in.
>
> What you mentioned about using EventBus out of GWT would be an
> improvement. Could you point me to where you read about it? Have you
> got also other threads about this topic? I would like to learn about
> others needs and ideas.
>
> Hope it helps,
> Berto
>
> On Jun 9, 12:30 pm, manstis  wrote:
>
>
>
>
>
>
>
> > Firstly, I know a lot has been said about this in the past and I have
> > read many posts but I did not see an immediate solution so would
> > appreciate the opinion of those more knowledgable than I.
>
> > I'd like to create a single GWT application WAR (let's call it
> > "container") that can "host" (or embed) other GWT applications (let's
> > call an example "editor"). All, for simplicity, would be deployed on
> > the same web-server.
>
> > The "container" has a client-side service API that uses GWT-RPC to
> > server-side services to be shared by the "container" and "editor" e.g.
> > "loadData(..)".
>
> > Can I use gwt-exporter to export the "service" client-side API and use
> > gwt-api-interop to create an equivalent cross-application Java
> > "service" API that "editor" can utilise? For example, the service API
> > has a method "addEditorToContainer(Widget)" so the "editor" can add
> > itself to the "container".
>
> > I've also read about EventBus becoming available outside of GWT(?); if
> > I've read correctly is it possible to use a single EventBus across
> > both applications?
>
> > I appreciate this becomes trivial if I add the "editor" into the
> > "container" application before compile-time; but ideally I want to
> > allow for third-parties to develop "editors" without having to re-
> > compile it into "container". In theory, all they'd need to do is
> > reference the gwt-api-interop generated common API.
>
> > Perhaps my questions are mis-guided; and, if anybody else has
> > experience and success of writing a "pluggable" infrastructure,
> > perhaps you'd be so kind as to share what you've learnt?
>
> > With kind regards,
>
> > Mike

-- 
You received 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.



Set-Cookie Being Ignored

2011-06-15 Thread JPJenkins69
I am a GWT noob but am working with someone else who is more advanced
than I, and we cannot figure out why a cookie being returned by the
server as a Set-Cookie HTTP header is not actually being set in the
browser.

I wrote a server using Tomcat that has an authentication call. I wrote
a dummy website all in HTML that uses web forms to send a request to
the server with the authentication information and receives a response
that contains a Set-Cookie header. This all works. It then has a
second button in a different form on the same page that sends a
different request to my server with some form data, and the browser
automatically injects the cookie into the header as expected.
Therefore, the server, for the second call, can pull the cookie header
out of the request and authenticate the request. This all works and is
great.

Now, for the test GWT application we have developed, I have used the
code that is automatically generated when a new GWT application is
developed (no AppEngine) and modified it in the following ways on the
client side's EntryPoint class. I removed the TextBox for entering my
name and the GWT RPC calls. I modified MyHandler so that it no longer
implemented KeyPressedListener or whatever and does implement
RequestCallback. I edited the contents of the onClick to create a new
RequestBuilder that sends a POST with the authentication information.
So far, this all works as I can watch the logs on my server and it
receives the request, processes it, and places the authentication
cookie in the response. Using Firebug, I can see that the response
contains the Set-Cookie header with the necessary cookie information.
However, the browser never actually saves this information.
Unsurprisingly, a subsequent call to the server doesn't include the
cookie.

GWT is just compiled into JavaScript when deployed, correct? And
JavaScript can't inject itself between the HTTP response and the
browser can it? I have checked the Response object that is a parameter
to the onResponseReceived() call from the RequestCallback interface,
and it doesn't contain any method to get access to the cookie except
through the getHeaders() call. I have dumped the results of this call,
though, and it doesn't exist there. Anyway, the browser should at
least be getting access to the HTTP header before the code and should
be grabbing and setting the cookie values before handing the code to
GWT. Not only am I new to GWT, I am new to most HTTP client-side
development, but am I really that far off track?

Thank you,

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.



Overriding Css Styles Defined via CssResource ..

2011-06-15 Thread El bassistos
I have made reusable GWT Widget which uses CssResources, where I have
marked all the styes as @external so they are not obfuscated.

I now want to override some of the styles in plain standard HTML web
site. The website is not  GWT project so I can't override the styles
in a "module.gwt.xml" file..

I can see in FireBug that my styles from the re-used GWT Widget are
loaded after my  even if I define the script tag

Re: Refreshing a celltree

2011-06-15 Thread auto hinnak
I had a similar problem. I wanted to refresh a part of the tree when i
add/delete/update new items of the CellTree. To solve this, I used a
map in my TreeModel to store the NodeInfo of a tree item (in my case a
category). Thats enabled me to acces the DataProvider of a tree item
in the Activity class. Here is the snippet of the Activity class code:

public void refreshCategoryTree(Long categoryId) {
DefaultNodeInfo parent =
this.categoryIdToNodeInfo.get(categoryId);
if ( parent != null ) {
ProvidesKey provider = parent.getProvidesKey();
if ( provider instanceof CategoryAsyncDataProvider ) {
((CategoryAsyncDataProvider)
provider).updateRowsFromDatabase();
}
}
}

I dont know if this helps for refreshing the selected status, but it
will refresh a part of a cell tree.

On 13 Jun., 23:33, DevJodie  wrote:
> I'm also facing a similar situation. Has anyone already found a solution to 
> this
> problem?

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



I have 3 places which correspond to different regions,demo at http://demo4gwt.ecardbase.com/

2011-06-15 Thread sugar_xj
the method I Override is the key to implement multiple place
--
ActivityManager activityManager = new ActivityManager(cached,
eventBus){
@Override
public void onPlaceChange(PlaceChangeEvent event) {
if(event.getNewPlace() instanceof NorthPlace){
this.setDisplay(north);
}else if(event.getNewPlace() instanceof 
CenterPlace){
this.setDisplay(center);
}else if(event.getNewPlace() instanceof 
WestPlace){
this.setDisplay(west);
}else if(event.getNewPlace() instanceof 
AllPlace){
this.setDisplay(all);
}
super.onPlaceChange(event);
}
};
xxx.ui.xml is like this














first problem i got is when we press F5 or browser refresh
button,forward the url to others ,the app  just loaded last place and
other places are blank ,so I changed the url like in demo ,then my
app  is able to load all places,Now the problem i got is  when user
press browser's 'back' button it works in same activity's different
place(place name is different) ,but it does not work go back between
different activity's place .

so any one please help me solve this problem.

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

2011-06-15 Thread Tim Barthel
Thanks Chris, that works. It took me a while to figure out where to
put the calls because my app follows the MVP sample app pattern. It
still seem like a UiBinder bug and I will submit it as such.

On Jun 11, 5:17 pm, "Chris McBrien"  wrote:
> Try Googling "scheduler scheduledeferredfocus"
>
> Tim Barthel  wrote:
>
> Hello all,
>
> I am just getting started with gwt and trying to set the initialfocus
> to a TextBox with:
>
>                 
>
> Howeverfocusalways starts on the first field in the panel even
> though it is a label. Please help. 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.



Standalone zip download of GWT Designer

2011-06-15 Thread beluga
Hi -

I don't get through the corporate firewall with eclipse updater but I
can transfer a zip file if I get hold of it. Does anyone know how to
get hold of the GWT Designer standalone zip? Ideally the beta, since
I'm struggling with the type not found bug in the current GWT release.

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: I have 3 places which correspond to different regions,demo at http://demo4gwt.ecardbase.com/

2011-06-15 Thread Thomas Broyer
Ouch! Total misunderstanding!

First, a Place is akin to a URL, it represents the "current state" of your 
app. Given a Place instance, you should be able to determine which Activity 
goes into each "region" (btw, that's the role of ActivityMappers to return 
an Activity given a Place).
You should have one ActivityManager *per* region you place Activities in; so 
you'll have 4 ActivityManagers, each one with its ActivityMapper, each one 
controlling a "display region". Given an "ExamPlace" for instance, the 
ActivityManager for the north region will ask its ActivityMapper which 
Activity (if any) to display (in the north region), the ActivityManager for 
the east region will ask its ActivityMapper which Activity to put in the 
east region, etc.
And the PlaceHistoryManager will turn the Place into an history token thanks 
to its PlaceHistoryMapper; that's what you see in the URL; and if you go 
back to that URL (copy/paste, bookmark, back/next in the browser), the Place 
will be built back from the token, dispatched on the event bus, and each 
ActivityManager will then reconstruct the Activity for its "display region".

For a more in-depth look, see http://tbroyer.posterous.com, where I wrote a 
couple articles on Places, and couple others on Activities.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/2laIYIX71x0J.
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: Local filesystem access

2011-06-15 Thread Alain Ekambi
If you mean with " any other recommendation" a solution that does not
require a plugin like Flash  you can try the HTML5 file API.
But the API is still primitive and not cross browser(IE). If you are willing
to use Flash you can have a look at this demo:
http://gwt4air.googlecode.com/svn/trunk/exporter/GwtAir.html

And if  that s what you are looking for let me know. I can provide the
source code

Best,

 Alain

2011/6/15 gwt_user 

> Thanks Juan!
>
> Does anyone has any other recommendation?
>
> Thanks in advance!
>
> On Jun 14, 10:01 am, Juan Pablo Gardella 
> wrote:
> > I think you can use gwt4air (use flash) .
> >
> > Juan
> >
> > 2011/6/14 gwt_user 
> >
> >
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > We need to be able to access physical files system from GWT
> > > application. Does anyone have any suggestions?
> >
> > > 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.
>
> --
> You received 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 API for  non Java based platforms
http://code.google.com/p/gwt4air/
http://www.gwt4air.appspot.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.



Sending large nested DTO object over RPC - Browser freezes

2011-06-15 Thread Jonas
 In my GWT program I parse a large xml file using JAXB on the server side 
and then convert these objects into DTO. They contain a lot of strings, 
doubles, and integers in a nested hierarchy. I'm using ArrayList as 
collection for the nested objects. The problem is that when I send this over 
RPC it takes around 16 seconds and the browser freezes. I first thought 
there was something wrong with JAXB or the DTO conversion but as you can see 
below they are very fast:

DEBUG gwt-log:72 - - JAXB conversion time: 0.047 seconds
DEBUG gwt-log:72 - - DTO conversion time: 0.015 seconds

When I inspect the RPC call using FireBug I can see that the object being 
transferred is 4.6 kb and it says POST dispatch 111ms.

When I inspect some more I can see that the function 
@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::readInt() 
seems to be the culprit with 5428 calls and 6654ms total time.
::getString(I), ::readDouble(), ::readLong() are also called a lot with 
around 3000ms each. 

Am I doing something wrong here or should it really be this slow? ~16 
seconds for 5 kb of DTO data. It just seems wrong to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/pJo7SKx0SUoJ.
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: Sending large nested DTO object over RPC - Browser freezes

2011-06-15 Thread brancoch
You probably can try the com.google.gwt.rpc.RPC module though it has
been experimental for awhile. It seems to be a more efficient way of
encoding and decoding.

To use it it is almost the same as the other RPC:

1- Inherit the module: 

2- Have you service interface extends the
com.google.gwt.rpc.client.RpcService
 Ex:
/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("myService ")
public interface MyService extends RpcService {
MyComplexObject myMethod(String name);
}

3- Have your implementation extends from
com.google.gwt.rpc.server.RpcServlet

Ex:
@SuppressWarnings("serial")
public class MyServiceImpl extends RpcServlet implements MyService {

public MyComplexObject myMethod(String input) {
return null;
}

}

4- You need the Async the same way as the other RPC service:
Ex:
public interface MyServiceAsync {
void myMethod(String input, AsyncCallback callback);
}

This is it.

On Jun 15, 9:07 am, Jonas  wrote:
>  In my GWT program I parse a large xml file using JAXB on the server side
> and then convert these objects into DTO. They contain a lot of strings,
> doubles, and integers in a nested hierarchy. I'm using ArrayList as
> collection for the nested objects. The problem is that when I send this over
> RPC it takes around 16 seconds and the browser freezes. I first thought
> there was something wrong with JAXB or the DTO conversion but as you can see
> below they are very fast:
>
> DEBUG gwt-log:72 - - JAXB conversion time: 0.047 seconds
> DEBUG gwt-log:72 - - DTO conversion time: 0.015 seconds
>
> When I inspect the RPC call using FireBug I can see that the object being
> transferred is 4.6 kb and it says POST dispatch 111ms.
>
> When I inspect some more I can see that the function
> @com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::readI 
> nt()
> seems to be the culprit with 5428 calls and 6654ms total time.
> ::getString(I), ::readDouble(), ::readLong() are also called a lot with
> around 3000ms each.
>
> Am I doing something wrong here or should it really be this slow? ~16
> seconds for 5 kb of DTO data. It just seems wrong to me.

-- 
You received 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: Overriding Css Styles Defined via CssResource ..

2011-06-15 Thread Jeff Larsen
The styles from CSS resource are always going to be loaded after any static 
.css files. They are programatically injected (CssResource#ensureInjected())

One option would be to not use CssResource, but that is probably a bad one. 

Someone else solved this problem pretty elegantly

http://googlewebtoolkit.blogspot.com/2011/03/styling-and-skinning-your-apps-with.html

but this will probably be a signifigant refactor for you. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/v-Ft8mmmQQEJ.
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: Local filesystem access

2011-06-15 Thread Norberto
Maybe you can use an applet to access the file system

See this project: http://code.google.com/p/gwtai/



On Jun 14, 10:48 am, gwt_user  wrote:
> Hi,
>
> We need to be able to access physical files system from GWT
> application. Does anyone have any suggestions?
>
> 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: Sending large nested DTO object over RPC - Browser freezes

2011-06-15 Thread Paul Stockley
Is this in dev mode or the final compiled JS?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/2rMFOfp5uN0J.
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.



odd problem with events (registering, sending, receiving Order) and "place"-change

2011-06-15 Thread tanteanni
i just finished my first own example with activities/places and MVP. all 
works fine but some events aren't send or received properly if i change back 
to a place (from another place). but on "moduleLoad" where this place is set 
as default place all works fine. i think it shouldn't make a difference if a 
place/activity is started on moduleLoad (via historyHandler = new 
PlaceHistoryHandler(historyMapper); historyHandler.register(placeController, 
eB, defaultPlace); historyHandler.handleCurrentHistory();) or via 
placeController.goTo(place); , should it?

via debugging i checked the order of event registration, event sending and 
event receiving (all is executed in start(...) of the activity). the problem 
is that all receiver don't receive the event if start() is executed via 
goTo(place) (registration and sending works fine). But if an event is sent 
after start() or within start()-executed on moduleLoad all works fine!

my activity start looks like that:

@Override
public final void start(final AcceptsOneWidget panel, final EventBus 
eventBus) {
// register events - to manipulate visibility of some display areas
eventBus.addHandler(SelectedEvent.TYPE, this);
//initiate presenters -(pseudo code)
[presenter that receives SelectedEvent]
[presenter that sends SelectedEvent]
//ading presenter's asWidgets to screen -> panel.setWidget..
...
}

@Override
public final void onSelected(final SelectedEvent event) {
   //do something
}

(the use case for sending this event on start is, that i want say nothing is 
selected - the event's payload is null)

the problem is that neither the presenter's nor the activity's onSelected 
-method is called if the start() is called via goTo. But in all cases 
(checked with debugger) the registering on event occurs before sending it. 
what should i do?




-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/DUeB59oVWXUJ.
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: CheckBoxSelectionModel

2011-06-15 Thread Brian Reilly
Look at the CellTable example in the Showcase application:

http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable

The source code is viewable from that page as well.

-- Brian


2011/6/14 NANOUS :
> Bonjour,
>
> Comment je peut ajouter un ActionListener à une grid ,sachant que
> cette grid admet comme plugin un CheckBox,
> et que l'action soit en relation avec ce plugin??
>
> Merci d'avance
>
> --
> You received 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.
>
>

-- 
You received 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: I have 3 places which correspond to different regions,demo at http://demo4gwt.ecardbase.com/

2011-06-15 Thread sugar_xj
you said  (a Place is akin to a URL, it represents the "current state"
of your app.),

in my app this url (http://demo4gwt.ecardbase.com/#exam:5--student:4--
menu:admin) represents 3 regions activity's lastPlaceName(with token),
current state is "exam:5",student:5 and menu:admin is other region's
last state, when user request a place it actually changes current
state's of url , other two tokenes shows us the other regions (which
not changed) last state,THE reason I changed URL is when user refresh
browser   my app will load all regions places according to tokens in
url,

ExamActivity's start method is like this

public void start(AcceptsOneWidget panel, EventBus eventBus) {
panel.setWidget(display.asWidget());
String curr=History.getToken();
if(curr.startsWith(ExamPlace.TOKEN_NAME)&&curr.contains("--"))
{// if true ===refresh or forward the url.
String[] places=curr.split("--");
for(int i=places.length-1;i>=0;i--){
History.newItem(places[i]);
}
}
}

--

I hava PlaceHistoryMapper and PlaceHistoryHandler ,it works well in
same Activity's different place(place name is different,try it on
http://demo4gwt.ecardbase.com/, load a place and click defferent page
NUM in the HTML tables page bar, then go back to previous page) ,but
it couldn't reconstruct the Activity (between different activity's
place) when I press go back . (click defferent menu item, then try to
go back to previous page). THAT is the problem.

I tried what you said (have 4 ActivityManagers, each one with its
ActivityMapper, each one controlling a "display region".)

in this case my app only displayed the requested place in correct
region,but other regions changed to blank, may be I didn't understand
exactly what you said , the code is :

NorthActivityMapper northActivityMapper =new NorthActivityMapper();
ActivityManager northActivityManager = new
ActivityManager(northActivityMapper,
eventBus);
northActivityManager.setDisplay(north);

CenterActivityMapper centerActivityMapper =new
CenterActivityMapper();
ActivityManager centerActivityManager = new
ActivityManager(centerActivityMapper,
eventBus);
centerActivityManager.setDisplay(center);

WestActivityMapper westActivityMapper =new
WestActivityMapper();
ActivityManager westActivityManager = new
ActivityManager(westActivityMapper,
eventBus);
westActivityManager.setDisplay(west);

--

Other region dispaly blank is because of the code in XXXActivityMapper
is like this:

public Activity getActivity(Place place) {

if(place instanceof XXXPlace){
Activity activity=((XXXPlace) place).getActivity();
return activity;
}
return null;
}

if the code should not like this ,why should I have 4 ActivityMapper?

and please tell me what should I do to make my app to be able to load
differrent region's activity when user refresh the browser(http://
demo4gwt.ecardbase.com/#exam:5   it cant load all 3 region's last
state,but current state ),when user A forward the url to user B,user B
should see 3 regions display just like user A are looking right
now,not only one.

On 6月15日, 下午8时24分, Thomas Broyer  wrote:
> Ouch! Total misunderstanding!
>
> First, a Place is akin to a URL, it represents the "current state" of your
> app. Given a Place instance, you should be able to determine which Activity
> goes into each "region" (btw, that's the role of ActivityMappers to return
> an Activity given a Place).
> You should have one ActivityManager *per* region you place Activities in; so
> you'll have 4 ActivityManagers, each one with its ActivityMapper, each one
> controlling a "display region". Given an "ExamPlace" for instance, the
> ActivityManager for the north region will ask its ActivityMapper which
> Activity (if any) to display (in the north region), the ActivityManager for
> the east region will ask its ActivityMapper which Activity to put in the
> east region, etc.
> And the PlaceHistoryManager will turn the Place into an history token thanks
> to its PlaceHistoryMapper; that's what you see in the URL; and if you go
> back to that URL (copy/paste, bookmark, back/next in the browser), the Place
> will be built back from the token, dispatched on the event bus, and each
> ActivityManager will then reconstruct the Activity for its "display region".
>
> For a more in-depth look, seehttp://tbroyer.posterous.com, where I wrote a
> couple articles on Places, and couple others on Activities.

-- 
You received 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

Re: FireFox 5.0

2011-06-15 Thread Khun Yee Fung
I got FF5.0 when I updated my Ubuntu development box last week. A
mistake somewhere? I rolled it back to FF4.0.1 when the GWT plugin
would not run on it.

If you don't want to wait until FF5.0 is supported by GWT, you can
roll FF back to 4.0.1.

To roll back to 4.0.1,

1. Start Synaptic Package Manager
2. Search for firefox. And then click on the line.
3. Click on the "Package" menu item at the top (between "Edit" and
"Settings").
4. Choose "Force Version".
5. Select 4.0.1.

Click "Apply" to get FF 4.0.1 back.

Every time you update Ubuntu from now on, make sure FF is not updated
by un-selecting the checkbox beside FF.

On Jun 13, 9:59 am, john destefano  wrote:
> Hi,
>
> Just updated my OS (Ubuntu 11.04 -64) and got the latest version of
> firefox which is 5.0. The GWT plugin no longer works. Says that it's
> not compatible with 5.0. Any idea when a compatible version will be
> released?
>
> Thx

-- 
You received 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: I have 3 places which correspond to different regions,demo at http://demo4gwt.ecardbase.com/

2011-06-15 Thread Thomas Broyer
I'm totally lost as to how your (sample) app is expected to behave.

Still, "exam:5--student:4--menu:admin" represents "somewhere", some instance 
of some Place class that holds this "state". You'll have a PlaceTokenizer 
building this instance from that token.
then, when the place is given to any of the 3 ActivityMappers (one per 
region; sorry, I misread, and though you had 4 regions), each one will tell 
which activity to display in the region it controls.

So, the NorthActivityMapper will look at the place and return an 
ExamActivity for the 5th page (if I understood correctly); the 
WestActivityMapper will return an AdminMenuActivity (or whatever), and the 
CenterActivityMapper will return a StudentActivity for the 4th page.

When you want to navigate, you goTo a place that holds the whole state, so 
that each ActivityMapper will answer accordingly to what should be displayed 
in "their" region, adn the URL will be updated accordingly.
In your case, your place is kind of a "composite", where the "center 
activity" doesn't particularly care what is in the north region; so I'd 
suggest building the new place from the current one, just modifying the part 
that needs to change; something like:

   placeController.goTo(MyPlace.student(5, 
placeController.getCurrentPlace());

The student() factory method would then "copy" the exam:5 and menu:admin 
bits from the current place and set the "student" part to 5, so you really 
"goTo exam:5--student:5--menu:admin".

In brief, there would only be a single type of Place that can tell you 
exactly what should be "displayed"; and each ActivityMapper then use what it 
needs to know from the place to put the correct activity into the slot it 
manages.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/IdeIkCvyUMcJ.
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 will get Multiple-File-Input() supported?

2011-06-15 Thread Thomas Broyer
JSNI and JavaScriptObject "overlay types" FTW!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/lNk39MwjwWgJ.
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 will get Multiple-File-Input() supported?

2011-06-15 Thread Alex Luya
Actually,same thing can be done in uibinder's xml file,but question is
how to get selected file list:
-
private VerticalPanel vPanel;

public void onModuleLoad()
{
VerticalPanel wrapper = new VerticalPanel();
final FileUpload uploader = new FileUpload();
uploader.getElement().setPropertyBoolean("multiple", true);
wrapper.add(uploader);
wrapper.add(vPanel = new VerticalPanel());
uploader.addChangeHandler(new ChangeHandler()
{

@Override
public void onChange(ChangeEvent event)
{
String fileName = uploader.getFilename();
for (String file : fileName.split(","))
{
vPanel.add(new Label(file));
}

}
});

RootPanel.get().add(wrapper);
}
---
selected files will be list in file name box(you can see them if using
firefox),but FileUpload.getFileName() will get only first file name,and
further work is how to handle uploading? 

On Mon, 2011-06-13 at 08:48 -0700, Thomas Broyer wrote:
> The issue is: what behavior do you expect on browsers that do not
> support this feature?
> 
> 
> In the mean time:
> fileUpload.getElement().setPropertyBoolean("multiple", true");
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/wV6toVIq388J.
> 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.



-- 
You received 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: FireFox 5.0

2011-06-15 Thread Thomas Broyer
…or check your "software sources" (don't know how they call it in English, 
but well, your package sources) and make sure you don't have any 
Firefox-related PPA, such as 
http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu 
or http://ppa.launchpad.net/mozillateam/ppa/ubuntu.

Or maybe you're updating to Oneiric rather than Natty? Oneiric has Firefox 
5.0 beta: https://launchpad.net/ubuntu/+source/firefox/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Nj8tZdUHqcwJ.
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.



Ang.: Re: Sending large nested DTO object over RPC - Browser freezes

2011-06-15 Thread Jonas
This is hosted mode and on my intel core i3 work laptop. I tried the same 
code on my home computer and there it was much faster, around 5 seconds 
instead of 16. But still, far from what I had expected. I'll try and see 
what the speed is when deployed.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/JQJ1iPa7boAJ.
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 use a ComplexPanel with an ActivityManager

2011-06-15 Thread Corey
Ok, so when I was having this problem I was just experimenting with
the very simple UI that comes with the sample app.

I also tried keeping the SimplePanel and having the Activity return a
HeaderPanel consisting of a label and an image (the second method
mentioned in Ashton's Answer). I thought this didn't work. And I saw
comments in blogs and forums that seemed to indicate this doesn't
work. But once I started actually building up the UI with a DockPanel
and nested TabPanel, etc., all of the sudden everything started
displaying properly. I don't know why. It was probably a bug in my
code I suppose. But I'm on my way now. I don't care to go back and
diagnose exactly what went wrong. :)

But thanks for your suggestion Chris!

Corey

On Jun 11, 2:15 pm, "Chris McBrien"  wrote:
> Ate you perhaps using a layoutpanel?  I believe simplepanel descends from 
> panel.
>
> For layoutpanels use rootlaylout.get
>
> sorry for my poor typing. I'm trying to tap this out quickly on my mobile.  
>
> Corey  wrote:
>
> I'm trying to modify the GWT 2.1 HelloMVP example code to use a more
> complex 
> UI.http://code.google.com/p/google-web-toolkit/downloads/detail?name=Tut...
>
> My problem is that ActivityManager.setDisplay only accepts objects
> that implementAcceptsOneWidget. LayoutPanel and other ComplexPanel's
> don't implementAcceptsOneWidget. The example code uses a SimplePanel
> instead.
>
> I've found a few discussions on this 
> problem:http://stackoverflow.com/questions/5143196/is-there-a-acceptsonewidge...http://www.tempura.org/rants/2010/10/using-layoutpanels-with-gwt-2-1s...
>
> People suggest the solution is to create a subclass of the
> ComplexPanel I want that implements theAcceptsOneWidgetinterface.
> Like so:
>
> public class PanelForView extends LayoutPanel implementsAcceptsOneWidget{
>     IsWidget myWidget = null;
>
>     @Override
>     public void setWidget(IsWidget w) {
>         if (myWidget != w)  {
>             if (myWidget != null) {
>                 remove(myWidget);
>             }
>
>             if (w != null) {
>                 add(w);
>             }
>
>             myWidget = w;
>         }
>     }
>
> }
>
> This sounds great but it doesn't seem to work for me. Perhaps because
> I'm using GWT 2.3 instead of 2.1 or 2.2. In my EntryPoint I expect to
> simply replace the SimplePanel with my new PanelForView class and have
> the app run as before. Like so:
>
> public class HelloMVP implements EntryPoint {
>         private Place defaultPlace = new HelloPlace("World!");
> //      private SimplePanel appWidget = new SimplePanel(); // Replace this
> with PanelForView
>         private PanelForView appWidget = new PanelForView(); // This compiles
> but doesn't work.
> //      private SimpleLayoutPanel appWidget = new SimpleLayoutPanel(); //
> This doesn't work either.
>
>         public void onModuleLoad() {
>                 // Create ClientFactory using deferred binding so we can 
> replace
> with different
>                 // impls in gwt.xml
>                 ClientFactory clientFactory = GWT.create(ClientFactory.class);
>                 EventBus eventBus = clientFactory.getEventBus();
>                 PlaceController placeController =
> clientFactory.getPlaceController();
>
>                 // Start ActivityManager for the main widget with our 
> ActivityMapper
>                 ActivityMapper activityMapper = new
> AppActivityMapper(clientFactory);
>                 ActivityManager activityManager = new
> ActivityManager(activityMapper, eventBus);
>                 activityManager.setDisplay(appWidget);
>
>                 // Start PlaceHistoryHandler with our PlaceHistoryMapper
>                 AppPlaceHistoryMapper historyMapper=
> GWT.create(AppPlaceHistoryMapper.class);
>                 PlaceHistoryHandler historyHandler = new
> PlaceHistoryHandler(historyMapper);
>                 historyHandler.register(placeController, eventBus, 
> defaultPlace);
>
>                 RootPanel.get().add(appWidget);
>                 // Goes to place represented on URL or default place
>                 historyHandler.handleCurrentHistory();
>         }
>
> }
>
> This compiles fine but when I run it, I see nothing but a blank screen
> now. Is there something extra I have to do to initialize a
> ComplexPanel? Am I just misunderstanding something? I've tried adding
> Widgets and calling setSize to no avail. This is my first GWT project.
>
> Thanks for your time.
>
> Corey
>
> --
> You received 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 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to g

Question about new activities on place changes

2011-06-15 Thread Jens
Hi,

I just integrating activities and got stuck when it comes to list 
selections. Hopefully someone with more practically experience can help me.

The application has one activity mapper that holds providers (GIN) of 
activity proxies (code splitting) and creates new, clean activity instances 
in its getActivity method. After creation it sets the current place. So 
pretty standard stuff I think.

Now I have for example an EmployeePlace that has two variables: 1.) the 
employer id, 2.) the employee id. The view for that place contains a list 
and a content area for the selected employee's details. So my 
EmployeeActivity uses the employer id to fetch & fill the list of employees 
and the employee id for an optional pre-selection.

My problem is that when I select something in the employee list I do a 
placeController.goTo(new 
EmployeePlace(currentEmployerId, selectedEmployeeId)) so that the history 
token reflects the current selection. But as I always create new activities 
the whole mechanism starts again and for each selection in my list the 
activity fetches all employees, fills the list and pre-selects the employee. 
So it doesn't feel right (loading overlay for the list on selection) and 
creates a lot of network communication overhead.

So is there a way to update the URL history token and NOT changing the place 
so that the activity not gets restarted?

I have tried to implement hashcode() and equals() in the EmployeePlace in a 
way that two places are equal once the employer ids are equal. That way the 
activity does not get recreated and started if the employee id changes but 
the URL does not reflect the list selection and 
placeController.getWhere()returns a place with no employee id (basically the 
"old" place prior 
selection)

Is there a way to solve this? I think I clearly missing something. Seems 
like a standard use case and currently I have no real idea how it can work 
without singleton activities.  

Thanks J.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/l0nnHzqQrhcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re : Re: CellTree & SingleSelectionModel

2011-06-15 Thread mkkm...@gmail.com
It works thanks !

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/2zGBIQvEyjIJ.
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: FireFox 5.0

2011-06-15 Thread Chris Conroy
Given that Mozilla has a very recent track record of making binary
incompatible changes leading up to release (even after claiming they were
frozen), it doesn't make sense for us to invest any time in supporting FF5
until we have at least some notion of the binary interfaces being stable.
Presuming no major breakages, we should be able to support FF5 shortly after
proper its proper release.

On Mon, Jun 13, 2011 at 9:59 AM, john destefano  wrote:

> Hi,
>
> Just updated my OS (Ubuntu 11.04 -64) and got the latest version of
> firefox which is 5.0. The GWT plugin no longer works. Says that it's
> not compatible with 5.0. Any idea when a compatible version will be
> released?
>
> Thx
>
> --
> You received 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.
>
>

-- 
You received 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: Local filesystem access

2011-06-15 Thread gwt.user
Applet ? What s that ? :)
Either you use HTML5 API (really limited) or flash(gwt4air)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/feMqzQmEK8sJ.
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 2.1 MVP Multiple activities clarification help

2011-06-15 Thread ustad
Hi all, I'm new to GWT (and more of an advanced beginner with java at that 
too) and I just worked through the stockwatcher example as posted on the 
official google page using the latest gwt 2.3 sdk and plugin using eclipse.  
So far so good.   However, when trying to incorporate an MVP design pattern 
I am at a loss.I understand the basic concept that the idea is a 
separation of concerns leading to a loosely coupled architecture that 
facilitates easily testable and extensible code.But when looking through 
whatever examples I could find via search, I still haven't wrapped my head 
around the actual CONCRETE implementation. I guess what confuses me in 
the examples I've come across, is all the nested interfaces, nested object 
instantiations within method invocations and basic nomenclature I see 
'Display' being used with 'View' and 'Presenter' and I get more confused.
Should  I not worry about all that and just try and learn the new 
Activities/Places implementation?  Or without the fundamentals of MVP I 
won't understand the latter?

I was wondering if someone could provide me with a very, very basic concrete 
example of converting the rudimentary stockwatcher example into that of an 
MVP adopted one? I hope this is not too much of a request... but this 
humble chap who's trying to jump on the bandwagon would be forever indebted!

My humble thanks!
ustad

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/YIjzGq2uA4gJ.
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: Sending large nested DTO object over RPC - Browser freezes

2011-06-15 Thread ciosbel
Try to use this to better inspect RPC serialization/deserialization and 
round trip timings.
http://code.google.com/p/gwt-debug-panel/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/0lr-oO5ZY64J.
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 and Maven

2011-06-15 Thread Rob
Hi,

You might find this post helpful as well ->
http://uptick.com.au/content/getting-started-gwt-maven-and-eclipse

Cheers
Rob

On Jun 8, 10:57 pm, SrArcos  wrote:
> Thanks, I'll check my pom.xml comparing it with yours. Thank you very
> much. I'll tell you
>
> On 8 jun, 07:07, Juan Pablo Gardella 
> wrote:
>
> > See the pom.xml in this
> > sample
> > .
>
> > Juan
>
> > 2011/6/8 SrArcos 
>
> > > Hello all, I am trying to compile aGWTproyect withMavenbut I am
> > > not able to package the proyect into a war file. I'm with this for two
> > > weeks and I'm going crazy. Let's see if anyone can help me, please.
>
> > > The structure or my proyect is this:
>
> > > [code]
>
> > > +JRE System Library (libraries)
> > > +MavenDependencies (libraries)
> > > +test
> > > +test-classes
> > > +pom.xml
> > > +src
> > >  +-main
> > >    |
> > >    +-java
> > >    | |
> > >    | +-gwt/srarcos/library
> > >    | |
> > >    | +-META-INF
> > >    | | |
> > >    | | +-persistence.xml
> > >    | |
> > >    | +-log4j.properties
> > >    |
> > >    +-resources
> > >    |
> > >    +-webapp
> > >      |
> > >      +-Library
> > >      |
> > >      +-WEB-INF
> > >      | |
> > >      | +-lib
> > >      | |
> > >      | +-applicationContext.xml
> > >      | |
> > >      | +-web.xml
> > >      |
> > >      +-index.html
> > >      |
> > >      +-login.jsp
>
> > > [/code]
>
> > > This is my pom
>
> > > [code]
> > > http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://
> > >www.w3.org/2001/XMLSchema-instance"
> > >        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > >http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> > >        4.0.0
>
> > >        war
> > >        Library
> > >        gwt.srarcos
> > >        Library
> > >        1.0.0-SNAPSHOT
>
> > >        
> > >                src/main/webapp
> > >        
> > >        
> > >                ISO-8859-1 > > project.build.sourceEncoding>
> > >                1.6
> > >                1.6
> > >                1.5
> > >                1.5
> > >        
>
> > >        
> > >                
> > >                        
>
> > >                                org.codehaus.mojo
> > >                                gwt-maven-plugin
> > >                                2.2.0
> > >                                
>
> > >  gwt.srarcos.library.Library
>
> > >  src/main/webapp
> > >                                        index.html
> > >                                        2.2.0
> > >                                        INFO
> > >                                        OBFUSCATED
>
> > >  src/main/webapp/WEB-INF/web.xml
> > >                                
> > >                                
> > >                                        
>
> > >  prepare-package
> > >                                                
> > >                                                    compile
> > >                                                
> > >                                        
> > >                                
> > >                        
> > >                        
> > >                                org.apache.maven.plugins
> > >                                maven-clean-plugin
> > >                                
> > >                                        
> > >                                                
>
> > >  src/main/webapp/library
> > >                                                
> > >                                                
>
> > >  src/main/webapp/WEB-INF/classes
> > >                                                
> > >                                        
> > >                                
> > >                        
> > >                        
> > >                                maven-war-plugin
> > >                                2.0.1
> > >                                
> > >                                    true
>
> > >  src/main/webapp
>
> > >  src/main/webapp/WEB-INF/web.xml
> > >                                
> > >                        
> > >                
> > >                src/main/java
>
> > >  src/main/webapp/WEB-INF/classes
> > >                
> > >                        
> > >                                src/main/resources
> > >                        
> > >                
> > >        
>
> > >        
> > >                
> > >                        repo
> > >                        repo
> > >                        http://127.0.0.1/artifactory/repo
> > >                
> > >        
> > >        
> > >                
> > >                        repo
> > >                        repo
> > >                        http://127.0.0.1/artifactory/repo
> > >                
> > >        
> > >        
> > >                        
> > >                                antlr
> > >                                antlr
> > >                                2.7.6
> > >                        
> > >                        
> > >       

Expenses example appears broken

2011-06-15 Thread Thad
I'm starting my second GWT project, and trying to do things the MVP
way this time. HelloMVP is so trivial as to be nearly useless. The
Contacts examples doesn't use Activities and Places. So I'm trying to
look at samples/Expenses, but it appears broken.

I've little maven experience, but when I got errors on
javax.servlet.jstl 1.2, I changed line #377 of pom.xml to
1.1.2. That at least allowed the project to build.
However, when it runs, the UI does nothing.  After it loads, I see the
list on the left hand side--All, Engineering, Finance, etc. (similar
to Showcase)--but nothing happens when I click on any of it.
*Occasionally* some dots dance one the right.  *Occasionally* I get a
spinner when I click on the Engineering arrow, but nothing appears
underneath the label or on the right hand side. The other items do
nothing, period.

I'm trying this on Linux with GWT 2.3, Java jdk1.6.0_25, maven 2.2.1,
and Firefox 4.0.1.

Any ideas? Or can someone point me to a working example, preferably
one that uses ant.

-- 
You received 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: Pluggable modules

2011-06-15 Thread kendeng9898
Hi Berto,
  Waiting for more details. give some simple sample code is
appreciate.

  Since the compilation speed & easy development, I've changed to use
pyjamas project, a python verion of GWT. But I still interesting in
how to do the plugin. The hardest part is how to solved the different
compilation and linked.

Thanks,
Ken

-- 
You received 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: Widget not displayed upon change of place

2011-06-15 Thread Juan Pablo Gardella
Hi Harry

Can you resolve the problem? If not, in onStop() or onCancel() you must
unregistrer your handlers. Not about display regions. Try put your do the
placeChangeEvent like this:

Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
placeController.goTo(new MyPlace());
}
});

Juan


2011/6/14 Harry X 

> I have a display region which will display diffrent widgets accpording
> place
> change event.
> The widgets are simple, haveing a couple of tables in a flowpanel and
> making a
> async call
> to get some data through RPC. When the place change events are fired by
> clicking
> on a
> navigation tree, sometimes the widgets are not displayed. However,
> A second click on the navi tree will trigger the widget to be displayed.
>
> I think this has something to do with the handling with
> onStop()/onCancel(), but
> not
> sure how to debug and change. Do you have any suggestion? Thanks.
>
> Harry
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-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.
>
>

-- 
You received 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: Ref: Jdoconfig.xml

2011-06-15 Thread Juan Pablo Gardella
Read this tutorial.
http://lesca.me/docs/local/gae/appengine/docs/java/datastore/usingjdo.html .
I think you have some options checked in GAE eclipse plugin to use jdo.


2011/6/14 sam 

> Hi All,
>
> During the build process a copy of "jdo-config.xml" is created in the
> WAR folder, so m question is what is the name of that file.
>
>
> Thx in Advanced
> Sanjay
>
> --
> You received 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.
>
>

-- 
You received 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 MVP GIN - problem with nested views and presenters

2011-06-15 Thread Juan Pablo Gardella
"The problem is that we get two objects of the sub-widget class" becouse
this widgets aren't singletons.

2011/6/15 ricu 

> Anybody? Maybe someone has the same architecture without GIN. What is
> your experience?
>
> On 13 lip, 21:16, ricu  wrote:
> > Hi!
> >
> > We are usingGINin our application which is constructed in MVP style.
> > We tried to follow some best practices described in GWT pages and here
> > in GWT group so we design the application in the following manner:
> > 1) We have multiple main screens(pages) that have activities attached
> > to them. They are build in MVP  style where presenters are also
> > activities.
> > 2) Every main screen is a collection of some sub-widgets which can
> > also be created from some other sub-sub-widgets, so you can say that
> > we are nesting views and their presenters.
> > 3) The main views are singletons. Our sub-widgets are not singletons
> > because we are reusing them.
> > 4) All of our presenters aren't singletons.
> > 5) They are created usingGIN
> >
> > GINBinding example:
> > bind(SubWidgetView.class).to(SubWidget.class);
> > bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
> >
> > Injecting sub-widget into main widget through constructor example:
> > @Inject
> > public MainWidget(SubWidget widget1)
> >
> > Injecting sub-widget's interface into presenter through constructor
> > example:
> > @Inject
> > public SubWidgetPresenter(SubWidgetView widget1)
> >
> > The problem is that we get two objects of the sub-widget class, one
> > for injecting the into main widget and the other one for while
> > injecting into it's presenter. The first one is  shown on the screen
> > but the other one is bind to the presenter. When presenter changes its
> > view, it changes the view that was not bin to the main widget and we
> > can't see anything.
> >
> > So our solution would be to create one sub-widget per main-widget but
> > we don't know how to do it and if we do, we don't know how to inject
> > that object of the sub-widget into the recreating presenter.
> >
> > Marko
>
> --
> You received 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.
>
>

-- 
You received 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: Intercept basic authentication popup

2011-06-15 Thread Juan Pablo Gardella
If you use gwt-rpc, make a default asyncallback like this:

public abstract class DefaultAsyncCallback implements
com.google.gwt.user.client.rpc.AsyncCallback {

private static final char flag = '0';

@Override
public void onFailure(Throwable e) {
 if (isUnAuthenticatedUser(e)) showLogin();
}

}

And use everywhere.

2011/6/15 koma 

> same prob.
>
> Firefox supports something like *mozBackgroundRequest*
> *Not sure how to set this property for a JSONP call though. Even then,
> only works for FF, chromium has a ticket 
> open,
> found nothing about IE.
> *
> *
> *
> *
> *
> *I'd like to save my credentials locally (Gadget preferences) but the
> Basic auth dialog makes this impossible.*
>
> *
> *
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/oy6rOq9CjN0J.
>
> 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.
>

-- 
You received 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: Question about new activities on place changes

2011-06-15 Thread Juan Pablo Gardella
I think you can use a singleton in client side to manage
getEmployesOf(employer). You can cache the last query.

2011/6/15 Jens 

> Hi,
>
> I just integrating activities and got stuck when it comes to list
> selections. Hopefully someone with more practically experience can help me.
>
> The application has one activity mapper that holds providers (GIN) of
> activity proxies (code splitting) and creates new, clean activity instances
> in its getActivity method. After creation it sets the current place. So
> pretty standard stuff I think.
>
> Now I have for example an EmployeePlace that has two variables: 1.) the
> employer id, 2.) the employee id. The view for that place contains a list
> and a content area for the selected employee's details. So my
> EmployeeActivity uses the employer id to fetch & fill the list of
> employees and the employee id for an optional pre-selection.
>
> My problem is that when I select something in the employee list I do a 
> placeController.goTo(new
> EmployeePlace(currentEmployerId, selectedEmployeeId)) so that the history
> token reflects the current selection. But as I always create new activities
> the whole mechanism starts again and for each selection in my list the
> activity fetches all employees, fills the list and pre-selects the employee.
> So it doesn't feel right (loading overlay for the list on selection) and
> creates a lot of network communication overhead.
>
> So is there a way to update the URL history token and NOT changing the
> place so that the activity not gets restarted?
>
> I have tried to implement hashcode() and equals() in the EmployeePlace in
> a way that two places are equal once the employer ids are equal. That way
> the activity does not get recreated and started if the employee id changes
> but the URL does not reflect the list selection and
> placeController.getWhere() returns a place with no employee id (basically
> the "old" place prior selection)
>
> Is there a way to solve this? I think I clearly missing something. Seems
> like a standard use case and currently I have no real idea how it can work
> without singleton activities.
>
> Thanks J.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/l0nnHzqQrhcJ.
> 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.
>

-- 
You received 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 2.1 MVP Multiple activities clarification help

2011-06-15 Thread Juan Pablo Gardella
Check this sample

2011/6/15 ustad 

> Hi all, I'm new to GWT (and more of an advanced beginner with java at that
> too) and I just worked through the stockwatcher example as posted on the
> official google page using the latest gwt 2.3 sdk and plugin using eclipse.
> So far so good.   However, when trying to incorporate an MVP design pattern
> I am at a loss.I understand the basic concept that the idea is a
> separation of concerns leading to a loosely coupled architecture that
> facilitates easily testable and extensible code.But when looking through
> whatever examples I could find via search, I still haven't wrapped my head
> around the actual CONCRETE implementation. I guess what confuses me in
> the examples I've come across, is all the nested interfaces, nested object
> instantiations within method invocations and basic nomenclature I see
> 'Display' being used with 'View' and 'Presenter' and I get more confused.
> Should  I not worry about all that and just try and learn the new
> Activities/Places implementation?  Or without the fundamentals of MVP I
> won't understand the latter?
>
> I was wondering if someone could provide me with a very, very basic
> concrete example of converting the rudimentary stockwatcher example into
> that of an MVP adopted one? I hope this is not too much of a request...
> but this humble chap who's trying to jump on the bandwagon would be forever
> indebted!
>
> My humble thanks!
> ustad
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/YIjzGq2uA4gJ.
> 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.
>

-- 
You received 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-dev.jar and embedded Tomcat; Conflicts!

2011-06-15 Thread WulfgarPro
Hi,

I am using GWT-2.2.0 with NetBeans 7 and Tomcat 7.0.11.

In my unit testing I am using embedded Tomcat (see excepts below).

public static void startTomcatInstance() throws
MalformedURLException, LifecycleException {
tomcat = new Tomcat();

tomcat.setBaseDir(".");
tomcat.setPort(8084);

Context ctx = tomcat.addWebapp(null, "/AdiibHarmoniser",
System.getProperty("user.dir") + "/build/web");
File contextFile = new File(System.getProperty("user.dir") + "/
build/web/META-INF/context.xml");
ctx.setConfigFile(contextFile.toURI().toURL());

URL location =
Context.class.getProtectionDomain().getCodeSource().getLocation();
System.out.println(location.getPath());

tomcat.enableNaming();
tomcat.start();
}

@AfterClass
public static void tearDownClass() throws LifecycleException {
if (tomcat.getServer() != null
&& tomcat.getServer().getState() !=
LifecycleState.DESTROYED) {
if (tomcat.getServer().getState() !=
LifecycleState.STOPPED) {
tomcat.stop();
}
tomcat.destroy();
}
}

I am also unit testing my view class with GWTTestCase. GWTTestCase
requires gwt-dev.jar to be on my CP. Adding gwt-dev.jar causes the
following aforementioned lines to break:

- ctx.setConfigFile(contextFile.toURI().toURL()); -- setConfigFile
only accepts a String
- tomcat.getServer().getState() -- does not exist

Additionally, having the Tomcat jar's on my CP causes the GWTTestCase
to fail with:

java.lang.NoSuchFieldError: warningThreshold at
com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:
340) at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.
(JdtCompiler.java:174) at
com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:616)
at com.google.gwt.dev.javac.CompilationStateBuilder
$CompileMoreLater.compile(CompilationStateBuilder.java:193) at
com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:
390) at
com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:
275) at
com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:
325) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:
1322) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:
1289) at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:631)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:
441) at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:
296)

Removing the Tomcat jar's enables GWTTestCase to work.. but my
embedded Tomcat then fails.

This is extremley frustrating. I have tried various things (including
repackaging gwt-dev.jar)..

Any ideas ?

WulfgarPro

-- 
You received 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 2.1 MVP Multiple activities clarification help

2011-06-15 Thread tanteanni
i didn't read all post, but i ran into similar problems. now i got something 
that's working for me:

i decoupled activities/places and MVP (what thomas suggested in many 
places). in my case the VP-pairs are controlling/filling display areas and 
one activity is "start"ing/ controlling them. starting means composing the 
screen with a DockLayoutPanel and add the presenter's asWidgets to it's 
parts. controlling means hiding showing one shared content area for example. 
that is exactly the same what i did before without places/activities. the 
difference is now i can control/handle the leaving of such a set of 
presenters and i can easily safe some state (the presenters that want to 
save something need appropriate setters or constructors) / recover the state 
and bookmark it. imho that is the exact use for activities and places - to 
use an activity as presenter is imho a special case suitable in some (not so 
complex?) apps.

what do you think about this approach? (this approach is my interpretation 
of answers i got for similar questions here 
https://groups.google.com/forum/#!topic/google-web-toolkit/0sM8aWWt27g, 
https://groups.google.com/forum/#!topic/google-web-toolkit/f20FbM04usU - in 
meantime i understand the - especially thomas' "Activities however are in no 
way related to MVP: you can use activities without doing MVP, and you can 
(and you probably will if your UI is complex) do MVP outside activities.")

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/aHihcB8jjncJ.
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 MVP GIN - problem with nested views and presenters

2011-06-15 Thread ricu
Are you trying to say that I make those views as singletons? The
problem is that I would like to reuse one widget on multiple places.
If I go with singletons I must create classes for every widget I use
(they will extend some class that has mutual functionality)?

On 16 lip, 02:27, Juan Pablo Gardella 
wrote:
> "The problem is that we get two objects of the sub-widget class" becouse
> this widgets aren't singletons.
>
> 2011/6/15 ricu 
>
>
>
>
>
>
>
> > Anybody? Maybe someone has the same architecture without GIN. What is
> > your experience?
>
> > On 13 lip, 21:16, ricu  wrote:
> > > Hi!
>
> > > We are usingGINin our application which is constructed in MVP style.
> > > We tried to follow some best practices described in GWT pages and here
> > > in GWT group so we design the application in the following manner:
> > > 1) We have multiple main screens(pages) that have activities attached
> > > to them. They are build in MVP  style where presenters are also
> > > activities.
> > > 2) Every main screen is a collection of some sub-widgets which can
> > > also be created from some other sub-sub-widgets, so you can say that
> > > we are nesting views and their presenters.
> > > 3) The main views are singletons. Our sub-widgets are not singletons
> > > because we are reusing them.
> > > 4) All of our presenters aren't singletons.
> > > 5) They are created usingGIN
>
> > > GINBinding example:
> > > bind(SubWidgetView.class).to(SubWidget.class);
> > > bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
>
> > > Injecting sub-widget into main widget through constructor example:
> > > @Inject
> > > public MainWidget(SubWidget widget1)
>
> > > Injecting sub-widget's interface into presenter through constructor
> > > example:
> > > @Inject
> > > public SubWidgetPresenter(SubWidgetView widget1)
>
> > > The problem is that we get two objects of the sub-widget class, one
> > > for injecting the into main widget and the other one for while
> > > injecting into it's presenter. The first one is  shown on the screen
> > > but the other one is bind to the presenter. When presenter changes its
> > > view, it changes the view that was not bin to the main widget and we
> > > can't see anything.
>
> > > So our solution would be to create one sub-widget per main-widget but
> > > we don't know how to do it and if we do, we don't know how to inject
> > > that object of the sub-widget into the recreating presenter.
>
> > > Marko
>
> > --
> > You received 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.

-- 
You received 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.