GWT URL parameters not setting and getting when has domain

2017-05-25 Thread Julio Heitor Nobrega
Hi guys,

I have an issue that you could help me. I am developing a e-commerce GWT 
website and when i access the paltform using the IP address i can get and 
set url parameters(product id and profile id) with no problem.

But when i access the platform using the DNS domain (eious.com) no 
parameters is set and even if i put the parameters manually, the app cannot 
get the values.

Do you know why this hapens? If you like to check out the platform using 
the IP you can access by this url: 104.236.209.250:8086 
.

Best regards!

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: CustomButton implementation leads to incorrect handling of PushButton by screen readers

2016-12-14 Thread Julio Feferman
Created issue https://github.com/gwtproject/gwt/issues/9471 which 
references the patch.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: CustomButton implementation leads to incorrect handling of PushButton by screen readers

2016-12-13 Thread Julio Feferman
Thanks for pointing out. I'll make the change specific for PushButton and 
follow your indications. 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: CustomButton implementation leads to incorrect handling of PushButton by screen readers

2016-12-13 Thread Julio Feferman


On Tuesday, December 13, 2016 at 7:50:43 AM UTC-2, Thomas Broyer wrote:
>
>
>
> On Tuesday, December 13, 2016 at 8:14:50 AM UTC+1, Julio Feferman wrote:
>>
>> I am instrumenting an application for best possible support for assistive 
>> technologies (ATs) such as screen readers, using GWT's ARIA implementation. 
>> I see that the CustomButton widget setEnabled() method sets the 
>> aria-pressed attribute on the button element if it is enabled. This is fine 
>> for a ToggleButton but wouldn't it be incorrect for a PushButton? When the 
>> aria-pressed attribute is present, screen readers interpret the widget as a 
>> toggle button. In the case of a push button, however, this attribute should 
>> not be present, in order to allow the AT to click the widget via keyboard 
>> commands, instead of toggling it. 
>>
>
> From the code, it looks like it sets the aria-pressed state to either true 
> or false depending on the current pressed state when enabled, and un-sets 
> the state when disabled.
> The thing is, a PushButton is CustomButton, which actually is a kind of 
> "toggle button". The ToggleButton makes it easier to work with by adding 
> style names corresponding to the "faces", providing constructors to easily 
> create such "faces", and having a boolean value corresponding to the 
> "pressed" state. And the PushButton is actually one such button that is 
> only "pressed" while the mouse button or keyboard key is depressed.
> This seems to be in line with the WAI ARIA spec: 
> https://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed, with 
> the exception that most people don't see a PushButton as such a "special 
> kind of toggle button"; so I'd agree with you that aria-pressed shouldn't 
> be used for a PushButton (leaky abstraction).
>
> Actually, I strongly believe CustomButton and derivatives are a legacy 
> that should be avoided. They're from a time where you couldn't easily style 
> , or  to create toggle buttons; this is no 
> longer the case.
> Don't use a PushButton, use a Button instead. And I'd even say don't use a 
> ToggleButton, use a Checkbox (or RadioButton) with proper styling, and 
> possibly add ARIA attributes to make it "appear" like a toggle button to 
> ATs too.
>
> Even though I believe those widgets should be deprecated, feel free to 
> propose a patch, I'll (help) review it. I'm not sure we could come up with 
> a viable patch though: CustomButton is "too abstract", and yet we don't 
> want to move the ARIA handling to subclasses as that would remove it from 
> existing custom widgets people could have written based on CustomButton. 
> Maybe add a boolean (add constructor overloads) telling the CustomButton 
> whether it's a toggle button or a command button? (that seems slightly 
> wrong though, as that'd mean the onClick/onClickStart/onClickCancel could 
> probably use that information too instead of relying on subclasses to 
> change the button's behavior).
> No, really, the long-term solution is to deprecate at least PushButton and 
> move on to Button.
>

I agree that we should perhaps switch our uses of PushButton to a Button. 
However, I still believe ToggleButton is convenient for a series of use 
cases. For instance, a disclosure arrow that has an untoggled/toggled face 
(pointing right or down), in which case radio/checkbox are not appropriate. 
I'm submitting a patch here for CustomButton that inserts aria-pressed only 
in the case of (instanceof) a ToggleButton, completely removing the 
attribute for PushButton without interfering with the subclasses or current 
uses. The functionality would be preserved while only removing aria-pressed 
from PushButton. Thank you very much for your help.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
--- CustomButton.java   2016-12-13 14:54:01.0 -0200
+++ CustomButtonNew.java2016-12-13 14:51:30.0 -0200
@@ -749,7 +749,7 @@
   if (!enabled) {
 cleanupCaptureState();
 Roles.getButtonRole().removeAriaPressedState(getElement());
-  } else {
+  } else if (this instanceof ToggleButton) {
 setAriaPressed(getCurrentFace());
   }
 }
@@ -925,7 +925,7 @@
   setCurrentFaceElement(newFace.getFace());
   addStyleDependentName(curFace.getName());
 
-  if (isEnabled()) {
+  if (isEnabled() && this instanceof ToggleButton) {
 setAriaPressed(newFace);
   }
 }
@@ -1102,4 +1102,3 @@
 setCurrentFace(newFaceID);
   }
 }
-


CustomButton implementation leads to incorrect handling of PushButton by screen readers

2016-12-12 Thread Julio Feferman
I am instrumenting an application for best possible support for assistive 
technologies (ATs) such as screen readers, using GWT's ARIA implementation. 
I see that the CustomButton widget setEnabled() method sets the 
aria-pressed attribute on the button element if it is enabled. This is fine 
for a ToggleButton but wouldn't it be incorrect for a PushButton? When the 
aria-pressed attribute is present, screen readers interpret the widget as a 
toggle button. In the case of a push button, however, this attribute should 
not be present, in order to allow the AT to click the widget via keyboard 
commands, instead of toggling it. 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Opening a File Chooser (using FileUpload Widget) from a DialogBox

2016-04-12 Thread Julio Heitor Nobrega

   Dear friends,

   i am having some problemas using the *FileUpload *widget and the 
*DialogBox*.

  If i try to open the file chooser to choose a image from the file system 
from FileUpload like this:

new *ClickHandler*() {

@Override
public void* onClick(*ClickEvent event) {

*FileUploader *upload = new 
*FileUploader*((Image)event.getSource()
*);*upload*.click*();
}
};

  Everything goes fine because the image is attached direct to the 
RootPanel.

  Buy if i use the same code with the image (or could be a button as well) 
inside a *DialogBox*, nothing happens and the file chooser does not open.

  I am using the GWT 2.7.

  Could anyone help me with this?

  Best regards!

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT WYSIWYG Editor

2016-04-11 Thread Julio Heitor Nobrega

   Hi Guys,

  does anyone know if there is some WYSIWYG Editor for GWT?  I have found 
some old projects that implement the basic stuff but it does not work 
anymore in a GWT 2.7 project.

  If someone has any RichTextToolBar to share here, please let me know!

  Regards!

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Uploading Local Image Content

2016-03-18 Thread Julio Heitor Nobrega

  Dear friends,

  i am trying to upload a file system image's content to my GWT site and i 
stumbled across this code:

   

   *public*


* final native void readAsDataURL(MyClass that, FileUpload input) /*-{
 var files = 
inp...@com.google.gwt.user.client.ui.FileUpload::getElement()().files;
 var reader = new FileReader();  
 reader.onload = function (evt) {
 that.@...MyClass::done(Ljava/lang/String;)(evt.target.result);
 }
 reader.readAsDataURL(files[0]);
}-*/;*  I am assuming that some attribute of MyClass is receiving the 
image's content. But i dont know neither what
attribute is that nor how to choose another one.

  Could someone help me?

  Best Regards!

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Forbidden words Service for GWT

2016-02-25 Thread Julio Heitor Nobrega

   I have found a paid webservice: webpurify.com

   It handles 15 languages but i would have to test if it identifies bad 
words of all kind.
 
   I have also found a quite nice google list that could be a good start 
(download it from github): 
http://laughingsquid.com/the-full-list-of-bad-words-banned-by-google/ 

  Regards!
 
Em quinta-feira, 25 de fevereiro de 2016 09:56:38 UTC-3, Julio Heitor 
Nobrega escreveu:
>
>
> Hey guys,
>
> i am developing a e-commerce site using GWT and i would like to ask if 
> there is some paid/free webservice solution that verifies the existence of 
> forbidden words (violence, sexual, weapon and/or  hate related) give a 
> String.
>
> Best regards! 
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Forbidden words Service for GWT

2016-02-25 Thread Julio Heitor Nobrega

Hey guys,

i am developing a e-commerce site using GWT and i would like to ask if 
there is some paid/free webservice solution that verifies the existence of 
forbidden words (violence, sexual, weapon and/or  hate related) give a 
String.

Best regards! 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-27 Thread Julio Heitor Nobrega
Hi Claudio,

thank you for your post. You method could only be used if implemented on
the server side.

GWT does not support the awt API.

Regards!

2016-01-27 8:01 GMT-02:00 Kirill Prazdnikov <pkir...@gmail.com>:

> How do you use AWT code in client GWT code ?
>
>
> On Wednesday, January 27, 2016 at 12:19:15 PM UTC+3, claudio sergio
> Goncalves wrote:
>>
>> Hi julio
>>
>> i use this routine to redimensione my images
>>
>> public static BufferedImage redimensionarImagem(BufferedImage img, int
>> maltura, int mlargura) throws Exception {
>>
>> java.awt.Image imagem = (java.awt.Image) img;
>> java.awt.Image thumbs = ((java.awt.Image) imagem)
>> .getScaledInstance(mlargura, maltura, BufferedImage.SCALE_SMOOTH);
>> BufferedImage buffer = new BufferedImage(mlargura, maltura,
>> BufferedImage.TYPE_INT_RGB);
>> buffer.createGraphics().drawImage(thumbs, 0, 0, null);
>> return buffer;
>> }
>> pass the width and height in pixels (maltura e mlargura)
>> After thar you can upload the image.
>>
>> cheers
>>
>> Claudio
>>
>>
>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>> Nobrega escreveu:
>>>
>>> Hi guys,
>>>
>>> i am trying to upload images with 2mb size but i don't want to send the
>>> whole original image to the server.
>>>
>>> What i would like to do is reduce the image dimensions from, for
>>> example, *1000x1000* to *50x50* and reduce the file size
>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to
>>> the server.
>>>
>>> I know there is the Scalr framework that does that in java, but its no
>>> compatible with GWT clients.
>>>
>>> Is there any client side GWT library that does the same thing as Scalr?
>>>
>>> Best Regards!
>>>
>>>
>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
As a matter of fact, i am beginning to think that its more wise to send the
whole image to the server, scale it using Scalr and store it into the DB.

I want to have the control of the image size, test levels of quality. The
Scalr has a mode called 'Automatic' that fits your image to the dimensions
you pass to it.

None of it i will have with GWT Canvas.

