Re: Why appear OPTIONS instead of POST in my RPC calls?

2010-06-23 Thread enTropy Fragment
Thanks for your comment, it helped me a lot. Indeed that's the "problem".

I guess the next step is to create a good response so the RPC works. Or is
there any better solution? (I can't avoid the cross-site situation)

I've overriden the doOptions method in the servlet with the following code:

@Override
protected void doOptions(HttpServletRequest req, HttpServletResponse
res){
res.addHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS");
res.addHeader("Connection", "Keep-Alive");
res.addHeader("Keep-Alive", "115");
res.addHeader("Access-Control-Allow-Origin",
req.getHeader("Origin"));
res.addHeader("x-gwt-permutation", GWT.getPermutationStrongName());
res.addHeader("x-gwt-module-base", "
http://localhost:8084/AnalisiHeuristic/cat.udl.griho.AnalisiHeuristic.Main/
");
}


But it's not working yet, what am I doing wrong? isn't this the good
approach? :(
GWT: 2.0.3
Tomcat: 6.0.26
OS: Ubuntu 10.04

*Request:*
OPTIONS
/AnalisiHeuristic/cat.udl.griho.AnalisiHeuristic.Main/analisiheuristicservice
HTTP/1.1
Host: localhost:8084
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Origin: http://www.arandomwebsite.is
Access-Control-Request-Method: POST
Access-Control-Request-Headers: x-gwt-module-base,x-gwt-permutation

2010/6/22 Sripathi Krishnan 

> Probably because you are trying to make cross-domain requests (a different
> port, domain or protocol)
>
> See this post -
> http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a080757856163097
> <http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a080757856163097>
> --Sri
>
>
> On 22 June 2010 16:19, enTropy Fragment  wrote:
>
>> Hello
>>
>> Here is my problem:
>> When I call my rpc from inside the war everything works well, but when I
>> call the same rpc calls from the same GWT javascript client stuff but
>> injected into an external web site the rpc makes the call with HTTP OPTIONS
>> instead of HTTP POST method.
>> I'm very interested in calling the rpc this way...
>>
>> How can I make this work?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Why appear OPTIONS instead of POST in my RPC calls?

2010-06-22 Thread enTropy Fragment
Hello

Here is my problem:
When I call my rpc from inside the war everything works well, but when I
call the same rpc calls from the same GWT javascript client stuff but
injected into an external web site the rpc makes the call with HTTP OPTIONS
instead of HTTP POST method.
I'm very interested in calling the rpc this way...

How can I make this work?

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



Re: exception while calling a server method

2010-06-21 Thread enTropy Fragment
Objects in rpc calls must implement Serializable, and all the types of its
fields must be serializable too.
You should also make sure the rpc return type is the same the server method
returns, with special attention on generics. I got a problem similar to
yours by returning List while the rpc return type being List. You can
return an ArrayList in my case, but returning just an ArrayList didn't
work

2010/6/20 Vik 

> Well it's already implementing that and that is why I am unable to
> understand it.any other suggestion please
>
> On 20 Jun 2010 12:19, "nava nee krish"  wrote:
> > Hi Vik,
> >
> > Your bean classes for example 'FindBloodDonorResultBean' this case which
> are
> > passed over the network ( Server-Client) must implement isSerializble
> > interface.
> >
> > Regards
> > Nav.
> >
> > On Sun, Jun 20, 2010 at 6:47 AM, Vik  wrote:
> >
> >> Hie
> >>
> >> can somome suggest what going wrong here
> >>
> >>
> >> Jun 20, 2010 5:27:20 AM
> >> com.google.appengine.tools.development.ApiProxyLocalImpl log
> >> SEVERE: [1277011640015000] javax.servlet.ServletContext log: Exception
> >> while dispatching incoming RPC call
> >> com.google.gwt.user.client.rpc.SerializationException:
> >> java.lang.reflect.InvocationTargetException
> >> at
> >>
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer(ServerSerializationStreamWriter.java:760)
> >> at
> >>
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:723)
> >> at
> >>
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:612)
> >> at
> >>
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
> >> at
> >>
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
> >> at
> >>
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:534)
> >> at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:609)
> >> at
> >>
> com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:467)
> >> at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:564)
> >> at
> >>
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
> >> at
> >>
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
> >> at
> >>
> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> >> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> >> at
> >>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
> >> at
> >>
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:51)
> >> at
> >>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> >> at
> >>
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
> >> at
> >>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> >> at
> >>
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
> >> at
> >>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> >> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> >> at
> >>
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> >> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> >> at
> >> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> >> at
> >>
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
> >> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> >> at
> >>
> com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
> >> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> >> at org.mortbay.jetty.Server.handle(Server.java:326)
> >> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> >> at
> >>
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
> >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
> >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> >> at
> >>
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChann

Rpc call gets a 304 http status

2010-06-21 Thread enTropy Fragment
Hi

I'm launching GWT from an external web site (external from GWT's war). The
client side (javascript) works flawlessly but I get a 304 http status while
calling any RPC.
If I use StatusCodeException.getStatusCode it returns a Zero, but taking a
look to the TCP packets I realized what the server returns to me is a 304.

Any help or clue on making this work will be appreciated ^^

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



Re: Invoking GWT from outside the war

2010-06-16 Thread enTropy Fragment
SOLVED!

The same html page worked, I just had to add



To the gwt.xml

Almost got mad looking for this, hope it can help somebody else :f

2010/6/15 enTropy Fragment 

> Hello
>
> I am wondering if I can launch a GWT app from an html page wich is outside
> the GWT war app.
> In case it is possible, how can I manage to do it?
>
> I tried to copy the sample html that launches the GWT app in the project
> outside it and play a bit with it, but I didn't get far to be honest.
>
> Any help will be appreciated ^^
>
> That's the code that DOESN'T work
>
> 
> 
> 
> 
>  content="cat.udl.griho.AnalisiHeuristic.Main=cat.udl.griho.AnalisiHeuristic.Main">
> Main
> 
> 
> Sample html outside the war
> http://localhost:8084/AnalisiHeuristic/cat.udl.griho.AnalisiHeuristic.Main/cat.udl.griho.AnalisiHeuristic.Main.nocache.js</a>
> ">
>
> 
> 
>
>

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



Invoking GWT from outside the war

2010-06-15 Thread enTropy Fragment
Hello

I am wondering if I can launch a GWT app from an html page wich is outside
the GWT war app.
In case it is possible, how can I manage to do it?

I tried to copy the sample html that launches the GWT app in the project
outside it and play a bit with it, but I didn't get far to be honest.

Any help will be appreciated ^^

That's the code that DOESN'T work






Main


Sample html outside the war
http://localhost:8084/AnalisiHeuristic/cat.udl.griho.AnalisiHeuristic.Main/cat.udl.griho.AnalisiHeuristic.Main.nocache.js
">




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



Re: how to center a panel within another panel?

2010-05-30 Thread enTropy Fragment
I suggest you to re-think the use CellPanels (this includes VerticalPanel,
HorizontalPanel and almost every gwt Panel) to create the layout. They end
up being html tables and normally you don't want that. The cleanest approach
I found was to use only FlowPanels each one with their ID and then use CSS
to do the layout.

I hope it helped you

2010/5/29 kozura 

> You can place equal sized panels in the left/right (and/or top/bottom,
> not sure how you're trying to center) of the DockLayoutPanel, before
> adding the center panel.  The center panel will then be centered
> between them.  But note with the layout panel methodology, the center
> panel will take the full remaining width (height).  It won't take a
> widget and center it based on the size of its contents.
>
> On May 28, 12:22 pm, Magnus  wrote:
> > Hi,
> >
> > I use DockLayoutPanel as the RootPanel for my browser window. And I
> > want to place another "child" panel within the dockpanels center.
> >
> > Well, the child panel is always aligned to the upper left.
> >
> > How can I achieve that:
> >
> > a) the DockLayoutPanel really covers the whole browser window
> > b) the child panel is centered within the DockLayoutPanel's center
> > (but not resized)
> >
> > Thank you
> > Magnus
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Serializando classes Usando hibernate no GWT

2010-05-05 Thread enTropy Fragment
First things first. You should write in english so people can understand you
and help you. You should provide more technical info, instead or
additionally to irrelevant data. Your problem may be realated to the
Hibernate proxy. Try deactivating lazy objects

2010/5/3 polica 

> Não consigo mostrar uma lista referente a pedidos cadastros,
> utilizando hibernate no GWT
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Yet another post on centering a page(Standards mode)

