Re: getting the current row count from the button

2010-07-05 Thread nasionalem
Hello Rashmi,

Thanks alot, your code works successful.. :)
Thank you so much..

On Jul 3, 7:02 am, Rashmi guptara...@gmail.com wrote:
 Below is the code for ClickHandler I have written for removing a row.
 The button is placed in each row in the FlexTable and removes that
 particular row.

         public class RemoveRowButtonClickHandler implements ClickHandler {
                 @Override
                 public void onClick(ClickEvent event) {
                 Cell cell = flexTable.getCellForEvent(event);
                 if(cell != null) {
                         removeRow(cell.getRowIndex());
                 }

                 }
         }

 On Jul 2, 5:52 pm, nasionalem sakarya.me...@gmail.com wrote:



  Hello,

  I have a simple problem. I am using GWT 2.0 and I need help.
  I add a row with a button in FlexTable. The button should remove the
  row when click.
  But I didnt get current current row count..

  private void addItem() {

  // Add a button to remove this Item from the table.
  final int itemRowCount = testFlexTable.getRowCount();
  final Button removeStockButton = new Button(x);
  removeStockButton.addStyleDependentName(remove);
  removeStockButton.setTabIndex(itemRowCount);

  removeStockButton.addClickHandler(new ClickHandler() {
         public void onClick(ClickEvent event) {
          int removedIndex = // ** I should get the current current row
  count here ***
          testFlexTable.removeRow(removedIndex);
          }});

  testFlexTable.setText(itemRowCount, 0, Test + itemRowCount);
  testFlexTable.setWidget(itemRowCount, 1, removeStockButton);}- Hide quoted 
  text -

 - Show quoted text -

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



Best practice to serialize a org.w3c.dom.Document over RPC?

2010-07-05 Thread Richard Kennard
Hi guys,

A (hopefully easy) question: what is the GWT 'best practice' to take a
server-side DOM built with org.w3c.dom.Document and pass it over RPC?

Clearly once on the client-side it needs to become a
com.google.gwt.xml.client.Document, and I can achieve this by
serializing to and from a String of XML, but is there a better way?
Something more performant that uses some built-in DOM serialization
capabilities?

Regards,

Richard.

-- 
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: align the widgets in DocLayoutPanel

2010-07-05 Thread Merih
Hello Roliveria,

Thanks, you right, p.addEast(sampleWidget,20);  adds a new East edge
every time.
Is it a good way to add panel in East edge and than to add every new
widget in the panel. so I add just one East edge using that way.

Thanks

On Jul 2, 4:51 pm, roliveira mail.rolive...@gmail.com wrote:
 Hi nasionalem,

 I haven't tried your code but it seems your problem is:

 p.addEast(sampleWidget,20);

 With this instruction, you are not adding a widget to the East, but
 adding a new East

 One way to do it is to add the East just after you have sampleWidget
 ready.

 This is possible because you can add more than one East do the
 DockLayoutPanel widget.

 Hope this helps.

 On 2 Jul, 09:28, nasionalem sakarya.me...@gmail.com wrote:



  Hello,

  I'm new in GWT development and need some help.
  I use GWT 2.0 and in my project I have a  DockLayoutPanel which
  inculudes north, south, east and west. I have added a widget in East
  edge. But Its on right side of the East edge. How can I align the
  widget to the right side in East edge?

  // Sample Code

  DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
  p.addNorth(new HTML(north), 5);
  p.addSouth(new HTML(south), 2);
  p.addEast(new HTML(east), 20);
  p.addWest(new HTML(west), 2);

  p.addEast(sampleWidget,20);

  //I have tried this
  //
  mainPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
  //But it just align the things (texts, buttons...) to right side in
  the widget.
  // The widget still right side

  Thanks- Hide quoted text -

 - Show quoted text -

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

2010-07-05 Thread Kevin
Hi there,

thanks for your reply. But I am sure I am in quirks mode as well.
which version of GWT SDK are you using?

Regards,
Kevin

On Jul 2, 7:39 pm, Flemming Boller flemming.bol...@gmail.com wrote:
 i use it on ie6. it works both in development and deploy mode.

 remember that in IE you must use quirks mode. in strict mode nothing works
 :-(

 /Flemmng

 On Fri, Jul 2, 2010 at 1:22 PM, Kevin kevin...@confettistudio.com wrote:
  Hi all,

  I thought GWTCanvas supports IE6, I am sure it did, but haven't tried
  it on IE6 for a few months and all of a sudden it's not working on IE6
  anymore.

  Anyone who can make it work on IE6?

  Thanks.

  Kevin

  --
  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: Best practice to serialize a org.w3c.dom.Document over RPC?

2010-07-05 Thread Thomas Broyer


On 5 juil, 09:02, Richard Kennard rich...@kennardconsulting.com
wrote:
 Hi guys,

 A (hopefully easy) question: what is the GWT 'best practice' to take a
 server-side DOM built with org.w3c.dom.Document and pass it over RPC?

 Clearly once on the client-side it needs to become a
 com.google.gwt.xml.client.Document, and I can achieve this by
 serializing to and from a String of XML, but is there a better way?
 Something more performant that uses some built-in DOM serialization
 capabilities?

I doubt there would be anything more performant than XML
serialization. Particularly on the client-side, as this is done by the
browser, and not by some JavaScript code.

-- 
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: GWTCanvas not working on IE6?

2010-07-05 Thread Kevin
Also, if you go to this demo link on IE6:

http://google-web-toolkit-incubator.googlecode.com/svn/trunk/demo/GWTCanvasDemo/GWTCanvasDemo.html

nothing works, even in quirks mode?

On Jul 3, 10:07 am, Qian Qiao qian.q...@gmail.com wrote:
 On Sat, Jul 3, 2010 at 16:56, Muhammad Saifullah

 msaif.muham...@gmail.com wrote:
  in IE how can i use quirks mode? can you give me some syntax of quirks mode
  where i can write

 To trigger a browser's quirks mode, just don't put any DOCTYPE tags at
 the beginning of the page, if a browser can't find a proper DTD, it
 renders the page in quirks mode.

 Google is your friend...

 -- Joe

 --
 Proper software development is like female orgasm. Some claim it's a
 myth, others try very hard to make it happen but don't know how, and
 most magazines, books and videos showing it are showing faked ones.

-- 
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: Best practice to serialize a org.w3c.dom.Document over RPC?

2010-07-05 Thread Harald Pehl
I agree with Thomas. XMLParser.parse(xmlString) uses the browsers xml
parser which should be reasonable fast.

If you want to further process the XML document (e.g. map it to POJOs)
feel free to take a look at Piriti: http://code.google.com/p/piriti/.
It's a little lib I wrote to map XML / JSON to POJOs using annotations
and deferred binding.

- Harald

On 5 Jul., 10:30, Thomas Broyer t.bro...@gmail.com wrote:
 On 5 juil, 09:02, Richard Kennard rich...@kennardconsulting.com
 wrote:

  Hi guys,

  A (hopefully easy) question: what is the GWT 'best practice' to take a
  server-side DOM built with org.w3c.dom.Document and pass it over RPC?

  Clearly once on the client-side it needs to become a
  com.google.gwt.xml.client.Document, and I can achieve this by
  serializing to and from a String of XML, but is there a better way?
  Something more performant that uses some built-in DOM serialization
  capabilities?

 I doubt there would be anything more performant than XML
 serialization. Particularly on the client-side, as this is done by the
 browser, and not by some JavaScript code.

-- 
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: GWTCanvas not working on IE6?

2010-07-05 Thread Muhammad Saifullah
the following url works in IE6,
i tested in IETester software.
pls check yourself.

On Mon, Jul 5, 2010 at 6:07 PM, Kevin kevin...@confettistudio.com wrote:

 Also, if you go to this demo link on IE6:


 http://google-web-toolkit-incubator.googlecode.com/svn/trunk/demo/GWTCanvasDemo/GWTCanvasDemo.html

 nothing works, even in quirks mode?

 On Jul 3, 10:07 am, Qian Qiao qian.q...@gmail.com wrote:
  On Sat, Jul 3, 2010 at 16:56, Muhammad Saifullah
 
  msaif.muham...@gmail.com wrote:
   in IE how can i use quirks mode? can you give me some syntax of quirks
 mode
   where i can write
 
  To trigger a browser's quirks mode, just don't put any DOCTYPE tags at
  the beginning of the page, if a browser can't find a proper DTD, it
  renders the page in quirks mode.
 
  Google is your friend...
 
  -- Joe
 
  --
  Proper software development is like female orgasm. Some claim it's a
  myth, others try very hard to make it happen but don't know how, and
  most magazines, books and videos showing it are showing faked ones.

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



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.



JSON Problem

2010-07-05 Thread Ahmed Shoeib
Dear Friends ,

i face a problem when trying to send and receive json object between
client and server in GWT application

so i want a simple example that show me how to do this

Thanks,
ahmed shoeib

-- 
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 put a CellTable into a fixed relative sized div?

2010-07-05 Thread jantekb
Hi!

I'd like to put a CellTable into a fixed size div element, but my
problem is that when the table's setData method is invoked, the table
changes the size of the wrapper div element somehow, but only in the
case when width and height is specified in percent. If I specify sizes
in px, the result is satisfactory, however I'd like to work with
relative sizes. Here is my code:

g:HTMLPanel
  div style=border: 1px solid red; width: 600px; height: 600px;
overflow: scroll;
c:CellTable ui:field='table' /
  /div
/g:HTMLPanel

do you have any ideas or suggestions?

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

2010-07-05 Thread Merih
Hello all,

I've created  a new Vertical Panel and I've added it in East Edge.
Than I put the FlexTable in the Vertical Panel. But I still didnt
align it on right side. I still cant change the position.. :(

private DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
private VerticalPanel vPanel = new VerticalPanel();
private FlexTable testFlexTable = new FlexTable();

p.addNorth(new HTML(north), 5);
p.addSouth(new HTML(south), 2);
p.addEast(vPanel,40);
p.addWest(new HTML(west));
p.add(new HTML(center));

testFlexTable.setText(0, 0, Symbol);
testFlexTable.setText(0, 1, Price);
testFlexTable.setText(0, 2, Change);
testFlexTable.setText(0, 3, Remove);

// I have tried to set the position of the widget which is in Vertical
Panel. But It didnt worked.
vPanel.add(testFlexTable);
vPanel.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT);
vPanel.setCellHorizontalAlignment(testFlexTable,
HasAlignment.ALIGN_RIGHT);



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.



need help on JSON request and response on UI only

2010-07-05 Thread sathya
I have a server model where, if we send JSON request, server replays
back with JSON response. Now I need to develop UI part for this
project using GWT (no need to develop server side as it has been
already developed).Can you please suggest me how I send and receive
JSON data from GWT front end.
To brief, server receives JSON request and replays back with JSON
response. Now I need t create UI where I send JSON request and receive
JSON response.
I believe Making Cross-Site Requests is one option. Not sure are there
any other ways to do this.(I just need   to send JSON request and
receive response from server without worrying about server code)

-- 
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 GWT-RPC handles polymorphic serialization?

2010-07-05 Thread André Moraes
The GWT has the standard GWT-RPC to make easier to create RPC calls
and fetch data from the server, but this tool only works if we have
Java on the server side.

In my current project, the server side will be .NET based.

So I wrote a JSON-RPC library which implements the JSON-RPC standard
to provide RPC facilities.

The library is OK but I don't have the serialization facilities and I
need to manually populate a JavaScriptObject with the information that
i want transfered.

I started now to write a automated serialization for the objects based
on Annotations and Generatos, but i don't know how to discover the
type of my object at runtime.

I have a lot of polymorphic associations and will be nice to have some
of those  in my DTO's.

So is there a way that I can get the type of a Object in GWT at
runtime or I need to provide some Interface that my DTO's will need to
implement that will have a method which returns some value that
identify the type?

If I need to use the Interface approach, is there a way that using
generators I change the code of the class and then implement in a
automated way? (Whithout defining the generator for each class in the
module.gwt.xml)

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.



Can I deploy GWT application on server which doesn ’t have servelet container

2010-07-05 Thread sathya
Can I deploy GWT application on web server which doesn’t have servelet
container? I have developed my GWT application which doesn’t have any
server component. So can I compile and deploy on server which doesn’t
support servelet container like apache.

-- 
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: JSON Problem

2010-07-05 Thread André Moraes
re = rb.sendRequest(jsonrpc-call= + 
JsonHelper.jsoToString(call),
new RequestCallback() {

@Override
public void onResponseReceived(Request request, 
Response response)
{
if (response.getStatusCode() == 200 || 
response.getStatusCode()
== 304)
{
JavaScriptObject responseData =
JsonHelper.stringToJso(response.getText()).cast());
// use the response
}
else
{
// invalid response
}
}

@Override
public void onError(Request request, Throwable 
exception) {
// error on the resquest
}
});