The only drawback i would get using Scalr is that i will consume more
bandwidth DigitalOcean  gives me monthly because i will have to send the
whole image to the server.

2016-01-25 12:52 GMT-02:00 Julio Heitor Nobrega <juliohnobr...@gmail.com>:

> Thanks for your answer Greg!
>
> Actually, i really need a byte array because i will store it in a BLOB
> database column.
>
> Regards!
>
> 2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:
>
>> Just use context.getCanvas().toDataUrl(); which will return data uri with
>> the contents of the canvas. You can use it directly in  element
>> or send it to server.
>>
>> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega
>> wrote:
>>>
>>> I have just found an example (http://c.gwt-examples.com/home/ui/canvas).
>>>
>>> The only problem is to convert ImageData to an byte array :)
>>>
>>> Regards!
>>>
>>>
>>>
>>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com>:
>>>
>>>> Does anyone have some examples regarding the Canvas class?
>>>>
>>>> I've seen the java doc API but the only methods i think that could be
>>>> useful was:
>>>>
>>>> Context2d
>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>>>  *getContext2d
>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
>>>> ()
>>>>   Returns a 2D rendering context.
>>>>  void *setCoordinateSpaceHeight
>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
>>>> (int height)
>>>>   Sets the height of the internal canvas coordinate space.
>>>> void *setCoordinateSpaceWidth
>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
>>>> (int width)
>>>>   Sets the width of the internal canvas coordinate space.
>>>>
>>>> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pki...@gmail.com>:
>>>>
>>>>> Canvas is an DOM Element.
>>>>> It can render Image Elements to itself in any resolution.
>>>>> However it may produce not nice results.
>>>>>
>>>>> It depends on what you need.
>>>>>
>>>>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor
>>>>> Nobrega wrote:
>>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> thanks everyone for the answers!
>>>>>>
>>>>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT
>>>>>> itself?
>>>>>>
>>>>>> Do you have any example of use?
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>>
>>>>>>
>>>>>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>>>>>> Nobrega escreveu:
>>>>>>>
>>>>>>> Hi guys,
>>>>>>>
>>>>>>> i am trying to upload images with 2mb size but i don't want to send
>>>>>>> the whole original image to the server.
>>>>>>>
>>>>>>> What i would like to do is reduce the image dimensions from, for
>>>>>>> example, *1000x1000* to *50x50* and reduce the file size
>>>>>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image
>>>>>>> to the server.
>>>>>>>
>>>>>>> I know there is the Scalr framework that does that in java, but its
>>>>>>> no compatible with GWT clients.
>>>>>>>
>>>>>>> Is there any client side GWT library that does the same thing as
>>>>>>> Scalr?
>>>>>>>
>>>>>>> Best Regards!
>>>>>>>
>>>>>>>
>>>>>>> --

Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Does anyone have some examples regarding the Canvas class?

I've seen the java doc API but the only methods i think that could be
useful was:

Context2d
<http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
*getContext2d
<http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
()
  Returns a 2D rendering context.
 void *setCoordinateSpaceHeight
<http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
(int height)
  Sets the height of the internal canvas coordinate space.
void *setCoordinateSpaceWidth
<http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
(int width)
  Sets the width of the internal canvas coordinate space.

2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pkir...@gmail.com>:

> Canvas is an DOM Element.
> It can render Image Elements to itself in any resolution.
> However it may produce not nice results.
>
> It depends on what you need.
>
> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor Nobrega
> wrote:
>>
>> Hi guys,
>>
>> thanks everyone for the answers!
>>
>> Greg,  is Canvas a GWT framework or its a class that belong to GWT itself?
>>
>> Do you have any example of use?
>>
>> Regards
>>
>>
>>
>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>> Nobrega escreveu:
>>>
>>> Hi guys,
>>>
>>> i am trying to upload images with 2mb size but i don't want to send the
>>> whole original image to the server.
>>>
>>> What i would like to do is reduce the image dimensions from, for
>>> example, *1000x1000* to *50x50* and reduce the file size
>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to
>>> the server.
>>>
>>> I know there is the Scalr framework that does that in java, but its no
>>> compatible with GWT clients.
>>>
>>> Is there any client side GWT library that does the same thing as Scalr?
>>>
>>> Best Regards!
>>>
>>>
>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
I have just found an example (http://c.gwt-examples.com/home/ui/canvas).

The only problem is to convert ImageData to an byte array :)

Regards!



2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <juliohnobr...@gmail.com>:

> Does anyone have some examples regarding the Canvas class?
>
> I've seen the java doc API but the only methods i think that could be
> useful was:
>
> Context2d
> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>  *getContext2d
> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
> ()
>   Returns a 2D rendering context.
>  void *setCoordinateSpaceHeight
> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
> (int height)
>   Sets the height of the internal canvas coordinate space.
> void *setCoordinateSpaceWidth
> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
> (int width)
>   Sets the width of the internal canvas coordinate space.
>
> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pkir...@gmail.com>:
>
>> Canvas is an DOM Element.
>> It can render Image Elements to itself in any resolution.
>> However it may produce not nice results.
>>
>> It depends on what you need.
>>
>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor Nobrega
>> wrote:
>>>
>>> Hi guys,
>>>
>>> thanks everyone for the answers!
>>>
>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT
>>> itself?
>>>
>>> Do you have any example of use?
>>>
>>> Regards
>>>
>>>
>>>
>>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>>> Nobrega escreveu:
>>>>
>>>> Hi guys,
>>>>
>>>> i am trying to upload images with 2mb size but i don't want to send the
>>>> whole original image to the server.
>>>>
>>>> What i would like to do is reduce the image dimensions from, for
>>>> example, *1000x1000* to *50x50* and reduce the file size
>>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to
>>>> the server.
>>>>
>>>> I know there is the Scalr framework that does that in java, but its no
>>>> compatible with GWT clients.
>>>>
>>>> Is there any client side GWT library that does the same thing as Scalr?
>>>>
>>>> Best Regards!
>>>>
>>>>
>>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "GWT Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Thanks for your answer Greg!

Actually, i really need a byte array because i will store it in a BLOB
database column.

Regards!

2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:

> Just use context.getCanvas().toDataUrl(); which will return data uri with
> the contents of the canvas. You can use it directly in  element
> or send it to server.
>
> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega
> wrote:
>>
>> I have just found an example (http://c.gwt-examples.com/home/ui/canvas).
>>
>> The only problem is to convert ImageData to an byte array :)
>>
>> Regards!
>>
>>
>>
>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com>:
>>
>>> Does anyone have some examples regarding the Canvas class?
>>>
>>> I've seen the java doc API but the only methods i think that could be
>>> useful was:
>>>
>>> Context2d
>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>>  *getContext2d
>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
>>> ()
>>>   Returns a 2D rendering context.
>>>  void *setCoordinateSpaceHeight
>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
>>> (int height)
>>>   Sets the height of the internal canvas coordinate space.
>>> void *setCoordinateSpaceWidth
>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
>>> (int width)
>>>   Sets the width of the internal canvas coordinate space.
>>>
>>> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pki...@gmail.com>:
>>>
>>>> Canvas is an DOM Element.
>>>> It can render Image Elements to itself in any resolution.
>>>> However it may produce not nice results.
>>>>
>>>> It depends on what you need.
>>>>
>>>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor Nobrega
>>>> wrote:
>>>>>
>>>>> Hi guys,
>>>>>
>>>>> thanks everyone for the answers!
>>>>>
>>>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT
>>>>> itself?
>>>>>
>>>>> Do you have any example of use?
>>>>>
>>>>> Regards
>>>>>
>>>>>
>>>>>
>>>>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor
>>>>> Nobrega escreveu:
>>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> i am trying to upload images with 2mb size but i don't want to send
>>>>>> the whole original image to the server.
>>>>>>
>>>>>> What i would like to do is reduce the image dimensions from, for
>>>>>> example, *1000x1000* to *50x50* and reduce the file size
>>>>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image
>>>>>> to the server.
>>>>>>
>>>>>> I know there is the Scalr framework that does that in java, but its
>>>>>> no compatible with GWT clients.
>>>>>>
>>>>>> Is there any client side GWT library that does the same thing as
>>>>>> Scalr?
>>>>>>
>>>>>> Best Regards!
>>>>>>
>>>>>>
>>>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "GWT Users" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> google-web-toolkit+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to google-we...@googlegroups.com.
>>>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Hi Alain,

nice code! I am going to do this but in a java version code. I just didn't
know i could get the image path from a 'value' of the

document.getElementById("fileUpload")

I could even show a image preview to the user before send it to the server!

Or maybe convert the base64 String to byte array, scale it and then send to
the server :)

Thanks!

2016-01-25 14:22 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:

