Re: RPC call returning List fails

2009-01-15 Thread alex.d

It is actually. I'm using a lot of structures like this(and more
complex) for data transfer. The problem ist somewhere else - do you
initialize your List properly?

On 15 Jan., 18:36, jos  wrote:
> I have an RPC call with a signature like public List SomeCall
> (SomeObj) { return anArrayList; } which failed.
> Policy file was deployed and the file had ArrayList, true in the file.
> The only real information available was the stack trace it left in
> catalina.out (see below).
>
> I'm running gwt1.52, a Spring/Hibernate stack on the back end with (a
> probably early version of) gwt-sl. The problem manifested itself in
> eclipse. When I changed the return value to String[] eveything worked
> fine.
>
>  Does anyone know, is it not OK to use List as a return
> specifier?
>
> 2009-01-14 16:41:08,569 ERROR [org.apache.catalina.core.ContainerBase.
> [Catalina].[localhost].[/geo]] -  RPC call>
> javax.servlet.ServletException: Client did not send 158 bytes as
> expected
>         at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8
> (RPCServletUtils.java:148)
>         at com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent
> (RemoteServiceServlet.java:335)
>         at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
> (RemoteServiceServlet.java:77)
>         at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest
> (GWTRPCServiceExporter.java:169)
>         at
> org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle
> (HttpRequestHandlerAdapter.java:49)
>         at org.springframework.web.servlet.DispatcherServlet.doDispatch
> (DispatcherServlet.java:874)
>         at org.springframework.web.servlet.DispatcherServlet.doService
> (DispatcherServlet.java:808)
>         at org.springframework.web.servlet.FrameworkServlet.processRequest
> (FrameworkServlet.java:476)
>         at org.springframework.web.servlet.FrameworkServlet.doPost
> (FrameworkServlet.java:441)
--~--~-~--~~~---~--~~
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: How to render a list(ul li) by gwt widget ?

2009-01-15 Thread alex.d

I would suppose that since most of the google widgets are  or
include div elemente it is easier just to take a HTMLPanel and fill it
with right tags and info.

On 15 Jan., 23:40, Jason  wrote:
> Hi, Jason, Thank you for your reply!
>
> I'v tryied many ways, but failed. I'v get the following result:
> 
>   
> 
>   aa
> 
>   
> 
> It seems work in IE, but failed in Firefox.
> So, could you do me a favour to send me your widget code? I'll so
> appriciate about it!
>
> On 1月16日, 上午5时35分, Jason Essington  wrote:
>
> > There is a feature request for a UL and LI widget, however they are  
> > not yet included ... however, they aren't that difficult to create,  
> > I've had to do it for a couple of projects.
>
> > You can use FlowPanel as your guide, and create similar widgets using  
> > the ul and li element. you could add additional methods as need be,  
> > but the simple add(widget w) method is minimally sufficient.
>
> > -jason
>
> > On Jan 15, 2009, at 1:57 PM, Jason wrote:
>
> > > I want to use gwt widgets to render a list, the result should look
> > > like this:
>
> > > 
> > >  About
> > >  About
> > >  About
> > > 
>
> > > I'm not sure which widget will meet my need. The HTML widget seams can
> > > get the result, but it is not the perfect solution. could someone help
> > > me ?- 隐藏被引用文字 -
>
> > - 显示引用的文字 -
>
>
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



TreeNode Listener issues

2009-01-15 Thread Manish Kumar


Hi Everybody,

Can I get any help on this : I am calling a listener in this fashion. I am 
not getting what i am doing wrong. I am using GWT 1.5.2 and GWText 
component.

Please have a look at my code and help me out to find where i am wrong. 
Please excuse and let me know if anything is not concerned to this forum.

import com.gwtext.client.widgets.tree.TreeNode;
final TreeNode rootChild = new TreeNode( itemName );

if( itmType != null && itmType.equalsIgnoreCase("folder") )

{

rootChild.setExpandable(true);


rootChild.addListener(new TreeNodeListenerAdapter() {


public void onClick(Node node, EventObject e) {

try

{

RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, 
URL.encode(tempUrl));


builder.setCallback(new RequestCallback()

{

public void onError(Request request, Throwable exception)

  {

MessageBox.alert( exception.getLocalizedMessage() );

  }

public void onResponseReceived(Request request, Response 
response)

 {

if (200 == response.getStatusCode())

  {

MessageBox.alert( response.getText() );

buildTreeNode ( response.getText(), rootChild, root, 
tempUrl );

  }

else

  {

   MessageBox.alert(response.getStatusCode() +" : "+ 
response.getStatusText() +":"+ response.getText() );

  }

   }

});

builder.send();

}

catch(RequestException ex)

{

System.out.println( "Exception occurred during sub tree node: "+ 
ex.getLocalizedMessage());

}

}

});

}

else

{

rootChild.addListener(new TreeNodeListenerAdapter()

{

public void onDblClick( Node node, EventObject e ) {

try

 {

System.out.println("xxx :");


RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, 
URL.encode(tempUrl));


builder.setCallback(new RequestCallback()

{

public void onError( Request request, Throwable exception )

 {

MessageBox.alert( exception.getLocalizedMessage() );

}


  public void onResponseReceived( Request request, Response 
response )

   {

if ( 200 == response.getStatusCode() )

 {

TabPanel tabPanel = new TabPanel();

tabPanel.setTabPosition(Position.BOTTOM);

tabPanel.setResizeTabs(true);

tabPanel.setMinTabWidth(115);

tabPanel.setTabWidth(135);

tabPanel.setActiveTab(0);


Frame google = new Frame(itmPath);


Panel filePanel = new Panel("Google");

filePanel.setLayout(new FitLayout());

filePanel.setIconCls("tab-icon");

filePanel.add(google);

}

else

{

MessageBox.alert( response.getStatusCode() +" : "+ 
response.getStatusText() +":"+ response.getText() );

}

}

});

builder.send();

}

catch(RequestException ex)

{

System.out.println( "Exception occurred during sub tree node: "+ 
ex.getLocalizedMessage());

}

}

});

}


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 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: Necessary .class files in order to deploy a GWT application

2009-01-15 Thread Litty Preeth
Well if your ..server code references any
..client code then you ll need to include tht also in the
WEB-INF/classes. An example may be java bean classes shared by both server
and client.

- Litty Preeth

On Thu, Jan 15, 2009 at 6:58 PM, Rafael  wrote:

>
> ¡Hello People!
>
>   I was following the instructions to deploy a GWT app on a Tomcat
> server (http://code.google.com/intl/es-ES/docreader/#p=google-web-
> toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideRPCDeployment
> )
> and it ocurred to me that the only .class files that should be copied
> onto the WEB-INF/classes folder are the ones located in the package
> ..server, considering that the remaining classes (the
> ones located in the public and client packages) are compiled via the
> GWT compiler into html, css, etc.
>
> ¿Is this correct?
>
> I should warn you that i have little to none experience with GWT so i
> am perfectly capable of not making any sense
>
> ¡Thanks in advance!
>
> Rafael
>
> >
>

--~--~-~--~~~---~--~~
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: How to get Hidden field value in server-side?

2009-01-15 Thread blues

hi,

i use Hidden in client-side

Hidden hidden = new Hidden(name, value);

server-side in do-post:

DiskFileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
response.setCharacterEncoding("UTF-8");

List items = null;
try
{
items = upload.parseRequest(request);
}
catch (FileUploadException e)
{
LOG.warn(".", e);
}
// if(items!=null..)
for(FileItem item : items)
{
   // add code, what you want can like this coming
code
   //  item.getName()   item.getString()
item.getString("UTF-8")  item.getFieldName()
}

maybe help you!






