Re: Width of widgets added in Grid

2008-12-17 Thread hezjing
Thank you, Gregor.

The problem is resolved by adding two lines as indicated below:

Label usernameLabel = new Label("Username");
Label passwordLabel = new Label("Password");
username = new TextBox();
password = new PasswordTextBox();
   >> password.setWidth("100%");
Grid grid = new Grid(2, 2);
   >> grid.getColumnFormatter().setWidth(1, "100%");
grid.setWidget(0, 0, usernameLabel);
grid.setWidget(1, 0, passwordLabel);
grid.setWidget(0, 1, username);
grid.setWidget(1, 1, password);


On Thu, Dec 18, 2008 at 1:19 AM, gregor wrote:

>
> Look up HTMLTable.ColumnFormatter (Grid's superclass) in javadoc - you
> should be able to do what you need with that.
>
> On Dec 17, 3:52 pm, hezjing  wrote:
> > Hi
> >
> > I have the following code to display input field for username and
> password:
> >
> > Label usernameLabel = new Label("Username");
> > Label passwordLabel = new Label("Password");
> > username = new TextBox();
> > password = new PasswordTextBox();
> > Grid grid = new Grid(2, 2);
> > grid.setWidget(0, 0, usernameLabel);
> > grid.setWidget(1, 0, passwordLabel);
> > grid.setWidget(0, 1, username);
> > // the width of password is somewhat shorter than username
> > grid.setWidget(1, 1, password);
> >
> > When tested in GWT 1.5.3 hosted mode, the width of the password is
> smaller
> > than the width of username.
> > I'm expecting the width of the widgets in the same column are the same,
> yes?
> >
> > I tried password.setWidth("100%"), but it doesn't change the width too!
> > How to make the width of username and password the same?
> >
> > --
> >
> > Hez
> >
>


-- 

Hez

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



Re: Client did not send nnn bytes as expected

2008-12-17 Thread Amit Kasher

I really appreciate you attempts to help.
In reply to your last post, jec:
* We can't reproduce this in the lab...
* We see a combination of FIN, FIN-ACK and RST.
* We haven't seen any suspicious traceroutes... nothing
differentiating suffering clients from non-suffering client.
* We don't do anything "special" - these are normal GWT service call
requests from browser to server.
* We tried that, as well as different MTU sizes... no clue
* This occurs without any SSL involved, and regardless what browser
being used (IE, FF).

Unfortunately we gave up on the persistent attempt to get to the root
of that issue. We now just assume that it's some low level network
issue (level 1-2) that causes some of the packets not to arrive, in an
unexplained combination with a higher level network issue (level 3-6)
that causes the packet's data to split at exactly 80%.

In order to deal with this situation, we implemented a high level
(GWT) configurable retry mechanism, with timeout support. This
resolves the symptoms, and in effect solves the problem.

We don't mind contributing this mechanism (both client and server
code), if someone is interested or believes GWT needs this kind of
mechanism.

Thanks again,
Amit