> I think what you should to is get the base64  representation of the image
> from the canvas. Something like
>
> var p;var canvas = document.createElement("canvas");
> var img1=document.createElement("img");
> function getBase64Image(){
> p=document.getElementById("fileUpload").value;
> img1.setAttribute('src', p);
> canvas.width = img1.width;
> canvas.height = img1.height;
> var ctx = canvas.getContext("2d");
> ctx.drawImage(img1, 0, 0);
> var dataURL = canvas.toDataURL("image/png");alert("from getbase64 
> function"+dataURL );
> return dataURL;}
>
> Then send the base64 to the server and corvert it to byterarry or whatever
> format you need there to save it to disc,
>
>
>
> On 25 January 2016 at 17:11, Julio Heitor Nobrega <juliohnobr...@gmail.com
> > wrote:
>
>> Hi Alain,
>>
>> i am doing exactly that. I am sending the byte array to the server,
>> saving it as a file in a directory and storing the path in a DB column.
>>
>> My problem is to get the byte array from the file (is it possible to get
>> the byte array using FileUpoad?) and work on it before send to the server.
>>
>> 2016-01-25 13:39 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:
>>
>>> Would it be a better designer to save the image on disc and just save
>>> the link to the image to the DB ?
>>>
>>> On 25 January 2016 at 15:59, Julio Heitor Nobrega <
>>> juliohnobr...@gmail.com> wrote:
>>>
>>>> As a matter of fact, i am beginning to think that its more wise to send
>>>> the whole image to the server, scale it using Scalr and store it into the
>>>> DB.
>>>>
>>>> I want to have the control of the image size, test levels of quality.
>>>> The Scalr has a mode called 'Automatic' that fits your image to the
>>>> dimensions you pass to it.
>>>>
>>>> None of it i will have with GWT Canvas.
>>>>
>>>> The only drawback i would get using Scalr is that i will consume more
>>>> bandwidth DigitalOcean  gives me monthly because i will have to send the
>>>> whole image to the server.
>>>>
>>>> 2016-01-25 12:52 GMT-02:00 Julio Heitor Nobrega <
>>>> juliohnobr...@gmail.com>:
>>>>
>>>>> Thanks for your answer Greg!
>>>>>
>>>>> Actually, i really need a byte array because i will store it in a BLOB
>>>>> database column.
>>>>>
>>>>> Regards!
>>>>>
>>>>> 2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:
>>>>>
>>>>>> Just use context.getCanvas().toDataUrl(); which will return data uri
>>>>>> with the contents of the canvas. You can use it directly in 
>>>>>> element or send it to server.
>>>>>>
>>>>>> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega
>>>>>> wrote:
>>>>>>>
>>>>>>> I have just found an example (
>>>>>>> http://c.gwt-examples.com/home/ui/canvas).
>>>>>>>
>>>>>>> The only problem is to convert ImageData to an byte array :)
>>>>>>>
>>>>>>> Regards!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com
>>>>>>> >:
>>>>>>>
>>>>>>>> Does anyone have some examples regarding the Canvas class?
>>>>>>>>
>>>>>>>> I've seen the java doc API but the only methods i think that could
>>>>>>>> be useful was:
>>>>>>>>
>>>>>>>> Context2d
>>>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>>>>>>>  *getContext2d
>>>>>>>> <http://www.gwtproject.org/javadoc/latest/com/goog

Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Hi Alain,

i am doing exactly that. I am sending the byte array to the server, saving
it as a file in a directory and storing the path in a DB column.

My problem is to get the byte array from the file (is it possible to get
the byte array using FileUpoad?) and work on it before send to the server.

2016-01-25 13:39 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:

> Would it be a better designer to save the image on disc and just save the
> link to the image to the DB ?
>
> On 25 January 2016 at 15:59, Julio Heitor Nobrega <juliohnobr...@gmail.com
> > wrote:
>
>> As a matter of fact, i am beginning to think that its more wise to send
>> the whole image to the server, scale it using Scalr and store it into the
>> DB.
>>
>> I want to have the control of the image size, test levels of quality. The
>> Scalr has a mode called 'Automatic' that fits your image to the dimensions
>> you pass to it.
>>
>> None of it i will have with GWT Canvas.
>>
>> The only drawback i would get using Scalr is that i will consume more
>> bandwidth DigitalOcean  gives me monthly because i will have to send the
>> whole image to the server.
>>
>> 2016-01-25 12:52 GMT-02:00 Julio Heitor Nobrega <juliohnobr...@gmail.com>
>> :
>>
>>> Thanks for your answer Greg!
>>>
>>> Actually, i really need a byte array because i will store it in a BLOB
>>> database column.
>>>
>>> Regards!
>>>
>>> 2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:
>>>
>>>> Just use context.getCanvas().toDataUrl(); which will return data uri
>>>> with the contents of the canvas. You can use it directly in 
>>>> element or send it to server.
>>>>
>>>> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega
>>>> wrote:
>>>>>
>>>>> I have just found an example (http://c.gwt-examples.com/home/ui/canvas
>>>>> ).
>>>>>
>>>>> The only problem is to convert ImageData to an byte array :)
>>>>>
>>>>> Regards!
>>>>>
>>>>>
>>>>>
>>>>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com>:
>>>>>
>>>>>> Does anyone have some examples regarding the Canvas class?
>>>>>>
>>>>>> I've seen the java doc API but the only methods i think that could be
>>>>>> useful was:
>>>>>>
>>>>>> Context2d
>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>>>>>  *getContext2d
>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
>>>>>> ()
>>>>>>   Returns a 2D rendering context.
>>>>>>  void *setCoordinateSpaceHeight
>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
>>>>>> (int height)
>>>>>>   Sets the height of the internal canvas coordinate space.
>>>>>> void *setCoordinateSpaceWidth
>>>>>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
>>>>>> (int width)
>>>>>>   Sets the width of the internal canvas coordinate space.
>>>>>>
>>>>>> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pki...@gmail.com>:
>>>>>>
>>>>>>> Canvas is an DOM Element.
>>>>>>> It can render Image Elements to itself in any resolution.
>>>>>>> However it may produce not nice results.
>>>>>>>
>>>>>>> It depends on what you need.
>>>>>>>
>>>>>>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor
>>>>>>> Nobrega wrote:
>>>>>>>>
>>>>>>>> Hi guys,
>>>>>>>>
>>>>>>>> thanks everyone for the answers!
>>>>>>>>
>>>>>>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT
>>>>>>>> itself?
>>>>>>>>
>>>>>>>> Do you have any example of use?
>>>>>>>>
>>>>>>>> Regards
>>>>>&g

Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Julio Heitor Nobrega
Is there a way to see what format the file has? If it isn't an image i'll
have to warn the user.

2016-01-25 14:58 GMT-02:00 Julio Heitor Nobrega <juliohnobr...@gmail.com>:

