Re: GWT Button becoming transparent due to CSS?

2013-08-21 Thread AgitoM
Well I further investigated the problem, and it turns out its a bug in 
WebKit browsers.
The widget is not redrawn by the browser, despite the fact it's newly 
created.

Does anyone know how to manually trigger a widget redraw or a browser 
Resize event?

Hope anyone knows.

-- 
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/groups/opt_out.


Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
In one of my applications I am ResizeHandler to resize the GUI of my app.
This works fine, but there is one part in my code where I would like to 
manually trigger a Resize.
Does anyone know how I can do that?

-- 
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/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
This is a part of my code:

Window.addResizeHandler(new PageResizeHandler());

and 

private class PageResizeHandler implements ResizeHandler {
@Override
public void onResize(ResizeEvent event) {
mainFrame.handleResize(event.getWidth(), event.getHeight());
}
}

This code does the job fine when the browser resizes. However now I would 
like manually trigger the browser resize event to force a WebKit browser to 
redraw.
simply invoking the handleResize method does not do the job.

On Wednesday, August 21, 2013 8:01:34 PM UTC+8, AgitoM wrote:

 In one of my applications I am ResizeHandler to resize the GUI of my app.
 This works fine, but there is one part in my code where I would like to 
 manually trigger a Resize.
 Does anyone know how I can do that?


-- 
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/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
Thank your help so far Jens. Any example on which Window method I can use?
I tried looking for it, but couldn't find it.

On Wednesday, August 21, 2013 8:01:34 pm UTC +8, AgitoM wrote:

 In one of my applications I am ResizeHandler to resize the GUI of my app.
 This works fine, but is there one part in my code YogyakartaT I would like 
 to manually trigger a resizing.
 Does anyone know how I can do that?


-- 
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/groups/opt_out.


GWT Button becoming transparent due to CSS?

2013-08-20 Thread AgitoM
Am currently developing a website for use in mobile browsers, and noticed 
that on some of the hand phones, buttons are not shown as visible.
This sometimes happens upon the creation of a widget, on other occasions 
when re-creating a certain widget.

Changing the orientation of the screen can make buttons appear again though.

Though I am not sure, it seems to be related to CSS, because when I remove 
all CSS files attached to the project, the buttons remain visible.

This is an example of the CSS style I am using on a button:

.mobileButton {
font-size: 14pt;
border: 1px solid #bbb;
border-bottom: 1px solid #a0a0a0;
border-radius: 3px;
background: white;
color: black;
text-align: center;
}
.mobileButton:hover {
background: #bbb;
color: black;
}

The style is attached to a button using the following line:
clickScan.setStyleName(menuMobileButton);

Hope anyone can help out.

-- 
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/groups/opt_out.


How to use DeckLayoutPanel?

2012-08-22 Thread AgitoM
Been trying to implement a iPhone like transition between widgets for a 
mobile project I'm working on
Basically I need transition from left to right, and from right to left.
Read online that this can be accomplished using a DeckLayoutPanel.

Been trying to get an example to work, but not matter what I try, I I can't 
get any of the DeckLayoutPanel contents to display.
Of the many things I have tried, this is a example:

public class AnimationMainView extends Composite {
private DeckLayoutPanel aPanel = new DeckLayoutPanel();
 public AnimationMainView() {
initWidget(this.aPanel);
this.setSize(100%, 100%);
 this.aPanel.setAnimationDuration(5000);
this.aPanel.setAnimationVertical(false);
 Widget1 w1 = new Widget1(this);
this.aPanel.add(w1);
 Widget2 w2 = new Widget2(this);
this.aPanel.add(w2);
 this.openWidget1();
}
 public void openWidget1() {
this.aPanel.showWidget(0);
}
 public void openWidget2() {
this.aPanel.showWidget(1);
}
}

Does anyone have a working example of a DeckLayoutPanel being used, or can 
someone explain what I am doing wrong?

Thanks in advance.

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



Re: GWT Mobile App Widgets

2012-05-02 Thread AgitoM
Hi Daniel,