On 1月15日, 下午10时59分, Alex Luya  wrote:
> I have following code to upload an image to server and I need servlet
> to rename image to what the value of a hidden field sended to server
> through a post method, the question is how to get the value of this
> hidden field:imageStoreName.is it to use request.getParameter
> ("imageStoreName")?I tried it,but I got  null.
> private final void setUploader()
> {
> HorizontalPanel hpUploaderLayout = new HorizontalPanel();
> // hidden will tell server how to rename the image
> imageStoreName = new Hidden();
> imageStoreName.setID("imageName");
> imageStoreName.setValue(Util.getId());
>
> final FileUpload uploader = new FileUpload();
> 
>
> hpUploaderLayout.add(imageStoreName);
> hpUploaderLayout.add(uploader);
> uploadForm.setWidget(hpUploaderLayout);
> }

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



Popular Application Design Tool for Java/GWT

2009-01-15 Thread tv

Hi,

I have a pretty clear idea for the architecture of a web application
that I want to create (incorporating GWT/Java/Hibernate/MySQL).
However, I am not a programmer by training and at this point I want to
enlist someone with more experience to help translate my ideas into a
useful roadmap for development and testing.  For instance, I
appreciate the benefits of an MVC approach, and I can state in plain
english what I want the app to do.  But, assuming I want to create a
more formal design rather than jumping straight into coding, what
should I be using to help with that design portion?

Can anyone recommend widely-used open-source (free) tool for
application architecture design -I suppose UML design?  Something
equivalent to Eclipse for code development?  Most of the Eclipse plug-
in tools I have found which relate to UML look like automatic code
generators - and what I want is a nice roadmap, not a road built from
templates...

Thanks in advance for any suggestions!

-Tom

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



Different Solutions to integrate Axis & GWT

2009-01-15 Thread Q

Developers,
I have a website setup in the following manner:
JSP -> Servlets -> Axis WebServices -> Database

The JSP displays the Axis objects that is pulled back via the
Servlet.  The Servlet pulls information via Webservices and uses an
Axis stub to invoke a service and receives Axis objects on the
callback.  The web service does a lookup on the database and generates
the results to return.

I'm trying to integrate GWT into this framework in order to use the
built-in AJAX functionality.  From the documentation that I've read, I
would need to create a separate set of objects for displaying the
information in the JSP and using the Axis objects only in Servlets.

However, I see this as a maintenance nightmare as I would need to keep
two similar objects in-sync instead of passing around the same object
as before.  Is this the recommended approach?  If not, what are my
alternatives?

Also, is there a way to make the updates to these objects a snap?
Like if the WSDL on  this website changes, I can run WSDL2Java and be
ok.

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-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: How to render a list(ul li) by gwt widget ?

2009-01-15 Thread Jason

Hi, Jason, Thank you for your reply!

I'v tryied many ways, but failed. I'v get the following result:

  

  aa

  

It seems work in IE, but failed in Firefox.
So, could you do me a favour to send me your widget code? I'll so
appriciate about it!




On 1月16日, 上午5时35分, Jason Essington  wrote:
> There is a feature request for a UL and LI widget, however they are  
> not yet included ... however, they aren't that difficult to create,  
> I've had to do it for a couple of projects.
>
> You can use FlowPanel as your guide, and create similar widgets using  
> the ul and li element. you could add additional methods as need be,  
> but the simple add(widget w) method is minimally sufficient.
>
> -jason
>
> On Jan 15, 2009, at 1:57 PM, Jason wrote:
>
>
>
>
>
> > I want to use gwt widgets to render a list, the result should look
> > like this:
>
> > 
> >  About
> >  About
> >  About
> > 
>
> > I'm not sure which widget will meet my need. The HTML widget seams can
> > get the result, but it is not the perfect solution. could someone help
> > me ?- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~-~--~~~---~--~~
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: two trees on one page.

2009-01-15 Thread Jill Singer

I solved the problem:

I searched through the net, and found this post:
http://markmail.org/message/zozobs24v4wyvf6p

and wondered if that quirk was causing my problem.

I already was using a subclass of Tree,
so added to the constructor:


DOM.setStyleAttribute(getElement(), "position", "static");

and; now the second tree is not disappearing when I select the first
tree.
I'm planning to file a bug on this issue.





On Jan 13, 12:06 pm, Jill Singer  wrote:
> when I have two trees on one page-
>
> even if they are in different "verticalpanels"  (which I know are just
> columns in a table),
> when I select an item on the first; the second tree disappears.
>
> this behavior occurs in hosted mode and in ie, but not in firefox (and
> I need to make it work in ie; and hosted mode would be helpful)
>
> any ideas?
>
> (if I redraw one right after adding a new item to the other tree; then
> it will show up; but the selection problem is annoying...I don't want
> to be continually redrawing if I can help it)
>
> is this a css problem?
>
> please note:  I'm using gwt 1.462 (and no, I cannot upgrade; that it
> the version my company is using now)
>
> here's some sample code that can be run to demonstrate the problem
> (just instantiate it and put it in an entry-point class):
>  package com.amicas.gwt.qc.client.widgets.dragndrop;
>
> import com.google.gwt.user.client.ui.AbsolutePanel;
> import com.google.gwt.user.client.ui.HTML;
> import com.google.gwt.user.client.ui.Tree;
> import com.google.gwt.user.client.ui.TreeItem;
> import com.google.gwt.user.client.ui.HorizontalPanel;
> import com.google.gwt.user.client.ui.VerticalPanel;
>
> public class DualTreeTest extends AbsolutePanel {
>
>     //
> STATIC //
>     /** shorthand to refer to the left box */
>     private static final int LEFT =0;
>     /** shorthand to refer to the right box */
>     private static final int RIGHT =1;
>
>     //
> STATE //
>     private VerticalPanel its_leftBox;
>     private VerticalPanel its_rightBox;
>
>     public DualTreeTest() {
>
>         HorizontalPanel hpan = new HorizontalPanel();
>         //hpan.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
>
>         its_leftBox = new VerticalPanel();
>
>         its_leftBox.add(makeTree());
>         its_leftBox.add(new HTML(""));
>         //its_leftBox.addMouseListener(new TreeMouseAdapter());
>         hpan.add(its_leftBox);
>
>         its_rightBox = new VerticalPanel();
>         its_rightBox.add(makeTree());
>         hpan.add(its_rightBox);
>
>         add(hpan);
>     }
>
>     public Tree makeTree(){
>         Tree leftTree = new Tree();
>         TreeItem level1 = new TreeItem("level1-1");
>         TreeItem leafa = new TreeItem("a");
>         TreeItem leafb = new TreeItem("b");
>         TreeItem leafc = new TreeItem("c");
>         TreeItem leafd = new TreeItem("d");
>
>         level1.addItem(leafa);
>         level1.addItem(leafb);
>         level1.addItem(leafc);
>         level1.addItem(leafd);
>
>         TreeItem level2 = new TreeItem("level1-2");
>         TreeItem leafa2 = new TreeItem("a2");
>         TreeItem leafb2 = new TreeItem("b3");
>         TreeItem leafc2 = new TreeItem("c4");
>         TreeItem leafd2 = new TreeItem("d5");
>
>         level2.addItem(leafa2);
>         level2.addItem(leafb2);
>         level2.addItem(leafc2);
>         level2.addItem(leafd2);
>
>         leftTree.addItem(leve11);
>         leftTree.addItem(leve12);
>
>         return leftTree;
>     }
>
> }
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Number of DAO's effect over all module sizes

2009-01-15 Thread David Stubbs

We have an application spread over 60+ modules. Each module as
compiled javascript ranges in size between 800k and 2.8Mb.

The size of every module is increasing as the app grows. After some
very basic investigation it seems to be our DAO models that are
causing the steady increase in size.

Within our application we replicate all of our server side DAO's on
the client side using code generation. Almost all the DAO are
interconnected, using a DAO object in a module causes all the others
to be included as well.

I understand why this is happening, but I'm wondering if there is any
way to avoid this?

Any ideas, suggestions or experiences welcome.

David.

--~--~-~--~~~---~--~~
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: How to render a list(ul li) by gwt widget ?

2009-01-15 Thread Jason Essington

There is a feature request for a UL and LI widget, however they are  
not yet included ... however, they aren't that difficult to create,  
I've had to do it for a couple of projects.

