History and server call.

2010-06-15 Thread ping2ravi
Hi Guys,
I have just implemented a multipage(basically multi url) website using
History. It works great using history token. But i need something else
from GWT which i am not able to solve.
Now when user clicks on something(link/button etc) i add the token to
History and my history callbacks get called.
Now in history value change handler i do something like this

1) FInd out what page need to be dispalyed(basically identify the
panels etc).
2) now each of my panel which can have history implementing
hasHistory(my own) interface, which has function
recoverPanelFromHistory.
3) In this function, i check if i have client side data cahced for
this panel, if yes then load it into panel and display it(basically
add to main panel widget tree).
4) But if no cache data found then go to server and get data.


one such implementation
@Override
public boolean recoverPanelFromHistory(Map
historyTokens) {
String page = historyTokens.get(PAGE_PARAM);
boolean returnValue = false;
if("home".equalsIgnoreCase(page))
{
returnValue =
userHomePanel.recoverPanelFromHistory(historyTokens); //and this
function will calls its child panels if they support history
if(returnValue )
{
mainContentPanel.clear(); //clearing the 
mainPanel view of client
mainContentPanel.add(userHomePanel); //and 
adding the view
according to history token value
}
  else
  {
   //dont change the browser view and stay at
current panel/view/page. This also means child panel can not be
recovered and there must be some problem with history tokens provided.
  }

}
if("profile".equalsIgnoreCase(page))
{
returnValue =
prodilePanel.recoverPanelFromHistory(historyTokens); //and this
function will calls its child panels if they support history
if(returnValue )
{
mainContentPanel.clear(); //clearing the 
mainPanel view of client
mainContentPanel.add(profilePanel); //and 
adding the view
according to history token value
}
  else
  {
   //dont change the browser view and stay at
current panel/view/page. This also means child panel can not be
recovered and there must be some problem with history tokens provided.
  }

}
return returnValue;

}

So till now theoretically it sounds good and works good.

Problem starts when lets say user lost his Internet connection or call
fail at server because of any system level error..

userHomePanel.recoverPanelFromHistory(historyTokens);

This function does following things.
1) get the data from cache for this panel
2) if found call loadDataIntoPanel(data) function and load it into
panel and return true.
3)  else call the server to get data.
Now server call is async and I need to return some value from
userHomePanel.recoverPanelFromHistory(historyTokens);, so if i return
true and call fails at server because of some network problem then
ideally i dont want to switch to new view as per this history action
but my function has already returned true and mainPanle has already
changed the view to new panel.
Now i dont want child panels to call parentPanel's method to tell them
later that server call was success or failure so that main parent
panel can decide whethere i should switch panels/view or not. If child
need to know parent then my all panels will be too much dependent on
each other and they will be too much crossed chain to each other.

If you see gmail it uses such features. If you have loaded ur inbox
and then you lost ur internet connection and then u click on any
email. Then gmail doesnt take you to single mail viewer page and then
tell "oh u lost ur connection" but it just keep you on inbox view and
keep trying and after some time stop trying.

How can i achieve such functionality.?
Are there any existing libraries to do that or any particular design
pattern is there?

Thanks, in advance

Ravi.



-- 
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: About a multi page web application

2010-06-03 Thread ping2ravi
Few days back i was thinking about the same thing(How to do Multipage
it in GWT) and finally i got the solution.

First i would suggest you to stay away from creating mutiple jsp pages
and then embedding one or two widgets in left right etc. I tried that
and it doesn't give the best user experience.
Following thing happens when you mix jsp and GWT
1) First server request to retrieve jsp/HTML page
2) Then it start downloading all the HTML content like images and
scripts,some time GWT scripts are quite big if you use some other
framework like gwtext etc)
3) Once everything is loaded browser fire default javascript
function(onModule from your GWT class).
4) Atleast one more call to server again to retrive data from server
to show it in GWT.(if you want to show some data)

Now user go to different page and the four steps will repeat(ofcourse
script cache can be used but still)

So for above reasons i would not mix JSPs with GWT. Either just JSP or
just GWT.

Now before thinking about multipage, you need to think why u want
multipage. If its a website then you might need a multipage design but
if its a application like any desktop application then i would
recommend not to think about multipage view.

For desktop Application like, you can create one mainPanel(basically
just a verticalPanel or anything like that), and add it your HTML
using RootPanel.get().add();
And then whenever user choose something always do this (use mainPanel
and not RootPanel.get().add())
Say u want to show Login
mainPanel.clear();
mainPanel.add(new LoginPanel());

Say u want to show Screen1Panel
mainPanel.clear();
mainPanel.add(new Screen1Panel());

etc etc


But say now u decided to go with multipage then you can implement it
using History.More details you can find on this thread. Basically you
will need to learn bit more about history and it will give your
website a very good and fast user experience.

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/80c27e2d7d06d972


Thanks,
Ravi.





On Jun 3, 10:53 am, Stefan Bachert  wrote:
> Hi,
>
> GWT-application are in general single page applications (like any Ajax-
> application).
> When you for some reason need more the one browser window, you should
> communicate via the server.
> However, this should not be a topic for a starter.
>
> Stefan Bacherthttp://gwtworld.de
>
> On 1 Jun., 11:16, MaveriK  wrote:
>
>
>
> > Hi everyone.
>
> > I'm new in GWT, i've just begun to use GWT a couple of week ago.
> > My goal is to create a web app that shows a login page, and after the
> > log-in shows an interface where the user can interact with the system
>
> > So i was wondering if i need need a multi-page web app, or instead a
> > single-page switching the visibility of widgets on/off.
> > I though the first was the best solution as i don't have lots widgets
> > to manage in one page, but i can't fine a way to make multi-page web
> > app in GWT...
> > I read some posts from GWT discussion but i couldn't find out how to
> > do it.
> > Could someone help me out?
>
> > Tnx in adv

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



Re: GWT Design Problem

2010-06-03 Thread ping2ravi
This post i am not asking a problem but suggesting a feature request
for GWT.


Now history stuff is working well, except few things(Basic GWT issue/
feature, because of its nature of converting java into javascript at
the time of compilation and the classes it supports in .client
packages).

I have declared the ValueChangeHandler but then in that code i need to
check one or more particular param, lets say page and then i write
5-10 if then else statement to call my proper handlers.