2010-03-27 Thread enTropy Fragment
As far as I know the less you blur your code with theming stuff the better.
Using css will help you on maintaining everything, because the gwt code will
be cleaner and more meaningful :)

2010/3/27 Marcelo Sena 

> Hi, I'm trying to center things at a page:
> public void onModuleLoad() {
>DockLayoutPanel panelThatCenters = new DockLayoutPanel(Unit.PX);
>panelThatCenters.add(new Label("OLOLOLOLL"));
>panelThatCenters.setSize("100%", "100%");
>RootLayoutPanel.get().setSize("100%", "100%");
>RootLayoutPanel.get().add(panelThatCenters);
> }
>
> But this code seems to have no effect on the DockLayoutPanel, so I saw
> the RootLayout documentation an thought about this:
> public void onModuleLoad() {
>Label myLabel = new Label("^^");
>LayoutPanel p = new LayoutPanel();
>p.add(myLabel);
>p.setWidgetLeftWidth(myLabel, 50, Unit.PCT, 100, Unit.PCT);
>RootLayoutPanel rp = RootLayoutPanel.get();
>rp.add(p);
> }
>
> Is this the right way to do it? Would it be better to use css?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Making valid and accessible web pages with GWT

2010-03-26 Thread enTropy Fragment
I got the API url's from the wrong site. I'm using GWT 2.0 although I didn't
take a deep look at the changes from 1.7

Yes, I also mixed Accessibility stuff with Validation stuff in the mail, my
apologizes. I'd like my site to pass the validation but that's not a
priority. My priority list is accessibility > usability > validation.

Thanks for your responses

2010/3/25 Thomas Broyer 

>
>
> On Mar 24, 11:05 am, enTropy Fragment  wrote:
> > Hi!
> >
> > I am developing a web page that should be accesible. While working with
> GWT
> > I have discovered it is more focused in RIA than in creating standard and
> > good code. It is so open and powerfull that it still makes sense (to me)
> to
> > keep working with it so I just wanted to share with you the best
> practices I
> > found and the problems I could not solve yet to create a completely
> > acessible, valid and standard web. Would be nice to make this list grow
> as
> > there is almost no info about this on the Internet as far as I've found.
> >
> >- *Tables* - Almost all GWT Panels end up transformed in html tables,
> >this shouldn't happen
> >   - Affects to: All Panels that extend
> > *CellPanel<
> http://www.asquare.net/gwt/javadoc/1.0.21/src-html/com/google/gwt/use...>
>
> Er, are you *really* looking at the javadoc and source for of GWT
> 1.0.21 ???
> How about reading up-to-date things instead? e.g. http://gwt.google.com/
>
> >*(this includes
> > DockPanel<
> http://www.asquare.net/gwt/javadoc/1.0.21/com/google/gwt/user/client/...>
> >   , HorizontalPanel<
> http://www.asquare.net/gwt/javadoc/1.0.21/com/google/gwt/user/client/...>
> >   , VerticalPanel<
> http://www.asquare.net/gwt/javadoc/1.0.21/com/google/gwt/user/client/...>
> >   )
>
> AFAIK, at the time they were written that was the "easiest" solution
> to have a reliable rendering in all/most browsers without resorting to
> too much hacks. At that time, GWT wasn't at all "accessible" (it's
> slightly better now, as some widgets now set the appropriate ARIA
> role, such as PushButton, ToggleButton and CustomButton)
>
> >   - Solution I found: Use other panels, for instance
> > *FlowPanel*<
> http://www.asquare.net/gwt/javadoc/1.0.21/src-html/com/google/gwt/use..
> .>(wich
> >   becomes an html div) + some css for each panel
>
> Yes, or layout panels as pointed by Kozura.
>
> >- *Missing html elements* - There are some elements that are quite
> >important for creating an accessible web
> >   - Affects to: Ordered / Unordered lists. All the headings (tags
> )
> >   - Solution I found: Either implement them or use
> > *HTML*<
> http://www.asquare.net/gwt/javadoc/1.0.21/src-html/com/google/gwt/use...>
> >   instead
>
> I'd rather use an HTMLPanel and/or UiBinder. But they're not required
> for proper accessibility. AFAIK, Google Reader and GMail (among
> others) are pretty "accessible" and they don't use lists and titles.
> Appropriate ARIA roles and properties might be enough.
>
> >- *Missing TAG option* for
> > *Image*<
> http://www.asquare.net/gwt/javadoc/1.0.21/src-html/com/google/gwt/use...>-
> >This is a mandatory attribute for html images. setTitle claims to be
> the way
> >but in the end it becomes a "title="something"" instead of
> tag="something"
> >so it doesn't work
> >   - Affects to:
> > *Image<
> http://www.asquare.net/gwt/javadoc/1.0.21/src-html/com/google/gwt/use...>
> >   *
> >   - Solution I found: none
>
> (supposing you mean "alt" rather than "tag") it's been added recently
> though unfortunately was forgotten in the recent releases (will be in
> the next one):
>
> http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/client/ui/Image.java#541
>
> >- GWT adds script tags without a *type attribute*, wich prevents the
> web
> >pass the validation tests
>
> Which script elements are you talking about?
> And the type attribute is no longer required in HTML (starting with
> HTML5), as all browsers default to interpreting the script as
> JavaScript in this case.
> ...and validation is orthogonal to accessibility.
>
> >- GWT uses a *tabindex attribute* for the history iframe. This
> attribute
> >is not valid for html4.01 transitional so the web won't validate again
>
> same as above. validity != accessibility != usability. Y