Tried the mgwt, but it seems that the framework also only support
webkit based browsers?
I got some errors when trying to run in in Firefox.
Am I correct to say that only WebKit is supported?



On May 1, 2:52 am, Daniel Kurka kurka.dan...@googlemail.com wrote:
 if you are interested in mgwt there is a very friendly user group for
 the framework:http://groups.google.com/group/mgwt

 mgwt pays a lot of attention to do things in a GWT way, which brings
 big advantages to mobile device development.

 take a look for yourself athttp://www.m-gwt.com

 On 30 Apr., 20:43, Alfredo Quiroga-Villamil laww...@gmail.com wrote:







  Yes, if you are trying to cover that case, then you must absolutely
  find a mobile library that can potentially support any of the
  installable browsers in mobile devices. The important case to always
  keep in mind I would say is over engineering. Unless it's a
  requirement from the client, I would ask myself the question, what
  percentage of the market am I trying to support? Ideally the answer
  would be 100%, reality it's a different story. This is more the case
  since mobile web is fairly young. Even the web after all these years
  would be a nightmare if you removed GWT and libraries like it that
  have tried to make the developer experience better by hiding the
  browser differences or better said quirks.

  About a year and a half ago, perhaps more already, there was a point
  where the future of mobile web for developers looked bright. It was
  all going to be based on webkit or at least most of it and the world
  was going to be a happy place.

  Fast forward and we find a world where there is an incredible amount
  of fragmentation in the mobile market place with multiple versions of
  webkit, many don't exactly behaving consistently. Throw into the mix
  your request and it's almost starting to feel like we are right back
  to the web as we know it today where may browsers exists with
  difference in behavior not only between them but even among versions.

  Best of luck and wish your project the best.

  Alfredo

  On Mon, Apr 30, 2012 at 2:01 PM, AgitoM karel.m...@gmail.com wrote:
   Well the app runs fine on iPhone Safari, Google Chrome, and the
   Android Default Browser.
   However the app does not work on Firefox and Opera installations on
   the Android platform, so that could be a problem.
   So still hope someone can make a suggestion.

   On Apr 30, 10:53 pm, Alfredo Quiroga-Villamil laww...@gmail.com
   wrote:
   Mobile web libraries are based on webkit. Firefox is not. Mobile devices
   use webkit. To test the app you can try to use a webkit based browser 
   such
   as chrome or safari. So if you are happy with that library I recommend 
   you
   continue using it and test it as previously mentioned.

   Regards,

   Alfredo
   On Apr 30, 2012 10:35 AM, AgitoM karel.m...@gmail.com wrote:

Does anyone know a decent library that contains GWT Widgets for the
development of Mobile Apps in GWT?

