There are differences between the hosted mode and the web mode.
Basically, in hosted mode the actual Java-Code is executed, in web mode only the compiled Javascript-Code is executed. Here's an explanation.
Now for the (possible) cause of your problem:
Does your GrdRowListener contain the empty constructor? If not - does it contain any non-empty constructors, so that the default (empty) constructor is not available? An empty constructur is sometimes needed for object initializations, e.g. deserialization / bean creation. Pure Javascript should work fine without such a constructor, but Java code won't and that might be the root of your problem. Add the empty constructor to your class and test if it works.