> Hi Alain,
>
> nice code! I am going to do this but in a java version code. I just didn't
> know i could get the image path from a 'value' of the
>
> document.getElementById("fileUpload")
>
> I could even show a image preview to the user before send it to the server!
>
> Or maybe convert the base64 String to byte array, scale it and then send
> to the server :)
>
> Thanks!
>
> 2016-01-25 14:22 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:
>
>> I think what you should to is get the base64  representation of the image
>> from the canvas. Something like
>>
>> var p;var canvas = document.createElement("canvas");
>> var img1=document.createElement("img");
>> function getBase64Image(){
>> p=document.getElementById("fileUpload").value;
>> img1.setAttribute('src', p);
>> canvas.width = img1.width;
>> canvas.height = img1.height;
>> var ctx = canvas.getContext("2d");
>> ctx.drawImage(img1, 0, 0);
>> var dataURL = canvas.toDataURL("image/png");alert("from getbase64 
>> function"+dataURL );
>> return dataURL;}
>>
>> Then send the base64 to the server and corvert it to byterarry or
>> whatever format you need there to save it to disc,
>>
>>
>>
>> On 25 January 2016 at 17:11, Julio Heitor Nobrega <
>> juliohnobr...@gmail.com> wrote:
>>
>>> Hi Alain,
>>>
>>> i am doing exactly that. I am sending the byte array to the server,
>>> saving it as a file in a directory and storing the path in a DB column.
>>>
>>> My problem is to get the byte array from the file (is it possible to get
>>> the byte array using FileUpoad?) and work on it before send to the server.
>>>
>>> 2016-01-25 13:39 GMT-02:00 Alain Ekambi <jazzmatad...@gmail.com>:
>>>
>>>> Would it be a better designer to save the image on disc and just save
>>>> the link to the image to the DB ?
>>>>
>>>> On 25 January 2016 at 15:59, Julio Heitor Nobrega <
>>>> juliohnobr...@gmail.com> wrote:
>>>>
>>>>> As a matter of fact, i am beginning to think that its more wise to
>>>>> send the whole image to the server, scale it using Scalr and store it into
>>>>> the DB.
>>>>>
>>>>> I want to have the control of the image size, test levels of quality.
>>>>> The Scalr has a mode called 'Automatic' that fits your image to the
>>>>> dimensions you pass to it.
>>>>>
>>>>> None of it i will have with GWT Canvas.
>>>>>
>>>>> The only drawback i would get using Scalr is that i will consume more
>>>>> bandwidth DigitalOcean  gives me monthly because i will have to send the
>>>>> whole image to the server.
>>>>>
>>>>> 2016-01-25 12:52 GMT-02:00 Julio Heitor Nobrega <
>>>>> juliohnobr...@gmail.com>:
>>>>>
>>>>>> Thanks for your answer Greg!
>>>>>>
>>>>>> Actually, i really need a byte array because i will store it in a
>>>>>> BLOB database column.
>>>>>>
>>>>>> Regards!
>>>>>>
>>>>>> 2016-01-25 12:43 GMT-02:00 Greg <grz3gorz.no...@gmail.com>:
>>>>>>
>>>>>>> Just use context.getCanvas().toDataUrl(); which will return data uri
>>>>>>> with the contents of the canvas. You can use it directly in 
>>>>>>> element or send it to server.
>>>>>>>
>>>>>>> On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor
>>>>>>> Nobrega wrote:
>>>>>>>>
>>>>>>>> I have just found an example (
>>>>>>>> http://c.gwt-examples.com/home/ui/canvas).
>>>>>>>>
>>>>>>>> The only problem is to convert ImageData to an byte array :)
>>>>>>>>
>>>>>>>> Regards!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <
>>>>>>>> julioh...@gmail.com>:
>>>>>>>>
>>>>>&

Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-14 Thread Julio Heitor Nobrega
Hi guys,

i am trying to upload images with 2mb size but i don't want to send the 
whole original image to the server. 

What i would like to do is reduce the image dimensions from, for example, 
*1000x1000* to *50x50* and reduce the file size
from *2mb* to *~25kb* as well and at the end send the *~25kb* image to the 
server.

I know there is the Scalr framework that does that in java, but its no 
compatible with GWT clients.

Is there any client side GWT library that does the same thing as Scalr?

Best Regards!


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-14 Thread Julio Heitor Nobrega
Hi guys,

thanks everyone for the answers!

Greg,  is Canvas a GWT framework or its a class that belong to GWT itself?

Do you have any example of use?

Regards



Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor Nobrega 
escreveu:
>
> Hi guys,
>
> i am trying to upload images with 2mb size but i don't want to send the 
> whole original image to the server. 
>
> What i would like to do is reduce the image dimensions from, for example, 
> *1000x1000* to *50x50* and reduce the file size
> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to 
> the server.
>
> I know there is the Scalr framework that does that in java, but its no 
> compatible with GWT clients.
>
> Is there any client side GWT library that does the same thing as Scalr?
>
> Best Regards!
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: IntegerBox not restricting input to integers in GWT 2.4.0

2015-08-26 Thread Julio Feferman
I'm running into the same issue but agree that IntegerBox should be a more 
general solution. Although this post is old I believe it is still relevant. 
I'm attaching an IntegerTextBox class I created which subclasses 
IntegerBox. This class uses a KeyDownHandler to verify when a number key or 
a numeric pad key is pressed. It also allows required keys for operation of 
the text box, such as backspace, delete, left and right arrow keys, etc and 
cancels other keys. You could add some CSS3 trickery or some other form of 
visual cue to warn the user if unsupported keys are pressed.

Best,

- Julio

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyDownEvent;
import com.google.gwt.event.dom.client.KeyDownHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.ui.IntegerBox;

public class IntegerTextBox extends IntegerBox {
	
	public IntegerTextBox() {
		super();
	}
	
	public void initialize() {
		
		addKeyDownHandler(new KeyDownHandler() {
public void onKeyDown(KeyDownEvent event) {
int keyCode = event.getNativeKeyCode();

switch (keyCode) {
case KeyCodes.KEY_LEFT:
case KeyCodes.KEY_RIGHT:
case KeyCodes.KEY_DELETE:
case KeyCodes.KEY_BACKSPACE:
case KeyCodes.KEY_ENTER:
case KeyCodes.KEY_ESCAPE:
case KeyCodes.KEY_TAB:
return;
}

String parsedInput = parseNumberKey(keyCode);
if (parsedInput.length()  0) {
return;
}
else {
cancelKey();
}

}
});
	}
	
/**
 * Varifies that the key pressed is either a number key or a numeric pad key. Converts numeric pad keys to the string
 * representation of their number values.
 *  
 * @param keyCode - the key code.
 * @return the key's number representation as a string.
 */
@SuppressWarnings(nls)
private String parseNumberKey(int keyCode) {
String result = new String();

switch (keyCode) {
case KeyCodes.KEY_ZERO:
case KeyCodes.KEY_ONE:
case KeyCodes.KEY_TWO:
case KeyCodes.KEY_THREE:
case KeyCodes.KEY_FOUR:
case KeyCodes.KEY_FIVE:
case KeyCodes.KEY_SIX:
case KeyCodes.KEY_SEVEN:
case KeyCodes.KEY_EIGHT:
case KeyCodes.KEY_NINE:
return result = String.valueOf((char) keyCode);
case KeyCodes.KEY_NUM_ZERO:
return result = 0;
case KeyCodes.KEY_NUM_ONE:
return result = 1;
case KeyCodes.KEY_NUM_TWO:
return result = 2;
case KeyCodes.KEY_NUM_THREE:
return result = 3;
case KeyCodes.KEY_NUM_FOUR:
return result = 4;
case KeyCodes.KEY_NUM_FIVE:
return result = 5;
case KeyCodes.KEY_NUM_SIX:
return result = 6;
case KeyCodes.KEY_NUM_SEVEN:
return result = 7;
case KeyCodes.KEY_NUM_EIGHT:
return result = 8;
case KeyCodes.KEY_NUM_NINE:
return result = 9;
}
return result;
}

}


GWT Compression API

2015-04-13 Thread Julio Heitor Nobrega

Heu guys,

i need to implement a GWT client that compress a image and sends to the 
server. Afterwards, the server sends back the compressed image and then the 
client
descompress it and disply in the screen.

Is there a client-based compression API to be used with GWT?

Best Regards!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: setUser and setPassword in RequestBuilder

2012-12-24 Thread Julio Faerman
I also would like to know that, neither the officil docs or javadocs makes 
this clear...

On Thursday, February 1, 2007 9:13:46 AM UTC-2, thodu wrote:

 Hi,

 I would like to know the use of the setUser and setPassword methods in
 RequestBuilder. How exactly are they meant to be used?

 Regards,
   Amit



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



Plug-ins GWT - Eclipse

2012-08-24 Thread Julio P. Leiser
Hi, does anyone know why the site gwt plug-ins is not in the air.

Two days ago I'm trying to install the plugin for google JUNO (
http://dl.google.com/eclipse/plugin/4.2) and the service can not download.

Can anyone help me.

Atenciosamente, Julio P. Leiser
---
*House Company Informática Ltda*
Arquiteto de Software
Celular   : (55) (11) 9390-3404
Fone  : (55) (11) 5584-0835
E-Mail: jplei...@hcinf.com
Site  : www.hcinf.com
Endereço  : Alameda dos Guatás 873 , Casa
CEP:04053-042 - Planalto Paulista
São Paulo, SP.

-- 
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: Plug-ins GWT - Eclipse

2012-08-24 Thread Julio P. Leiser
donwload already installed the file.

But by using the url eclipse is not working.*

ErrorCodeNoSuchKey/CodeMessageThe specified key does not
exist./Message/Error


*
Atenciosamente, Julio P. Leiser
---
*House Company Informática Ltda*
Arquiteto de Software
Celular   : (55) (11) 9390-3404
Fone  : (55) (11) 5584-0835
E-Mail: jplei...@hcinf.com
Site  : www.hcinf.com
Endereço  : Alameda dos Guatás 873 , Casa
CEP:04053-042 - Planalto Paulista
São Paulo, SP.



2012/8/24 Juan Pablo Gardella gardellajuanpa...@gmail.com

 You must install inside eclipse, you can't download with a browser.

 2012/8/24 Julio P. Leiser jplei...@gmail.com

 Hi, does anyone know why the site gwt plug-ins is not in the air.

 Two days ago I'm trying to install the plugin for google JUNO (
 http://dl.google.com/eclipse/plugin/4.2) and the service can not
 download.

 Can anyone help me.

 Atenciosamente, Julio P. Leiser
 ---
 *House Company Informática Ltda*
 Arquiteto de Software
 Celular   : (55) (11) 9390-3404
 Fone  : (55) (11) 5584-0835
 E-Mail: jplei...@hcinf.com
 Site  : www.hcinf.com
 Endereço  : Alameda dos Guatás 873 , Casa
 CEP:04053-042 - Planalto Paulista
 São Paulo, SP.

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


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


-- 
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: NullPointerException on stockwatcher tutorial

2012-05-01 Thread Julio
Hi,
works for me. i insert the DIV tag into the html.

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.



Wrapping th/ element as Widget and adding click event

2011-06-08 Thread julio
I need adding a click event to th (in a table with UIBinder context).
Is it possible? Have I to create a TH-Widget with a wrap method? If
it's so, how?

Thanks
Julio

-- 
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: Wrapping th/ element as Widget and adding click event

2011-06-08 Thread julio
Hi Juan,

at the moment I have a situation like below in my .xml file and some
of the THs in the table must be clickable.
Is it possible using CellTable to replace code below (in the .xml not
in the java code)?

Thanks

g:HTMLPanel tag=table
thead
tr
th rowspan=2 class=center-thUser/th
th colspan=5 valign=top 
class=center-thAccount/th
th colspan=2 valign=top 
class=center-thEmail/th
th rowspan=3 class=delete_column
label for=deleteDelete/label
br /
input type=checkbox id=delete /
/th
/tr
tr
th colspan=3 valign=top 
class=center-thArticles/th
th colspan=2 valign=top 
class=center-thPatents/th
th colspan=2 valign=top class=center-thLink 
status changed/
th
/tr
tr
th valign=top width=310Name/th
th valign=top ui:field=label1Latest/th
th valign=topLatest/th
th valign=topinput type=checkbox /Email/th
th valign=topLatest/th
th valign=topinput type=checkbox /Email/th
th valign=topLatest/th
th valign=topinput type=checkbox /Email/th
/tr
/thead
tbody ui:field=accountBody
/tbody
/g:HTMLPanel

On Jun 8, 4:59 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 CellTable don't work for you? See this question
 http://stackoverflow.com/questions/3262160/gwt-2-1-celltable-column-h...in
 stackoverflow.

 Juan

 2011/6/8 julio antongiuli...@gmail.com







  I need adding a click event to th (in a table with UIBinder context).
  Is it possible? Have I to create a TH-Widget with a wrap method? If
  it's so, how?

  Thanks
  Julio

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

-- 
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: JsonP response code

2011-05-19 Thread julio
Hi,

is there any workaround for this? or some way to retrieve in advance
the response code?

Thanks
Julio

On May 18, 3:57 pm, julio antongiuli...@gmail.com wrote:
 Hi,

 I have json-p requests in my code similar to this:

 JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
                 jsonp.requestObject(jsonUrl, new AsyncCallbackT() {

                         public void onFailure(Throwable throwable) { // error 
 }

                         public void onSuccess(T t) { //do something }
                 });

 some GET-requests return 200, others 302 and so on, and I should be
 able to return a different answer respect to this value. How can I
 know what's the response value returned?

 Thanks
 Julio

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



JsonP response code

2011-05-18 Thread julio
Hi,

I have json-p requests in my code similar to this:

JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
jsonp.requestObject(jsonUrl, new AsyncCallbackT() {

public void onFailure(Throwable throwable) { // error }

public void onSuccess(T t) { //do something }
});

some GET-requests return 200, others 302 and so on, and I should be
able to return a different answer respect to this value. How can I
know what's the response value returned?

Thanks
Julio

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



json post not working

2011-05-13 Thread julio
Hi

I have a json POST like this:

{ first: 10 , second : 50 }

with content-type:application/json

With an external client the server replies correctly, but using:

RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
rb.setHeader(content-type, application/json);
try
{
rb.sendRequest({ \first\: 10 , \second\ : 50 }, new
RequestCallback() {
public void onResponseReceived(Request request, Response
response) {}

public void onError(Request request, Throwable 
exception) {}
});
}
catch (RequestException e) { Window.alert(e.toString()); }

look like the server even hasn't get the request.

How can I fix it?

Thanks,
Julio



-- 
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: json post not working

2011-05-13 Thread julio
Sorry forget it, it works properly, was a XSS problem
Julio

On May 13, 11:57 am, julio antongiuli...@gmail.com wrote:
 Hi

 I have a json POST like this:

 { first: 10 , second : 50 }

 with content-type:application/json

 With an external client the server replies correctly, but using:

 RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
                 rb.setHeader(content-type, application/json);
                 try
                 {
                     rb.sendRequest({ \first\: 10 , \second\ : 50 }, new
 RequestCallback() {
                         public void onResponseReceived(Request request, 
 Response
 response) {}

                         public void onError(Request request, Throwable 
 exception) {}
                     });
                 }
                 catch (RequestException e) { Window.alert(e.toString()); }

 look like the server even hasn't get the request.

 How can I fix it?

 Thanks,
 Julio

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



Explorer 8 and InnerHTML issue

2011-05-05 Thread julio
Hi,

I'm using GWT 2.3 and I came across this issue (although I'm not sure
it's related to GWT directly):

Using IE 8 at some point I have a situation like this:

Document.get().getElementById(someDivId).setInnerHTML();

few lines below the line:

Element e = Document.get().getElementById(someDivId);

returns e == null

in Firefox and Chrome that doesn't happen

any idea for a workaround?

Thanks
Julio

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



KeyPressEvent doesn't capture Enter

2011-04-27 Thread julio
Hi,

I'm using GWT 2.2 and I have:

@UiField InputElement searchText;

TextBox.wrap(searchText).addKeyPressHandler(new KeyPressHandler() {
public void onKeyPress(KeyPressEvent event) {
if (event.getCharCode() == KeyCodes.KEY_ENTER)
doSomething();
}
});

the event is triggered correctly for all the characters, the condition
doesn't work for 'enter' and 'tab'. Displaying the numeric values
returned for them with event.getUnicodeCharCode(), I got 0.

Is it a bug or maybe I'm missing something?

Thanks
Julio

-- 
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: KeyPressEvent doesn't capture Enter

2011-04-27 Thread julio
I'm using for test Firefox 4.0.1 at the moment, btw I just tried with
Chrome 10 and it works.

So it looks like a bug in GWT. In case any workaround?

Thanks
Julio

On Apr 27, 11:29 am, riyaz ahmed sunez.ri...@gmail.com wrote:
 I had the same issue,
 Did you check on other browsers, because in some browsers it worked









 On Wed, Apr 27, 2011 at 3:52 PM, julio antongiuli...@gmail.com wrote:
  Hi,

  I'm using GWT 2.2 and I have:

  @UiField InputElement searchText;

  TextBox.wrap(searchText).addKeyPressHandler(new KeyPressHandler() {
                         public void onKeyPress(KeyPressEvent event) {
                                 if (event.getCharCode() ==
  KeyCodes.KEY_ENTER)
                                         doSomething();
                         }
                 });

  the event is triggered correctly for all the characters, the condition
  doesn't work for 'enter' and 'tab'. Displaying the numeric values
  returned for them with event.getUnicodeCharCode(), I got 0.

  Is it a bug or maybe I'm missing something?

  Thanks
  Julio

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

 --
 Riyaz
 9916220381

-- 
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: KeyPressEvent doesn't capture Enter

2011-04-27 Thread julio
event.getNativeEvent().getKeyCode() works thanks
and keydown event as suggested by Thomas too

Julio

On Apr 27, 11:59 am, Jens jens.nehlme...@gmail.com wrote:
 Maybe you can try using event.getNativeEvent().getKeyCode() instead of
 getCharCode().

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



Ajax loader locked screen

2011-04-20 Thread julio
Hi,

is there a way/example to get a locked screen with a loader in the
middle of the screen with GWT (2.2) while is fetching data?

Thanks,
Julio

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



Proxy POST

2011-03-17 Thread julio
Hi,

I'm using GWT 2.1.1 and in my app there is a RequestBuilder/POST to a
different url respect to the client (basically client  in dev mode
against 8080 localhost server). The POST fails cos of the XSS from
Firefox.

I followed suggestions here:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c46

without any luck and as I'm stuck on the same problem since days(!)
I'm asking you is someone has got a working configuration/solution for
this problem.

Thanks,
Julio

-- 
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: Proxy POST

2011-03-17 Thread julio
basically what I have done is adding:

gwt-dev.jar in the client classpath, and adding at the file web.xml:

servlet
servlet-nameJettyProxy/servlet-name
servlet-classorg.mortbay.servlet.ProxyServlet$Transparent/
servlet-class
init-param
  !-- This points to the actual server where requests are proxied
to --
  param-nameProxyTo/param-name
  param-valuehttp://localhost:8080//param-value
/init-param
init-param
  !-- This will be stripped off the client request URL --
  param-namePrefix/param-name
  param-value//param-value
/init-param
load-on-startup1/load-on-startup
  /servlet

I used localhost:8080 as proxied url, as my server app runs (in
another jetty) under:

http://localhost:8080/myservapp

anyway this code:


final StringBuilder content = new StringBuilder();
content.append(j_username= + URL.encode(myusername));
content.append(j_password= + URL.encode(mypasswd));

final RequestBuilder builder = new
RequestBuilder(RequestBuilder.POST, URL.encode(BASEURL + /
j_spring_security_check));
builder.setHeader(Content-Type, application/x-www-form-
urlencoded);

try {
builder.sendRequest(content.toString(), new
RequestCallback() {

public void onResponseReceived(Request request, 
Response response)
{
Window.alert(STATUS :  + 
response.getStatusCode());
}

public void onError(Request request, Throwable 
exception) {
Window.alert(ERROR);
}

});
} catch (final RequestException e) {
Window.alert(e.getLocalizedMessage());
}

returns always status-code = 0...

any help?

Thanks,
Julio

On Mar 17, 11:07 am, julio antongiuli...@gmail.com wrote:
 Hi,

 I'm using GWT 2.1.1 and in my app there is a RequestBuilder/POST to a
 different url respect to the client (basically client  in dev mode
 against 8080 localhost server). The POST fails cos of the XSS from
 Firefox.

 I followed suggestions 
 here:http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c46

 without any luck and as I'm stuck on the same problem since days(!)
 I'm asking you is someone has got a working configuration/solution for
 this problem.

 Thanks,
 Julio

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



Spring Security 3.0 authentication problem

2011-03-15 Thread julio
Hi,

I have a GWT client that communicates with a Spring/SpringSecurity 3.0
server via REST/JSON.
Both run on the same tomcat/jetty perfectly, but I have a problem
introducing the authentication:
If I POST the server with an external HTTP client the url:

http://localhost:8080/myserverapp/j_spring_security_check?j_username=julioj_password=mypass

the server response is OK (200)

but when GWT client tries the same, the status code returned is 0.
This is the code I'm using at the moment:

final StringBuilder content = new StringBuilder();
content.append(j_username= + URL.encode(julio));
content.append(j_password= + URL.encode(mypass));

final RequestBuilder builder = new
RequestBuilder(RequestBuilder.POST, URL.encode(BASEURL + /
j_spring_security_check));
builder.setHeader(Content-Type, application/x-www-form-
urlencoded);

try {
builder.sendRequest(content.toString(), new
RequestCallback() {

public void onResponseReceived(Request request, 
Response response)
{
Window.alert(STATUS :  + 
response.getStatusCode()); // returns
0 ??
}

public void onError(Request request, Throwable 
exception) {
Window.alert(ERROR);
}

});
} catch (final RequestException e) {
Window.alert(e.getLocalizedMessage());
}

why does it return 0? any idea?

Thanks,
Julio

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



Adding widget to HTMLPanel error

2011-03-07 Thread julio
Hi,

I'm using GWT 2.1 and getting this error:
java.lang.AssertionError: A widget that has an existing parent widget
may not be added to the detach list

When I try to add a ListBox in the TDs elements with id
leftMenuFilterContainer and rightMenuFilterContainer
to a HTMLPanel (via UIBinder) to create a DialogBox:

g:DialogBox
g:HTMLPanel
div style=top: 450px; left: 395px; display: block;
div class=popup
table
tbody
tr
td class=tl/td
td class=b/td
td class=tr/td
/tr
tr
td class=b/td
td class=body
div 
class=content style=display: block;
div 
style= id=filterOptions

h2Filter/h2

table cellspacing=0 cellpadding=0 width=98%
class=filter-table

tbody

tr class=oddrow

td id=leftMenuFilterContainer width=50%

/td

td id=rightMenuFilterContainer width=50%

/td

/tr

/tbody

/table

/g:HTMLPanel
/g:DialogBox

the code:

final ListBox menu = new ListBox();
menu.addItem(...);
...
RootPanel.get().get(leftMenuFilterContainer).add(menu); // this row
generate the error

I googled around and it looks depending by nested divs but even
knowing that it doesn't help.
Any idea?

Thanks,
Julio

-- 
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: Adding widget to HTMLPanel error

2011-03-07 Thread julio
Hi,

in that case, with:

g:HTMLPanel ui:field=rootDialog

@UiField private HTMLPanel rootDialog;

rootDialog.add(menu, leftMenuFilterContainer);

I got the error:

[ERROR] [myprj] - Line 20: The field MyDialog.rootDialog is not
visible

so I tried in the previous way.

The dialog class extends DialogBox and:

public MyDialog() { uiBinder.createAndBindUi(this); }

@UiFactory DialogBox construct() { return this; }

Any idea about the origin of the error above?

Thanks,
Julio

On Mar 7, 4:39 pm, Thomas Broyer t.bro...@gmail.com wrote:
 You have an HTMLPanel, so why aren't you using its add(Widget, 
 String)http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/g...,
 java.lang.String) method?

-- 
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: Adding widget to HTMLPanel error

2011-03-07 Thread julio
sorry (hyper shame) forget it :) (bloody autocompletition-editor
'@UiField private HTMLPanel...', private problem:))