public class JsonHelper {

public static String jsoToString(JavaScriptObject jso) {
if (isJsonLibraryDefined()) {
return _jsoToString(jso);
} else {
return new JSONObject(jso).toString();
}
}

public static JavaScriptObject stringToJso(String value) {
if (isJsonLibraryDefined()) {
return _stringToJso(value);
} else {
return _stringToJsoEval(value);
}
}

public static native String _jsoToString(JavaScriptObject jso) /*-{
return JSON.stringify(jso);
}-*/;

public static native JavaScriptObject _stringToJso(String string) /*-
{
return JSON.parse(string);
}-*/;

public static native JavaScriptObject _stringToJsoEval(String
string) /*-{
return eval(( + string + ));
}-*/;

public static native boolean isJsonLibraryDefined() /*-{
return typeof(JSON) != 'undefined'
 typeof(JSON.parse) != 'undefined'
 typeof(JSON.stringify) != 'undefined';
}-*/;
}


The JsonHelper class handle the conversion to and from JSON.

If possible use the json.org javascript library that implements the
functions JSON.parse / JSON.stringify

I am currently writing a project that encapsulates that library and
make it more easier to use than this JsonHelper class.

When i release it in google-code I let you know.

Hope it helps.

On 5 jul, 09:01, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:
 Dear Friends ,

 i face a problem when trying to send and receive json object between
 client and server in GWT application

 so i want a simple example that show me how to do this

 Thanks,
 ahmed shoeib

-- 
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: JSON Problem

2010-07-05 Thread Ahmed Shoeib
i want a simple example to describe it
cause i need it as soon as possible



On Jul 5, 6:18 pm, André Moraes andr...@gmail.com wrote:
                         re = rb.sendRequest(jsonrpc-call= + 
 JsonHelper.jsoToString(call),
 new RequestCallback() {

                                 @Override
                                 public void onResponseReceived(Request 
 request, Response response)
 {
                                         if (response.getStatusCode() == 200 
 || response.getStatusCode()
 == 304)
                                         {
                                                 JavaScriptObject responseData 
 =
 JsonHelper.stringToJso(response.getText()).cast());
             // use the response
                                         }
                                         else
                                         {
             // invalid response
                                         }
                                 }

                                 @Override
                                 public void onError(Request request, 
 Throwable exception) {
                                         // error on the resquest
                                 }
                         });

 public class JsonHelper {

         public static String jsoToString(JavaScriptObject jso) {
                 if (isJsonLibraryDefined()) {
                         return _jsoToString(jso);
                 } else {
                         return new JSONObject(jso).toString();
                 }
         }

         public static JavaScriptObject stringToJso(String value) {
                 if (isJsonLibraryDefined()) {
                         return _stringToJso(value);
                 } else {
                         return _stringToJsoEval(value);
                 }
         }

         public static native String _jsoToString(JavaScriptObject jso) /*-{
                 return JSON.stringify(jso);
         }-*/;

         public static native JavaScriptObject _stringToJso(String string) /*-
 {
                 return JSON.parse(string);
         }-*/;

         public static native JavaScriptObject _stringToJsoEval(String
 string) /*-{
                 return eval(( + string + ));
         }-*/;

         public static native boolean isJsonLibraryDefined() /*-{
                 return typeof(JSON) != 'undefined'
                          typeof(JSON.parse) != 'undefined'
                          typeof(JSON.stringify) != 'undefined';
         }-*/;

 }

 The JsonHelper class handle the conversion to and from JSON.

 If possible use the json.org javascript library that implements the
 functions JSON.parse / JSON.stringify

 I am currently writing a project that encapsulates that library and
 make it more easier to use than this JsonHelper class.

 When i release it in google-code I let you know.

 Hope it helps.

 On 5 jul, 09:01, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:

  Dear Friends ,

  i face a problem when trying to send and receive json object between
  client and server in GWT application

  so i want a simple example that show me how to do this

  Thanks,
  ahmed shoeib

-- 
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: PushButton hover not always removed on mouse out

2010-07-05 Thread ben fenster
can you please post your fix?

On 28 יוני, 09:49, ChrisK cknow...@gmail.com wrote:
 I've had to make my own image button and replace all instances 
 ofPushButtonwith it. It mimics thePushButtonbehaviour but doesn't
 have this issue on the exact same page so I'm pretty sure this is an
 issue withPushButton.

 On May 17, 9:28 pm, ChrisK cknow...@gmail.com wrote:

  I'm using GWT 2.0.3 and using UiBinder am adding a composite to the
  RootPanel. The composite contains some PushButtons which I am defining
  fully using UiBinder with g:upFace, g:upHoveringFace and g:downFace.

  The issue is that it's very easy to fool all of these buttons just
  by moving themousequickly across them - they stay in the hover state
  and even have the gwt-PushButton-up-hovering CSS class attached.

  If I replace a button with an Image and add my own code formouse
  over,mouseout andmouseup it works absolutely fine and I'm not able
  to fool the fake button. Obviously though I'd like to use the built
  in widgets as they provide at lot of added extras such as
  accessibility (amongst other things).

  Looking at the source code for CustomButton whichPushButtonextends,
  I can't understand line 623-631 (in current trunk but has been there
  for a while). I think there are more situations where setHovering
  should be set to false but I may be misunderstanding the isOrHasChild/
  eventGetTarget methods.

  case Event.ONMOUSEOUT:
          Element to = DOM.eventGetToElement(event);
          if (DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))
               (to == null || !DOM.isOrHasChild(getElement(), to))) {
            if (isCapturing) {
              onClickCancel();
            }
            setHovering(false);
          }
          break;

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



iOS (iPhone/iPad) breaks the GWT spinner

2010-07-05 Thread Jim Douglas
This isn't strictly a GWT question; it affects any JavaScript
application deployed to iOS.  Any time the user touches an image for a
second or so, a popup menu appears with the options Save Image and
Copy.  This is just a nuisance with simple button images, but it
completely breaks the GWT spinner.  You can see the problem if you
navigate here in an iPhone or iPad:

http://collectionofdemos.appspot.com/demo/com.google.gwt.demos.spinner.SpinnerDemo/SpinnerDemo.html

You can tap an arrow to move a spinner a single 'tick'.  But if you
press-and-hold the arrows (the core functionality of the spinner),
that iOS popup image menu interrupts the operation.

Has anyone else struggled with this and found a way to suppress that
behaviour?

Jim.

-- 
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: Can I deploy GWT application on server which doe sn’t have servelet container

2010-07-05 Thread Jaroslav Záruba
Yes, you can. You only have to insert the script/ element with compiled
module into your page.

On Mon, Jul 5, 2010 at 5:12 PM, sathya sathyavik...@gmail.com wrote:

 Can I deploy GWT application on web server which doesn’t have servelet
 container? I have developed my GWT application which doesn’t have any
 server component. So can I compile and deploy on server which doesn’t
 support servelet container like apache.

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



RPC - which exception types may be used???

2010-07-05 Thread Magnus
Hi,

I am trying to implement an RPC call that loads a record from a
database:

 User loadUser (String nickname) throws Exception;

I tried different Exception types:

SQLException: results in mystic errors (not serializable)
Exception: results in error uncaught exception at the service call
IllegalArgumentException: works, but is not that what I want

Question 1:
What Exception types may be used for RPC?

Question 2:
Where (which source files) do I have to declare the exception?
Service
ServiceAsync
ServiceImpl

Thanks
Magnus

-- 
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: PushButton hover not always removed on mouse out

2010-07-05 Thread ChrisK
Yep, here you go. Not sure how this will come out in google groups.
The below doesn't support everything PushButton supports but it was
never suppose to. It was only supposed to fix the show stopper bug in
our application which seems to be caused by GWT PushButtons using
images to miss mouse out events. I'm sure you can expand it to your
needs.



/**
 * This is a replacement for the GWT PushButton which as of 2.0.3
seems to
 * miss a mouse out event sometimes meaning buttons stay highlighted
 *
 * @author chrisk
 */
public class ImageButton extends Composite implements
HasClickHandlers, HasAllMouseHandlers {

private Image image;
private ImageResource currentResource;

private ImageResource normalImage;
private ImageResource mouseOverImage;
private ImageResource mouseDownImage;

@UiConstructor
public ImageButton(final ImageResource normalImage,
final ImageResource mouseOverImage,
final ImageResource mouseDownImage) {
this.normalImage = normalImage;
this.mouseOverImage = mouseOverImage;
this.mouseDownImage = mouseDownImage;
this.currentResource = normalImage;

image = new Image(normalImage);
image.addStyleName(UiResources.INSTANCE.css().hasLink());
initWidget(image);

image.addMouseOverHandler(new MouseOverHandler() {
public void onMouseOver(MouseOverEvent event) {
setCurrentImage(ImageButton.this.mouseOverImage);
}
});
image.addMouseOutHandler(new MouseOutHandler() {
public void onMouseOut(MouseOutEvent event) {
setCurrentImage(ImageButton.this.normalImage);
}
});
image.addMouseDownHandler(new MouseDownHandler() {
public void onMouseDown(MouseDownEvent event) {
setCurrentImage(ImageButton.this.mouseDownImage);
}
});
image.addMouseUpHandler(new MouseUpHandler() {
public void onMouseUp(MouseUpEvent event) {
setCurrentImage(ImageButton.this.mouseOverImage);
}
});
}

public HandlerRegistration addClickHandler(ClickHandler handler) {
return image.addClickHandler(handler);
}

private void setCurrentImage(ImageResource resource) {
image.setResource(resource);
currentResource = resource;
}

public void setNormalImage(final ImageResource normalImage) {
if (currentResource == this.normalImage) {
setCurrentImage(normalImage);
}
this.normalImage = normalImage;
}

public void setMouseOverImage(final ImageResource mouseOverImage)
{
if (currentResource == this.mouseOverImage) {
setCurrentImage(mouseOverImage);
}
this.mouseOverImage = mouseOverImage;
}

public void setMouseDownImage(final ImageResource mouseDownImage)
{
if (currentResource == this.mouseDownImage) {
setCurrentImage(mouseDownImage);
}
this.mouseDownImage = mouseDownImage;
}

public HandlerRegistration addMouseDownHandler(MouseDownHandler
handler) {
return image.addMouseDownHandler(handler);
}

public HandlerRegistration addMouseUpHandler(MouseUpHandler
handler) {
return image.addMouseUpHandler(handler);
}

public HandlerRegistration addMouseOutHandler(MouseOutHandler
handler) {
return image.addMouseOutHandler(handler);
}

public HandlerRegistration addMouseOverHandler(MouseOverHandler
handler) {
return image.addMouseOverHandler(handler);
}

public HandlerRegistration addMouseMoveHandler(MouseMoveHandler
handler) {
return image.addMouseMoveHandler(handler);
}

public HandlerRegistration addMouseWheelHandler(MouseWheelHandler
handler) {
return image.addMouseWheelHandler(handler);
}

}