Re: Making valid and accessible web pages with GWT

2010-03-25 Thread enTropy Fragment
I think I'll stay with FlowPanels + css for now... But thanks for the
setAttribute stuff!!! I didn't know this could be done!. Btw there was a
typo, where I said "tag" I meant to say "ALT" :P

2010/3/25 kozura 

> I've found the new LayoutPanel stuff to be much better for making
> predictable layout in any case, and, with the exception of Tree and
> decoratorpanels you can do everything without tables.  You have to
> switch to standards mode, so it requires switching everything at once
> in a preexisting app.
> http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#LayoutPanels
> talks all about it.
>
> As for image tag attributes, you can always do something like
> image.getElement().setAttribute("tag", "whatever").
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Making valid and accessible web pages with GWT

2010-03-24 Thread enTropy Fragment
Thanks for asking.
Didn't know about the new layouts, I'll take them a good look. I need the
web to be accessible since their target users will be people with diffrent
kinds of disabilities. I also like to work with standards. I understand
though that some errors are irrelevant.

What I really must do is avoid layout-generating tables and find a way to
associate the attribute TAG to an Image widget.

2010/3/24 kozura 

> I suppose it depends on your priority.  What is your purpose in GWT
> generated code passing this particular html validation?  Is the
> resulting application actually going to be more accessible if these
> were fixed, or is it just because somewhere says its good practice?
> Keep in mind the problem GWT is trying to solve, making highly
> efficient js code that works the same on all browsers, which means it
> uses whatever elements work best.  While it sounds good to be "valid
> and standard", I don't think anything listed above really matters for
> an AJAX app.  That said, if there's something that needlessly violates
> standards, then sure it should be fixed, but not at a high priority.
>
> And if you don't like GWT using tables to lay things out, look at the
> new LayoutPanels, which if used as shown in the documentation mostly
> gets rid of tables as layout elements.
>
> jk
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: gwt app partially loaded but user can interact

2010-03-24 Thread enTropy Fragment
He's trying to show you how to change the UI when everything is ready to be
showed. Simplifying, something like that

RootPanel.get().add(new LoadingPanel()); /* Displays a panel that shows a
"Loading..." message  */

// do all the stuff for loading the images, create the panels you want to
show and so
// when everything is loaded call update() method

public void update(Panel apanel){
 RootPanel.get().clear();
 RootPanel.get().add(apanel); // adds your already initialized panel :)
}

2010/3/24 mariyan nenchev 

> I'm not sure what you are trying to do :(.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Making valid and accessible web pages with GWT

2010-03-24 Thread enTropy Fragment
Hi!

I am developing a web page that should be accesible. While working with GWT
I have discovered it is more focused in RIA than in creating standard and
good code. It is so open and powerfull that it still makes sense (to me) to
keep working with it so I just wanted to share with you the best practices I
found and the problems I could not solve yet to create a completely
acessible, valid and standard web. Would be nice to make this list grow as
there is almost no info about this on the Internet as far as I've found.


   - *Tables* - Almost all GWT Panels end up transformed in html tables,
   this shouldn't happen
  - Affects to: All Panels that extend