solved

Julio

On Mar 7, 5:15 pm, julio antongiuli...@gmail.com wrote:
 Hi,

 in that case, with:

 g:HTMLPanel ui:field=rootDialog

 @UiField private HTMLPanel rootDialog;

 rootDialog.add(menu, leftMenuFilterContainer);

 I got the error:

 [ERROR] [myprj] - Line 20: The field MyDialog.rootDialog is not
 visible

 so I tried in the previous way.

 The dialog class extends DialogBox and:

 public MyDialog() { uiBinder.createAndBindUi(this); }

 @UiFactory DialogBox construct() { return this; }

 Any idea about the origin of the error above?

 Thanks,
 Julio

 On Mar 7, 4:39 pm, Thomas Broyer t.bro...@gmail.com wrote:

  You have an HTMLPanel, so why aren't you using its add(Widget, 
  String)http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/g...,
  java.lang.String) method?



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



FocusWidget fired repeats the event

2011-02-10 Thread julio
Hi,

I'm using GWT 2.1.1 and I created a widget that extends FocusWidget. I
have added to this widget a classical ClickHandler like this:

new ClickHandler() {
public void onClick(ClickEvent event) {
//do something
}
};

my problem is when the widget is fired the event is triggered many
times instead of only one.

Is there a way to stop this accumulation of events?

I tested this only on Firefox 3.6.13

Thanks,
Julio

-- 
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: FocusWidget fired repeats the event

2011-02-10 Thread julio
Hi,

click-handler is added only one time (verified debugging too).

Julio

On Feb 10, 1:52 pm, Lazo Apostolovski lazo.apostolov...@gmail.com
wrote:
 How many times you add new ClickHandler?

 I think that you add more then one different handlers, who listening for
 click event. TextBox.addClickHandler(new ClickHandler(){}). Maybe when page
 reload or something.

 Try to debug how many different instances you are creating and adding.

-- 
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: Link ClickHandler doesn't fire

2011-01-18 Thread julio
LOL Thanks Ian worked fine :)

On Jan 17, 5:51 pm, Ian Bambury ianbamb...@gmail.com wrote:
 Something like this?

 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.RootPanel;

 public class App implements ClickHandler
 {
     public void onModuleLoad()
     {
         ListLink link = new ListLink(Click Here);
         link.addClickHandler(this);
         RootPanel.get().add(link);
     }

     class ListLink extends HTML
     {
         public ListLink(String text)
         {
             setHTML(li + text + /li);
         }
     }

     @Override
     public void onClick(ClickEvent event)
     {
         Window.alert(Clicked);
     }

 }

 On 17 January 2011 17:31, julio antongiuli...@gmail.com wrote:

  Hi Thomas,

  yes you are right, in that case my widget is out of sync with the
  DOM.

  do you mean to replace this:

  getElement().appendChild(a.getElement());

  with something else? If it's so how? I can't find any API for that
  case (not even this.addWidget(...))

  Thanks,
  Julio

  On Jan 17, 3:55 pm, Thomas Broyer t.bro...@gmail.com wrote:
   On Monday, January 17, 2011 4:02:08 PM UTC+1, julio wrote:

getElement().appendChild(a.getElement());

   event handlers are bound when the *widget* is *attached* (i.e. somehow
  its
   onAttach method is called). In short, never use getElement() unless you
  know
   what you're doing (particularly when dealing with DOM tree
  manupulations),
   always use widget methods addWidget() et al.

  --
  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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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.



Link ClickHandler doesn't fire

2011-01-17 Thread julio
Hi,

I'm using GWT 2.1.1 and I created a simple li widget in this way:

public class LIWidget extends Widget {

public LIWidget() {
super();
setElement(Document.get().createLIElement());
}

public void addLink(String url, ClickHandler handler) {
Anchor a = new Anchor(this.value, url);
a.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
  Window.alert(fired);
  }
});
getElement().appendChild(a.getElement());
}

// some other methods
}

when this widget is created and a link is added using the method
addLink(...), everything is well displayed but when I click on the
link, the event is not fired (but the url on the bar change - it's
leaded by '#').
How can I fix the problem?

