Re: Ignoring unresolvable annotation type

2011-06-01 Thread randasin
I don't plan to use or check the annotation in GWT context so I am ok
if GWT ignores it.  MyObject is still compiled and I can use it in
Async requests, right?

The reason I have the annotation is the classes are also used in
another web service project, which utilizes the annotation.

Just wondered if there is way to get rid of the warning.


On Jun 1, 4:24 pm, Adolfo Panizo Touzon 
wrote:
> As you know, GWT is not pure Java, so you can´t use some things.
>
> One way to solve these problem is including a library for reflection (see
> gwt-ent in google).
>
> 2011/6/1 randasin 
>
>
>
>
>
>
>
>
>
> > I have one annotation and one object.
>
> > com.example.model.shared.MyAnnotation
> > com.example.model.shared.MyObject
>
> > MyObject is declared with MyAnnotation:
>
> > @MyAnnotation
> > public class MyObject {
> > ...
> > }
>
> > When I compile, I am getting this warning
>
> > [java]    Resolving com.example.model.shared.MyObject
> > [java]       Found type 'com.example.model.shared.MyObject'
> > [java]          [WARN] Ignoring unresolvable annotation type
> > com.example.model.shared.MyAnnotation
>
> > The compilation still succeeded, but I wonder what side effects are
> > there?  How do I resolve this warning?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> El precio es lo que pagas. El valor es lo que recibes.
> Warren Buffet

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



Ignoring unresolvable annotation type

2011-06-01 Thread randasin
I have one annotation and one object.

com.example.model.shared.MyAnnotation
com.example.model.shared.MyObject

MyObject is declared with MyAnnotation:

@MyAnnotation
public class MyObject {
...
}

When I compile, I am getting this warning

[java]Resolving com.example.model.shared.MyObject
[java]   Found type 'com.example.model.shared.MyObject'
[java]  [WARN] Ignoring unresolvable annotation type
com.example.model.shared.MyAnnotation

The compilation still succeeded, but I wonder what side effects are
there?  How do I resolve this warning?

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



Re: JsonpRequestBuilder onFailure

2010-06-23 Thread randasin
nevermind just found the API

http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/jsonp/client/JsonpRequestBuilder.html#setFailureCallbackParam%28java.lang.String%29

On Jun 23, 9:42 am, randasin  wrote:
> I just start using JsonpRequestBuilder.  I understand for the most
> part what to return for a successful response,  but under what
> circumstances is AsyncCallback.onFailure method invoked?  In other
> words, what should I return in my JSON response (on the server side)
> to indicate a failure?

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



JsonpRequestBuilder onFailure

2010-06-23 Thread randasin
I just start using JsonpRequestBuilder.  I understand for the most
part what to return for a successful response,  but under what
circumstances is AsyncCallback.onFailure method invoked?  In other
words, what should I return in my JSON response (on the server side)
to indicate a failure?

-- 
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: JSNI reference in iframe

2010-06-22 Thread randasin
another iframe

The setup is like this:
domain1/page1 has an iframe that loads domain2/page2
domain2/page2 has the GWT module.

In other words DOM looks like:
domain/page1
iframe (domain/page2)
iframe (gwt)

The module has the JSNI code that is intended to register a function
in page2 so other none-gwt components (again in page2) can use,
something like

$wnd.myfunc = function() {...}

And in my HTML, I do





I know it feels like I am trying to some cross site stuff between
page1 and page2, but I am not.  Page1 is simply a wrapper for
displaying page2.  All GWT and JSNI codes are intended to use within
Page2 alone.  That's where I am having problem.  I think because GWT
itself is in iframe and $wnd is intended to get top window, it works
in most cases when the host page is in the top window and on the same
domain.  But my hostpage is an iframe and different domain.

Right now my workaround is to declare a new javascript object on
page2, like

var myfuncHelper = new Object();

then my JSNI looks like

$wnd.myfuncHelper.myfunc = function() {...}

and the onclick="myfuncHelper.myfunc()"

That works.  I am wondering if there is better implementation though.