Over the past few days I've been experimenting with gwt-mobile-gui.
Though this library is great, it doesn't appear to be working on all
browsers. (or at least I can't get it to work on Firefox).

So basically I am looking into other Libraries. Does anyone have any
suggestions?

Reason I am looking for a mobile widget library is because I am
developing a mobile app. I developed a framework for a mobile app
myself, and it works fine, but it looks too ugly.
If no other library is available, does anyone know any tutorial of
guide to how to develop nice looking GUI in GWT?

Hope anyone can offer some advice.

--
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 
   athttp://groups.google.com/group/google-web-toolkit?hl=en.

  --
  Alfredo Quiroga-Villamil

  AOL/Yahoo/Gmail/MSN IM:  lawwton

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



Re: GWT Mobile App Widgets

2012-05-01 Thread AgitoM
Thanks for all the replies so far.
The gwt-mobile-ui library I used, was part of the GWTMobile project.
It has the problem I described.

Since my project is going to be deployed in a very large group of
users, who all have different phones and browsers installed on it, I
need to make my application as widely deployable as possible. gwt-
mobile-ui unfortunately is too limited.

I hadn't see mgwt yet. Will check it out today if time allows, may
adopt is as the platform in the long run, should I choose to replace
my own mobile framework (which has is flaws such as being ugly and
requiring a lot of coding). Will probably join the user group as well.

On May 1, 2:52 am, Daniel Kurka kurka.dan...@googlemail.com wrote:
 if you are interested in mgwt there is a very friendly user group for
 the framework:http://groups.google.com/group/mgwt

 mgwt pays a lot of attention to do things in a GWT way, which brings
 big advantages to mobile device development.

 take a look for yourself athttp://www.m-gwt.com

 On 30 Apr., 20:43, Alfredo Quiroga-Villamil laww...@gmail.com wrote:







  Yes, if you are trying to cover that case, then you must absolutely
  find a mobile library that can potentially support any of the
  installable browsers in mobile devices. The important case to always
  keep in mind I would say is over engineering. Unless it's a
  requirement from the client, I would ask myself the question, what
  percentage of the market am I trying to support? Ideally the answer
  would be 100%, reality it's a different story. This is more the case
  since mobile web is fairly young. Even the web after all these years
  would be a nightmare if you removed GWT and libraries like it that
  have tried to make the developer experience better by hiding the
  browser differences or better said quirks.

  About a year and a half ago, perhaps more already, there was a point
  where the future of mobile web for developers looked bright. It was
  all going to be based on webkit or at least most of it and the world
  was going to be a happy place.

  Fast forward and we find a world where there is an incredible amount
  of fragmentation in the mobile market place with multiple versions of
  webkit, many don't exactly behaving consistently. Throw into the mix
  your request and it's almost starting to feel like we are right back
  to the web as we know it today where may browsers exists with
  difference in behavior not only between them but even among versions.

  Best of luck and wish your project the best.

  Alfredo

  On Mon, Apr 30, 2012 at 2:01 PM, AgitoM karel.m...@gmail.com wrote:
   Well the app runs fine on iPhone Safari, Google Chrome, and the
   Android Default Browser.
   However the app does not work on Firefox and Opera installations on
   the Android platform, so that could be a problem.
   So still hope someone can make a suggestion.

   On Apr 30, 10:53 pm, Alfredo Quiroga-Villamil laww...@gmail.com
   wrote:
   Mobile web libraries are based on webkit. Firefox is not. Mobile devices
   use webkit. To test the app you can try to use a webkit based browser 
   such
   as chrome or safari. So if you are happy with that library I recommend 
   you
   continue using it and test it as previously mentioned.

   Regards,

   Alfredo
   On Apr 30, 2012 10:35 AM, AgitoM karel.m...@gmail.com wrote:

Does anyone know a decent library that contains GWT Widgets for the
development of Mobile Apps in GWT?

Over the past few days I've been experimenting with gwt-mobile-gui.
Though this library is great, it doesn't appear to be working on all
browsers. (or at least I can't get it to work on Firefox).

So basically I am looking into other Libraries. Does anyone have any
suggestions?

Reason I am looking for a mobile widget library is because I am
developing a mobile app. I developed a framework for a mobile app
myself, and it works fine, but it looks too ugly.
If no other library is available, does anyone know any tutorial of
guide to how to develop nice looking GUI in GWT?

Hope anyone can offer some advice.

--
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 
   athttp://groups.google.com/group/google-web-toolkit?hl=en.

  --
  Alfredo Quiroga-Villamil

  AOL/Yahoo/Gmail/MSN IM:  lawwton

-- 
You

GWT Mobile App Widgets

2012-04-30 Thread AgitoM
Does anyone know a decent library that contains GWT Widgets for the
development of Mobile Apps in GWT?

Over the past few days I've been experimenting with gwt-mobile-gui.
Though this library is great, it doesn't appear to be working on all
browsers. (or at least I can't get it to work on Firefox).

So basically I am looking into other Libraries. Does anyone have any
suggestions?

Reason I am looking for a mobile widget library is because I am
developing a mobile app. I developed a framework for a mobile app
myself, and it works fine, but it looks too ugly.
If no other library is available, does anyone know any tutorial of
guide to how to develop nice looking GUI in GWT?

Hope anyone can offer some advice.

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



Re: GWT Mobile App Widgets

2012-04-30 Thread AgitoM
Well the app runs fine on iPhone Safari, Google Chrome, and the
Android Default Browser.
However the app does not work on Firefox and Opera installations on
the Android platform, so that could be a problem.
So still hope someone can make a suggestion.

On Apr 30, 10:53 pm, Alfredo Quiroga-Villamil laww...@gmail.com
wrote:
 Mobile web libraries are based on webkit. Firefox is not. Mobile devices
 use webkit. To test the app you can try to use a webkit based browser such
 as chrome or safari. So if you are happy with that library I recommend you
 continue using it and test it as previously mentioned.

 Regards,

 Alfredo
 On Apr 30, 2012 10:35 AM, AgitoM karel.m...@gmail.com wrote:







  Does anyone know a decent library that contains GWT Widgets for the
  development of Mobile Apps in GWT?

  Over the past few days I've been experimenting with gwt-mobile-gui.
  Though this library is great, it doesn't appear to be working on all
  browsers. (or at least I can't get it to work on Firefox).

  So basically I am looking into other Libraries. Does anyone have any
  suggestions?

  Reason I am looking for a mobile widget library is because I am
  developing a mobile app. I developed a framework for a mobile app
  myself, and it works fine, but it looks too ugly.
  If no other library is available, does anyone know any tutorial of
  guide to how to develop nice looking GUI in GWT?

  Hope anyone can offer some advice.

  --
  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: byte array to Image

2011-09-27 Thread AgitoM
Decided to deal with the 32kb limit in Internet Explorer 8. (Internet
Explorer 9 is not a problem).
Dealt with the problem by creating a servlet that outputs the byte
array as a image.
I'm sending the ID of the image, in this case a map, to the servlet
using the GET method.

This is the code for the doGet operation for my dedicated
ImageServlet:

protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
response.setContentType(image/png);

if(request.getParameter(MapID) != null) {
int mapID = 
Integer.parseInt(request.getParameter(MapID));

byte[] image = null;
try {
image = wsStub.getMapImage(mapID);
}
catch (Exception e) {
e.printStackTrace();
}

OutputStream out = response.getOutputStream();
out.write(image);
out.close();
}
}

On my RPC Servlet side, I simply return this as the URL of the
image:
(ImageServlet?MapID= + mapID)

Code on the client side didn't change from what I earlier posted.

-- 
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: byte array to Image

2011-09-18 Thread AgitoM
Hi All,

Thank you so much for the many replies.
Tried out the solution and library suggested by Xi just now, since his
solution was the easiest to verify.
It works.

After having downloaded this library:
http://sourceforge.net/projects/migbase64/

I convert the byte string like this:
String base64String = data:image/png;base64, +
Base64.encodeToString(image,false);

Then simply use it at the client side like this:
Image image = new Image(base64String);

The image now displays. I think the base64 library I initially used
was not browser safe as Jens and Thad suggested.
Would have build a servlet as Jens suggested if it had not worked.

As for your question Alexandre, I don't know why the service developer
suggested I could not use base64.
Could have been inexperience on his behalf :-). Clearly base64 does
work.

On Sep 17, 12:02 am, Xi chenx...@gmail.com wrote:
 Hi,

     I've usedhttp://sourceforge.net/projects/migbase64/in my
 application, to convert the byte array to a base64 string, which works
 pretty well and efficient
     My code is like : String base64 = data:image/png;base64, +
 Base64.encodeToString(bytes,false);
     And at the client side, you just set the value into an image
 element's src attribute.

     But be careful, IE CAN NOT take charge of an image that bigger
 than 32KB by using the Base64 way.

     Hope this can help you.

 On 16 sep, 12:54, AgitoM karel.m...@gmail.com wrote:

  Hi all,

  From a web service I am receiving a byte array that represents a
  image.
  I need to somehow squeeze this byte array into a image widget or
  similar widget on my client side.

  First I tried to convert the byte array to a base64 string:
  String base64 = Base64Utils.toBase64(image);
  base64 = data:image/png;base64,+base64;

  This didn't work. The developer of the web service informed me that I
  should not convert the byte array to a base64 string, and just use it
  directly.

  To test if the byte array represented a correct image, I saved the
  byte array to a physical image:
  InputStream in = new ByteArrayInputStream(image);
  BufferedImage bImage = ImageIO.read(in);

  File outputfile = new File(saved.png);
  ImageIO.write(bImage, png, outputfile);

  This succesfully resulted in a physical image being created.

  However I don't want to write the file and then send the URL to the
  image widget on my client side.

  Anybody have any suggestion about how I can get this byte array
  squeezed into a image?
  Or convert this byte array to a base64 string that does work?

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



byte array to Image

2011-09-16 Thread AgitoM
Hi all,

From a web service I am receiving a byte array that represents a
image.
I need to somehow squeeze this byte array into a image widget or
similar widget on my client side.

First I tried to convert the byte array to a base64 string:
String base64 = Base64Utils.toBase64(image);
base64 = data:image/png;base64,+base64;

This didn't work. The developer of the web service informed me that I
should not convert the byte array to a base64 string, and just use it
directly.

To test if the byte array represented a correct image, I saved the
byte array to a physical image:
InputStream in = new ByteArrayInputStream(image);
BufferedImage bImage = ImageIO.read(in);

File outputfile = new File(saved.png);
ImageIO.write(bImage, png, outputfile);

This succesfully resulted in a physical image being created.

However I don't want to write the file and then send the URL to the
image widget on my client side.

Anybody have any suggestion about how I can get this byte array
squeezed into a image?
Or convert this byte array to a base64 string that does work?

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



Developing Google Docs like Feature

2010-11-17 Thread AgitoM
For the project I am working on, I need to develop a Google Docs like
feature since we should support collaborative document editing.  I
already have a mechanism based on Comet that can synchronize data, but
I need to be able to update a text onscreen based on what is being
keyed in on the client, and what is coming in through from the server.

Currently I'm using a rich text area, problem with that is though when
a update comes in, the cursor moved back to the top left corner, or
when people are editing on the same line, all people share the same
cursor, which results in all user effectively overwriting each other.

Any other widget I can use, or any way I can integrate Google Docs in
the platform I'm developing?

-- 
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-Connectors: Delete Shape

2010-11-16 Thread AgitoM
For a Education project I am doing using GWT, I need to implement a
diagram modeling feature. I am attempting to do this in GWT.

The type of model I am attempting to construct essentially requires a
Widget to be dragged to a canvas. (Currently implemented as a
AbsolutePanel with GWT DnD for the drag and drop interface) and the
widgets on the canvas to be connected by a line. It should be possible
to move the widgets are afterwards. (And the lines moving along with
them).

I'm currently using GWT-Connectors to implement the connection of
widgets.

I'm using this piece of code to create a new GWT-Connectors Shape
and add it to the AbsolutePanel:

Diagram diagram = new Diagram(this.boundaryPanel);

SquareSprite square = new SquareSprite(); //My defined Composite
Widget
Shape shapeSquare = new Shape(square); //Wrapping it into a GWT-
Connectors Shape
square.addClickHandler(new ShapeClickHandler(square)); //Adding a
Click handler to allow selection
this.boundaryPanel.add(square, leftCoord, topCoord); //Adding Widget
to AbsolutePanel
shapeSquare.showOnDiagram(diagram); //Show Shape on GWT-Connectors
Diagram

I add a Connector to the same Diagram using this code:

Connector connector = new Connector(leftCoord, topCoord, leftCoord
+100, topCoord+40);
connector.showOnDiagram(diagram);

I then use the drag and drop functionality of the GWT-Connectors shape
and connector to allow the connector to be connected between shapes.

However things become a problem when I attempt to drag a connector
around after having deleted a widget using this code:

this.selectedShape.removeFromDiagram(diagram);
boundaryPanel.remove(this.selectedShape);

Attempting to drag a Connector around, will result in the following
error after attempting to delete a widget:

com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: Unattached drop target.
You must call DragController#unregisterDropController for all drop
targets not attached to the DOM.
at com.allen_sauer.gwt.dnd.client.DropControllerCollection
$Candidate.init(DropControllerCollection.java:48)
at
com.allen_sauer.gwt.dnd.client.DropControllerCollection.resetCache(DropControllerCollection.java:
137)
at
com.allen_sauer.gwt.dnd.client.PickupDragController.resetCache(PickupDragController.java:
349)
at
com.allen_sauer.gwt.dnd.client.AbstractDragController.dragStart(AbstractDragController.java:
155)
at
com.allen_sauer.gwt.dnd.client.PickupDragController.dragStart(PickupDragController.java:
206)
at pl.tecna.gwt.connectors.client.Diagram
$4.dragStart(Diagram.java:
171)

For a more elaborate, see my post in the GWT-Connectors group:
http://groups.google.com/group/gwt-connectors/browse_thread/thread/637880f74f3c9e60

My questions are:
Am I creating and deleting the Widget and Shape properly:
If yes, how can I correct the error?
If no, how am I supposed to do it then?

Sorry I post this question here, the GWT-Connectors group seems to be
very inactive.

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



A Alternative to GWT-Connectors?

2010-11-16 Thread AgitoM
For my currently project I am attempting to implement a drag and drop
diagram/modeling feature. Essentially I need to be able to connect 2
composite widgets, that have been dragged on a Absolute Panel. After
connecting, the widgets needs to be able to me moved around. Next to
that, it must be possible to delete widgets and connections.  To
facilitate I am currently using GWT-Connectors. However I have been
encountering problems with GWT-Connectors that so far I've been unable
to overcome. The problems occur after deleting a widget from the
absolute panel.

Since development on GWT-Connectors seems to be slow, or not existing
at all, and the group related to the project is also very inactive, I
need a plan B in case I can't get the problems with GWT-Connectors
solved.

Therefore I would like to ask, is the a alternative library to GWT-
Connectors available?
I'm even willing to consider GWT Libraries for which I will have to
pay, because I really need this functionality.

-- 
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: Timer to Refresh a Table View

2010-07-15 Thread AgitoM
You can use this:

public void refreshTable() {
Timer t = new Timer() {
   public void run() {
 //Retrieve Data
 //Refresh table
 refreshTable();
  }
};
// Schedule the timer to run once in 5 minutes.
t.schedule(30);
}

This essentially this creates a recursive loop, that will halt for 5
minutes every time it starts a loop cycle.
This will not hang your single treated Javascript like your earlier
approach.

On Jul 15, 2:41 am, Irving Ruan irvingr...@gmail.com wrote:
 Hi all,

 So I understand that onModuleLoad() method in the class that
 implements EntryPoint is the method that basically initiates the GWT
 web app. On this web app, I have some headers and metadata info, such
 as the main title. However, I have a Table which dynamically pulls in
 data from a local SQL DB. While I am able to successfully read from
 the DB and display the data, I want the table to automatically reload
 ever 5 minutes, which in return, refreshes the view if the DB changes
 info.

 I tried implementing a sleep timer function within the onModuleLoad()
 within an infinite while loop but that does not work and the page
 never completely loads because onModuleLoad() needs to finish being
 called before the view gets loaded. Any ideas on how to implement an
 automatic table or page refresher ever X minutes?

 Here's the code in my onModuleLoad() function:

 public void onModuleLoad() {

                 // Set alignment and size
                 DockPanel mainPanel = new DockPanel();
                 mainPanel.setSize(100%, 100%);
                 mainPanel.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE);
                 mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);

                 final AppTableView tableView = new AppTableView();
                 final AppFrameView frameView = new AppFrameView();

                 // Add view modules to the page
                 mainPanel.add(appFrameView, DockPanel.NORTH);
                 mainPanel.add(appTableView, DockPanel.CENTER);

                 RootPanel.get().add(mainPanel);

                 while (true)
                 {

                         // This method pulls in data from the SQL db
 and displays it
                         tableView.draw();

                         timer(500);
                 }
         }

 The tableView.draw() method is the one that pulls in data from the SQL
 DB and displays it.

 Thanks in advance,
 -I.