On Jul 5, 4:53 pm, ben fenster fenster@gmail.com wrote:
 can you please post your fix?

 On 28 יוני, 09:49, ChrisK cknow...@gmail.com wrote:

  I've had to make my own image button and replace all instances 
  ofPushButtonwith it. It mimics thePushButtonbehaviour but doesn't
  have this issue on the exact same page so I'm pretty sure this is an
  issue withPushButton.

  On May 17, 9:28 pm, ChrisK cknow...@gmail.com wrote:

   I'm using GWT 2.0.3 and using UiBinder am adding a composite to the
   RootPanel. The composite contains some PushButtons which I am defining
   fully using UiBinder with g:upFace, g:upHoveringFace and g:downFace.

   The issue is that it's very easy to fool all of these buttons just
   by moving themousequickly across them - they stay in the hover state
   and even have the gwt-PushButton-up-hovering CSS class attached.

   If I replace a button with an Image and add my own code formouse
   over,mouseout andmouseup it works absolutely fine and I'm not able
   to fool the fake button. Obviously though I'd like to use the built
   in widgets as they 

Re: JSON Problem

2010-07-05 Thread André Moraes
This code is quite simple

The line:

 re = rb.sendRequest(jsonrpc-call= + JsonHelper.jsoToString(call),
new RequestCallback()

prepare a AJAX call to the server and make your javascript object to a
string using JsonHelper.jsoToString.
In ther server the json-string will be accessible by the parameter
jsonrpc-call.


The line:

if (response.getStatusCode()
== 200 || response.getStatusCode()
== 304)
{
JavaScriptObject
responseData =
JsonHelper.stringToJso(response.getText()).cast());
// use the response
}

get the response wrote by the server and make i availabe as a
JavaScriptObject.

You can use the JSONObject class to populate and read a
JavaScriptObject.

You can read more about JSON + GWT at:

http://code.google.com/intl/webtoolkit/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideHttpRequests
and
http://code.google.com/intl/webtoolkit/webtoolkit/articles/using_gwt_for_json_mashups.html
On 5 jul, 12:50, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:
 i want a simple example to describe it
 cause i need it as soon as possible

 On Jul 5, 6:18 pm, André Moraes andr...@gmail.com wrote:



                          re = rb.sendRequest(jsonrpc-call= + 
  JsonHelper.jsoToString(call),
  new RequestCallback() {

                                  @Override
                                  public void onResponseReceived(Request 
  request, Response response)
  {
                                          if (response.getStatusCode() == 200 
  || response.getStatusCode()
  == 304)
                                          {
                                                  JavaScriptObject 
  responseData =
  JsonHelper.stringToJso(response.getText()).cast());
              // use the response
                                          }
                                          else
                                          {
              // invalid response
                                          }
                                  }

                                  @Override
                                  public void onError(Request request, 
  Throwable exception) {
                                          // error on the resquest
                                  }
                          });

  public class JsonHelper {

          public static String jsoToString(JavaScriptObject jso) {
                  if (isJsonLibraryDefined()) {
                          return _jsoToString(jso);
                  } else {
                          return new JSONObject(jso).toString();
                  }
          }

          public static JavaScriptObject stringToJso(String value) {
                  if (isJsonLibraryDefined()) {
                          return _stringToJso(value);
                  } else {
                          return _stringToJsoEval(value);
                  }
          }

          public static native String _jsoToString(JavaScriptObject jso) /*-{
                  return JSON.stringify(jso);
          }-*/;

          public static native JavaScriptObject _stringToJso(String string) 
  /*-
  {
                  return JSON.parse(string);
          }-*/;

          public static native JavaScriptObject _stringToJsoEval(String
  string) /*-{
                  return eval(( + string + ));
          }-*/;

          public static native boolean isJsonLibraryDefined() /*-{
                  return typeof(JSON) != 'undefined'
                           typeof(JSON.parse) != 'undefined'
                           typeof(JSON.stringify) != 'undefined';
          }-*/;

  }

  The JsonHelper class handle the conversion to and from JSON.

  If possible use the json.org javascript library that implements the
  functions JSON.parse / JSON.stringify

  I am currently writing a project that encapsulates that library and
  make it more easier to use than this JsonHelper class.

  When i release it in google-code I let you know.

  Hope it helps.

  On 5 jul, 09:01, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:

   Dear Friends ,

   i face a problem when trying to send and receive json object between
   client and server in GWT application

   so i want a simple example that show me how to do this

   Thanks,
   ahmed shoeib

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



XMLParser Question

2010-07-05 Thread fonghuangyee
StringBuffer xmlBfr = new StringBuffer();
xmlBfr.append(Layout);
xmlBfr.append(Column type=\Middle\/Column);
xmlBfr.append(Column type=\Middle\/Column);
xmlBfr.append(/Layout);
String xml = xmlBfr.toString();
Document document = XMLParser.parse(xml);
Element element = document.getDocumentElement();
NodeList layouts = element.getElementsByTagName(Layout);
for (int k = 0; k  layouts.getLength(); ++k) {
Element layoutElement = (Element) layouts.item(k);
NodeList columns = layoutElement.getElementsByTagName(Column);
for (int i = 0; i  columns.getLength(); ++i) {
Element columnElement = (Element) columns.item(i);
String type = columnElement.getAttribute(type);
Window.alert(type);
}
}

I try run the code above, i found that the XMLParser is not working
well.
NodeList layouts = element.getElementsByTagName(Layout);
layouts.getLength() should return 1, but it is return 0!
XMLParser just cant parse the xml string.

May i know, am i doing any mistake when using XMLParser as above?

-- 
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: JSON Problem

2010-07-05 Thread Ahmed Shoeib
you told me how to send request from client to server

now i want how yo get data from server to use it in client

and the data in json


On Jul 5, 8:12 pm, André Moraes andr...@gmail.com wrote:
 This code is quite simple

 The line:

  re = rb.sendRequest(jsonrpc-call= + JsonHelper.jsoToString(call),
 new RequestCallback()

 prepare a AJAX call to the server and make your javascript object to a
 string using JsonHelper.jsoToString.
 In ther server the json-string will be accessible by the parameter
 jsonrpc-call.

 The line:

                                         if (response.getStatusCode()
 == 200 || response.getStatusCode()
 == 304)
                                         {
                                                 JavaScriptObject
 responseData =
 JsonHelper.stringToJso(response.getText()).cast());
             // use the response
                                         }

 get the response wrote by the server and make i availabe as a
 JavaScriptObject.

 You can use the JSONObject class to populate and read a
 JavaScriptObject.

 You can read more about JSON + GWT at:

 http://code.google.com/intl/webtoolkit/webtoolkit/doc/latest/DevGuide...
 andhttp://code.google.com/intl/webtoolkit/webtoolkit/articles/using_gwt_...
 On 5 jul, 12:50, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:

  i want a simple example to describe it
  cause i need it as soon as possible

  On Jul 5, 6:18 pm, André Moraes andr...@gmail.com wrote:

                           re = rb.sendRequest(jsonrpc-call= + 
   JsonHelper.jsoToString(call),
   new RequestCallback() {

                                   @Override
                                   public void onResponseReceived(Request 
   request, Response response)
   {
                                           if (response.getStatusCode() == 
   200 || response.getStatusCode()
   == 304)
                                           {
                                                   JavaScriptObject 
   responseData =
   JsonHelper.stringToJso(response.getText()).cast());
               // use the response
                                           }
                                           else
                                           {
               // invalid response
                                           }
                                   }

                                   @Override
                                   public void onError(Request request, 
   Throwable exception) {
                                           // error on the resquest
                                   }
                           });

   public class JsonHelper {

           public static String jsoToString(JavaScriptObject jso) {
                   if (isJsonLibraryDefined()) {
                           return _jsoToString(jso);
                   } else {
                           return new JSONObject(jso).toString();
                   }
           }

           public static JavaScriptObject stringToJso(String value) {
                   if (isJsonLibraryDefined()) {
                           return _stringToJso(value);
                   } else {
                           return _stringToJsoEval(value);
                   }
           }

           public static native String _jsoToString(JavaScriptObject jso) 
   /*-{
                   return JSON.stringify(jso);
           }-*/;

           public static native JavaScriptObject _stringToJso(String string) 
   /*-
   {
                   return JSON.parse(string);
           }-*/;

           public static native JavaScriptObject _stringToJsoEval(String
   string) /*-{
                   return eval(( + string + ));
           }-*/;

           public static native boolean isJsonLibraryDefined() /*-{
                   return typeof(JSON) != 'undefined'
                            typeof(JSON.parse) != 'undefined'
                            typeof(JSON.stringify) != 'undefined';
           }-*/;

   }

   The JsonHelper class handle the conversion to and from JSON.

   If possible use the json.org javascript library that implements the
   functions JSON.parse / JSON.stringify

   I am currently writing a project that encapsulates that library and
   make it more easier to use than this JsonHelper class.

   When i release it in google-code I let you know.

   Hope it helps.

   On 5 jul, 09:01, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:

Dear Friends ,

i face a problem when trying to send and receive json object between
client and server in GWT application

so i want a simple example that show me how to do this

Thanks,
ahmed shoeib

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

Re: Eclipse plugin suggestion

2010-07-05 Thread Robert Hanson
 This is right, what we really need is Google to open source the plugin,
but they don't want to

I wouldn't confuse don't want to with not quite yet.

From the FAQ:

http://code.google.com/eclipse/docs/faq.html
Q:Is the Google Plugin for Eclipse open-source?
A: Not yet. For the initial release, we wanted to get you the plugin as fast
as possible. However, we expect to make the source public in the near
future.

This is no different than GWT itself.  The stated intention since GWT was
released was to make it open-source, but it took almost six months I think
before they were able to do so.  It will get there.

Rob


On Sun, Jul 4, 2010 at 3:49 PM, Gal Dolber gal.dol...@gmail.com wrote:

 This is right, what we really need is Google to open source the plugin, but
 they don't want to

 2010/7/4 Robert Hanson iamroberthan...@gmail.com

 The plugin is great, but every time I create a new application I need to
 go through the project and delete all of the example code.  Perhaps there
 can be an option on the new project dialog that lets you turn off the sample
 code, and only created the entry point, module config, and a deployment
 descriptor with only the default page name?  This seems to be fairly
 standard in project creation wizards.

 I couldn't find a thread or issue on this, but it seems like their should
 be one.

 Anyone disagree with this?  Or maybe this has been discussed already?
 Comments and links to prior discussions welcomed.

 Thanks

 Rob


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



how to make this mouse over effect?

2010-07-05 Thread cy dev
i have a flextable where there an anchor link in cell(0,0), and there
is a button in cell(0,1) which is invisible by default.  how to make
it such that, when mouse over the flextable, the button in cell(0,1)
becomes visible; when mouse out the flextable, the button becomes
invisible again?

the difficulty is, flextable does not have mouseover and mouseout
handler.  but if i add the flextable to a focuspanel, the anchor and
the button would then be 'masked' by the focuspanel then cannot be
clicked.

-- 
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: JSON Problem

2010-07-05 Thread André Moraes
The response comes async.

When the response from the server arrives at the client the method
onResponseReceived in the RequestCallback object is called, if an
error hapens the the onErrormethod is called.

The RequestCallback object is the second parameter in the sendRequest
function call.


public void onResponseReceived(Request
request, Response response)
{
if (response.getStatusCode()
== 200 || response.getStatusCode()
== 304)
{
JavaScriptObject
responseData =
JsonHelper.stringToJso(response.getText()).cast());
// use the response
}
else
{
// invalid response
}
}
@Override
public void onError(Request request,
Throwable exception) {
// error on the resquest
}
});