On Dec 5, 8:09 pm, jchimene  wrote:
> Hi Amit,
>
> You don't make this easy, do you...
>
> o     Just to be clear: goodness happens when the client sends 2 TCP
> packets; which become three IP packets on the wire; which are
> reassembled by the server into 2 TCP packets.
>        Badness happens when the client sends 2 TCP packets; which
> become three IP packets on the wire; which are reassembled into one
> complete TCP packet and 1 incomplete TCP packet.
>       Can you reproduce this in your lab? I'm guessing "no", otherwise
> you would not have deployed the app...
>
> o     Do you see a NAK at the client after the dropped fragment?
>
> o     Pls. try traceroute from your lab and from the client box. What
> are the differences?
>
> o     It's now appearing to be an IP issue. The fact that the
> fragmentation doesn't occur on the larger packet is interesting.
>
> o     The two separate TCP packets leads to an assumption that you can
> identify requests from the same client box at the server. IOW, you
> have an
>        application-level protocol that lets you reassemble the two
> packets into a single request. I'm sure this is the case, but such a
> design isn't explicitly stated in your
>        message. Your server application never sees the 2 -> 3 split,
> since the normal case is that your server app only sees 2 packets from
> the client. I'm reluctant to say this, but
>        part of this process may require proof that the protocol design
> is resilient to network transmission errors.
>
> o     I'd start playing around w/ different packet sizes and
> transmission rates (via ping) to see if you can trip any triggers. It
> may be a combination of buffering/congestion
>        between the client and the server.
>        Did you try ping w/ different packet sizes? I realize that you
> have different servers. Does the connection between the client and
> server occur over the public switched network
>        or does it use a private circuit?
>
> o     There have been posts in this thread w/r/t/ SSL and IE. Are they
> relevant?
>
> Cheers,
> jec
>
> On Dec 5, 1:21 am, Amit Kasher  wrote:
>
> > Hi,
> > We have spent the past 2 days working on this, and have some new
> > findings.
>
> > We have made contact to one of our customers who is encountering this
> > issue more frequently than others, and he granted us access to his
> > computer (using logmein). We installed WireShark on his computer, as
> > well as on the server. We managed to reproduced the problem with both
> > sniffers in action, and analyze the exact correlating TCP segments
> > according to their sequence and ack numbers. Here are the results.
>
> > This is what happens in the valid state:
> > The client sends 2 TCP segments for a GWT service calls, which are
> > supposed to be reassembled to a single PDU which is the entire single
> > HTTP request. The first segment always contains the HTTP request
> > header, and the second TCP segment always contains the HTTP request
> > body. For instance, we see that the client sends a first segment of
> > size 969 bytes, and a second segment of size 454 bytes. In the server
> > we see that these 2 segments become 3 segments. The first is still 969
> > bytes and contains the HTTP request header; the second is 363 bytes
> > (80% of the original second segment), and the third is the remaining
> > 91 bytes (20% of the original 454 bytes).
>
> > In the invalid state, when the problem occurs, the third segment
> > simply does not arrive in the server. It seems that something in the
> > way has split the second 454 bytes segment to 2 segments, and only
> > sent the first one to the server.
>
> > 1. If this is something in the client's machine, how come we don't see
> > it in the sniffer? (we even tried removing all 

Re: Client-side JSON Serialization?

2008-12-17 Thread Shawn Pearce
Right.  Its harder with the overlay types to define a map or something like
that.  You could try to wrap the JavaScriptObject with some class that knows
to convert a list in native JS into a Java Map, but at that point you have
about half of GWT's own RPC system, or gwtjsonrpc.  This case of wanting
rich Java types but a clear JSON encoding is why I wrote gwtjsonrpc.

A thought just occured to me though; a JSON "map" would typically be an
object with the keys being the property names...  but JSON only permits
strings for the property names and you mention wanting some other types.
gwtjsonrpc should support any Object type in the key (so long as it is
declared to be a concrete type in the Map<> type parameter), but for non
string typed key maps gwtjsonrpc uses a JSON array of pairs (even index is
key, odd is value).  I'm not sure what sort of encoding you were looking for
or needing here...  (for Map it uses the standard object
notation).

On Dec 17, 2008 11:12 AM, "Clint Gilbert" <
clint.gilb...@childrens.harvard.edu> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Thanks very much, I'll take a look at wgtjsonrpc.

My app needs to serialize a non-trival map of data: String => Date-range
class => other
user-defined type => data POJO, currently.  I'm familiar with Overlay types,
and somewhat
familiar with JSNI, so I think I could write a class that wraps a
JavaScriptObject and
uses that handle as the backing map.  Then I could just serialize the
wrapped JSO.  But
then I'd lose some useful features of a Java Map, like being able to use
non-primitive
types for keys, nice methods like keySet(), etc, no?

Shawn Pearce wrote: > Roll your own, or look at gwtjsonrpc: > >
http://android.git.kernel.org/?p...

> On Tue, Dec 16, 2008 at 18:34, clint.gilb...@childrens.harvard.edu similarly to the json2.js lib from json.org that I was
using prior to

> moving to the GWT, but anything relatively straightforward that > performs
well is fine with me. >...
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJSU+ErZoE3ArapxERCFm6AKCBhbEn83de4ivjGGgBAagpEAFGaQCeIDJL
3xJzW9oU0UXdC9WuiFUbm3M=
=/zOi
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~ You received this
message because you are su...

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



Re: Calling of business method from Client

2008-12-17 Thread Arul

Hi Gregor,
 I would like to thank you for replying to my query.
I am trying my level best not to change DAO pattern which is already
exists in my application.
There were lot of methods returns ArrayList and Vectors for different
purpose. According to your reply now I need to change my DO as well.

  Would you please clarify one thing, if I use ArrayList or Vector
instead a class (which implements Serilizable) as return type as you
mentioned your reply for business methods then I am getting some
warning like " Keys will not be Serilized because it is not final".
 Have to use always class as return type in GWT RPC business methids
instead traditional java programming return ( ArrayList,Vector
etc,,)  ?

Thanks
Arul






On Dec 17, 9:31 am, gregor  wrote:
> Hi Arul,
>
> Yes and no. Yes. this is the way you set up RPC services client side,
> but no, you do not necessarily have to have dozens of separate
> callbacks, one for every single use case.
>
> For example, here you have two methods that both return vectors of
> accounts. You can merge them into a single RPC service method (thereby
> cutting out half the tedious callback code) using a variant of the
> Command pattern. For example:
>
> public class AccountsCommand implements Serializable {
>
>    enum Operation {available, selected, ,etc};
>
>    private Operation op; // best made immutable
>    private Vector accounts = new Vector();
>
>    // constructors, getters, setters, etc
>
> }
>
> You set the op and dispatch one of these to a single RPC service and
> the RPC service returns the same object that now contains the results
> e.g.
>
> public interface AccountsService extends RemoteService {
>         AccountsCommand getAccounts(AccountsCommand command);
>
> }
>
> This is particularly convenient with enums because you can use a
> switch statement in the (now) single callback to call the right
> methods client side to control the UI, e,g,
>
>   public void onSuccess(AccountsCommand command) {
>        Command.Operation operation = command.getOperation();
>        switch (operation) {
>                case available: {doSomething(command.getAccounts
> ());break;}
>                case selected: {doSomethingElse(command.getAccounts
> ());break;}
>               //etc
>         }
> ");
>
> which I think is quite neat and readable.  You can also easily add
> additional fields to AccountsCommand that might become necessary/
> desirable without altering the RPC infrastructure code at all, and
> also any useful utility methods for manipulating lists of accounts
> (sorting for example). I like this approach because I think it
> maintains a strong business focus around a group of related use cases
> at the same time as simplifying the tedious RPC infrastructure code.
>
> regards
> gregor
>
> On Dec 17, 2:17 pm, Arul  wrote:
>
>
>
> > Hi,
> >    I written two business method inside service class.
> > When I call these two methods inside client class, I have to write two
> > seperate block containing onSuccess, onFailure methods for each of the
> > business method in service class.
>
> > For Example see my service class below
> > ---­---
> > public interface AccountsService extends RemoteService {
> >         Vector getAvailbleAccounts();
> >         Vector getSelectedAccounts();}
>
> > ---­---
>
> > Please find below my implementation (client) class for above two
> > methods
> > ---­--
> > AsyncCallback callback = new AsyncCallback() {
> >     public void onFailure(Throwable caught) {
> >       System.out.println("Inside getAvailbleAccounts Error ");
>
> >     }
>
> >     public void onSuccess(Vector result) {
> >         System.out.println("Inside getAvailbleAccounts On Success ");
> >     };
> >   accountServiceSvc.getAvailbleAccounts(callback);
>
> > AsyncCallback callback1 = new AsyncCallback() {
> >     public void onFailure(Throwable caught) {
> >       System.out.println("Inside getSelectedAccounts Error ");
> >     }
>
> >     public void onSuccess(Vector result) {
> >             System.out.println("Inside getSelectedAccounts On Success
> > ");
> >     }
> >   };
> > accountServiceSvc.getSelectedAccounts(callback1);
> > ---­--
>
> > Is this the way of writting blocks for every business method in GWT
> > RPC?
>
> > Thanks
> > Arul- 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-Toolkit@googlegroups.com
To unsubscribe from this 

Re: onHistoryChange(String token) is not working.

2008-12-17 Thread Rinku

Can anybody help me to solve this bug ?

On Dec 17, 10:30 am, Rinku  wrote:
> Similar issue is reported in this thread 
> also.http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> On Dec 17, 10:18 am, Rinku  wrote:
>
> > Hi Thomas,
> > Thanks for reply.
>
> > Yes. single vs. multiple is affecting the history.
> > I am using History.back() to move on the previousHistoryToken which is
> > only working when I am uploading single file.
> > Please reply soon.
>
> > On Dec 16, 7:04 pm, Thomas Broyer  wrote:
>
> > > On 11 déc, 14:43, Rinku  wrote:
>
> > > > Hi,
> > > > I am using FileUpload Widget to upload a file.
> > > > When I am upolading more than one  files  with FileUploadWidget and
> > > > after uploading  the files  I am using History.back on a click of a
> > > > button then onHistoryChange() method is not invoking.
>
> > > See issue 
> > > 624http://code.google.com/p/google-web-toolkit/issues/detail?id=624
>
> > > > When I am uploading a single file then onHistoryChange() method is
> > > > calling.
>
> > > That sounds weird; I can't understand how single vs. multiple would
> > > affect history...
>
> > > > It is necessary for me to call History.back() method after uploading
> > > > files to display the previous view.
>
> > > Can't you rather use some other mean of communicating the previous
> > > history token and then doing a History.newItem(previousHistoryToken)?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Found bug in Gwt 1.5.3 History class

2008-12-17 Thread Rinku

Can anybody help me to solve this bug ?

On Dec 17, 11:21 am, Rinku  wrote:
> Please pay attention to this bug.
>
> The similar bug is reported in this thread 
> :-http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> On Dec 16, 3:33 pm, Rinku  wrote:
>
> > Hi,
> > I am using FileUploadWidget, when ever I am uploading more that one
> > files with file upload widget, History.back() is not working. It is
> > not calling onHistoryChanged(String token) method.
>
> > If I am using uploading one file from FileUploadWidget then
> > History.back() is working fine.
> > What is issue ?
> > Please help me to solve this bug.
>
> > Thanks,
> > Ashish Kushwaha
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to close application using GWT code

2008-12-17 Thread Arul

Hi Kevin,
  Thanks for your reply. The code is worked.

Thanks
Arul

On Dec 17, 9:02 am, "Kevin Tarn"  wrote:
> Use JSNI:
>     /**
>      * Close browser window.
>      */
>     public static native void closeBrowser()
>     /*-{
>         $wnd.close();
>     }-*/;
>
> Kevin
>
> On Wed, Dec 17, 2008 at 10:46 PM, Arul
> wrote:
>
>
>
>
>
> > Hi,
> >  I have a button called close, when selecting the button I want the
> > application gets closed instead selecting exit button either IE
> > browser or hosted browser window exit button.
>
> >  In VB, there would be function to achive this but in GWT I am unable
> > to find this?
>
> > Could anone send me the code?
>
> > Thanks
> > Arul- 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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



RPC.encode not working

2008-12-17 Thread deanhiller

I have the following code in a servlet filter

GwtSessionTimeout timeout = new GwtSessionTimeout(
"Session timed out.  You need to redirect to 
the url in getUrl
function",
url);
try {
String payload = 
RPCServletUtils.readContentAsUtf8(request, true);
RPCRequest rpcRequest = RPC.decodeRequest(payload);
payload = RPC.encodeResponseForFailure(null, timeout);

boolean gzipEncode = 
RPCServletUtils.acceptsGzipEncoding(request)
&& shouldCompressResponse(request, 
response, payload);

ServletContext servletContext = request.getSession
().getServletContext();
RPCServletUtils.writeResponse(servletContext, response, 
payload,
gzipEncode);

} catch (SerializationException e) {
throw new RuntimeException("Exception", e);
} catch (ServletException e) {
throw new RuntimeException("Exception",e);
}

The browser(firefox) says "This application is out of date, please
click the refresh button on your browser."

If I change
payload = RPC.encodeResponseForFailure(null, timeout);
to
payload = RPC.encodeResponseForFailure(rpcRequest.getMethod, timeout);

it fails with UnexpectedException like GwtSessionTimeout was not a
RuntimeException, but it is a RuntimeException so it should work and I
expect the aysncCallback.onFailure to be called, but it doesn't work.

Here is my GwtSessionTimeout
public class GwtSessionTimeout extends RuntimeException implements
IsSerializable{
}

why isn't this working?
later,
Dean



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



Re: GWTExt chart on GWT widgets

2008-12-17 Thread Rob Smith

Arthur might be able to help you.

On Dec 18, 12:08 am, Sanj  wrote:
> Hi All,
>
> I am facing a problem in rendering of GWT-EXT charts on GWT widgets in
> IE. When i am trying to render Chart panel on RootPanel then charts do
> not render properly in Hosted mode. But if i am adding same panel on
> viewPort then it's working fine.
>
> I have also updated the version of Flash i.e. Adobe 10. SO i think
> that problem is not occurring because of Flash.
>
> I am using this code for rendering the chartPanel :-
>
> public class SrisureHome extends EntryPoint {
>
>         public void onModuleLoad() {
>                 MemoryProxy proxy = new MemoryProxy(getData());
>                 RecordDef recordDef = new RecordDef(new FieldDef[] { new
> IntegerFieldDef("year"), new IntegerFieldDef("revenue"), new
> IntegerFieldDef("expense"), new IntegerFieldDef("income") });
>
>                 ArrayReader reader = new ArrayReader(recordDef);
>                 final Store store = new Store(proxy, reader);
>                 store.load();
>
>                 SeriesDefX incomeSeries = new SeriesDefX("Income", "income");
>                 incomeSeries.setType(ChartType.LINE);
>
>                 SeriesDef[] seriesDef = new SeriesDef[] {
>
>                 new SeriesDefX("Revenue", "revenue"), new 
> SeriesDefX("Expense",
> "expense"), incomeSeries };
>
>                 NumericAxis currencyAxis = new NumericAxis();
>
>                 final BarChart chart = new BarChart();
>                 chart.setTitle("Income Chart");
>                 chart.setStore(store);
>                 chart.setSeries(seriesDef);
>                 chart.setYField("year");
>                 chart.setXAxis(currencyAxis);
>                 chart.setWidth("100%");
>                 chart.setHeight("100%");
>                 RootPanel.get().add(chart);
>         }
>
>         public static Object[][] getData() {
>                 return new Object[][] { new Object[] { new Integer(2003), new 
> Integer
> (1246852), new Integer(1123359), new Integer(123493) }, new Object[]
> { new Integer(2004), new Integer(2451876), new Integer(2084952), new
> Integer(366920) }, new Object[] { new Integer(2005), new Integer
> (2917246), new Integer(2587151), new Integer(330095) }, new Object[]
> { new Integer(2006), new Integer(3318185), new Integer(3087456), new
> Integer(230729) } };
>         }
>
> }
>
> If anybody has an idea about this problem then please suggest me where
> i am wrong or how can i solve this problem.
>
> Thanks & regards,
>
> Sanj.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



lostFocus/change events and Composites

2008-12-17 Thread Dave Ford

I have an issue and I suspect others may have encountered (and solved)
this as well. It deals with change events and composite widgets. My
problem occurs when combining two tasks that individually do not
present a problem:

1.  Using change listeners (or blur listeners). All of the stock
html
form elements (input-text, input-checkbox, select and textarea)
generate change events. This is useful for field-level validation,
displaying field-level error messages and updating the "model" in an
MVC application.

2.  Creating new (composite) UI components by combining stock html
form
elements. For example, a date picker comprised of 3 html select
elements (month, year, day). Or a more sophisticated date picker
comprised of an input-text, an image button to the immediate right of
the text box (that, when clicked, shows the popup calendar) and a div
to display the popup calendar.

The problem is, change events and/or blur events don't really happen
at the "composite level".  They work at the individual form-element
level. Thus, for the date picker, where would be the logical place to
put field level change events? Because the 3 select elements represent
a single logical field.

Does this question make any since at all? If so, how have others
solved 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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWTExt chart on GWT widgets

2008-12-17 Thread Sanj

Hi All,


I am facing a problem in rendering of GWT-EXT charts on GWT widgets in
IE. When i am trying to render Chart panel on RootPanel then charts do
not render properly in Hosted mode. But if i am adding same panel on
viewPort then it's working fine.

I have also updated the version of Flash i.e. Adobe 10. SO i think
that problem is not occurring because of Flash.


I am using this code for rendering the chartPanel :-



public class SrisureHome extends EntryPoint {

public void onModuleLoad() {
MemoryProxy proxy = new MemoryProxy(getData());
RecordDef recordDef = new RecordDef(new FieldDef[] { new
IntegerFieldDef("year"), new IntegerFieldDef("revenue"), new
IntegerFieldDef("expense"), new IntegerFieldDef("income") });

ArrayReader reader = new ArrayReader(recordDef);
final Store store = new Store(proxy, reader);
store.load();

SeriesDefX incomeSeries = new SeriesDefX("Income", "income");
incomeSeries.setType(ChartType.LINE);

SeriesDef[] seriesDef = new SeriesDef[] {

new SeriesDefX("Revenue", "revenue"), new SeriesDefX("Expense",
"expense"), incomeSeries };

NumericAxis currencyAxis = new NumericAxis();

final BarChart chart = new BarChart();
chart.setTitle("Income Chart");
chart.setStore(store);
chart.setSeries(seriesDef);
chart.setYField("year");
chart.setXAxis(currencyAxis);
chart.setWidth("100%");
chart.setHeight("100%");
RootPanel.get().add(chart);
}

public static Object[][] getData() {
return new Object[][] { new Object[] { new Integer(2003), new 
Integer
(1246852), new Integer(1123359), new Integer(123493) }, new Object[]
{ new Integer(2004), new Integer(2451876), new Integer(2084952), new
Integer(366920) }, new Object[] { new Integer(2005), new Integer
(2917246), new Integer(2587151), new Integer(330095) }, new Object[]
{ new Integer(2006), new Integer(3318185), new Integer(3087456), new
Integer(230729) } };
}
}


If anybody has an idea about this problem then please suggest me where
i am wrong or how can i solve this problem.


Thanks & regards,

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



Re: Editable Grid using GWT ?

2008-12-17 Thread Haz

Hi Arthur,

 I appreciate your help. I will definitely try the
editable grid & the gwt dnd project. Mean while do you want to take a
look at my immature piece of code where i have tried to implement a
drag & drop that didn't work as expected ? (The draggable object is
moving in the correct direction but not synchronized with the mouse
cursor)

Well the code snippet is ,

"
public class DragListener implements MouseListener{

private boolean blnFlag = false;
private Widget w;
private int x,y;

public DragListener(Widget w){
this.w = w;
DOM.setStyleAttribute(w.getElement(),"position","absolute"); // 
Let
the object float
}

public void onMouseDown(Widget sender, int x, int y) {
DOM.setCapture(w.getElement()); // Will capture mouse events
blnFlag = true;
this.x = x - w.getAbsoluteLeft(); // The offset of cursor 
inside the
object area
this.y = y - w.getAbsoluteTop();
}

public void onMouseEnter(Widget sender) {
}

public void onMouseLeave(Widget sender) {
}

public void onMouseMove(Widget sender, int x, int y) {
if(blnFlag == true){
DOM.setIntStyleAttribute(w.getElement(), "left", x - this.x); //
move object
DOM.setIntStyleAttribute(w.getElement(), "top", y - this.y);
}
}

public void onMouseUp(Widget sender, int x, int y) {
if(blnFlag == true){
blnFlag=false;
DOM.releaseCapture(w.getElement());
DOM.setIntStyleAttribute(sender.getElement(), "left", x - 
this.x);
DOM.setIntStyleAttribute(sender.getElement(), "top", y - 
this.y);
}
}

}

Thanks,
Hazem


On Dec 17, 6:57 pm, "Arthur Kalmenson"  wrote:
> For an editable grid, take a look at the 
> PagingScrollTable:http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=go...
>
> Drag and drop capabilities can be done with the gwt-dnd 
> project:http://code.google.com/p/gwt-dnd/. I haven't tried it myself.
>
> --
> Arthur Kalmenson
>
> On Wed, Dec 17, 2008 at 12:48 AM, Haz  wrote:
>
> > I am trying to build an editable grid for a spreadsheet application.
> > Can anyone suggest me a grid already available that serves my purpose
> > (the grid should be resizable, editable, multiselectable, scrollable).
>
> > If a good one is not available, i don't mind building one but do you
> > guys know of any in-depth GWT tutorial that would help me build custom
> > widgets with drag & drop capabilities.
>
> > Many Thanks,
> > Hazem
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to forward in GWT?

2008-12-17 Thread crnlm.cn



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



Sending Hibernate JPA persistent entities to the client

2008-12-17 Thread Smith

All,

With GWT 1.5, is it possible to send the persistent hibernate entities
directly to the client, without creating  separate client side
objects? I know it's not a good pattern, but just curious if that
would work.

I have read this didn't work with GWT 1.4 since annotations were not
supported, but since GWT 1.5 supports annotations, this should be
possible, right?


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



Re: GWT RIA s ?

2008-12-17 Thread Rob Smith

Did anyone ask you opinion on use of third part libs in this thread.
We know what your position is on using 3rd party libs and you have
made it clear "numerous" times. Repeating the same thing again and
again is just adding noise to this group. Gmail has a wonderful filter
option and you can set yours to ignore any thread that mentions any
lib that you don't care about :)


On Dec 17, 3:34 pm, "Arthur Kalmenson"  wrote:
> I'm hoping that a lot of those things will be added to the incubator
> in the near future. I've mentioned the request for simpler security
> similar to Spring Security's @Secured("ROLE_USER") annotations. Data
> binding and validation frameworks are on their way as well, in the
> near future.
>
> I would stay away from ExtGWT or SmartGWT though.
>
> --
> Arthur Kalmenson
>
> On Wed, Dec 17, 2008 at 9:54 AM, mikedshaf...@gmail.com
>
>  wrote:
>
> > This does bring up a good point and something that is sourly missing.
> > We have cobbled together some very generic type stuff patterned
> > (albeit very low in quality) what we used extensively in Eclipse Rich
> > Client.  Maybe the ExtGWT guys or SmartGWT will come up with
> > something.  Or if the Eclipse Web Client guys would do GWT  Or if
> > I could find a spare moment or two, I'd take it on.  The whole UI
> > framework beyond "widgets", like editors, views, menus, actions etc.
> > is a sweet spot to be sure that is missing from any of the web
> > frameworks, IMHO.
>
> > On Dec 17, 6:54 am, "Arthur Kalmenson"  wrote:
> >> There are some things in the incubator for status bars and logging.
> >> The rest you would have to do yourself.
>
> >> --
> >> Arthur Kalmenson
>
> >> On Wed, Dec 17, 2008 at 2:17 AM, Riyaz Mansoor  
> >> wrote:
>
> >> > I'm not looking for rich widget sets (Ext, Smart, etc) but rather is
> >> > there a GWT framework that provides basics for a RIA. One that handles
> >> > the grunt work such as providing; status bar, xml or other
> >> > configurable menu, error logging report, authentication, security etc
>
> >> > This maybe reaching for the sky but kinda like what Eclipse or
> >> > Netbeans provides as the core platform when developing on those
> >> > platforms.- 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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RIA s ?

2008-12-17 Thread cloudycity

Not on topic for this thread but Curious about why you would not use
ExtGWT or SmartGWT.  We started using gwt-ext 8 months ago and are
wanting to phase it out - buggy and poor performance are the primary
reasons.

On Dec 17, 12:34 pm, "Arthur Kalmenson"  wrote:
> I'm hoping that a lot of those things will be added to the incubator
> in the near future. I've mentioned the request for simpler security
> similar to Spring Security's @Secured("ROLE_USER") annotations. Data
> binding and validation frameworks are on their way as well, in the
> near future.
>
> I would stay away from ExtGWT or SmartGWT though.
>
> --
> Arthur Kalmenson
>
> On Wed, Dec 17, 2008 at 9:54 AM, mikedshaf...@gmail.com
>
>  wrote:
>
> > This does bring up a good point and something that is sourly missing.
> > We have cobbled together some very generic type stuff patterned
> > (albeit very low in quality) what we used extensively in Eclipse Rich
> > Client.  Maybe the ExtGWT guys or SmartGWT will come up with
> > something.  Or if the Eclipse Web Client guys would do GWT  Or if
> > I could find a spare moment or two, I'd take it on.  The whole UI
> > framework beyond "widgets", like editors, views, menus, actions etc.
> > is a sweet spot to be sure that is missing from any of the web
> > frameworks, IMHO.
>
> > On Dec 17, 6:54 am, "Arthur Kalmenson"  wrote:
> >> There are some things in the incubator for status bars and logging.
> >> The rest you would have to do yourself.
>
> >> --
> >> Arthur Kalmenson
>
> >> On Wed, Dec 17, 2008 at 2:17 AM, Riyaz Mansoor  
> >> wrote:
>
> >> > I'm not looking for rich widget sets (Ext, Smart, etc) but rather is
> >> > there a GWT framework that provides basics for a RIA. One that handles
> >> > the grunt work such as providing; status bar, xml or other
> >> > configurable menu, error logging report, authentication, security etc
>
> >> > This maybe reaching for the sky but kinda like what Eclipse or
> >> > Netbeans provides as the core platform when developing on those
> >> > platforms.- 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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT for Social Networking Site (GWT and CMS)

2008-12-17 Thread HommeDeJava

Greetings,

You should definetely look at OpenSocial and the Shindig server
implementation (http://incubator.apache.org/shindig/).  Shindig
directly offers REST and RPC APIs and gateways to outside CMS in Java
and PHP.

On the frontend side, GWT offers almost all the « gadgetries » you
could need and will pretty soon become an OpenSocial gadgets factory.

Hope this can help you



On 17 déc, 10:49, Paranoid Android  wrote:
> Hello. I'm working on a project aimed at developing a core platform
> for building a social network website.
> This platform should be extendible and should include technologies
> like Foaf, XFN, OpenID, Reccomendation Algorithms, maybe OpenSocial
> etc...
> The front-end should be built using GWT.
> Now my question is?
>
> How can I integrate the GWT front-end with a Java CMS System to build
> up my platform? What kind of architecture should I adopt?
>
> I know this question is quite general but I can't understand if there
> is a clean way to use a GWT front-end with an existing and open source
> CMS, or if I have to use PHP or to build all the platform from
> scratch?
>
> Thank you very much for any advice or reference!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RIA s ?

2008-12-17 Thread Arthur Kalmenson

I'm hoping that a lot of those things will be added to the incubator
in the near future. I've mentioned the request for simpler security
similar to Spring Security's @Secured("ROLE_USER") annotations. Data
binding and validation frameworks are on their way as well, in the
near future.

I would stay away from ExtGWT or SmartGWT though.

--
Arthur Kalmenson



On Wed, Dec 17, 2008 at 9:54 AM, mikedshaf...@gmail.com
 wrote:
>
> This does bring up a good point and something that is sourly missing.
> We have cobbled together some very generic type stuff patterned
> (albeit very low in quality) what we used extensively in Eclipse Rich
> Client.  Maybe the ExtGWT guys or SmartGWT will come up with
> something.  Or if the Eclipse Web Client guys would do GWT  Or if
> I could find a spare moment or two, I'd take it on.  The whole UI
> framework beyond "widgets", like editors, views, menus, actions etc.
> is a sweet spot to be sure that is missing from any of the web
> frameworks, IMHO.
>
> On Dec 17, 6:54 am, "Arthur Kalmenson"  wrote:
>> There are some things in the incubator for status bars and logging.
>> The rest you would have to do yourself.
>>
>> --
>> Arthur Kalmenson
>>
>>
>>
>> On Wed, Dec 17, 2008 at 2:17 AM, Riyaz Mansoor  
>> wrote:
>>
>> > I'm not looking for rich widget sets (Ext, Smart, etc) but rather is
>> > there a GWT framework that provides basics for a RIA. One that handles
>> > the grunt work such as providing; status bar, xml or other
>> > configurable menu, error logging report, authentication, security etc
>>
>> > This maybe reaching for the sky but kinda like what Eclipse or
>> > Netbeans provides as the core platform when developing on those
>> > platforms.- 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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Reading POST parameters on GWT app

2008-12-17 Thread Croc

Great , Thanks a lot!

On Dec 17, 9:48 pm, "olivier FRESSE"  wrote:
> The client side of GWT won't help you.
> The server side is the GWT RPC mechanism, and it won't help you a lot too.
> It depends  of the server technology.
> If you're in a java world, best would be to rely on a servlet. They are
> indeed made to manage such things  :-)
>
> you would have something like that, with a "ManagePostServlet" :
>
> 1 : the submit :
>
>    action="http://localhost:/servlet/ManagePostServlet
> ">
>       User Name 
>        
> 
>
> 2 : Handling the Post data
>
>  public void  doPost ( HttpServletRequest  req, HttpServletResponse  res )
>
>         throws ServletException, IOException {
>
> ..
>
>     // Get the parameter.
>    // store it in a context, or do what you want with it :-)
>
>         req.getParameter("prefered");
> ..
>
> 3: Redirect/Forward to a GWT page
>
> Once you've retrieved the post data, you can go to GWT page.
> Do a forward or a redirect (it depends of what your pages do... 
> seehttp://www.javapractices.com/topic/TopicAction.do?Id=181)
>
> The servlet can store data in the session for example.
>
> Once you've reached a GWT page, you can use a classical GWT service
> (which is a servlet in fact...) to retrieve these data.
>
> 008/12/17 Yair Ohayon 
>
> > Great , that's exactly what i want to do.
> > How do i parse that parameters on the server ?
> > Maybe this example will clearify what i am searching for
> > some web site
> > ...
> >       http://localhost:/com.startup.strhandle/strhandle.html";>
> >       User Name 
> >        
> >  ...
> > Action is my gwt app ,
> > After submitting , the browser display the strhandle.html and i want to
> > access the post params , in this example param "prefered".
>
> > Is this impossible too ?
>
> > On Wed, Dec 17, 2008 at 9:19 PM, Jason Essington <
> > jason.essing...@gmail.com> wrote:
>
> >> Correct, you cannot read the post parameters from the client, as they
> >> don't really exist.
>
> >> An HTTP post supplies the post parameters as the content of the
> >> request (server) and they are no longer available when the response is
> >> returned (client)
>
> >> you would have to parse the parameters on the server, and somehow
> >> embed them in your response.
>
> >> -jason
>
> >> On Dec 17, 2008, at 12:12 PM, Croc wrote:
>
> >> > Someone please...?
>
> >> > On Dec 16, 10:40 pm, Croc  wrote:
> >> >> Hi All,
> >> >> I am new to gwt and didn't find how to read post paramters in GWT
> >> >> App.
> >> >> meaning that i have an html page with uses some input fields (pure
> >> >> html 0 no java script) and this html is redirecting to my gwt app , i
> >> >> need to read those paramters on the GWT app  and respond.
>
> >> >> I can readt the GET params by using
> >> >>  Window.Location.getParameterMap();
>
> >> >> but i can't seem to find a way to read POST .
> >> >> tries dictionary - but the html is with no scripts so it won't help
> >> >> me.
> >> >>  anyone please?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: "static method wrap(Element) conflicts" compiler error. Why?

2008-12-17 Thread John Gunther

Sorry missed your reply until now. Such an error message as you
suggest would have made it a lot easier, in my case, to track down
what the problem was.

Part of the issue is that 1.4 compliance does not fail in every case,
so I had been working along for a while with GWT 1.5 and 1.4
compliance without any error (in a project migrated from GWT 1.4)
which made it harder to recognize the cause when I eventually hit a
combination that did not work. My first thought was of some typo that
produced the above obscure Java syntax error which I didn't recognize--
not the compliance thing.

John

On Nov 11, 11:09 am, Jason Essington 
wrote:
> Well in general the code is probably filled with syntax errors when
> using the Java 1.4 compiler ...
>
> And since GWT 1.5.x is not compatible with the Java 1.4 compiler I
> would consider this a non issue.
> Since GWT 1.5 is not compatible with Java 1.4 I would not expect it to
> work and the messages themselves are not particularly relevant at that
> point.
>
> I suppose it would be nice if the gwtCompiler would fail fast if you
> attempted to compile with an unsupported version of Java and display a
> nice message in the lines of:
> "GWT 1.5.x requires Java 1.5 or better. Compile failed!"
>
> -jason
>
> On Nov 10, 2008, at 8:26 PM, John Gunther wrote:
>
>
>
> > Using GWT 1.5.2, and starting with this class:
>
> > public class NamedHTML extends HTML implements HasName {
> >public String getName() {return null;}
> >public void setName(String name) {}
> > }
>
> > If I compile the above class in Eclipse with Project, Properties, Java
> > Compiler, "Compiler compliance level: 1.4", then Eclipse produces this
> > perplexing error message on the first line:
>
> > X The static method wrap(Element) conflicts with the abstract method
> > in HTML
>
> > The error goes away if make any one of these changes:
>
> > 1) Switch to "Compiler compliance level: 5.0",
> > 2) Eliminate the "implements HasName"
> > 3) Replace "extends HTML" with  "extends Label"
>
> > I understand that, in general, I need to use compiler compliance
> > level 5.0 with GWT 1.5.2 (because GWT 1.5.2 uses 5.0 syntax) but
> > I don't understand why the compiler thinks I've got a syntax
> > error with the original situation, but thinks my code is OK in
> > cases 2) and 3).
>
> > John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Reading POST parameters on GWT app