say if page=main, then call com.my.MainPanel.loadFromHistory(params)
say if page=editData1, then call
com.my.EditData1Panel.loadFromHistory(params)
say if page=editData2, then call
com.my.EditData2Panel.loadFromHistory(params)
say if page=showData1, then call
com.my.ShowData1Panel.loadFromHistory(params)
say if page=showData2, then call
com.my.ShowData2Panel.loadFromHistory(params)
etc etc


In Spring/MVC architect we have seen that we don't need to write such
ifs as DispatchServlet can read our xml and call our handlers
depending on xml content(url-handler mappings). In Spring it was
implemented using Reflection which cant be used in GWT as there are no
JAVA classes at run time, its all javascript. Understandable.No
argument over it but its still solvable.

We should not forget the javascript is loosely coupled language and
implementing such things(Reflection) should not be a big
hassle.Reflection makes Java loosely coupled at compile time(ofcourse
wrong types will create problem at runtime)

Solution :

We already have UIBinders where GWT compiler reads the xml and
generate proper java script. Why cant we have something like for
History(say HistoryBinder.xml) and i should be able to define some xml
like

  


 


And all handlers can implement a Interface like
public interface HistoryHandler{
public handleHsitory(Map params, any other param which
is required)
}

and at compile time, compiler will check each class mentioned in this
xml and generate error if anything wrong with class else generate the
proper code behind the scene as lots of If then else(Compiler writers
cant use Reflection for generated scriptts too :) )

and then GWT can call our proper handler whenever history event occurs
and we will never have to implement ValueChangeHandler.And GWT will
also take care of converting our history tokens into proper hashmap
like structure or any other key-value pair structure.

 This will make code writing much easier, more understandable, makes
Developer's life bit easier. And i am sure it will add value to GWT.

Thanks,
Ravi




On Jun 2, 8:13 pm, Frederic Conrotte 
wrote:
> Hello
>
> You should check this book:http://apress.com/book/view/9781590599853
>
> And the associated website:http://code.google.com/p/tocollege-net/
>
> It mix both HTML/Freemarker templates with GWT modules.
>
> Fred
>
> On 1 juin, 18:02, ping2ravi  wrote:
>
>
>
> > Hi All,
> > I am trying to create a website and stuck with confusion over whether
> > to use GWT for presentation or JSP based framework like Spring MVC. I
> > want UI to be very user friendly,faster etc and this is possible with
> > GWT. But following problem comes with GWT
>
> > 1) Book marking of any page. As GWT is suppose to be one url
> > application and everything should come under it. But how i will solve
> > the problem if i have a site like Facebook, where url can be for User
> > profile(/profile/1), My Home(/home), community(/cpmm),video(/video)
> > etc. I can solve it by using one html and keeping everything as
> > params(i.e. /myapp.htm?type=profile&id=1) but then i feel its not how
> > GWT should be used or is this the only way i will be able to use it.
>
> > 2) Not searchable by Search Engines. Search engine can not see what
> > the content is as it always comes through RPC calls.
>
> > 3) Implementing History is Overhead, if i fix the issue 1
>
> > 4) Its not possibkle to mix jsps and GWT. I tried but GWT css start
> > interfaring with my CSS, first starting with changing background
> > color.
>
> > But i still like GWT but not sure how i will solve these problems.
>
> > Any suggestions/comments most welcome.
>
> > Thanks,
> > Ravi

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



Re: GWT Design Problem

2010-06-02 Thread ping2ravi
Ya this approach looks good, thanks kozura.
Now my app will look like this.

myapp.html#type=profile&id=100   call server and get data
myapp.html#type=profile&id=234   call server and get data
myapp.html#type=profile&id=100   get data from cache and
refresh panel with this data
myapp.html#type=profile&id=234   get data from cache and
refresh panel with this data

Thanks all, i guess now i can start writing a basic framework around
this approach.



On Jun 1, 10:25 pm, kozura  wrote:
> I recommend you use a single widget with a method to change the data
> showing in it (user profile, whatever).  You have to be able to
> populate it anyway, so that's no extra code.  Caching panels is
> generally a bad idea and a lot of overhead.
>
> As for limiting server calls, you can cache the data returned to avoid
> having to recall the server.  Easiest way is a simple map id->data;
> check it when you need an id, if you have it then call the async
> callback immediately, otherwise make the RPC call and be sure to stick
> the result into the cache map when it gets returned.  Of course if the
> data is dynamic you probably want some mechanism to know when a
> particular piece of data gets changed and needs re-sent..
>
> Also you might look at one of the models built on top of GWT which do
> this for you in various ways.
>
> On Jun 1, 2:36 pm, ping2ravi  wrote:
>
>
>
> > Thanks Shaffer/Sri,
> > I think i will go with GWT, the only thing is that i will have to
> > implement History which usually i dont do while writing the
> > websites(jsp/html page based). May be thats the reason i thought
> > writing history is overhead but i guess this over head will give me
> > good webapp/website.
> > now with GWT also i have few question like.
> > e.g. i am on a user profile (some other user) screen i created a
> > panel(grand parent of every widget inside it) say the url is
> > myapp.html#type=profile&id=100
> > then i go to another user's profile and url is now
> > myapp.html#type=profile&id=234.
>
> > Question, what is the best approach here. Shall i create a brand new
> > that grand panel and fill the data from server or shall i reuse the
> > exisitng panel, clean it and then refill the data from server.
> > Option 1) If i create always new panel, can i trust GWT that it will
> > never go out of memeory or after some time user;s browser wont feel
> > that something heavy has been loaded?  By using this approach i can
> > make sure that if user come to link myapp.html#type=profile&id=100
> > again, i wont go to server and will just display the existing Panel.
> > It will be quickest thing on the earth and user may feel better to see
> > a page faster then anything.
>
> > My Server calls will be like
>
> >  myapp.html#type=profile&id=100               call server and get data
> >  myapp.html#type=profile&id=234               call server and get data
> >  myapp.html#type=profile&id=100               ==No need to call
> > server as one panel already exists which can show profile for user 100
> >  myapp.html#type=profile&id=234               ==No need to call
> > server as one panel already exists which can show profile for user 234
>
> > Probelm which i see in this approach:
> > 1) Memory can be a problem in this approach. Exp GWT developer may be
> > able to give me some insight here.
> > 2) Client view might be bit older then server, but panels can be
> > removed from history cache using timers say 1 minute etc. But still
> > older.
>
> > Option 2) Reruse the existing Panel again and again. Basically create
> > all main panels which need to have history as singleton(although its
> > javascript, but in java write code like that) and reuse the panel and
> > whenevr history changes reset all panels/widgets inside it and reload
> > the data from Server
> >  myapp.html#type=profile&id=100               call server and get data
> >  myapp.html#type=profile&id=234               call server and get data
> >  myapp.html#type=profile&id=100               call server and get data
> >  myapp.html#type=profile&id=234               call server and get data
>
> > In this approach i guesss i will have less problem with memory and
> > data will always be latest. But Server calls will be increased.That
> > means extra load on server and user's every click(Back and forward)
> > will go to server
>
> > Is there any ther option available here?. If not then out of these
> > which one of you think will be better. SOmehow i am inclined to option
> > 1 but need to know if memory will be a problem.
> > Thanks,
> > Ravi.

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