-- 
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: Google Web Toolkit Lagging

2010-07-14 Thread AgitoM
Could this have been due to a recent Google Web Toolkit update?
I indeed don't consider the problem serious, since the system still
works fine when compiled.
It is annoying though when debugging, specially since I'm building a
large system that involves data synchronization.

On Jul 12, 9:06 pm, anjan bacchu.dev anjan.d...@gmail.com wrote:
 Hi There,

   Since the javascript code that is generated while working within eclipse
 is NOT optimized, it is expected that the application becomes slow. As long
 as the compiled application is NOT slow, you should be fine.

 BR,
 ~A

 On Mon, Jul 12, 2010 at 10:12 AM, AgitoM karel.m...@gmail.com wrote:
  Since somewhere last week, whenever I try and run a application I
  build in debug mode, the application is heavy lagging. This is the
  case in any browser that I use, and was not the case until a few days
  ago.
  Over the past few days there have been no major changes to the source
  code of the application.
  On top of that, if I compile the application and deploy on Apache
  Tomcat the speed of the application is back to normal.

  Has anyone else experienced this problem?
  Is it due to some GWT update?

  Anyone who has encountered it managed to fix it?

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



Google Web Toolkit Lagging

2010-07-11 Thread AgitoM
Since somewhere last week, whenever I try and run a application I
build in debug mode, the application is heavy lagging. This is the
case in any browser that I use, and was not the case until a few days
ago.
Over the past few days there have been no major changes to the source
code of the application.
On top of that, if I compile the application and deploy on Apache
Tomcat the speed of the application is back to normal.