2008-12-17 Thread olivier FRESSE
The client side of GWT won't help you.
The server side is the GWT RPC mechanism, and it won't help you a lot too.
It depends  of the server technology.
If you're in a java world, best would be to rely on a servlet. They are
indeed made to manage such things  :-)

you would have something like that, with a "ManagePostServlet" :

1 : the submit :

  http://localhost:/servlet/ManagePostServlet
">
  User Name 
   



2 : Handling the Post data


 public void  doPost ( HttpServletRequest  req, HttpServletResponse  res )

throws ServletException, IOException {

..

// Get the parameter.
   // store it in a context, or do what you want with it :-)

req.getParameter("prefered");
..

3: Redirect/Forward to a GWT page

Once you've retrieved the post data, you can go to GWT page.
Do a forward or a redirect (it depends of what your pages do... see
http://www.javapractices.com/topic/TopicAction.do?Id=181 )

The servlet can store data in the session for example.

Once you've reached a GWT page, you can use a classical GWT service
(which is a servlet in fact...) to retrieve these data.



008/12/17 Yair Ohayon 

> Great , that's exactly what i want to do.
> How do i parse that parameters on the server ?
> Maybe this example will clearify what i am searching for
> some web site
> ...
>   http://localhost:/com.startup.strhandle/strhandle.html";>
>   User Name 
>
>  ...
> Action is my gwt app ,
> After submitting , the browser display the strhandle.html and i want to
> access the post params , in this example param "prefered".
>
> Is this impossible too ?
>
>
>
>
>
> On Wed, Dec 17, 2008 at 9:19 PM, Jason Essington <
> jason.essing...@gmail.com> wrote:
>
>>
>> Correct, you cannot read the post parameters from the client, as they
>> don't really exist.
>>
>> An HTTP post supplies the post parameters as the content of the
>> request (server) and they are no longer available when the response is
>> returned (client)
>>
>> you would have to parse the parameters on the server, and somehow
>> embed them in your response.
>>
>> -jason
>>
>> On Dec 17, 2008, at 12:12 PM, Croc wrote:
>>
>> >
>> > Someone please...?
>> >
>> >
>> > On Dec 16, 10:40 pm, Croc  wrote:
>> >> Hi All,
>> >> I am new to gwt and didn't find how to read post paramters in GWT
>> >> App.
>> >> meaning that i have an html page with uses some input fields (pure
>> >> html 0 no java script) and this html is redirecting to my gwt app , i
>> >> need to read those paramters on the GWT app  and respond.
>> >>
>> >> I can readt the GET params by using
>> >>  Window.Location.getParameterMap();
>> >>
>> >> but i can't seem to find a way to read POST .
>> >> tries dictionary - but the html is with no scripts so it won't help
>> >> me.
>> >>  anyone please?
>> > >
>>
>>
>>
>>
>
> >
>

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



Re: GWTCanvas, TabPanels, Internet Explorer

2008-12-17 Thread sloughran

It looks like Tab Panels + Canvas is a known bug. It's actually
surprising you didn't get an Exception:

http://code.google.com/p/gwt-canvas/issues/detail?id=4

I didn't even know this library existed, this is absolutely awesome. I
made an interactive rectangle program in minutes!

On Dec 17, 8:09 am, soundseeker  wrote:
> hello,
>
> canvas in tab panels seem not to work correctly in IE 7, in firefox 3
> do.
> after klicking on a tab in ie my canvas object is visible for a moment
> then it disappears.
> it works correctly in firefox.
>
> the code:
>         ProjectCanvas pc = new ProjectCanvas();
>         GWTCanvas gwtc = pc.getProjectCanvas(table);
>         tabPanel.add(gwtc,  panel);
>
> is it a bug or my fault?
>
> thanks in advance,
> robert
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Reading POST parameters on GWT app

2008-12-17 Thread Yair Ohayon
Great , that's exactly what i want to do.
How do i parse that parameters on the server ?
Maybe this example will clearify what i am searching for
some web site
...
  http://localhost:/com.startup.strhandle/strhandle.html";>
  User Name 
   
 ...
Action is my gwt app ,
After submitting , the browser display the strhandle.html and i want to
access the post params , in this example param "prefered".

Is this impossible too ?




On Wed, Dec 17, 2008 at 9:19 PM, Jason Essington
wrote:

>
> Correct, you cannot read the post parameters from the client, as they
> don't really exist.
>
> An HTTP post supplies the post parameters as the content of the
> request (server) and they are no longer available when the response is
> returned (client)
>
> you would have to parse the parameters on the server, and somehow
> embed them in your response.
>
> -jason
>
> On Dec 17, 2008, at 12:12 PM, Croc wrote:
>
> >
> > Someone please...?
> >
> >
> > On Dec 16, 10:40 pm, Croc  wrote:
> >> Hi All,
> >> I am new to gwt and didn't find how to read post paramters in GWT
> >> App.
> >> meaning that i have an html page with uses some input fields (pure
> >> html 0 no java script) and this html is redirecting to my gwt app , i
> >> need to read those paramters on the GWT app  and respond.
> >>
> >> I can readt the GET params by using
> >>  Window.Location.getParameterMap();
> >>
> >> but i can't seem to find a way to read POST .
> >> tries dictionary - but the html is with no scripts so it won't help
> >> me.
> >>  anyone please?
> > >
>
>
> >
>

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



Re: Reading POST parameters on GWT app

2008-12-17 Thread Jason Essington

Correct, you cannot read the post parameters from the client, as they  
don't really exist.

An HTTP post supplies the post parameters as the content of the  
request (server) and they are no longer available when the response is  
returned (client)

you would have to parse the parameters on the server, and somehow  
embed them in your response.

-jason

On Dec 17, 2008, at 12:12 PM, Croc wrote:

>
> Someone please...?
>
>
> On Dec 16, 10:40 pm, Croc  wrote:
>> Hi All,
>> I am new to gwt and didn't find how to read post paramters in GWT  
>> App.
>> meaning that i have an html page with uses some input fields (pure
>> html 0 no java script) and this html is redirecting to my gwt app , i
>> need to read those paramters on the GWT app  and respond.
>>
>> I can readt the GET params by using
>>  Window.Location.getParameterMap();
>>
>> but i can't seem to find a way to read POST .
>> tries dictionary - but the html is with no scripts so it won't help
>> me.
>>  anyone please?
> >


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



Re: Reading POST parameters on GWT app

2008-12-17 Thread Croc

Someone please...?


On Dec 16, 10:40 pm, Croc  wrote:
> Hi All,
> I am new to gwt and didn't find how to read post paramters in GWT App.
> meaning that i have an html page with uses some input fields (pure
> html 0 no java script) and this html is redirecting to my gwt app , i
> need to read those paramters on the GWT app  and respond.
>
> I can readt the GET params by using
>  Window.Location.getParameterMap();
>
> but i can't seem to find a way to read POST .
> tries dictionary - but the html is with no scripts so it won't help
> me.
>  anyone please?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Client-side JSON Serialization?

2008-12-17 Thread Clint Gilbert

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Thanks very much, I'll take a look at wgtjsonrpc.

My app needs to serialize a non-trival map of data: String => Date-range class 
=> other
user-defined type => data POJO, currently.  I'm familiar with Overlay types, 
and somewhat
familiar with JSNI, so I think I could write a class that wraps a 
JavaScriptObject and
uses that handle as the backing map.  Then I could just serialize the wrapped 
JSO.  But
then I'd lose some useful features of a Java Map, like being able to use 
non-primitive
types for keys, nice methods like keySet(), etc, no?

Shawn Pearce wrote:
> Roll your own, or look at gwtjsonrpc:
> 
>   
> http://android.git.kernel.org/?p=tools/gwtjsonrpc.git;a=blob;f=README;hb=HEAD
> 
> You can also look at JSNI and the JavaScriptObject subclassing tricks in the 
> GWT documentation (under JavaScript Integration) to build Java objects that 
> are more directly JavaScript entities, and thus more easily serialized with 
> JavaScript JSON libraries.
> 
> On Tue, Dec 16, 2008 at 18:34, 
> clint.gilb...@childrens.harvard.edu
>  
> mailto:clint.gilb...@childrens.harvard.edu>>
>  wrote:
> 
> I'm sorry if this has already been answered, but after searching a bit
> I didn't come up with any answers.  Does anyone know of a way to
> serialize objects to JSON on the client side?  Ideally, it would work
> similarly to the json2.js lib from json.org that I was using 
> prior to
> moving to the GWT, but anything relatively straightforward that
> performs well is fine with me.
> 
> I tried wrapping the json2.js lib in a native method that calls
> $wnd.JSON.stringify():
> 
> public abstract class JSONSerializer
> {
>public static final native String serialize(final Object object)/*-
> {
>return $wnd.JSON.stringify(object);
>}-*/;
> }
> 
> but it pins my CPU and runs for several minutes when serializing
> anything but a trivial object.  The problem seemed to be the verbosity
> (completeness?) of the object when marshalled across the Java-
> toJavascript boundary by the GWT.  I'd also like to control the
> mapping of Java properties to JSON ones.
> 
> Surely there's a better way?  Or will I have to roll my own?
> 
> 
> 
> 
> > 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJSU+ErZoE3ArapxERCFm6AKCBhbEn83de4ivjGGgBAagpEAFGaQCeIDJL
3xJzW9oU0UXdC9WuiFUbm3M=
=/zOi
-END PGP SIGNATURE-


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



Images using ImageBundle are only correct using IE

2008-12-17 Thread dhoffer

We have a single ImageBundle that works fine in Hosted mode (Windows)
and the images display correctly when the app runs in IE however all
the images are cropped incorrectly when run with Firefox & Chrome.
The incorrect images show the full image plus the left portion of the
image next to it on the right side.

I am using the GWT annotations method to specify image file names
(@ImageBundle.Resource()).

Why would ImageBundle not work correctly with all browsers?

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



Re: Dollar sign in filename

2008-12-17 Thread jchimene

Hi,

As I indicated earlier, it's not clear to me that these files are
automatically created by the compiler (although the file in question
may have been generated initially by i18nCreator)

> The file name & contents are part of the rich text toolbar implementation in 
> the GWT showcase.
> I don't think the file name is automatically generated by the compiler, as 
> the contents are
> human-created per the Constants support in GWT.

The file in question is a .properties file. The Showcase source for
the RichTextToolbar sample declares the class "Strings" which is
automagically transformed into a reference to the properties file
"RichTextToolbar$Strings". It looks like the i18nCreator toolkit
script is somehow implicated in this. I'm simply trying to find a
reference to this naming feature.

On Dec 17, 8:15 am, rakesh wagh  wrote:
> those files are automatically generated by the compiler. They are
> typically inner classes. What is your concern by the way?
>
> On Dec 16, 5:55 pm, jchimene  wrote:
>
> > Hi,
>
> > Would someone please post a link to the documentation for the
> > filenaming convention that allows for names like: "RichTextToolbar
> > $Strings.properties"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT application performance

2008-12-17 Thread DaBlick

Doesn't help right NOW but...

It may help in the future when you can dynamically/selective load
individual modules (or panels).

These features are seemingly going to be in the next release.

On Dec 15, 9:18 pm, banty_shaily  wrote:
> Hi,
>
> Does creating more modules helps in improving performance of
> application built in GWT?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: UI alignment collapses with GChart

2008-12-17 Thread John Gunther

By default, Client-side GChart's axis min/max are data determined,
which I believe is what is causing the "collapsing with no data" that
you mentioned.

To stop that, explicitly set axis min/max via the setAxisMax and
setAxisMin methods, as described here:

http://gchart.googlecode.com/svn/trunk/doc/com/googlecode/gchart/client/GChart.Axis.html#setAxisMax%28double%29

HTML **CAN** be used in axis labels (via the addTick method) and point
labels (via the setAnnotationText method).  But there is a trick to
it: the strings you pass in must be prefixed with "" as
described here:

http://gchart.googlecode.com/svn/trunk/doc/com/googlecode/gchart/client/GChart.Curve.Point.html#setAnnotationText%28java.lang.String,%20int,%20int%29

The two packages for generating a single image file chart I most often
hear mentioned are jFreeChart and the Google Chart API. Based on this
forum, lots of GWTers use both. There are also quite a few Google
Chart API wrappers; charts4j (formerly called gchartjava) might
interest you as it gives the Google Chart API a Java API:

http://code.google.com/p/charts4j/

But I hope you'll also give Client-side GChart another look in light
of the above info (a new release 2.4, that provides significantly
better hover feedback is in the works).

HTH,

John C. Gunther
http://gchart.googlecode.com


On Dec 16, 2:17 am, ArunDhaJ  wrote:
> Hi All,
> I'm using GChart for my application. Its UI collapses when there is no
> points to draw.
>
> Is there any charting component which gives me a single image file for
> the chart ??? Since the points lable is plain text I'm not able to
> format the position of labels. Like, the X-axis label should be
> horizontal instead of veritical.
>
> Please let me know any charting component, if available
>
> Thanks in Advance
> ArunDhaJwww.arundhaj.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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Width of widgets added in Grid

2008-12-17 Thread gregor

Look up HTMLTable.ColumnFormatter (Grid's superclass) in javadoc - you
should be able to do what you need with that.

On Dec 17, 3:52 pm, hezjing  wrote:
> Hi
>
> I have the following code to display input field for username and password:
>
>         Label usernameLabel = new Label("Username");
>         Label passwordLabel = new Label("Password");
>         username = new TextBox();
>         password = new PasswordTextBox();
>         Grid grid = new Grid(2, 2);
>         grid.setWidget(0, 0, usernameLabel);
>         grid.setWidget(1, 0, passwordLabel);
>         grid.setWidget(0, 1, username);
>         // the width of password is somewhat shorter than username
>         grid.setWidget(1, 1, password);
>
> When tested in GWT 1.5.3 hosted mode, the width of the password is smaller
> than the width of username.
> I'm expecting the width of the widgets in the same column are the same, yes?
>
> I tried password.setWidth("100%"), but it doesn't change the width too!
> How to make the width of username and password the same?
>
> --
>
> Hez
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Multiple modules with different versions in the same app?

2008-12-17 Thread Iure Guimarães
I have a module in gwt 1.4.6 and I want to put another one in the same app.
The problem is, this another one is in gwt 1.5.2... is this possible?

-- 
"If you live each day as if it was your last, someday you'll most certainly
be right."

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



GWT for Social Networking Site (GWT and CMS)

2008-12-17 Thread Paranoid Android

Hello. I'm working on a project aimed at developing a core platform
for building a social network website.
This platform should be extendible and should include technologies
like Foaf, XFN, OpenID, Reccomendation Algorithms, maybe OpenSocial
etc...
The front-end should be built using GWT.
Now my question is?

How can I integrate the GWT front-end with a Java CMS System to build
up my platform? What kind of architecture should I adopt?

I know this question is quite general but I can't understand if there
is a clean way to use a GWT front-end with an existing and open source
CMS, or if I have to use PHP or to build all the platform from
scratch?

Thank you very much for any advice or reference!

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



Creating a GWT Application from Scratch (with Eclipse)

2008-12-17 Thread jve

Hello,

I'm trying to create a GWT Application from scratch (with Eclipse)
like
described in http://code.google.com/webtoolkit/gettingstarted.html.

But I got the following Exception:

[...@rhel4-1 MyProject]$ projectCreator -eclipse MyProject
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/
gwt/user/tools/ProjectCreator
Caused by: java.lang.ClassNotFoundException:
com.google.gwt.user.tools.ProjectCreator
   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
276)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
319)

My GWT 1.5 installation:

[r...@rhel4-1 gwt-linux-1.5.3]# ll
total 17900
-rw-r--r--  1 root root2939 Oct 17 01:30 about.html
-rw-r--r--  1 root root 992 Oct 17 01:30 about.txt
-rwxr-xr-x  1 root root 141 Jul 19 02:32 applicationCreator
-rwxr-xr-x  1 root root 276 Jul 19 02:32 benchmarkViewer
-rw-r--r--  1 root root   12463 Oct 17 01:30 COPYING
-rw-r--r--  1 root root   15589 Oct 17 01:30 COPYING.html
drwxr-xr-x  4 root root4096 Oct 17 01:23 doc
-rw-r--r--  1 root root 3558084 Oct 17 02:51 gwt-benchmark-viewer.jar
-rw-r--r--  1 root root 9970578 Oct 17 01:40 gwt-dev-linux.jar
-rw-r--r--  1 root root5569 Oct 17 01:30 gwt-module.dtd
-rw-r--r--  1 root root  719260 Oct 17 01:23 gwt-servlet.jar
-rw-r--r--  1 root root 3012848 Oct 17 01:31 gwt-user.jar
-rwxr-xr-x  1 root root 134 Jul 19 02:32 i18nCreator
-rw-r--r--  1 root root5980 Oct 17 01:30 index.html
-rwxr-xr-x  1 root root 136 Jul 19 02:32 junitCreator
-rw-r--r--  1 root root   54808 Oct 17 01:23 libgwt-ll.so
-rw-r--r--  1 root root  160024 Feb 26  2008 libswt-gtk-3235.so
-rw-r--r--  1 root root   20156 Feb 26  2008 libswt-mozilla17-profile-
gcc3-gtk-3235.so
-rw-r--r--  1 root root   20020 Feb 26  2008 libswt-mozilla17-profile-
gtk-3235.so
-rw-r--r--  1 root root   78560 Feb 26  2008 libswt-mozilla-gcc3-
gtk-3235.so
-rw-r--r--  1 root root   78244 Feb 26  2008 libswt-mozilla-
gtk-3235.so
-rw-r--r--  1 root root  309428 Feb 26  2008 libswt-pi-gtk-3235.so
drwxr-xr-x  8 root root4096 Jun 19  2007 mozilla-1.7.12
-rw-r--r--  1 root root1713 Jul 19 02:32 mozilla-hosted-
browser.conf
-rwxr-xr-x  1 root root 137 Dec 17 14:20 projectCreator
-rw-r--r--  1 root root   62193 Oct 17 01:30 release_notes.html
drwxr-xr-x  9 root root4096 Oct 17 01:29 samples

Can somebody give me some help, please?

Best Regards,

Johan Vermeire
Belgium

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



IE6 Incompatibility

2008-12-17 Thread Mila

Is anyone aware of incompatibilities of google web tool with ie6 or
ie7?

if there is any are there workarounds?

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



GWTCanvas, TabPanels, Internet Explorer

2008-12-17 Thread soundseeker

hello,

canvas in tab panels seem not to work correctly in IE 7, in firefox 3
do.
after klicking on a tab in ie my canvas object is visible for a moment
then it disappears.
it works correctly in firefox.

the code:
ProjectCanvas pc = new ProjectCanvas();
GWTCanvas gwtc = pc.getProjectCanvas(table);
tabPanel.add(gwtc,  panel);

is it a bug or my fault?

thanks in advance,
robert

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



Re: Multiple Json requests problem in parsing

2008-12-17 Thread wouter

Do you use the same RequestCallback object for all requests ? That
would explain your problem, responses arrive in a random order and
your callback has no way of knowing what response it's handling. If
I'm right, perhaps try using a specific callback per request.

On Dec 17, 12:25 pm, jake H  wrote:
> so is there any solution about asynchronous communication?
> should i work with deadlocks?

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



RE: Client-side JSON Serialization?

2008-12-17 Thread Gilbert, Clint

We're making an app that visualizes data in a number of ways.  Data sets can be 
uploaded to and downloaded from the server, as well as merged, subtracted, etc. 
 All the data manipulation happens on the client; the client should be able to 
store users' data sets on the server after they've been manipulated locally.  
In the past, we just serialized the client-side data set as JSON and sent it to 
the server for storage. 

In the previous version of our app, we used raw Javascript (and jQuery) on the 
client.  We hit a complexity threshold where new features were taking too much 
time, and decided to port to GWT.  In general, our productivity has improved a 
lot (we're old Java hands, and Java offers more language features for managing 
complexity than JS), but this is the last big missing piece.

Another thing I should mention is that we're using Google App Engine as the 
backend, so we can't use GWT's built-in RPC services.  (If we were starting 
from scratch, we would consider them seriously.)  Using GAE has other 
implications.  Due to GAE's fairly tight CPU quotas, we are more or less 
required to do the data set manipulation on the client.  If we had more 
server-side resources, we might be able do all the data set manipulation on the 
server and have the client retrieve read-only copies serialized as JSON for 
display.

Thanks for your interest.

From: Google-Web-Toolkit@googlegroups.com [google-web-tool...@googlegroups.com] 
On Behalf Of mikedshaf...@gmail.com [mikedshaf...@gmail.com]
Sent: Wednesday, December 17, 2008 8:15 AM
To: Google Web Toolkit
Subject: Re: Client-side JSON Serialization?

I haven't done anything non-trivial in JSON & GWT, but what are you
looking to do that you can't do natively with GWT?  Like on these
examples:

http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=GettingStartedJSON

I'm trying to figure out your use case and what you can't do with GWT
that you'd need json2.js or something like it.  Just wondering most of
all.

Later,

Shaffer


On Dec 16, 11:24 pm, Shawn Pearce  wrote:
> Roll your own, or look at gwtjsonrpc:
>
> http://android.git.kernel.org/?p=tools/gwtjsonrpc.git;a=blob;f=README...
>
> You can also look at JSNI and the JavaScriptObject subclassing tricks in the
> GWT documentation (under JavaScript Integration) to build Java objects that
> are more directly JavaScript entities, and thus more easily serialized with
> JavaScript JSON libraries.
>
> On Tue, Dec 16, 2008 at 18:34, clint.gilb...@childrens.harvard.edu <
>
> clint.gilb...@childrens.harvard.edu> wrote:
>
> > I'm sorry if this has already been answered, but after searching a bit
> > I didn't come up with any answers.  Does anyone know of a way to
> > serialize objects to JSON on the client side?  Ideally, it would work
> > similarly to the json2.js lib from json.org that I was using prior to
> > moving to the GWT, but anything relatively straightforward that
> > performs well is fine with me.
>
> > I tried wrapping the json2.js lib in a native method that calls
> > $wnd.JSON.stringify():
>
> > public abstract class JSONSerializer
> > {
> >public static final native String serialize(final Object object)/*-
> > {
> >return $wnd.JSON.stringify(object);
> >}-*/;
> > }
>
> > but it pins my CPU and runs for several minutes when serializing
> > anything but a trivial object.  The problem seemed to be the verbosity
> > (completeness?) of the object when marshalled across the Java-
> > toJavascript boundary by the GWT.  I'd also like to control the
> > mapping of Java properties to JSON ones.
>
> > Surely there's a better way?  Or will I have to roll my own?




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



Re: Getting FastTree Events

2008-12-17 Thread Mark Rieck

I've changed my code.  Now for every FastTreeItem I create, I override
everything like this:

FastTreeItem fti1 = new FastTreeItem("test1"){
public void onSelected()
{
//duplicate code
}
//More overrides
};
fti1.becomeInteriorNode();
myTree.addItem(fti1);

FastTreeItem fti2 = new FastTreeItem("test"){
public void onSelected()
{
//duplicate code
}
//more overrides
};
fti2.becomeInteriorNode();
myTree.addItem(fti2);

I need this to work so I'm willing to do that, but if someone has the
solution how to extend FastTreeItem and use it to capture FastTreeItem
events, I'd be grateful.

Thanks,
Mark



On Dec 16, 9:14 pm, Mark Rieck  wrote:
> Sorry for the beginner question, I've been doing too much C# and not
> enough Java for too long.
>
> Anyway, I want to get listeners for a FastTreeItem with my FastTree...
> since FastTreeItem doesn't have addXListener methods, I extended
> FastTreeItem.
>
> When I try a simple function to add the items, I only get the first
> node and no events fire.   What do I have to do to get these events to
> fire?
>
> private class MyFastTreeItem extends FastTreeItem
> {
>                   public MyFastTreeItem()
>                   {
>                          super();
>                   }
>                  public MyFastTreeItem(String html)
>                  {
>                         super(html);
>                  }
>                  public MyFastTreeItem(Widget widget)
>                 {
>                       super(widget);
>                 }
>                 @Override
>                 protected void onSelected()
>                 {
>                         //...
>
>                 }
>                 @Override
>                 public void beforeOpen()
>                 {
>                         //...
>                 }
>
> }
>
> private void create()
> {
>                FastTree testTree = new FastTree();
>                 MyFastTreeItem fti1 = 
> (MyFastTreeItem)testTree.addItem("test1");
>                 MyFastTreeItem fti2 = 
> (MyFastTreeItem)testTree.addItem("test2");
>                 MyFastTreeItem fti3 = 
> (MyFastTreeItem)testTree.addItem("test3");
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Width of widgets added in Grid

2008-12-17 Thread hezjing
Hi

I have the following code to display input field for username and password:

Label usernameLabel = new Label("Username");
Label passwordLabel = new Label("Password");
username = new TextBox();
password = new PasswordTextBox();
Grid grid = new Grid(2, 2);
grid.setWidget(0, 0, usernameLabel);
grid.setWidget(1, 0, passwordLabel);
grid.setWidget(0, 1, username);
// the width of password is somewhat shorter than username
grid.setWidget(1, 1, password);


When tested in GWT 1.5.3 hosted mode, the width of the password is smaller
than the width of username.
I'm expecting the width of the widgets in the same column are the same, yes?

I tried password.setWidth("100%"), but it doesn't change the width too!
How to make the width of username and password the same?


-- 

Hez

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



Re: Yet another maven-gwt-plugin

2008-12-17 Thread ponthiaux eric
Hum... consolidate doesn't mean complicate . That's the problem in fact ...

regards .

2008/12/16 Arthur Kalmenson 

>
> Just curious, why create another Maven plugin? There's already efforts
> to consolidate the codehaus and Google Code gwt-maven plugins
>
> --
> Arthur Kalmenson
>
>
>
> On Tue, Dec 16, 2008 at 3:12 AM, algesten  wrote:
> >
> >
> > Hey,
> >
> > Thought I'd just make a quick note that I've created yet another maven-
> > gwt-plugin. This one follows the design principle of "small is
> > beautiful". It deliberately limits itself to only do "mvn gwt:shell"
> > and "mvn gwt:compile".
> >
> > http://code.google.com/p/maven-gwt-plugin/
> >
> > Design Goals:
> >
> > * Simple (gwt:shell, gwt:compile)
> > * Small (no extra functionality but invoking the GWT hosted mode shell
> > and compiler from maven)
> > * Out of the box.
> > * Use only central repo for GWT dependencies.
> >
> > Martin
> >
> >
> > >
> >
>
> >
>


-- 
Eric Ponthiaux

Consultant technique

+33.687030001

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



Re: Align a widget middle-top in HorizontalPanel

2008-12-17 Thread hezjing
Hi Gregor
Yes, the problem is overcome by panel.setHeight("200px").

Thank you!


On Tue, Dec 16, 2008 at 10:51 PM, gregor wrote:

>
> Hi Hez,
>
> In fact your code works as you expect in FF, but not in IE. Don't know
> exactly why, but I think it is because IE thinks  panel.setHeight
> ("50%"); overrides previous instruction setVerticalAlignment
> (HorizontalPanel.ALIGN_MIDDLE); If you comment out the panel.setHeight
> ("50%"); line you get the panel in the right place but you don't get
> the height. I guess it's possibly a bug in GWT IE implementation of
> CellPanel, or it might be IE's capricious awkwardness.
>
> To get round it you can either:
>
> a) give the panel height in pixels instead of %, which for some reason
> IE accepts
> b) calculate and set the height of panel after Welcome has been
> attached to root (and therefore itself sized up), as per below
>
> regards
> gregor
>
> public class SandBox implements EntryPoint {
>
>class Welcome extends HorizontalPanel {
>
>HorizontalPanel panel = new HorizontalPanel();
>
>Welcome() {
>setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
>setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
>setHeight("100%");
>setWidth("100%");
> //panel.setHeight("200px");
>panel.setWidth("80%");
>
>panel.setWidth("80%");
>panel.setStyleName("dummy");
>panel.add(new Label("x"));
>// the panel is aligned top-center, why it does not align
>//middle-center?
>add(panel);
>}
>}
>
>//and this Welcome panel is added to RootPanel like this,
>
>public void onModuleLoad() {
>Welcome welcome = new Welcome();
>RootPanel panel = RootPanel.get();
>panel.add(welcome);
> welcome.panel.setHeight("" + welcome.getOffsetHeight() / 2);
> }
> }
>
> On Dec 16, 1:11 pm, hezjing  wrote:
> > Hi
> >
> > I have a Welcome panel like this,
> >
> > class Welcome extends HorizontalPanel {
> >
> > Welcome() {
> > setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
> > setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
> > setHeight("100%");
> > setWidth("100%");
> > HorizontalPanel panel = new HorizontalPanel();
> > panel.setHeight("50%");
> > panel.setWidth("80%");
> > panel.setStyleName("dummy");
> > panel.add(new Label("x"));
> > // the panel is aligned top-center, why it does not align
> > middle-center?
> > add(panel);
> > }
> >
> > }
> >
> > and this Welcome panel is added to RootPanel like this,
> >
> > public void onModuleLoad() {
> > Welcome welcome = new Welcome();
> > RootPanel panel = RootPanel.get();
> > panel.add(welcome);
> >
> > }
> >
> > and the dummy CSS is as simple as,
> >
> > .dummy {
> > border: 1px solid #BB;
> > background: #C3D9FF;
> >
> > }
> >
> > when tested in GWT 1.5.3 hosted mode, why the Welcome panel is aligned
> > top-center even though I
> > have setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE)?
> >
> > --
> >
> > Hez
> >
>