Re: GWT Design Problem

2010-06-01 Thread ping2ravi
. To
> make it seo friendly, read the Ajax Crawling
> article<http://code.google.com/web/ajaxcrawling/>.
> Mixing JSP's and GWT is possible but in general a bad idea, because multiple
> jsps are an indication that you want a website. More importantly, loading a
> GWT module is expensive, and you only want to do that once per user
> session.
>
> There are ways to overcome the problems you mention using both technologies.
> The decision to use a particular technology should be based on your
> requirements (website v/s app), and not on the specific problems you have
> enumerated.
>
> --Sri
>
> On 1 June 2010 21:32, ping2ravi  wrote:
>
> > Hi All,
> > I am trying to create a website and stuck with confusion over whether
> > to use GWT for presentation or JSP based framework like Spring MVC. I
> > want UI to be very user friendly,faster etc and this is possible with
> > GWT. But following problem comes with GWT
>
> > 1) Book marking of any page. As GWT is suppose to be one url
> > application and everything should come under it. But how i will solve
> > the problem if i have a site like Facebook, where url can be for User
> > profile(/profile/1), My Home(/home), community(/cpmm),video(/video)
> > etc. I can solve it by using one html and keeping everything as
> > params(i.e. /myapp.htm?type=profile&id=1) but then i feel its not how
> > GWT should be used or is this the only way i will be able to use it.
>
> > 2) Not searchable by Search Engines. Search engine can not see what
> > the content is as it always comes through RPC calls.
>
> > 3) Implementing History is Overhead, if i fix the issue 1
>
> > 4) Its not possibkle to mix jsps and GWT. I tried but GWT css start
> > interfaring with my CSS, first starting with changing background
> > color.
>
> > But i still like GWT but not sure how i will solve these problems.
>
> > Any suggestions/comments most welcome.
>
> > Thanks,
> > Ravi
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

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



GWT Design Problem

2010-06-01 Thread ping2ravi
Hi All,
I am trying to create a website and stuck with confusion over whether
to use GWT for presentation or JSP based framework like Spring MVC. I
want UI to be very user friendly,faster etc and this is possible with
GWT. But following problem comes with GWT

1) Book marking of any page. As GWT is suppose to be one url
application and everything should come under it. But how i will solve
the problem if i have a site like Facebook, where url can be for User
profile(/profile/1), My Home(/home), community(/cpmm),video(/video)
etc. I can solve it by using one html and keeping everything as
params(i.e. /myapp.htm?type=profile&id=1) but then i feel its not how
GWT should be used or is this the only way i will be able to use it.

2) Not searchable by Search Engines. Search engine can not see what
the content is as it always comes through RPC calls.

3) Implementing History is Overhead, if i fix the issue 1

4) Its not possibkle to mix jsps and GWT. I tried but GWT css start
interfaring with my CSS, first starting with changing background
color.



But i still like GWT but not sure how i will solve these problems.

Any suggestions/comments most welcome.

Thanks,
Ravi

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



RichTextArea Border Problem

2009-08-31 Thread ping2ravi

Hi All,
I am trying to use RichTextArea in one of my web page. In Hosted mode
it shows the Border for RichTextArea, but when i compile and run it in
any of the browser it doesnt show any border.
Users can do text operation in this widget but border is not visible,
which is very confusing for the users.
I am also trying to set following css but no help. can you please tell
me what to do, so Border will be visible in Browsers.

.gwt-RichTextArea {
border-width: 1px;
border-style: solid;
border-color: black;
}
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Including my own GWT project

2009-06-20 Thread ping2ravi

Hi All,
I created one GWT(GWTCommon) project to include in another GWT project
(MyViewer)

my package struture of GWTCommon  is as follow

com/next/common/GWTCommon.gwt.xml
com/next/common/client/GWTCommon.java
com/next/common/client/callback/DefaultAsyncCallback.java
...and ome more files.packages in  com/next/common/client/

Package structure of MyViewer project is as follows
com/next/viewer/MyViewer.gwt.xml
com/next/viewer/client/MyViewer.java
com/next/viewer/client/Somemorefiles.java

content of  com/next/viewer/MyViewer.gwt.xml is


http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-
source/core/src/gwt-module.dtd">

  
  

  
  


Everything looks ok, but when i run it, i get following exception

[ERROR] Line 45: No source code is available for type
com.next.common.client.callback.DefaultAsyncCallback; did you
forget to inherit a required module?

I am inheriting this module as well as the jar file of GWTCommon
project is in classpath.

Can you see, what i am doing wrong here.
please help.

I am using Latest Google Eclipse plugin for GWT/GAE and GWT 1.6

Ravi



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



Mouseover/mouseout event on GRID/FLEX TABLE

2009-06-15 Thread ping2ravi

Hi All,
I have a small requirment of highlighting a row of grid when mouseover
it and make it normal when it goes out.
I am not able to implement this. Can anyone help please. all
suggestions will be welcome
I dont want to use GWT-EXT or some other kind of project, as this
project is for Google APP Engine where file limit is just 1000 and
such projects increase the file count a lot.

Thanks in advance.
Ravi
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Running GWT with IBM JDK

2009-06-12 Thread ping2ravi

Hi All,
I got into this funny situation that i can not run my GWT application
in IBM JDK(1.5). It seems GWT is using some sun related classes which
are not available in IBM Java version. Can you please advise how can i
deploy such application with IBM java.