On 5 jul, 15:01, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:
 you told me how to send request from client to server

 now i want how yo get data from server to use it in client

 and the data in json

 On Jul 5, 8:12 pm, André Moraes andr...@gmail.com wrote:



  This code is quite simple

  The line:

   re = rb.sendRequest(jsonrpc-call= + JsonHelper.jsoToString(call),
  new RequestCallback()

  prepare a AJAX call to the server and make your javascript object to a
  string using JsonHelper.jsoToString.
  In ther server the json-string will be accessible by the parameter
  jsonrpc-call.

  The line:

                                          if (response.getStatusCode()
  == 200 || response.getStatusCode()
  == 304)
                                          {
                                                  JavaScriptObject
  responseData =
  JsonHelper.stringToJso(response.getText()).cast());
              // use the response
                                          }

  get the response wrote by the server and make i availabe as a
  JavaScriptObject.

  You can use the JSONObject class to populate and read a
  JavaScriptObject.

  You can read more about JSON + GWT at:

 http://code.google.com/intl/webtoolkit/webtoolkit/doc/latest/DevGuide...
  andhttp://code.google.com/intl/webtoolkit/webtoolkit/articles/using_gwt_...
  On 5 jul, 12:50, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:

   i want a simple example to describe it
   cause i need it as soon as possible

   On Jul 5, 6:18 pm, André Moraes andr...@gmail.com wrote:

                        re = rb.sendRequest(jsonrpc-call= + 
JsonHelper.jsoToString(call),
new RequestCallback() {

                                @Override
                                public void onResponseReceived(Request 
request, Response response)
{
                                        if (response.getStatusCode() == 
200 || response.getStatusCode()
== 304)
                                        {
                                                JavaScriptObject 
responseData =
JsonHelper.stringToJso(response.getText()).cast());
            // use the response
                                        }
                                        else
                                        {
            // invalid response
                                        }
                                }

                                @Override
                                public void onError(Request request, 
Throwable exception) {
                                        // error on the resquest
                                }
                        });

public class JsonHelper {

        public static String jsoToString(JavaScriptObject jso) {
                if (isJsonLibraryDefined()) {
                        return _jsoToString(jso);
                } else {
                        return new JSONObject(jso).toString();
                }
        }

        public static JavaScriptObject stringToJso(String value) {
                if (isJsonLibraryDefined()) {
                        return _stringToJso(value);
                } else {
                        return _stringToJsoEval(value);
                }
        }

        public static native String _jsoToString(JavaScriptObject jso) 
/*-{
                return JSON.stringify(jso);
        }-*/;

        public static native JavaScriptObject _stringToJso(String 
string) /*-
{
                return JSON.parse(string);
        }-*/;

        public static native JavaScriptObject _stringToJsoEval(String

Execute commands between RPC requests

2010-07-05 Thread Bruno Santos
Is there any way to run a given command at the beginning and end of
any RPC request?

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



JSONP + parameter signature

2010-07-05 Thread Ghusse
Hi,

As many other frameworks, on each JSONP request, GWT creates a new
randomly named callback function.

That's great, except when the web service (as Flickr) that you are
requesting requires the sent parameters to be signed. As the callback
function is passed as a parameter in the URL, the web service requires
it to be in the parameter list that will be signed. As the random name
is generated just before sending the request, I just cannot sign the
parameter list.

I found no direct way (except re-implementing the internal GWT
classes) of knowing the callback's name before making the call, and
then signing the parameters.

Any idea of how I can do that ?

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.



Url to my data for HTTP GET request?

2010-07-05 Thread Nik
Hi,
I'm new with GWT nad trying to write a simple XML-parser in Eclipse
and really don't understand what url i have to use in my HTTP GET
request.

private void refreshtable() {
//  String url = http://127.0.0.1:9997/rate.xml;;
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
rate.xml);

try {
  Request request = builder.sendRequest(null, new RequestCallback()
{ ..

now i have copied  the file rate.xml to all of the folders, but the
HTTP GET doen't see the file. I have also tried to put 
http://127.0.0.1:9997/rate.xml
as url, where i can access it with my browser.

Maybe someone has an advise?

-- 
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-2.1 java.util.logging

2010-07-05 Thread james
Last week I was trying to find a similar example and couldn't. So I
took a little time an wrote a quick blog post with a small example app
that should help you get started with logging.

http://treasonx.blogspot.com/2010/07/gwt-21-logging.html

On Jun 21, 3:21 pm, jie...@gmail.com jie...@gmail.com wrote:
 Does anyone have an example of how to get java.util.logging.Logger
 messages to the console when running in development mode? I was
 excited about removing an external dependency of gwt-log, but can not
 seem to get any dev-mode CLIENT log messages to appear to the
 console..

 Complicating matters is that Jetty uses slf4j, which I am fairly
 unfamiliar with for setting up properly with respect to the
 appropriate libraries being available. I really just want log messages
 to go to the console... any information leading to this situation will
 be rewarded with beer. :-)

 -Jesse

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



Problem withdrag resize

2010-07-05 Thread leeboy
Hello!,

In my job I have to modify an application based on gwt 1.7.1, but I
have a stupid (I think it´s really stupid thing) problem, but I don´t
know how to solve it. My problem is the next: I have a vertical bar
that resize two vertical layouts(with two horizontal layouts inside
each one) in my site, well, the thing is, if my first move is to the
left, only resize the left-bottom layout, but if I move to the right
before and then to the left, then it works. Any suggestion??

Thanks!

ps: If you want I can paste my code, thanks again

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



Easily fixable: Issue 2892 Option Element warnings

2010-07-05 Thread Jurriaan Mous
I would like to bring an old Issue 2892 to your attention. Some option
fields used as date selectors in our application keep outputting many
annoying warnings. Causing a 15 to 20 second wait before we could
continue on some views. Particularly year selection has a lot of years
because they are for selecting birth days of older people. We could
set the logging level higher but then we don't see the normal logs we
included in testing.

The fix is very simple. Somebody could remove the returns from the
methods that should return a void to remove the warning. This is a
very small task but not yet done in the years in the existence of the
issue report. It would make us very happy to properly test those views
with option elements in our app. :)

The issue with a proposed fix: 
http://code.google.com/p/google-web-toolkit/issues/detail?id=2892
(I am arquelis in the issue and posted a possible fix months ago)

Could somebody in the list find a way to have this issue fixed? You
will be in our eternal gratitude! :)

Thanks for all the great work on GWT!

Best regards,
Jurriaan Mous
Lable.org

Our GWT product for those interested: http://ezlp.nl/home_en (For
Dutch healthcare sector)

-- 
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: Installed Google plugin in Helios, but no sign of it

2010-07-05 Thread Kurt Mueller
I was in a tizzy for a bit when I had that same problem.

Kurt

Sent from my Droid Incredible.

On Jul 4, 2010 4:08 PM, Arve Knudsen arve.knud...@gmail.com wrote:

Thanks for the tip. The problem was of course that I didn't have permission
to write to Eclipse's installation directory. Pretty silly of Eclipse not to
complain during installation though!?

Thanks!
Arve



On Sun, Jul 4, 2010 at 4:49 PM, Arve Knudsen arve.knud...@gmail.com wrote:

 Sounds strange, b...

-- 
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 printing on dot matrix printer

2010-07-05 Thread Sreeni
Currently we are working on a requirement where we need to print on
the dot matrix printer. We tried using an example exist in the forums,
which is working fine on other printers than dot matrix? Can any one
suggest me how do I approach on this?


Thanks in advance.

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

2010-07-05 Thread Mian
Hi,
 I like to have a look of libraries of Google Web Toolkit, can any one
please guide me where can I download the libraries. I will highly
appreciate.

Thanks
Mian.

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



No source code is available

2010-07-05 Thread Lampard
I am trying to develop a front end using GWT. The data fetched from
the font end are ultimately passed to provision.java file used for the
provisioning Data as provided by Provisioning API of Google.
Naturally to do the provisioning I need to import :

import com.google.gdata.client.appsforyourdomain.UserService;
import com.google.gdata.data.appsforyourdomain.provisioning.UserEntry;
import com.google.gdata.data.appsforyourdomain.provisioning.UserFeed;
import com.google.gdata.util.AuthenticationException;
import com.google.gdata.util.ServiceException;

All the gdata jar files necessary for the import are added in the
library from the project properties.
But when I am doing the GWT complilation I get this error:

Compiling module com.google.test.WebApplication
   Validating newly compiled units
  [ERROR] Errors in 'file:/D:/EclipseWorkSpace/webApplication/src/
com/google/test/shared/Provision.java'
 [ERROR] Line 39: No source code is available for type
com.google.gdata.client.appsforyourdomain.UserService; did you forget
to inherit a required module?
 [ERROR] Line 43: No source code is available for type
java.net.URL; did you forget to inherit a required module?
 [ERROR] Line 45: No source code is available for type
com.google.gdata.data.appsforyourdomain.provisioning.UserFeed; did you
forget to inherit a required module?
 [ERROR] Line 46: No source code is available for type
com.google.gdata.data.appsforyourdomain.provisioning.UserEntry; did
you forget to inherit a required module?
 [ERROR] Line 53: No source code is available for type
com.google.gdata.util.AuthenticationException; did you forget to
inherit a required module?
 [ERROR] Line 56: No source code is available for type
java.net.MalformedURLException; did you forget to inherit a required
module?
 [ERROR] Line 59: No source code is available for type
com.google.gdata.util.ServiceException; did you forget to inherit a
required module?
   Finding entry point classes
 [ERROR] Unable to find type
'com.google.test.client.WebApplication'
 [ERROR] Hint: Previous compiler errors may have made this
type unavailable
 [ERROR] Hint: Check the inheritance chain from your module;
it may not be inheriting a required module or a module may not be
adding its source path entries properly

I placed the provision.java in the com.google.test.shared package.
I am not getting any idea how to inherit the module. Do I have to do
anything in the gwt.xml file?
My intention is to have a front in GWT and the back end will do the
provisioning after fetching the data.Please help me out and give
necessary suggestions. Thanks in advance for your help.

Regards Lampard

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

2010-07-05 Thread lam
Hi,
I'm working with GWT and I have a couple of questions.
I need to know the exact life cycle.
How is the project created?
How can you define what is changed into **.nocache.js? How can you add
more than one .js file?
Are all modules complied into one .js file?

Thank you
lam

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



Make a Banner rotator whit ClientBundle or Java Script Nativ, what do you recomended?

2010-07-05 Thread Jero
It is possible to insert multiple images with ClienteBundle and make a
banner rotator? or make whit java script?

Thanks Very much,
Greetigs
Jero.

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



Image Format Conversion + alternative to FileOutputStream

2010-07-05 Thread rohit jain
Hello,

I firstly made a simple program that converted images to any of the
desired format by user using JAI.
Then i thought of trying similar stuff on GWT.
As FileOutputStream idoes not work with GWT, i first tried to make a
program where user can upload an image and then download it.
Now i want to kind of merge these two and i'm really very confused.

String fileName = (String)req.getParameter(fileName);
File file=new File(c:/users/rohit/desktop/+fileName);
int length=0;
 // Load the input image.
 RenderedOp src = JAI.create(fileload, file);