*CellPanel
   *(this includes
DockPanel
  , 
HorizontalPanel
  , 
VerticalPanel
  )
  - Solution I found: Use other panels, for instance
*FlowPanel*(wich
  becomes an html div) + some css for each panel
   - *Missing html elements* - There are some elements that are quite
   important for creating an accessible web
  - Affects to: Ordered / Unordered lists. All the headings (tags )
  - Solution I found: Either implement them or use
*HTML*
  instead
   - *Missing TAG option* for
*Image*-
   This is a mandatory attribute for html images. setTitle claims to be the way
   but in the end it becomes a "title="something"" instead of tag="something"
   so it doesn't work
  - Affects to:
*Image
  *
  - Solution I found: none
   - GWT adds script tags without a *type attribute*, wich prevents the web
   pass the validation tests
   - GWT uses a *tabindex attribute* for the history iframe. This attribute
   is not valid for html4.01 transitional so the web won't validate again


Would be nice if you could share your own solutions, comment the ones I
proposed or extend the list with more problems! ^^'

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



Re: Coding dynamic parts with GWT

2010-03-23 Thread enTropy Fragment
You can also add listeners inside the bucle so every texBox can call a
different method when the inside value changes, for example :)

If you need the instances of the texboxes outside from the bucle, wich seems
your case, you can always create an ArrayList and add them to both the list
and the parent.

2010/3/23 rudolf michael 

> well this is easy dude.
> Onblur or onchange over the textbox that serves as an input, you catch that
> event and parse the input so you can get the desired number.
> after that you choose in which panel/parent node you want to create those
> textboxes and accordingly in your listener you can do :
> for(int i=0; i < number; i++)
> parent.add(new TextBox());
>
> if you want to have names for your textboxes then inside your loop you can
> do myTextBox.setName("myName"+i);
>
>
> On Tue, Mar 23, 2010 at 5:04 PM, Jochen Schnaidt 
> wrote:
>
>> Hi,
>> I have a question about coding dynamic parts with GWT. I already
>> searched for an answer, but didn’t find something which could help me.
>> May be I have the wrong keywords? I don’t know…
>>
>> So, the problem: My concept is that my application reads a integer
>> from a TextBox after the user wrote it in there e.g. 3 and then
>> creates 3 new TextBoxes.
>>
>> I read the 3 no problems and have it in a variable but now I want to
>> add the TextBoxes. In a scripting language I can build new objects and
>> give a “dummyname” + digit as name to it and use it normal but in Java
>> I can’t modify my variable’s name. So I need another method.
>>
>> I tried to make something like an array of TextBox but it didn’t work
>> out.
>>
>> So please help me with this. I don’t get it on my own. Thanks a lot.
>>
>> Greetings Jochen
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: Class Observer/Observable not emulated

2010-03-23 Thread enTropy Fragment
I already did a rudimentary implementation of this in my GWT projects for
the same reason (MCV pattern). Here they are, feel free to use them in any
way you want. It's not much what I have though :P

public interface Observer {
public void update();
}

public class Observable {
private List observers;

public synchronized void deleteObservers() {
getObservers().clear();
}

public synchronized void addObserver(Observer o) {
getObservers().add(o);
}

public synchronized int countObservers() {
return getObservers().size();
}

public synchronized void deleteObserver(Observer o) {
getObservers().remove(o);
}

private List getObservers() {
if(observers == null)
observers = new ArrayList();
return observers;
}

protected void broadcastObservers(){
for(Observer o: getObservers())
o.update();
}
}

2010/3/22 jcb 

>
> Thank you, interesting link !
>
>
> On Mar 22, 7:40 am, Nathan Wells  wrote:
> > Can't speak for the GWT team here, but this could be a reason:
> >
> > http://forums.sun.com/thread.jspa?threadID=5336733
> >
> > On Mar 20, 10:43 am, jcb  wrote:
> >
> >
> >
> > > I am very satisfied with gwt, and I am making a simple gwt app with
> > > just client side code.
> > > I  want to separate model and view, so I wanted to use the simple
> > > Observer/Observable classes of java.util but it is not emulated in GWT
> > > (cf. references).
> > > Someone know why these classes are not emulated ?
> >
> > > Of course it's not a big issue I can create similar classes in client
> > > side, but it seems a pity if we have to invent/copy again the wheel.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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