10:20:39,309 ERROR [[/SwSupWebTool]] Exception while dispatching
incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract com.citi.client.beans.ApplicationUser
com.citi.client.service.LoginService.login
(java.lang.String,java.lang.String) throws
com.citi.client.exception.ClientAppException' threw an unexpected
exception: java.lang.NoSuchMethodError: sun/security/util/
HostnameChecker.getSubjectX500Name(Ljava/security/cert/
X509Certificate;)Lsun/security/x509/X500Name;
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
(RPC.java:360)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
(RPC.java:546)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:166)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
806)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:175)
at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke
(DefaultSubjectValve.java:56)
at org.apache.geronimo.tomcat.GeronimoStandardContext
$SystemMethodValve.invoke(GeronimoStandardContext.java:353)
at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke
(GeronimoBeforeAfterValve.java:47)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:563)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run
(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:810)
Caused by:
java.lang.NoSuchMethodError: sun/security/util/
HostnameChecker.getSubjectX500Name(Ljava/security/cert/
X509Certificate;)Lsun/security/x509/X500Name;
at
com.sun.net.ssl.internal.www.protocol.https.VerifierWrapper.getServername
(DelegateHttpsURLConnection.java:154)
at
com.sun.net.ssl.internal.www.protocol.https.VerifierWrapper.verify
(DelegateHttpsURLConnection.java:104)
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing
(HttpsClient.java:482)
at sun.net.www.protocol.https.HttpsClient.afterConnect
(HttpsClient.java:415)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect
(AbstractDelegateHttpsURLConnection.java:170)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream
(HttpURLConnection.java:943)
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getInputStream
(HttpsURLConnectionOldImpl.java:204)
at gfinet.desktop.client.AuthValidator.postData
(AuthValidator.java:600)
at
gfinet.desktop.client.AuthValidator.authenticateUserByPassword
(AuthValidator.java:179)
at gfinet.desktop.client.AuthAgent.authenticateUserOnly
(AuthAgent.java:308)
at com.citi.server.service.impl.GWTServiceImpl.login
(GWTServiceImpl.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
(RPC.java:527)
... 20 more

--~--~-~--~~~---~--~~
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: Flash with GWT

2009-03-30 Thread ping2ravi

Thanks all...
"wmode = opaque" worked fine in IE,Mozilla,Chrome and safari...

Ravi

On Mar 26, 8:27 pm, Niklas Derouche  wrote:
> wmode = opaque
> does the trick in some situations. you need to add it both as a param and in
> the embed though.
>
> n.
>
>
>
> On Thu, Mar 26, 2009 at 1:28 PM, ping2ravi  wrote:
>
> > Hi All,
> > I have a web page where i am using Flash and GWT both, i am using
> > GWT's popup thing.
> > Non flash screen part of the page shows the popup correctly but the
> > screen part where flash is, it hides the popup under it. I can see
> > that the potion of popup which should be on the top of Flash part is
> > hidden and the otehr part is visible as there is no flash on that
> > part.
>
> > I remember that in JS/CSS we used to use z-index kind of this to make
> > such ordering of JS object, but how to do that with flash.
>
> > Any comments/Suggestion?
>
> --
> ---
> Ave bossa nova, similis bossa seneca
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Flash with GWT

2009-03-26 Thread ping2ravi

Hi All,
I have a web page where i am using Flash and GWT both, i am using
GWT's popup thing.
Non flash screen part of the page shows the popup correctly but the
screen part where flash is, it hides the popup under it. I can see
that the potion of popup which should be on the top of Flash part is
hidden and the otehr part is visible as there is no flash on that
part.

I remember that in JS/CSS we used to use z-index kind of this to make
such ordering of JS object, but how to do that with flash.

Any comments/Suggestion?
--~--~-~--~~~---~--~~
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: Synchornous GWT, how can i do that

2009-03-11 Thread ping2ravi

I totally agree with you guys that Asynchronous is good, but i would
love to see mix up of synchrnous and asynchronous in GWT(my personal
view), where i can make an asynchronous call to one function which
internally can make synchronous calls and it will solve the problem of
UI hanging.(In case GWT peope can read it , please implement such
things), i am sure programmers will enjoy some synchronous calls too
such as avoiding inner classes or writing new classes for callbacks
for each call(again personal view). But yes User satisfaction has more
priority.
And guys i am really thankfull to all of you for giving suggestions

i guess i will implement some kind of chains as Matias Costa suggested
and once all chain object get result back will call our UpdateUi
function as suggested by Ian.


Ravi.



On Mar 11, 9:46 am, al0  wrote:
> "How much extra code is too much?" - single line of (unnecessary)
> extra code is way too much.
>
> On Mar 10, 6:01 pm, mikedshaffer  wrote:
>
> > Lothar's original suggestion
>
> > "Do the UI-update in a method called updateUI where you check if all
> > necessary data (e.g. above lists) are present and call this method
> > in every onSuccess-method of the different AsyncCallback-classes. "
>
> > is the way to go.
>
> > How much extra code is too much?  You have 5 async RPC calls each with
> > onsuccess handlers that increment a class level field and then call a
> > "redoUI" type of function.  That function continues only when the
> > increment is 5.  Done.  We're talking a small amount of code here
> > really.  And that's all good form and the way to do a good AJAX UI.
> > You can add all sorts of good UI user interaction this way, like wait
> > cursors to let the user know something is going on.  If you
> > synchronize things, you'll lock up your users browser, and in general,
> > tick them off, like Jason articulates.  Plus you'll have gnarly
> > looking code that fights the very asynchronous nature of the way
> > things work.
>
> > My thoughts...
>
> > Later,
>
> > Shaffer
>
> > On Mar 10, 10:47 am, Jason Essington 
> > wrote:
>
> > > Actually from a user's point of view, hanging the UI is NEVER
> > > acceptable even if it is for less than a second.
>
> > > In the case of waiting for a couple of seconds, depending on the
> > > browser and version, you cannot change tabs, cannot close the browser
> > > or anything. This is a VERY NAUGHTY thing to do intentionally.
>
> > > In the case of a network failure this frozen state lasts indefinitely,
> > > and that sort of thing really pisses off your users. particularly if
> > > the only way they an figure out how to exit your web app is to reboot
> > > their computer!
>
> > > Learn to divide up your application into the things that need to
> > > happen before the RPC is sent, and the things that happen after. place
> > > those things in their own methods, then call the "after" methods from
> > > your Callback. Your users will thank you for it later.
>
> > > -jason
>
> > > On Mar 10, 2009, at 10:28 AM, ping2ravi wrote:
>
> > > > Do you see any problem in having synchronous calls.? except that it
> > > > may hang the UI for a second and that is acceptable.- Hide quoted text -
>
> > > - Show quoted text -
--~--~-~--~~~---~--~~
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: Synchornous GWT, how can i do that

2009-03-10 Thread ping2ravi

Lothar,
good point but i think that's the beauty of GWT code,
they already have one parameter(timeoutMillis) in following call( i
have not tested it, if it works or not but i guess it will work.)

Request request = new Request(xmlHttpRequest, timeoutMillis,
callback);

So if call doesnt get finish in that time it will timeout and your UI
will be working fine.

I am copy pasting the full function here

private Request doSend(String requestData, RequestCallback callback)
  throws RequestException {
JavaScriptObject xmlHttpRequest = httpRequest.createXmlHTTPRequest
();
String openError;
if (user != null && password != null) {
  openError = XMLHTTPRequest.open(xmlHttpRequest, httpMethod, url,
true,
  user, password);
} else if (user != null) {
  openError = XMLHTTPRequest.open(xmlHttpRequest, httpMethod, url,
true,
  user);
} else {
  openError = XMLHTTPRequest.open(xmlHttpRequest, httpMethod, url,
true);
}
if (openError != null) {
  RequestPermissionException requestPermissionException = new
RequestPermissionException(
  url);
  requestPermissionException.initCause(new RequestException
(openError));
  throw requestPermissionException;
}

setHeaders(xmlHttpRequest);

Request request = new Request(xmlHttpRequest, timeoutMillis,
callback);

String sendError = XMLHTTPRequest.send(xmlHttpRequest, request,
requestData, callback);
if (sendError != null) {
  throw new RequestException(sendError);
}

return request;
  }


On Mar 10, 4:37 pm, Lothar Kimmeringer  wrote:
> ping2ravi schrieb:
>
> > Do you see any problem in having synchronous calls.? except that it
> > may hang the UI for a second and that is acceptable.
>
> If the server is not available or the request get lost for some
> other reason, the UI of the browser hangs for a couple of minutes
> and not seconds.
>
> Regards, Lothar
--~--~-~--~~~---~--~~
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: Synchornous GWT, how can i do that

2009-03-10 Thread ping2ravi

Ian,
That is not an option for me, creating such API is not a good idea
from application maintenance as well as architect point of view.

Lothar,
Your suggestion sounds good and i can use it where i need to update
the UI, but what about if condition
if(IsUserloggedIn())
{
callApi1()
callApi2()
}
else
{
callApi4()
callApi3()
}

Writing then code in Success of asyncallback and then calling the
other function will be a good long chain of calls and asyncallbacks.

Do you see any problem in having synchronous calls.? except that it
may hang the UI for a second and that is acceptable.


On Mar 10, 4:13 pm, Lothar Kimmeringer  wrote:
> ping2ravi schrieb:
>
> > 1) Check if user is logged in
> > 2) Get Some data List list1  e.g. getUserAddresses
> > 3) Get some data List list2   e.g.  getUserFriends
> > 4) Get Some data List List3  e.g. getUserCommunities
> > 5) now create the UI based on above data retrieved. Now as all GWT RPC
> > calls are asynchronous, so at the step   5 i am not sure whether all
> > the calls(1,2,3,4) have completed by the time i reached at step 5, and
> > there is no Thread object in GWT so i can not wait or join till all
> > call completes.
> > And writing such code can be pain.(e.g. writing a Asyncallback for
> > step 1 then if it success then call step 2 and write asyncallback 2
> > and in its successs function call step 3 and so on)
>
> Do the UI-update in a method called updateUI where you check if all
> necessary data (e.g. above lists) are present and call this method
> in every onSuccess-method of the different AsyncCallback-classes.
>
> Regards, Lothar
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Synchornous GWT, how can i do that