You can use FlowPanel as your guide, and create similar widgets using  
the ul and li element. you could add additional methods as need be,  
but the simple add(widget w) method is minimally sufficient.

-jason

On Jan 15, 2009, at 1:57 PM, Jason wrote:

>
> I want to use gwt widgets to render a list, the result should look
> like this:
>
> 
>  About
>  About
>  About
> 
>
> I'm not sure which widget will meet my need. The HTML widget seams can
> get the result, but it is not the perfect solution. could someone help
> me ?
> >


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



How to render a list(ul li) by gwt widget ?

2009-01-15 Thread Jason

I want to use gwt widgets to render a list, the result should look
like this:


  About
  About
  About


I'm not sure which widget will meet my need. The HTML widget seams can
get the result, but it is not the perfect solution. could someone help
me ?
--~--~-~--~~~---~--~~
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: Performance overhead of virtual methods

2009-01-15 Thread nathan.r.matth...@googlemail.com

Thanks Jason and to the others who responded. Question answered :)

On Jan 3, 12:09 pm, Jason Morris  wrote:
> nathan.r.matth...@googlemail.com wrote:
> > Hi GWTers
>
> > I'm writing some performance sensitive code for GWT. I'm wondering how
> > GWT compilesvirtualfunctions to JavaScript. What's the associated
> > performance overhead? Obviously I'd like to use proper polymorphism
> > but if there's a significant performance overhead it may be worth re-
> > factoring various parts of the code-base.
>
> > Regards,
>
> > Nathan
>
> Hi Nathan,
>
> Someone else can correct me if I'm wrong, but after taking a look at the 
> generated code, it seems
> thatvirtualmethods shouldn't incur any additional performance overhead in 
> GWT. Basically the
> bottom level method is given the top-level declared name in each object 
> instance, thus the lookup
> expense is the same as that of a non-virtualmethod.
>
> Like I said, if I'm wrong on this, someone should correct me. ;)
>
> Cheers,
> Jason.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



RPC functionality outside of a WAR

2009-01-15 Thread Mike B

Is it possible to build a GWT app that has RPC functionality, but is
not contained in a WAR?  I am developing a plugin that does not have
access to a web.xml file and can't find a way to get my client and
server code to link up
--~--~-~--~~~---~--~~
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: Necessary .class files in order to deploy a GWT application

2009-01-15 Thread Rafael Barrera Oro
Sorry, i already answered myself.

The client package is also necessary...

2009/1/15 Rafael 

>
> ¡Hello People!
>
>   I was following the instructions to deploy a GWT app on a Tomcat
> server (http://code.google.com/intl/es-ES/docreader/#p=google-web-
> toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideRPCDeployment
> )
> and it ocurred to me that the only .class files that should be copied
> onto the WEB-INF/classes folder are the ones located in the package
> ..server, considering that the remaining classes (the
> ones located in the public and client packages) are compiled via the
> GWT compiler into html, css, etc.
>
> ¿Is this correct?
>
> I should warn you that i have little to none experience with GWT so i
> am perfectly capable of not making any sense
>
> ¡Thanks in advance!
>
> Rafael
>
> >
>

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



RPC call returning List fails

2009-01-15 Thread jos

I have an RPC call with a signature like public List SomeCall
(SomeObj) { return anArrayList; } which failed.
Policy file was deployed and the file had ArrayList, true in the file.
The only real information available was the stack trace it left in
catalina.out (see below).

I'm running gwt1.52, a Spring/Hibernate stack on the back end with (a
probably early version of) gwt-sl. The problem manifested itself in
eclipse. When I changed the return value to String[] eveything worked
fine.

 Does anyone know, is it not OK to use List as a return
specifier?




2009-01-14 16:41:08,569 ERROR [org.apache.catalina.core.ContainerBase.
[Catalina].[localhost].[/geo]] - 
javax.servlet.ServletException: Client did not send 158 bytes as
expected
at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8
(RPCServletUtils.java:148)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent
(RemoteServiceServlet.java:335)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:77)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest
(GWTRPCServiceExporter.java:169)
at
org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle
(HttpRequestHandlerAdapter.java:49)
at org.springframework.web.servlet.DispatcherServlet.doDispatch
(DispatcherServlet.java:874)
at org.springframework.web.servlet.DispatcherServlet.doService
(DispatcherServlet.java:808)
at org.springframework.web.servlet.FrameworkServlet.processRequest
(FrameworkServlet.java:476)
at org.springframework.web.servlet.FrameworkServlet.doPost
(FrameworkServlet.java:441)


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



Necessary .class files in order to deploy a GWT application

2009-01-15 Thread Rafael

¡Hello People!

   I was following the instructions to deploy a GWT app on a Tomcat
server (http://code.google.com/intl/es-ES/docreader/#p=google-web-
toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideRPCDeployment)
and it ocurred to me that the only .class files that should be copied
onto the WEB-INF/classes folder are the ones located in the package
..server, considering that the remaining classes (the
ones located in the public and client packages) are compiled via the
GWT compiler into html, css, etc.

¿Is this correct?

I should warn you that i have little to none experience with GWT so i
am perfectly capable of not making any sense

¡Thanks in advance!

Rafael

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



How to make GWT put output files in a different location?

2009-01-15 Thread Rmon

Hi,

I'm using GWT4nb (handy plugin) to write my GWT project. The back end
that I'm writing against is PHP. Thus I've installed Apache and PHP on
my dev machine and its all working fine. What I want to be able to do
is to get the GWT compiler to place its output in the www folder of my
Apache web server. Right now I have to do this manually.

I am new to Java and keep reading about ANT. Netbean project has a
Build.xml file to which I can add a new target element but I dont know
where in the IDE allows me to execute a certain target?

Can some please be kind enough to give me a sample code or some
direction on how to automatically copy the GWT output files to say "c:
\www" folder?

TIA

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



Problem Runnig GWTTestCase on Linux

2009-01-15 Thread gwt_newbie

I am trying to run GWTTestCase on Linux but it is failing with
following error.

Can't load library: /home/acwguibuild/web_ui_patriots_nightly_build/
gui/web_gui/lib/libswt-pi-gtk-3235.so


I have gone through the forum to find solution but nothing helped so
far. We have linux 32-bit and JVM 32-bit so no 64-bit issue here. I
made sure I have required gwt libs for linux in the classpath.

I really need some help to figure this out. Your reply will be highly
appreciated.

Thanks!!!


The detailed error output is here:

- 
- 
  
- 
- 
  
- 
- 
  
+ 
- 
  
- 
- 
  
+ 
- 
  
- 
- 
  
- 
- 
  
- 
- 
  
- 
- 
  
- 
- 
  
- 
- 
  
- 
- 
  
- 
- 
  
--~--~-~--~~~---~--~~
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: Problem in developing opensocial application in GWT

2009-01-15 Thread Eric Ayers
This should circumvent the RPC issue, but running in this way means that
your application must always be served from your server, not the opensocial
container which might provide some nice caching.  Fine for small gadgets,
but if you are planning on writing the next buddy poke...

On Thu, Jan 15, 2009 at 11:13 AM, Alex Epshteyn <
alexander.epsht...@gmail.com> wrote:

>
> Hi Yasser,
>
> I'm actually not using GWT in directly my OS gadget - I have an iframe
> inside the gadget that loads my GWT app.
>
> However, I'm sure you can use GWT RPC quite easily in the gadget - as
> long as your compiled JS has the same URL as your RPC server.
>
> Best,
> Alex
>
> (I'm CC-ing this message to the group so that others can also
> contribute to this discussion)
>
> On Wed, Jan 14, 2009 at 11:40 PM, Yasser Sultan 
> wrote:
> > Hi Alexander,
> > I got your email id from GWT group. You had mentioned that the opensocial
> > application Typeracer has been developed in GWT. This app is really
> fabulous
> > and fun to race against friends! As I am also a social applications
> > developer and nowadays I am developing a new application in GWT I have
> few
> > questions for you. I will be grateful if you could spare some time to
> answer
> > these queries.
> >
> > I am having problem in deploying GWT application in an opensocial
> container.
> > The main obstacle is making RPC from client side to server side. So I
> want
> > to ask whether you are using RPC to communicate with server or some other
> > form like JSON ?
> >
> > With best regards
> > Yasser Sultan
> >
>
> >
>