 // Encode the file as a JPEG image.
 OutputStream os=null;
try {
os =new FileOutputStream(file);
} catch (FileNotFoundException e) {
System.out.println(Cannot write the JPEG File);
e.printStackTrace();
}

JPEGEncodeParam param = new JPEGEncodeParam();
ImageEncoder enc = ImageCodec.createImageEncoder(JPEG, os, 
param);
try {
enc.encode(src);
} catch (IOException e) {
System.out.println(Exception in encoding);
e.printStackTrace();
}
try {
os.close();
} catch (IOException e) {
System.out.println(Error in closing file);
e.printStackTrace();
}

ServletContext context =getServletConfig().getServletContext();
//String mimetype=context.getMimeType(fileName);
String mimetype=image/jpeg;
resp.setContentType(mimetype);
//resp.setContentLength((int)file.length());
resp.setHeader(Content-Disposition, attachment; filename=
\+fileName+\);
ServletOutputStream op = resp.getOutputStream();

byte[] buffer = new byte[4096];
DataInputStream in=new DataInputStream(new
FileInputStream(file));
while ((os!=null)((length = os.read(buffer))!=-1)){
op.write(buffer, 0, length);
}
os.close();
op.flush();
op.close();

}

above is the code of the server side. I store the file on hard disk
after getting it uploaded from user.
The above code is wrong. Basically i need an alternative to
FileOutputStream.

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



keyUp and keyDown use

2010-07-05 Thread edah yahna
hello group,

I'm creating a document viewer, the problem I'm facing is that : my
keyDown and keyUp are unuseable, I can't use them to go up or down my page.
I'm obliged to use the scrollBar.
Does anybody has any  idea what wrong?
thanks. Yahna

-- 
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 2.0.4 is now available

2010-07-05 Thread Mikael Couzic
 I'm pretty sure the GWT group is not providing them because very
 few, if any, projects internally utilize maven.
I do not agree. I use Maven, I believe many GWT projects use Maven,
and the GWT group should make the effort to manage GWT releases on the
Maven central repository.


On 1 juil, 18:32, jhulford jhulf...@gmail.com wrote:
 Has anyone at Google/GWT ever indicated they'd support maven?  I know
 they've asked for feedback on how they could help make releases more
 maven friendly in the past, but, I believe, it's always been entirely
 up to the maven community at large to provide maven resources for
 GWT.  I'm pretty sure the GWT group is not providing them because very
 few, if any, projects internally utilize maven.

 I don't use maven currently, but if there has been stated support for
 doing so in GWT that might help tip me towards using it.

 On Jul 1, 9:47 am, Andrew Hughes ahhug...@gmail.com wrote:



  Dear GWT Steering Commitee,

  This is feedback, please take it objectively! Your maven support to date can
  only be described as careless. There is a *large* community need you as much
  as you need them.

  Cheers :)

  On Thu, Jul 1, 2010 at 3:49 PM, Frederic Conrotte 

  frederic.conro...@gmail.com wrote:
   Hello Chris

   Any idea if/when it will be available for Maven users ?

  http://repo2.maven.org/maven2/com/google/gwt/gwt-dev/

   Thanks

   Fred

   On Jun 30, 11:25 pm, Chris Ramsdale 
   cramsdale+perso...@google.comcramsdale%2bperso...@google.com

   wrote:
This time without the mangled HTML.

Recently Apple released Safari 5, which included a bug where non-
integral right-shifts were not being evaluated properly. There were
several reports, both internally and externally, of GWT-based
applications unexpectedly crashing when running in Safari 5 (including
Google Wave). Upon further inspection of the crash, we determined that
the bug is triggered when calling several of GWT's array sorting
methods, which in turn perform non-integral right-shifts as part of
the compiled code.

That's the bad news. The good news is that we have a fix for this
issue, plus several other house keeping items/a that we've rolled
into a 2.0.4 release, which can be downloaded from GWT’s main download
site.

If you’re experiencing the Safari crash, you’ll need to recompile and
deploy your GWT app. The changes in 2.0.4 are completely compatible
with your existing 2.0 app, and should have no negative impact. To
that extent we’ve already dogfooded 2.0.4, verifying that it fixes the
Wave crash that was originally reported.

On Jun 30, 5:20 pm, Chris Ramsdale 
cramsdale+perso...@google.comcramsdale%2bperso...@google.com

wrote:

 Recently Apple released Safari 5, which included a a href=https://
 bugs.webkit.org/show_bug.cgi?id=40367bug/a where non-integral
 right-shifts were not being evaluated properly. There were several
 reports, both internally and a href=http://code.google.com/p/google-
 web-toolkit/issues/detail?id=5056externally/a, of GWT-based
 applications unexpectedly crashing when running in Safari 5 (including
 Google Wave). Upon further inspection of the crash, we determined that
 the bug is triggered when calling several of GWT's array sorting
 methods, which in turn perform non-integral right-shifts as part of
 the compiled code.

 That's the bad news. The good news is that we have a fix for this
 issue, plus several other a href=
  http://code.google.com/p/google-web-
 toolkit/issues/list?can=2q=milestone%3D2_0_4house keeping items/a
 that we've rolled into a 2.0.4 release, which can be downloaded from
 GWT’s main a href=http://code.google.com/p/google-web-toolkit/
 downloads/detail?name=gwt-2.0.4.zipdownload site/a.

 If you’re experiencing the Safari crash, you’ll need to recompile and
 deploy your GWT app. The changes in 2.0.4 are completely compatible
 with your existing 2.0 app, and should have no negative impact. To
 that extent we’ve already dogfooded 2.0.4, verifying that it fixes the
 Wave crash that was originally reported.

   --
   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%2Bunsubs
cr...@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 

Re: No source code is available

2010-07-05 Thread Jaroslav Záruba
Seems like the gdata module should be referenced by inherits/ in your
module.gwt.xml. Is it?

On Mon, Jul 5, 2010 at 1:33 PM, Lampard subhro.b...@gmail.com wrote:

 I am trying to develop a front end using GWT. The data fetched from
 the font end are ultimately passed to provision.java file used for the
 provisioning Data as provided by Provisioning API of Google.
 Naturally to do the provisioning I need to import :

 import com.google.gdata.client.appsforyourdomain.UserService;
 import com.google.gdata.data.appsforyourdomain.provisioning.UserEntry;
 import com.google.gdata.data.appsforyourdomain.provisioning.UserFeed;
 import com.google.gdata.util.AuthenticationException;
 import com.google.gdata.util.ServiceException;

 All the gdata jar files necessary for the import are added in the
 library from the project properties.
 But when I am doing the GWT complilation I get this error:

 Compiling module com.google.test.WebApplication
   Validating newly compiled units
  [ERROR] Errors in 'file:/D:/EclipseWorkSpace/webApplication/src/
 com/google/test/shared/Provision.java'
 [ERROR] Line 39: No source code is available for type
 com.google.gdata.client.appsforyourdomain.UserService; did you forget
 to inherit a required module?
 [ERROR] Line 43: No source code is available for type
 java.net.URL; did you forget to inherit a required module?
 [ERROR] Line 45: No source code is available for type
 com.google.gdata.data.appsforyourdomain.provisioning.UserFeed; did you
 forget to inherit a required module?
 [ERROR] Line 46: No source code is available for type
 com.google.gdata.data.appsforyourdomain.provisioning.UserEntry; did
 you forget to inherit a required module?
 [ERROR] Line 53: No source code is available for type
 com.google.gdata.util.AuthenticationException; did you forget to
 inherit a required module?
 [ERROR] Line 56: No source code is available for type
 java.net.MalformedURLException; did you forget to inherit a required
 module?
 [ERROR] Line 59: No source code is available for type
 com.google.gdata.util.ServiceException; did you forget to inherit a
 required module?
   Finding entry point classes
 [ERROR] Unable to find type
 'com.google.test.client.WebApplication'
 [ERROR] Hint: Previous compiler errors may have made this
 type unavailable
 [ERROR] Hint: Check the inheritance chain from your module;
 it may not be inheriting a required module or a module may not be
 adding its source path entries properly

 I placed the provision.java in the com.google.test.shared package.
 I am not getting any idea how to inherit the module. Do I have to do
 anything in the gwt.xml file?
 My intention is to have a front in GWT and the back end will do the
 provisioning after fetching the data.Please help me out and give
 necessary suggestions. Thanks in advance for your help.

 Regards Lampard

 --
 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: gradient background over multiple panels?

2010-07-05 Thread Magnus
Hi,

thanks! How can I make them transparent?

Magnus

-- 
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: gradient background over multiple panels?

2010-07-05 Thread Ian Bambury
Don't make them something else. Transparent is the default.

If you'd Googled  *background transparent  *and looked at the first result,
you could have found that our for yourself.


On 5 July 2010 20:22, Magnus alpineblas...@googlemail.com wrote:

 Hi,

 thanks! How can I make them transparent?

 Magnus

 --
 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: how to make this mouse over effect?

2010-07-05 Thread Subhrajyoti Moitra
try this..

public class MyFlexTable extends FlexTable implements HasMouseOutHandlers,
HasMouseOverHandlers {

public MyFlexTable() {
super();
Button hiddenButton=new Button(I am hidden);
hiddenButton.setVisible(false);
setWidget(0, 0, new Hyperlink(Some Link, somelink));
setWidget(0, 1, hiddenButton);
setBorderWidth(1);
setWidget(1, 0, new HTML(Some empty line..));
getFlexCellFormatter().setColSpan(1, 0, 2);//just to see the mouse
rollover in other rows of the table.

}

@Override
public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) {
// TODO Auto-generated method stub
return addDomHandler(handler, MouseOutEvent.getType());
}

@Override
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler)
{
// TODO Auto-generated method stub
return addDomHandler(handler, MouseOverEvent.getType());
}

}

and now from the client class, which will host this table.

final MyFlexTable table=new MyFlexTable();
table.addMouseOverHandler(new MouseOverHandler() {

@Override
public void onMouseOver(MouseOverEvent event) {
table.getWidget(0, 1).setVisible(true);

}
});
table.addMouseOutHandler(new MouseOutHandler() {

@Override
public void onMouseOut(MouseOutEvent event) {
table.getWidget(0, 1).setVisible(false);

}
});


HTH.


Thanks,
Subhro.

On Mon, Jul 5, 2010 at 11:57 PM, cy dev cydevelo...@gmail.com wrote:

 i have a flextable where there an anchor link in cell(0,0), and there
 is a button in cell(0,1) which is invisible by default.  how to make
 it such that, when mouse over the flextable, the button in cell(0,1)
 becomes visible; when mouse out the flextable, the button becomes
 invisible again?

 the difficulty is, flextable does not have mouseover and mouseout
 handler.  but if i add the flextable to a focuspanel, the anchor and
 the button would then be 'masked' by the focuspanel then cannot be
 clicked.

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



I18N and dynamic texts

2010-07-05 Thread arjanDOTTYbroerATgmailDOTTYcom
Hi there,
For a client i'm in search for a solution to I18N and dynamic texts.
Could you help me out in finding the most suitable design strategy for
this problem?

The application has some texts like menu items, headers, introduction
paragraphs and help texts. These texts should come from some database
tables and should be in different languages. Texts may also very on
the user role and the company where the user is employed.

Of course i would like to inject the views (i'm using the MVP pattern
from the Contacts example) with some class that implements a
textBundle interface or something like that. The Messages and
Constants strategy comes very close, but it depends on property files.
The client really wants to connect to the database with a homebrew MS
Access client.

Any suggestions are welcome.

Regards,
  Arjan

-- 
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: getting the current row count from the button

2010-07-05 Thread Merih


Hello all,

I've created  a new Vertical Panel and I've added it in East Edge.
Than I put the FlexTable in the Vertical Panel. But I still didnt
align it on right side. I still cant change the position.. :(


private DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
private VerticalPanel vPanel = new VerticalPanel();
private FlexTable testFlexTable = new FlexTable();


p.addNorth(new HTML(north), 5);
p.addSouth(new HTML(south), 2);
p.addEast(vPanel,40);
p.addWest(new HTML(west));
p.add(new HTML(center));


testFlexTable.setText(0, 0, Symbol);
testFlexTable.setText(0, 1, Price);
testFlexTable.setText(0, 2, Change);
testFlexTable.setText(0, 3, Remove);


// I have tried to set the position of the Vertical Panel. But It
didnt worked. It is still left side..

vPanel.add(testFlexTable);
vPanel.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT);
vPanel.setCellHorizontalAlignment(testFlexTable,
HasAlignment.ALIGN_RIGHT);


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.