2009-03-10 Thread ping2ravi

HI All GWT Experts,
Its long time i have been looking for some Synchronous way of making
RPC calls in GWT. Whenever its just one call to server, writing code
is not pain.
But lets say, to initiate one component i need to make following
calls.

1) Check if user is logged in
2) Get Some data List list1  e.g. getUserAddresses
3) Get some data List list2   e.g.  getUserFriends
4) Get Some data List List3  e.g. getUserCommunities
5) now create the UI based on above data retrieved. Now as all GWT RPC
calls are asynchronous, so at the step   5 i am not sure whether all
the calls(1,2,3,4) have completed by the time i reached at step 5, and
there is no Thread object in GWT so i can not wait or join till all
call completes.
And writing such code can be pain.(e.g. writing a Asyncallback for
step 1 then if it success then call step 2 and write asyncallback 2
and in its successs function call step 3 and so on)
Do you guys have any suggestion, how i can achieve this. And on server
side i can not create single API to get all the data in one call, also
sometime i need to call different apis depending on the last call
result
Like if user logged in call above mentioned apis else call some other
apis. And using Asynccallback is really really painful.


I did some R&D and found this calls RequestBuilder which has function
doSend,
  openError = XMLHTTPRequest.open(xmlHttpRequest, httpMethod, url,
true,)
the above call in this function has one parameter as true, and i guess
if we make it false it can make the call synchronous.

Do you guys see any problem in this,
i am planning to have a global static variable defined which i will be
able to set anytime, and will use in this call
so whenever i want synchronous call i will set it as false and when
want asynchronous set it as true.

Now if its correct then i am wondering why GWT creator didnt gave such
options.

All comments/suggestion are welcome.


--~--~-~--~~~---~--~~
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: Bean Serialization Problem: com.google.gwt.user.client.rpc.SerializationException: Type 'com.dg.common.client.beans.DGUser' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable'

2008-09-22 Thread ping2ravi

i found the problem why file names were different.
Thanks