-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

--~--~-~--~~~---~--~~
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: GWT for SOA development

2009-01-15 Thread gregor


>
> If, for example, I've an application with a rich client interface
> (e.g. builded using gwt) that interacts with, let's say, with a
> Session Facade..(ejb, spring, or whatever).
> My Model is composed of services and a typical persistence layer...
> now hypothesize that everything is well done, i.e. services reflects a
> business decomposition etc..etc...
> Isn't this a good solution? Is this SOA? Is this MVC?
>

I think what you are describing here is an industrial strength Java EE
+ GWT architecture for a system that is fully capable of
*participating* in an SOA since all the business services (EJB/Spring
based, whatever) can be exposed in multiple ways to third party
systems as required, including an ESB supporting an SOA environment.
An application server like JBoss, for instance, has a plethora of
tools to help you do this (including it's own ESB as it happens), and
I think Spring is the same.

MVC is another matter, and IMO it is another buzz term that means all
sorts of things to different people. MVC was originally invented
during the Apple Lisa project (the first real WIMP framework) in the
early 1980's I believe, and I think it was implemented in Smalltalk,
one of the first "proper" OO languages, which was specifically
designed to support MVC. Struts is most definitely MVC:
JSP==View;Action==Controller;Bean==Model etc. But it has to be that
way to run the cycles of pages in the application.

However in GUI programming environments the role of Controller becomes
moot, or confused. Swing, for example, is often accused of not being
"true MVC" because there is no real enforcement or even encouragement
to cleanly separate a View (i.e. a widget) from a Controller, whatever
that actually means in the context of a client GUI.

For a GWT example, suppose you have a Tree, you select an item from it
and you want to display some details about that item in second panel.
You might have the widget containing the tree implement
SourcesChangeEvents, and the display panel implement ChangeListener,
so the display panel is notified when user selects a Tree item.
DisplayPanel has its onChange(Widget sender) method called, retrieves
the item identifier from the sender (the Tree) and calls an
asynchronous RPC service to get the details. RPC servlet calls, say, a
Session EJB to fetch the Model object concerned, then returns it to
DisplayPanel callback onSuccess(object result) method, from whence
DisplayPanel can populate its fields.

As you can see the "Controller" element is split up all over the place
because what you have here is a distributed n-tier architecture with
an AJAX UI, and, unlike Struts, it doesn't fit neatly into pure MVC.
The same sort of thing happens with Swing/SWT. In the Apple Lisa days,
I think it was assumed an application would either run pretty much all
on a server to a dumb client or alternatively pretty much all on the
client just accessing maybe a database sever, so the original MVC
didn't really cater for all this.

This is not to say that you cannot implement pure MVC in a GWT client
(I think there are projects around that directly support this) but it
can take extra effort that may not really be worth it. One case where
true MVC does earn its dinner is where you have a complex model
(something like a work flow process for example) which supports
multiple views, all of which might update it and all of which need
notifying of changes to it. In this case the Views should interact
with the model via a Controller only or you will end up with
unmaintainable spaghetti.

I have no idea what MVC has got to do with messaging. Perhaps ESB
vendors would like people to think of their message buses as
Controllers, and in the multi-system business process scenario
discussed above they undoubtedly are, but MVC usually refers to how a
UI interacts with the Domain Model.

regards
gregor




> My idea is that, FROM A PRACTICAL (implementation) point of view, SOA
> can be (also) simply a way to think about the Model, in a reusable and
> loose-coupled way and can be a very good solution even without going
> to complex message-based MVC.
>
> On Jan 15, 9:53 am, Paranoid Android  wrote:
>
> > Thank you gregor, I think your advices could be very useful to me.
> > My biggest concern, anyway, is not to run on multiple clients. Even if
> > I can't discard this possibility by now, it has not yet been
> > identified as a requirements of the application.
> > The biggest concern is to expose a set of features that future
> > developers that want to add some higher level functionalities can use
> > with no or minimal changes to the underlying architecture.
> > As I said, specifically to the domain of the application, something
> > pretty similar to Google OpenSocial Apis, but using standars like web
> > services.
> > This is the biggest concern, than the system should be scalable and
> > maybe distributed, so the architecture must be
> > thought in a way that it will not be a problem if users scale from 100
> > to 

Re: Problem in developing opensocial application in GWT

2009-01-15 Thread Alex Epshteyn

Hi Yasser,

I'm actually not using GWT in directly my OS gadget - I have an iframe
inside the gadget that loads my GWT app.

However, I'm sure you can use GWT RPC quite easily in the gadget - as
long as your compiled JS has the same URL as your RPC server.

Best,
Alex

(I'm CC-ing this message to the group so that others can also
contribute to this discussion)

On Wed, Jan 14, 2009 at 11:40 PM, Yasser Sultan  wrote:
> Hi Alexander,
> I got your email id from GWT group. You had mentioned that the opensocial
> application Typeracer has been developed in GWT. This app is really fabulous
> and fun to race against friends! As I am also a social applications
> developer and nowadays I am developing a new application in GWT I have few
> questions for you. I will be grateful if you could spare some time to answer
> these queries.
>
> I am having problem in deploying GWT application in an opensocial container.
> The main obstacle is making RPC from client side to server side. So I want
> to ask whether you are using RPC to communicate with server or some other
> form like JSON ?
>
> With best regards
> Yasser Sultan
>

--~--~-~--~~~---~--~~
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: create and save xml into the server with RequestBuilder

2009-01-15 Thread jchimene

Hi Max,

Yes, you do need something on the server to receive the file. From the
looks of what you've written so far, you're not using Java RPC. So,
you need some sort of CGI handler routine on "myServer"

Cheers,
jec

On Jan 14, 4:36 pm, Max  wrote:
> My goal is to save an xml string to a file in server (either appending
> an existing file or create a file).
>
> String url="http://myServer/myFolder/file.xml";; // place where i want
> to create xml into my server
>
> String postData="some xml string";
> RequestBuilder builder=new RequestBuilder(RequestBuilder.POST,url);
> try {
>          Request response = builder
>                .sendRequest(postData, new RequestCallback() {
>
>                         public void onError(Request request,
>                                             Throwable exception) {}
>
>                         public void onResponseReceived(Request
> request,
>                                                        Response
> response) {}
>                 });
>        } catch (RequestException e) {}
>
> When i run it, it doesn't show any error. I thought file.xml would be
> created at "http://myServer/myFolder/file.xml";; but nothing is there
> when i check it.Do i need server code to handle it? I don't know much
> about java servelets. It would be nice if i can do with gwt methods.
> Any suggestions?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to get Hidden field value in server-side?

2009-01-15 Thread Alex Luya

I have following code to upload an image to server and I need servlet
to rename image to what the value of a hidden field sended to server
through a post method, the question is how to get the value of this
hidden field:imageStoreName.is it to use request.getParameter
("imageStoreName")?I tried it,but I got  null.
private final void setUploader()
{
HorizontalPanel hpUploaderLayout = new HorizontalPanel();
// hidden will tell server how to rename the image
imageStoreName = new Hidden();
imageStoreName.setID("imageName");
imageStoreName.setValue(Util.getId());

final FileUpload uploader = new FileUpload();


hpUploaderLayout.add(imageStoreName);
hpUploaderLayout.add(uploader);
uploadForm.setWidget(hpUploaderLayout);
}
--~--~-~--~~~---~--~~
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: GWT for SOA development

2009-01-15 Thread Paranoid Android

Other considerations:

I read a lot of stuff about SOA, MVC, message-based MVC, SOUI ecc...
Some people asserting that MVC is dead, other asserting that SOA or
SOUI is the evolution of MVC, other asserting that MVC and SOA are
complementary some say black and some say white..headache

Ok, I agree with the fact that thanks to Ajax, DHTML, RIA in general,
the need of managing multiple views via controllers etc.. is not
central as it was some time ago. You can avoid page flows etc...
I've also understood that SOA doesn't mean "Web Services" and WS
doesn't mean SOA,even if, pratically, they are the solution that
people use in SOA applications..
Now I've a question:

If, for example, I've an application with a rich client interface
(e.g. builded using gwt) that interacts with, let's say, with a
Session Facade..(ejb, spring, or whatever).
My Model is composed of services and a typical persistence layer...
now hypothesize that everything is well done, i.e. services reflects a
business decomposition etc..etc...
Isn't this a good solution? Is this SOA? Is this MVC?

My idea is that, FROM A PRACTICAL (implementation) point of view, SOA
can be (also) simply a way to think about the Model, in a reusable and
loose-coupled way and can be a very good solution even without going
to complex message-based MVC.




On Jan 15, 9:53 am, Paranoid Android  wrote:
> Thank you gregor, I think your advices could be very useful to me.
> My biggest concern, anyway, is not to run on multiple clients. Even if
> I can't discard this possibility by now, it has not yet been
> identified as a requirements of the application.
> The biggest concern is to expose a set of features that future
> developers that want to add some higher level functionalities can use
> with no or minimal changes to the underlying architecture.
> As I said, specifically to the domain of the application, something
> pretty similar to Google OpenSocial Apis, but using standars like web
> services.
> This is the biggest concern, than the system should be scalable and
> maybe distributed, so the architecture must be
> thought in a way that it will not be a problem if users scale from 100
> to 10.
> This is the general picture. So, thinking about it, maybe an ESB is
> not really what I need, anyway I must expose feature both locally and
> remotely and thus I'm going to look for other technologies to achieve
> that, maybe EJB's as you suggested..
> Only a thing make me doubtful: the project manager suggest that a
> message/event driven architecture may be a better solution over a
> classical MVC architecture, but I can't find another solution for a
> good message driven solution other than an ESB..
>
> On Jan 14, 7:06 pm, gregor  wrote:
>
> > Paranoid,
>
> > 1) ESB's are good at, and designed for, orchestrating business
> > transactions across multiple third party systems that otherwise could
> > not talk to each other easily, whilst providing clients with a single
> > view of and interface with that process. Other than that, they offer
> > nothing really. By now you probably get the impression that I think
> > you need an ESB like you need a hole in the head!
>
> > 2) You should adhere to YAGNI. For each iteration of a project you
> > should define precise objectives for each use case you intend to
> > implement *for that iteration*, and equally important you should
> > define non-objectives (constraints), things you are definitely not
> > going to do this time, if ever. Then you do not write a line of code
> > nor use any library that does not directly contribute something
> > tangible to these stated objectives, and secondly you meet these
> > objectives in the simplest and quickest way you possibly can. That's
> > so you get feedback from real users as early as possible which will
> > almost certainly give you some surprises.
>
> > For example, it seems to me that one of your biggest concerns is
> > running on multiple clients, e.g. mobile devices, as well as standard
> > browsers. OK, so you might define an primary objective that the system
> > must be fully functional for a given set of use cases in both a
> > standard browser and on, say, an iPhone, something running Android, or
> > whatever. By doing that you will a) focus your development effort on
> > practical application of the technologies you need to use to meet this
> > specific objective, and b) your server side architecture will
> > automatically evolve to support these two different client interfaces
> > as the practical issues become clear to you. Subsequently adding a
> > third or fourth will then be straight forward, but you don't have to
> > worry about that now.
>
> > If you don't focus like this, you are in danger of never really
> > getting started, never mind finishing.
>
> > regards
> > gregor
>
> > On Jan 14, 4:30 pm, Paranoid Android  wrote:
>
> > > Thank you gregor, your post is very interesting and I basically agree
> > > with your point of view.
> > > Cause I'm a newby in SOA solu

