Wednesday, November 30, 2011

Re: Chrome 15, GWT DMP Plugin crashes

Was this issue ever fixed?  I'm getting it now after upgrading chrome to the dev channel and then reverting it back to the stable channel

--
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/-/_KUMVAXeM7EJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: BeanValidation JSR 303

Hello, Fabricio.

I try to use GWT validation (http://code.google.com/p/google-web-
toolkit/wiki/BeanValidation
, started from GWT 2.4.0). This package is
in EXPERIMENTAL state but I suppose it will be released soon (<1year).
There are some troubles with usage (I still cannot use 2 validators
per application, not all constraints can be used to validate beans -
@AssertTrue on properties are ignored, for example), but it is JSR-303
validation.

Sample from GWT - http://code.google.com/p/google-web-toolkit/source/browse/#svn%2Ftrunk%2Fsamples%2Fvalidation

There is another implementation of JSR-303 for GWT -
http://code.google.com/p/gwt-validation/w/list I have no experience
with this implementation.

Regards,
Alex.

On 30 ноя, 20:38, Fabricio Pizzichillo <fpizzichi...@gmail.com> wrote:
> Hello People.
> What do you recommend for DTO validation?
>
> Regards
> Fabricio

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

GWT Hyperlink not working

I'm getting a problem with a gwt hyperlink, in fact it is not working,
Ok, when I'm placing my cursor on the hyperlink, I cannot press on the
hyperlink, it is as if a label!! :

GWT Codes:

Hyperlink hprlnkArt = new Hyperlink("Art", false, "Interest=14");
grid.setWidget(0, 6, hprlnkArt);
grid.getCellFormatter().setStyleName(0, 6, "interestBarGridSlot");
hprlnkArt.setStyleName("interestBarIcons");

Corresponding CSS Styles:

.interestBarIcons
{
width:106px;
text-align:center;
}

.interestBarGridSlot
{
background:black;

}

.interestBarGridSlot a
{
color:white !important;
font-weight:bold;
font-size:17px;
}

.InterestTitle
{
font-size:20px;
font-Weight:bold;
}

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

Import ArrayList to Grid

Hi
I am having trouble importing an array list to a grid panel.
The issue is that the list gets imported but the elements are
displayed in a single row.
Example: [one, two, three, four]
I want the data to be in different rows.

I create the grid using a list store and column model.
Any help will be appreciated

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

Re: How to read properties at runtime

I think the closest you will get to what you need is to use a combination of Dictionary (http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/i18n/client/Dictionary.html) and Server side response to create that dictionary and load it to a globally scoped JS object. This would I think give you the run time look up you are looking for.

The idea would be to have some back-end service that reads say a property file and then respond to the client which would consequently build that Dictionary previously mentioned.

Disclaimer:

Wait before you start to implement it since I am not 100% sure. There might be a better way to do it.

Regards,

Alfredo

On Wed, Nov 30, 2011 at 2:19 PM, Ramesh <ramesh.v1210@gmail.com> wrote:
Hi,
I am using GWT com.google.gwt.i18n.client.Constants for reading
properties file in GWT. And using GWT.create to create instances for
these properties. Actually these values are read at GWT compile time.
But i want them to read at run time so that i need only to restart the
server when i change these properties. I googled for the solution but
nothing gave me an exact solution. Can some one please help me in
this.

Thanks in Advance...

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




--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton


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

Re: GWT Developer Plugin for Firefox 8

I got the file. works well! good job... keep it up. 

--
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/-/85mdDCq0NQIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT for mobile.

During the past few months I've seen a few projects that look promising in this area. All of which are using GWT. You can take a look at:



With all of these I believe if I am not mistaken that you will be able to use the existing back-end services and even share models that are used in both Server and the UI.

There are probably others so look around to see which one better matches what you need.

Best of luck.

Alfredo

On Wed, Nov 30, 2011 at 3:33 AM, svkirans <svkirans@gmail.com> wrote:
Hi,

  We are planning to use GWT as UI framework on top of Spring for our
large enterprise application which needs to run in an heterogeneous
environment. We want the application to run on IE 7, IE 8, IE 9,
Mozilla , Safari and chrome in different Operating Systems like
Windows and Mac.

GWT already proved to be good choice for cross browser desktop
applications and so we are ready to start using it.

But we are in dilemma about its capability to support browsers in
mobile devices of Android and i-OS. I know there is mobile version of
GWT, but that requires large amount of re-implementing the
application.

We want to reuse the same service for both the desktop and mobile
clients. I know there will be some price to pay in terms of GUI and
performance on mobile apps, but in short term until we get a a mobile
version native apps ready we are prepared to use the application in
browsers of the mobiles.

Please suggest if GWT can achieve this or is there scope for bigger
issues.

Thanks in advance.

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




--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton


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

Oops! This link appears to be broken.

I just deployed an application from eclipse to google app engine but i
got below error:-

Oops! This link appears to be broken.
Suggestions:
•Go to appspot.­com
•Search on Google:


This error I am facing from last many days. I created 2-3 application
identifiers but everytime I got same error. Is there any issue with
application or something else?

Application is build in GWT.

Please help me to resolve the issue.

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

GWT Widget in Designer with Database Specific Attributes

I am very new to all technologies surrounding GWT, so feel free to
point and laugh at the following question:

I want to build a listbox widget that has properties which will insert
items into (onModuleLoad) based upon rows returned from a MySQL
database query. The additional properties would be as follows:

databaseName
columnName
sqlQuery

These would then be associated with a method that executes the SQL
query through a database pool on a Geronimo (Tomcat) server. In other
words, they would be parameters passed to the server side method that
performs the call. I already have the appropriate server-side code to
accept the parameters.