On Sep 22, 11:18 am, ping2ravi <[EMAIL PROTECTED]> wrote:
> Hi All,
> My application was working good till now and now i deployed it to
> other machine and it start giving me following exception. My DGUser
> class is implementing serializable interface.
>
> SEVERE: Exception while dispatching incoming RPC call
> com.google.gwt.user.client.rpc.SerializationException: Type
> 'com.dg.common.client.beans.DGUser' was not assignable to
> 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a
> custom field serializer.  For security purposes, this type will not be
> serialized.
>         at
> com.google.gwt.user.server.rpc.impl.LegacySerializationPolicy.validateSerialize(LegacySerializationPolicy.java:
> 140)
>         at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
> 585)
>         at
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
> 129)
>         at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
> $ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
>         at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:
> 520)
>         at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:573)
>         at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:
> 441)
>         at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
> 529)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
> 163)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
> 85)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
> 206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 233)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 175)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
> 128)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
> 102)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
> 263)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
> 844)
>         at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:584)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
> 447)
>         at java.lang.Thread.run(Thread.java:619)
>
> And also its giving following error in the log file, So i am guessing
> its because of this .gwt.rpc missing file,
> INFO: ERROR: The serialization policy file '/
> D96C005D9FEF0E3183DC3057D9F48727.gwt.rpc' was not found; did you
> forget to include it in this deployment?
> INFO: WARNING: Failed to get the SerializationPolicy
> 'D96C005D9FEF0E3183DC3057D9F48727' for module 'http://localhost:8090/
> AdminMenu/'; a legacy, 1.3.3 compatible, serialization policy will be
> used.  You may experience SerializationExceptions as a result.
>
> I checked my deployed application directory there is only one .gwt.rpc
> file which is E8B2AED1667057CBC391B7AC2BFAA4E9.gwt.rpc but not
> D96C005D9FEF0E3183DC3057D9F48727.gwt.rpc. I don't know how GWT is
> generating this file name and why its generating different names when
> its being actual generating the file and when its using it. And the
> file which is present in my deployed directory have all my beans
> including DgUser.
> There is something wrong, can any one please help me.
>
> Thanks in advance,
> Ravi
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Bean Serialization Problem: com.google.gwt.user.client.rpc.SerializationException: Type 'com.dg.common.client.beans.DGUser' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and

2008-09-22 Thread ping2ravi

Hi All,
My application was working good till now and now i deployed it to
other machine and it start giving me following exception. My DGUser
class is implementing serializable interface.

SEVERE: Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'com.dg.common.client.beans.DGUser' was not assignable to
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a
custom field serializer.  For security purposes, this type will not be
serialized.
at
com.google.gwt.user.server.rpc.impl.LegacySerializationPolicy.validateSerialize(LegacySerializationPolicy.java:
140)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
585)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
129)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:
520)
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:573)
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:
441)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
529)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
163)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
447)
at java.lang.Thread.run(Thread.java:619)


And also its giving following error in the log file, So i am guessing
its because of this .gwt.rpc missing file,
INFO: ERROR: The serialization policy file '/
D96C005D9FEF0E3183DC3057D9F48727.gwt.rpc' was not found; did you
forget to include it in this deployment?
INFO: WARNING: Failed to get the SerializationPolicy
'D96C005D9FEF0E3183DC3057D9F48727' for module 'http://localhost:8090/
AdminMenu/'; a legacy, 1.3.3 compatible, serialization policy will be
used.  You may experience SerializationExceptions as a result.


I checked my deployed application directory there is only one .gwt.rpc
file which is E8B2AED1667057CBC391B7AC2BFAA4E9.gwt.rpc but not
D96C005D9FEF0E3183DC3057D9F48727.gwt.rpc. I don't know how GWT is
generating this file name and why its generating different names when
its being actual generating the file and when its using it. And the
file which is present in my deployed directory have all my beans
including DgUser.
There is something wrong, can any one please help me.

Thanks in advance,
Ravi
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Exceptions in GWT

2008-09-01 Thread ping2ravi

My class definition is like..
public Class ClientException extends Exception
{
  public ClientException()
  {
  super();
  }
  public ClientException(String message)//I am using this constructor
  {
  super(message);
  }
  public ClientException(Throwable ex)
  {
  super(ex);
  }



}

On Sep 1, 7:17 pm, Folke <[EMAIL PROTECTED]> wrote:
> What does your ClientException look like? Do you call the superclass'
> constructor? super(msg);?
>
> On Sep 1, 7:16 pm, ping2ravi <[EMAIL PROTECTED]> wrote:
>
> > No replies  :( :(
>
> > On Aug 30, 10:16 am, ping2ravi <[EMAIL PROTECTED]> wrote:
>
> > > Hi All,
> > > I am having a problem in getting exception messages from exception in
> > > onFailure method.
>
> > > My services are like
>
> > > //Client Side
> > > public String getName(int id) throws ClientException;
>
> > > public String getName(int id,AyncCallback) throws ClientException;
>
> > > //Server Side
> > > public String getName(int id) throws ClientException
> > > {
> > >    ...
> > >    ..
> > >    //on some condition i am throwing ClientException
> > >    throw new  ClientException("You can not do this operation");
>
> > > }
>
> > > Now onFailure method i just want to pop this error message in alert;
>
> > > So
> > > void onFailure(Throwable t)
> > > {
> > >   Window.alert(t.toString);// This line gives me
> > > com.app.exceptions.ClientException which is my class.
> > >   Window.alert(t.getMessage);// this line gives me null
> > >   Window.alert(t.getLocalizedMessage);// this line gives me null
>
> > > }
>
> > > So is there any way to get the error message which  i put into
> > > ClientException at server side.
>
> > > Thanks in advance,
> > > Ravi
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Exceptions in GWT

2008-09-01 Thread ping2ravi

No replies  :( :(

On Aug 30, 10:16 am, ping2ravi <[EMAIL PROTECTED]> wrote:
> Hi All,
> I am having a problem in getting exception messages from exception in
> onFailure method.
>
> My services are like
>
> //Client Side
> public String getName(int id) throws ClientException;
>
> public String getName(int id,AyncCallback) throws ClientException;
>
> //Server Side
> public String getName(int id) throws ClientException
> {
>    ...
>    ..
>    //on some condition i am throwing ClientException
>    throw new  ClientException("You can not do this operation");
>
> }
>
> Now onFailure method i just want to pop this error message in alert;
>
> So
> void onFailure(Throwable t)
> {
>   Window.alert(t.toString);// This line gives me
> com.app.exceptions.ClientException which is my class.
>   Window.alert(t.getMessage);// this line gives me null
>   Window.alert(t.getLocalizedMessage);// this line gives me null
>
> }
>
> So is there any way to get the error message which  i put into
> ClientException at server side.
>
> Thanks in advance,
> Ravi
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Exceptions in GWT

2008-08-30 Thread ping2ravi

Hi All,
I am having a problem in getting exception messages from exception in
onFailure method.

My services are like

//Client Side
public String getName(int id) throws ClientException;

public String getName(int id,AyncCallback) throws ClientException;

//Server Side
public String getName(int id) throws ClientException
{
   ...
   ..
   //on some condition i am throwing ClientException
   throw new  ClientException("You can not do this operation");
}


Now onFailure method i just want to pop this error message in alert;

So
void onFailure(Throwable t)
{
  Window.alert(t.toString);// This line gives me
com.app.exceptions.ClientException which is my class.
  Window.alert(t.getMessage);// this line gives me null
  Window.alert(t.getLocalizedMessage);// this line gives me null
}

So is there any way to get the error message which  i put into
ClientException at server side.

Thanks in advance,
Ravi


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: More then one Entry Points.

2008-08-29 Thread ping2ravi

Thanks Mark and Ian
I think Window.Location.getParameter will be enough for me.
But i do like this  method too, in case i wud like to have clean
url may be i will use this one.
Thanks a lot guys

cheers
Ravi. :)

On Aug 29, 4:15 pm, "Ian Bambury" <[EMAIL PROTECTED]> wrote:
> You could also have one GWT app and in each page have 
> or  and look for those.
>
> Or have  or 
> and read the ui type.
>
> Ian
>
> 2008/8/29 Mark Renouf <[EMAIL PROTECTED]>
>
>
>
>
>
> > An approach that we took, make make two new modules (each with their
> > own entry point) which both inherit the third (existing one). The
> > downside here is that compile time could be up to 2x as long as each
> > module is compiled seperately. Only code actually used in each module
> > will be emitted. We did this for pages which open in a new window.
>
> > The other (much simpler) option is to check query parameters in your
> > single entry point, and dispatch accordingly:
> > Window.Location.getParameter('id')
>
> > If you need to pass more data than a single parameter you can include
> > a JSON or serialized RPC response in the host page and grab it with
> > JSNI. (This has been discussed, google for examples)
>
> > On Aug 29, 10:14 am, ping2ravi <[EMAIL PROTECTED]> wrote:
> > > Hi All,
> > > How can i create more then one entry point in a project. My
> > > requirement is to have more then one entry point for GWT application.
> > > I can create more then one class which implements EntryPoint, but i m
> > > able to use only one implementaion as we need to define the one entry
> > > point in .gwt.xml.
>
> > > or tell me how can i get the http url parameters in EntryClass
> > > Permission
> > > lets say if someone enters url        mydomain.com/GWTApps.html?id=1
> > > then i want one kind of UI
> > > and if someone enters mydomain.com/GWTApps.html?id=2
> > > i want different kind of UI.
> > > I can make a call to server and then server can return me the id but i
> > > dont wan to do that, i want it on client side only.
>
> > > So i am happy with any implemetaion
> > > 1) To have two htmls(GWTApp1.html and GWTApp2.html) and two Entry
> > > points(classes) in same GWT project
> > > 2) or i can get the url params and i can decide which UI to display
> > > 3) if there is something else which is better then these will be more
> > > then welcome
>
> > > Thanks in advance
> > > Ravi.
>
> --
> Ian
>
> http://examples.roughian.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