Re: GWT applications memory management

2009-01-15 Thread Lex

Hello Bob,
Thanks for answer, I'll check the article on Microsoft.

Considering the natives, we have prepared test application, where we
exclude all natives, DOM class method calls, and even eventListeners.
Sometimes browser frees some memory, but not all (after memory
release, total browser's memory allocation is greater then before
allocation).

So the problem seems still exists.

On Jan 15, 3:04 pm, Bob Stachel  wrote:
> Try this article as a starting point in understanding IE memory leaks.
> Internet Explorer is far worse than other browsers in memory
> managment.
>
> http://msdn.microsoft.com/en-us/library/bb250448.aspx
>
> If your application uses "pure" GWT you will be somewhat protected
> from leaks, but perhaps you have some native methods that employ
> function closures (by far the easiest way to incur major leaks).
>
> On Jan 14, 9:00 am, Lex  wrote:
>
> > Hello all.
>
> > I'd like to ask the question about the approaches normally used to
> > manage memory in GWT applications. Till the moment I wrote this post,
> > I read most of discussions on the group related to this topik, but
> > unfortunately have no answer on my question.
>
> > What I'm actually looking for: is some guide or list of rules "What is
> > necessary to be done in GWT code, to prevent GWT application to
> > consume more and more memory". This problem occurs in Internet
> > Explorer.
>
> > Currently we are developing rather big application using GWT. During
> > developement process we had noticed that Internet Explorer consumes
> > memory more and more and never release it. We had also noticed that
> > after we press refresh button in IE, it finally releases most of
> > consumed memory (but not all). We try to check out pages with IE leak
> > detectors, sIEve, and Microsoft JS Memory Leak Detector. Those tools
> > are not detect any memory leaks in our application.
>
> > After this we create very simple test. We create SimplePanelwidget,
> > and put some FlexTable on it. After this we put in this flex table
> > different widgets (Buttons, checkboxes, etc.). After we add
> > SimplePanel to the rootPanel, and remove it from root panel. Do this
> > several times (using timer). After each cycle (add, remove SimplePanel
> > from RootPanel) some amount of memory ~200 KB is not released.
>
> > So my questions are following:
> > -  Does the situation when IE is not released all memory it consumes
> > is know issue or not?
> > -  Does anybody know what may be done to reduce or remove at all
> > memory leaking?
> > -  Does anybody have URL to some guides of memory management in GWT
> > applications?
>
> > Any help will be highly appreciated
--~--~-~--~~~---~--~~
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: History and Tab panels

2009-01-15 Thread jake H


I tried something , that managed to do some more than the previous
codes.
But i still have the refresh problem , when refresh button is pressed
even if the url points in a specific page,  the main tab is reloaded.
And when i save a bookmark with subpanel and trying to visit it , i
cant. while in top panel its working.

I provide the code
tpanel is the top level tab panel , while the sub , is the sub tab
panel of a specific top level tab panel.


 tpanel.addTabListener(new TabListener() {
  public void onTabSelected(SourcesTabEvents sender, int 
tabIndex) {
// Push an item onto the history stack
History.newItem("page" + tabIndex);
}
public boolean onBeforeTabSelected(SourcesTabEvents sender, int
tabIndex){

return true;
}

});

  subpanel.addTabListener(new TabListener() {
  public void onTabSelected(SourcesTabEvents sender, int 
tabIndex) {
// Push an item onto the history stack
History.newItem("subpage" + tabIndex);
}
public boolean onBeforeTabSelected(SourcesTabEvents sender, int
tabIndex){

return true;
}

});

History.addHistoryListener(new HistoryListener() {
   public void onHistoryChanged(String historyToken) {
 if(historyToken != null) {
 String check = historyToken.substring(0,4);
 GWT.log("Check value "+check,null);
 String htok;
 int check2=-1;
 if( check.equals("page") )
 {
 htok = historyToken.substring(4,historyToken.length());
 check2 = 0;
 }
 else
 {
 htok = historyToken.substring(7,historyToken.length());
 check2 = 1;
 GWT.log("htok value "+htok,null);
 }

 int index = Integer.parseInt(htok);
 if( check2 == 0 ) {
 if( index >= tpanel.getTabBar().getTabCount()) index = 0;

  tpanel.selectTab(index);
  }
  else if( check2 == 1 ) {
 if( index >= 
subpanel.getTabBar().getTabCount()) index
= 0;

   subpanel.selectTab(index);
  }
 }
   }
});