Has anyone else experienced this problem?
Is it due to some GWT update?

Anyone who has encountered it managed to fix it?

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



Remove DecoratedTabPanel Margin

2010-07-05 Thread AgitoM
For a large application I am developing I am using a DecoratedTabPanel
in a DecoratedTabPanel, to create the illusion of sub Tabs.

However, the content of a tab has a white margin around it, which
makes the tabPanel inside the tabPanel look rather ugly.

How can I remove the white margin?
I've been tempering with the CSS sheets, but I can't seem to get it to
work.

-- 
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: Calling RSS service in GWT from the server side

2010-06-20 Thread AgitoM
As promised, here is the code that finally did the trick for me.
The key was using the java.net.URL Object. This object does work when
compiled on the server side.

The code:

The relavant imports:

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Iterator;

The Function:

public Weather getWeatherInSingapore() {
System.out.println(Server Reached);

String request = http://weather.yahooapis.com/forecastrss?
w=1062617u=c;

Weather weatherReport = new Weather();

try {
URL url = new URL(request);
URLConnection yc = url.openConnection();

BufferedReader br = new BufferedReader(new
InputStreamReader(yc.getInputStream()));

String xml = ;
String line;
while ((line = br.readLine()) != null) {
xml = xml + line;
}
br.close();

weatherReport = this.convertYAHOOWeather(xml);
} catch (Exception e) {
e.printStackTrace();
}

return weatherReport;
}