I have modified a tutorial I found at IBM on how to communicate with
the database itself and have a small web page that confirms that I can
insert data into the database and retrieve it. I imported this
project into Eclipse and can see the widgets in the Designer
interface.

The MySQL database sits on a totally separate server and is made
accessible via a database pool on the Tomcat server.

What I want is to be able to create a listbox widget (and using this
as an example, other widgets), where I can drag them on to a panel in
GWT Designer, and set properties for an appropriate SQL query that
will populate the listbox (or other widget in an appropriate manner)
when it is loaded.

To me this seems like a very useful function as you only need to worry
about the database query used to initially populate the list. This
could be extended to any other widget whose initial value(s) could be
derived from a database. This is part of a "grander" vision of a
Design tool that masks the inherent complexity of this technology,
while still allowing the user to create sophisticated, data driven
user interfaces.

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

Re: GWT + EJB + MYSQL

Ok, I have got the reason for the exception.
I have got (cascade={CascadeType.PERSIST}) forgotten.

But how could I transfer for example the company object to my GWT Client Side?


--
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/-/cg0dTCK_dj4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

How can I trap for a 404 in my GWTTestCase?

Hi,

I'm using GWT 2.4. I'm trying to write a GwtTestCase that tests
clicking the submit button on my FormPanel. Currently, clicking on
the submit button results in a 404, but my test isn't failing. Here's
how I have my test set up ...

public void testClickSave() {
final FlowPanel flowPanel = new FlowPanel();
final ProductDetailsView productDetailsView = new
ProductDetailsView();
flowPanel.add( productDetailsView );
RootPanel.get().add(flowPanel);

xmlHelperService.getNode("weather.txt", new AsyncCallback<Node>() {

@Override
public void onSuccess(final Node node) {
// Pre-conditions for this test are that they are children and all
the
// children are of type="section".
assertTrue(!node.getChildren().isEmpty());
for (final Node child : node.getChildren()) {
assertEquals(NodeType.SECTION.toString(),
child.getAttributes().get(XmlToHtmlServiceImpl.TYPE_ATTR).getValue());
} // for

productDetailsView.add(node);
// Click the "Save" button.
final Button saveButton = getSaveButton(productDetailsView);
saveButton.click();

finishTest();
}

@Override
public void onFailure(Throwable caught) {
caught.printStackTrace(System.err);
fail(caught.getMessage());
finishTest();
}
});

delayTestFinish(delayFinishTime);
} // testClickSave


The call to "saveButton.click();" is where the 404 is happening. What
can I do to trap for the 404 and cause my test to fail? Thanks, -
Dave

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

Re: GWT + EJB + MYSQL

Thank you for your answer.

I use glassfish app server for my project, maybe there is something wrong?

To clarify my project structur:

Entities + SessionBean:


GWT Servlet:

http://pastebin.com/rSUSymNi

I have got a GWT Client Side where I temporally want to use POJOs from the EJB Project.
Then there is a GWT Servlet, which is there to communicate with my EJB Project.
At least I have got a EJB Project with my Session Beans for managing the Persistence Entities,
which should be able to be transferd to GWT Client Side. 
When I want to test if I could persist this little example, I got the following Exception:

http://pastebin.com/DEYjBrvY

