I've never done that, Arul, but I believe displaying a PDF in GWT is
straight forward using a Frame widget  (that could be the contents of
a pop-up) *providing* the user has a PDF viewer plug-in installed in
their browser. I would read what Martin and Reinier have to say about
it in this post:

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/24cbd4eec073b299/201825304c1075dc?lnk=gst&q=displlay+PDF#201825304c1075dc

regards
gregor

On Dec 18, 3:06 pm, Arul <arulmanikandan.sriniva...@gmail.com> wrote:
> Hi Gregor,
>   I am happy to see your reply and wish to thank for it.
>   1)Yes , as you mentined the same warning only I am getting, so I am
> ignoring it.
>   2) Thanks for your suggestion for not modifying existing DAO.
>
> One Important Clarification I would like to know from you
> ----------------------------------------------------------------------------------
> Current Scenario
> -------------------------
>  Current system has one button called Export, selecting this opens in
> new window then content of account details will be displayed in PDF
> where user will be allowed either to save ot print.
>
> Clarification from You
> -------------------------------
>  Would you please reply the same can be achieved in GWT using popup
> panel or some other way? if so, please send me link or code where I
> can refer it.
>
> Once Agian I want to thank for your  reply for all my queries.
>
> Thanks
> Arul
>
> On Dec 18, 7:45 am, gregor <greg.power...@googlemail.com> wrote:
>
> > Hi Arul,
>
> > Firstly, if the warning you refer to is:
>
> > [WARN] Field 'private final
> > com.google.gwt.i18n.client.impl.ConstantMap.OrderedConstantSet<java.lang.St­ring>
> > keys' will not be serialized because it is final
>
> > I think this has just crept into 1.5.3 somehow, there have been other
> > posts about this. It is AFAIK a minor bug in hosted mode but it has no
> > effect at all on your application - it's annoying, but just ignore it.
> > It has no effect on returning class instances over RPC. If however the
> > warning is different to that, then it is unusual and you should post
> > it in full.
>
> > > I am trying my level best not to change DAO pattern which is already
> > > exists in my application.
> > > There were lot of methods returns ArrayList and Vectors for different
> > > purpose. According to your reply now I need to change my DO as well.
>
> > I did not mean to suggest that. I was suggesting that you could
> > continue to use your DAO service that returns a Vector of Accounts as
> > now, but simply load the Vector into the Command DTO object (which has
> > a field for it) rather than directly pass the Vector itself as the RPC
> > return value.
>
> > regards
> > gregor
>
> > >   Would you please clarify one thing, if I use ArrayList or Vector
> > > instead a class (which implements Serilizable) as return type as you
> > > mentioned your reply for business methods then I am getting some
> > > warning like " Keys will not be Serilized because it is not final".
> > >  Have to use always class as return type in GWT RPC business methids
> > > instead traditional java programming return ( ArrayList,Vector
> > > etc,,)  ?
>
> > > Thanks
> > > Arul
>
> > > On Dec 17, 9:31 am, gregor <greg.power...@googlemail.com> wrote:
>
> > > > Hi Arul,
>
> > > > Yes and no. Yes. this is the way you set up RPC services client side,
> > > > but no, you do not necessarily have to have dozens of separate
> > > > callbacks, one for every single use case.
>
> > > > For example, here you have two methods that both return vectors of
> > > > accounts. You can merge them into a single RPC service method (thereby
> > > > cutting out half the tedious callback code) using a variant of the
> > > > Command pattern. For example:
>
> > > > public class AccountsCommand implements Serializable {
>
> > > >    enum Operation {available, selected, ....,etc};
>
> > > >    private Operation op; // best made immutable
> > > >    private Vector<Account> accounts = new Vector<Account>();
>
> > > >    // constructors, getters, setters, etc
>
> > > > }
>
> > > > You set the op and dispatch one of these to a single RPC service and
> > > > the RPC service returns the same object that now contains the results
> > > > e.g.
>
> > > > public interface AccountsService extends RemoteService {
> > > >         AccountsCommand getAccounts(AccountsCommand command);
>
> > > > }
>
> > > > This is particularly convenient with enums because you can use a
> > > > switch statement in the (now) single callback to call the right
> > > > methods client side to control the UI, e,g,
>
> > > >   public void onSuccess(AccountsCommand command) {
> > > >        Command.Operation operation = command.getOperation();
> > > >        switch (operation) {
> > > >                case available: {doSomething(command.getAccounts
> > > > ());break;}
> > > >                case selected: {doSomethingElse(command.getAccounts
> > > > ());break;}
> > > >               //etc
> > > >         }
> > > > ");
>
> > > > which I think is quite neat and readable.  You can also easily add
> > > > additional fields to AccountsCommand that might become necessary/
> > > > desirable without altering the RPC infrastructure code at all, and
> > > > also any useful utility methods for manipulating lists of accounts
> > > > (sorting for example). I like this approach because I think it
> > > > maintains a strong business focus around a group of related use cases
> > > > at the same time as simplifying the tedious RPC infrastructure code.
>
> > > > regards
> > > > gregor
>
> > > > On Dec 17, 2:17 pm, Arul <arulmanikandan.sriniva...@gmail.com> wrote:
>
> > > > > Hi,
> > > > >    I written two business method inside service class.
> > > > > When I call these two methods inside client class, I have to write two
> > > > > seperate block containing onSuccess, onFailure methods for each of the
> > > > > business method in service class.
>
> > > > > For Example see my service class below
> > > > > ---------------------------------------------------------------------------­­---------------------------
> > > > > public interface AccountsService extends RemoteService {
> > > > >         Vector getAvailbleAccounts();
> > > > >         Vector getSelectedAccounts();}
>
> > > > > ---------------------------------------------------------------------------­­---------------------------
>
> > > > > Please find below my implementation (client) class for above two
> > > > > methods
> > > > > ---------------------------------------------------------------------------­­--------------------------------------------------
> > > > > AsyncCallback<Vector> callback = new AsyncCallback<Vector>() {
> > > > >     public void onFailure(Throwable caught) {
> > > > >       System.out.println("Inside getAvailbleAccounts Error ");
>
> > > > >     }
>
> > > > >     public void onSuccess(Vector result) {
> > > > >         System.out.println("Inside getAvailbleAccounts On Success ");
> > > > >     };
> > > > >   accountServiceSvc.getAvailbleAccounts(callback);
>
> > > > > AsyncCallback<Vector> callback1 = new AsyncCallback<Vector>() {
> > > > >     public void onFailure(Throwable caught) {
> > > > >       System.out.println("Inside getSelectedAccounts Error ");
> > > > >     }
>
> > > > >     public void onSuccess(Vector result) {
> > > > >             System.out.println("Inside getSelectedAccounts On Success
> > > > > ");
> > > > >     }
> > > > >   };
> > > > > accountServiceSvc.getSelectedAccounts(callback1);
> > > > > ---------------------------------------------------------------------------­­--------------------------------------------------
>
> > > > > Is this the way of writting blocks for every business method in GWT
> > > > > RPC?
>
> > > > > Thanks
> > > > > Arul- Hide quoted text -
>
> > > > - Show quoted text -- 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to