More then one Entry Points.

2008-08-29 Thread ping2ravi

Hi All,
How can i create more then one entry point in a project. My
requirement is to have more then one entry point for GWT application.
I can create more then one class which implements EntryPoint, but i m
able to use only one implementaion as we need to define the one entry
point in .gwt.xml.


or tell me how can i get the http url parameters in EntryClass
Permission
lets say if someone enters urlmydomain.com/GWTApps.html?id=1
then i want one kind of UI
and if someone enters mydomain.com/GWTApps.html?id=2
i want different kind of UI.
I can make a call to server and then server can return me the id but i
dont wan to do that, i want it on client side only.


So i am happy with any implemetaion
1) To have two htmls(GWTApp1.html and GWTApp2.html) and two Entry
points(classes) in same GWT project
2) or i can get the url params and i can decide which UI to display
3) if there is something else which is better then these will be more
then welcome

Thanks in advance
Ravi.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Query : Synchronous calls in GWT

2008-08-27 Thread ping2ravi

Jason,
I think any framework should give all options to developer to design
his own way, and poor design and good design are all relative terms,
so cant do generalization of that.
But thanks for sharing your thoughts.

cheers,
Ravi  :)

On Aug 26, 7:14 pm, Jason Essington <[EMAIL PROTECTED]> wrote:
> nope, again, this use case shows a poor decision of using a  
> synchronous request. In fact I'm not aware of a single good use of a  
> synchronous request in a browser.
>
> I do this very thing using Async RPCs. I start by opening a modal  
> dialog. the user can type his credentials into the "login" dialog, and  
> submit them.
> The submit button is disabled as soon as it is pressed, but the dialog  
> is not dismissed preventing any clicking anywhere else in the  
> application.
> Once the RPC returns indicating that the user has successfully  
> authenticated, the dialog is dismissed, and any original RPC (that  
> triggered the session timeout notification) is resent.
>
> There are glass panels Modal Dialogs and other techniques that prevent  
> the user from poking about in the application that do not lock up the  
> browser, and any of those techniques should be used long before  
> attempting to hack in a Synchronous request.
>
> There is no case where you as a programmer should cause your user's UI  
> to completely lock up. It is fine to disable bits, but synchronous  
> requests don't play nice, they completely lock up the browser, in some  
> cases, not allowing the user to switch tabs, or browse other pages, or  
> even close the browser. Users don't like that, and as a result, will  
> equate the behavior with poor programming on your part. So, just don't  
> do it.
>
> -jason
>
> On Aug 26, 2008, at 11:53 AM,ping2raviwrote:
>
>
>
> > yes i do have have workaround for this, but was just wondering if i
> > can use any of GWT feature.
> > Also i read in GWT FAQ, GWT do not support Synchronous calls and in
> > future they are not planning to have it(they have some theory). So i
> > guess need to implement my own workaround.
> >http://code.google.com/support/bin/answer.py?answer=55195&topic=10210
>
> > But guys just a question of thought, Don't you think having a
> > synchronous call feature will be added advantage.
>
> > Lets say u build a application and u have something like if user
> > logged out of application because of idle session then when user try
> > to do anything on application. instead of forwarding him to some user
> > login page , we just popup a login/password panel thing. And usually
> > on click we will call the login on server and close the dialogue
> > box(againw e can keep it open and in onSuccess function we can close
> > it, but for me not a good idea)
> > And as the call is asynchrnous so once we call the Login on server,
> > user is allowed to do other click in application(before he actually
> > login to server) and he will again see that u r not logged in.
> > Its just a small example.
>
> > But i think having synchronous call will be good thing.
>
> > Thanks for reading
> > Ravi.
>
> > On Aug 26, 5:03 pm, "Pavel Byles" <[EMAIL PROTECTED]> wrote:
> >> can't you just do:
> >> doTaskCallBack {
> >>   onResponse(...) {
> >>     userService.doSynchronousTask(...);
> >>   }
>
> >> }
>
> >> Wouldn't that just give the synchronous effect?
>
> >> On Mon, Aug 25, 2008 at 6:24 AM,ping2ravi<[EMAIL PROTECTED]>  
> >> wrote:
>
> >>> Hi All,
>
> >>> Does any one know how to make Synchronous calls using GWT.
> >>> Currently i am using GWT to build services, creating files like
>
> >>> com.app.client.MyService.java
> >>> //One function in this interface
> >>> doMyTask(ParamTpye myparams) throws ClientException;
>
> >>> com.app.client.MyServiceAsync.java
> >>> //One function in this interface
> >>> doMyTask(ParamTpye myparams,AsyncCallback callback) throws
> >>> ClientException;
>
> >>> com.app.server.MyServiceImpl.java
> >>> //One function in this class
> >>> doMyTask(ParamTpye myparams) throws ClientException;
>
> >>> now i create the service and call
> >>>    MyServiceAsync userService = (MyServiceAsync)
> >>> GWT.create(MyService.class);
> >>>    ServiceDefTarget endpoint = (ServiceDefTarget) userService;
> >>>    String moduleRelativeURL = GWT.getModuleBaseURL() + "MyService";
> >>>    endpoint.setServiceEntry