Thanks,
Julio

-- 
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: Link ClickHandler doesn't fire

2011-01-17 Thread julio
Hi Thomas,

yes you are right, in that case my widget is out of sync with the
DOM.

do you mean to replace this:

getElement().appendChild(a.getElement());

with something else? If it's so how? I can't find any API for that
case (not even this.addWidget(...))

Thanks,
Julio


On Jan 17, 3:55 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On Monday, January 17, 2011 4:02:08 PM UTC+1, julio wrote:

  getElement().appendChild(a.getElement());

 event handlers are bound when the *widget* is *attached* (i.e. somehow its
 onAttach method is called). In short, never use getElement() unless you know
 what you're doing (particularly when dealing with DOM tree manupulations),
 always use widget methods addWidget() et al.

-- 
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: JsArrayMixed module?

2011-01-13 Thread julio
Hi Thomas,

yes, but i noticed it happened with eclipse on. Turning it off and
launching ant from command line again has worked fine. I didn't
upgrade the GWT plugins as I didn't get any notification (usually it
is on the bottom left), after that it has started to work fine yet

thanks
Julio

On Jan 12, 8:20 pm, Thomas Broyer t.bro...@gmail.com wrote:
 Are you 100% sure your build.xml references a GWT 2.1 SDK?

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



JsArrayMixed module?

2011-01-12 Thread julio
Hi,

I'm using GWT 2.1 and everytime I try to compile ($ ant war) the
application I got this error:

[ERROR] Line 21: No source code is available for type
com.google.gwt.core.client.JsArrayMixed; did you forget to inherit a
required module?

the weird thing is for:

import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.JsArrayInteger;
import com.google.gwt.core.client.JsArrayString;

is ok but when  it tries to compile this:

import com.google.gwt.core.client.JsArrayMixed;

returns the error above.

Maybe I'm just missing something? I don't get what's the module
required.

Thanks,
Julio

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



Re: REST + Spring Security 3.0

2011-01-10 Thread julio
Hi Alistair,

client (GWT 2.1) and server(spring3, spring security3, etc) are
packaged in totally different and separate way. To be clear the code
even is in different eclipse's workspaces.
GWT is packaged using the gwt auto-generated ant file (build.xml)
with some slight changes for my case.
Server side is managed by maven.

They communicate each other via JSONP and the 2 WARs generated run in
the same tomcat 6 (so they have even the same address).

My past experience has been using GWT+Spring in the same package. But
this time is different so I'm wondering which is exactly the best/easy
solution to handle authentication + authorization for the single user
session (sorry for the rhyme:))

Thanks,
Julio

On Jan 7, 6:15 pm, aliman aliman...@googlemail.com wrote:
 Hi,

 I'm no expert in this area, so take this with a pinch of salt
 (interested to hear what others are doing)...

 You have two problems, authentication and authorisation.

 There are various options available for authentication (like http
 basic, form login, ...) but these may be limited or complicated
 depending on how your client and server are packaged and deployed.

 For example, if your client and server are packaged into a single war,
 then configuring authentication can be relatively straightforward and
 can be done solely viaspringsecurity, as the client and server will
 be within the same web application, which means once a user is
 authenticated to access the client pages, they'll also be
 authenticated to make calls to your web service, and browsers will
 automatically take care of adding appropriate JSESSIONID cookies or
 Authorization headers to your AJAX requests.

 If your client and server are packaged and deployed separately (but
 still within the same domain name), then authentication can get a bit
 more complicated, although not insurmountable. The challenge here is
 getting the user authenticated against the web service, and getting
 that authentication information into your client-side code so it can
 make authenticated AJAX requests. If you give me a bit more
 information about how client and server are packaged and deployed, I
 might be able to say more about the options. Generally, if client and
 server are packaged and deployed separately, then you may want to go
 for a pre-authentication approach in yourspringsecurityconfig, and
 handle actual authentication in a web layer (e.g., Apache config)
 before you get to the web applications.

 The other problem is authorisation. The main question here is which
 part of your application (client, service) is responsible for what
 authorisation decisions? E.g., you could push all authorisation
 decisions down to the service, and leave the client completely open
 (so the client-side code will need to be able to handle unauthorised
 responses from the service), or you could go to the opposite extreme
 and handle authorisation decisions in the client, in which case you
 will want to limit access to different parts of the client application
 (but this is probably not an option as you won't want to leave your
 service open to hacking), or some combination of the two. Where the
 decisions are made will affect how you configure authorisation 
 viaspringsecurity. E.g., if all authorisation decisions are implemented
 at the service, then you may be able to do with just a bunch of
 intercept-url directives in your service'sspringsecurityconfig,
 restricting access to different service calls by URL path, http method
 and user role.

 Anyway, like I said, I'm not an expert, so caveat emptor, but hope
 that helps.

 Cheers

 Alistair

 --
 Alistair Miles
 Head of Epidemiological Informatics
 Centre for Genomics and Global Health http://cggh.org
 The Wellcome Trust Centre for Human Genetics
 Roosevelt Drive
 Oxford
 OX3 7BN
 United Kingdom
 Web:http://purl.org/net/aliman
 Email: aliman...@gmail.com
 Tel: +44 (0)1865 287669

 On Jan 6, 2:04 pm, julio antongiuli...@gmail.com wrote:

  Hi,

  I need to useSpringSecurity3 in my application which is composed by
 Spring3 for the server side and GWT 2.1 for the client side.

  Client side and server side are totally decoupled, I mean they
  don't belong to the same project in the eclipse workspace (server side
  is managed by maven and client side uses prebuilt ant files) and till
  now they communicate each other using Rest/Json.

  Googling I found some tutorials and tips about integration withSpring
 Securitybut all of them suppose that client side knowsspring-
  server-side classes, and so using @Controller @Autowired etc under the
  gwt.server package. In my case this is not possible (or not clean to
  do).

  Is there a way to useSpringSecurityand keeping the code
  decoupled? Maybe for every (rest) client request I should use basic
  authentication? And what about a normal login page authentication?

  Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send

REST + Spring Security 3.0

2011-01-06 Thread julio
Hi,

I need to use Spring Security 3 in my application which is composed by
Spring 3 for the server side and GWT 2.1 for the client side.

Client side and server side are totally decoupled, I mean they
don't belong to the same project in the eclipse workspace (server side
is managed by maven and client side uses prebuilt ant files) and till
now they communicate each other using Rest/Json.

Googling I found some tutorials and tips about integration with Spring
Security but all of them suppose that client side knows spring-
server-side classes, and so using @Controller @Autowired etc under the
gwt.server package. In my case this is not possible (or not clean to
do).

Is there a way to use Spring Security and keeping the code
decoupled? Maybe for every (rest) client request I should use basic
authentication? And what about a normal login page authentication?

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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: REST + Spring Security 3.0

2011-01-06 Thread julio
thanks Sebastian for the reply

the basic authentication I think has worse performance than login
page has it must authenticate every time (well, I could forge ad
hoc filters chain but it always will hit the db) and u have not a real
logout.

with ur snippet i will use the login page :)

On Jan 6, 2:24 pm, Sebastian Hoß m...@shoss.de wrote:
 Well you could use basic authentication by setting username and
 password inside the header for every request you make. If you want to
 have a login page you can either redirect to the spring security page
 (which should redirect you right back) or you can create your own
 login page/dialog. The relevant code I've used for that looks like
 this:

         // POST credentials
         final StringBuilder content = new StringBuilder();
         content.append(j_username= + URL.encode(this.username.getText()));
         content.append(j_password= + URL.encode(this.password.getText()));

         final RequestBuilder builder = new
 RequestBuilder(RequestBuilder.POST,
 URL.encode(/server/j_spring_security_check));
         builder.setHeader(Content-Type, 
 application/x-www-form-urlencoded);

         try {
             builder.sendRequest(content.toString(), Callbacks.login());
         } catch (final RequestException e) {
             Window.alert(e.getLocalizedMessage());
         }

 The nice thing about that is, that you'll recieve a cookie from spring
 security so you don't have to specify username and password in all
 your requests. The only coupling you have with this approach is the
 server URI (in this case /server) but this could be moved to a
 shared properties file or something similar.

 Greets

 On Thu, Jan 6, 2011 at 3:04 PM, julio antongiuli...@gmail.com wrote:
  Hi,

  I need to use Spring Security 3 in my application which is composed by
  Spring 3 for the server side and GWT 2.1 for the client side.

  Client side and server side are totally decoupled, I mean they
  don't belong to the same project in the eclipse workspace (server side
  is managed by maven and client side uses prebuilt ant files) and till
  now they communicate each other using Rest/Json.

  Googling I found some tutorials and tips about integration with Spring
  Security but all of them suppose that client side knows spring-
  server-side classes, and so using @Controller @Autowired etc under the
  gwt.server package. In my case this is not possible (or not clean to
  do).

  Is there a way to use Spring Security and keeping the code
  decoupled? Maybe for every (rest) client request I should use basic
  authentication? And what about a normal login page authentication?

  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-tool...@googlegroups.com.
  To unsubscribe from this group, send email to 
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-web-toolkit?hl=en.

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



Re: Casting JavaScriptObject with GWT 2.1

2010-12-11 Thread julio
Gaurav
pls post useful answers not crap, or give me correct links at least to
explain the problem.
I don't get ur humorism and BTW i don't get any compile errors or
runtime errors

Maybe I didn't explain properly the problem

The bean-type i get from JSONP Request builder is BeanData extends
JavaScriptObject and it works fine using its get methods.
I can read the data properly and what else. The problem is when it's
saved in something like this:

private BeanData beanData;

or this:

private JavaScriptObject beanData;

and it is passed to another class, the same get methods don't work
anymore. They return empty values.

any idea?

Thanks,
Julio

On 11 Dic, 07:46, Gaurav Vaish gaurav.va...@gmail.com wrote:
 Hi Julio,

 I think you need to first understand JavaScript before jumping on to
 using GWT.

 Once you are done, and you understand why JavaScriptObject instances
 can be type-casted from one type to another without giving any
 compiletime or runtime errors, you will automatically have solution to
 your problem!

 --
 Happy Hacking,
 Gaurav Vaishhttp://www.mastergaurav.com

 On Dec 10, 9:08 pm, julio antongiuli...@gmail.com wrote:

  weird, it looks like i can pass through classes primitive values as
  int, char etc but not complex objects extending JavaScriptObject, cos
  I cannot cast them anymore (BTW no errors got, just empty values)

  Julio

  On Dec 10, 10:43 am, julio antongiuli...@gmail.com wrote:

   before this:

   BeanData bd = data.createObject().cast();

   I tried with a normal:

   BeanData bd = (BeanData) data;

   and:

   BeanData bd = data.cast();

   but they don't work.

   BTW debugged them I saw that the data passed has the same refId of the
   original, so it looks like is just not cast at all.

   On Dec 10, 10:22 am, skrat dusan.malia...@gmail.com wrote:

