Re: Fetching images for users: where to put them?

2012-04-04 Thread Matias Costa
In web.xml:


imageReceiver
xxx.ImageReceiver


imagePath
/the/place



And in the servlet:

public void init(ServletConfig servletConfig) throws ServletException{
imagePath = servletConfig.getInitParameter("imagePath");
if (!imagePath.endsWith(File.separator)) imagePath += File.separator
try {
File imageFolder = new File(imagePath);
if (!File.exists()) Util.mkdirRecursive(imagePath);
} catch ... whatever you want to do if something fails
  }

El martes 3 de abril de 2012 03:21:06 UTC+2, Sam W escribió:
>
> Hello, 
>
> I haven't been able to figure this out after spending 3 hours on 
> Google. 
>
> I can fetch an image, but I don't know where to put them. 
> If I just use "new File("image.jpg")", it will end up in my tomcat 
> bin/ folder. 
>
> Some sugggests to use getServletContext().getRealPath("/"); but it 
> would block forever at "getServletContext", I don't know why. 
>
> What should I do so it will be part of the war, thus clients can 
> access it via "http://path.to/appname/images/someimage.jpg";? 
>
> What is the best practice on this? 
>
> Thank you so much. 
> Sam

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Bv7olVKpJqYJ.
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 share classes between two different modules with two different pages

2012-03-22 Thread Matias Costa
And you have in moduleB.gwt.xml ?



El jueves 22 de marzo de 2012 14:46:07 UTC+1, Deepak Singh escribió:
>
> It did not work.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/9QKJU7YLmEwJ.
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 share classes between two different modules with two different pages

2012-03-21 Thread Matias Costa
I would create a base module from which A and B inherit.

Or you can try in moduleB.gwt.xml



El miércoles 21 de marzo de 2012 16:16:46 UTC+1, Deepak Singh escribió:
>
> Yes i have two seperate *.gwt.xml for both the modules.
> And i inherit ModuleB into moduleA as follows:
>
> ModuleA.gwt.xml
> 
>
> And then i use
>  com.pdstechi.modulenameB.shared.AbcDto   into 
> com.pdstechi.modulenameA.client package, it fails compilation with message 
>
> 'Source code for   com.pdstechi.modulenameB.shared.AbcDto  is not 
> available'.
>
> Thanks
> Deepak
>
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Pchfn1wJN08J.
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: MVP and RPC: What makes sense?

2012-02-20 Thread Matias Costa
> why should the View tell the Presenter "get the file" and the Presenter 
the tell the 
> view "show this file".

Because :

1) Error handling, this complicates the logic.
2) Display independence. Useful if you go mobile or more usual, while you 
create a new version of the interface, you can have a stable version to 
ship updates.
3) Testability. It is easy to test blind logic. Good luck testing a view.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/cZUvmRZ6_rIJ.
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: Is it bad practice to use links like "#viewObject104" instead of eventBus.fireEvent(viewObjectEvent(id)) ?

2012-02-09 Thread Matias Costa
> I personally prefer links, because it also allows the user to open the 
> link in another window or tab. 

And the history works

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/07ITHl41q5QJ.
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.