Again:
WeatherReport is a custom object I've written myself to contain the
necessary Information
The convertYAHOOWeather is a private function that parses the XML
reply form the YAHOO RSS (Using dom4j).

-- 
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: Calling RSS service in GWT from the server side

2010-06-18 Thread AgitoM
Managed to solve the problem. Used a different object to connect to
YAHOO.
Don't know why my first solution didn't work though.

I do not have access to my corrected code currently, but will post the
right solution here as soon as possible.

-- 
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: Invoke SOAP Web Service from GWT on the server side.

2010-06-18 Thread AgitoM
Hi Stefan,

Thanks for your reply. Well thats what I indeed thought as well.
But for some reason invoking a service using AXIS2 is causing me a
problem, hence I decided to ask if there was any restriction.
Well, I will just keep on trying and getting it to work.
Once I do, I will post a solution here.

In the meanwhile, if anyone has a good idea on how to do it, feel free
to post here.

On Jun 18, 10:45 pm, Stefan Bachert stefanbach...@yahoo.de wrote:
 Hi Agito,

 when you on the server side, you can do anything you can do with java.
 No limits from GWT applies.

 With other word, you may ask any other java group, too

 Stefan Bacherthttp://gwtworld.de

 On Jun 17, 5:59 am, AgitoM karel.m...@gmail.com wrote:

  For a big GWT project I am working on, we need to to retrieve data
  from other computer systems. Based on my previous experience, a good
  way to integrate these two systems, is to integrate them together
  using a SOAP based Web Service.

  Preferably I would like to server side of my GWT project to invoke the
  Web Service of the other system, and retrieve some data which is then
  send back to the client using GWT's normal RPC methods.

  I've tried creating such a integration using AXIS2 in Eclipse. This
  however does not seem to work well. Therefore I would like to ask if
  anyone knows what is the way Google prefers for GWT projects to make
  Web Service calls?

  I've tried  Googling for solutions for a significant amount of time,
  but couldn't find much.
  Anyone have any idea?

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