Seems like I couldn`t use Transactionmanagement..
And how can I tell my GWT Project which Persistence Entities I have?




--
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/-/3SyK4WfTtK4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

How to read properties at runtime

Hi,
I am using GWT com.google.gwt.i18n.client.Constants for reading
properties file in GWT. And using GWT.create to create instances for
these properties. Actually these values are read at GWT compile time.
But i want them to read at run time so that i need only to restart the
server when i change these properties. I googled for the solution but
nothing gave me an exact solution. Can some one please help me in
this.

Thanks in Advance...

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

Re: Installing GWT plugin for Eclipse

Remove all dependences.
For your Win 7 64 bits, install JDK 6 '32' bits, eclipse JEE Indigo, gwt eclipse indigo 3.7.
Clear  environment variables.




Em 28 de novembro de 2011 16:07, Postholes <skullzporthos@gmail.com> escreveu:
I am having serious hair pulling type issues. When I search the web to
try to resolve the issue myself I just run into a whole mess of people
that seem to have very similar problems, Win 7 64bit OS, (any version
of Eclipse), and Java SDK 6. Nobody has posted a solution that helps
me. I have a project I have to do very soon and I can't get a simple
tool to work at the moment, hopefully everybody can understand my
frustration. I have tried everything that comes to mind, multiple new
installs of Eclipse, all versions, posted on the Eclipse forums and
still no help there either. I re-downloaded all of the new installs of
Eclipse, went through the GWT tutorial line by line and can't get
anywhere with the plugin. I have some screen shots but don't see a way
to include them in this email without posting links. The basic gist of
what's happening is:

Unable to read repository at http://dl.google.com/eclipse/plugin/3.7/content.jar.
Read timed out

I get this with windows firewall disabled, allowing Eclipse through,
from several different wifi locations, including my home network with
DMZ status set up for system and still cannot connect. When I tried
installing the WST for Eclipse and used the local install method for
the GWT it tries to go to an outside server with or without the "Check
for all updated software" button selected (didn't quote it exactly but
I think you know what I mean). After several minutes of nothing it
says unable to read repository.

I will attempt any suggestion at this point, even if it's something
I've done ad-nausea, because I am quite aware that I may be missing
something simple. As before I have found that this is a fairly common
issue, but never found a solution posted anywhere.

Please Help,

Postholes

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




--
[]'s
Samir Trajano Feitosa
"Quando a vida pregar uma peça em você, solte um sorriso bem engraçado. Assim o drama vira comédia e as lágrimas se tornam aplausos."
[Samir Trajano Feitosa]
Ciência da Computação UFCG

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

BeanValidation JSR 303

Hello People.
What do you recommend for DTO validation?

Regards 
Fabricio

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

Re: RequestFactory with() fetching info only for last item in list

Thanks, yes...looks that way.

--
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/-/EppdutAdJl8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: The requested URL was not allowed

Just been having this problem, I think.

I have an app at http://usavtestapp1.appspot.com/ and I only want my app available for my Google Apps users.

We already have our main website at our domain: http://utilitiessavings.co.uk - Can I host it on a subdomain or a subfolder of that domain? Am I getting this totally wrong? Does the app need its own domain, a different one to the Google Apps one?

Regards,

Drew

--
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/-/XsARbe0nzGYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: getOffsetHeight returns 0 although onload has been called

Absolutely brilliant, the deferred command worked like a charm.

Many thanks to all of you!
-G
-- "Please consider the environment before printing this e-mail"   The Newspaper Marketing Agency: Opening Up Newspapers:   http://www.nmauk.co.uk/   This e-mail and any attachments are confidential, may be legally privileged and are the property of NI Group  Limited (which is the holding company for the News International group, is registered in England under number 81701 and whose registered office is 3 Thomas More Square,  London E98 1XY, VAT number GB 243 8054 69),  on whose systems they were generated.  If you have received this e-mail in error, please notify  the sender immediately and do not use, distribute, store  or copy it in any way.  Statements or opinions in this e-mail or any attachment  are those of the author and are not necessarily agreed  or authorised by NI Group Limited or any member of its  group.  NI Group Limited may monitor outgoing or incoming  emails as permitted by law. It accepts no liability  for viruses introduced by this e-mail or attachments.  

--
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/-/x_-jcUPFoc0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: getOffsetHeight returns 0 although onload has been called

Unfortunately, I need the width and height of the area because I append that information on a url.

I will try the deferred command and let you know.


Many thanks,
G
-- "Please consider the environment before printing this e-mail"   The Newspaper Marketing Agency: Opening Up Newspapers:   http://www.nmauk.co.uk/   This e-mail and any attachments are confidential, may be legally privileged and are the property of NI Group  Limited (which is the holding company for the News International group, is registered in England under number 81701 and whose registered office is 3 Thomas More Square,  London E98 1XY, VAT number GB 243 8054 69),  on whose systems they were generated.  If you have received this e-mail in error, please notify  the sender immediately and do not use, distribute, store  or copy it in any way.  Statements or opinions in this e-mail or any attachment  are those of the author and are not necessarily agreed  or authorised by NI Group Limited or any member of its  group.  NI Group Limited may monitor outgoing or incoming  emails as permitted by law. It accepts no liability  for viruses introduced by this e-mail or attachments.  

--
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/-/RDqZBFHY9mcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: RequestFactory with() fetching info only for last item in list

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

--
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/-/OwGlzMZKRTEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT + EJB + MYSQL

If you use GWT-RPC every class that goes over the wire has to implement Serializable and must have a default constructor. Depending on your setup it can occur that the RemoteServiceServlet from GWT does not find the serialization policy file. So you should check your server logs to see if there are any serialization warnings.

Also if you are using an external server for GWT during development make sure that you first start dev mode and access your app. Then, when you got a SerializationException, redeploy your app to your external server and try it again. This ensures that your server always has the up-to-date version of the serialization policy file.

When I encounter SerializationExceptions I mostly forgot to add a default constructor to my classes. So check this first! ;-)

-- 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/-/q6HK4utLTgsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

RequestFactory with() fetching info only for last item in list

I have the following hierarchy

User (entity)
- List<Member> getMembers()
- List<Problem> getProblems()

Member (value)
- User getUser()

Now, if I fetch a User using with(... "members", "members.user.problems"), I'm getting the problems only for the last member in the list. I verified in the debugger that getUser() gets hit for all the members, but getProblems() gets hit only for the last member. Is the call for with() bad?

--
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/-/tgQjBiWNYO4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: getOffsetHeight returns 0 although onload has been called

You don't need getOffsetHeight to achieve what you want. There are two
solutions:

1. Use LayoutPanel instead of DockLayoutPanel. LayoutPanel allows you
to add two widgets that occupy the same space. If you don't specify
the position of each child widget, each child widget will occupy the
entire space available. From this moment all you need to do is hide
one of them depending on where users clicks.

2. When necessary, detach one widget and attach the other one. In each
case these widgets should pick up their size automatically from their
parent widget - there is no need to set their size explicitly as long
as you use widgets that support resize.

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

Re: getOffsetHeight returns 0 although onload has been called

getOffsetHeight/Width only returns a value other than 0 if the element has been successfully rendered by the browser (possibly including elements that have visibility:hidden css).

When you call DeckLayoutPanel.setWidget(w) the DeckLayoutPanel schedules a layout command which will be executed after all of your code has been executed and just before the browser takes back control (see: Scheduler.get().scheduleFinally()). I think this has been done because you could call DeckLayoutPanel.setWidget() multiple times in your code, but when your code is done, the necessary DOM operations will be executed only once.

You can force the DOM operations by calling DeckLayoutPanel.forceLayout() just after you have called DeckLayoutPanel.setWidget() and then try to do your calculations. But I am not quite sure if its enough. If not, your best bet is to defer your calculations until everything has been rendered by the browser:

final Panel p = ...
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
  public void run() {
    p.getOffsetHeight() ... //calculate your stuff
  }
});

Using a deferred command should definitely work.

-- 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/-/OdIl5VrlkJMJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

GWT + EJB + MYSQL

Hello,

I have got some Question concerning Serialization and persistence.
At First I have got a GWT project with Client code and a Servlet to communicate with
my EJB Project.
In the EJB project there are some Persistent Entitie Classes with references among each other and beans to manage them.
The Reference may look like this:
             Object A
              /        \
  Object B     Object C
                            \
                          Object D
Mostly there are 1:n Relationships, which i have to modelling with oneToMany or something like this..
I store them into a MYSQL Database which already work with Strings.
With Strings I haven't got Problems to transfer them from the GWT Client Side over the GWt Servlet to the EJB Bean and then into the Database and the same way back to the Client Side.
But when I try to transfer an own created Class object (POJO?) between GWT Client and EJB, I always get an Serialization Exception. 
Is it because of the GWT Servlet? I read something that you have to use DTo or Value Objects? Is this correct?
or isn't there a easy way to solve this?

--
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/-/cbDIKRBsKUgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: getOffsetHeight returns 0 although onload has been called

The problem is that I call getOffsetHeight/Width on a panel which belongs to a widget which has display property set to none. The display property is set to none because that widget is not currently displayed by the decklayoutpanel but it is attached to it, which is the desired behaviour.  

I am using firebug and chrome dev tools extensively. To use those tools, that means that your view is layed out in the browser so everything is fine. 

The DeckLayoutPanel sets disiplay: none to all its children apart from the one currently being displayed. I tried, to postpone the call to getOffsetHeight after deckLayoutPanel.setWidget(widget) but still returned 0.

Thanks, 
G << pulls his hair :( 
-- "Please consider the environment before printing this e-mail"   The Newspaper Marketing Agency: Opening Up Newspapers:   http://www.nmauk.co.uk/   This e-mail and any attachments are confidential, may be legally privileged and are the property of NI Group  Limited (which is the holding company for the News International group, is registered in England under number 81701 and whose registered office is 3 Thomas More Square,  London E98 1XY, VAT number GB 243 8054 69),  on whose systems they were generated.  If you have received this e-mail in error, please notify  the sender immediately and do not use, distribute, store  or copy it in any way.  Statements or opinions in this e-mail or any attachment  are those of the author and are not necessarily agreed  or authorised by NI Group Limited or any member of its  group.  NI Group Limited may monitor outgoing or incoming  emails as permitted by law. It accepts no liability  for viruses introduced by this e-mail or attachments.  

--
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/-/yWhVRKHQDakJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

displaying html with linked css and images?

I am trying to display html with linked css and images. I was
initially trying to use html widget, but realized that it is then a
challenge to display the referenced css and images.

The idea is that html will be imported into the system and then be
displayed and modified, so the main thing is referencing the html with
imported images.

Is there a preferred way to deal with accessing these kinds of
resources?

Thanks,
Lee

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

Re: Including Jars on server side only - causing client compile errors

Thanks for your message, put me on the right path to solve this.

My app wasnt compiling anymore on 2.4 (ok w/ 2.3). I "up-ped" the GWT (dev & user) libs in the "Order and Export" tab of the build path.

The order I use is :
JRE
my project src
validation
gwt dev
gwt user


Thanks 

Jerome

--
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/-/E1T5A6AGKl4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

How do I provide a key to public users ?

I'm creating a webapp.. I can access it locally but not from remote machine.
Chrome is givin me this error:

Uncaught java.lang.RuntimeException: The Maps API has not been loaded.
Is a <script> tag missing from your host HTML or module file?  Is the Maps key missing or invalid?

What should I look for ? I would be satified if it didn't even require a key..
Is there something I can do about it?

--
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/-/1lYMoxrRnA8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: MySql Connection Problem

I am new to GWT and Java programming in general. I have am using
Apache Geronimo to set up database pools. Once I understood how to
use them, my database connectivity issues went away.

Here is part 1 of a 2 part tutorial on GWT, Geronimo and MySQL:
http://www.ibm.com/developerworks/opensource/tutorials/os-ag-gwt1/

This tutorial is 4 years old, so you will have to change some of the
code to match your environment.

Michael

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

Re: Setup Database Access in Development Mode

I also fairly new to GWT. I found the following tutorial to be
helpful, however, it is 4 years old so you will have to modify some
code to make it work. I suggest downloading the project file and work
through the tutorial. You will need to change some things such as the
location of your GWT SDK. It is also specific to the use of Apache
Geronimo as an application server.

Part 1:
http://www.ibm.com/developerworks/opensource/tutorials/os-ag-gwt1/

Part 2:
http://www.ibm.com/developerworks/opensource/tutorials/os-ag-gwt2/

As far as testing connectivity to the database, you can test whether
or not your computer can connect to the database is to install the
Eclipse data tools plugins, if not already installed. The "Data
Source Explorer" allows you to set up a connection to your database
that will allow you to not only confirm that you can connect to it
from your workstation, but also provides schema information, etc.

If you want a pure JavaScript implementation of your database lookup,
you will need to use the xmlhttp function. Here's a good example of
its use:

http://www.w3schools.com/php/php_ajax_database.asp

This requires you to write some sort of code on the server side to
actually execute the SQL query and return the data. I used a Perl
script, but you can use any language you like. Making this work can
be a challenge at first and it has a lot more overhead than using an
application server and database pool (illustrated in the IBM tutorial
above).

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

Re: getOffsetHeight returns 0 although onload has been called

Make sure your widget is attached (check the attached property) before
requesting the widget for any dimensions.

Example: in my animation components I always first check that the
widget is attached as otherwise the animations are based on (most of
the time) incorrect dimensions as the browser didn't had time to
render them correctly.
This check overcomes a lot of 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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: where can i get the results of RequestContext's fire method?

You can either keep a reference to ctx2 and call persist() after the flush() of the editor driver; or you can cast the RequestContext returned by flush() and call persist on it (the returned RequestContext is the one you passed as an argument to edit(), so it's == ctx2).

Or you can enqueue the persist() method on the ctx2 *before* calling edit(), so that you just have to fire() after the flush().

It goes like this:
  • ctx2.edit(myProxy) → now ctx2 tracks changes to myProxy (actually, it only created a mutable version of it –and only one RequestContext can have a mutable version of a proxy at a given time–, the changes are not "tracked", the RequestContext only does a diff between the mutable proxy and the immutable proxy at the time of the fire()). You can call edit() several times for the same proxy on the same RequestContext, it will always return the same mutable proxy (you can also call edit() with the mutable proxy, it'll be returned without error).
    RequestFactoryEditorDriver#edit automatically calls RequestContext#edit so you don't have to do it yourself if you don't need it.
  • ctx2.persist(myProxy).with(paths).to(someReceiver) → enqueues into ctx2 an invocation to the "persist" method with argument "myProxy" (can be a mutable proxy or immutable proxy, edit() will automatically be called at the time of the fire()) and paths "paths", when the context will be fired and the server responds, the Receiver will be called with the invocation result (the return value on the server, converted to a client type).
  • ctx2.fire() → gets the changes of the edit()ed proxies and serializes them (this is known as "operations"), gets the enqueued invocations and serializes them, sends the batch to the server. On the server, operations are processed (calls find() on your domain object –or the locator– and then calls the setters from the operations), then invocations (each invocation can fail independently of the others; after each successful invocation, the "paths" sent from the client for the invocation are resolved on the return value), and then return values and server failures are serialized to be sent back to the client (in addition, for each domain object seen as input or output, their "liveness" is checked and can result in a "PERSIST operation" or "DELETE operation" serialized for the entity, then the versions are compared to the one sent by the client and if they don't match an "UPDATE operation" is serialized for the entity). On the client-side, proxies are deserialized, operations are turned into EntityChangeEvents, and then for each invocation, depending on their success on the server, the onSuccess or onFailure of the attached Receiver is called.
There are of course additional steps for onConstraintViolations and "global failure", but you get the general idea: when you persist() a proxy, it doesn't take a snapshot of its state, it only enqueues an invocation; the state will be taken at the time you call fire(), not before.

--
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/-/bWYhohNWCz0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: getOffsetHeight returns 0 although onload has been called

getOffsetHeight() of an element which display property was set to none will always return 0

--
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/-/0X-b56QdlBQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

GWT for mobile.

Hi,

We are planning to use GWT as UI framework on top of Spring for our
large enterprise application which needs to run in an heterogeneous
environment. We want the application to run on IE 7, IE 8, IE 9,
Mozilla , Safari and chrome in different Operating Systems like
Windows and Mac.

GWT already proved to be good choice for cross browser desktop
applications and so we are ready to start using it.

But we are in dilemma about its capability to support browsers in
mobile devices of Android and i-OS. I know there is mobile version of
GWT, but that requires large amount of re-implementing the
application.

We want to reuse the same service for both the desktop and mobile
clients. I know there will be some price to pay in terms of GUI and
performance on mobile apps, but in short term until we get a a mobile
version native apps ready we are prepared to use the application in
browsers of the mobiles.

Please suggest if GWT can achieve this or is there scope for bigger
issues.

Thanks in advance.

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

Re: Debugging application on external server

Hi,

To debug a remote server you have to :
 - start DevMode on your localhost,
 - connect to your remote server with the normal url
 - add "gwt.codesvr=localhost:9997" parameter to the url where 9997 is the port on witch DevMode is listening

As exemple if you have your app running on http://remoteServer/MyApp/Mapp.html and DevMode listening on 9997, you have to use http://remoteServer/MyApp/Mapp.html?gwt.codesvr=localhost:9997

Alexandre

2011/11/28 mariuszym <mariuszym@gmail.com>
Hi!

I'm new in GWT and I have annoying problem with GWT. I started develop
existing project (GWT module + EJB module) and I can't begin to debug
this.
Application is working on server Glassfish 2.1 (external server - not
on my localhost). I have ant script which deploying app on this
server, but I still have to compile and deploy. Application uses some
resources from server (jdbc connections, ldap realm), so I can't test
it on my localhost (Jetty or Glassfish).

I tried to change debug configuration in my Eclipse - now when I run
application in my console I have:
Could not connect to remote UI listening at localhost:8085. Using
default UI instead.

In development mode console I have:
00:00:25,623  [INFO] Paste http://externalServer:8085/MyApp/MyApp.html&gwt.codesvr=externalServer:-1
into a browser.
After paste I have error:
Plugin failed to connect to Development Mode server at
10.11.131.124:-1

I know that's wrong, but I have no more ideas how to configure. Is
there a way to run debug this application - I can't find any similiar
case on the forum.



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

Re: How to handle Browser History using UiBinder ?

Hi,

see http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html

Alexandre

2011/11/30 suresh babu <sureshgbabu85@gmail.com>
Thank you for your quick reply, so how can I manage history without using MVP framework.


On Tue, Nov 29, 2011 at 10:01 PM, Thomas Broyer <t.broyer@gmail.com> wrote:
UiBinder is about generating widget/layout code from XML, it has nothing to do with handling navigation within your app; i.e. instead of writing:

    this.textBox = new TextBox();
    this.textBox.setText("some text");
    this.textBox.addStyleName(cssResource.textbox());
    String textBoxPlaceholderId = HTMLPanel.createUniqueId();
    HTMLPanel htmlPanel = new HTMLPanel("<label class='" + cssResources.label() + "'>" + SafeHtmlUtils.htmlEscape(myConstants.label()) + " <span id='" + textBoxPlaceholderId + "'></span></label>");
    htmlPanel.addAndReplaceElement(textBox, textBoxPlaceholderId);

    initWidget(htmlPanel);

you simply write:
<g:HTMLPanel>
   <label class="{style.label}"><ui:msg from="{myConstants.label}"/> <g:TextBox ui:field="textBox">some text</g:TextBox></label>
</g:HTMLPanel>

It has really nothing to do with "handing token with history".

--
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/-/y5fJNj7KvDgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
Regards
Suresh Babu G



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

Tuesday, November 29, 2011

Seialisation

Hi There,

Any best practice for handling serialisation changes across the life cycle of your GWT project? I use rpc for my client - server communication and I have a semi live project which still see changes in the classes stored in database and passed using rpc.

Thanks for any advice,

Thomas

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

gwt

I started to create a login page .I created a sign in anchor when i
click on dat sign in link I need to go to sign in page .What can i do
for that?Should I create any new page for that??Please do reply

package com.gwt.sample.client;

import com.google.gwt.core.client.EntryPoint;


public class SampleApplication implements EntryPoint {
private Anchor anchor;

public void onModuleLoad() {
VerticalPanel mainPanel = new VerticalPanel();
anchor = new Anchor();
anchor.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {

}
});
anchor.setText("Sign in");
mainPanel.add(anchor);

}
}

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

Re: Loading inherited module 'com.google.gwt.i18n.I18N' and Unexpected error while processing XML

I compare file gwt-user-2.4.0.jar download in GWT site and other
download and put in my repository.
There are different!!!!!

It is a problem with my repository manager?
How can i resolve this problem?

Thanks for your help.

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

gwt

Iam new to gwt.Can anyone send me the source code of a login page
using rpc which transfers its control to one or more pages

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

Re: Issues of translating js dock to gwt implementation?

No very strong reasons.But it seems like this js code doesn't get
maintained anymore and a little bit old.The second reason is for code
clean,I don't like many calls between js and java.the third is that I
would rather to change java but js if some changes must be did in the
future.
On Tue, 2011-11-29 at 20:54 -0800, David Vree wrote:
> Is there some reason you chose to re-implement in Java instead of
> using JSNI to wrap the existing Javascript implementation?
>
>
> --
> 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/-/jif4vjWQQTcJ.
> To post to this group, send email to
> google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit
> +unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: How to handle Browser History using UiBinder ?

Thank you for your quick reply, so how can I manage history without using MVP framework.

On Tue, Nov 29, 2011 at 10:01 PM, Thomas Broyer <t.broyer@gmail.com> wrote:
UiBinder is about generating widget/layout code from XML, it has nothing to do with handling navigation within your app; i.e. instead of writing:

    this.textBox = new TextBox();
    this.textBox.setText("some text");
    this.textBox.addStyleName(cssResource.textbox());
    String textBoxPlaceholderId = HTMLPanel.createUniqueId();
    HTMLPanel htmlPanel = new HTMLPanel("<label class='" + cssResources.label() + "'>" + SafeHtmlUtils.htmlEscape(myConstants.label()) + " <span id='" + textBoxPlaceholderId + "'></span></label>");
    htmlPanel.addAndReplaceElement(textBox, textBoxPlaceholderId);

    initWidget(htmlPanel);

you simply write:
<g:HTMLPanel>
   <label class="{style.label}"><ui:msg from="{myConstants.label}"/> <g:TextBox ui:field="textBox">some text</g:TextBox></label>
</g:HTMLPanel>

It has really nothing to do with "handing token with history".

--
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/-/y5fJNj7KvDgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
Regards
Suresh Babu G



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

Re: Issues of translating js dock to gwt implementation?

Is there some reason you chose to re-implement in Java instead of using JSNI to wrap the existing Javascript implementation?

--
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/-/jif4vjWQQTcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: Request for comments on a custom framework

Hi...

El 29/11/11 17:50, Thomas Broyer escribió:
I haven't looked at the code yet (not easy to read code on mobile) but I wonder how you manage the case where an activity can be used totally distinct places? In our project for instance, we show the same activity for an IllustrationPlace and a LegendPlace (a legend being the use of an illustration within a file): we show the information about the illustration in both cases. 
The way things are wired up right now, there are a couple options:

1) Set the activity's generic Place parameter to a common ancestor of the places where it'll appear.

This could be the abstract class WebClientPlace, which is the ancestor of all places used in the framework, or it could be some other common ancestor lower down on the class hierarchy. In this case your activity could look like this:
public class SomeCommonActivityImpl         extends WebClientActivityBase<         SomeCommonView,         AncestorOfPlacesWhereThisActivityIsUsed,         SomeComponentProvidingCommonFunctionality>         implements SomeCommonActivity {   	[...] } 
Then, in the components that set up activity/view/ui-region bindings for the specific places where you want to use this activity, you'd just inject in an appropriate activity factory and bind it to a ui region, just like you'd do for any other activity. So you could have any number of components more or less like this:
public class SpecificPAVComponentImpl extends PlaceActivityViewComponentBase<         SpecificPAVComponent,         SpecificPlace>         implements         SpecificPAVComponent {      @Inject     public SpecificPAVComponentImpl(             SpecificPlaceProvider specificPlaceProvider,             ActivitiesFactory<AncestorOfPlacesWhereThisActivityIsUsed, SomeCommonActivity>                     someCommonActivitiesFactory, 	    [...]             ) {  	    super([...]);              addRegionAndActivitiesFactory(SomeUIRegion.class, someCommonActivitiesFactory);             [...]      } } 
Note that I haven't tried this yet, though I did think of this possibility, and in theory it would work.

Note also that if you do it this way, the return type of the getPlace() method available in your activity would be AncestorOfPlacesWhereThisActivityIsUsed. For cases where you want to deal with your place instance as something more specific, see option (2), below.

(Problems will arise if one needs to do this really a lot, and in many different ways, to the degree that the single-inheritance class hierarchy of Places becomes insufficient to express relevant commonalities and differences between places. Still, I'm sure the framework could be adapted to accommodate this---for example, rather than inheriting a common abstract Place class that inherits back to GWT's Place class, places could implement a common Place interface.)

2) Create an abstract class that provides the common functionality you need, and make specific activities that inherit it.

This does work in the framework as it stands, and it's what I'm using for common functionality in the banner region of our app. So I have a StandardBannerActivityBase class that can be inherited by other activities.

Many thanks again for your comments, suggestions, etc.!
- Andrew

Re: where can i get the results of RequestContext's fire method?

ok i'm getting a sense of a chicken & egg, where i'm the chicken.. and the egg is the request context, let me try overview the way i see it:

define an interface extending request context, said interface will various dao like method , like Request<Proxy> getById(int) and Request<Void) persist (proxy)

get the requestContext from the request factory (let's call it ctx1)

call a getter method like getById (int) on ctx1) and fire it

on it's reciver call the driver's edit method sending a the proxy and another call requestContext (ctx2)

after editing call the driver flush method which will return ctx2

now ctx2 contains the changes made to the proxy

but if i call fire on ctx2, it would fire the changes to.. where , i mean i don't have a reference to changed proxy.

unless your saying that after the original call to getById i should also call persist  method, cause now i'm feeling like the egg here..

--
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/-/SwTkqv4qFxsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Issues of translating js dock to gwt implementation?

I tried to translate this js
dock:http://safalra.com/web-design/javascript/mac-style-dock/ to gwt
implementation.Blow is the complete translation(almost translated line
by line),a little bit long,but logic is quite simple:MouseMove and
MouseOut were registered to each item in the bar.When mouse
move/out,icons size got updated based on a scale factor calculated
from/according to "distance" to current cursor position.The primary
scaling logic is handled by first lines of
functions:processMouseMove/Out(..),actually by timer.The questions
is :Timers:closeTimeout and closeInterval are set in MouseOut,and
are"delet" in MouseMove.But since MouseMove event will be fired just
after MouseOut event immediately,the operations set in MouseOut Timer
will not get executed.But js demo do work,so there are some errors in my
translation.And after 3 hours debugging,I can find them out.So, please
help me to point them out?Thanks. (if you want to run blow code,these
images must be put to war directory:)
http://safalra.com/web-design/javascript/mac-style-dock/mac-icon-160-full.png http://safalra.com/web-design/javascript/mac-style-dock/mac-icon-160.png http://safalra.com/web-design/javascript/mac-style-dock/mac-icon-80.png http://safalra.com/web-design/javascript/mac-style-dock/mac-icon-80-reflection.png

http://safalra.com/web-design/javascript/mac-style-dock/mac-icon-160-reflection.png


-------------------------------------
public class DockViewImpl extends Composite implements ClickHandler,
MouseMoveHandler,
MouseOutHandler
{
private Timer closeInterval = null;
// initialise the time-outs and intervals to 0
private Timer closeTimeout = null;

// create an array to store the DOM nodes of the icons
private final Image[] icons;;
// create an array to store the sizes of the icons
private final double[] iconSizes;
private final FlowPanel iconsNode = new FlowPanel();

private final ImageDetail[] imageDetails;
// create an array to store the DOM nodes of the icons
// private ImageElement[] images;
private final int maxSize;

// initialise the maximum width to 0
private int maxWidth;
private final int minSize;

private final FlowPanel node;

Timer openInterval = null;

private final int range;
// create an array to store the DOM nodes of reflections of the icons
private final Image[] reflectedIcons;

private FlowPanel reflectedIconsNode = new FlowPanel();
// initialise the scale factor to 0
private double scale = 0;

public DockViewImpl()
{
initWidget(node = new FlowPanel());
minSize = 80;
maxSize = 160;
range = 2;
int len = 8;
icons = new Image[len];
iconSizes = new double[len];
reflectedIcons = new Image[len];
imageDetails = new ImageDetail[len];
for (int i = 0; i < len; i++)
{
ImageDetail img = new ImageDetail();
img.setExtension(".png");
img.setName("mac-icon-");
img.setSizes(new int[] { 80, 160 });
imageDetails[i] = img;
}
loopOverImages();
node.add(iconsNode);
node.add(reflectedIconsNode);
}

private void loopOverImages()
{
for (int i = 0, len = imageDetails.length; i < len; i++)
{
// create and store a node for the icon for this image
Image icon = new Image();
icons[i] = icon;

// position the icon for this image relatively
icon.getElement().getStyle().setPosition(Position.RELATIVE);

// store the initial size of the icon for this image
iconSizes[i] = minSize;

// create and store a node for the reflected icon for this image
Image reflectedIcon = new Image();

reflectedIcons[i] = reflectedIcon;

// update the properties of the icon for this image
updateIconProperties(i);

// add the span for this image to the dock
iconsNode.add(icon);

// add the span for this image to the dock
reflectedIconsNode.add(reflectedIcon);

icon.addClickHandler(this);
icon.addMouseMoveHandler(this);
icon.addMouseOutHandler(this);
// loop over the sizes available for this image
// for (int j = 0; j < imageDetails[i].getSizes().length;
// j++){
//
// // create a DOM node containing this image at this size
// ImageElement image = document.createElement("img");
// image.setAttribute(
// "src",
// imageDetails[i).getName()
// + imageDetails[i).sizes[j]
// + imageDetails[i).getExtension());
// // add the DOM node to the array of stored images
// images.push(image);
// }
}
}

@Override
public void onClick(ClickEvent event)
{
Window.alert("You clicked the icon");
}

@Override
public void onMouseMove(MouseMoveEvent event)
{
processMouseMove(event);
}

@Override
public void onMouseOut(MouseOutEvent event)
{
processMouseOut();
}

/*
* Processes a mousemove event on an image in the 'dock'. The parameter
is:
* e - the event object. Window.event will be used if this is
undefined.
*/
private void processMouseMove(MouseMoveEvent e)
{
// clear the closing interval and time-out
if (closeTimeout != null)
{
closeTimeout.cancel();
closeTimeout = null;
}
if (closeInterval != null)
{
closeInterval.cancel();
closeInterval = null;
}

// check that the opening interval is required but does not yet exist
// System.out.println("scale:"+scale
+"---openInterval:"+(openInterval==null?"null":"nonull"));
if (scale != 1 && openInterval == null)
{
// create the opening interval
openInterval = new Timer()
{
public void run()
{
if (scale < 1)
{
scale += 0.125;
}
if (scale >= 1)
{
scale = 1;
openInterval.cancel();
openInterval = null;
}
for (int i = 0, size = icons.length; i < size; i++)
{
updateIconProperties(i);
}
}
};
openInterval.scheduleRepeating(20);

// set the event object if the browser does not supply it
// if (!e)
// e = Window.event;

// find the DOM node on which the mouseover event occured
// var target = e.get;

// obtain the index of the icon on which the mouseover event occured
int idx = 0;
while (icons[idx] != e.getSource())
idx++;

// obtain the fraction across the icon that the mouseover event
// occurred
double across = e.getX() / iconSizes[idx];

// check a distance across the icon was found (in some cases it will
// not be)
if (across != 0)
{
// initialise the current width to 0
int currentWidth = 0;

// loop over the icons
for (int i = 0, len = icons.length; i < len; i++)
{
// check whether the icon is in the range to be resized
if (i < idx - range || i > idx + range)
{
// set the icon size to the minimum size
iconSizes[i] = minSize;
} else if (i == idx)
{
// set the icon size to be the maximum size
iconSizes[i] = maxSize;
} else
{
// set the icon size to the appropriate value
iconSizes[i] = minSize
+ Math.round((maxSize - minSize - 1)
* (Math.cos((i - idx - across + (i < idx ? 1 : 0)) / range
* Math.PI) + 1) / 2);

// add the icon size to the current width
currentWidth += iconSizes[i];
}

}

// update the maximum width if necessary
if (currentWidth > maxWidth)
maxWidth = currentWidth;

// detect if the total size should be corrected
if (idx >= range && idx < iconSizes.length - range && currentWidth <
maxWidth)
{
// correct the size of the smallest magnified icons
iconSizes[idx - range] = iconSizes[idx - range] +
Math.floor((maxWidth - currentWidth) / 2);
iconSizes[idx + range] = iconSizes[idx + range] +
Math.ceil((maxWidth - currentWidth) / 2);
}

// update the sizes of the images
for (int i = 0, len = icons.length; i < len; i++)
updateIconProperties(i);
}
}
}

// Processes a mouseout event on an image in the dock.
private void processMouseOut()
{
// check that neither the closing interval nor time-out are set
if (closeTimeout == null && closeInterval == null)
{
// create the closing time-out
closeTimeout = new Timer()
{
public void run()
{
closeTimeout = null;
if (openInterval != null)
{
openInterval.cancel();
openInterval = null;
}
closeInterval = new Timer()
{
public void run()
{
if (scale > 0)
{
scale -= 0.125;
}
if (scale <= 0)
{
scale = 0;
closeInterval.cancel();
closeInterval = null;
}
for (int i = 0, len = icons.length; i < len; i++)
{
updateIconProperties(i);
}
}
};
closeInterval.scheduleRepeating(20);
}
};
closeTimeout.schedule(100);
}
}

/*
* Sets a toolbar image to the specified size. The parameter is: index
- the
* 0-based index of the image to be sized
*/
private void updateIconProperties(int index)
{
// determine the size for the icon, taking into account the scale
factor
double size = minSize + scale * (iconSizes[index] - minSize);

// find the index of the appropriate image size
int sizeIdx = 0;
ImageDetail image = imageDetails[index];
int[] sizes = image.getSizes();
while (sizes[sizeIdx] < size && sizeIdx + 1 < sizes.length)
{
sizeIdx++;
}

// check whether the full icon with its caption should be displayed
String name = image.getName();
String extension = image.getExtension();
// HP change to iconStyle
Element iconElem = icons[index].getElement();
// set the src attribute of the image for the icon
iconElem.setAttribute("src", name + ((size == maxSize) ? maxSize +
"-full" : sizes[sizeIdx]) + extension);

// set the width and height of the image for the icon and its
reflection
Style style = iconElem.getStyle();
setStyle(style, size);
style.setMarginTop(maxSize - size, Unit.PX);
// HP change to reflectIconStyle
Element reflectIconElem = reflectedIcons[index].getElement();
// set the src attribute of the image for the icon's reflection
reflectIconElem.setAttribute("src", name + sizes[sizeIdx] +
"-reflection" + extension);
setStyle(style = reflectIconElem.getStyle(), size);
style.setMarginBottom(maxSize - size, Unit.PX);
}

private void setStyle(Style style, double size)
{
style.setWidth(size, Unit.PX);
style.setHeight(size, Unit.PX);
}
}

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

Re: how to resolve the cross-domain problem in gwt?

.............

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

Re: Request for comments on a custom framework

I haven't looked at the code yet (not easy to read code on mobile) but I wonder how you manage the case where an activity can be used totally distinct places? In our project for instance, we show the same activity for an IllustrationPlace and a LegendPlace (a legend being the use of an illustration within a file): we show the information about the illustration in both cases.

--
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/-/Ge5R8keExm0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Submitting form and getting annoying "<pre>" tags in the response

To render text/plain, browsers "convert" it to HTML with <pre> tags. This is why the doc for FormPanel says to use text/html.

--
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/-/TWmoaLBdFzEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.