Hi,

 My need is like cross-site implementation. Actually I have an HTML which
 display two buttons.Please make a note here that this HTML(external) could
 not be included in GET component.

 On click of buttons , I wanted to call GET component.

 My approach is to call a java native method with some parameter written in
 GET java file , where onModuleLoad is there on the click of Buttons.  My
 native method works well if we run GET separately.But when i go for
 integration with HTML
 this does not wrk. Now I compile the GET code using xs linker and included
 no-cache.js in my external HTML. I expect to make a call to GET java JSNI
 method. Months back I have tried , I succeeded. But currently this is not.
 I don't what I am missing.

 One markable point is that moths back I got my native method inside
 no-cache.js.

 Please let us know if anybody is having any alternative approach or can
 help me out.

 Manish
----- Original Message ----- 
>> From: "Manuel Carrasco" <[EMAIL PROTECTED]>
>> To: "Google Web Toolkit" <[email protected]>
>> Sent: Thursday, November 20, 2008 10:49 PM
>> Subject: Re: Fw: how to work with xs-linker in gwt
>>
>>
>>
>> I dont understand what exactly you want.
>>
>> Any way, basically the only difference between the standard and the
>> cross-site compiler is:
>> - std compiler generates files 'xxx.cache.html' (javascript is inside
>> a <script> tag). This files are inserted in an iframe by the
>> xxx.no.cache.js. This doesnt work if the  xxx.cache.html cames from a
>> domain different of your application.html.
>> - xd compiler generates files 'xxx.cache.js' that 'xxx.no-cache.js'
>> inserts in your page creating a javascript link. This technique works
>> for cross-site.
>>
>> I think , the main reason for using the standard compiler is because
>> some browser versions (IE) dont work fine with gziped js.
>>
>>
>> Manolo
>>
>>
>>
>> On Nov 20, 3:08 pm, "Manish Kumar" <[EMAIL PROTECTED]> wrote:
>>> Hi
>>>
>>> Thanks eggsy for a alternative.I ll take try on this.
>>>
>>> I have already added "xs" linker and then compile the GWT source.
>>>
>>> After that I am using compiled code in our HTML( including no-cache.js )
>>> for
>>> calling JNSI method call.
>>>
>>> Actually a couple of months back, I got succeeded in same way but this
>>> time
>>> i am not. The most crucial point for me is that time i was able to see 
>>> my
>>> JSNI java
>>> method in no-cache.js which this time it's not.
>>>
>>> Please let us know if i am wrong in approach or anybody having any
>>> alternative.
>>>
>>> Regards
>>> Manish
>>>
>>> ----- Original Message -----
>>> From: "Manuel Carrasco" <[EMAIL PROTECTED]>
>>> To: "Google Web Toolkit" <[email protected]>
>>> Sent: Thursday, November 20, 2008 5:57 PM
>>> Subject: Re: Fw: how to work with xs-linker in gwt
>>>
>>> Include this line in your module.gwt.xml file
>>>
>>> <add-linker name="xs"/>
>>>
>>> On Nov 20, 11:22 am, "Manish Kumar" <[EMAIL PROTECTED]> wrote:
>>> > Hi guys,
>>>
>>> > Please help me out if anybody having any idea on the issue mentioned
>>> > below
>>> > ??
>>>
>>> > Regards,
>>> > Manish
>>>
>>> > ----- Original Message -----
>>> > From: Manish Kumar
>>> > To: [email protected]
>>> > Sent: Wednesday, November 19, 2008 6:17 PM
>>> > Subject: Re: how to work with xs-linker in gwt
>>>
>>> > Hi,
>>>
>>> > As asked , please have a look at my code :
>>>
>>> > GWT :
>>>
>>> > public void onModuleLoad(){
>>>
>>> > try
>>>
>>> > {
>>>
>>> > exportStaticMethod(this);
>>>
>>> > }
>>>
>>> > catch(Exception re)
>>>
>>> > {
>>>
>>> > MessageBox.alert(re.getMessage());
>>>
>>> > }
>>>
>>> > }
>>>
>>> > public native void exportStaticMethod(PMGWTHtmlUtils pmGWTHtmlUtils)
>>>
>>> > /*-{
>>>
>>> > $wnd.invokeGWT = function(bId,cId,mId,mName,cName)
>>>
>>> > {
>>>
>>> > [EMAIL 
>>> > PROTECTED]::invokeGWT(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)(bId,cId,mId,mName,cName);
>>>
>>> > };
>>>
>>> > if($wnd.callGWTUtils){
>>>
>>> > $wnd.callGWTUtils();
>>>
>>> > }
>>>
>>> > }-*/;
>>>
>>> > public void invokeGWT( String bId,String cId,String mId,String
>>> > mName,String cName ) throws RequestException {
>>>
>>> > System.out.println( " xxxxxxxxxxxxxxxxxxxxxxxxxxxx :"+ bId);
>>>
>>> > if(bId.equalsIgnoreCase("new"))
>>>
>>> > {
>>>
>>> > window = new Window();
>>>
>>> > BorderLayoutData centerData = new
>>> > BorderLayoutData(RegionPosition.CENTER);
>>>
>>> > window.setTitle("Layout Window");
>>>
>>> > //window.setClosable(true);
>>>
>>> > window.setWidth(600);
>>>
>>> > window.setHeight(500);
>>>
>>> > window.setPlain(true);
>>>
>>> > window.setLayout(new BorderLayout());
>>>
>>> > window.add(createAddCommentForm( "c0","c7","Test Process
>>> > Model","process
>>> > overview") ,centerData);
>>>
>>> > //window.setCloseAction(Window.HIDE);
>>>
>>> > window.show();
>>>
>>> > }
>>>
>>> > else if(bId.equalsIgnoreCase("view"))
>>>
>>> > {
>>>
>>> > String destUrl = PMServerUrl + "processmaster/comments/"+mName+".xml";
>>>
>>> > doViewCommentRequest(destUrl);
>>>
>>> > }
>>>
>>> > }
>>>
>>> > After compiling the gwt component using xs linker , I am trying to use
>>> > this in HTML stuffs :
>>>
>>> > <script type="text/javascript" src="../js/pmxslutils.js"></script>
>>>
>>> > <script language="javascript"
>>> > src="com.pm.output.html.gwt.model.comment.PMGWTHtmlUtils.nocache.js"></script>
>>>
>>> > // pmxslutils.js
>>>
>>> > function callGWTUtils( bttnId ) // This method id called on button
>>> > click
>>> > on HTML.
>>> > {
>>> > if( currDispId != null )
>>> > {
>>> > invokeGWT(
>>> > bttnId,this.currDispId,this.mId,this.mName,this.currDispName );// This
>>> > is
>>> > the vative method.
>>> > }
>>>
>>> > }
>>>
>>> > Please let us know if this does not make sense.
>>>
>>> > Regards,
>>> > Manish
>>> > ----- Original Message -----
>>> > From: "eggsy84" <[EMAIL PROTECTED]>
>>> > To: "Google Web Toolkit" <[email protected]>
>>> > Sent: Wednesday, November 19, 2008 4:50 PM
>>> > Subject: Re: how to work with xs-linker in gwt
>>>
>>> > Can you share any code? I'm not too clear on what you're trying to do?
>>>
>>> > On Nov 19, 9:53 am, "Manish Kumar" <[EMAIL PROTECTED]> wrote:
>>> > > Hi,
>>>
>>> > > I am trying the same, But unfortunately this does not work.
>>> > > Please have a check on my approach , Though I am not suspected.
>>>
>>> > > I have put my compiled code in my required directory and
>>> > > included nocache.js to html stuffs then i am calling a native
>>> > > function defined in GWT component.This does not make a call to
>>> > > respective function.
>>>
>>> > > Please correct me if i am wrong in my approach.
>>> > > Regards,
>>> > > Manish
>>>
>>> > > ----- Original Message -----
>>> > > From: "eggsy84" <[EMAIL PROTECTED]>
>>> > > To: "Google Web Toolkit" <[email protected]>
>>> > > Sent: Wednesday, November 19, 2008 2:36 PM
>>> > > Subject: Re: how to work with xs-linker in gwt
>>>
>>> > > Hi there
>>>
>>> > > No thats fine you can compile your GWT into Java using the GWT 
>>> > > Hosted
>>> > > browser and providing you have the linker this will compile Cross
>>> > > Site
>>> > > compatible Javascript and then you can include the compiled up
>>> > > Javascript on any HTML page.
>>>
>>> > > EG: You may compile your GWT application up on machine A then make a
>>> > > web page on machine B and include the compiled up javascript file
>>> > > from
>>> > > Machine A on the web page on machine B.
>>>
>>> > > What doesn't work is when you try to communicate with a foreign
>>> > > server
>>> > > within hosted mode so basically when you're testing before you
>>> > > compile
>>> > > your Java to javascript you have to communicate with a server on the
>>> > > local machine.
>>>
>>> > > Regards,
>>>
>>> > > Eggsy
>>>
>>> > > On Nov 19, 5:50 am, "Manish Kumar" <[EMAIL PROTECTED]> wrote:
>>> > > > Hi,
>>>
>>> > > > I have just taken a look on the link content, this seems quite
>>> > > > useful.I
>>> > > > will
>>> > > > go through in details now.
>>>
>>> > > > Thanks for much needed stuffs floated on the web.
>>> > > > Do you mean that we can not do xs-compile in hosted mode.We
>>> > > > understand
>>> > > > that
>>> > > > we would have to test on different browser.
>>> > > > The way i want to do is that we want to include nocache.js to our
>>> > > > HTML
>>> > > > stuffs and call a JNSI method to invoke GWT utilities.
>>>
>>> > > > Please correct me if i am wrong in my understanding.
>>>
>>> > > > Regards
>>> > > > Manish
>>>
>>> > > > ----- Original Message -----
>>> > > > From: "eggsy84" <[EMAIL PROTECTED]>
>>> > > > To: "Google Web Toolkit" <[email protected]>
>>> > > > Sent: Tuesday, November 18, 2008 3:09 PM
>>> > > > Subject: Re: how to work with xs-linker in gwt
>>>
>>> > > > Also I don't think (at the time of writing) that GWT hosted mode
>>> > > > browser has Cross Site mode functionality so you may have to keep
>>> > > > compiling your widget and testing within a browser. Or simply set
>>> > > > up
>>> > > > a
>>> > > > test environment (tomcat locally or something) on your local
>>> > > > machine.
>>>
>>> > > > Eggsy
>>>
>>> > > > On Nov 18, 9:25 am, eggsy84 <[EMAIL PROTECTED]> wrote:
>>> > > > > Hi there
>>>
>>> > > > > To compile the application for Cross site you simply add
>>> > > > > <add-linker
>>> > > > > name="xs" />
>>> > > > > to your gwt.xml file.
>>>
>>> > > > > In GWT 1.5 this now doesn't create xs-nocache.js it simply
>>> > > > > creates
>>> > > > > the
>>> > > > > javascript as normal but it will be the xs version. (Took me a
>>> > > > > while
>>> > > > > to realise this as well)
>>>
>>> > > > > I had to do the same thing for a client and make a widget that
>>> > > > > could
>>> > > > > be deployed on various machines - I wrote a quick tutorial with
>>> > > > > links
>>> > > > > here
>>>
>>> > > > >http://eggsylife.blogspot.com/2008/10/gwt-and-cross-site-jsonp-in-j2e...
>>>
>>> > > > > Hope this helps
>>>
>>> > > > > eggsy
>>>
>>> > > > > On Nov 18, 8:49 am, "Manish Kumar" <[EMAIL PROTECTED]>
>>> > > > > wrote:
>>>
>>> > > > > > Hi,
>>>
>>> > > > > > While working to make a call to GWT from a eternal HTML using
>>> > > > > > JSNI
>>> > > > > > method , I am trying to compile our code using xs-linker.
>>>
>>> > > > > > I don't understand why this does not work. I made an entry in
>>> > > > > > for
>>> > > > > > xs-linker in -gwt.xml then compile the our code in hosted
>>> > > > > > browser.
>>> > > > > > Can anybody please hint me what I am missing?
>>>
>>> > > > > > One more thing I would like to confirm with all of you about 
>>> > > > > > my
>>> > > > > > approach.
>>> > > > > > My sole purpose is to add our compiled javascript code to 
>>> > > > > > HTML(
>>> > > > > > external ) at any location. The way I expected is that my JSNI
>>> > > > > > method
>>> > > > > > will be available in xs-nocache.js (included in HTML).
>>>
>>> > > > > > Can anybody please confirm on this?
>>>
>>> > > > > > Regards,
>>>
>>> > > > > > Manish
>>
>>
>> >
>
>
> > 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to