Re: RPC - which exception types may be used???

2010-07-05 Thread andreas
From what I know you can use any type of exception, but:

- GWT needs to know the source (file) of the exception (it's either in
an inherited module or in your 'client' code or what ever package you
declared in your *.gwt.xml)
- it needs to be serializable (implement Serializable and do not
forget empty constructor)

That's it I think.

Andreas

On 5 Jul., 18:55, Magnus alpineblas...@googlemail.com wrote:
 Hi,

 I am trying to implement an RPC call that loads a record from a
 database:

  User loadUser (String nickname) throws Exception;

 I tried different Exception types:

 SQLException: results in mystic errors (not serializable)
 Exception: results in error uncaught exception at the service call
 IllegalArgumentException: works, but is not that what I want

 Question 1:
 What Exception types may be used for RPC?

 Question 2:
 Where (which source files) do I have to declare the exception?
 Service
 ServiceAsync
 ServiceImpl

 Thanks
 Magnus

-- 
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: No source code is available

2010-07-05 Thread Blessed Geek
It may be that you already know this but,
the very important attitude to acquire before starting to use GWT is

- GWT is not Java runtime, GWT is Javascript runtime
- All GWT Java code is compiled to Javascript runtime
- GWT is compiled to run on the browser client
- Any Java code hoping to be used for GWT must implement Serializable.
- Therefore, any Java lib called by your code must have their source
code available to the GWT compiler to translate into Javascript.
- Consequently, any lib called by a lib called a lib ... called by a
lib has to have its source code available to the GWT compiler. If the
Java source dependency is broken at any point due to unavailable
source code, your GWT compilation will fail.
- Your Java source code dependency chain can be broken by your Java
lib calling a library that does not implement Serializable, or calling
a library written in another language.


You seem to be confusing between the Java code in GWT and Java code
for JVM.
GData libs and UserService runs only on the JVM and do not run on the
browser.

The last time I used GData, I wrote the Java code calling GData libs
to run only on the server.
I used GWT RPC for the GWT client to call the server-side to trigger
GData calls, and after that, the server passes the results of the
calls to the RPC callback of the GWT client.

Similarly for GAE userservice - there is no Java source code available
for UserService. If your GWT app needs to call UserService, you need
to call UserService on the server only and pass any UserService info
as serialized structures to the GWT RPC client callback.

To effectively use GWT in client-server mode, you should familiarise
on how to exploit GWT RPC. Attitude-wise, always treat GWT client Java
code as though it is written in a language other than Java to avoid
confusing between JVM Java and GWT Java. You cannot willy-nilly lift
off any Java code and bind them to your GWT Java code. (Defn of willy-
nilly: taking actions by random will without considering their
implications/complications).

This is an 8-part series I blogged about combining GAE, GWT and GDATA:
http://h2g2java.blessedgeek.com/2009/08/tablemgr-gae-gwt-gdata-with-rpc.html.
Note the requirement for @gwt.TypeArgs is no longer true for GWT 1.7
onwards.

Modifying send greeting RPC example to use Uibinder:
http://h2g2java.blessedgeek.com/2010/02/tutorial-gwt-rpc-stub-modified-with.html.

Using GAE UserService with GWT:
http://h2g2java.blessedgeek.com/2010/05/accessing-google-userservice-from-gwt.html.

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



Session/realising user login

2010-07-05 Thread rapsli
Hi

I'm trying to build some kind of user login:

Password  username form - submit send RPC request to server. Server
checks password and stores username in session.

Then I have a timebased call, that checks the server (via RPC -
method is called isLoggedIn()) if the user is logged in. If not, Gui
is going to be blocked and login form will be displayed.

Part of my isLoggedIn method looks like this:
HttpServletRequest req = getThreadLocalRequest();
getThreadLocalRequest().getSession(false);

getThreadLocalRequest() returns null. Google told me that this was
because of the way GWT is implementing Servlets (Front Controller
pattern). I though could not find the correct way of doing it. Help
would be nice.

-- 
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 enable scrolling for app using DecoratedTabPanel?

2010-07-05 Thread Stefan Bachert
Hi Ingo,

First of all, CSS(3) is a failed descriptive language. Inspite of its
complexity it does not support some basic requirements of layout
management.
So you have to choose a layout which is possible with CSS. You can't
define a layout and find out how to do it with CSS.

I watched your video. I detected things which went wrong.

The TabPanel has still a flow layout. It grows when a inner div
moves to the next line.
You probably want the tabPanel grow and shrink with the browser
window. This is possible with an absolute layout (LayoutPanel)
However, the panel with search has actually a flow layout, but this
conflicts with the above. You should give this panel a fixed height.

My proposal without looking into your source,
use RootLayoutPanel
add SearchPanel with TopHeight (0, height)
add TabPanel with TopBottom (height, 0)
(both panel with LeftRight (0, 0)

This should make your TabPanel grow and shrink with your browser
window.

A the very moment the TabPanel could not grow on inner changes, the
scrollbar has a chance to appear because the inner needs to be larger
than the outer.


Stefan Bachert
http://gwtworld.de





On 5 Jul., 12:39, ingo ingo.jaec...@googlemail.com wrote:
 hello stefan,

 i could not solve the issue yet. i made a screencast showing my
 problem:http://www.youtube.com/watch?v=k_eqtePmbZY
 could anyone please have a quick look through the sourcecode and give
 me a hint about what i am missing here.. this is the entry 
 point.http://code.google.com/p/honeycrm/source/browse/trunk/src/honeycrm/cl...

 other source files that might be of interest can be found 
 herehttp://code.google.com/p/honeycrm/source/browse/trunk/src/honeycrm/cl...

 kind regards,
 ingo

 On 19 Jun., 16:50, Stefan Bachert stefanbach...@yahoo.de wrote:

  Hi Ingo,

  Setting size to 100% is in most cases just wrong.

  you set your view size to 100%. What should this mean? 100% of what?
  The spec say 100% of its parent (OK, IE has an other idea).
  So the parent is ScrollView. ScrollView is X in size, its content is
  also 100%*X. So NO need to show scrollers.

  To show scroller the size of ScrollPanel needs to be smaller than its
  content.

  Your view needs a real absolute size. Either remove setting 100% (I
  dont know, how your class calculates the size), or just setting it to
  a large absolute value for test
  Say 1000px 1000px. Than you should see scrollbars

  Stefan Bacherthttp://gwtworld.de

  On Jun 18, 5:03 pm, ingo ingo.jaec...@googlemail.com wrote:

   hello stefan,

   thank you very much for this hint. i think so too and i tried it. but
   it does not have the desired effect. see the 
   diffhttp://code.google.com/p/honeycrm/source/detail?r=73#
   i put a scrollpanel around the widget that i insert into the decorated
   tab panel. did you mean it this way?

   kind regards,
   ingo

   On 17 Jun., 19:52, Stefan Bachert stefanbach...@yahoo.de wrote:

Hi Ingo,

from user point of view neither of your mentiones widget should scroll
at all.

RootLayoutPanel
 \_ DockLayoutPanel (TabLayout class)
  \_DecoratedTabPanel(TabCenterView class)

     \_ScrollPanel
      \_Content A
     \_ScrollPanel
      \_Content B
     \_ScrollPanel
      \_Content C

The content page of a tab should be able to scroll.
Just put a scrollPanel in between.

Stefan Bacherthttp://gwtworld.de

On Jun 16, 9:12 am, ingo ingo.jaec...@googlemail.com wrote:

 hello everyone,

 i am using theDecoratedTabPanelto split my application into several
 modules (http://honeyyycrm.appspot.com). however, i have currently no
 scrolling at all (in no browser). i read about this in the mailing
 list and it seems like a lot of developers have issues with this
 (especially when they use TabPanels). i experimented with the
 suggestions but i did not yet find a working solution. is there any
 point in the documentation describing what to do to enable scrolling
 when using TabPanels?

 this is the widget that is inserted into the 
 RootLayoutPanel:http://code.google.com/p/honeycrm/source/browse/trunk/src/honeycrm/cl...
 it contains a docklayoutpanel and inserts an instance of TabCenterView
 into 
 itself:http://code.google.com/p/honeycrm/source/browse/trunk/src/honeycrm/cl...

 RootLayoutPanel
  \_ DockLayoutPanel (TabLayout class)
   \_DecoratedTabPanel(TabCenterView class)

 this is the current hierarchy. now which steps are neccessary to
 enable proper scrolling for the app?

 regards,
 ingo

-- 
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: I18N and dynamic texts

2010-07-05 Thread André Moraes
Well,

You can create a class that wraps a JavaScriptObject which contains a
Dictionary with your keys and values.

And before starting your application you can make a HTTP Request to
fetch the JSON data (or part of it).

Than in the server-side your write some code that send the values from
the database in the JSON format.

Of course you should not download all the keys from the DB at the same
time, but you can download part of it when you need.

Since you will use the MVP, you can write custom events when the
download of the JSON strings success or fail.

On 5 jul, 17:14, arjanDOTTYbroerATgmailDOTTYcom
arjan.br...@gmail.com wrote:
 Hi there,
 For a client i'm in search for a solution to I18N and dynamic texts.
 Could you help me out in finding the most suitable design strategy for
 this problem?

 The application has some texts like menu items, headers, introduction
 paragraphs and help texts. These texts should come from some database
 tables and should be in different languages. Texts may also very on
 the user role and the company where the user is employed.

 Of course i would like to inject the views (i'm using the MVP pattern
 from the Contacts example) with some class that implements a
 textBundle interface or something like that. The Messages and
 Constants strategy comes very close, but it depends on property files.
 The client really wants to connect to the database with a homebrew MS
 Access client.

 Any suggestions are welcome.

 Regards,
   Arjan

-- 
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: Role-based security and widget visualization

2010-07-05 Thread Ladislav Gazo
acris-security depends on some core modules and tries to be as
separated as it is possible. It is designed to fit into (hopefully)
any environment but currently we have integration with Spring Security
only. Nevertheless we are open to any discussion regarding extensions.

The client is built in javascript and transferred to the user thus the
logic primarily shows/hides or enables/disables the components. Server
side security is always required because you cannot rely on the
information sent by the client.

Regarding documentation - it is not complete yet, we are working on it
these days. @Secured annotation on top of the class propagates
authorities to field's @Secured so you don't have to repeat it. For
each field that has to be secured the @Secured annotation must be put
on top. Interface must be implemented so generator can process it.
Approximately in two days the showcase will be available.

If you have ideas worth discussion feel free to open a thread in the
group http://groups.google.com/group/acris .

On 3. Júl, 11:50 h., KaiWeing kaiwe...@gmx.net wrote:
 Hello Ladislav,

 looks interesting! Could you answer me a few questions:

 Is it correct, that I can use acris security independently of the
 other acris modules?

 Does it require Spring Security on the server side, or could I use
 something else?

 Are the restricted ui parts still transported to the client when the
 user is not authorized?

 Why do I need to implement an Interface plus add an annotation?

 Thanks!

 Kai

 On 2 Jul., 17:32, Ladislav Gazo ladislav.g...@gmail.com wrote:

  Hey Kai,

  there is a toolkit called AcrIS (http://acris.googlecode.com/) where
  one of it's part is denoted to security - acris-security module
  (http://code.google.com/p/acris/wiki/Security). It handles client and
  server security. On the client it is using annotations or manually
  specified authorities. Server is spring-security based. Documentation
  is in progress these days and will be finished until the release.

  BR,
  Laco

  On 1. Júl, 14:07 h., KaiWeing kaiwe...@gmx.net wrote:

   Hello,

   we are evaluating GWT as a basis for different kinds of enterprise
   applications we have here. Some of those have controls which must only
   be displayed for users in a certain role, also, the decision which
   controls to display must be made at serverside, to avoid clientside
   manipulation.

   How can I implement such a requirement securely in GWT?

   Should this be solved via deferred binding (that would require that
   deferred binding could take the server-state into account)?

   Is there a pattern for this in GWT or any extension library?

   Thanks very much for your feedback!

   Kai

-- 
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: iOS (iPhone/iPad) breaks the GWT spinner

2010-07-05 Thread Jim Douglas
This same basic issue breaks the SliderBar in iOS:

http://google-web-toolkit-incubator.googlecode.com/svn/trunk/demo/SliderBar/index.html

The SliderBar is affected by two different issues:

(1) Click-and-hold on the slider image brings up that iOS image menu;
and
(2) Click-and-drag would be intercepted by iOS to drag the entire
screen.

On Jul 5, 8:56 am, Jim Douglas jdoug...@basis.com wrote:
 This isn't strictly a GWT question; it affects any JavaScript
 application deployed to iOS.  Any time the user touches an image for a
 second or so, a popup menu appears with the options Save Image and
 Copy.  This is just a nuisance with simple button images, but it
 completely breaks the GWT spinner.  You can see the problem if you
 navigate here in an iPhone or iPad:

 http://collectionofdemos.appspot.com/demo/com.google.gwt.demos.spinne...

 You can tap an arrow to move a spinner a single 'tick'.  But if you
 press-and-hold the arrows (the core functionality of the spinner),
 that iOS popup image menu interrupts the operation.

 Has anyone else struggled with this and found a way to suppress that
 behaviour?

 Jim.

-- 
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: JSON Problem

2010-07-05 Thread Ahmed Shoeib
Thanks a lot My Friends
it is easy way

thanks for your support

On Jul 5, 9:33 pm, André Moraes andr...@gmail.com wrote:
 The response comes async.

 When the response from the server arrives at the client the method
 onResponseReceived in the RequestCallback object is called, if an
 error hapens the the onErrormethod is called.

 The RequestCallback object is the second parameter in the sendRequest
 function call.

                                 public void onResponseReceived(Request
 request, Response response)
 {
                                         if (response.getStatusCode()
 == 200 || response.getStatusCode()
 == 304)
                                         {
                                                 JavaScriptObject
 responseData =
 JsonHelper.stringToJso(response.getText()).cast());
             // use the response
                                         }
                                         else
                                         {
             // invalid response
                                         }
                                 }
                                 @Override
                                 public void onError(Request request,
 Throwable exception) {
                                         // error on the resquest
                                 }
                         });

 On 5 jul, 15:01, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:

  you told me how to send request from client to server

  now i want how yo get data from server to use it in client

  and the data in json

  On Jul 5, 8:12 pm, André Moraes andr...@gmail.com wrote:

   This code is quite simple

   The line:

    re = rb.sendRequest(jsonrpc-call= + JsonHelper.jsoToString(call),
   new RequestCallback()

   prepare a AJAX call to the server and make your javascript object to a
   string using JsonHelper.jsoToString.
   In ther server the json-string will be accessible by the parameter
   jsonrpc-call.

   The line:

                                           if (response.getStatusCode()
   == 200 || response.getStatusCode()
   == 304)
                                           {
                                                   JavaScriptObject
   responseData =
   JsonHelper.stringToJso(response.getText()).cast());
               // use the response
                                           }

   get the response wrote by the server and make i availabe as a
   JavaScriptObject.

   You can use the JSONObject class to populate and read a
   JavaScriptObject.

   You can read more about JSON + GWT at:

  http://code.google.com/intl/webtoolkit/webtoolkit/doc/latest/DevGuide...
   andhttp://code.google.com/intl/webtoolkit/webtoolkit/articles/using_gwt_...
   On 5 jul, 12:50, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote:

i want a simple example to describe it
cause i need it as soon as possible

On Jul 5, 6:18 pm, André Moraes andr...@gmail.com wrote:

                         re = rb.sendRequest(jsonrpc-call= + 
 JsonHelper.jsoToString(call),
 new RequestCallback() {

                                 @Override
                                 public void 
 onResponseReceived(Request request, Response response)
 {
                                         if (response.getStatusCode() 
 == 200 || response.getStatusCode()
 == 304)
                                         {
                                                 JavaScriptObject 
 responseData =
 JsonHelper.stringToJso(response.getText()).cast());
             // use the response
                                         }
                                         else
                                         {
             // invalid response
                                         }
                                 }

                                 @Override
                                 public void onError(Request request, 
 Throwable exception) {
                                         // error on the resquest
                                 }
                         });

 public class JsonHelper {

         public static String jsoToString(JavaScriptObject jso) {
                 if (isJsonLibraryDefined()) {
                         return _jsoToString(jso);
                 } else {
                         return new JSONObject(jso).toString();
                 }
         }

         public static JavaScriptObject stringToJso(String value) {
                 if (isJsonLibraryDefined()) {
                         return _stringToJso(value);
                 } else {
                         return _stringToJsoEval(value);
                 }
         }

         public static native String _jsoToString(JavaScriptObject 
 jso) /*-{
                 return JSON.stringify(jso);
         }-*/;

        

Re: Easily fixable: Issue 2892 Option Element warnings

2010-07-05 Thread Thomas Broyer


On 5 juil, 13:06, Jurriaan Mous arque...@gmail.com wrote:
 I would like to bring an old Issue 2892 to your attention. Some option
 fields used as date selectors in our application keep outputting many
 annoying warnings. Causing a 15 to 20 second wait before we could
 continue on some views. Particularly year selection has a lot of years
 because they are for selecting birth days of older people. We could
 set the logging level higher but then we don't see the normal logs we
 included in testing.

 The fix is very simple. Somebody could remove the returns from the
 methods that should return a void to remove the warning. This is a
 very small task but not yet done in the years in the existence of the
 issue report. It would make us very happy to properly test those views
 with option elements in our app. :)

 The issue with a proposed 
 fix:http://code.google.com/p/google-web-toolkit/issues/detail?id=2892
 (I am arquelis in the issue and posted a possible fix months ago)

 Could somebody in the list find a way to have this issue fixed? You
 will be in our eternal gratitude! :)