On Jun 22, 1:29 pm, Olivier Monaco  wrote:
> The iframe is the GWT iframe or another one? Do you have a usecase ?
>
> Olivier
>
> On 22 juin, 18:37, randasin  wrote:
>
> > I have some JSNI code that assign a function to a variable in the
> > window as suggested in JSNI document: Calling a Java Method from
> > Handwritten JAvascript (http://code.google.com/webtoolkit/doc/latest/
> > DevGuideCodingBasicsJSNI.html#calling)
>
> > The problem is if the JSNI code runs inside an iframe, then the
> > function is registered in the top window, and I get a Object expected
> > (or Object is null) script error on IE.
>
> > How could I make sure the function is registered in the iframe, and
> > not to the window?

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



JSNI reference in iframe

2010-06-22 Thread randasin
I have some JSNI code that assign a function to a variable in the
window as suggested in JSNI document: Calling a Java Method from
Handwritten JAvascript (http://code.google.com/webtoolkit/doc/latest/
DevGuideCodingBasicsJSNI.html#calling)

The problem is if the JSNI code runs inside an iframe, then the
function is registered in the top window, and I get a Object expected
(or Object is null) script error on IE.

How could I make sure the function is registered in the iframe, and
not to the window?

-- 
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: Error: Permission denied for to get property Location.href from .

2010-06-22 Thread randasin
Created a bug report:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5049&q=same%20origin%20policy%20violation

On Jun 22, 10:32 am, randasin  wrote:
> It's this line on hosted.html in GWT bootstrap process that causes SOP
> violation
>
> Line 227: var url = topWin.location.href;
>
> I am guessing GWT only uses hosted.html in DevMode.  That's why there
> is no violation in web mode?
>
> Does anyone have insights on a workaround?

-- 
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: Error: Permission denied for to get property Location.href from .

2010-06-22 Thread randasin
It's this line on hosted.html in GWT bootstrap process that causes SOP
violation

Line 227: var url = topWin.location.href;

I am guessing GWT only uses hosted.html in DevMode.  That's why there
is no violation in web mode?

Does anyone have insights on a workaround?

-- 
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: Error: Permission denied for to get property Location.href from .

2010-06-22 Thread randasin
Ok I confirmed it's not SOP violation in my design.  The script runs
fine in web mode.  It's only considered a violation in host/
development mode.

I am not sure how to configure the DevMode to get around the
violation.  Any thoughts would be appreciated.

On Jun 22, 10:07 am, randasin  wrote:
> It shouldn't violated SOP since PageA really has nothing to do with
> PageB.
>
> PageA just displays PageB in an iframe.  PageB scipts should do their
> work in the context of host page B.  and I have no intention to
> violate SOP.  But I don't know GWT bootstrap well enough to understand
> what hosted.html gwtOnLoad function is doing that causes the
> violation?  Feels like a bug.
>
> Did I misunderstand SOP?
>
> On Jun 22, 9:52 am, Jeff  wrote:
>
> > Hi,
>
> > I don't want to say stupidities, but isn't it a violation of the SOP
> > (Same Origin Policy)?
> > If so, i recommend you to have a look 
> > herehttp://en.wikipedia.org/wiki/Same_origin_policy
> > and herehttp://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_SOP
>
> > Regards,
> > Jeff
>
> > On 22 juin, 15:41, randasin  wrote:
>
> > > I have two pages, the first page contains an iFrame that loads the
> > > second page.  The two pages are on different hosts.  The GWT
> > > application runs in the second page.  To be more precise,
>
> > > let the first page = PageA, and the second page = PageB
>
> > > - PageA is on Domain1. It has iFrame src points to PageB
> > > - PageB is on Domain2.  It has my GWT application.
>
> > > When I go to PageA, FireFox gives me this error
>
> > > Error: Permission denied for  to get property Location.href
> > > from .
> > > Source File: /hosted.html?
> > > Line: 227
>
> > > I tried adding xs linker () to my module xml;
> > > it doesn't seem to work.  I am not sure if I am using it correctly.
> > > Does anyone know of a solution to this issue?  Any thoughts would be
> > > appreciated.
>
> > > Also I would appreciate if someone can refer me the location of the
> > > official GWT documentation on cross site linker.  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-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: Error: Permission denied for to get property Location.href from .

2010-06-22 Thread randasin
It shouldn't violated SOP since PageA really has nothing to do with
PageB.

PageA just displays PageB in an iframe.  PageB scipts should do their
work in the context of host page B.  and I have no intention to
violate SOP.  But I don't know GWT bootstrap well enough to understand
what hosted.html gwtOnLoad function is doing that causes the
violation?  Feels like a bug.

Did I misunderstand SOP?

On Jun 22, 9:52 am, Jeff  wrote:
> Hi,
>
> I don't want to say stupidities, but isn't it a violation of the SOP
> (Same Origin Policy)?
> If so, i recommend you to have a look 
> herehttp://en.wikipedia.org/wiki/Same_origin_policy
> and herehttp://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_SOP
>
> Regards,
> Jeff
>
> On 22 juin, 15:41, randasin  wrote:
>
> > I have two pages, the first page contains an iFrame that loads the
> > second page.  The two pages are on different hosts.  The GWT
> > application runs in the second page.  To be more precise,
>
> > let the first page = PageA, and the second page = PageB
>
> > - PageA is on Domain1. It has iFrame src points to PageB
> > - PageB is on Domain2.  It has my GWT application.
>
> > When I go to PageA, FireFox gives me this error
>
> > Error: Permission denied for  to get property Location.href
> > from .
> > Source File: /hosted.html?
> > Line: 227
>
> > I tried adding xs linker () to my module xml;
> > it doesn't seem to work.  I am not sure if I am using it correctly.
> > Does anyone know of a solution to this issue?  Any thoughts would be
> > appreciated.
>
> > Also I would appreciate if someone can refer me the location of the
> > official GWT documentation on cross site linker.  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-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: Error: Permission denied for to get property Location.href from .

2010-06-22 Thread randasin
Actually since my application has multiple segments, I cannot use
cross site linker.

PageA really has nothing to do with the script, but it seems GWT
hosted.html tries to get Location.href from the parent window rather
than the iFrame.


On Jun 22, 9:41 am, randasin  wrote:
> I have two pages, the first page contains an iFrame that loads the
> second page.  The two pages are on different hosts.  The GWT
> application runs in the second page.  To be more precise,
>
> let the first page = PageA, and the second page = PageB
>
> - PageA is on Domain1. It has iFrame src points to PageB
> - PageB is on Domain2.  It has my GWT application.
>
> When I go to PageA, FireFox gives me this error
>
> Error: Permission denied for  to get property Location.href
> from .
> Source File: /hosted.html?
> Line: 227
>
> I tried adding xs linker () to my module xml;
> it doesn't seem to work.  I am not sure if I am using it correctly.
> Does anyone know of a solution to this issue?  Any thoughts would be
> appreciated.
>
> Also I would appreciate if someone can refer me the location of the
> official GWT documentation on cross site linker.  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-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.



Error: Permission denied for to get property Location.href from .

2010-06-22 Thread randasin
I have two pages, the first page contains an iFrame that loads the
second page.  The two pages are on different hosts.  The GWT
application runs in the second page.  To be more precise,

let the first page = PageA, and the second page = PageB

- PageA is on Domain1. It has iFrame src points to PageB
- PageB is on Domain2.  It has my GWT application.

When I go to PageA, FireFox gives me this error

Error: Permission denied for  to get property Location.href
from .
Source File: /hosted.html?
Line: 227

I tried adding xs linker () to my module xml;
it doesn't seem to work.  I am not sure if I am using it correctly.
Does anyone know of a solution to this issue?  Any thoughts would be
appreciated.

Also I would appreciate if someone can refer me the location of the
official GWT documentation on cross site linker.  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-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.



import cannot be resolved...NOT

2010-05-06 Thread randasin
We use Ant to build GWT project.  Occasionally our developers write
code comments using {...@link ...} syntax to link to a class outside of
the designated client package, thus insert a "import" statement that
causes the notorious "The import ... cannot be resolved" ERROR.  That
is what we expected, and the fix is easy enough; simply remove the
import.

What's interesting and we don't understand is that when we manually
run the same build.xml in Eclipse, we don't get this error and
everything compiles fine.  It's like the Ant in Eclipse completely
ignore the import statement.  Looking at jars included in Eclipse 3.5,
it's using Ant 1.7.1, which is the same version installed on our auto
build server.

This causes a minor problem in that developers will accidentally check
in codes that won't compile on automation server.

Here is a segment of our build script:












Has anyone encountered similar issue?Any thoughts would 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-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.



$doc.getElementById(cJc).click() is not a function

2010-04-15 Thread randasin
Trying to click a button, I wrote a JSNI call like this

public native void clickAddButton() /*-{
$doc.getElementById("addButton").click();
}-*/;

It works on IE7, but on Firefox, I get an error
"$doc.getElementById(cJc).click() is not a function"

I feel like it's a very simple mistake on my part that I just can't
see.  Can somebody help me out please?

Actually it would be great if somebody could show me an example of how
to click a button (button declared in HTML, not GWT button) without
using JSNI at all.

Any thoughts would be appreciated.  Using GWT 2.0.3.

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