Invoke SOAP Web Service from GWT on the server side.

2010-06-17 Thread AgitoM
For a big GWT project I am working on, we need to to retrieve data
from other computer systems. Based on my previous experience, a good
way to integrate these two systems, is to integrate them together
using a SOAP based Web Service.

Preferably I would like to server side of my GWT project to invoke the
Web Service of the other system, and retrieve some data which is then
send back to the client using GWT's normal RPC methods.

I've tried creating such a integration using AXIS2 in Eclipse. This
however does not seem to work well. Therefore I would like to ask if
anyone knows what is the way Google prefers for GWT projects to make
Web Service calls?

I've tried  Googling for solutions for a significant amount of time,
but couldn't find much.
Anyone have any idea?

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



Calling RSS service in GWT from the server side

2010-06-17 Thread AgitoM
Over the past few days I have been working on a small GWT based
application which retrieves and displays Weather information from
YAHOO RSS in real time.

To get information from the YAHOO RSS feed, I am using the HttpClient
from the org.apache.commons library.
Using this library I attempt to make a call to the RSS feed on the
server side of the GWT application I am building.

The application I have written works fine while run in debug mode
using Eclipse. However when the application is compiled and deployed
on Apache Tomcat 6, it doesn't work anymore. The application simply
makes no call to YAHOO. Evenmore, it seems nothing is happening at all
on the server side of the application. I can't be more specific about
what goes wrong becaue no error is given. I've checked the Apache
Tomcat 6 logs, and no error or any system out information is present
in the logs. The client side GUI loads properly, but as I said,
nothing seems to happen on the server side.