Any idea?
--~--~-~--~~~---~--~~
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: GWT applications memory management

2009-01-15 Thread Bob Stachel

Try this article as a starting point in understanding IE memory leaks.
Internet Explorer is far worse than other browsers in memory
managment.

http://msdn.microsoft.com/en-us/library/bb250448.aspx

If your application uses "pure" GWT you will be somewhat protected
from leaks, but perhaps you have some native methods that employ
function closures (by far the easiest way to incur major leaks).

On Jan 14, 9:00 am, Lex  wrote:
> Hello all.
>
> I'd like to ask the question about the approaches normally used to
> manage memory in GWT applications. Till the moment I wrote this post,
> I read most of discussions on the group related to this topik, but
> unfortunately have no answer on my question.
>
> What I'm actually looking for: is some guide or list of rules "What is
> necessary to be done in GWT code, to prevent GWT application to
> consume more and more memory". This problem occurs in Internet
> Explorer.
>
> Currently we are developing rather big application using GWT. During
> developement process we had noticed that Internet Explorer consumes
> memory more and more and never release it. We had also noticed that
> after we press refresh button in IE, it finally releases most of
> consumed memory (but not all). We try to check out pages with IE leak
> detectors, sIEve, and Microsoft JS Memory Leak Detector. Those tools
> are not detect any memory leaks in our application.
>
> After this we create very simple test. We create SimplePanelwidget,
> and put some FlexTable on it. After this we put in this flex table
> different widgets (Buttons, checkboxes, etc.). After we add
> SimplePanel to the rootPanel, and remove it from root panel. Do this
> several times (using timer). After each cycle (add, remove SimplePanel
> from RootPanel) some amount of memory ~200 KB is not released.
>
> So my questions are following:
> -  Does the situation when IE is not released all memory it consumes
> is know issue or not?
> -  Does anybody know what may be done to reduce or remove at all
> memory leaking?
> -  Does anybody have URL to some guides of memory management in GWT
> applications?
>
> Any help will be highly appreciated
--~--~-~--~~~---~--~~
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: Date+Time widget

2009-01-15 Thread Serge

Thank you very much!
It works!
--~--~-~--~~~---~--~~
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: Gwt application deployment

2009-01-15 Thread j redick
thanks for caring

i have solved the problem. i have just learned that i need to set service
entry point :D
i have added sometihng like below to my service class.

ServiceDefTarget endpoint = (ServiceDefTarget) messengerService;
endpoint.setServiceEntryPoint( GWT.getModuleBaseURL() + "messenger" );

On Wed, Jan 14, 2009 at 6:59 AM, Litty Preeth  wrote:

> If you hav to make jdbc entries in web.xml depends on your implementation.
> What is the error you are getting?
>
> - Litty Preeth
>
>
> On Wed, Jan 14, 2009 at 5:30 AM, jredick  wrote:
>
>>
>> Hi,
>> first of all i am sorry if this is a stupid question :)
>> I am pretty new on using gwt. I write a simple application that sends
>> and take data from mysql database.
>> But when it comes to deploy my application, i can't manage to do it.
>> Actually i deployed it, but there is a problem on RPC or database. I
>> cannot figure out myself.
>> my question is ; do I need to add some kind of mapping to my web.xml
>> file for database connection ( jdbc) or something like below is
>> enough ?
>>
>> 
>>
>> 
>>   
>>  MyApplication
>>  com.project.server.dataServiceImpl> class>
>>   
>>   
>>  MyApplication
>>  /myapplication
>>   
>> 
>>
>>
>> thanks in advance
>>
>>
>>
>
> >
>

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



Images does not disply on IE browser in vista plateform

2009-01-15 Thread ship

hi
In my web application i display images on web page setting url of
Image object of gwt with the image url. But when i run this
application on vista plateform IE browser does not display image. When
i see the IMG tag it shows src & pending src with the correct url.
This application works good on IE browser in Window plateform but not
on vista plateform.
Pl solve this problem.
--~--~-~--~~~---~--~~
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: Changing the css file at runtime

2009-01-15 Thread Lorenzo Nazario
In order to change the css at runtime (or better not "change" but "append")
try this native method:

public static native void loadCss(String url) /*-{
var fileref=document.createElement("link");
fileref.setAttribute("rel","stylesheet");
fileref.setAttribute("type","text/css");
fileref.setAttribute("href",url);
$doc.getElementsByTagName("head")[0].appendChild(fileref);
}-*/;








2009/1/14 Adam T 
>
> I would say you need to use JSNI - do a search for how to change CSS
> file using JavaScript and then implement something similar wrapped in
> a JSNI method.
>
> You can then call that method to change the style sheet, either
> programmatically by just calling it, or if you want to harness the
> bootstrapping use Deferred Binding on user type to select a subclass
> that calls your method with the appropriate style name, i.e.
>
> public class Basic{
>
> private native void changeStyleSheet(String styleSheetName)/*-{
>   // some javascript code to activate and use styleSheetName as the
> style sheet
> }-*/
>
> public setStyle(){
>   changeStyleSheet("first.css");
> }
> }
>
>
> public class Admin extends Basic{
>  changeStyleSheet("second.css");
> }
>
> then in your module XML have something like
>
> 
>   
>   
> 
>
> 
>
> You'd have to think of a secure way to ensure people can't just
> pretend to be "admin".  An unsecure-ish way would be to use a property
> provider to read the value from your HTML meta properties in the same
> way GWT does for i18n selection.  As Bunsen&Beaker (http://
> code.google.com/p/bunsenandbeaker/wiki/DevGuideSpecifyingLocale) says:
>
> "A property provider is specified in the module XML file as a
> JavaScript fragment that will return the value for the named property
> at runtime. In this case, you would want to define the locale property
> using a property provider. To see examples of 
> definitions in action, see the files I18N.gwt.xml and
> UserAgent.gwt.xml in the GWT source code. "
>
> //Adam
>
>
>
> and a new property provider
>
> //Adam
>
> On 14 Jan, 06:21, Kamlesh  wrote:
> > Hi,
> >
> > I have different css files in my application say user1.css, user2.css
> > and so on corresponding to each user. My requirement is that when a
> > particular user logs in the system (consider the LMS application) I
> > have to apply the css corresponding to that user.
> >
> > How can I achieve this requirement using GWT?
> > Is there an API using which I can change css in onModuleLoad()
> > function itself?
> > Can I handle module xml file configuration using GWT APIs?
> >
> > I have also tried GWT linker to achieve something similar to that, but
> > I am not sure whether that will solve my problem. Please see the
> > following post.
> >
> > http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
> >
> > Regards,
> > Kamlesh
> >

--~--~-~--~~~---~--~~
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: problem in parsing XML

2009-01-15 Thread Jason Morris

It's not really a GWT related question, but heres what you're looking for:

final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
final DocumentBuilder builder = dbf.newDocumentBuilder();
final Document doc = builder.parse(new 
ByteArrayInputStream(xml.getBytes("UTF-8")));

The String parameter accepted from InputSource is a systemId (generally a URI 
of sorts pointing to 
the XML file).

Hope this helps.