You can't, what you do here is that you create new (and empty)
JavaScriptObject, and cast it to your type. It seems that you think
you're copying the object, but that's certainly not true. I'm not sure
what the problem is, if you need to pass that instance to another
class, you can do it without any tranformation.

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



Re: Casting JavaScriptObject with GWT 2.1

2010-12-11 Thread julio
Sorry if I sound aggresive but this thing is taking the whole day and
more :)

yes, i'm debugging and i hope to get something soon

Thanks,
Julio

On 11 Dic, 17:39, skrat dusan.malia...@gmail.com wrote:
 Julio, I think your last response was a bit aggresive. Watch it. As of
 your problem with overlay types, what you describe should work
 flawlessly, and it does, I'm using JavaScriptObject daily in my GWT
 projects, and never seen such behavior. Please try something like
 $wnd.console.log(this) in your BeanData getters, to see what objects is
 there, then use Firebug or WebKit inspector to watch those logged
 objects. That should work in both devmode and compiled version. Good
 luck

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



Casting JavaScriptObject with GWT 2.1

2010-12-10 Thread julio
Hi,

In my application I get some data via JSONP, and it's perfectly
transformed in a bean composed by String, JsArray,
JsArrayJsArrayString, etc. At some point this bean is saved with
something like this:

private static JavaScriptObject data;

...
BeanData b;
MyClass.data = b;

in another point of the application this value is passed to another
class (to display some other page) with something like this:

BeanData bd = data.createObject().cast();
String name = bd.getName();

but name is empty.
After debugging the bd variable, it's still a JavaScriptObject.
How can I cast it back?

Thanks,
Julio

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



Re: Casting JavaScriptObject with GWT 2.1

2010-12-10 Thread julio
before this:

BeanData bd = data.createObject().cast();

I tried with a normal:

BeanData bd = (BeanData) data;

and:

BeanData bd = data.cast();

but they don't work.

BTW debugged them I saw that the data passed has the same refId of the
original, so it looks like is just not cast at all.

On Dec 10, 10:22 am, skrat dusan.malia...@gmail.com wrote:
 You can't, what you do here is that you create new (and empty)
 JavaScriptObject, and cast it to your type. It seems that you think
 you're copying the object, but that's certainly not true. I'm not sure
 what the problem is, if you need to pass that instance to another
 class, you can do it without any tranformation.


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



Re: Casting JavaScriptObject with GWT 2.1

2010-12-10 Thread julio
weird, it looks like i can pass through classes primitive values as
int, char etc but not complex objects extending JavaScriptObject, cos
I cannot cast them anymore (BTW no errors got, just empty values)

Julio

On Dec 10, 10:43 am, julio antongiuli...@gmail.com wrote:
 before this:

 BeanData bd = data.createObject().cast();

 I tried with a normal:

 BeanData bd = (BeanData) data;

 and:

 BeanData bd = data.cast();

 but they don't work.

 BTW debugged them I saw that the data passed has the same refId of the
 original, so it looks like is just not cast at all.

 On Dec 10, 10:22 am, skrat dusan.malia...@gmail.com wrote:

  You can't, what you do here is that you create new (and empty)
  JavaScriptObject, and cast it to your type. It seems that you think
  you're copying the object, but that's certainly not true. I'm not sure
  what the problem is, if you need to pass that instance to another
  class, you can do it without any tranformation.

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



Re: SOP Problem with GWT 2.0.4

2010-12-08 Thread julio
Hi Thomas thanks for your reply.

 The xs linker only allows you to load the GWT app (*.nocache.js et
 al.) from a different origin than the HTML host page. This is
 because the default linker (std, or IFrameLinker) uses an iframe to
 load the *.cache.html and then hits the SOP when trying to communicate
 with the host page. The xs linker does not use an iframe but instead
 load *.cache.js files directly in the host page.

Ok so it's not my case.

  Have you any idea?

 There's no way a browser can contact a remote public CGI (not under
 [your] control) if that one doesn't explicitly allows it (using
 CORS), and were it the case then it would only work for those browsers
 that support CORS (recent versions of Firefox, Chrome, Safari and
 Opera; IE8 supports it but with a specific API that GWT doesn't use).

if I paste and copy the remote cgi's url in the browser bar the data
get displayed on it (Firefox 3.5.12, IE6 and Chrome 8).
In this case something is still possible?

Thanks,
Julio

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



SOP Problem with GWT 2.0.4

2010-12-07 Thread julio
Hi,

I have a simple callback to a remote server like this:

RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);

try {
builder.sendRequest(null, new RequestCallback() {

public void onError(Request request, Throwable 
exception)
{ Window.alert(Failed to send the request:+
exception.getMessage()); }

public void onResponseReceived(Request request, 
Response response)
{
if (200 == response.getStatusCode()) {

Window.alert(response.getText());
  } else {
  Window.alert(STATUS CODE: 
+response.getStatusCode());
  }


}
});
} catch (RequestException e) { Window.alert(Failed to send the
request:  + e.getMessage()); }
}

and it returns STATUS CODE: 0. The url is a remote public CGI (not
under my control).
I added in my gwt.xml file this:

inherits name='com.google.gwt.user.User'/
inherits name=com.google.gwt.http.HTTP/
add-linker name=xs/

as I supposed it to be a SOP problem.
But unfortunately it doesn't work me, either using a deployed app on
tomcat or with run as- web application in eclipse.

Have you any idea?

Thanks,
Julio

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



Re: SOP Problem with GWT 2.0.4

2010-12-07 Thread julio
I moved from GWT 2.0.4 to 2.1 (last release) but there is still the
same problem

could be it a GWT bug?

Julio

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



How to change the panel in Activity.start()

2010-11-11 Thread Julio Faerman
I want to start one activity (my form) inside another (my app). I am
trying to do that with the 2.1 MVP Framwork and would like to know...

1) Is it possible to configure the ActivityManager (or add place
parameter) so that my FormActivity.start() receives a inner panel of
my app instead of the outer one set by
activityManager.setDisplay(appWidget) when the EntryPoint was loaded?

2) The documentation reads your app could create a CompositePlace,
CompositeActivity, and CompositePlace.Tokenizer classes that delegate
to the constituent members. Have anyone implemented that? (and would
be kind enough to share)

3) Is there another way or recommended practice?

Thanks,
Julio

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



Re: HTML5 Offline GWT APP

2010-07-28 Thread Julio Faerman
The filter didn't work for me, i don't know exactly why, i am guessing
that static files (such as gwt artifacts) under GAE dev have different
access...

On Jul 28, 4:56 am, Shawn Brown big.coffee.lo...@gmail.com wrote:
 Hi,

  The problem is finding out which files are cached and how... i don't
  know if there is any tool that show you that.

 I tried to see what would happen if a file wasn't cached by using a
 whitelist of things to load off the network.

 CACHE MANIFEST
 ...list of files...

 NETWORK:
 index.html
 myapp.nocache.js

 I wanted to see what I'd see in firebug when a resource wasn't cached
 and it wasn't available.

 I couldn't though as the dev server
 (com.google.appengine.tools.development.gwt.AppEngineLauncher ) is
 rewriting the cache files.

 If I lock the file, the server won't start and if I rewrite the file
 after the server starts, the server keeps rewriting it for
 everyrequest.

 There is a big difference between the linker manifest and the
 appengine dev server generated one, but anyway my app works fine even
 without many needed .js files in the manifest.  That is of course
 until the first rpc call but that is to be expected and I'll have to
 get data from the database.

 Anyway, thanks for your help.  I'll try the network whitelist when I
 get a minute with a real deploy.  I'm curious what we'll see.  Judging
 from the gears lists, it'll just be a html error code type thing when
 a server isn't available.

 Shawn

 FYI, why not a filter instead of a Servlet

         filter-nameOfflineManifestFilter/filter-name
                 filter-classapp.server.OfflineManifestFilter/filter-class
         /filter

         filter-mapping
                 filter-nameOfflineManifestFilter/filter-name
                 url-patternapp.manifest/url-pattern
         /filter-mapping

 package app.server;

 import java.io.IOException;

 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;

 import com.allen_sauer.gwt.log.client.Log;

 public class OfflineManifestFilter implements Filter {

         @Override
         public void destroy() {
                 // TODO Auto-generated method stub

         }

         @Override
         public void doFilter(ServletRequest request, ServletResponse
 response, FilterChain chain) throws IOException, ServletException {

                 Log.info(request for OfflineManifest);
                 response.setContentType(text/cache-manifest);
                 chain.doFilter(request, response);

         }

         @Override
         public void init(FilterConfig arg0) throws ServletException {
                 // TODO Auto-generated method stub

         }

 }



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



GWT + Web SQL

2010-07-28 Thread Julio Faerman
Hello,