See http://code.google.com/webtoolkit/makinggwtbetter.html#submittingpatches

Sending patches makes things faster than explaining a fix. If you can
add a unittest (in this case, it shouldn't be necessary), it's even
better. But more than that, signing the Contributor License Agreement
is probably a must fr contributions to be accepted.

-- 
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 2.0.4 is now available

2010-07-05 Thread Thomas Broyer


On 4 juil, 16:55, Mikael Couzic mikaelcou...@gmail.com wrote:
  I'm pretty sure the GWT group is not providing them because very
  few, if any, projects internally utilize maven.

 I do not agree. I use Maven, I believe many GWT projects use Maven,
 and the GWT group should make the effort to manage GWT releases on the
 Maven central repository.

It'll probably come with GWT 2.1, because of the integration with
Spring Roo which requires Maven (don't ask me why, that's what I've
been told).
We're starting a new project at work, with many server-side modules,
so we chose to use Maven; and I'm therefore using the GWT 2.1.0-M2
Maven repository: 
http://google-web-toolkit.googlecode.com/svn/2.1.0.M2/gwt/maven/

-- 
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: Url to my data for HTTP GET request?

2010-07-05 Thread Thomas Broyer


On 5 juil, 17:08, Nik khristia...@gmail.com wrote:
 Hi,
 I'm new with GWT nad trying to write a simple XML-parser in Eclipse
 and really don't understand what url i have to use in my HTTP GET
 request.

         private void refreshtable() {
 //      String url = http://127.0.0.1:9997/rate.xml;;
         RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
 rate.xml);

         try {
           Request request = builder.sendRequest(null, new RequestCallback()
 { ..

 now i have copied  the file rate.xml to all of the folders, but the
 HTTP GET doen't see the file. I have also tried to 
 puthttp://127.0.0.1:9997/rate.xml
 as url, where i can access it with my browser.

 Maybe someone has an advise?

http://en.wikipedia.org/wiki/Same_origin_policy

In other words:
1. deploy the XML on the same server as your GWT app
2. use a relative URL (i.e. /rate.xml or GWT.getHostPageBaseURL()
+rate.xml)

-- 
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-2.1 java.util.logging

2010-07-05 Thread Thomas Broyer


On 4 juil, 15:19, james treas...@gmail.com wrote:
 Last week I was trying to find a similar example and couldn't. So I
 took a little time an wrote a quick blog post with a small example app
 that should help you get started with logging.

 http://treasonx.blogspot.com/2010/07/gwt-21-logging.html

There's a sample in the SVN repo. Maybe it's even bundled with the M2.
I haven't yet looked at it but I guess it could answer many of your
questions.
http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/logexample/

-- 
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: Execute commands between RPC requests

2010-07-05 Thread Thomas Broyer


On 5 juil, 20:57, Bruno Santos bruegosan...@gmail.com wrote:
 Is there any way to run a given command at the beginning and end of
 any RPC request?

You can provide an RpcRequestBuilder and either:
 - return your own RequestBuilder from doCreate(), which would
override send() and setCallback()
 - do the beginning command within some doXxx method of the
RpcRequestBuilder (that'd mean just before the send(), but it
shouldn't matter much) and override setCallback() to wrap the
RequestCallback so you can do the end command there (just before or
after delegating to the wrapped callback)

-- 
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: XMLParser Question

2010-07-05 Thread Thomas Broyer


On 5 juil, 19:17, fonghuangyee fonghuang...@gmail.com wrote:
 StringBuffer xmlBfr = new StringBuffer();
 xmlBfr.append(Layout);
 xmlBfr.append(Column type=\Middle\/Column);
 xmlBfr.append(Column type=\Middle\/Column);
 xmlBfr.append(/Layout);
 String xml = xmlBfr.toString();
 Document document = XMLParser.parse(xml);
 Element element = document.getDocumentElement();
 NodeList layouts = element.getElementsByTagName(Layout);
 for (int k = 0; k  layouts.getLength(); ++k) {
         Element layoutElement = (Element) layouts.item(k);
         NodeList columns = layoutElement.getElementsByTagName(Column);
         for (int i = 0; i  columns.getLength(); ++i) {
                 Element columnElement = (Element) columns.item(i);
                 String type = columnElement.getAttribute(type);
                 Window.alert(type);
         }

 }

 I try run the code above, i found that the XMLParser is not working
 well.
 NodeList layouts = element.getElementsByTagName(Layout);
 layouts.getLength() should return 1, but it is return 0!
 XMLParser just cant parse the xml string.

 May i know, am i doing any mistake when using XMLParser as above?

The document element *is* the Layout !

-- 
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: need help on JSON request and response on UI only

2010-07-05 Thread Thomas Broyer

On 5 juil, 17:09, sathya sathyavik...@gmail.com wrote:
 I have a server model where, if we send JSON request, server replays
 back with JSON response. Now I need to develop UI part for this
 project using GWT (no need to develop server side as it has been
 already developed).Can you please suggest me how I send and receive
 JSON data from GWT front end.
 To brief, server receives JSON request and replays back with JSON
 response. Now I need t create UI where I send JSON request and receive
 JSON response.
 I believe Making Cross-Site Requests is one option. Not sure are there
 any other ways to do this.(I just need   to send JSON request and
 receive response from server without worrying about server code)

Have a look at the following classes:
 - RequestBuilder to make the request
 - JSONObject and the likes to build the JSON request
 - JSONParser to parse the JSON response back into a JSONObject or
other JSONValue

-- 
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: Best practice to serialize a org.w3c.dom.Document over RPC?

2010-07-05 Thread Richard Kennard
Perfect! Thanks for the detailed and fast responses guys.

Richard.

-- 
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-2.1 java.util.logging

2010-07-05 Thread Jeff Chimene
On 07/05/2010 02:48 PM, Thomas Broyer wrote:
 
 
 On 4 juil, 15:19, james treas...@gmail.com wrote:
 Last week I was trying to find a similar example and couldn't. So I
 took a little time an wrote a quick blog post with a small example app
 that should help you get started with logging.

 http://treasonx.blogspot.com/2010/07/gwt-21-logging.html
 
 There's a sample in the SVN repo. Maybe it's even bundled with the M2.
 I haven't yet looked at it but I guess it could answer many of your
 questions.
 http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/logexample/
 

Well, that's certainly one example.

I was looking for something that would get to the 2.1 stuff from Fred
Sauer's logging.

Here's what I've found so far:

o Using the following idiom in each class that used the FS logger:
final private Logger logger;

ctor {
  logger = Logger.getLogger(this.getClass().getName());
}

then, where I used
 Log.debug(msg); // where msg included the class name
switch to
 logger.fine(msg);

is a bit verbose in that certain GWT classes are also intruding at the
FINE level. I will switch to a different log level. Otherwise, all is
copacetic.

o Go through /all/ the log handlers and disable the ones you don't want.
I forgot SimpleRemoteHandler and it took a few minutes to discover the
problem.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: need help on JSON request and response on UI only

2010-07-05 Thread Blessed Geek
On the server-side, I use
com.google.gson.*

On the client-side, I use
com.google.gwt.core.client.JavaScriptObject;
com.google.gwt.json.client.*;

There are two modes to using these APIs.
- Use GWT RPC to send Java structures back and forth.
In this mode, you are blind to JSON and never need to even refer to
any JSON API.
- Send JSON explicitly and therefore having to be aware of JSON APIs
on both client and server side.

What concerns you is the second mode.

For example, I am writing a framework which inspects the DAO on the
server-side to construct the JSON representing those structures. The
GWT client reads the server's JSON representation and data and builds
the GWT (or SmartGWT) Ui dynamically and fill them up with data
spontaneously.


On the server-side, using com.google.gson.*, for example,

final JsonObject schema = new JsonObject(); // construct the schema
root as hash node.
schema.addProperty(name, name); // add key-string value pairs

JsonArray elements = new JsonArray(); // create a JSON array
schema.add(elements, elements); // add key-child node pairs to hash
node.
JsonObject elem = new JsonObject();
elements.add(elem); // json obj to jsonarray.

Gson gson = new GsonBuilder()
.setPrettyPrinting().create();
gson.toJson(schema); // print the JSON representation to output.


On client-side, read this article
http://code.google.com/webtoolkit/articles/using_gwt_for_json_mashups.html.
And then you could use my library by extending
JsonRemoteScriptCall.java at
http://code.google.com/p/synthfuljava/source/browse/#svn/trunk/gwt/jsElements/org/synthful/gwt/javascript/client.
This library works on the premise of jsonp. The principle is, you
modify your server-side JSON provider to do envelope the JSON
structure as executable javascript:

var jsdata = {
 // json structure
}
eatJson(jsdata);

On client-side:
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.json.client.*;
JsonRemoteScriptCall myJRSC = new JsonRemoteScriptCall() {
extends JsonRemoteScriptCall {
  @Override
  public void onJsonRSCResponse(JavaScriptObject jso) {
if (jso==null) return;
this.ignite();
JSONObject json = new JSONObject(jso);

// traverse your json tree here.
   }
}

What you need to take note is how to trigger reading in the JSON:
myJRSC.call( url of json data source, eatJson);

Notice that the callback onJsonRSCResponse is mapped to eatJson by
this utility, so that at the end of the json file, eatJson is executed
as a javascript call which actually runs the callback
onJsonRSCResponse.

Take note that on the client-side use of com.google.gwt.json.client.*
APIs, you have to be quite explicit in testing if a node is another
node, is an array, is a string, etc:

static public String getStringValue(JSONObject json, String key){
  if (json == null || key == null )
return null;

  JSONValue typejsv = json.get(key);
  if (typejsv!=null){
JSONString typestr = typejsv.isString();
if (typestr!=null)
  return typestr.stringValue();
  }
  return null;
}

static public JSONArray getJSONArray(JSONObject json, String key){
  if (json == null || key == null )
return null;

  JSONValue jsv = json.get(key);
  if (jsv!=null){
return jsv.isArray();
  }
  return null;
}

static public JSONObject getJSONObject(JSONObject json, String key){
  if (json == null || key == null )
return null;

  JSONValue jsv = json.get(key);
  if (jsv!=null){
return jsv.isObject();
  }
  return null;
}

-- 
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-2.1 java.util.logging

2010-07-05 Thread Jon Gorrono

I didn't read the blog yet, so sorry if this is repeat..

add log4j.properties and commons-logging.properties in the devel 
mode-only src tree at the root of the src directory (eg dev/src/java)


in commons-logging.properties:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

and for the log4j.properties, use your own normal incantation here's 
one ripped from somewhere out there:

1log4j.rootCategory=INFO, dest1, dest3
2! Log to the console
3log4j.appender.dest1=org.apache.log4j.ConsoleAppender
4log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
5log4j.appender.dest1.layout.ConversionPattern=%-5p %d{HH:mm:ss.SSS} 
[%-15.15t] [%-25.25c{1}] %m%n

6! LOG TO A FILE
7log4j.appender.dest3=org.apache.log4j.RollingFileAppender
8log4j.appender.dest3.layout=org.apache.log4j.PatternLayout
9log4j.appender.dest3.layout.ConversionPattern=%-5p %d{EEE MMM dd 
HH:mm:ss.SSS zzz } [%-15.15t] [%-25.25c{1}] %m%n

10! Specify the file name
11log4j.appender.dest3.File=./logs/hosted-log4j.log
12! Control the maximum log file size
13log4j.appender.dest3.MaxFileSize=3000KB
14log4j.appender.dest3.MaxBackupIndex=3

add your log4j.loggerpkg-and-class=DEBUG lines here



james wrote:

Last week I was trying to find a similar example and couldn't. So I
took a little time an wrote a quick blog post with a small example app
that should help you get started with logging.

http://treasonx.blogspot.com/2010/07/gwt-21-logging.html

On Jun 21, 3:21 pm, jie...@gmail.com jie...@gmail.com wrote:
  

Does anyone have an example of how to get java.util.logging.Logger
messages to the console when running in development mode? I was
excited about removing an external dependency of gwt-log, but can not
seem to get any dev-mode CLIENT log messages to appear to the
console..

Complicating matters is that Jetty uses slf4j, which I am fairly
unfamiliar with for setting up properly with respect to the
appropriate libraries being available. I really just want log messages
to go to the console... any information leading to this situation will
be rewarded with beer. :-)

-Jesse



  


--
Jon Gorrono
email{+[+++-]+++..---.-.+++..---.-.+.+.++..+.---.+..---.+..-.++.} 
http{ats.ucdavis.edu}



--
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 printing on dot matrix printer

2010-07-05 Thread dolcra...@gmail.com
What example?  As far as I know it would be the browser and css (in
addition to the printer driver) that would control the printing.  Look
into those three areas (browser, css, and driver).  I think you may
have a misunderstanding of what GWT is.

On Jul 5, 1:52 pm, Sreeni sreeniva...@gmail.com wrote:
 Currently we are working on a requirement where we need to print on
 the dot matrix printer. We tried using an example exist in the forums,
 which is working fine on other printers than dot matrix? Can any one
 suggest me how do I approach on this?

 Thanks in advance.

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



Cross Site Linker Code Splitting

2010-07-05 Thread Jay
The Developer's Guide mentions that Code Splitting is not supported by
the cross site linker

http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html


What are the technical reasons for this? Can we expect support for
this in the Cross Site Linker soon?

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: xs linker does not support all GWT features?

2010-07-05 Thread Jay
Is there an issue in the issue tracker in regards to this? I would
like to track when and if this fix makes it into a release, but
couldn't find anything by searching on xs linker and code
splitting



On Jul 3, 12:31 pm, Brendan Kenny bcke...@gmail.com wrote:
 Not sure if you meant to write just to me or reply to the list, but
 I'll forward this on to everyone.

 Shortly after I wrote that post it was discussed on the Contributors
 list that there was indeed a fundamental issue preventing the xs
 linker from working with code splitting, but that a patch was in the
 works. The fix landed on trunk in March

 http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/c...

 but I'm not sure if that made it into 2.0.4 (or whatever) or if it
 will be released with 2.1.

 On Tue, Jun 29, 2010 at 12:58 AM, Danny Goovaerts

 danny.goovae...@gmail.com wrote:
  I have exactly the same request,i.e. use the xs linker together with
  code splitting (I use code splitting to chunk up a rather large
  application (800k), but even then it is advantageous to have caching
  of the js modules when using
  https).
  DId anyone try to make the changes mentioned below? Did you succeed?

  Thanks in advance,

  Danny

  On 12 feb, 01:30, Brendan Kenny bcke...@gmail.com wrote:
  On Feb 11, 3:52 pm, Jonas Huckestein jonas.huckest...@me.com wrote:

   Hi everybody,

   does anybody know why thexslinker does not supportcode-splitting?
   Are there any other features that are not fully supported?

   I am currently trying to build a framework that allows for easy wave
   gadget development in GWT (including side-by-side testing of gadgets
   in hosted mode). Given the shortcomings of the gwt-gadget linker
   (which produces only one huge code file instead of one for each
   permutation), we were trying to figure out what else we could do over
   at the wave dev group. (you can follow the discussion 
   here:http://groups.google.com/group/google-wave-api/browse_thread/thread/2...
   )

   It would be nice to get some statement on this from a googler. Since
   Wave is developed using GWT I would like to be able to develop
   extensions using GWT, as well.

   Cheers,
   Jonas

   --
   Jonas Huckesteinhttp://thezukunft.com

  Hi Jonas,

  Yes, the iframe (std) linker was the only official primary linker set
  up to handlecode splitting. I only use that linker and haven't dug
  too deeply, so I don't know if that was done because of a fundamental
  problem, for performance/efficiency reasons, or if was just left as an
  exercise to developers since there wasn't much of a call for it.

  If it's one of the latter two, it shouldn't be hard to adapt code from
  the iframe and selectionscript linkers and incorporate it into a
  version of thexslinker. If you aren't already familiar with it, the
  key method is doEmitCompilation() in SelectionScriptLinker.
  CompilationResult artifacts have a String array of the js code
  associated with that permutation, each entry containing a code
  fragment. The linker prepares the primary fragment to load correctly,
  but subsequent fragments are just output directly to a matching
  subdirectory.

 http://www.google.com/codesearch/p?hl=en#A1edwVHBClQ/dev/core/src/com..

-- 
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 get the row number of a flex table

2010-07-05 Thread aditya sanas
you can set buttons ID by the method getElement().setId();

you can set Id as row number and as whenever button get clicked you will
have to check its id by

getElement().getId() which is row number that we had set.


--
Aditya


On Mon, Jul 5, 2010 at 8:53 AM, Vik vik@gmail.com wrote:

 Hie

 I have a table extending a FlexTable.

 In every row there is Button. On clicking this button I want to know the
 row number of the table. Any idea on how to achieve this?

 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com

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



UIBinder and SmartGWT 2.2 : how to get them working

2010-07-05 Thread anjan bacchu.dev
hi there,

does anyone have a comment on what it takes to get UiBinder and SmartGWT 2.2
up and running ?

We are using SmartGWT v 2.2 Tree and Grid Controls on top of GWT 2.03. Can
someone suggest what techniques can be employed for both to play together ?
We saw http://code.google.com/p/uibinding-smartgwt/. Is that the recommended
approach ?

If someone already has UiBinder working fine with SmartGWT, that would be of
great use to us.

Any tips/pointers appreciated very much,

BR,
~A

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