-- 

Hez

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



Re: Calling of business method from Client

2008-12-17 Thread gregor

Hi Arul,

Yes and no. Yes. this is the way you set up RPC services client side,
but no, you do not necessarily have to have dozens of separate
callbacks, one for every single use case.

For example, here you have two methods that both return vectors of
accounts. You can merge them into a single RPC service method (thereby
cutting out half the tedious callback code) using a variant of the
Command pattern. For example:

public class AccountsCommand implements Serializable {

   enum Operation {available, selected, ,etc};

   private Operation op; // best made immutable
   private Vector accounts = new Vector();

   // constructors, getters, setters, etc
}

You set the op and dispatch one of these to a single RPC service and
the RPC service returns the same object that now contains the results
e.g.

public interface AccountsService extends RemoteService {
AccountsCommand getAccounts(AccountsCommand command);
}

This is particularly convenient with enums because you can use a
switch statement in the (now) single callback to call the right
methods client side to control the UI, e,g,

  public void onSuccess(AccountsCommand command) {
   Command.Operation operation = command.getOperation();
   switch (operation) {
   case available: {doSomething(command.getAccounts
());break;}
   case selected: {doSomethingElse(command.getAccounts
());break;}
  //etc
}
");

which I think is quite neat and readable.  You can also easily add
additional fields to AccountsCommand that might become necessary/
desirable without altering the RPC infrastructure code at all, and
also any useful utility methods for manipulating lists of accounts
(sorting for example). I like this approach because I think it
maintains a strong business focus around a group of related use cases
at the same time as simplifying the tedious RPC infrastructure code.

regards
gregor



On Dec 17, 2:17 pm, Arul  wrote:
> Hi,
>    I written two business method inside service class.
> When I call these two methods inside client class, I have to write two
> seperate block containing onSuccess, onFailure methods for each of the
> business method in service class.
>
> For Example see my service class below
> --
> public interface AccountsService extends RemoteService {
>         Vector getAvailbleAccounts();
>         Vector getSelectedAccounts();}
>
> --
>
> Please find below my implementation (client) class for above two
> methods
> -
> AsyncCallback callback = new AsyncCallback() {
>     public void onFailure(Throwable caught) {
>       System.out.println("Inside getAvailbleAccounts Error ");
>
>     }
>
>     public void onSuccess(Vector result) {
>         System.out.println("Inside getAvailbleAccounts On Success ");
>     };
>   accountServiceSvc.getAvailbleAccounts(callback);
>
> AsyncCallback callback1 = new AsyncCallback() {
>     public void onFailure(Throwable caught) {
>       System.out.println("Inside getSelectedAccounts Error ");
>     }
>
>     public void onSuccess(Vector result) {
>             System.out.println("Inside getSelectedAccounts On Success
> ");
>     }
>   };
> accountServiceSvc.getSelectedAccounts(callback1);
> -
>
> Is this the way of writting blocks for every business method in GWT
> RPC?
>
> Thanks
> Arul
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Using Google Visualization API inside asynchronous GWT methods

2008-12-17 Thread Lonifasiko

I've achieved the integration of a very simple piechart powered by
Google Visualization API into a simple GWT application.

Nevertheless, it seems that I can only create and manipulate the chart
programatically properly when the code generating the graph is placed
under onModuleLoad method, inside click event handlers, or any other
methods that are not asynchronous. Example:

/* Code Begin */
PieChart pie = null;
public void onModuleLoad() {
// Draw your GWT controls and other stuff

 Runnable onLoadCallback = new Runnable() {
public void run() {
  Panel panel = RootPanel.get();
  // Create a pie chart visualization.
  PieChart pie = new PieChart(createTable(), createOptions
());
  pie.setVisible(true);
  //pie.addSelectHandler(createSelectHandler(pie));
  panel.add(pie);
}
  };
// Load the visualization api, passing the onLoadCallback to be
called
// when loading is done.
AjaxLoader.loadVisualizationApi(onLoadCallback, PieChart.PACKAGE);
}
/* Code End */

This code works, but if I place it inside a callback method, when
servlet returns data from a database, chart is not drawn, and no
errors are thrown.

In other words, I'm trying to load an initial simple GWT application,
without any chart, that after some seconds, queries a database, and
shows retrieved results in a chart from Google Visualization API.

Has somebody successfully achieved this? I'm sure I'm missing some
very basic stuff.

Thanks very much in advance.

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



Re: Sending objects from client to server

2008-12-17 Thread Isaac Truett

Just add a parameter to the GWT RPC service method. Like this
(assuming GWT 1.5):

public interface MyRpc extends RemoteService {
  String doStuff(String arg);
}

public interface MyRpcAsync {
  void doStuff(String arg, AsyncCallback callback);
}

On Wed, Dec 17, 2008 at 10:17 AM, fatjack1...@googlemail.com
 wrote:
>
> Hi,
>
> I wonder if anyone can help me. I am new to GWT so am still trying to
> get my head round how everything works...
>
> So basically I have my server set up. It can send data to the client
> using an AsyncCallback etc. Now I need the client to send something
> back to the server. For example, if the user selects something from a
> drop down menu I want that value to be sent to the server as a
> variable, the server to retrive some data from the database and then
> send it back to the client. I cant work out how to send the variable
> to the server. I'm sure its simple enough but would someone be able to
> explain to me how to do this? And if not point me to some
> documentation which would talk me through it?
>
> Thanks for your help in advance,
> Jack
> >
>

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



Sending objects from client to server

2008-12-17 Thread fatjack1...@googlemail.com

Hi,

I wonder if anyone can help me. I am new to GWT so am still trying to
get my head round how everything works...

So basically I have my server set up. It can send data to the client
using an AsyncCallback etc. Now I need the client to send something
back to the server. For example, if the user selects something from a
drop down menu I want that value to be sent to the server as a
variable, the server to retrive some data from the database and then
send it back to the client. I cant work out how to send the variable
to the server. I'm sure its simple enough but would someone be able to
explain to me how to do this? And if not point me to some
documentation which would talk me through it?

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



Re: Dollar sign in filename

2008-12-17 Thread rakesh wagh

those files are automatically generated by the compiler. They are
typically inner classes. What is your concern by the way?

On Dec 16, 5:55 pm, jchimene  wrote:
> Hi,
>
> Would someone please post a link to the documentation for the
> filenaming convention that allows for names like: "RichTextToolbar
> $Strings.properties"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Multiple Json requests problem in parsing

2008-12-17 Thread jake H

Ty ,
indeed the problem was the asynchronous communication.

I put a while loop which runs till all the array is filled with the
appropriate data.
The problem is that this can run in infinity!!! ( it took around 4 sec
for my application to be drawn , imagine if i had more data to
retrieve?!)

Is there any other solution to keep up with Asynchronous calls?

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



Re: How to close application using GWT code

2008-12-17 Thread Kevin Tarn
Use JSNI:
/**
 * Close browser window.
 */
public static native void closeBrowser()
/*-{
$wnd.close();
}-*/;

Kevin

On Wed, Dec 17, 2008 at 10:46 PM, Arul
wrote:

>
> Hi,
>  I have a button called close, when selecting the button I want the
> application gets closed instead selecting exit button either IE
> browser or hosted browser window exit button.
>
>  In VB, there would be function to achive this but in GWT I am unable
> to find this?
>
> Could anone send me the code?
>
> Thanks
> Arul
> >
>

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



Re: GWT RIA s ?

2008-12-17 Thread mikedshaf...@gmail.com

This does bring up a good point and something that is sourly missing.
We have cobbled together some very generic type stuff patterned
(albeit very low in quality) what we used extensively in Eclipse Rich
Client.  Maybe the ExtGWT guys or SmartGWT will come up with
something.  Or if the Eclipse Web Client guys would do GWT  Or if
I could find a spare moment or two, I'd take it on.  The whole UI
framework beyond "widgets", like editors, views, menus, actions etc.
is a sweet spot to be sure that is missing from any of the web
frameworks, IMHO.

On Dec 17, 6:54 am, "Arthur Kalmenson"  wrote:
> There are some things in the incubator for status bars and logging.
> The rest you would have to do yourself.
>
> --
> Arthur Kalmenson
>
>
>
> On Wed, Dec 17, 2008 at 2:17 AM, Riyaz Mansoor  
> wrote:
>
> > I'm not looking for rich widget sets (Ext, Smart, etc) but rather is
> > there a GWT framework that provides basics for a RIA. One that handles
> > the grunt work such as providing; status bar, xml or other
> > configurable menu, error logging report, authentication, security etc
>
> > This maybe reaching for the sky but kinda like what Eclipse or
> > Netbeans provides as the core platform when developing on those
> > platforms.- 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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Multiple Json requests problem in parsing

2008-12-17 Thread jhulford

In GWT requests happen asynchronously (ie. they don't block at the
call point waiting for the server's response) so your draw table is
being executed while your requests are still being sent to the
server.  You have to design your code so that any code dependent on
the results of your server calls is invoked from the RequestCallback.


On Dec 17, 8:50 am, jake H  wrote:
> ok i did something similar to deadlock technique to get the data
> ordered.
> But i still has a problem with the fill in.
>
> What i mean is:
> To avoid having nullpointer in the array i fill it with error msgs.
>
>for (int i=0; i  for (int j=0; j  arr[i][j] = "error";
>  }
>  }
>
> When RequestCallBack is called, inside i have the 2 well known
> functions extractData that returns an JSONObject and the
> updateResults.
>
> Into update results i call another function , fill_data
>
> private void updateResultsArea(JSONObject results) {
>
> String value = getString(results.get("value"));
> fill_data(name,value,counter);
> increase();
>   }
>
> Name is the url that is parsed every time RequestCallBack is called
> ( This is how i solved the matching part )
> Value is the JsonValue and counter is a global variable , used as a
> counter that is increased every time this function is called , in
> order to save the data respectively.
>
> But after the request messages are over, and i want to draw the
> results in my panel using a draw_table() function , which has inside a
> while loop.  However, when it tries to print the data of the array , i
> get the error msgs instead of the saved data.
>
> This is what i have inside the basic constructor of my class
>
>array_list.add("Name");
>array_list.add("L_Name");
>array_list.add("tel");
>
> Iterator itr = array_list.iterator();
> resultsArea.setSize("100%", "100%");
>
>while(itr.hasNext())
>{
> // Here i send all json requests, taking back the results and trying
> to save them in an array
>
> SendJsonRequests(itr.next().toString());
> }
> // Here i want to use the data i saved in order to draw my
> application
>draw_table();
>
> initWidget(resultsArea);
>}
>
> Now in the draw_table() function
> By putting a Window.alert() msg , lets call it magic? dont know , but
> the results are printed fine.
> By comment window.alert() msg,  all saved data is gone and error msgs
> are printed!
>
>  private void draw_table()
>{
> int c2 = 0;
>
> while( c2 < arr.length )
> {
>
> //  Window.alert(arr[c2][0]+" <== ");
>
>draw
>
>   c2++;
>
> }
>
> Now may the prob is in how i use the global variables arr and counter?
> i cant figure out why something like this is happening.
> Any idea ?
> Ty.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



How to close application using GWT code

2008-12-17 Thread Arul

Hi,
  I have a button called close, when selecting the button I want the
application gets closed instead selecting exit button either IE
browser or hosted browser window exit button.

  In VB, there would be function to achive this but in GWT I am unable
to find this?

Could anone send me the code?

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



Re: Tree Graph using GWT

2008-12-17 Thread Paddy

Kilkenny,
Life saver! thank you that helped me alot it's exactly what I was
looking for.

I'm having trouble running the compile or the shell command of my
project while trying to include the visualizations jar.
Any tips? I've edited the commands to include the path to the jar and
also imported it into eclipse..

P

On Dec 17, 10:14 am, kilkenny  wrote:
> Hi Paddy
>
> The gwt-google-apis project (http://code.google.com/p/gwt-google-
> apis/) recently released a GWT-wrapper for the Google Visualization
> API (http://code.google.com/intl/de-CH/apis/visualization/). They may
> have something useful, for example the organizational chart..?
>
> Regards, Adrian
> --http://traceurl.com
>
> On 16 Dez., 18:11, Paddy  wrote:
>
> > Hi Folks,
>
> > I'm trying to create a treeGraph in GWT to represent a hierarchical
> > tree structure,
> > I see alot of graphs and charts out there such a gChart but I see no
> > tree type graphs there.
>
> > Anyone any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: J2EE and debug in hosted mode

2008-12-17 Thread gregor



> I'm afraid you'll still have 2 java processes.
> One for the client, one for the server... In fact, the GWTShell plays the
> role of the browser.
>

Exactly so - what I do is start JBoss in remote debug from within IDEA
(debug session 1), then start GWT hosted mode in debug, also in IDEA
(debug session 2). IDEA just switches between them as you step through
break points, I guess that netbeans would do the same. Yes, the dev
shell is just playing the browser.

In my option 2 above you also use two debug sessions like this, but
the difference is that here the GWT debug session includes the GWT RPC
servlet layer. I've found this is useful if you have, say, a session
facade of EJB session beans, independently tested and stable, because
you can simply restart the GWT dev shell in debug while working on the
RPC servlet layer without redeploying the whole ear to the remote
server all the time, but you can still have the second remote debug
session on the remote server to step through EJB code etc if required

This is example of how I did this for connecting a GWT app to
jackrabbit running as a RAR on JBoss - it works for both GWT hosted
mode (using RMI to jump from hosted mode Tomcat to jackrabbit on
JBoss) and deployed. You can use the same trick for session beans (or
I guess any Java EE resource) using local/remote interfaces, and
probably Spring as well, but I haven't tried that. Of course, if you
have a lot of such resources, this code gets tedious, which is where
the ServiceLocator pattern comes in


Properties jndiprops = new Properties();
jndiprops.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
jndiprops.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
jndiprops.put(Context.PROVIDER_URL, "jnp://localhost:
1099");
InitialContext ctx = new InitialContext(jndiprops);


// try for JNDI same VM
try {
log.info("Looking for local JCA jackrabbit
connection.");
repos = (Repository) ctx.lookup("java:jcr/local");
log.info("Local JCA jackrabbit connection found.");
} catch (NamingException e) {
log.info("Failed getting JCR on local JNDI, trying
RMI");
}
// so try RMI (for GWT hosted mode)
if(repos==null) {
ClientAdapterFactory adapter = new ClientAdapterFactory
();
RemoteRepository rr = (RemoteRepository) ctx.lookup
("jnp://localhost:1099/jcrServer");
repos = adapter.getRepository(rr);
if (repos!=null) {
log.info("Obtained jcr over RMI");
} else {
log.error("Fatal error: Unable to obtain local or
RMI jcr connection - stopping");
throw new Exception("JCR ( Jackrabbit)
Unavailable");
}
 }



> I'don't see how it could be possible to embed the GWTShell process in the
> J2EE one.
>
> Regards,
>
> 2008/12/14 gregor 
>
>
>
> > The simplest is to run hosted mode with the -noserver flag. Then you
> > deploy your EAR with your Ant script once and run & debug your GWT
> > client code in hosted mode just hitting the refresh button as you go.
>
> > On Dec 14, 5:01 pm, Bandesz  wrote:
> > > I wrote it wrong, not the debug is the problem, I just want to run the
> > > enterprise application (EJB+Web) in Hosted Mode, I wrote debugging
> > > because hosted mode runs if I debug the web application.
>
> > > If I understand correctly, the build-gwt.xml is responsible for the
> > > hosted mode. If I run the ent. app., the build.xml simply compiles the
> > > EJB and the Web project, makes an EAR package, and starts glassfish in
> > > debug mode.
>
> > > So how can I write a build file which runs the whole application in
> > > gwt hosted mode?
>
> > > This is a bottleneck in my development, because the deploy time is now
> > > more than 1 minute. If I could use as I wrote it, the hosted mode
> > > shows the changes in couple of seconds, and the autodeploy on the
> > > server side is just seconds.
>
> > > Bandesz
>
> > > On Dec 14, 5:49 pm, "olivier FRESSE"  wrote:
>
> > > > When you run in hosted mode, you have 2 java processes running.
> > > > The glassfish one, and the GWT shell.
> > > > Debugging the glassfish side is easy, it comes OOTB in Netbeans.
>
> > > > Debugging the client side is quite easy too.
> > > > You just need to change the way the GWTShell is launched :
>
> > > > java  *-Xdebug
> > -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
> > > > * -Xmx256M -cp
>
> > "$APPDIR/src:$APPDIR/bin:/home/ofe/dev/gwt-linux-1.5.3/gwt-user.jar:/home/ofe/dev/gwt-linux-1.5.3/gwt-dev-linux.jar"
> > > > com.google.gwt.dev.GWTShell -out "$APPDIR/www" "$@"
> > > > ext.test.MyAppli/MyAppli.html;
>
> > > > next you can attach the netbeans debugger to the Shell.
>
> > > > Is it what you're looking fo

Calling of business method from Client

2008-12-17 Thread Arul

Hi,
   I written two business method inside service class.
When I call these two methods inside client class, I have to write two
seperate block containing onSuccess, onFailure methods for each of the
business method in service class.

For Example see my service class below
--
public interface AccountsService extends RemoteService {
Vector getAvailbleAccounts();
Vector getSelectedAccounts();
}
--

Please find below my implementation (client) class for above two
methods
-
AsyncCallback callback = new AsyncCallback() {
public void onFailure(Throwable caught) {
  System.out.println("Inside getAvailbleAccounts Error ");

}

public void onSuccess(Vector result) {
System.out.println("Inside getAvailbleAccounts On Success ");
};
  accountServiceSvc.getAvailbleAccounts(callback);



AsyncCallback callback1 = new AsyncCallback() {
public void onFailure(Throwable caught) {
  System.out.println("Inside getSelectedAccounts Error ");
}

public void onSuccess(Vector result) {
System.out.println("Inside getSelectedAccounts On Success
");
}
  };
accountServiceSvc.getSelectedAccounts(callback1);
-

Is this the way of writting blocks for every business method in GWT
RPC?

Thanks
Arul



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



Re: New to GWT - how to start - basic directions

2008-12-17 Thread Arthur Kalmenson

You would integrate GWT into your JSP as you would any other
Javascript. You just need to link to the .nocache.js script in your
JSP file and the GWT module will be loaded. If you want a good book on
how to mesh different technologies with GWT, check out Pro Web 2.0
Application Development with GWT (it focuses on building websites with
some GWT elements).

--
Arthur Kalmenson



On Wed, Dec 17, 2008 at 8:15 AM, IO  wrote:
>
> I don't think I explained myself clearly. What I am looking for is
> info regarding integration of GWT (mainly visualization) into an
> existing Java/J2EE application using JSP/Javascript with Struts.
> I am not writing a GWT application from scratch but rather I have an
> RIA written in the above technologies and I want my new GWT generated
> jsp code integrated in it.
> >
>

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



Re: Problem with Smartgwt and Activemq's Ajax code

2008-12-17 Thread Arthur Kalmenson

You'll probably have better luck asking on the SmartGWT forums:
http://forums.smartclient.com/

--
Arthur Kalmenson



On Wed, Dec 17, 2008 at 3:08 AM, Pete Kay  wrote:
> Hi,
>
> I have GWT jsni wrapper built for Activemq's amq.js without any problem.
>
> The problem is when I migrated the GWT code to smartgwt, smartgwt seems to
> have function name conflict with functions in prototype.js.  I tried
> modifyng the function names in prototype.js ( the find and select
> functions), but the events can't be received anymore.
>
> Does anyone have any idea how this problem maybe resolved?
>
> Thanks,
> Pete
>
>
>
> >
>

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



Re: Editable Grid using GWT ?

2008-12-17 Thread Arthur Kalmenson

For an editable grid, take a look at the PagingScrollTable:
http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=google-web-toolkit-incubator&t=PagingScrollTable

Drag and drop capabilities can be done with the gwt-dnd project:
http://code.google.com/p/gwt-dnd/. I haven't tried it myself.

--
Arthur Kalmenson



On Wed, Dec 17, 2008 at 12:48 AM, Haz  wrote:
>
> I am trying to build an editable grid for a spreadsheet application.
> Can anyone suggest me a grid already available that serves my purpose
> (the grid should be resizable, editable, multiselectable, scrollable).
>
> If a good one is not available, i don't mind building one but do you
> guys know of any in-depth GWT tutorial that would help me build custom
> widgets with drag & drop capabilities.
>
> Many Thanks,
> Hazem
>
> >
>

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



Re: GWT RIA s ?

2008-12-17 Thread Arthur Kalmenson

There are some things in the incubator for status bars and logging.
The rest you would have to do yourself.

--
Arthur Kalmenson



On Wed, Dec 17, 2008 at 2:17 AM, Riyaz Mansoor  wrote:
>
>
> I'm not looking for rich widget sets (Ext, Smart, etc) but rather is
> there a GWT framework that provides basics for a RIA. One that handles
> the grunt work such as providing; status bar, xml or other
> configurable menu, error logging report, authentication, security etc
>
> This maybe reaching for the sky but kinda like what Eclipse or
> Netbeans provides as the core platform when developing on those
> platforms.
>
>
>
> >
>

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



Re: Multiple Json requests problem in parsing

2008-12-17 Thread jake H

ok i did something similar to deadlock technique to get the data
ordered.
But i still has a problem with the fill in.

What i mean is:
To avoid having nullpointer in the array i fill it with error msgs.

   for (int i=0; ihttp://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Multiple Json requests problem in parsing

2008-12-17 Thread Thomas Broyer



On 17 déc, 12:25, jake H  wrote:
> so is there any solution about asynchronous communication?
> should i work with deadlocks?

Actually, i'm not sure I've undertood your problem correctly.

What isn't in the order you'd like? object properties from parsed
JSON? or HTTP responses?

Also I'm not sure I understand how you're doing your requests: you're
talking about a "for loop" and then about "waits first to extract and
save the data and then it calls again the Json_request with the new
url". So, are you doing serial or parallel requests?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to deploy multiple module and RPC app...

2008-12-17 Thread Iván López

Hello,

I've found the same problem as you. I'm developing an application but
at the end, I wanted to deploy in a real tomcat to test it. After a
lot of tests I got it.

I've created and ant task to create the war file. The steps are:
- Compile all the java.
- Compile to javascript.
- Copy the web.xml previously created.
- Copy the .jar files.
- Finally create the .war file.

The task is called "package" and you can find it here: 
http://code.google.com/p/mufly/.
If you browse the svn you can see the file Mufly.ant.xml.

I hope it works for you.

Regards, Iván.


On 16 dic, 08:43, Shibby44  wrote:
> Hello again,
>
> I want to try the functionalities I've added to the application in a
> real Tomcat server, basically for testing and performance
> benchmarking. I have read the GWT deploying guide, but it was of no
> help, since I have two modules and each has RPC, so I didn't figure
> out a way of making a functional WAR file.
>
> Here's my schematic file structure. Maybe you can help me with the
> web.xml configuration.
>
> com.hads.bizalokud.login
> com.hads.bizalokud.login.client
> Login.java
> (Other client side classes)
> com.hads.bizalokud.login.server
> LoginServiceImpl.java
> com.hads.bizalokud.login.public
> (All the public stuff)
>
> com.hads.bizalokud.main
> com.hads.bizalokud.main.client
> Main.java --> I use the Login module inside this module Login l = new
> Login();
> com.hads.bizalokud.main.server
> MainServiceImpl.java
> com.hads.bizalokud.main.public
>
> On both service interfaces I used the following:
>
> Code:
> @RemoteServiceRelativePath("MainService")
> public interface MainService extends RemoteService {
>
> Code:
> @RemoteServiceRelativePath("LoginService")
> public interface LoginService extends RemoteService {
>
> Given that file structure, I tried the following.
> 1. Copied the Compile/Browse output to a new folder called Bizalokud
> (the name of the application)
> 2. Then Made the WEB-INF/ WEB-INF/lib WEB-INF/web.xml
> 3. Copied gwt-server.jar and mysql-connector.jar to WEB-INF/lib
> 4. And then... started filling the web.xml but I didn't figure out a
> way to make it work.
>
> Thanks in advance. Help will be very appreciated.
>
> Bye.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GETting a request to another server from hosted mode while debugging (whitelist?)

2008-12-17 Thread Thomas Broyer


On 17 déc, 14:15, dduck  wrote:
> Hi,
>
> I am debugging a piece of code that GETting a request to a server that
> isn't localhost. The code looks like this:
>
>         public void recieveRequest(final ServerResponseRecipient
> callbackOnCompletion) {
>                 this.callback = callbackOnCompletion;
>                   final RequestBuilder rb = new RequestBuilder(
>                                   RequestBuilder.GET,
>                                   URL.encode(
>                                                   
> "http://my.server:9080/myShopInstall/DownloadReport.do?
> content=dq_candidate_matches&format=excel_csv"
>                                                   ));
>
>                   rb.setHeader("Content-Type", "application/x-www-form-
> urlencoded");
>
>                   rb.setRequestData("");
>                   rb.setCallback(this);
>                   try {
>                         rb.send();
>                 } catch (final RequestException e) {
>                         throw new RuntimeException(e);
>                 }
>         }
>
> Is the ANY way that I can make hosted mode on my development machine
> allow this request despite the single-origin policy? If not, I have to
> live with at much slowed down build/test cycle...

Depends if you're also using GWT-RPC and/or change static resources
too (CSS, images, ImageBundles). If not then you can launch the
GWTShell in -noserver mode, passing the full URL to your deployed app;
and the GWTShell will load your local client code (in Java) instead of
launching the deployed GWT application.

For other cases (in my case, when I need to tweak the CSS and/or want
to check the result in browsers outside the GWTShell), I use a "proxy
servlet" that I'm mapping from within the tomcat/webapps/ROOT/WEB-INF/
web.xml (added to SVN so I'm sure that even if GWT overwrites it --
when I switch version-- I can get back my changes as easily as a "svn
revert"):

proxy
my.very.own.server.ProxyServlet


hostname
otherserver


port
8080




proxy
/alfresco/*



shell
/*


That way, my code is the same when developping as when compiling for
deployment:

   new RequestBuilder(RequestBuilder.GET, "/alfresco/s/foo/bar");


Search in the archives for other discussions on the subject.


Also note that this will change a bit in GWT 1.6 as the web.xml will
be your own, not something controlled by GWT (so GWT won't ever
overwrite it and adding the servlet and servlet-mapping as above will
be the blessed way to configure a servlet; as opposed to GWT 1.4 and
1.5 way of mapping them from your *.gwt.xml, which doesn't support
wildcard mappings).
And in GWT 2.0, you'll be able to launch hosted mode not only from
your deployed app (similar to today's -noserver mode) but moreover
from any browser (no more embedded browser in the GWTShell), thanks to
OOPHM (out-of-process hosted mode)


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



Serialization question

2008-12-17 Thread sklinger

Hello all,

I am trying to integrate GWT into an existing application. I have a
legacy form that is posted to the server and some action is taken
there. Now I also have GWT widgets (actually EXT-GWT grid) with some
data that I would like to post within the same request. There is a
rather complex model behind it and I would like to manually serialise
it and put it into a form field so it gets send with the same request
and de-serialise it on the server. The asynchronous RPC service works
fine, but in that case i would have 2 requests send which I would like
to avoid. Does anybody know whether this is feasible? Or are there any
frameworks out there that support this?

In theory this should be possible since the asynchronous call works
similarly (serialise to string deserialise to object).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: New to GWT - how to start - basic directions

2008-12-17 Thread IO

I don't think I explained myself clearly. What I am looking for is
info regarding integration of GWT (mainly visualization) into an
existing Java/J2EE application using JSP/Javascript with Struts.
I am not writing a GWT application from scratch but rather I have an
RIA written in the above technologies and I want my new GWT generated
jsp code integrated in it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Client-side JSON Serialization?

2008-12-17 Thread mikedshaf...@gmail.com

I haven't done anything non-trivial in JSON & GWT, but what are you
looking to do that you can't do natively with GWT?  Like on these
examples:

http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=GettingStartedJSON

I'm trying to figure out your use case and what you can't do with GWT
that you'd need json2.js or something like it.  Just wondering most of
all.

Later,

Shaffer


On Dec 16, 11:24 pm, Shawn Pearce  wrote:
> Roll your own, or look at gwtjsonrpc:
>
> http://android.git.kernel.org/?p=tools/gwtjsonrpc.git;a=blob;f=README...
>
> You can also look at JSNI and the JavaScriptObject subclassing tricks in the
> GWT documentation (under JavaScript Integration) to build Java objects that
> are more directly JavaScript entities, and thus more easily serialized with
> JavaScript JSON libraries.
>
> On Tue, Dec 16, 2008 at 18:34, clint.gilb...@childrens.harvard.edu <
>
> clint.gilb...@childrens.harvard.edu> wrote:
>
> > I'm sorry if this has already been answered, but after searching a bit
> > I didn't come up with any answers.  Does anyone know of a way to
> > serialize objects to JSON on the client side?  Ideally, it would work
> > similarly to the json2.js lib from json.org that I was using prior to
> > moving to the GWT, but anything relatively straightforward that
> > performs well is fine with me.
>
> > I tried wrapping the json2.js lib in a native method that calls
> > $wnd.JSON.stringify():
>
> > public abstract class JSONSerializer
> > {
> >    public static final native String serialize(final Object object)/*-
> > {
> >        return $wnd.JSON.stringify(object);
> >    }-*/;
> > }
>
> > but it pins my CPU and runs for several minutes when serializing
> > anything but a trivial object.  The problem seemed to be the verbosity
> > (completeness?) of the object when marshalled across the Java-
> > toJavascript boundary by the GWT.  I'd also like to control the
> > mapping of Java properties to JSON ones.
>
> > Surely there's a better way?  Or will I have to roll my own?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GETting a request to another server from hosted mode while debugging (whitelist?)

2008-12-17 Thread dduck

Hi,

I am debugging a piece of code that GETting a request to a server that
isn't localhost. The code looks like this:

public void recieveRequest(final ServerResponseRecipient
callbackOnCompletion) {
this.callback = callbackOnCompletion;
  final RequestBuilder rb = new RequestBuilder(
  RequestBuilder.GET,
  URL.encode(
  
"http://my.server:9080/myShopInstall/DownloadReport.do?
content=dq_candidate_matches&format=excel_csv"
  ));

  rb.setHeader("Content-Type", "application/x-www-form-
urlencoded");

  rb.setRequestData("");
  rb.setCallback(this);
  try {
rb.send();
} catch (final RequestException e) {
throw new RuntimeException(e);
}
}

Is the ANY way that I can make hosted mode on my development machine
allow this request despite the single-origin policy? If not, I have to
live with at much slowed down build/test cycle...

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



Link to documentation broken?

2008-12-17 Thread dduck

Hi,

When clicking the "Developers guide" link here:
http://code.google.com/intl/da-DK/webtoolkit/overview.html

..I no longer get the developers guide. I get the Google code
Documentation Reader page instead.

Any idea why?

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



Re: J2EE and debug in hosted mode

2008-12-17 Thread olivier

Well the GWT module isn't loaded at all...
I use seam remoting instead of GWT Servlets.
RPC works fine, the issue is that GWTSehll doesn't see the GWT modules
in the page...




On 15 déc, 18:02, jos  wrote:
> Bandesz,
> Gregor is pointing you in the right direction w/ option #1, and the
> link he gives is enough to eventually get you there, but there is one
> thing you have to do in your GWT code or it will never work. Your RPC
> servlets all have a setServiceEntryPoint() call that is made to tell
> them where they hookup. By default in hosted mode the GWT runtime will
> tell your GWT  application that the app server is on localhost so you
> need to override that by changing the following code which should be
> in your onModuleLoad() method. The code example below is in my
> deployment setup, when I'm debugging the application I comment in the
> first two lines and comment out the 3rd line. Note in the second
> statement I'm telling GWT where the the service entry point really
> lives. The third statement would point it back to the localhost
> because that's where hosted mode lives.
>
> There is a second important step that I'll mention here. After
> compiling your GWT code, it does need to be deployed to your testing
> server so that the hosted mode browser takes the code from that
> server. Once you switch to -noserver the local tomcat goes away and
> there's nothing serving up your application. When you run the hosted
> mode debugger, you just need to type in the address of your
> application on the address bar like you would if you were really
> deployed, your application will be served by your test server and load
> up into the hosted mode debug browser.
>
> Try the GWT documentation link and these two points, and it should
> work. Admittedly it is a painful process the first time you try to get
> it to work, but it does work.
>
>         /** ECLIPSE CODE - comment in the next 2 lines and comment out
> the line directly
>          *  after these three to run with backend server in eclipse
>         System.out.println("GWT module base URL - " +
> GWT.getModuleBaseURL());
>         geoServiceTarget.setServiceEntryPoint("http://
> staging.abaqus.net/geo/gcb/geoservice");
>         */
>         geoServiceTarget.setServiceEntryPoint(GWT.getModuleBaseURL() +
> "geoservice");
>
> On Dec 7, 7:34 pm, gregor  wrote:
>
> > couple of approaches
>
> > 1) Simply use -noserver option. You need a build script to deploy your
> > RPC servlets and your EJB layer to Glassfish on demand and activate
> > remote debugging to make this work effectively, but lots of people do
> > it this way. See
>
> >http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=goog...
>
> > 2) You can run your RPC servlets in hosted mode Tomcat instance
> > leaving your session beans on Glassfish with a bit more work. You need
> > to use trad JNDI to try for a local reference to your session beans,
> > and if that fails go for the remote reference instead. I don't think
> > the new annotation stuff works for this.That way you get a local ref
> > in production and a remote one in dev from the same code. If you use
> > the ServiceLocator pattern it makes this easier.
>
> > On Dec 7, 2:26 pm, Bandesz  wrote:
>
> > > I'm developing a J2EE application with GWT using NetBeans 6.5,
> > > Glassfish v2.
>
> > > If I debugging only the web project, I can't use any Session Beans
> > > from EJB project, becase I get "Cannot resolve reference Unresolved
> > > Ejb-Ref..." error. I tried in every way to make  tags
> > > in web.xml (or in ejb-jar.xml), but the error stays. (I see now that
> > > it's a dead end)
>
> > > If I debugging the enterpise project, everythings works except the
> > > hosted mode.
>
> > > I searched a lot, but I can't make this work, please help.
>
> > > Thanks,
> > >   Bandesz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: dynamically hide/show panel's header

2008-12-17 Thread Mikhail M
try this one

panel.setTitle("blabla");

2008/12/17 jbroquefere 

>
> Hello,
> when i use
> Panel panel = new Panel("blabla");
> then
> panel.setHeader(false);
>
> it hides the header
>
> but panel.setHeader(true) doesnt nothing
>
> how could i do?
> >
>

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



dynamically hide/show panel's header

2008-12-17 Thread jbroquefere

Hello,
when i use
Panel panel = new Panel("blabla");
then
panel.setHeader(false);

it hides the header

but panel.setHeader(true) doesnt nothing

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



Re: Multiple Json requests problem in parsing

2008-12-17 Thread jake H

so is there any solution about asynchronous communication?
should i work with deadlocks?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Internationalization not working for all strings

2008-12-17 Thread Owz

Thanks for the suggestions.

I've actually just managed to solve the problem. It was partly down to
my inexperience with property files and partly because I'm a numpty!
Basically, the strings that weren't being localised were all defined
with a "-" (hyphen) e.g.

clear-sort: Clear Sort

The hyphen was causing the problem, so simply changing it to a
"_" (underscore) solved the problem. e.g.

clear_sort: Clear Sort

I should have really spotted the pattern earlier but there we go!

Cheers.

On Dec 16, 7:34 pm, Martin Trummer  wrote:
> just some thoughts:
>  * maybe there are some hidden characters, that your editor does not
> show
>  * maybe the translation has been copied from the default and it just
> seems not to translate
>  * you could post some of those random strings here - maybe this helps
> anyone to get a better idea about the problem
>
> On Dec 16, 5:33 pm, Owz  wrote:
>
> > I'm doing some localization within my application written with GWT
> > 1.5.3 & GWT-Ext 2.0.5. I have around 6 different properties files and
> > I use the i18nCreator command-line tool to create the interfaces. I've
> > got 2 locales, English as default in the original properties files and
> > French in fr_FR.properties files.
>
> > All text is shown fine when using the default properties files and
> > most are shown fine when running in the French locale except for a few
> > random strings. These strings continue to show in english for no
> > apparent reason. It's not any single properties file that's causing
> > problems as some stings in a single properties file display fine but
> > others don't. These strings don't have any odd characters and eclipse
> > has been set to use uft-8.
>
> > Does anyone have any suggestions as to why these random strings could
> > be reverting back to the default string? I can't seem to fins much by
> > searching (mainly because I'm not sure what to search for!).
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Internationalization not working for all strings

2008-12-17 Thread Owz

Thanks for the suggestions.

I've actually just managed to solve the problem. It was partly down to
my inexperience with property files and partly because I'm a numpty!
Basically, the strings that weren't being localised were all defined
with a "-" (hyphen) e.g.

clear-sort: Clear Sort

The hyphen was causing the problem, so simply changing it to a
"_" (underscore) solved the problem. e.g.

clear_sort: Clear Sort

I should have really spotted the pattern earlier but there we go!

Cheers.

On Dec 16, 7:34 pm, Martin Trummer  wrote:
> just some thoughts:
>  * maybe there are some hidden characters, that your editor does not
> show
>  * maybe the translation has been copied from the default and it just
> seems not to translate
>  * you could post some of those random strings here - maybe this helps
> anyone to get a better idea about the problem
>
> On Dec 16, 5:33 pm, Owz  wrote:
>
> > I'm doing some localization within my application written with GWT
> > 1.5.3 & GWT-Ext 2.0.5. I have around 6 different properties files and
> > I use the i18nCreator command-line tool to create the interfaces. I've
> > got 2 locales, English as default in the original properties files and
> > French in fr_FR.properties files.
>
> > All text is shown fine when using the default properties files and
> > most are shown fine when running in the French locale except for a few
> > random strings. These strings continue to show in english for no
> > apparent reason. It's not any single properties file that's causing
> > problems as some stings in a single properties file display fine but
> > others don't. These strings don't have any odd characters and eclipse
> > has been set to use uft-8.
>
> > Does anyone have any suggestions as to why these random strings could
> > be reverting back to the default string? I can't seem to fins much by
> > searching (mainly because I'm not sure what to search for!).
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT integrated with JSF

2008-12-17 Thread olivier FRESSE
It's easy to mix both.

you just need an interceptor... and a few tricks :-)


Take a look at this excellent post :
http://weblogs.java.net/blog/caroljmcdonald/archive/2008/01/sample_applicat_4.html

( and
http://weblogs.java.net/blog/caroljmcdonald/archive/2007/07/sample_applicat_1.html
  the first link is an update to the latest versions of Seam & glassfish )

Once you've discovered the power of seam, you can't live without it :-)

O.


2008/12/17 William Dutton 

> thankyou for the reply.
>
> what i'm working on is made from woodstock widgets from netbeans with jsf,
> we have ejb3 persistent objects so we could go via the ejb3 route, we just
> need some items to talk to the the database entities to change them, the
> jsf/woodstock components are written with alot of boolean switches to turn
> on and off parts of the really large pages. i'm talking about 3-4 large
> tables of information.
>
> there is a menu system made with woodstock plugins. tho due to the
> complexity of the pages, they are quite hard to get in the correct position
> in all browsers.
>
> i wonder how difficult getting seam into the mix or ejb3 is going to be?
>
> On Wed, Dec 17, 2008 at 6:47 PM, olivier FRESSE 
> wrote:
>
>> I'm quite overloaded this week, so I won't have too much time to make a
>> detailed answer :-(
>>
>> From my understanding G4JSF is dead and replaced by ajax4jsf, which is
>> quite different.
>> It makes no use of GWT.
>>
>> If you want a clean and powerful way of keeping state in a GWT/Jsf mixed
>> appication ,
>> seam is really a nice answer.
>>
>> You can really use seam as a "glue" between facelets pages and GWT
>> modules.
>>
>> Basicaly, seam provides "components" (beans in fact) , which can be used
>> from GWT modules and from JSF pages.
>> From a facelet view, it's really easy to get values and call methods with
>> EL.
>>
>> From GWT, seam remoting enables the use of seam components instead of OOTB
>>  GWT services.
>>
>> I hope to get some tme to make a little example. It's not easy to extract
>> a sample from my current project...
>>
>>
>>
>>
>> I do agree that it's not easy to see the light in all these frameworks...
>> but here is the solution I use I' don't know if it's the best, but
>> well it works for me.
>>
>> We use EJB3 & Glassfish.
>>
>>
>>
>>
>>
>>
>> 2008/12/14 will.dutt 
>>
>>
>>> The jboss doc link gives heaps of food for thought.
>>>
>>> Just wondering, am i correct to say that G4JSF became ajax4jsf which
>>> then became richfaces ?
>>>
>>> This kinda makes it quite confusing when i have jsf and gwt and no
>>> idea what i can use to glue it together :P
>>>
>>> An example would be very helpful :) on the seam application, and maybe
>>> on the other ways of pulling information. :)
>>>
>>> I have used spring in the past, tho not starting out and it already
>>> had a very structured hierarchy and as i'm a fresh out of uni, and
>>> this is mostly a green feilds type project, there is way to many
>>> technologies to look at and yet not enough time in the day. :/
>>>
>>> The jsf website that i'm now working on had a pre existing database
>>> backend in oracle.  The developer before me used netbeans out of the
>>> box features to generate a brand new interface to the oracle database.
>>> (can't remember the backend infrastructure, will find out in the
>>> morning when i'm at work)
>>>
>>> The simple stuff is done and now its to the hard stuff.
>>>
>>> i have thought of doing through GWT DOM objects, but i would like a
>>> cleaner way of keeping state, the application will be doing big edits
>>> to the database backend if they apply the changes they make and i
>>> would like to allow any not pre-commited changes to either linger till
>>> out of session of save for next session which means that GWT DOM
>>> object pulling for the id/keys won't do.
>>>
>>>
>>> Google group discussions seems to be quite nice, tho i do miss the
>>> spell check feature that is in gmail. :)
>>>
>>> On Dec 14, 5:50 pm, "olivier FRESSE"  wrote:
>>> > Hi will,
>>> > I work on a project where we use GWT, seam and facelet. The server is a
>>> > glassfish one.
>>> > Seam is a great framework, and I really see it as a great enhancement
>>> to
>>> > JSF.
>>> > It provides many components, including "Seam Remoting".
>>> > Seam Remoting allows a remote access to seam components,using Ajax.
>>> > And you can replace GWT Services by Remoting calls...
>>> > This allows you to easily share data between JSF/Facelet pages and GWT
>>> > modules via
>>> > Seam contexts.
>>> >
>>> > see :
>>> http://docs.jboss.com/seam/2.1.1.CR2/reference/en-US/html_single/#gwt
>>> >
>>> > Of course, this may mean deep modifications in your project.
>>> > If you wan to integrate a simple GWT module in a page and read hidden
>>> input
>>> > values
>>> > from the page I see 2 solutions :
>>> >
>>> > JSNI : Allows you to call JScript in the page.
>>> >
>>> > GWT DOM object : Allows you to manipulate DOM objects.
>>> >
>>> > I'll find  a sample  and post it 

Re: GWT integrated with JSF

2008-12-17 Thread William Dutton
thankyou for the reply.

what i'm working on is made from woodstock widgets from netbeans with jsf,
we have ejb3 persistent objects so we could go via the ejb3 route, we just
need some items to talk to the the database entities to change them, the
jsf/woodstock components are written with alot of boolean switches to turn
on and off parts of the really large pages. i'm talking about 3-4 large
tables of information.

there is a menu system made with woodstock plugins. tho due to the
complexity of the pages, they are quite hard to get in the correct position
in all browsers.

i wonder how difficult getting seam into the mix or ejb3 is going to be?

On Wed, Dec 17, 2008 at 6:47 PM, olivier FRESSE wrote:

> I'm quite overloaded this week, so I won't have too much time to make a
> detailed answer :-(
>
> From my understanding G4JSF is dead and replaced by ajax4jsf, which is
> quite different.
> It makes no use of GWT.
>
> If you want a clean and powerful way of keeping state in a GWT/Jsf mixed
> appication ,
> seam is really a nice answer.
>
> You can really use seam as a "glue" between facelets pages and GWT modules.
>
> Basicaly, seam provides "components" (beans in fact) , which can be used
> from GWT modules and from JSF pages.
> From a facelet view, it's really easy to get values and call methods with
> EL.
>
> From GWT, seam remoting enables the use of seam components instead of OOTB
>  GWT services.
>
> I hope to get some tme to make a little example. It's not easy to extract a
> sample from my current project...
>
>
>
>
> I do agree that it's not easy to see the light in all these frameworks...
> but here is the solution I use I' don't know if it's the best, but well
> it works for me.
>
> We use EJB3 & Glassfish.
>
>
>
>
>
>
> 2008/12/14 will.dutt 
>
>
>> The jboss doc link gives heaps of food for thought.
>>
>> Just wondering, am i correct to say that G4JSF became ajax4jsf which
>> then became richfaces ?
>>
>> This kinda makes it quite confusing when i have jsf and gwt and no
>> idea what i can use to glue it together :P
>>
>> An example would be very helpful :) on the seam application, and maybe
>> on the other ways of pulling information. :)
>>
>> I have used spring in the past, tho not starting out and it already
>> had a very structured hierarchy and as i'm a fresh out of uni, and
>> this is mostly a green feilds type project, there is way to many
>> technologies to look at and yet not enough time in the day. :/
>>
>> The jsf website that i'm now working on had a pre existing database
>> backend in oracle.  The developer before me used netbeans out of the
>> box features to generate a brand new interface to the oracle database.
>> (can't remember the backend infrastructure, will find out in the
>> morning when i'm at work)
>>
>> The simple stuff is done and now its to the hard stuff.
>>
>> i have thought of doing through GWT DOM objects, but i would like a
>> cleaner way of keeping state, the application will be doing big edits
>> to the database backend if they apply the changes they make and i
>> would like to allow any not pre-commited changes to either linger till
>> out of session of save for next session which means that GWT DOM
>> object pulling for the id/keys won't do.
>>
>>
>> Google group discussions seems to be quite nice, tho i do miss the
>> spell check feature that is in gmail. :)
>>
>> On Dec 14, 5:50 pm, "olivier FRESSE"  wrote:
>> > Hi will,
>> > I work on a project where we use GWT, seam and facelet. The server is a
>> > glassfish one.
>> > Seam is a great framework, and I really see it as a great enhancement to
>> > JSF.
>> > It provides many components, including "Seam Remoting".
>> > Seam Remoting allows a remote access to seam components,using Ajax.
>> > And you can replace GWT Services by Remoting calls...
>> > This allows you to easily share data between JSF/Facelet pages and GWT
>> > modules via
>> > Seam contexts.
>> >
>> > see :
>> http://docs.jboss.com/seam/2.1.1.CR2/reference/en-US/html_single/#gwt
>> >
>> > Of course, this may mean deep modifications in your project.
>> > If you wan to integrate a simple GWT module in a page and read hidden
>> input
>> > values
>> > from the page I see 2 solutions :
>> >
>> > JSNI : Allows you to call JScript in the page.
>> >
>> > GWT DOM object : Allows you to manipulate DOM objects.
>> >
>> > I'll find  a sample  and post it there :-)
>> >
>> > O.
>> >
>> > 2008/12/13 will.dutt 
>> >
>> >
>> >
>> > > i've been look around for anything that was happening with these 2
>> > > great components. sadly the g4jsf is a dead end :(.
>> >
>> > > i've got a JSF website that is now hitting the boundaries of what is
>> > > possible in a static html refresh browser and needs GWT badly.
>> >
>> > > does anyone have any good examples of integrating GWT components to
>> > > pull information from the page its placed on and rpc the rest of the
>> > > content it needs?
>> >
>> > > i can place a GWT compenent on the page with div's which is good, 

Re: Tree Graph using GWT

2008-12-17 Thread kilkenny

Hi Paddy

The gwt-google-apis project (http://code.google.com/p/gwt-google-
apis/) recently released a GWT-wrapper for the Google Visualization
API (http://code.google.com/intl/de-CH/apis/visualization/). They may
have something useful, for example the organizational chart..?

Regards, Adrian
--
http://traceurl.com

On 16 Dez., 18:11, Paddy  wrote:
> Hi Folks,
>
> I'm trying to create a treeGraph in GWT to represent a hierarchical
> tree structure,
> I see alot of graphs and charts out there such a gChart but I see no
> tree type graphs there.
>
> Anyone any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: BREAK tag from RichTextArea.getHTML()

2008-12-17 Thread Thomas Broyer


On 17 déc, 02:52, jchimene  wrote:
> Hi,
>
> I'm running the results of RichTextArea.getHTML() through xsltproc.
> It's complaining about unclosed tags. The culprit seems to be the
> break tag:
> 
>         
>                 some
> text
>         
> 
>
> doesn't parse (parser error : Opening and ending tag mismatch: br line
> xxx and condition)
>
> When I convert to:
> 
>         
>                 some
> text
>         
> 
>
> happiness ensues.
>
> Any thoughts?

HTML is not XML; XHTML would be, but that's not what browsers give you
(why should they?)

Either use an HTML parser (http://about.validator.nu/htmlparser/ ) and
then serialize back to XML; or try to get XML in the first place (put
RichTextArea.getHTML() result in a hidden div with setInnerHTML and
then walk the DOM tree, building XML in a StringBuilder --should be
much faster than replicating the tree in a com.google.gwt.xml.client.*
tree that you would serialize back)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to forward in GWT?

2008-12-17 Thread Jason Morris

Window.Location.assign(String url)

Should do what you're looking for.

crnl...@gmail.com wrote:
> I have a problem when creating forward in different apps in GWT.
> I tryed to implement it by using method "WIndow.Location.replace
> (String url)", But by this way I can't back to History.
> "Window.open()" may not be use because of Refusing by most of browers.
> Is there another method to implement forwarding?
> Anybody help? Thanks!
> > 
> 

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



Re: Who's Using GWT?

2008-12-17 Thread ofrias

Hi Arthur.

The datepicker is in the homepage which is not GWT (only result pages
both for flights and hotels are).
It uses DHTML Calendar:
http://www.dynarch.com/projects/calendar/

The result grid is custom built using a table.

Oscar - http://www.trabber.com



On 12 dic, 16:29, "Arthur Kalmenson"  wrote:
> Hi ofrias,
>
> Trabber.com looks very impressive. A very nice and clean website. Well done 
> :).
>
> A couple of questions, what date picker did you use? What did you use
> for your result grid? All custom built?
>
> Anyway, great job. Thanks for sharing.
>
> --
> Arthur Kalmenson
>
> On Fri, Dec 12, 2008 at 5:17 AM, ofrias  wrote:
>
> > We are using it at Trabber.com for the flight and hotel metasearch
> > results pages.
>
> > For us the best features are:
> > - you can forget about Javascript quirks
> > - efficiency (runtime speed, rpc speed, javascript size)
>
> > About the requested features, I know this is quite specific but we
> > would like to have a SliderBar with two knobs:
> >http://code.google.com/p/google-web-toolkit-incubator/issues/detail?i...
>
> > Thanks for the tool!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT integrated with JSF

2008-12-17 Thread olivier FRESSE
I'm quite overloaded this week, so I won't have too much time to make a
detailed answer :-(

>From my understanding G4JSF is dead and replaced by ajax4jsf, which is quite
different.
It makes no use of GWT.

If you want a clean and powerful way of keeping state in a GWT/Jsf mixed
appication ,
seam is really a nice answer.

You can really use seam as a "glue" between facelets pages and GWT modules.

Basicaly, seam provides "components" (beans in fact) , which can be used
from GWT modules and from JSF pages.
>From a facelet view, it's really easy to get values and call methods with
EL.

>From GWT, seam remoting enables the use of seam components instead of OOTB
 GWT services.

I hope to get some tme to make a little example. It's not easy to extract a
sample from my current project...




I do agree that it's not easy to see the light in all these frameworks...
but here is the solution I use I' don't know if it's the best, but well
it works for me.

We use EJB3 & Glassfish.






2008/12/14 will.dutt 

>
> The jboss doc link gives heaps of food for thought.
>
> Just wondering, am i correct to say that G4JSF became ajax4jsf which
> then became richfaces ?
>
> This kinda makes it quite confusing when i have jsf and gwt and no
> idea what i can use to glue it together :P
>
> An example would be very helpful :) on the seam application, and maybe
> on the other ways of pulling information. :)
>
> I have used spring in the past, tho not starting out and it already
> had a very structured hierarchy and as i'm a fresh out of uni, and
> this is mostly a green feilds type project, there is way to many
> technologies to look at and yet not enough time in the day. :/
>
> The jsf website that i'm now working on had a pre existing database
> backend in oracle.  The developer before me used netbeans out of the
> box features to generate a brand new interface to the oracle database.
> (can't remember the backend infrastructure, will find out in the
> morning when i'm at work)
>
> The simple stuff is done and now its to the hard stuff.
>
> i have thought of doing through GWT DOM objects, but i would like a
> cleaner way of keeping state, the application will be doing big edits
> to the database backend if they apply the changes they make and i
> would like to allow any not pre-commited changes to either linger till
> out of session of save for next session which means that GWT DOM
> object pulling for the id/keys won't do.
>
>
> Google group discussions seems to be quite nice, tho i do miss the
> spell check feature that is in gmail. :)
>
> On Dec 14, 5:50 pm, "olivier FRESSE"  wrote:
> > Hi will,
> > I work on a project where we use GWT, seam and facelet. The server is a
> > glassfish one.
> > Seam is a great framework, and I really see it as a great enhancement to
> > JSF.
> > It provides many components, including "Seam Remoting".
> > Seam Remoting allows a remote access to seam components,using Ajax.
> > And you can replace GWT Services by Remoting calls...
> > This allows you to easily share data between JSF/Facelet pages and GWT
> > modules via
> > Seam contexts.
> >
> > see :
> http://docs.jboss.com/seam/2.1.1.CR2/reference/en-US/html_single/#gwt
> >
> > Of course, this may mean deep modifications in your project.
> > If you wan to integrate a simple GWT module in a page and read hidden
> input
> > values
> > from the page I see 2 solutions :
> >
> > JSNI : Allows you to call JScript in the page.
> >
> > GWT DOM object : Allows you to manipulate DOM objects.
> >
> > I'll find  a sample  and post it there :-)
> >
> > O.
> >
> > 2008/12/13 will.dutt 
> >
> >
> >
> > > i've been look around for anything that was happening with these 2
> > > great components. sadly the g4jsf is a dead end :(.
> >
> > > i've got a JSF website that is now hitting the boundaries of what is
> > > possible in a static html refresh browser and needs GWT badly.
> >
> > > does anyone have any good examples of integrating GWT components to
> > > pull information from the page its placed on and rpc the rest of the
> > > content it needs?
> >
> > > i can place a GWT compenent on the page with div's which is good, but
> > > i'm having trouble getting information from the page (eg ID that link
> > > to a database). what is the command to do that?
> >
>

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



Problem with Smartgwt and Activemq's Ajax code

2008-12-17 Thread Pete Kay
Hi,

I have GWT jsni wrapper built for Activemq's amq.js without any problem.

The problem is when I migrated the GWT code to smartgwt, smartgwt seems to
have function name conflict with functions in prototype.js.  I tried
modifyng the function names in prototype.js ( the find and select
functions), but the events can't be received anymore.

Does anyone have any idea how this problem maybe resolved?

Thanks,
Pete

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