Being completely clueless about what causes this problem, and having
no error feedback to go on. I decided to post the problem here, hoping
someone may know the cause of this.

This is the relevant part of my server sides source code:

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Iterator;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;

public Weather getWeatherInSingapore() {
System.out.println(Server Reached);

String request = http://weather.yahooapis.com/forecastrss?
w=1062617u=c;

Weather weatherReport = new Weather();

HttpClient client = new HttpClient();
GetMethod method = new GetMethod(request);

try {
// Send GET request
int statusCode = client.executeMethod(method);

if (statusCode != HttpStatus.SC_OK) {
System.out.println(Method failed:  + 
method.getStatusLine());
}
InputStream rstream = null;

// Get the response body
rstream = method.getResponseBodyAsStream();

// Process the response from Yahoo! Web Services
BufferedReader br = new BufferedReader(new 
InputStreamReader(
rstream));

String xml = ;
String line;
while ((line = br.readLine()) != null) {
xml = xml + line;
}
br.close();

weatherReport = this.convertYAHOOWeather(xml);
} catch (IOException e) {
System.out.println(Error);
e.printStackTrace();
}

return weatherReport;
}

Note:
WeatherReport is a custom object I've written myself to contain the
necessary Information
The convertYAHOOWeather is a private function that parses the XML
reply form the YAHOO RSS.

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