I am building a GWT app that uses Web SQL Local Storage (
http://dev.w3.org/html5/webdatabase/ ).
The problem is that the Web SQL API uses callback functions as
arguments.

Is it possible to pass Java callbacks to JSNI?

Thanks,
Julio

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



Re: HTML5 Offline GWT APP

2010-07-27 Thread Julio Faerman
I am doing like the Google IO Linkers video:

@LinkerOrder(Order.POST)
public class OfflineLinker extends AbstractLinker {

@Override
public String getDescription() {
return HTML 5 Offline Linker;
}

@Override
public ArtifactSet link(TreeLogger logger, LinkerContext context,
ArtifactSet artifacts) throws UnableToCompleteException 
{
ArtifactSet artifactSet = new ArtifactSet(artifacts);
StringBuilder buf = new StringBuilder();
buf.append(CACHE MANIFEST\nindex.html\n);
buf.append(#).append(System.currentTimeMillis()).append(\n);

for(EmittedArtifact 
artifact:artifacts.find(EmittedArtifact.class)){
if(!artifact.isPrivate()){

buf.append(artifact.getPartialPath()).append(\n);
}
}
EmittedArtifact artifact = emitString(logger, buf.toString(),
gt.manifest); //my manifest file name
artifactSet.add(artifact);
return artifactSet;
}
}

I also needed this servlet (mapped to /gt.manifest) :

public class ManifestServlet extends HttpServlet{
@Override
protected void service(HttpServletRequest req, HttpServletResponse
resp)
throws ServletException, IOException {
resp.setContentType(text/cache-manifest);
RequestDispatcher disp = req.getRequestDispatcher(/gt/
gt.manifest);
disp.forward(req, resp);
}
}

It seems to be working, but debugging is not easy.

On Jul 27, 6:37 am, Shawn Brown big.coffee.lo...@gmail.com wrote:
 Hi Julio,

  Thanks Arthur, the linker works perfectly.

 Did you use the  com.google.gwt.core.ext.linker.AbstractLinker  and
 just override the link method?

 If so, are we just outputting the file names to make a suitable
 manifest in the link method.  Will this compile the project and make
 the manifest at the same time or is it a two step process.

 May I please see your linker code!?!  Is there a manifest linker
 available someplace?

  I am using google plugin for eclipse and gae-java

 Me too and if I have any info I'll share but right now am a step or
 two behind you.

 Thanks,

 Shawn

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



Re: HTML5 Offline GWT APP

2010-07-27 Thread Julio Faerman
The problem is finding out which files are cached and how... i don't
know if there is any tool that show you that.

On Jul 27, 10:51 am, Shawn Brown big.coffee.lo...@gmail.com wrote:
  It seems to be working, but debugging is not easy.

 Why is that?

 Can't you use Firebug, the Error console in Safari or the Dev console
 in chrome to display logging?

 Sorry if it's a dumb question but ...

 Anyway thanks!

 Shawn

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



Re: HTML5 Offline GWT APP

2010-07-26 Thread Julio Faerman
Thanks Arthur, the linker works perfectly.
I also made a servlet to add the text/cache-manifest content type
and  redirect to the generated manifest file.
But i still can't use my app ofline.

Is there any browser capable of debugging HTML5 offline cache?

Know i have a error event, discovered using this script:
http://jonathanstark.com/blog/2009/09/27/debugging-html-5-offline-application-cache/
But the response is coming correctly, but i don't know what i am doing
wrong.

Is there any deployable examples of this?
I am using google plugin for eclipse and gae-java

On Jul 26, 12:30 pm, Arthur Kalmenson arthur.k...@gmail.com wrote:
 Yeah, that's definitely possible to do. You need to use a Linker to
 build the manifest at the end. There was a Linkers talk at Google I/O
 that discussed building an HTML 5 manifest 
 Linker:http://code.google.com/events/io/2010/sessions/gwt-linkers-webworkers
 You could also pull it out of the Speed Tracer source.

 --
 Arthur Kalmenson

 On Fri, Jul 23, 2010 at 8:40 AM, Julio Faerman jfaer...@gmail.com wrote:
  Hi,

  I am trying to build a offline gwt app using HTML5 cache manifest and
  local storage, but to do that, i need to build the manifest file
  listing all the GWT generated files, right?
  Can i do this during the compile process or is it better to do this in
  a shell script?

  Thanks,
  Julio

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



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



HTML5 Offline GWT APP

2010-07-23 Thread Julio Faerman
Hi,

I am trying to build a offline gwt app using HTML5 cache manifest and
local storage, but to do that, i need to build the manifest file
listing all the GWT generated files, right?
Can i do this during the compile process or is it better to do this in
a shell script?

Thanks,
Julio

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



[gwt-contrib] Command pattern and GWT.runAsync

2010-06-02 Thread Julio Faerman
Hi,

I am trying to split a GWT app that uses the command (action) pattern.
The problem is that  GWT.create(ActionService.class) causes every
subclass of the return and parameter types to be included in the
initial fragment.

For instance, my action interface is:

public interface ActionService extends RemoteService {
T extends Response, V extends Request T execute(V req) throws
ActionFailedException;
}

the problem is that module1.SomeRequest and module2.OtherRequest
gets included in the initial fragment.
Do you see a way around this?

Thanks,
Julio Faerman

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


GWT.runAsync and Command Pattern

2010-05-30 Thread Julio Faerman
Hi,

I am trying to split a GWT app that uses the command (action) pattern.
The problem is that  GWT.create(ActionService.class) causes every
subclass of the return and parameter types to be included in the
initial fragment.

For instance, my action interface is:

public interface ActionService extends RemoteService {
T extends Response, V extends Request T execute(V req) throws
ActionFailedException;
}

the problem is that module1.SomeRequest and module2.OtherRequest
gets included in the initial fragment.
Do you see a way around this?

Thanks,
Julio Faerman

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



Re: GWT.runAsync and Command Pattern

2010-05-30 Thread Julio Faerman
Would it be possible to wrap / unwrap the request, removing the
immediate inheritance or the compiler must generate the type
serializers eagerly for all types ever reachable?
Thanks for the advice on the interface, Frederico, i hope i can use
it. In my case, code splitting is more important than commands, i wish
they weren't mutually exclusive.

On May 30, 11:17 am, federico federico.mona...@gmail.com wrote:
 hi julio,

 the issue you mentioned exists,
 anyway your ActionService interface should be:

 T extends Response, V extends RequestT T execute(V req) throws
 ActionFailedException;

 on the other hands it's not possible at compile time to predict wich
 results are connected with wich requests

 On 30 Mag, 16:13, federico federico.mona...@gmail.com wrote:

  yes
  also i've faced this problem and didn't find any solution
  i'think the previous issue it's connected with this:

 http://code.google.com/p/google-web-toolkit/issues/detail?id=2374can=5

  On 30 Mag, 15:48, Tristan tristan.slomin...@gmail.com wrote:

   You might be running into this issue:

  http://code.google.com/p/google-web-toolkit/issues/detail?id=4412

   The compiler simply doesn't do enough analysis to do code split
   properly when inheritance is involved, staring the issue may help.

   Cheers

   On May 30, 7:38 am, Julio Faerman jfaer...@gmail.com wrote:

Hi,

I am trying to split a GWT app that uses the command (action) pattern.
The problem is that  GWT.create(ActionService.class) causes every
subclass of the return and parameter types to be included in the
initial fragment.

For instance, my action interface is:

public interface ActionService extends RemoteService {
        T extends Response, V extends Request T execute(V req) throws
ActionFailedException;

}

the problem is that module1.SomeRequest and module2.OtherRequest
gets included in the initial fragment.
Do you see a way around this?

Thanks,
Julio Faerman

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



How to build event hierarchy?

2010-05-26 Thread Julio Faerman
Hi,

In my game UI i have several events, from generic to specific
( GameEvent  PlayerMessageEvent  PlayerVoteEvent ... ). Some widgets
are interested in all events, logging all GameEvents for instance, and
other are only interested specific events, showing all player votes
for example.
Given that event listeners must listen to a single GwtEvent.Type using
the HandlerManager, what is the best way to implement such system?
Should i add the same listener for all types or the HandlerEvent can
handle inheritance?

Thanks,
Julio

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



Re: How to build event hierarchy?

2010-05-26 Thread Julio Faerman
Thanks Jeff!

I wonder if it would better to implement a HandlerManager that
understands event type hierarchy or add a type parameter to the
event and do the if/switch in the event handler.

On May 26, 11:46 am, Jeff Chimene jchim...@gmail.com wrote:
 Hi Julio:

 Events are rarely hierarchical, which is not to say that they don't have
 parameters. For example:
 getEventBus.fireEvent(new GameEvent(EVENT.QUIT))

 From the perspectives of reliability, maintenance, performance, I would not
 add the same listener for all event types. I'm assuming that by
 HandlerEvent you really mean the corresponding event handler. If that's
 what you mean, the answer is no. Event handlers are flat; absent event
 parameters, they cannot manage an event hierarchy you describe.

 I'm wondering if what you're really wanting is AOP. GWT isn't AOP friendly
 (yet).

 On Wed, May 26, 2010 at 7:18 AM, Julio Faerman jfaer...@gmail.com wrote:
  Hi,

  In my game UI i have several events, from generic to specific
  ( GameEvent  PlayerMessageEvent  PlayerVoteEvent ... ). Some widgets
  are interested in all events, logging all GameEvents for instance, and
  other are only interested specific events, showing all player votes
  for example.
  Given that event listeners must listen to a single GwtEvent.Type using
  the HandlerManager, what is the best way to implement such system?
  Should i add the same listener for all types or the HandlerEvent can
  handle inheritance?

  Thanks,
  Julio

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



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



Re: Grid component spacing question.

2010-05-09 Thread Julio Faerman
Works perfectly. Thank you kozura.

On May 8, 11:17 pm, kozura koz...@gmail.com wrote:
 Style it with display: block;.  Images by default are inline which
 leaves space for text footers.  Yeah that makes no sense..

 On May 8, 3:41 pm, Julio Faerman jfaer...@gmail.com wrote:



  I have a undesired white space in mygridcell between the image
  bottom and the cell border.

  This simple code shows the problem:

  public class MyApp implements EntryPoint {
          public void onModuleLoad() {
                 Gridgrid= newGrid(1,1);
                  Image image = new Image();
                  image.setUrl(http://shpyrko.files.wordpress.com/
  2007/07/31persistenceofmemory.jpg);
                 grid.setWidget(0,0,image);
                 grid.setBorderWidth(1);
                  RootPanel.get().add(grid);
          }

  }

  Here you can see it running:http://theximp.appspot.com

  I wonder if this is caused by some default style... help anyone?

  Thanks in advance,
  Julio

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

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

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



Grid component spacing question.

2010-05-08 Thread Julio Faerman
I have a undesired white space in my grid cell between the image
bottom and the cell border.

This simple code shows the problem:

public class MyApp implements EntryPoint {
public void onModuleLoad() {
Grid grid = new Grid(1,1);
Image image = new Image();
image.setUrl(http://shpyrko.files.wordpress.com/
2007/07/31persistenceofmemory.jpg);
grid.setWidget(0,0,image);
grid.setBorderWidth(1);
RootPanel.get().add(grid);
}
}

Here you can see it running: http://theximp.appspot.com

I wonder if this is caused by some default style... help anyone?

Thanks in advance,
Julio

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



Question about GWTEvent.Type

2010-05-06 Thread Julio Faerman
Hello,

Is it possible to define event subtypes ? I would like to define a
GenericEvent and a SpecificEvent so that when a SpecificEvent is
fired in the HandlerManager, both generic and specific event handlers
are notified.

Thanks in avance for your support.

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



MVP + Places

2010-04-28 Thread Julio Faerman
Hi,

I am trying to implement the Places abstraction over the history
service in my GWT MVP app. I am finding it very hard to get it working
with hierarchical places ( token=/order/123/item/1 ), because i
would not like to redraw the entire screen ( container.clear() ) when
the place is changed to somewhere near ( token=/order/123/item/2 ),
unless that is required.

In the attempt of discovering what to redraw, etc, i have produced a
huge amount of spaghetti code. The best code on this i have found so
far is 
http://www.amateurinmotion.com/articles/2010/02/01/gwt-history-management-with-places.html,
but it is also unclear.

If anyone have been through similar issues and could share some
solutions, it would be of tremendous help. Or, if someone wants to
build a hierarchical mvp places library, i would be glad to help the
endeavour.

Best regards,
Julio Faerman

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



Using Rack applications inside Hosted mode

2009-07-20 Thread Julio Capote

Wrote a blog article detailing how one can use any Rack application
inside of GWT's Hosted mode servlet container. This allows you to
develop your application without needing to deploy to your backend all
the time.

http://juliocapote.com/post/145035194/using-rack-applications-inside-gwt-hosted-mode

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



Jira/Confluence Gwt Portlet

2008-12-04 Thread Julio Pereira
Hi,


Some time ago, i created some portlets for JBOSS Portal using gwt.
Now i need to create similar portlets for jira/confluence. I create a
plugin, but it does not understand the gwt code - i think bec it does not
make deploy of the application.
i haven't seen many references about that.
Does anyone has some ideas or references (like default structure that i have
to follow)?


thanks

-- 
Julio

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---