Re: Query : Synchronous calls in GWT

2008-08-26 Thread ping2ravi

yes i do have have workaround for this, but was just wondering if i
can use any of GWT feature.
Also i read in GWT FAQ, GWT do not support Synchronous calls and in
future they are not planning to have it(they have some theory). So i
guess need to implement my own workaround.
http://code.google.com/support/bin/answer.py?answer=55195&topic=10210

But guys just a question of thought, Don't you think having a
synchronous call feature will be added advantage.

Lets say u build a application and u have something like if user
logged out of application because of idle session then when user try
to do anything on application. instead of forwarding him to some user
login page , we just popup a login/password panel thing. And usually
on click we will call the login on server and close the dialogue
box(againw e can keep it open and in onSuccess function we can close
it, but for me not a good idea)
And as the call is asynchrnous so once we call the Login on server,
user is allowed to do other click in application(before he actually
login to server) and he will again see that u r not logged in.
Its just a small example.

But i think having synchronous call will be good thing.

Thanks for reading
Ravi.

On Aug 26, 5:03 pm, "Pavel Byles" <[EMAIL PROTECTED]> wrote:
> can't you just do:
> doTaskCallBack {
>   onResponse(...) {
>     userService.doSynchronousTask(...);
>   }
>
> }
>
> Wouldn't that just give the synchronous effect?
>
> On Mon, Aug 25, 2008 at 6:24 AM, ping2ravi <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > Does any one know how to make Synchronous calls using GWT.
> > Currently i am using GWT to build services, creating files like
>
> > com.app.client.MyService.java
> > //One function in this interface
> > doMyTask(ParamTpye myparams) throws ClientException;
>
> > com.app.client.MyServiceAsync.java
> > //One function in this interface
> > doMyTask(ParamTpye myparams,AsyncCallback callback) throws
> > ClientException;
>
> > com.app.server.MyServiceImpl.java
> > //One function in this class
> > doMyTask(ParamTpye myparams) throws ClientException;
>
> > now i create the service and call
> >    MyServiceAsync userService = (MyServiceAsync)
> > GWT.create(MyService.class);
> >    ServiceDefTarget endpoint = (ServiceDefTarget) userService;
> >    String moduleRelativeURL = GWT.getModuleBaseURL() + "MyService";
> >    endpoint.setServiceEntryPoint(moduleRelativeURL);
> >    userService.doMyTask(MyParams,CallBackObject);
>
> > This piece of code is working fine as a ASYNCHRONOUS call.
>
> > Then i tried making is synchronous call using following code(i don't
> > know if its valid or not)
> > instead of using MyServiceAsync i am using MyService
>
> >    MyService userService = (MyService) GWT.create(MyService.class);
> >    ServiceDefTarget endpoint = (ServiceDefTarget) userService;
> >    String moduleRelativeURL = GWT.getModuleBaseURL() + "MyService";
> >    endpoint.setServiceEntryPoint(moduleRelativeURL);
> >    userService.doMyTask(MyParams);
>
> > But call to doMyTask throw following exception.
> > java.lang.ClassCastException in MyService_Proxy.
>
> > So i guess this is not the way to make synchronous call in GWT
> > Can any one point me how to do that. Or its not possible at all in
> > GWT.
>
> > Thanks in advance.,
> > Ravi.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Query : Synchronous calls in GWT

2008-08-25 Thread ping2ravi

Hi All,

Does any one know how to make Synchronous calls using GWT.
Currently i am using GWT to build services, creating files like

com.app.client.MyService.java
//One function in this interface
doMyTask(ParamTpye myparams) throws ClientException;


com.app.client.MyServiceAsync.java
//One function in this interface
doMyTask(ParamTpye myparams,AsyncCallback callback) throws
ClientException;

com.app.server.MyServiceImpl.java
//One function in this class
doMyTask(ParamTpye myparams) throws ClientException;

now i create the service and call
MyServiceAsync userService = (MyServiceAsync)
GWT.create(MyService.class);
ServiceDefTarget endpoint = (ServiceDefTarget) userService;
String moduleRelativeURL = GWT.getModuleBaseURL() + "MyService";
endpoint.setServiceEntryPoint(moduleRelativeURL);
userService.doMyTask(MyParams,CallBackObject);

This piece of code is working fine as a ASYNCHRONOUS call.

Then i tried making is synchronous call using following code(i don't
know if its valid or not)
instead of using MyServiceAsync i am using MyService

MyService userService = (MyService) GWT.create(MyService.class);
ServiceDefTarget endpoint = (ServiceDefTarget) userService;
String moduleRelativeURL = GWT.getModuleBaseURL() + "MyService";
endpoint.setServiceEntryPoint(moduleRelativeURL);
userService.doMyTask(MyParams);

But call to doMyTask throw following exception.
java.lang.ClassCastException in MyService_Proxy.


So i guess this is not the way to make synchronous call in GWT
Can any one point me how to do that. Or its not possible at all in
GWT.

Thanks in advance.,
Ravi.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---