javaz wrote:
> hi everyone ,
> i got an error while running the below code in the server side  .Could
> anyone please help me in sorting out the solution to this error?
> 
> here is the code:
> 
> 
>   public boolean saveEmployeeInfo(String xml)  {
>   try{
> 
> InputSource s = new InputSource(new 
> String(xml));//xml is the xml
> document
> DocumentBuilderFactory dbf = 
> DocumentBuilderFactory.newInstance
> ();
> DocumentBuilder db = dbf.newDocumentBuilder();
> Document doc = (Document)db.parse(s);
> doc.getDocumentElement().normalize();
> System.out.println("Root element " + 
> doc.getDocumentElement
> ().getNodeName());
> 
> 
>   }catch(Exception e){
>   e.printStackTrace();
>   }
> 
> 
> 
> 
> here is the error:
> java.net.MalformedURLException:
> 
>  no protocol: gf Name>gfgfdg Designaton>fdgvgfsdg DateofBirth>
> 
>   at java.net.URL.(Unknown Source)
>   at java.net.URL.(Unknown Source)
>   at java.net.URL.(Unknown Source)
>   at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity
> (Unknown Source)
>   at
> com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion
> (Unknown Source)
>   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> (Unknown Source)
>   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> (Unknown Source)
>   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
> Source)
>   at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown
> Source)
>   at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse
> (Unknown Source)
>   at np.com.rts.hris.server.HRISServiceImpl.saveEmployeeInfo
> (HRISServiceImpl.java:24)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   at java.lang.reflect.Method.invoke(Unknown Source)
>   at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
> (RPC.java:527)
>   at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
> (RemoteServiceServlet.java:164)
>   at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
> (RemoteServiceServlet.java:86)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>   at com.google.gwt.dev.shell.GWTShellServlet.service
> (GWTShellServlet.java:289)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:237)
>   at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:157)
>   at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:214)
>   at org.apache.catalina.core.StandardValveContext.invokeNext
> (StandardValveContext.java:104)
>   at org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:520)
>   at org.apache.catalina.core.StandardContextValve.invokeInternal
> (StandardContextValve.java:198)
>   at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:152)
>   at org.apache.catalina.core.StandardValveContext.invokeNext
> (StandardValveContext.java:104)
>   at org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:520)
>   at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:137)
>   at org.apache.catalina.core.StandardValveContext.invokeNext
> (StandardValveContext.java:104)
>   at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:118)
>   at org.apache.catalina.core.StandardValveContext.invokeNext
> (StandardValveContext.java:102)
>   at org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:520)
>   at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:109)
>   at org.apache.catalina.core.StandardValveContext.invokeNext
> (StandardValveContext.java:104)
>   at org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:520)
>   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java

how to get the xml value from outside javascript file into entry point class

2009-01-15 Thread ramesh chiluveri

Hai All,

This is regarding passing xml data from outside javascript file into
GWT entry point class.

My requirement like this, i need to get the some xml data from other
javascript file into GWT entry point class.

I written native function ,it will generate javascript function ,so
that i can access this function from outside the gwt application.

here my code:

public class Home implements EntryPoint {
public static String xmldata = "";
private Button clickMeButton;
public void onModuleLoad() {
popupwin();


}
 public static void GetHelpPopupPanel(String s) {
xmldata = s;
   //here some code
}
public static native void popupwin() /*-{

   $wnd.winpopup = function(s){
   @com.mantra.mydraw2d.client.Home::GetHelpPopupPanel(Ljava/lang/
String;)(s);
   }
}-*/;

}
now i can access winpopup from outside GWT application.

it is working fine when i pass simple string value.but when i pass xml
data with attributes as a string ,it is not passing correct data.it is
missing node names and some other attributes.

please help me to complete my requirement.

Thank you


--~--~-~--~~~---~--~~
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: how to listen to ESC key for popup

2009-01-15 Thread Hasan Turksoy
you can override the PopupPanel#onKeydownPreview method like below;

@Override
public boolean onKeyDownPreview(char key, int modifiers) {
// Use the popup's key preview hooks to close the dialog when either
// enter or escape is pressed.
switch (key) {
case KeyboardListener.KEY_ENTER:
case KeyboardListener.KEY_ESCAPE:
hide();
break;
}

return true;
}


Hasan...
http://www.jroller.com/hasant


On Thu, Jan 15, 2009 at 11:17 AM, aragorn  wrote:

>
> My application displays a popup whenevr a particular button is
> clicked. Now i can hide the popup whenever the user clicks the mouse
> outside of it using the default popup-panel property provided by GWT.
> Apart from that I also need to listen to keyboard so that if the user
> hits ESC on the keyboard my popup should disappear from the screen.
> Any idea how to implement in gwt?
>
> >
>

--~--~-~--~~~---~--~~
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: GWT and Business Intelligence.

2009-01-15 Thread Kevin Tarn
GWT is just a framework that can let a Java developer utilize OOP to develop
a web service easily. Under this benefit, it also easily integrate existing
server part technology or any other services already opened in internet.

Before GWT, there are a lot of 3rd party libraries implemented by AJAX. The
web designer who familiar with javascript may not be required to familiar
with OO design. So your question is concerned by what type and capability of
your human resource in your organization.

As we can foresee, more and more web services or javascript libraries will
have a wrapper in GWT. There are also bunch of growing libraries that are
implemented in purely GWT and opened source. It will minimize the effort to
create a new service. GWT's branch, OOPHM, that has already integrated
existing web browsers as host browser in development environment. The
developer can easily debug and develop consistent solution in variant
commercial browser.

Kevin

On Wed, Jan 14, 2009 at 7:53 PM, Miroslav Genov wrote:

>
> Hello,
>  First I wanna thank on all of you for the answers. As it seems there
> is an already solution that is doing this, but I was wondering if using
> of GWT is appropriate for that kind of applications ?
>
>  My idea was to see whether there are people in the mailing list that
> are having experience with such or similar applications.
>
>  With most of the web frameworks the developers can reach the final
> goal but on what costs ? - time for learning, time for development and
> etc.
>
>
> Regards,
>   Miroslav
>
>
>
> On Wed, 2009-01-14 at 01:59 -0800, Thomas Broyer wrote:
> >
> >
> > On 13 jan, 13:10, Kevin Tarn  wrote:
> > > Vanilla seems to be blocked for download.
> >
> > Actually seems like a broken link (and outdated site: Vanilla is now
> > at version 1.3).
> > Downloads can be found here: http://www.bpm-conseil.org/
> >
> > (I wouldn't look at the source code if I were you; it's just a proof
> > that it can be done, not at all a "reference implementation" that you
> > would use as an inspiration)
> > >
>
>
> >
>

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



set fixed size for popup and enable scrolling within it

2009-01-15 Thread aragorn

I have a popuppanel which wraps a flowpanel within itself. Now i want
this popup to occupy only some portion of the screen. In case the
flowpanel exceeds the mentioned limits, the popup should display a
scrollbar. I tried setting this using CSS by usinf overflow:auto but
it doesnt work. If u know any way t do it plz let me know
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



how to listen to ESC key for popup

2009-01-15 Thread aragorn

My application displays a popup whenevr a particular button is
clicked. Now i can hide the popup whenever the user clicks the mouse
outside of it using the default popup-panel property provided by GWT.
Apart from that I also need to listen to keyboard so that if the user
hits ESC on the keyboard my popup should disappear from the screen.
Any idea how to implement in gwt?

--~--~-~--~~~---~--~~
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: GWT for SOA development

2009-01-15 Thread Paranoid Android

Thank you gregor, I think your advices could be very useful to me.
My biggest concern, anyway, is not to run on multiple clients. Even if
I can't discard this possibility by now, it has not yet been
identified as a requirements of the application.
The biggest concern is to expose a set of features that future
developers that want to add some higher level functionalities can use
with no or minimal changes to the underlying architecture.
As I said, specifically to the domain of the application, something
pretty similar to Google OpenSocial Apis, but using standars like web
services.
This is the biggest concern, than the system should be scalable and
maybe distributed, so the architecture must be
thought in a way that it will not be a problem if users scale from 100
to 10.
This is the general picture. So, thinking about it, maybe an ESB is
not really what I need, anyway I must expose feature both locally and
remotely and thus I'm going to look for other technologies to achieve
that, maybe EJB's as you suggested..
Only a thing make me doubtful: the project manager suggest that a
message/event driven architecture may be a better solution over a
classical MVC architecture, but I can't find another solution for a
good message driven solution other than an ESB..


On Jan 14, 7:06 pm, gregor  wrote:
> Paranoid,
>
> 1) ESB's are good at, and designed for, orchestrating business
> transactions across multiple third party systems that otherwise could
> not talk to each other easily, whilst providing clients with a single
> view of and interface with that process. Other than that, they offer
> nothing really. By now you probably get the impression that I think
> you need an ESB like you need a hole in the head!
>
> 2) You should adhere to YAGNI. For each iteration of a project you
> should define precise objectives for each use case you intend to
> implement *for that iteration*, and equally important you should
> define non-objectives (constraints), things you are definitely not
> going to do this time, if ever. Then you do not write a line of code
> nor use any library that does not directly contribute something
> tangible to these stated objectives, and secondly you meet these
> objectives in the simplest and quickest way you possibly can. That's
> so you get feedback from real users as early as possible which will
> almost certainly give you some surprises.
>
> For example, it seems to me that one of your biggest concerns is
> running on multiple clients, e.g. mobile devices, as well as standard
> browsers. OK, so you might define an primary objective that the system
> must be fully functional for a given set of use cases in both a
> standard browser and on, say, an iPhone, something running Android, or
> whatever. By doing that you will a) focus your development effort on
> practical application of the technologies you need to use to meet this
> specific objective, and b) your server side architecture will
> automatically evolve to support these two different client interfaces
> as the practical issues become clear to you. Subsequently adding a
> third or fourth will then be straight forward, but you don't have to
> worry about that now.
>
> If you don't focus like this, you are in danger of never really
> getting started, never mind finishing.
>
> regards
> gregor
>
> On Jan 14, 4:30 pm, Paranoid Android  wrote:
>
> > Thank you gregor, your post is very interesting and I basically agree
> > with your point of view.
> > Cause I'm a newby in SOA solutions, I'm reading and reading things and
> > asking to more expert people like you.
> > In fact I think I need little of integration of different systems (no
> > legacy systems to integrate etc).
> > But the key in my project is that I must provide interfaces for the
> > future development of functionalities, in a similar way as OpenSocial
> > by Google does, but using other standards.
> > So my project is not "completely SOA", in the sense that not
> > everything in my system must be distributed, orchestred, exposed etc,
> > but a portion of it does.
> > I though that ESB's like, for example, Apache ServiceMix can be useful
> > because they provide a way to implements services as POJO's and take
> > care to expose remote interfaces (bindings) for different types of
> > consumer that will be developed in the future and because they provide
> > a way to route messages through services etc..
> > But I'm wondering if they provide a way to interact with services that
> > are local through a local interface (i.e. the model inside my app will
> > interact with such services through a local interface exposed by the
> > ESD, while other remote consumers that will eventually be developed in
> > the future can access these services through, for example, REST or
> > SOAP without the need to wrap these functionalities).
> > For these reasons I'm thinking about a SOA solution, even if not
> > everything will be a service etc...
> > The general, high level architecture I'm 

Effect of using implementations rather than interfaces in client data model

2009-01-15 Thread Ravi M

Hi all

I have a couple of somewhat basic, related and possibly duh! type
questions (which the subject of this post doesn't articulate very
well!) that I can't seem to find answers to on the forum etc. Couple
of points before the actual questions.

1. This is using GWT 1.4.6x, if that makes a difference.
2. Am not talking about RPC/serializable classes, but about data
objects that are used purely on the client side.

1. When designing the client side data model, does it make a
difference in terms of performance/optimization whether one uses
concrete implementations rather than interfaces (especially for things
in the collections framework)? More specifically, suppose I have a
data model class defined like so:

public class DataModel {
private String aString;
private List aList = new ArrayList();
private Map aMap = new HashMap();

// Methods that provide access to the data
}

Is there any advantage in terms of ease of compilation/client
performance/size of compiled Javascript if the above is declared like
so, instead:

public class DataModel {
private String aString;
private ArrayList aList = new ArrayList();
private HashMap aMap = new HashMap();

// Methods that provide access to the data
}

2. Does using the @gwt.typeArgs annotation in any way affect the
behaviour/performance of pure client side data objects? For example,
would doing like so:

public class DataModel {
private String aString;
/**
 * @gwt.typeArgs 
 */
private ArrayList aList = new ArrayList();
/**
 * @gwt.typeArgs 
 */
private HashMap aMap = new HashMap();
// Methods that provide access to the data
}

help in any way? AFAIK, the @gwt.typeArgs annotation has to do _only_
with RPC for GWT serializable objects and remote interfaces.

Thanks and regards

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



application (with custom shell servlet) is not working at external tomcat

2009-01-15 Thread Hasan Turksoy
Hi all,

i've implemented a custom servlet (which is extending from GWTShellServlet)
only to response my main gwt page requests, otherwise, will call super.doGet
or super.doPost. it is like this;

/**
 * Custom servlet which extends GWT's one to make it possible to use other
 * formats(like JSP, FreeMarker) as application main page.
 *
 * @author Hasan
 */
public class CustomShellServlet extends GWTShellServlet {
@Override
protected void doGet(final HttpServletRequest request, final
HttpServletResponse response) throws ServletException, IOException {
if (processIfMyCustomRequest(request, response))
return;
super.doGet(request, response);
}

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
if (processIfMyCustomRequest(request, response))
return;
super.doPost(request, response);
}
...
}

this is working at hosted mode but not working when i want to deploy my app
to an external tomcat instance. When i made my custom request (in fact,
which will generate the main gwt html file with some additional script
codes), it is entering my custom servlet, responding main application html
normally but i see an empty screen whose html source (view source) seems
normal - as below;

request: http://localhost:8080/apiks/ApiksApp.do
response:


  






ApiksApp


var parameters = {
action: "",
id: ""
};









  

  
  
  
  
  

  




  


result: empty screen!

web.xml content:



shell

edu.hacettepe.bote.server.servlet.CustomShellServlet



shell
/*




ApiksService

edu.hacettepe.bote.server.service.ApiksServiceImpl



ApiksService
/ApiksService

--

seems it's not loading gwt script file... or something i can not see...
anybody knows? what may be the problem?

Thanks in advance,

Hasan...

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

2009-01-15 Thread Harald Pehl

On 14 Jan., 02:44, zhouxing fang  wrote:
> hi,Harald,can you give more detail of your project? Is it possible to use
> RESTful service with Ext-GWT?

We're using the following architecture / frameworks:
1. Server: Restlet & Spring
2. Client: Restlet-GWT module & GXT (http://extjs.com/products/gxt/)


A typical request / response could be something like that (assuming
that we're using XML):

Client / UserService.java:
public class UserService
{
public void getUsers()
{
new Client(Protocol.HTTP).get("http://server/users"; new
Callback()
{
public void onEvent(Request request, Response response)
{
XmlRepresentation xmlRepresentation =
response.getEntityAsXml();
Document doc = xmlRepresentation.getDocument();
[parse XML]
}
});
}
}

Server / UsersResource.java (registered to handle "http://server/
users"):
public class UsersResource extends Resource
{
public void UsersResource(Context context, Request request,
Response response)
{
super(context, request, response);
getVariants().add(new Variant(MediaType.TEXT_XML));
}

public Representation represent(Variant variant) throws
ResourceException
{
Representation result = new DomRepresentation
(diaType.TEXT_XML);
Document doc = rep.getDocument();
[Populate doc with users...]
return result;
}

At the client side we parse the XML and turn it into ModelData
instances so we can use them in the GXT widgets.
In case of POST or PUT requests, we use forms at the client side and
the Spring validation framework on the server side to validate and
convert the form into POJOs.

I'm not that familiar with GWT-EXT, but as they are very similiar in
turn of classes / concepts, you should be able to use a similar
approach.

There's a preety good example of the Restlet-GWT module available at:
http://wiki.restlet.org/docs_1.1/13-restlet/144-restlet/188-restlet.html

Hope that helps!

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