Re: Adding a MouseOverHandler to CellList

2011-08-03 Thread Sébastien Tromp
Thanks, that's what I was looking for. Sorry to have overlooked that.
For information, I used this and the code snippet from
therehttp://stackoverflow.com/questions/4699232/mouseover-of-flextable-with-gwt
to
build a custom popup, and hide it on mouseout.
-- 
Sébastien Tromp

2011/8/3 Y2i yur...@gmail.com

 AbstractCellT.onBrowserEvent() should be called if you call
 super(mouseover) in the constructor of an AbstractCellT subclass.

 http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/gwt/cell/client/AbstractCell.html#AbstractCell(java.lang.String...)

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


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



showRelativeTo doesn't work the first time

2011-08-03 Thread Dennis Haupt
there seems to be something wrong with my popups. the first time i try to
show a popup via showRelativeTo(someWidget), it simply doesn't show with
firefix and chrome. ie9 works fine.
both times, the coordinates are equal. PopupPanel.setPopupPosition is called
with the same parameters, so it's not an out-of-screen-coordinates problem.
any hints?

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



Service method that returns HashMapString, Object can't carry anything but String

2011-08-03 Thread Christophe Marchand
Hi !

I have a Service method that returns a HashMapString, Object. I have to put 
String, Integer, Long, BigDecimal and Date as values in.
If I put only String, it works perfectly.
If I put anything else, I have a serialization problem :
com.google.gwt.user.client.rpc.SerializationException: Type 
'java.math.BigDecimal' was not included in the set of types which can be 
serialized by this SerializationPolicy or its Class object could not be loaded. 
For security purposes, this type will not be serialized.

Any idea ?

Thanks in advance,
Christophe

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



java.lang.IllegalArgumentException: Unknown proxy type

2011-08-03 Thread Y2i
Just tried to migrate from 2.2 to 2.4 RC1.

First, the project didn't compile because of internal compiler errors.  All 
obsolete RF-related stuff is removed from 2.4 (good), but if the project 
uses RF there is no way to move to 2.4 without migrating from gwt to 
web.bindery.
After migrating from gwt to web.bindery the internal compiler error 
disappeared (good).
After fixing some incompatibilities the project now compiles and the 
application starts (good).
But it fails to run in exactly the same spot as when moving from 2.2 to 2.3 
without migration from gwt to web.bindery (bad).  And in 2.2 the application 
runs fine.

Here is the culprit:

interface P extends EntityProxy { ... }
interface PA extends P { ... }
interface PB extends P { ... }

interface R extends RequestContext {
  RequestLong queryCountOfP(P p);
}

When queryCountOfP() accepts an instance of PA, the onSuccess() callback is 
called fine.
When queryCountOfP() accepts an instance of PB, the failure occurs:

java.lang.IllegalArgumentException: Unknown proxy type PB

The server receives the call, the argument type of the service method is 
correct (B), but after returning to the client the following method throws 
an exception:
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.createProxy(AbstractRequestContext.java:489)
Neither onSuccess() nor onFailure() nor onViolation() gets called.

Why does the method fails on PB but not on PA?  Is there anything wrong with 
this usage pattern?

Thanks!

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



Отг: Do Beanvalidation(JSR-303) and editor framework play along well ?

2011-08-03 Thread Miroslav Genov
Yeah, in 2.3 validation is a little bit broken, cause it was fully 
refactored after GWT 2.2. The things are working well in GWT 2.4-rc1 I 
think. 

DynaTableRf contains a nice validation example. To check whether JSR-303 is 
working, just check that demo project but don't forget to remove this 
validation check from PersonEditorWorkflow.java

// Check for errors
if (editorDriver.hasErrors()) {
  dialog.setText(Errors detected locally);
//  return;
}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Mc9rsviUCqAJ.
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: About GWT opinion in thoughtworks technology radar july 2011

2011-08-03 Thread Paul Robinson

On 02/08/11 18:02, Michael Allan wrote:

Emilio Bravo wrote:

http://www.thoughtworks.com/articles/technology-radar-july-2011#Platforms


They really like Javascript, and that gives a strong bias to their report. I 
suspect generating Javascript from something else probably feels morally wrong 
to them. Personally, I'm *much* happier writing in Java and very pleased that 
GWT allows me to create Javascript without having to write Javascript.

For enterprise use, they made no mention of any of the benefits of GWT. Like 
the tool set, being able to share code between client and server, code 
splitting, optimised Javascript, deferred binding and more.

This report presents their view, and doesn't try to be balanced or unbiased.

First, in many ways, JavaScript is more powerful and expressive than
Java, so we suspect that the generation is going in the wrong
direction.

more powerfull for that?

This critique makes no sense, as the two languages are comparable in
expressivity.  Admittedly something is lost in translating from one to
the other, and maybe that's what they want to say.

The tool support for Java is really very good. That counts for an awful lot in terms of 
helping to save developer time and be able to produce good results. Besides, what on 
earth does generation is going in the wrong direction mean? Browsers run 
javascript, so it's the end product of the compilation. Reversing the direction makes no 
sense. As long as you can express everything reasonably in Java, and you can convert that 
to javascript well (which GWT can), I don't see the problem. But then, I'm not in love 
with javascript.



Secondly, it is impossible to hide a complex abstraction
difference like that from event-driven desktop to stateless-web
without leaky abstraction headaches eventually popping up

I can't comment, I do not know the compilation process.

The JavaScript engines that GWT targets are not stateless.  There is
no such gross incompatibility between the source and target platforms.
I wonder what they were thinking?

If there are abstraction headaches within GWT, Google are doing pretty well at 
hiding them. It's not perfect (eg key mappings used in the keyUp, keyPressed 
events etc), but we're stuck with the web browser as the deployment engine and 
that limits what can be done while achieving very high browser compatibility. 
They may have a point, but is it really significant?

However, just like Michael, I'm not really sure what they were trying to say. 
Their comments here leave me feeling like they're complaining about some kind 
of perceived potential problem rather than a concrete issue.




Third, it suffers from the same shortcomings of many elaborate
frameworks, where building simple, aligned applications is quick
and easy, building more sophisticated but not supported
functionality is possible but difficult, and building the level of
sophistication required by any non-trivial application becomes
either impossible or so difficult it isn’t reasonable.

What is meant by functionality not supported?.  Program non-trivial
applications with GWT is easier than directly in javascript

GWT isn't actually a framework, it's a toolkit. But, putting that aside, I've 
built a complex application with GWT and I don't think their characterisation 
of the feasibility of doing this is at all accurate. However, things did take 
me longer when I was new to GWT (and not particularly familiar with css either 
at the time). Whether that's just the normal learning curve or something else, 
I can no longer tell.

Paul

--
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 CELLTABLE How to restore old value in cell if validation fails

2011-08-03 Thread vaibhav gwt
Thanks Loan :)
I can restore old value in specific cell if validation fails.

Is it possible that all column values from particular row restore to
old value ?
|| ID || Dept || Code || RNO || RCode
|| .||ZCode ||
|| 1  ||  CS   || 001  ||  3  ||  030
|| .||Q1||
|| 2 ||  DS   || 001  ||  5  ||   040
|| .||S1 ||

Suppose In above editable grid I changed 1st record i.e
|| 1  ||  CS   || 001  ||  3  ||  030
|| .||Q1||
changed to
|| 1  ||  BP   || 010  ||  3  ||  003
||.||Q1||

Is there any way to restore old object(row) values instead to clearing
cell view data for each column and redraw editable grid.

In Short revert record to old value which is selected by our checkbox
(All or selected chkbox only i.e selectionModel.isSelected(object) )

My Grid contain (2-N) column so I am asking this question ?

On Aug 2, 5:42 pm, Ioan Agopian ioan.agop...@gmail.com wrote:
 Hi Vaibhav,

 You can do it like this:
 // clear incorrect data
 cell.clearViewData(KEY_PROVIDER.getKey(object));
 cellTable.redraw();

 Where cell is the TextEditCell that you're using for that column.

 Regards,
 Ioan

 On Aug 2, 12:59 pm, vaibhav bhalke bhalke.vaib...@gmail.com wrote:







  Hi all,

  PFA WebEx recording for Issue.

  I want to used editableNumbercell like intger,decimal etc.. But there is no
  such gwt widget present so I am using editable text cell and using
  validation for numbers when user update value in cell.

  How to avoid cell editing when validation fails.

  if validation fail then editable-text cell value restored to old value.How
  to do that?

  intgerColumn.setFieldUpdater(new FieldUpdaterRecordInfo, String() {
          public void update(int index, RecordInfo object, String value) {
              // Called when the user changes the value.
              if(value.matches((-)?(\\d){1,8})){
                  object.setColumnInRecordEdited(true);
                  object.setValue(value);
                  RecordData.get().refreshDisplays();
              }else{
                  Window.alert(Specify valid integer value for parameter);
                  // How to rest old value here? currently update value
  set to cell

              }

          }
      });

  Any help or guidance in this matter would be appreciated.

  --
  Best Regards,
  Vaibhav Bhalke
  About me :http://about.me/vaibhavbhalke

  http://about.me/vaibhavbhalke

   Issue1-How to restore old value in cell (if validation fails).wrf
  203KViewDownload

-- 
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: Extending/embedding DialogBox

2011-08-03 Thread Wulfsberg
Aidan, that was exactly my point: You lose UIBinder control over the
caption there, forcing you to create your dialog box from a mix of
Java parameters and UIBinder XML, which grates somewhat. In my
opinion, it should be either/or, not a mix.

I can see a point for making a fairly standardized dialog (like, say,
an OK/Cancel box) a subclass, and feed all information (caption and
lead text) through Java as a single (constructor) call, but with more
complex dialogs I'd like to be able to design them - and let other
people modify them - with the UIBinder system.

It seems to me there is a bit of a mismatch in the design here.

JWN

On Aug 3, 12:24 am, Aidan O'Kelly aida...@gmail.com wrote:
 You can actually just change your UiBinder java class to inherit from
 DialogBox, and call setWidget(uiBinder.createAndBind(this)) instead of
 the regular, initWidget() method of Composite.

 Your UiBinder template then just looks like this:

 ui:UiBinder ... 
         g:HTMLPanel
                 Stuff.
         /g:HTMLPanel
 /ui:UiBinder

 // To use:
 CustomDialog dialog = new CustomDialog();
 // etc.







 On Tue, Aug 2, 2011 at 8:25 PM, Brian Reilly brian.irei...@gmail.com wrote:
  I've found that you can add a visible=false attribute to the g:DialogBox
  tag to keep it from being displayed on page load. However, I think this will
  cause the dialog box UI to be constructed even if it's never displayed.
  I'm guessing that the you're not supposed to do this comment you're
  referring to is this comment from the PopupPanel javadocs:

  A PopupPanel should not generally be added to other panels; rather, it
  should be shown and hidden using the show() and hide() methods.

  Derek's approach is the only way I can think of to use g:DialogBox in a UI
  template without it being automatically added to another panel. However, I
  don't like that approach because the custom dialog box does not actually
  subclass DialogBox. This necessitates having like-named methods that proxy
  to the DialogBox returned from UiBinder, such as center() in Derek's
  example. Unlike cases where it makes sense to subclass Composite to hide the
  root widget's API, the custom dialog box really is a dialog box and should
  inherit the DialogBox API.

  What I settled on was to subclass DialogBox and use UiBinder to build the
  widget passed to DialogBox.setWidget(). My hope is that this encourages its
  use from java code instead of a UI template. In reality, my custom dialogs
  are no more opinionated about where they're used than GWT's own DialogBox
  is, which has a nice harmonious feel to it.
  -- Brian

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

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



Add widget to new window browser?!

2011-08-03 Thread Ahmed
Hello,
I have a GWT application with links to services by clicking on a
link,a blank window is opened which I have to insert a progressBar
(widget I created myself) until generation of service return url so I
redirect the new  window to that url.
So my question how to inject a new widget into new window browser.
Note: I used JSNI  to open new window this way
win =$wnd.open = $ (url, name, );
and when service is generated i use this:wnd.location = url;

Any help would be appreciated.
Thanks in advance for your helps

-- 
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: http://www.google.com/hotelfinder

2011-08-03 Thread Deepak Singh
Hi Gal,

I followed the instructions and prepared a uibinder which looks same as
hotel finder two way slider.

g:HTMLPanel
div class=GPTJ3ICDOV
div style=align:left
div class=GPTJ3ICDLV
span class=GPTJ3ICDMVPrice per night/span
span class=GPTJ3ICDKVg:Label
ui:field=slidingData/g:Label/span
/div
/div
div class=GPTJ3ICDPV
div class=GPTJ3ICDIU
div class=GPTJ3ICDOU ui:field=container
div class=GPTJ3ICDNU/div
div class=GPTJ3ICDBV  style=left: 0px; width:
190px;/div
g:Image  styleName=GPTJ3ICDMU
ui:field=leftSlider/g:Image
g:Image styleName=GPTJ3ICDAV
ui:field=rightSlider/g:Image
/div
/div
/div
/div

/g:HTMLPanel

Now in java class, i add handlers to the images leftSlider and righSlider as
follows

public void addhandlers() {
leftSlider.addDragEnterHandler(new DragEnterHandler() {

@Override
public void onDragEnter(DragEnterEvent event) {
}
});
leftSlider.addDragExitHandler(new DragExitHandler() {

@Override
public void onDragExit(DragExitEvent event) {
}
});
leftSlider.addDragOverHandler(new DragOverHandler() {

@Override
public void onDragOver(DragOverEvent event) {

}
});
leftSlider.addDropHandler(new DropHandler() {

@Override
public void onDrop(DropEvent event) {
}
});
leftSlider.addMouseMoveHandler(new MouseMoveHandler() {

@Override
public void onMouseMove(MouseMoveEvent event) {

leftSlider.getElement().getStyle().setLeft(event.getRelativeX(container),
Unit.PX);

}
});

rightSlider.addMouseMoveHandler(new MouseMoveHandler() {

@Override
public void onMouseMove(MouseMoveEvent event) {

rightSlider.getElement().getStyle().setLeft(event.getRelativeX(container),
Unit.PX);

}
});
}
Initially when the page renders, it is fine. When i do mouse over the slider
images,
i observe that
1) MouseMoveHandler works only with mouse movement from left to right. If a
move the mouse from right direction to left, nothing happens.
2) Also, how do i check bounds?
3) How to set the minimum and maximum value of the sliders?

Thanks
Deepak



On Tue, Aug 2, 2011 at 5:44 AM, Gal Dolber gal.dol...@gmail.com wrote:

 a quick decoding of the one there:

 // Markup

 .labelLeft {
 left:-12px; // Min position
 height: 25px;
 width: 25px;
 background-color: #444;
 }

 .labelRight {
 left:178px; // Max position
 height: 25px;
 width: 25px;
 background-color: #444;
 }

 g:HTMLPanel
 div
 div style=float:leftLabel left/div
 div style=float:rightLabel right/div
 /div

 div ui:field=container
 div style=left: 0px; width: 190px;
 height:5px;background-color:#777/div
 g:Label ui:field=leftLabel
 styleName={style.labelLeft}/g:Label
 g:Label
 ui:field=rightLabel styleName={style.labelRight}/g:Label
 /div
 /g:HTMLPanel

 // For the leftLabel
 If you will use html use drag start, drag move and drag end events and do
 not capture the event, everything else is the same.
 If you wont use html5, on mouse down event do:
 Event.setCapture(leftLabel.getElement());
 And on mouse up event Event.releaseCapture(leftLabel.getElement());
 Capturing the element means that all events will be passed to that element
 till release.
 Then you need to implement the mouse move for the label:

1. Find the mouse position relative to the sliders container
(event.getRelativeX(container) and event.getRelativeY(container))
2. Calculate the current position
3. Check bounds
4. Set the position of the slider (basically set the left style to the
position you want)

 do the same for the right slider, add some pretty styles and you are ready
 to go.

 Regards

 On Mon, Aug 1, 2011 at 4:09 PM, Karthik Reddy karthik.ele...@gmail.comwrote:

 The feedback widget seems identical to the one used in google plus.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/_9l2ocSOyxgJ.

 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.




 --
 Guit: Elegant, beautiful, modular and *production ready* gwt applications.

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




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

Re: http://www.google.com/hotelfinder

2011-08-03 Thread Gal Dolber
mmm, its a bit more complicated than that.

All what you need is in here:
http://code.google.com/p/google-web-toolkit-incubator/source/browse/trunk/src/com/google/gwt/gen2/picker/client/SliderBar.java

On Wed, Aug 3, 2011 at 7:24 AM, Deepak Singh deepaksingh...@gmail.comwrote:

 Hi Gal,

 I followed the instructions and prepared a uibinder which looks same as
 hotel finder two way slider.

 g:HTMLPanel
 div class=GPTJ3ICDOV
 div style=align:left
 div class=GPTJ3ICDLV
 span class=GPTJ3ICDMVPrice per night/span
 span class=GPTJ3ICDKVg:Label
 ui:field=slidingData/g:Label/span
 /div
 /div
 div class=GPTJ3ICDPV
 div class=GPTJ3ICDIU
 div class=GPTJ3ICDOU ui:field=container
 div class=GPTJ3ICDNU/div
 div class=GPTJ3ICDBV  style=left: 0px; width:
 190px;/div
 g:Image  styleName=GPTJ3ICDMU
 ui:field=leftSlider/g:Image
 g:Image styleName=GPTJ3ICDAV
 ui:field=rightSlider/g:Image
 /div
 /div
 /div
 /div

 /g:HTMLPanel

 Now in java class, i add handlers to the images leftSlider and righSlider
 as follows

 public void addhandlers() {
 leftSlider.addDragEnterHandler(new DragEnterHandler() {

 @Override
 public void onDragEnter(DragEnterEvent event) {
 }
 });
 leftSlider.addDragExitHandler(new DragExitHandler() {

 @Override
 public void onDragExit(DragExitEvent event) {
 }
 });
 leftSlider.addDragOverHandler(new DragOverHandler() {

 @Override
 public void onDragOver(DragOverEvent event) {

 }
 });
 leftSlider.addDropHandler(new DropHandler() {

 @Override
 public void onDrop(DropEvent event) {
 }
 });
 leftSlider.addMouseMoveHandler(new MouseMoveHandler() {

 @Override
 public void onMouseMove(MouseMoveEvent event) {

 leftSlider.getElement().getStyle().setLeft(event.getRelativeX(container),
 Unit.PX);

 }
 });

 rightSlider.addMouseMoveHandler(new MouseMoveHandler() {

 @Override
 public void onMouseMove(MouseMoveEvent event) {

 rightSlider.getElement().getStyle().setLeft(event.getRelativeX(container),
 Unit.PX);

 }
 });
 }
 Initially when the page renders, it is fine. When i do mouse over the
 slider images,
 i observe that
 1) MouseMoveHandler works only with mouse movement from left to right. If a
 move the mouse from right direction to left, nothing happens.
 2) Also, how do i check bounds?
 3) How to set the minimum and maximum value of the sliders?

 Thanks
 Deepak




 On Tue, Aug 2, 2011 at 5:44 AM, Gal Dolber gal.dol...@gmail.com wrote:

 a quick decoding of the one there:

 // Markup

 .labelLeft {
 left:-12px; // Min position
 height: 25px;
 width: 25px;
 background-color: #444;
 }

 .labelRight {
 left:178px; // Max position
 height: 25px;
 width: 25px;
 background-color: #444;
 }

 g:HTMLPanel
 div
 div style=float:leftLabel left/div
 div style=float:rightLabel right/div
 /div

 div ui:field=container
 div style=left: 0px; width: 190px;
 height:5px;background-color:#777/div
 g:Label ui:field=leftLabel
 styleName={style.labelLeft}/g:Label
 g:Label
 ui:field=rightLabel styleName={style.labelRight}/g:Label
 /div
 /g:HTMLPanel

 // For the leftLabel
 If you will use html use drag start, drag move and drag end events and do
 not capture the event, everything else is the same.
 If you wont use html5, on mouse down event do:
 Event.setCapture(leftLabel.getElement());
 And on mouse up event Event.releaseCapture(leftLabel.getElement());
 Capturing the element means that all events will be passed to that element
 till release.
 Then you need to implement the mouse move for the label:

1. Find the mouse position relative to the sliders container
(event.getRelativeX(container) and event.getRelativeY(container))
2. Calculate the current position
3. Check bounds
4. Set the position of the slider (basically set the left style to the
position you want)

 do the same for the right slider, add some pretty styles and you are ready
 to go.

 Regards

 On Mon, Aug 1, 2011 at 4:09 PM, Karthik Reddy 
 karthik.ele...@gmail.comwrote:

 The feedback widget seems identical to the one used in google plus.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/_9l2ocSOyxgJ.

 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 

App launch stopped working. Error at compiling

2011-08-03 Thread jpp1jpp1
I'm already stuck for hours with this, please help me!

I can't figure what has changed. It must be something with my Eclipse 
installation, my run configuration or the tomcat server. When I get in 
development mode I get this error after opening the web page:

12:58:20.156 [ERROR] [appname] Failed to load module 'appname' from user 
agent 'Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0' at 
localhost:3499

java.lang.ClassFormatError: Invalid pc in LineNumberTable in class file 
org/eclipse/jdt/internal/compiler/lookup/TypeBinding
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at 
com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.lt;initgt;(CompilationStateBuilder.java:153)
at 
com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:384)
at 
com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:299)
at 
com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:325)
at 
com.google.gwt.dev.DevModeBase$UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:105)
at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:190)
at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:662)

I haven't found anything in the web about this error. Any hint?


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



Implementing a Calendar (Week) View with Cell Tables

2011-08-03 Thread P.G.Taboada
Hi,

did anyone try to implement a calendar with cell widgets? There are a
two google like calendar gwt widgets out there, but they offer more
than I need and they are buggy.

My old jsp/struts based solution is a simple table with lots of row-
spans. I don't need drag and drop.

The cell table is quite close to what I need, the only problem is the
data structure: the cell table works fine for row based data
structures, calendars are column based.

I could shift my data around, but I am sure if this would not really
make me happy. It would eternally feel like a workaround.
So I am thinking in using cells to render my data and use a flex table
to put things into.

Which joda time projects are you guys using? I found three projects,
not sure which one to use.

brgds,

Papick

-- 
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: http://www.google.com/hotelfinder

2011-08-03 Thread P.G.Taboada


On 1 Aug., 12:42, Deepak Singh deepaksingh...@gmail.com wrote:
 Hi All,
 2) Select a particular row on the search result and the row gets expanded
 with more details. How it is possible to implement this feature with GWT
 datagrid ?

There is a new table builder API that makes this possible. Checkout
and build trunk, have a look at the showcase, cell widgets, custom
data grid.

-- 
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: http://www.google.com/hotelfinder

2011-08-03 Thread Deepak Singh
Yes.

But can i get any help/ source code for the two way slider which is being
used in hotel finder ?

Thank
Deepak

On Wed, Aug 3, 2011 at 4:53 PM, P.G.Taboada pgtabo...@googlemail.comwrote:



 On 1 Aug., 12:42, Deepak Singh deepaksingh...@gmail.com wrote:
  Hi All,
  2) Select a particular row on the search result and the row gets expanded
  with more details. How it is possible to implement this feature with GWT
  datagrid ?

 There is a new table builder API that makes this possible. Checkout
 and build trunk, have a look at the showcase, cell widgets, custom
 data grid.

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



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



Will GWT Portlets 1.0 (gwt-portlets.jar) supports GWT 2.3

2011-08-03 Thread Sridhar PV
Hi,

When I am using GWT 2.0, gwt-portlets.jar (gwt-portlets-1.0) is
working properly. But I am not able to compile the GWT 2.3 for gwt-
portlets-1.0.

Is gwt-portlets-1.0 gwtprotlets.jar supports GWT 2.3?

Please help me on this. Thanks in advance.


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

2011-08-03 Thread objectuser
I have been looking forward to 2.4 for the built-in validation support. 
 However, those classes still have comments with don't use this in 
production caveats.

Maybe the RC1 tag is premature then and there's going to be more work done. 
 Or maybe 2.4.0 will just introduce the validation framework in an 
experimental preview.

Any insight from anyone that's the project would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ltlTst1mB8kJ.
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 CELLTABLE How to restore old value in cell if validation fails

2011-08-03 Thread Ioan Agopian
No, I don't think that's possible.

But you can store all your edit cells in a list and clear them all at
once, like this:

// when setting up table columns add the edit cells to this list
ListEditTextCell editCells = new ArrayListEditTextCell();


// clear incorrect values for the whole row
for (EditTextCell editCell : editCells)
{
 editCell.clearViewData(KEY_PROVIDER.getKey(object));
}

cellTable.redraw();

Regards,
Ioan

On Aug 3, 12:25 pm, vaibhav gwt bhalke.vaib...@gmail.com wrote:
 Thanks Loan :)
 Icanrestoreoldvalueinspecificcellifvalidationfails.

 Is it possible that all column values from particular rowrestoretooldvalue?
 || ID || Dept || Code || RNO || RCode
 || .||ZCode ||
 || 1  ||  CS   || 001  ||  3      ||  030
 || .||Q1||
 || 2 ||  DS   || 001  ||  5      ||   040
 || .||S1 ||

 Suppose In above editable grid I changed 1st record i.e
 || 1  ||  CS   || 001  ||  3      ||  030
 || .||Q1||
 changed to
 || 1  ||  BP   || 010  ||  3      ||  003
 ||.||Q1||

 Is there any way torestoreoldobject(row) values instead to clearingcellview 
 data for each column and redraw editable grid.

 In Short revert record tooldvaluewhich is selected by our checkbox
 (All or selected chkbox only i.e selectionModel.isSelected(object) )

 My Grid contain (2-N) column so I am asking this question ?

 On Aug 2, 5:42 pm, Ioan Agopian ioan.agop...@gmail.com wrote:







  Hi Vaibhav,

  Youcando it like this:
  // clear incorrect data
 cell.clearViewData(KEY_PROVIDER.getKey(object));
  cellTable.redraw();

  Wherecellis the TextEditCell that you're using for that column.

  Regards,
  Ioan

  On Aug 2, 12:59 pm, vaibhav bhalke bhalke.vaib...@gmail.com wrote:

   Hi all,

   PFA WebEx recording for Issue.

   I want to used editableNumbercell like intger,decimal etc.. But there is 
   no
   such gwt widget present so I am using editable textcelland using
  validationfor numbers when user updatevalueincell.

   How to avoidcellediting whenvalidationfails.

  ifvalidationfail then editable-textcellvaluerestored tooldvalue.How
   to do that?

   intgerColumn.setFieldUpdater(new FieldUpdaterRecordInfo, String() {
           public void update(int index, RecordInfo object, Stringvalue) {
               // Called when the user changes thevalue.
              if(value.matches((-)?(\\d){1,8})){
                   object.setColumnInRecordEdited(true);
                   object.setValue(value);
                   RecordData.get().refreshDisplays();
               }else{
                   Window.alert(Specify valid integervaluefor parameter);
                   // How to restoldvaluehere? currently updatevalue
   set tocell

               }

           }
       });

   Any help or guidance in this matter would be appreciated.

   --
   Best Regards,
   Vaibhav Bhalke
   About me :http://about.me/vaibhavbhalke

   http://about.me/vaibhavbhalke

    Issue1-How torestoreoldvalueincell(ifvalidationfails).wrf
   203KViewDownload

-- 
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: showRelativeTo doesn't work the first time

2011-08-03 Thread Brian Reilly
I've had issues with positioning (specifically centering) when setting 
dimensions of the popup contents using CSS (width in my case, but I imagine 
hight could have similar issues). My dialog box would be positioned too far 
to the right the first time is was displayed using center(). The second and 
successive calls to center() would work properly. Especially strange is that 
the behavior was the same even when creating new instances of the dialog 
box. (My testing was in Safari)

Calling setWidth() on the dialog's widget from java instead of using CSS 
fixed it for me.

-- Brian

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/HQAoyzNgbKgJ.
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: App launch stopped working. Error at compiling

2011-08-03 Thread jpp1jpp1
Found the solution, this was a tricky one. You have to put the GWT lib first 
of all in the build path, and the error is gone.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/FBj4FTm8VbUJ.
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: MVC + Command Pattern + Code Splitting?

2011-08-03 Thread Gabriel
Check out GWTP: http://code.google.com/p/gwt-platform/

On Aug 1, 5:28 pm, gktcs tdotstew...@gmail.com wrote:
 Has anyone been able to get complete code splitting working with gwt-
 dispatch or similar command pattern implementation?

 We've got a rather large MVC-based application, and our code splitting
 is done at the Controller level.    The code splitting works great--
 neither the Controller nor the View will be loaded unless the
 associated module has been explicitly requested.  We use gwt-dispatch
 (with SecureDispatchAsync) to provide our communication with the
 server.  Everything works great with gwt-dispatch, except that *all*
 of our Request (Action) and Result objects are compiled into the
 initial download, instead of being included in the split point which
 contains the associated Controller and View.

 We're using SecureDispatchAsync in the startup module to load some
 basic startup information, but all of the other Request/Result pairs
 are isolated to their corresponding Controller.  The GWT SOYC report
 shows that all of the Request and Result objects are being included in
 the initial download.  Given the large-ish number of Action/Result
 objects we have, this is adding significant bulk to our initial
 application download size.

 I've read around and asked on the gwt-dispatch group and it seems like
 no one has had to use code splitting and the command pattern; so far,
 the only answers I've been able to find were (a) had to get rid of gwt-
 dispatch/command pattern, (b) just accept the increased size, or (c)
 it could be related to this 
 issue:http://code.google.com/p/google-web-toolkit/issues/detail?id=2374.

 Just curious as to what others are doing, or if someone has found a
 way around this problem

 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: showRelativeTo doesn't work the first time

2011-08-03 Thread Eric Andresen
I've also seen similar problems with showRelativeTo.  I've noticed that if I 
show a popup dialog that has dynamic sizing (i.e. the widget is a 
FlowPanel), the first time it pops up it shows as very wide and goes off the 
screen.  If I close and re-open it, the second time it correctly wraps its 
contents to the boundary of the window.  I think maybe there is a timing 
problem with the position() call inside showRelativeTo?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/6RNX_a3ruMUJ.
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 Developer Plugin on Safari 5.1 (OS X Lion 10.7) doesn't load

2011-08-03 Thread Steven Jay Cohen
You can also just download OmniWeb (which uses the Safari 5.0.5 core) and 
not have to hack anything:
http://www.omnigroup.com/products/omniweb/

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

2011-08-03 Thread Brian Reilly
That's exactly what I do. Use of UiBinder is then simply an implementation 
detail of how the UI is constructed for the custom dialog.

If you want your custom dialog to be created from UI templates, there are a 
few options for initializing both a caption and a widget.

1. use a text attribute in the UI template: my:CustomDialogBox 
text=Caption Text/
2. add a setCaption(String caption) method to your dialog that proxies to 
setText() and use a caption attribute in the UI template: 
my:CustomDialogBox caption=Caption Text/. This causes the caption to be 
_optional_.
3. add a constructor, CustomDialog(String caption), annotated with 
@UiConstructor and use a caption attribute in the UI 
template. my:CustomDialogBox caption=Caption Text/. This causes the 
caption to be _required_.

Also, while I don't think it applies to this case, check out @UiChild for 
cases where you want something similar to having a custom UiBinder parser 
for your 
widget: 
http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/uibinder/client/UiChild.html

-- Brian

On Tuesday, August 2, 2011 6:24:57 PM UTC-4, Aidan OK wrote:

 You can actually just change your UiBinder java class to inherit from
 DialogBox, and call setWidget(uiBinder.createAndBind(this)) instead of
 the regular, initWidget() method of Composite.

 Your UiBinder template then just looks like this:

 ui:UiBinder ... 
 g:HTMLPanel
 Stuff.
 /g:HTMLPanel
 /ui:UiBinder

 // To use:
 CustomDialog dialog = new CustomDialog();
 // etc.

 On Tue, Aug 2, 2011 at 8:25 PM, Brian Reilly brian@gmail.com wrote:
  I've found that you can add a visible=false attribute to the 
 g:DialogBox
  tag to keep it from being displayed on page load. However, I think this 
 will
  cause the dialog box UI to be constructed even if it's never displayed.
  I'm guessing that the you're not supposed to do this comment you're
  referring to is this comment from the PopupPanel javadocs:
 
  A PopupPanel should not generally be added to other panels; rather, it
  should be shown and hidden using the show() and hide() methods.
 
  Derek's approach is the only way I can think of to use g:DialogBox in a 
 UI
  template without it being automatically added to another panel. However, 
 I
  don't like that approach because the custom dialog box does not actually
  subclass DialogBox. This necessitates having like-named methods that 
 proxy
  to the DialogBox returned from UiBinder, such as center() in Derek's
  example. Unlike cases where it makes sense to subclass Composite to hide 
 the
  root widget's API, the custom dialog box really is a dialog box and 
 should
  inherit the DialogBox API.
 
  What I settled on was to subclass DialogBox and use UiBinder to build the
  widget passed to DialogBox.setWidget(). My hope is that this encourages 
 its
  use from java code instead of a UI template. In reality, my custom 
 dialogs
  are no more opinionated about where they're used than GWT's own DialogBox
  is, which has a nice harmonious feel to it.
  -- Brian
 
  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To view this discussion on the web visit
  https://groups.google.com/d/msg/google-web-toolkit/-/EuskuIZqfqkJ.
  To post to this group, send email to google-we...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-tool...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.
 



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



[ANN] Smart GWT 2.5 Released

2011-08-03 Thread Sanjiv Jivan
Hi all,
Smart GWT 2.5 has been released.

Release Announcement :
http://www.jroller.com/sjivan/entry/smart_gwt_2_5_released
Release Notes : http://www.smartclient.com/smartgwt/release_notes.html#2_5
Download : http://code.google.com/p/smartgwt/downloads/list
Showcase Demo : http://www.smartclient.com/smartgwt/showcase/

The key features of this release are :

* GWT 2.3 compatible
* IE 9 and Firefox 5 support
* ARIA / Section 508 Accessibility compliance
* New dataPath Feature that provides a straightforward way to display or
edit complex nested data
* ListGrid Filtering using expressions. For example 50 or ==99
* Support for multi-line summaries in groups and at the grid level
* Ability to use custom editors for different cells of the same column in a
ListGrid
* IE Performance improvements
* CanvasItem can now participate in the DynamicForm's values management
* MultiField search support for Select Items
* Selenium Support improvements

Comments, suggestions and feedback welcome.

Thanks,
Sanjiv

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



Collection that notifies listeners of a change

2011-08-03 Thread Sébastien Tromp
Hello,

I am trying to build an implementation of the Set interface that notifies
registered handlers when a modification occurs on the Set.
First of all, has this already been done somewhere?
I couldn't find anything, so I went on to build my own. The issue I have is
that, when the Change event is fired, the handlers are not notified.

My code is as follows:

public class NotifyingSetT extends Composite implements
HasCollectionChangeHandlersT, SetT {

private final SetT wrappedSet;

public NotifyingSet() {
this.wrappedSet = new HashSetT();
}

@Override
public boolean add(final T e) {
final boolean ret = this.wrappedSet.add(e);
this.fireEvent(new CollectionChangeEventT(Operation.ADD, e));
return ret;
}

   ...
}



public interface HasCollectionChangeHandlersT {
HandlerRegistration
addCollectionChangeHandler(CollectionChangeEventHandlerT handler);
}

---

In my presenter, I do this:

// Also tried with GWT.create()
private final NotifyingSetFightRequest fightRequests
= new NotifyingSetFightRequest();

this.registerHandler(this.fightRequests
.addCollectionChangeHandler(new
CollectionChangeEventHandlerFightRequest() {
@Override
public void onCollectionChange(final FightRequest
element,
final
com.fiveorbs.client.events.CollectionChangeEventHandler.Operation operation)
{
logger.info(on collection change)
}

}));

...

fightRequests.add(someobject);


After the add, I would expect my handler to be called, but to no avail.

Would you have any idea as to what I'm doing wrong?

Thanks,
-- 
Sébastien Tromp

-- 
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 add hover on CellList

2011-08-03 Thread eSVau
I wonder how i can add an hover effect for cells of a CellList

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/fxKcGklhfeQJ.
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 CELLTABLE : How to add empty row in celltable with different celltype

2011-08-03 Thread vaibhav bhalke
Hi

How to add empty row in celltable with different celltype ?

3 columns present in my celltable i.e
DatePickerCell,EditTextCell,NumberCell,SelectionCell

I can able to set record values in cell with different celltype.

I want to add empty row with different cell type in celltable also want few
of them editable and rest are non-editable.

I want 1st row as empty because whenever I will change value in particular
cell which editable then all values in that column should be updated
immediately

Suppose I edited value in edittextcell of 1st empty row then all values in
same column should be edited immediately.

Any help or guidance in this matter would be appreciated


-- 
Best Regards,
Vaibhav Bhalke


http://about.me/vaibhavbhalke

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



Converting raw JSON to a JSONObject / JSONValue

2011-08-03 Thread Alexander Orlov
The JSONObject takes only JavaScriptObject as its constructor parameter. 
JavaScriptObject can be returned only by a JSNI function which I wrote:

public static native JavaScriptObject parseJson(String jsonStr) /*-{
return eval(jsonStr);
}-*/;

but when I do 

String json = {\userId\ : \123\, \sessionId\ : \456\};
JavaScriptObject javaScriptObject = parseJson(json);


I get

ERROR: Uncaught exception escaped. 
com.google.gwt.core.client.JavaScriptException: (SyntaxError): Unexpected 
token : 

-Alex

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Z8Uk3YifLLYJ.
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: Converting raw JSON to a JSONObject / JSONValue

2011-08-03 Thread kim young ill
try this :

return eval('(' + json + ')');

On Wed, Aug 3, 2011 at 4:43 PM, Alexander Orlov
alexander.or...@loxal.netwrote:

 The JSONObject takes only JavaScriptObject as its constructor parameter.
 JavaScriptObject can be returned only by a JSNI function which I wrote:

 public static native JavaScriptObject parseJson(String jsonStr) /*-{
 return eval(jsonStr);
 }-*/;

 but when I do

 String json = {\userId\ : \123\, \sessionId\ : \456\};
 JavaScriptObject javaScriptObject = parseJson(json);


 I get

 ERROR: Uncaught exception escaped.
 com.google.gwt.core.client.JavaScriptException: (SyntaxError): Unexpected
 token :

 -Alex

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


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



Re: Collection that notifies listeners of a change

2011-08-03 Thread Sébastien Tromp
After debugging, I think I found the solution to my issue. It had to do with
parameterized types, which would break the event flow.
Simply extending all classes to remove all parameterized elements did the
trick.
-- 
Sébastien Tromp

2011/8/3 Sébastien Tromp sebastien.tr...@gmail.com

 Hello,

 I am trying to build an implementation of the Set interface that notifies
 registered handlers when a modification occurs on the Set.
 First of all, has this already been done somewhere?
 I couldn't find anything, so I went on to build my own. The issue I have is
 that, when the Change event is fired, the handlers are not notified.

 My code is as follows:

 public class NotifyingSetT extends Composite implements
 HasCollectionChangeHandlersT, SetT {

 private final SetT wrappedSet;

 public NotifyingSet() {
 this.wrappedSet = new HashSetT();
 }

 @Override
 public boolean add(final T e) {
 final boolean ret = this.wrappedSet.add(e);
 this.fireEvent(new CollectionChangeEventT(Operation.ADD, e));
 return ret;
 }

...
 }

 

 public interface HasCollectionChangeHandlersT {
 HandlerRegistration
 addCollectionChangeHandler(CollectionChangeEventHandlerT handler);
 }

 ---

 In my presenter, I do this:

 // Also tried with GWT.create()
 private final NotifyingSetFightRequest fightRequests
 = new NotifyingSetFightRequest();

 this.registerHandler(this.fightRequests
 .addCollectionChangeHandler(new
 CollectionChangeEventHandlerFightRequest() {
 @Override
 public void onCollectionChange(final FightRequest
 element,
 final
 com.fiveorbs.client.events.CollectionChangeEventHandler.Operation operation)
 {
 logger.info(on collection change)
 }

 }));

 ...

 fightRequests.add(someobject);
 

 After the add, I would expect my handler to be called, but to no avail.

 Would you have any idea as to what I'm doing wrong?

 Thanks,
 --
 Sébastien Tromp


-- 
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: Converting raw JSON to a JSONObject / JSONValue

2011-08-03 Thread Alexander Orlov
Thx!

GWT has a pretty idiosyncratic style!

Btw, were my assumptions how to construct a JSONObject right?

-Alex

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ncDmoXIdtgcJ.
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: Converting raw JSON to a JSONObject / JSONValue

2011-08-03 Thread Jeffrey Chimene

On 8/3/2011 8:04 AM, Alexander Orlov wrote:

Thx!

GWT has a pretty idiosyncratic style!


It's not up to GWT, it's up to the browser to evaluate the string. Take 
a look at the source code.


Btw, were my assumptions how to construct a JSONObject right?


Sort of.

The JSON spec indicates that you don't quote numbers, OTOH, your 
application may warrant those quotes.


Other points:
o You want to use a JavaScript Object as the destination of the parse 
object. Here I deliberately use saveEval because I trust the source of 
the string.

JSObject = JsonUtils.safeEval(source);

where JSOBject is a class that  extends JavaScriptObject and optionally 
implements an interface. Using the interface allows you to mock the JSO.


o You want to use the JSObject as the source of the associated string. 
The round trip should be idempotent.


 @Override
 public final String export() {
   return new JSONObject(this).toString();
 }

o example:
  {\activityName\:\L\, \id\:12, \predecessorList\:[11,10], 
\likely\:0, \worst\:0, \best\:0}


--
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: Linker and Generator documentation

2011-08-03 Thread bconoly
The problem with that is that the GWT EventBus would be compiled separate 
for each module and I need them to understand each other when compiled 
independently.  I'll continue to work on it and hopefully find something.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/eEpNfG7mpbQJ.
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: About GWT opinion in thoughtworks technology radar july 2011

2011-08-03 Thread kellizer
I agree fully with Paul's comments and I do have great respect for a number 
of the authors and have indeed heard them speak on a number 
of occasions however I do get the sense that there is an element of bias 
towards native javascript and, in my personal view, a lack of exposure to 
GWT.. 

I've been using GWT for a over 6 months now and have written a quite complex 
application that works very well and a great deal of that is to do with the 
GWT technologies- I'm not suggesting that it could not have been achieved 
with native javascript but that (for me) would have been much greater of a 
challenge than starting with GWT and I personally have not run into 
the negative points that the authors have raised.. 

Giving what I know now (after being exposed to GWT *in anger*) - I would 
still continue to utilise the GWT technology on future projects as I don't 
believe by using javascript would give me any advantages but I do believe 
that it would give me a number of disadvantages (across the complete 
development lifecycle).

Regards,

Ian.
  

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



IE8 - Not working - Mouse event for ListBox

2011-08-03 Thread Ash
Hi,

I'm using a list box which has many URLs for image. When someone move
the mouse through the drop down values, I need to show the image in an
HTML box. This works fine (MouseMove) in Firefox, but does not work in
IE8.

The below code represents the test case, and none of them gets
called / fired in IE8.

Can someone please help me to sort this out. I'm using GWT 2.0.3.



ListBox listItem = new ListBox();
listItem.addMouseMoveHandler(new HandlesAllMouseEvents() {

public void onMouseDown(MouseDownEvent event) {
Window.alert(On Mouse down...);
}

public void onMouseUp(MouseUpEvent event) {
Window.alert(On mouse up...);
}

public void onMouseMove(MouseMoveEvent event) {
Window.alert(On mouse move...);
}

public void onMouseOut(MouseOutEvent event) {
Window.alert(On mouse out...);
}

public void onMouseOver(MouseOverEvent event) {
Window.alert(on mouse over...);
}

public void onMouseWheel(MouseWheelEvent event) {
Window.alert(on mouse wheeel);
}
});

Thanks,
-ash

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



Deploying to App engine

2011-08-03 Thread Ice13ill
Hello, i have a simple question: I use GWT and GAE for my application,
but the deployment phase takes too long: any small modification to the
GWT java code will trigger the whole compilation. Is there anything i
can do to speed up this process ?

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



Detecting a checkbox click

2011-08-03 Thread Roger Studner
I'm trying to detect a checkbox selection click so I can do some other work 
(enable a button/change some css.. trivial stuff)

I tried GWTQuery, which fails (I can bind a click handler to every checkbox.. 
but after 1 click, CellTable appears to remove my bindings hah)

I've tried overriding piles of methods.. setting handleSelection to true and 
overriding methods.. and in the end.. I can't seem to solve this trivial use 
case.

i'm doing:

table.setSelectionModel(selectionModel, DefaultSelectionEventManager.MyObject 
createCheckBoxManager());
(selection Model is single selection)

I've seen posts on stack overflow about a custom checkbox manager, but none of 
the code compiles/works (even if I try to tweak it to get it compilable)

I also tried using column.setFieldUpdater (how i've done click handler on other 
columns) and that as well fails to work.

I assume this is a solved problem, but google searching has failed me :)

Anyone :)?

Thanks in advance,
Roger

-- 
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 do I get PNG image data as a decoded bytearray?

2011-08-03 Thread Xavier
Yes I need the bytearray on the clientside.  Can I use an
imageresource for this?

On Aug 3, 12:20 am, BST babusri...@gmail.com wrote:
 By read do you mean upload it from a location on the client side?

 For that you need to use a GWT FormPanel and Apche commons ServletFileUpload
 to get the file item then do the usual java io process to convert to a byte
 array.

 If this is not what you looking for , please elaborate on the question.

-- 
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: Deploying to App engine

2011-08-03 Thread Isaac Truett
How often are you deploying that this is a big deal for you? You should be
doing your debugging in development
modehttp://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideDevMode
and
only deploying to GAE when you have a polished release ready.


On Wed, Aug 3, 2011 at 12:58 PM, Ice13ill andrei.fifi...@gmail.com wrote:

 Hello, i have a simple question: I use GWT and GAE for my application,
 but the deployment phase takes too long: any small modification to the
 GWT java code will trigger the whole compilation. Is there anything i
 can do to speed up this process ?

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



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



Re: showRelativeTo doesn't work the first time

2011-08-03 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

figured it out, in my case i've opened the popup via a clicklistener on
a hyperlink. the first time, the dialog opened and immediately closed
again because of the history event

Am 03.08.2011 15:37, schrieb Eric Andresen:
 I've also seen similar problems with showRelativeTo.  I've noticed
 that if I show a popup dialog that has dynamic sizing (i.e. the
 widget is a FlowPanel), the first time it pops up it shows as very
 wide and goes off the screen.  If I close and re-open it, the second
 time it correctly wraps its contents to the boundary of the window.
 I think maybe there is a timing problem with the position() call
 inside showRelativeTo?
 
 -- You received this message because you are subscribed to the
 Google Groups Google Web Toolkit group. To view this discussion on
 the web visit 
 https://groups.google.com/d/msg/google-web-toolkit/-/6RNX_a3ruMUJ. 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.


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOOYaAAAoJENRtux+h35aGPoUP/3FrqvyU7D6Cyh9sFpwIdWUl
rAkHJxK79mmUYvoXiOyI4p73ZZrYPl2I85DAs4tYymQ7rkehq6Tl1j/5KFh6yxfn
s366E9vFK6zdg6/0I5XaIuFc4sQsSMrJtUaKQ81cZdrlU/+aVa7El1kSa23QSppF
HKLA0rFvH9AO5OhfIDgOXM/xHwg8kYDq/Ev43PA14hNLy4EHqiur8Qqcf2o4lxgj
QCGMwXZy1/7f0+LEHHZo00ey+/NGneSSv13e+hKrzzq3kzC2ipVq+b1uii5tOX6e
LkTb2+l+XnjDOC6hD7HAyolJ/RqQkLS8bWA6Ex7h2k2iIIgLb38hvHQsOj/yULmA
Rl3E3pk22+jRkQDV3Hk6DeQ5T2lLNTUJt2rkhTd5EV+N3E8/U7TN+Z5KzZcf+ArB
Z7wq1s7j5RmJoxD4gP4SqaNm5IFX+p0raWIsvz1IWdHMS9WCCieoU8wdqkwEzd0Y
NDbyW6G8sXhS6l5BUU/g9y1jn7bX6Tu51yLJTVx7+McsgpqbGuS4/db/B4BlRl04
Jp1cJh7m/bJ5RkDbcxgSDxZb76wQ8M1QI16uBaYvFZ2W8hu37Qq5NoWetVRqM/MS
gYEFapevaO2SGHt16mQV9EJzZYcKcFdBTpPKvbTBUeJNLGpReE7GCMLatunFCxjs
d96MNN7ShYURm+QvYF2i
=mZmw
-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.



Re: Deploying to App engine

2011-08-03 Thread Andrei Cosmin Fifiiţă
I need to deploy because i need to test some server side issues.
When i do that i use one compilation but still takes a lot
I just thought that i can customize the compiler so that minor changes will
not trigger the whole compilation (like adding a line of code in an app with
1000 java files)
On Aug 3, 2011 8:25 PM, Isaac Truett itru...@gmail.com wrote:
 How often are you deploying that this is a big deal for you? You should be
 doing your debugging in development
 mode
http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideDevMode

 and
 only deploying to GAE when you have a polished release ready.


 On Wed, Aug 3, 2011 at 12:58 PM, Ice13ill andrei.fifi...@gmail.com
wrote:

 Hello, i have a simple question: I use GWT and GAE for my application,
 but the deployment phase takes too long: any small modification to the
 GWT java code will trigger the whole compilation. Is there anything i
 can do to speed up this process ?

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



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


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



RPC and server side classes

2011-08-03 Thread Mike Dee
I'm updating an existing web app to use GWT and encountering a problem
on server side.  A goal is to reuse the server side data classes,
which are stored in a separate Eclipse project.

I have two projects: OldProject, which has old data classes (as POJOs)
and NewUiProject, which is GWT.

If I put the OldProject POJOs in the NewUiProject, all is fine.  Of
course the POJOs don't fall under the shared directory, so I created
a .gwt.xml file and inherited that into the NewUiProject .gwt.xml.

If the OldProject POJOs are left in their project and NewUiProject
inherits the .gwt.xml from OldProject a runtime error occurs.

[ERROR] javax.servlet.ServletContext log: Exception while dispatching
incoming RPC call
java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/
FooDataClass;
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:299)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
206)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

It looks like FooDataClass is simply not found on the server side and
I can't figure out why.  I am using Eclipse and NewUiProject has a
project reference to OldProject and also includes OldProject in the
Java Build Path Projects.  If there were a project with references
across projects I don't think the project would compile.  I also tried
packaging a JAR from OldProject and including it in NewUiProject, but
that makes no difference.

I don't think this is a case of not inheriting classes so that GWT
knows to compile them in the client side.  That would produce an error
when starting up the client and an error message about not being able
to find the source code for the data classes. I'm mot seeing that
error.  The UI comes up and the error is thrown when interacting with
the UI in such a way as to cause an RPC.

Any ideas?

Thanks,
Mike

-- 
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 add hover on CellList

2011-08-03 Thread Jeff Larsen
sink the mouseover event on your cell and add a handler for mouseover and 
open up a popup panel with the required functionality

if you just want the alt text, you could set the alt text on the content of 
the cell. 

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

2011-08-03 Thread Juan Pablo Gardella
RPC only work as transport layer between client and server side, so you must
put old project as a jar and define *.gwt.xml inside and define the module.
In NewUiProject inherit it. You can't said that the POJO is only in server
side if RPC layer try serialize/deseralize

Juan

2011/8/3 Mike Dee mdichiapp...@gmail.com

 I'm updating an existing web app to use GWT and encountering a problem
 on server side.  A goal is to reuse the server side data classes,
 which are stored in a separate Eclipse project.

 I have two projects: OldProject, which has old data classes (as POJOs)
 and NewUiProject, which is GWT.

 If I put the OldProject POJOs in the NewUiProject, all is fine.  Of
 course the POJOs don't fall under the shared directory, so I created
 a .gwt.xml file and inherited that into the NewUiProject .gwt.xml.

 If the OldProject POJOs are left in their project and NewUiProject
 inherits the .gwt.xml from OldProject a runtime error occurs.

 [ERROR] javax.servlet.ServletContext log: Exception while dispatching
 incoming RPC call
 java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/
 FooDataClass;
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:299)
at

 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
 206)
at

 com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
 248)
at

 com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
 62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 It looks like FooDataClass is simply not found on the server side and
 I can't figure out why.  I am using Eclipse and NewUiProject has a
 project reference to OldProject and also includes OldProject in the
 Java Build Path Projects.  If there were a project with references
 across projects I don't think the project would compile.  I also tried
 packaging a JAR from OldProject and including it in NewUiProject, but
 that makes no difference.

 I don't think this is a case of not inheriting classes so that GWT
 knows to compile them in the client side.  That would produce an error
 when starting up the client and an error message about not being able
 to find the source code for the data classes. I'm mot seeing that
 error.  The UI comes up and the error is thrown when interacting with
 the UI in such a way as to cause an RPC.

 Any ideas?

 Thanks,
 Mike

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



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



Re: RPC and server side classes

2011-08-03 Thread Mike Dee
I added a .gwt.xml file to the OldProject and inherited it from
NewUiProject.  Only the data objects (pojos) from the OldProject are
listed in the source path of the .gwt.xml.


On Aug 3, 11:29 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 RPC only work as transport layer between client and server side, so you must
 put old project as a jar and define *.gwt.xml inside and define the module.
 In NewUiProject inherit it. You can't said that the POJO is only in server
 side if RPC layer try serialize/deseralize

 Juan

 2011/8/3 Mike Dee mdichiapp...@gmail.com







  I'm updating an existing web app to use GWT and encountering a problem
  on server side.  A goal is to reuse the server side data classes,
  which are stored in a separate Eclipse project.

  I have two projects: OldProject, which has old data classes (as POJOs)
  and NewUiProject, which is GWT.

  If I put the OldProject POJOs in the NewUiProject, all is fine.  Of
  course the POJOs don't fall under the shared directory, so I created
  a .gwt.xml file and inherited that into the NewUiProject .gwt.xml.

  If the OldProject POJOs are left in their project and NewUiProject
  inherits the .gwt.xml from OldProject a runtime error occurs.

  [ERROR] javax.servlet.ServletContext log: Exception while dispatching
  incoming RPC call
  java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/
  FooDataClass;
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
         at java.lang.Class.getMethod0(Unknown Source)
         at java.lang.Class.getMethod(Unknown Source)
         at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:299)
         at

  com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
  206)
         at

  com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
  248)
         at

  com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
  62)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

  It looks like FooDataClass is simply not found on the server side and
  I can't figure out why.  I am using Eclipse and NewUiProject has a
  project reference to OldProject and also includes OldProject in the
  Java Build Path Projects.  If there were a project with references
  across projects I don't think the project would compile.  I also tried
  packaging a JAR from OldProject and including it in NewUiProject, but
  that makes no difference.

  I don't think this is a case of not inheriting classes so that GWT
  knows to compile them in the client side.  That would produce an error
  when starting up the client and an error message about not being able
  to find the source code for the data classes. I'm mot seeing that
  error.  The UI comes up and the error is thrown when interacting with
  the UI in such a way as to cause an RPC.

  Any ideas?

  Thanks,
  Mike

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

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



Re: RPC and server side classes

2011-08-03 Thread Juan Pablo Gardella
java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/FooDataClass;
is not the same
ClassNotFoundExceptionhttp://stackoverflow.com/questions/1457863/what-is-the-difference-between-noclassdeffounderror-and-classnotfoundexception,
so perhaps you have a dependency or is not serializable or instanciable in
runtime.

Is serializable? have final fields? have a default constructor?




2011/8/3 Mike Dee mdichiapp...@gmail.com

 I added a .gwt.xml file to the OldProject and inherited it from
 NewUiProject.  Only the data objects (pojos) from the OldProject are
 listed in the source path of the .gwt.xml.


 On Aug 3, 11:29 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
 wrote:
  RPC only work as transport layer between client and server side, so you
 must
  put old project as a jar and define *.gwt.xml inside and define the
 module.
  In NewUiProject inherit it. You can't said that the POJO is only in
 server
  side if RPC layer try serialize/deseralize
 
  Juan
 
  2011/8/3 Mike Dee mdichiapp...@gmail.com
 
 
 
 
 
 
 
   I'm updating an existing web app to use GWT and encountering a problem
   on server side.  A goal is to reuse the server side data classes,
   which are stored in a separate Eclipse project.
 
   I have two projects: OldProject, which has old data classes (as POJOs)
   and NewUiProject, which is GWT.
 
   If I put the OldProject POJOs in the NewUiProject, all is fine.  Of
   course the POJOs don't fall under the shared directory, so I created
   a .gwt.xml file and inherited that into the NewUiProject .gwt.xml.
 
   If the OldProject POJOs are left in their project and NewUiProject
   inherits the .gwt.xml from OldProject a runtime error occurs.
 
   [ERROR] javax.servlet.ServletContext log: Exception while dispatching
   incoming RPC call
   java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/
   FooDataClass;
  at java.lang.Class.getDeclaredMethods0(Native Method)
  at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
  at java.lang.Class.getMethod0(Unknown Source)
  at java.lang.Class.getMethod(Unknown Source)
  at
 com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:299)
  at
 
  
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
   206)
  at
 
  
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
   248)
  at
 
  
 com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
   62)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 
   It looks like FooDataClass is simply not found on the server side and
   I can't figure out why.  I am using Eclipse and NewUiProject has a
   project reference to OldProject and also includes OldProject in the
   Java Build Path Projects.  If there were a project with references
   across projects I don't think the project would compile.  I also tried
   packaging a JAR from OldProject and including it in NewUiProject, but
   that makes no difference.
 
   I don't think this is a case of not inheriting classes so that GWT
   knows to compile them in the client side.  That would produce an error
   when starting up the client and an error message about not being able
   to find the source code for the data classes. I'm mot seeing that
   error.  The UI comes up and the error is thrown when interacting with
   the UI in such a way as to cause an RPC.
 
   Any ideas?
 
   Thanks,
   Mike
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Google Web Toolkit group.
   To post to this group, send email to
 google-web-toolkit@googlegroups.com.
   To unsubscribe from this group, send email to
   google-web-toolkit+unsubscr...@googlegroups.com.
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

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



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



Re: Отг: Do Beanvalidation(JSR-303) and editor framework play along well ?

2011-08-03 Thread Karthik Reddy
Thanks for the helpful info.

I will go ahead and build the DynatableRF sample in 2.4 and try it out . 
Hopefully, in 2.4's  DynatableRF,  I could witness the fruits of the 
 marriage between client-side validation and editor framework.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/p9JDcU2Dwq8J.
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: Отг: Do Beanvalidation(JSR-303) and editor framework play along well ?

2011-08-03 Thread objectuser
Did you happen to follow any sort of guide to getting validation working in 
2.4 RC1?  I failed in my attempt.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/VyH9zyXHd0QJ.
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 problem] Caused by: java.lang.OutOfMemoryError: Java heap space

2011-08-03 Thread Rafael
Hello everyone!

I have a very disturbing problem (disturbing to me at least), the
exception mentioned in the title of this post occurs on the server
side but after the RPC executes.

I'll explain briefly, i have a DAO interface and a DAO implementation,
and besides, i have the two interfaces and class necessary to
implement a GWT RPC, i use the latter to define a way to call the
methods of the DAO from the client via a asynchronous call.

When i try to invoke the GWT RPC, the method in the DAO executes
without incident but before the result can be returned to the client
the exception takes place.

I am starting tomcat with the -Xms1024M flag in order to increase the
heap space but i guess there is some very unefficient memory handling
somewhere in there (in my app, not in tomcat nor in GWT) but i need to
know where before i can fix it... has this happened to anyone? my
guess is that the memmory suffices for handling the RPC but not for
serializing...

anyway, i decided to seek your advice... thanks in advance!

Rafael

Here is the root cause if i am not mistaken:

Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.IdentityHashMap.resize(IdentityHashMap.java:452)
at java.util.IdentityHashMap.put(IdentityHashMap.java:428)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.saveIndexForObject(AbstractSerializationStreamWriter.java:
202)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
123)
at
com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize(Map_CustomFieldSerializerBase.java:
49)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serialize(HashMap_CustomFieldSerializer.java:
36)
at sun.reflect.GeneratedMethodAccessor541.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer(ServerSerializationStreamWriter.java:
742)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:
723)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
612)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
129)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:
534)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:
700)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:
730)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:
712)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:
730)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:
712)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:
730)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
612)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
129)
at
com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:
43)
at
com.google.gwt.user.client.rpc.core.java.util.HashSet_CustomFieldSerializer.serialize(HashSet_CustomFieldSerializer.java:
36)
at sun.reflect.GeneratedMethodAccessor544.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer(ServerSerializationStreamWriter.java:
742)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:
723)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
612)
at

Re: RPC and server side classes

2011-08-03 Thread Mike Dee
Juan, I thought you may have found the problem.  There was a static
variable, the old:

static final long serialVersionUID = -1L;

I removed it, but that didn't make a difference.

Could it be that the data classes from the OldProject are really not
being picked up in NewUiProject?  I tried doing a GWTCompile and
looking at the output.  I don't see classes from OldProject in the WAR
for NewUiProject...even when I include the OldProject.jar!  But, maybe
I don't understand enough about how GWT works?

Mike


On Aug 3, 11:49 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/FooDataClass;
 is not the same
 ClassNotFoundExceptionhttp://stackoverflow.com/questions/1457863/what-is-the-difference-bet...,
 so perhaps you have a dependency or is not serializable or instanciable in
 runtime.

 Is serializable? have final fields? have a default constructor?

 2011/8/3 Mike Dee mdichiapp...@gmail.com







  I added a .gwt.xml file to the OldProject and inherited it from
  NewUiProject.  Only the data objects (pojos) from the OldProject are
  listed in the source path of the .gwt.xml.

  On Aug 3, 11:29 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
  wrote:
   RPC only work as transport layer between client and server side, so you
  must
   put old project as a jar and define *.gwt.xml inside and define the
  module.
   In NewUiProject inherit it. You can't said that the POJO is only in
  server
   side if RPC layer try serialize/deseralize

   Juan

   2011/8/3 Mike Dee mdichiapp...@gmail.com

I'm updating an existing web app to use GWT and encountering a problem
on server side.  A goal is to reuse the server side data classes,
which are stored in a separate Eclipse project.

I have two projects: OldProject, which has old data classes (as POJOs)
and NewUiProject, which is GWT.

If I put the OldProject POJOs in the NewUiProject, all is fine.  Of
course the POJOs don't fall under the shared directory, so I created
a .gwt.xml file and inherited that into the NewUiProject .gwt.xml.

If the OldProject POJOs are left in their project and NewUiProject
inherits the .gwt.xml from OldProject a runtime error occurs.

[ERROR] javax.servlet.ServletContext log: Exception while dispatching
incoming RPC call
java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/
FooDataClass;
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
       at java.lang.Class.getMethod0(Unknown Source)
       at java.lang.Class.getMethod(Unknown Source)
       at
  com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:299)
       at

  com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
206)
       at

  com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
248)
       at

  com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

It looks like FooDataClass is simply not found on the server side and
I can't figure out why.  I am using Eclipse and NewUiProject has a
project reference to OldProject and also includes OldProject in the
Java Build Path Projects.  If there were a project with references
across projects I don't think the project would compile.  I also tried
packaging a JAR from OldProject and including it in NewUiProject, but
that makes no difference.

I don't think this is a case of not inheriting classes so that GWT
knows to compile them in the client side.  That would produce an error
when starting up the client and an error message about not being able
to find the source code for the data classes. I'm mot seeing that
error.  The UI comes up and the error is thrown when interacting with
the UI in such a way as to cause an RPC.

Any ideas?

Thanks,
Mike

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

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

-- 
You 

Re: Отг: Do Beanvalidation(JSR-303) and editor framework play along well ?

2011-08-03 Thread Karthik Reddy
First bump in the road. As I try to run my DynatableRF sample (2.4 ) I run 
into the following exception:
*
*
*Caused by: java.lang.NoClassDefFoundError: org/json/JSONException
*
*at 
com.google.web.bindery.autobean.shared.impl.StringQuoter.createSplittable(StringQuoter.java:58)
*
*
*
Caused by: java.lang.ClassNotFoundException: null
at 
com.google.gwt.dev.shell.CompilingClassLoader$MultiParentClassLoader.findClass(CompilingClassLoader.java:365)

I did make sure I have json-20090211.jar(this is the jar that contains the 
class org.json.JSONException) in my server's classpath. 


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



Running DynaTableRF sample from the 2.4 RC release....

2011-08-03 Thread Karthik Reddy
As I try to run my DynatableRF sample (2.4 ) I run into the following 
exception:
*
*
*Caused by: java.lang.NoClassDefFoundError: org/json/JSONException
*
*at 
com.google.web.bindery.autobean.shared.impl.StringQuoter.createSplittable(StringQuoter.java:58)
*
*
*
Caused by: java.lang.ClassNotFoundException: null
at 
com.google.gwt.dev.shell.CompilingClassLoader$MultiParentClassLoader.findClass(CompilingClassLoader.java:365)

I did make sure I have json-20090211.jar(this is the jar that contains the 
class org.json.JSONException) in my server's classpath. 

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

2011-08-03 Thread Juan Pablo Gardella
This static variable isn't affect. You must put oldproject jar in
WEB-INF/lib, isn't run in dev mode?

2011/8/3 Mike Dee mdichiapp...@gmail.com

 Juan, I thought you may have found the problem.  There was a static
 variable, the old:

static final long serialVersionUID = -1L;

 I removed it, but that didn't make a difference.

 Could it be that the data classes from the OldProject are really not
 being picked up in NewUiProject?  I tried doing a GWTCompile and
 looking at the output.  I don't see classes from OldProject in the WAR
 for NewUiProject...even when I include the OldProject.jar!  But, maybe
 I don't understand enough about how GWT works?

 Mike


 On Aug 3, 11:49 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
 wrote:
  java.lang.NoClassDefFoundError:
 [Lcom/mycompany/myproject/data/FooDataClass;
  is not the same
  ClassNotFoundException
 http://stackoverflow.com/questions/1457863/what-is-the-difference-bet...,
  so perhaps you have a dependency or is not serializable or instanciable
 in
  runtime.
 
  Is serializable? have final fields? have a default constructor?
 
  2011/8/3 Mike Dee mdichiapp...@gmail.com
 
 
 
 
 
 
 
   I added a .gwt.xml file to the OldProject and inherited it from
   NewUiProject.  Only the data objects (pojos) from the OldProject are
   listed in the source path of the .gwt.xml.
 
   On Aug 3, 11:29 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
   wrote:
RPC only work as transport layer between client and server side, so
 you
   must
put old project as a jar and define *.gwt.xml inside and define the
   module.
In NewUiProject inherit it. You can't said that the POJO is only in
   server
side if RPC layer try serialize/deseralize
 
Juan
 
2011/8/3 Mike Dee mdichiapp...@gmail.com
 
 I'm updating an existing web app to use GWT and encountering a
 problem
 on server side.  A goal is to reuse the server side data classes,
 which are stored in a separate Eclipse project.
 
 I have two projects: OldProject, which has old data classes (as
 POJOs)
 and NewUiProject, which is GWT.
 
 If I put the OldProject POJOs in the NewUiProject, all is fine.  Of
 course the POJOs don't fall under the shared directory, so I
 created
 a .gwt.xml file and inherited that into the NewUiProject .gwt.xml.
 
 If the OldProject POJOs are left in their project and NewUiProject
 inherits the .gwt.xml from OldProject a runtime error occurs.
 
 [ERROR] javax.servlet.ServletContext log: Exception while
 dispatching
 incoming RPC call
 java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/
 FooDataClass;
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at
   com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:299)
at
 
  
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
 206)
at
 
  
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
 248)
at
 
  
 com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
 62)
at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 
 It looks like FooDataClass is simply not found on the server side
 and
 I can't figure out why.  I am using Eclipse and NewUiProject has a
 project reference to OldProject and also includes OldProject in the
 Java Build Path Projects.  If there were a project with references
 across projects I don't think the project would compile.  I also
 tried
 packaging a JAR from OldProject and including it in NewUiProject,
 but
 that makes no difference.
 
 I don't think this is a case of not inheriting classes so that GWT
 knows to compile them in the client side.  That would produce an
 error
 when starting up the client and an error message about not being
 able
 to find the source code for the data classes. I'm mot seeing that
 error.  The UI comes up and the error is thrown when interacting
 with
 the UI in such a way as to cause an RPC.
 
 Any ideas?
 
 Thanks,
 Mike
 
 --
 You received this message because you are subscribed to the Google
   Groups
 Google Web Toolkit group.
 To post to this group, send email to
   google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Google Web Toolkit group.
   

Re: UiBinder.useSafeHtmlTemplates

2011-08-03 Thread Hilco Wijbenga
On 29 July 2011 19:50, Hilco Wijbenga hilco.wijbe...@gmail.com wrote:
 Hi all,

 I'm sure you're familiar with the warning Configuration property
 UiBinder.useSafeHtmlTemplates is false!. I did the obvious, I added

 set-configuration-property name=UiBinder.useSafeHtmlTemplates 
 value=true/

 to the lowest level GWT module I have (it gets included directly or
 indirectly by all other modules).

 Well, colour me surprised:

 [INFO] Loading inherited module 'com.example.domain.request.DomainRequestImpl'
 [INFO]    Loading inherited module 
 'com.example.domain.request.DomainRequestApi'
 [INFO]       Loading inherited module 
 'com.example.domain.proxy.DomainProxyApi'
 [INFO]          Loading inherited module 'com.example.domain.DomainApi'
 [INFO]             [WARN] Setting configuration property named
 UiBinder.useSafeHtmlTemplates in com.example.domain.DomainApi that has
 not been previously defined.  This may be disallowed in the future.
 [INFO] Loading inherited module 'com.example.fe.Measurements'
 [INFO]    Loading inherited module
 'com.google.web.bindery.requestfactory.RequestFactory'
 [INFO]       Loading inherited module 
 'com.google.web.bindery.autobean.AutoBean'
 [INFO]          Loading inherited module 'com.google.gwt.user.User'
 [INFO]             Loading inherited module 'com.google.gwt.uibinder.UiBinder'
 [INFO]                [WARN] Definition of already set configuration
 property named UiBinder.useSafeHtmlTemplates in
 com.google.gwt.uibinder.UiBinder (set in
 com.example.domain.DomainApi).  This may be disallowed in the future.
 [INFO] Compiling module com.example.fe.MeasurementsApp
 [INFO]    Scanning for additional dependencies:
 file:/home/me/workspaces/project-workspace/measurements/src/main/java/com/example/fe/widgets/DefaultMeasurementsApi.java
 [INFO]       Computing all possible rebind results for
 'com.example.fe.widgets.Measurements.UiBinder'
 [INFO]          Rebinding com.example.fe.widgets.Measurements.UiBinder
 [INFO]             Invoking generator
 com.google.gwt.uibinder.rebind.UiBinderGenerator
 [INFO]                [WARN] Configuration property
 UiBinder.useSafeHtmlTemplates is false! UiBinder SafeHtml integration
 is off, leaving your users more vulnerable to cross-site scripting
 attacks. This property will default to true in future releases of GWT.

 What's going on here? First it complains about it not being defined,
 then that it's already set, and finally that it's *not* set?!?

Nobody has a clue?

-- 
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: RPC and server side classes

2011-08-03 Thread Mike Dee
Yep, that seems to have fixed it.

Thanks,
Mike

On Aug 3, 1:03 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 This static variable isn't affect. You must put oldproject jar in
 WEB-INF/lib, isn't run in dev mode?

 2011/8/3 Mike Dee mdichiapp...@gmail.com







  Juan, I thought you may have found the problem.  There was a static
  variable, the old:

         static final long serialVersionUID = -1L;

  I removed it, but that didn't make a difference.

  Could it be that the data classes from the OldProject are really not
  being picked up in NewUiProject?  I tried doing a GWTCompile and
  looking at the output.  I don't see classes from OldProject in the WAR
  for NewUiProject...even when I include the OldProject.jar!  But, maybe
  I don't understand enough about how GWT works?

  Mike

  On Aug 3, 11:49 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
  wrote:
   java.lang.NoClassDefFoundError:
  [Lcom/mycompany/myproject/data/FooDataClass;
   is not the same
   ClassNotFoundException
 http://stackoverflow.com/questions/1457863/what-is-the-difference-bet...,
   so perhaps you have a dependency or is not serializable or instanciable
  in
   runtime.

   Is serializable? have final fields? have a default constructor?

   2011/8/3 Mike Dee mdichiapp...@gmail.com

I added a .gwt.xml file to the OldProject and inherited it from
NewUiProject.  Only the data objects (pojos) from the OldProject are
listed in the source path of the .gwt.xml.

On Aug 3, 11:29 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 RPC only work as transport layer between client and server side, so
  you
must
 put old project as a jar and define *.gwt.xml inside and define the
module.
 In NewUiProject inherit it. You can't said that the POJO is only in
server
 side if RPC layer try serialize/deseralize

 Juan

 2011/8/3 Mike Dee mdichiapp...@gmail.com

  I'm updating an existing web app to use GWT and encountering a
  problem
  on server side.  A goal is to reuse the server side data classes,
  which are stored in a separate Eclipse project.

  I have two projects: OldProject, which has old data classes (as
  POJOs)
  and NewUiProject, which is GWT.

  If I put the OldProject POJOs in the NewUiProject, all is fine.  Of
  course the POJOs don't fall under the shared directory, so I
  created
  a .gwt.xml file and inherited that into the NewUiProject .gwt.xml.

  If the OldProject POJOs are left in their project and NewUiProject
  inherits the .gwt.xml from OldProject a runtime error occurs.

  [ERROR] javax.servlet.ServletContext log: Exception while
  dispatching
  incoming RPC call
  java.lang.NoClassDefFoundError: [Lcom/mycompany/myproject/data/
  FooDataClass;
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
         at java.lang.Class.getMethod0(Unknown Source)
         at java.lang.Class.getMethod(Unknown Source)
         at
com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:299)
         at

  com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
  206)
         at

  com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
  248)
         at

  com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
  62)
         at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

  It looks like FooDataClass is simply not found on the server side
  and
  I can't figure out why.  I am using Eclipse and NewUiProject has a
  project reference to OldProject and also includes OldProject in the
  Java Build Path Projects.  If there were a project with references
  across projects I don't think the project would compile.  I also
  tried
  packaging a JAR from OldProject and including it in NewUiProject,
  but
  that makes no difference.

  I don't think this is a case of not inheriting classes so that GWT
  knows to compile them in the client side.  That would produce an
  error
  when starting up the client and an error message about not being
  able
  to find the source code for the data classes. I'm mot seeing that
  error.  The UI comes up and the error is thrown when interacting
  with
  the UI in such a way as to cause an RPC.

  Any ideas?

  Thanks,
  Mike

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

GWT is for apps — right? But what's about static pages? (GWT's Future Plans...)

2011-08-03 Thread Alexander Orlov
GWT is a framework for building Ajax apps that act as clients and 
(optionally) communicate with a kinda RESTful backend via RPC or using 
RequestFactory (both are JSON based). That's my to the point understanding 
of GWT.

But what's about static pages? To deliver static content, especially for 
search engines and other crawlers GWT might be not the best choice (yet?) 
because the whole GWT app is located in a single JS file and other 
subsequently fetched files. Those crawlers need static snapshots of a 
certain page state. In fact there are approaches and proposals to make Ajax 
apps crawlable. This is a a general proposal from Google of how to make an 
Ajax page crawlable http://code.google.com/web/ajaxcrawling/. And Acris is 
a GWT-based framework that implements Google's 
proposalhttp://code.google.com/p/acris/wiki/AcrisSEO (haven't 
tried it, don't know how good it is). 

However both approaches are everything else but straightforward or even 
fasteasy to apply to already existing Ajax/GWT apps. So my question is 
primarily directed to *GWT core devs*: *Are there plans to implement an 
easy-to-use static snapshot of a certain Ajax state feature into GWT? *Or 
is this a problem domain that will never be addressed by GWT?
*
*
The problem arises from the fact that a company cannot rely on GWT only if 
it wants to maintain a SEO-friendly and crawlable content-driven page. For 
this purpose Wicket, Tapestry and other Java frameworks have to be used.

-Alex

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/WYxEBCRpKjUJ.
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 Developer Plugin on Safari 5.1 (OS X Lion 10.7) doesn't load

2011-08-03 Thread alexkrishnan
Brilliant! The OmniWeb solution definitely seems like the easiest way to go. 
It works perfectly for me, no hassles!

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

2011-08-03 Thread Nick Siderakis
Does anyone know what the hotel app is using for RPC? 

It doesn't look like standard RequestFactory or GWT-RPC. 

Example request body: 

[,[[,hs,[,[,\nyc\,\2011-08-10\,1]\n]\n] ] ,[,[[,b_lr,1:83] 
,[,b_lr,2:141] ,[,b_qu,0] ] ] ]

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/P7qFFZc1nh8J.
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 is for apps — right? But what's about static pages? (GWT's Future Plans...)

2011-08-03 Thread Karthik Reddy
I would like to make a related observation although, only tangentially 
related to the initial poster's questions and grievances:

Even though GWT started off as a toolkit for developing desktop-style 
applications for the web, I think it has slowly transformed beyond the said 
scope. 

As an example consider, google hotel search  at 
http://www.google.com/hotelfinder/. Evidently, this has been built using GWT 
and evidently it is closer to a web-style application than a desktop-style 
application.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/s6C_kGBy96UJ.
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 is for apps — right? But what's about static pages? (GWT's Future Plans...)

2011-08-03 Thread Gal Dolber
GWT isn't the problem, you can easily make a non-CEO-friendly apps with
jquery, sencha, or any other js framework.
The problem is that search engines do not crawl AJAX apps yet. The proposal
to make ajax crawlable is a quick solution to make them work with old
crawling infrastructure.
I really hope to see a more real solution in the near future.

On Wed, Aug 3, 2011 at 10:50 PM, Karthik Reddy karthik.ele...@gmail.comwrote:

 I would like to make a related observation although, only tangentially
 related to the initial poster's questions and grievances:

 Even though GWT started off as a toolkit for developing desktop-style
 applications for the web, I think it has slowly transformed beyond the said
 scope.

 As an example consider, google hotel search  at
 http://www.google.com/hotelfinder/. Evidently, this has been built using
 GWT and evidently it is closer to a web-style application than a
 desktop-style application.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/s6C_kGBy96UJ.

 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.




-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

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

-- 
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: About GWT opinion in thoughtworks technology radar july 2011

2011-08-03 Thread Grzegorz Kossakowski
On Tuesday, August 2, 2011 5:18:51 PM UTC+2, Emilio Bravo wrote:

 http://www.thoughtworks.com/articles/technology-radar-july-2011#Platforms 

 thoughtworks technology radar july 2011, talk negatively about gwt, 
 these are the 3 reasons: 

 First, in many ways, JavaScript is more powerful and expressive than 
 Java, so we suspect that the generation is going in the wrong 
 direction. 


Scala+GWT should help to mitigate this problem by bringing support for Scala 
into GWT.

Some promising examples how Scala helps can be found for example here:

http://scalagwt.github.com/samples/Showcase.html#CwDatePicker

If you take a look at source tab you'll see:

datePicker onValueChange { event =
  val date = event.getValue()
  val dateString = DateTimeFormat.getMediumDateFormat().format(date)
  text.setText(dateString)
}

More examples can be found those slides:

http://goo.gl/WXCGq (slides 23-25)

-- 
Grzegorz

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



StockWatcherTest.java not generated

2011-08-03 Thread Peterson G.
Hello,

Sorry to bother you with such a beginner problem, but I'm stuck with
it. I searched the group for a solution and did not found one.

I've just installed GWT in Eclipse and was trying to follow the Sample
Application Tutorial (http://code.google.com/webtoolkit/doc/latest/
tutorial/gettingstarted.html)

The directory layout is created properly, but some file aren't :
The test directory is created, with a test package, but the test
package is empty.
No StockWatcherTest.java.
None of the .launch files are created either.

The .classpath and the .project are generated. (And I've no active
filter in my Package Explorer)


Do you have any clue on what I did wrong ?


My Eclipse version is Helios Build 20110301-1815
I installed plugins from http://dl.google.com/eclipse/plugin/3.6

Thanks !

Peterson

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



Popup panel doesn't autohide in IE7.

2011-08-03 Thread leela c
Hi,

I'm using GWT 2.2.0.

I display a popup panel on click of a label. It is not hiding if I
click outside the label in IE7. It works fine in IE8, Firefox and
Google chrome.

Code:
 HTMLPanel container = new HTMLPanel();
 container.setWidth(100px);
 container.setHeight(100px);
 container.setStyleName(containerBorder);
 Label label = new Label(Test Popup);
 label.addClickHandler(new ClickHandler() {
  @Override
  public void onClick(ClickEvent event)
  {
final DecoratedPopupPanel popup = new
DecoratedPopupPanel(true);
popup.setAutoHideEnabled(true);
popup.setWidget(new Label(Popup));
popup.show();
  }

 });
container.add(label);


I noticed the similar behaviour in GWT showcase :http://gwt.google.com/
samples/Showcase/Showcase.html#!CwBasicPopup. Popup is displayed on
click of Show Basic Popup button. The popup doesn't dissappear when
I click on the far right side in IE7. It works fine in IE8, Firefox
and Chrome.

Any help appreciated.


Regards,
Leela

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



Layout design

2011-08-03 Thread Akis
Hi guys. I've started using gwt last week and I'm now designing a
webapp using MVP pattern. Before starting, I'd like to ask you a
thing: as my webapp will have header on top, menu on the left and
content panel on the right, I'd like to know if there is a way to
modify them using DockLayoutPanel; I mean...if I handle the views with
a DockLayoutPanel, and for the first page i don't want the left menu,
what shall I do? If I set some widgets as the content's children
(while the menu is empty), the content goes on the left but the
textboxes inside the content seem to be covered by the menu panel and
they are unclickable. Any suggestion?

thank you guys!!!

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



Problems with my first application

2011-08-03 Thread Apocalypto
Hello GWT world, I'm a student who is trying to learn how to develop
with GWT framework. I already know well Java language but I'm stuck
with my first application: it's a simple log in interface which stores
user data into cookies, but I can't understand why it doesn't work
properly.

MainEntryPoint

private GWTLogInServiceAsync logInService =
GWT.create(GWTLogInService.class);
private GWTDeBugServiceAsync deBugService =
GWT.create(GWTDeBugService.class);
private String dataBaseString;
...
logInButton.addClickHandler(new ClickHandler() {

public void onClick(ClickEvent event) {
dataBaseString = null;

logInService.logIn(userNameTextBox.getText(),
passWordTextBox.getText(), new AsyncCallbackString() {

@Override
public void onFailure(Throwable caught) {
Window.alert(Log in failed!);
}

@Override
public void onSuccess(String result) {
dataBaseString = result;
}
});

deBugService.outPut(2) DataBase:  +
dataBaseString, new AsyncCallbackVoid() {

public void onFailure(Throwable caught) {
}

public void onSuccess(Void result) {
}
});

if (dataBaseString != null) {
logIn(userNameTextBox.getText(),
dataBaseString);
}
}
});
...
private void logIn(String userName, String dataBase) {
Cookies.setCookie(userName, userName);
Cookies.setCookie(dataBase, dataBase);

Location.reload();
}



GWTLogInServiceImpl

public String logIn(String userName, String passWord) {
String dataBase = null;

try {
Class.forName(org.postgresql.Driver);

Connection connection =
DriverManager.getConnection(jdbc:postgresql://localhost:5432/User
DataBase, postGreSQLUserName, postGreSQLPassWord);

String query = SELECT \DataBase\ FROM \User\ WHERE
\Name\ = ' + userName + ' AND \PassWord\ = ' + passWord + ';

ResultSet resultSet =
connection.createStatement().executeQuery(query);

if (resultSet.next()) {
dataBase = resultSet.getString(DataBase);
}
} catch (Exception exception) {
exception.printStackTrace();
}

System.out.println(1) DataBase:  + dataBase);

return dataBase;
}



GWTDeBugServiceImpl

public void outPut(String string) {
System.out.println(string);
}



I get the following output:
2) DataBase: null
1) DataBase: dataBaseName

Why does it execute GWTDeBugService before GWTLogInService? I'm using
NetBeans 6.9.1 with the latest GWT framework and GWT4NB plugin.
In addition, during compilation I get the following errors:
Validating newly compiled units
  [ERROR] Errors in 'jar:file:/{projectFolder}/lib/GWT2.3.0/gwt-
user.jar!/com/google/gwt/editor/client/EditorDriver.java'
 [ERROR] Line 20: The import
javax.validation.ConstraintViolation cannot be resolved
 [ERROR] Line 97: ConstraintViolation cannot be resolved to a
type
  [ERROR] Errors in 'jar:file:/{projectFolder}/lib/GWT2.3.0/gwt-
user.jar!/com/google/gwt/editor/client/impl/
AbstractSimpleBeanEditorDriver.java'
 [ERROR] Line 28: Name clash: The method
setConstraintViolations(IterableConstraintViolation?) of type
BaseEditorDriverT,E has the same erasure as
setConstraintViolations(IterableConstraintViolation?) of type
EditorDriverT but does not override it
  [ERROR] Errors in 'jar:file:/{projectFolder}/lib/GWT2.3.0/gwt-
user.jar!/com/google/gwt/editor/client/impl/BaseEditorDriver.java'
 [ERROR] Line 31: The import
javax.validation.ConstraintViolation cannot be resolved
 [ERROR] Line 67: ConstraintViolation cannot be resolved to a
type
  [ERROR] Errors in 'jar:file:/{projectFolder}/lib/GWT2.3.0/gwt-
user.jar!/com/google/gwt/editor/client/impl/SimpleViolation.java'
 [ERROR] Line 25: The import
javax.validation.ConstraintViolation cannot be resolved
 [ERROR] Line 40: ConstraintViolation cannot be resolved to a
type
 [ERROR] Line 43: ConstraintViolation cannot be resolved to a
type
 [ERROR] Line 44: Missing code implementation in the compiler
 [ERROR] Line 49: ConstraintViolation cannot be resolved to a
type
 [ERROR] Line 49: Missing code implementation in the compiler
 [ERROR] Line 70: ConstraintViolation cannot be resolved to a
type
 [ERROR] Line 72: ConstraintViolation cannot be resolved to a
type
 [ERROR] Line 73: ConstraintViolation? cannot be resolved to
a type
 [ERROR] Line 77: ConstraintViolationcapture#2-of ? cannot
be resolved to a 

Using PHP as a server side scripting language with GWT.

2011-08-03 Thread Vikas Thapliyal
Hi,

We have a PHP web site using Apache web server.
I want to use GWT in this site.

Can I use GWT as UI components and still use PHP as my server side
scripting language or I have to shift to Java (for server side
programming) to listen events from GWT conponents.?

Any other problem that can be forseen with my approach.

Thanks in advance.
Vikas Thapliyal

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

2011-08-03 Thread musa basbusa
Hi ,

Does GWT still working with the XSTM library?


musa.

-- 
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: About GWT opinion in thoughtworks technology radar july 2011

2011-08-03 Thread Grzegorz Kossakowski
On Tuesday, August 2, 2011 5:18:51 PM UTC+2, Emilio Bravo wrote:

 http://www.thoughtworks.com/articles/technology-radar-july-2011#Platforms 

 thoughtworks technology radar july 2011, talk negatively about gwt, 
 these are the 3 reasons: 

 First, in many ways, JavaScript is more powerful and expressive than 
 Java, so we suspect that the generation is going in the wrong 
 direction. 
 more powerfull for that? 


Scala+GWT project should address this problem bringing more expressive 
language (Scala) into GWT environment.

To give you a specific example, take a look at:

http://scalagwt.github.com/samples/Showcase.html#CwDatePicker

and check Source code tab. Notice how event handler is expressed:

datePicker onValueChange { event =
  val date = event.getValue()
  val dateString = DateTimeFormat.getMediumDateFormat().format(date)
  text.setText(dateString)
}

A few more examples can be found in these slides:

http://goo.gl/WXCGq (check slides 23-25)

-- 
Grzegorz

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

2011-08-03 Thread Matin Rahman
How can i take GWT Project Backup from IDE(eclips).

-- 
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 Beta 2.4 - 64bit Win7 - Eclipse Clasic

2011-08-03 Thread ivan roth
Hello to all, this is my first post. And I was wondering if someone
had problems installing the GWT Beta 2.4 in an Eclipse Classic in a 64
bit Win7.
I tried a couple of times, and by the time it reaches half of the
process, throws an error in the installation.

-- 
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: Compile Error - Method Not Implemented

2011-08-03 Thread Nick Apperley
Is there a way to do a clean build from scratch? When a compile is
done is any caching involved?


On Aug 3, 2:28 am, Jeffrey Chimene jchim...@gmail.com wrote:
 I see nothing there either.

 I'd try a few things:
 o Simplify the file. Use VerticalPanel or HorizontalPanel or a
 combination of them to replace the g:grid when laying out the labels.

 o Focus on getting a clean compilation w/o reference to the ui.xml
 (obviously, it won't run...) Start commenting out the UiField and
 UiHandler annotations one by one. Donotcomment out the field references.

 o Does the Template Editor do anything interesting when invoked on this
 ui.xml?

 o Look at the generated javascript and see if you can find the linkage
 to the Problem Child.

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



[MVP] Set TabPanel to be Presenters View-Container

2011-08-03 Thread Stefan Bogdanski
Hi,

wondering if there is any way to directly get and manipulate the Panel
underlying one specific Tab of of TabPanel, so the panel that holds
the Widget of one Tab?!
I know that I can't access the DeckPanel directly, but maybe there is
another way to get the container-Panel?!

I'm currently changing a projects architecture to MVP as described in
the article: 
http://code.google.com/intl/de/webtoolkit/articles/mvp-architecture.html

In subsection 
http://code.google.com/intl/de/webtoolkit/articles/mvp-architecture.html#history
one can see how easy it is to Implement History-Handling throughout
MVP-Based applications.
Now I want to stick to this as close as possible, but haven't found a
way yet to do something like:

[Code]
public class AppController implements ValueChangeHandlerString {
  ...
  public void onValueChange(ValueChangeEventString event) {
String token = event.getValue();

if (token != null) {
  Presenter presenter = null;

  if (token.equals(list)) {
presenter = new ContactsPresenter(rpcService, eventBus, new
ContactView());
  }
  else if (token.equals(add)) {
presenter = new EditContactPresenter(rpcService, eventBus, new
EditContactView());
  }
  else if (token.equals(edit)) {
presenter = new EditContactPresenter(rpcService, eventBus, new
EditContactView());
  }

  if (presenter != null) {
presenter.go(container);
  }
}
}
[/Code]

where the container actually is the DeckPanel in a TabPanel.
So is there any other possibility of setting a MVP-Presenters
ViewContainer to be a TabPanel-Widget?!

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

2011-08-03 Thread Cesar Redondo
A lo mejor y esto te puede ayudar

http://examples.roughian.com/index.htm#Widgets~MenuBar de

Saludos
On Aug 2, 2011 2:51 PM, jose felix estevez josefel...@gmail.com wrote:
 Buenas amigos estoy en busqueda de algun widget que cumpla la
 funcion de menu.

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


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



How would I convert a PNG Image into a byte array?

2011-08-03 Thread Xavier
Using GWT I would like to read a PNG image and have the data
accessible to me as a decoded byte array.

On the client side I get the image using an ImageBundle, I then
instantiate an Image and call setUrl.

At this point, how do I get the image byte array from the image?

-- 
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 is for apps — right? But what's about static pages? (GWT's Future Plans...)

2011-08-03 Thread Nick Hristov
What exactly do you hope to accomplish?

If I am understanding you correctly, you want to have the server
generate some html page content and the the embedded gwt module will
make the page dynamic (I.e apply filters, next page, etc.)

You can already do much of this functionality, its just not the
standard way of building gwt apps.

You may want to look into using gquery.

Nick

On Aug 3, 7:36 pm, Gal Dolber gal.dol...@gmail.com wrote:
 GWT isn't the problem, you can easily make a non-CEO-friendly apps with
 jquery, sencha, or any other js framework.
 The problem is that search engines do not crawl AJAX apps yet. The proposal
 to make ajax crawlable is a quick solution to make them work with old
 crawling infrastructure.
 I really hope to see a more real solution in the near future.

 On Wed, Aug 3, 2011 at 10:50 PM, Karthik Reddy 
 karthik.ele...@gmail.comwrote:





  I would like to make a related observation although, only tangentially
  related to the initial poster's questions and grievances:

  Even though GWT started off as a toolkit for developing desktop-style
  applications for the web, I think it has slowly transformed beyond the said
  scope.

  As an example consider, google hotel search  at
 http://www.google.com/hotelfinder/. Evidently, this has been built using
  GWT and evidently it is closer to a web-style application than a
  desktop-style application.

   --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/s6C_kGBy96UJ.

  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.

 --
 Guit: Elegant, beautiful, modular and *production ready* gwt applications.

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

-- 
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 CELLTABLE Editable value not persisted when user clicked cell twice or thrice

2011-08-03 Thread vaibhav gwt

How to update the value stored in your dataprovider to the new
value. ?

On Aug 2, 5:27 pm, Ioan Agopian ioan.agop...@gmail.com wrote:
 Hi,

 You have to update the value stored in your dataprovider to the new
 value.
 If not, when user clicks repeatedly the cell, it will revert to the
 old value.

 Regards,
 Ioan

 On Aug 2, 1:01 pm, vaibhav bhalke bhalke.vaib...@gmail.com wrote:







  Hi,

  Editable value not persisted when user clicked cell twice or thrice. Is it
  celltable issue ?

  --
  Best Regards,
  Vaibhav Bhalke
  About me :http://about.me/vaibhavbhalke

  http://about.me/vaibhavbhalke

   Issue-2 Editable value not persisted when user clicked cell twice or 
  thrice.wrf
  82KViewDownload

-- 
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: Eclipse Analyzing Sources Slow

2011-08-03 Thread gutto
Hmm, all I can suggest is that you try the XML Catalog workaround.

On Jul 31, 12:22 am, Alex Luya alexander.l...@gmail.com wrote:
 I have installed this one,but problem still existed.







 On Thu, 2011-07-28 at 20:30 -0700, gutto wrote:
  Pulled down an update for GPE today.

    Google Plugin for Eclipse 3.7    2.3.3.r37v201107211953
  com.google.gdt.eclipse.suite.e37.feature.feature.group     Google, Inc.

  Problem appears to have disappeared!

  On Jul 29, 11:27 am, gutto thomas.gutteri...@gmail.com wrote:
   Thanks, that's interesting. Obviously related. I had noticed that
   content assist in templates is slow the first time I tried to use it.
   I was quite pleased to see that in Indigo it will actually auto-
   complete, whereas in Helios it did nothing when I selected an entry
   from the suggestion list.

   On Jul 26, 8:17 pm, Thomas Broyer t.bro...@gmail.com wrote:

They 
did:http://code.google.com/p/google-web-toolkit/issues/detail?id=5265
Maybe not that many times, and *a priori* not at the same time (not when
building the project, but when opening the XML files), but still.

-- 
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 both image and styling on GWT CustomButton

2011-08-03 Thread Omid Rad
I'm trying to get a ToggleButton to work with a transparent PNG image
which gets background color by CSS styles. It looks like a
CustomButton can get only one of image or style but not both of them.
I tried the followings to no avail:

g:ToggleButton title=first try
g:upFace image='{images.imageWithTransparentBackground}'
styleName='{style.blueBackground}' /
g:downFace image='{images.imageWithTransparentBackground}'
styleName='{style.redBackground}' /
/g:ToggleButton

g:ToggleButton title=second try
g:upFace image='{images.imageWithTransparentBackground}'
div class='{style.blueBackground}'/div
/g:upFace
g:downFace image='{images.imageWithTransparentBackground}'
div class='{style.REDBackground}'/div
/g:downFace
/g:ToggleButton

I don't want to use the global CSS space (i.e .gwt-ToggleButton-up
and .gwt-ToggleButton-down), and I don't want to set the background
image as background-image CSS since I will have many buttons. Any
ideas how to get this working?

-- 
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-contrib] About GWT opinion in thoughtworks technology radar july 2011

2011-08-03 Thread Emilio Bravo
I posted this in the gwt group, but I think this is a better place.

http://www.thoughtworks.com/articles/technology-radar-july-2011#Platforms

thoughtworks technology radar july 2011, talk negatively about gwt,
these are the 3 reasons:
First, in many ways, JavaScript is more powerful and expressive than
Java, so we suspect that the generation is going in the wrong
direction.
more powerfull for that?

Secondly, it is impossible to hide a complex abstraction difference
like that from event-driven desktop to stateless-web without leaky
abstraction headaches eventually popping up
I can't comment, I do not know the compilation process.

Third, it suffers from the same shortcomings of many elaborate
frameworks, where building simple, aligned applications is quick and
easy, building more sophisticated but not supported functionality is
possible but difficult, and building the level of sophistication
required by any non-trivial application becomes either impossible or
so difficult it isn’t reasonable.
What is meant by functionality not supported?.  Program non-trivial
applications with GWT is easier than directly in javascript.

What do you think?

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


Re: [gwt-contrib] About GWT opinion in thoughtworks technology radar july 2011

2011-08-03 Thread Bruce Johnson
When you read opinions like this, you have to interpret the author's
perspective relative to his/her incentives. Thus, GWT consultants will
observe the reasons GWT is really good. Consultants skilled in things other
than GWT will find reasons that their solutions are better. There isn't a
right answer.

More inline below.

On Wed, Aug 3, 2011 at 2:53 AM, Emilio Bravo emilio@gmail.com wrote:

 First, in many ways, JavaScript is more powerful and expressive than
 Java, so we suspect that the generation is going in the wrong
 direction.


It paints a picture, but there are no facts or evidence in the above
statement. Words like powerful and expressive are popular when
discussing these sorts of topics precisely because they're vague enough that
it's hard to argue with them.

You can pick literally any topic and find people eager to take all sides.
The question is how seriously you should take the assertion made by the
author.

Do you trust the author? Why? If so, take the judgment seriously. If you
don't have any particular reason to trust the author relative to others who
have a different conclusion, then ignore the article and judge for yourself
or listen to those with more direct experience using the technology in
question.

Someone's willingness to write down their assertion doesn't make it more
correct. And no tool is right or wrong for every project.

Secondly, it is impossible to hide a complex abstraction difference
 like that from event-driven desktop to stateless-web without leaky
 abstraction headaches eventually popping up


Of course abstractions leak. We knew that when we designed GWT and the
design accounts for that. GWT generally doesn't depend on isolating you from
JS or the DOM except in cases where memory leaks are the inevitable
by-product of not adding widget-like machinery. To put that another way: the
absence of GWT's abstractions that leak is UI code that very likely has
memory leaks. That there are many GWT libraries that interop with
handwritten JS is among the evidence that the above statement
seems under-informed and dismissively definitive (e.g. impossible).

Third, it suffers from the same shortcomings of many elaborate
 frameworks, where building simple, aligned applications is quick and
 easy, building more sophisticated but not supported functionality is
 possible but difficult, and building the level of sophistication
 required by any non-trivial application becomes either impossible or
 so difficult it isn’t reasonable.


This one is almost funny. GWT usually gets beat up for the precise opposite:
it's good for big apps but not easy enough for small ones. Among the tens of
thousands of apps that overcame the above-asserted abstraction headaches
and managed to do something sophisticated include Angry Birds, AdWords
(with hundreds of thousands of lines of browser code), Lombardi Blueprint
(acquired by IBM), DimDim (acquired by Salesforce.com), and, in the last
couple of weeks, Google Offers, Hotel Finder, and Web Fonts.

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

[gwt-contrib] Re: Replace RequestFactoryInterfaceValidator with an annotation-processor-based approach. (issue1503804)

2011-08-03 Thread bobv


http://gwt-code-reviews.appspot.com/1503804/diff/1/samples/dynatablerf/build.xml
File samples/dynatablerf/build.xml (right):

http://gwt-code-reviews.appspot.com/1503804/diff/1/samples/dynatablerf/build.xml#newcode8
samples/dynatablerf/build.xml:8: !-- Run the annotation processor --
On 2011/08/02 17:43:26, rjrjr wrote:

This is a sample, can you be a bit more verbose? Annotation processor

is an

implementation detail.



So really people only need to include this jar if they want compile

time

notification of RF errors. Which seems like a pretty big deal,

especially if the

rf server will no longer do such validation by default.


The server code won't accept the RequestFactory interface if it hasn't
been validated.  A runtime error will occur, telling the user to run the
ValidationTool.


Should we do something to force people to include this jar, like

remove RF from

gwt-user? I suppose that's a pretty drastic thing to do to existing

users,

although frankly it's tempting. Will they see any kind of warning if

they don't

include it ?



I'm actually tempted to be drastic.


I've been thinking about pulling the requestfactory server and vm code
from gwt-[user|servlet].jar since that encourages deployment bloat.  I
could go either way on pulling the client code from gwt-user.jar.

Would it be better to not include the annotation processor in
requestfactory-client.jar and instead require the user to add
requestfactory-apt.jar to their build path?  It would slightly reduce
the amount of code in requestfactory-client.jar and would avoid any
confusion with adding requestfactory-client.jar to a server build
process.

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/apt/DeobfuscatorBuilder.java
File
user/src/com/google/web/bindery/requestfactory/apt/DeobfuscatorBuilder.java
(right):

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/apt/DeobfuscatorBuilder.java#newcode38
user/src/com/google/web/bindery/requestfactory/apt/DeobfuscatorBuilder.java:38:
* Visits a RequestFactory to create its associated DeobfuscatorBuilder
type.
On 2011/08/02 17:43:26, rjrjr wrote:

Visits an RF to create itself? ...its associated {@link

Deobfuscator}... yes?

Done.

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/apt/DescriptorBuilder.java
File
user/src/com/google/web/bindery/requestfactory/apt/DescriptorBuilder.java
(right):

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/apt/DescriptorBuilder.java#newcode34
user/src/com/google/web/bindery/requestfactory/apt/DescriptorBuilder.java:34:
* Builds descriptors from TypeMirrors for both simple types and methods.
On 2011/08/02 17:43:26, rjrjr wrote:

These descriptors are used by {@link ...}


Done.

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/apt/ValidationTool.java
File
user/src/com/google/web/bindery/requestfactory/apt/ValidationTool.java
(right):

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/apt/ValidationTool.java#newcode50
user/src/com/google/web/bindery/requestfactory/apt/ValidationTool.java:50:
* output jar and the binary names of RequestFactory interfaces that
should be
On 2011/07/29 00:53:51, tbroyer wrote:

Out of curiosity: why an output *jar* and not an output folder? (or

giving the

user the choice).
Using a folder would allow outputting to a WAR's WEB-INF/classes

(before

packaging the WAR of course) or, when building using Maven, outputting

to

target/classes or target/generated-classes (whatever is best for

Maven) so the

generated classes can be used by tests (which are run before the code

is

packaged into a JAR, and adding a JAR to the classpath that is not a

dependency

might not be practical, if at all possible; it's late here, so I

haven't checked

how it could work).


Updated so that if the first argument is a directory, the classes will
be emitted as individual files.

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/vm/impl/Deobfuscator.java
File
user/src/com/google/web/bindery/requestfactory/vm/impl/Deobfuscator.java
(right):

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/vm/impl/Deobfuscator.java#newcode27
user/src/com/google/web/bindery/requestfactory/vm/impl/Deobfuscator.java:27:
* Provides access to payload deobfuscation services.
On 2011/08/02 17:43:26, rjrjr wrote:

...for both servers and clients.



Is this the place to mention what GWT clients do instead?


Done.

http://gwt-code-reviews.appspot.com/1503804/diff/1/user/src/com/google/web/bindery/requestfactory/vm/impl/Deobfuscator.java#newcode37
user/src/com/google/web/bindery/requestfactory/vm/impl/Deobfuscator.java:37:
* processor as part of the build process.
On 2011/08/02 17:43:26, 

[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread rjrjr

Still reviewing, but here's a recap of offline initial reaction:


I think the thing to do is

• give generateIncrementally() a RebindMode return value
• unify the rest of the RebindResult class with CachedGeneratorResult
• rename CachedGeneratorResult IncrementalGeneratorContext and give it
all the
new methods from GeneratorContext
• include an IncrementalGeneratorContext object as an argument to
generateIncrementally()


http://gwt-code-reviews.appspot.com/1468804/

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


[gwt-contrib] Re: Replace RequestFactoryInterfaceValidator with an annotation-processor-based approach. (issue1503804)

2011-08-03 Thread bobv

Per offline conversation, I've removed the annotation processor from
requestfactory-client.jar.  This means that the server code must be
built with requestfactory-apt.jar, but doesn't need to be deployed with
it.

http://gwt-code-reviews.appspot.com/1503804/

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


[gwt-contrib] GWT Code Review planned outage Thursday 4 Aug 2011 5pm ET

2011-08-03 Thread Ray Ryan
We will be putting the Rietveld server at
http://gwt-code-reviews.appspot.com/ into read-only mode for a few hours at
about 5pm Eastern Time tomorrow, Thursday August 4th, to deal with some
maintenance.

rjrjr

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

[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread jbrosenberg

Some responses.  I did consider most of your suggestions, and in fact
for a while I did have things as you suggest, so great minds think alike
:).  I'll outline my reasoning:

First, IncrementalGenerators have to live in the same ecosystem as all
the currently extent non-incremental Generator implementations.  Having
a uniform rebind process whereby the StandardRebindOracle is agnostic to
this greatly simplified things.  If we were starting from scratch, I
think it would probably look quite a bit different.

Standard Generators only return a type-name (which can possibly be
null).  The RebindResult allows legacy generators to be cleanly wrapped
and presented to the rebind oracle in a uniform way.

A RebindResult is not the same as a CachedRebindResult.  The
StandardRebindOracle uses the info in the RebindResult to decide how to
proceed.  It may or may not choose to construct a cache entry, and that
cached entry might contain a partial subset of newly generated types and
types from a previous cache entry.  Since a generator itself shouldn't
need to know how to integrate cached types and artifacts, this logic is
better left up to the StandardRebindOracle.  The RebindResult also
contains a target type name, and client data, so it's just a container
to wrap a generators results.

In the case that an IncrementalGenerator decides it can return quickly
and request that all previously cached output can be reused, it doesn't
need to do anything, including not re-committing cached compilation
units and artifacts to the context, etc.  That's all magic handled by
the rebind oracle.

A CachedRebindResult is specifically input to an IncrementalGenerator,
but it's cumbersome to pass it in as a separate arg to
generateIncrementally.  Having it live in the GeneratorContext makes one
less thing a generator implementation needs to pass around to it's
internal methods (since GeneratorContext at the least is commonly needed
all over the place for a generator anyway).

Remember too, that much of the time, an IncrementalGenerator will run
when generatorResultCaching is not enabled, such as currently for all
web-mode compiles, so it's more of a contextual thing anyway, which
makes it more intuitive for it to live in the GeneratorContext.

I did have a separate GeneratContextExt interface, which extended the
base GeneratorContext interface, but ultimately this became unnecessary,
and it greatly simplified the framework by unifying things.

I think you had a couple other comments offline (but not summarized
above), I'll wait for your further comments to respond to those.

http://gwt-code-reviews.appspot.com/1468804/

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


[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread rjrjr

Nothing else important to add. This is nice!


http://gwt-code-reviews.appspot.com/1468804/diff/7001/dev/core/src/com/google/gwt/core/ext/RebindMode.java
File dev/core/src/com/google/gwt/core/ext/RebindMode.java (right):

http://gwt-code-reviews.appspot.com/1468804/diff/7001/dev/core/src/com/google/gwt/core/ext/RebindMode.java#newcode52
dev/core/src/com/google/gwt/core/ext/RebindMode.java:52:
USE_ALL_NEW_WITH_NO_CACHING,
It's unlikely that a generator would ever return this, right? Can you
say so?

http://gwt-code-reviews.appspot.com/1468804/diff/7001/dev/core/src/com/google/gwt/core/ext/RebindResult.java
File dev/core/src/com/google/gwt/core/ext/RebindResult.java (right):

http://gwt-code-reviews.appspot.com/1468804/diff/7001/dev/core/src/com/google/gwt/core/ext/RebindResult.java#newcode48
dev/core/src/com/google/gwt/core/ext/RebindResult.java:48: * cache reuse
decisions.
Could you point out explicitly that this data is cached per generated
type?

http://gwt-code-reviews.appspot.com/1468804/

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


[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread Ray Ryan
I'm still not crazy about having addClientData() and getClientData() on
separate objects. It seems to me that you've violated your own principal
that the GeneratorContext should be the only object that has to get passed
to the generator's helpers.

Can addClientData() move to the context? That would require getClientData()
to be able to retrieve both cached and freshly added data. Is that
practical? Sounds like it would be hugely convenient.

On Wed, Aug 3, 2011 at 12:43 PM, jbrosenb...@google.com wrote:

 Some responses.  I did consider most of your suggestions, and in fact
 for a while I did have things as you suggest, so great minds think alike
 :).  I'll outline my reasoning:

 First, IncrementalGenerators have to live in the same ecosystem as all
 the currently extent non-incremental Generator implementations.  Having
 a uniform rebind process whereby the StandardRebindOracle is agnostic to
 this greatly simplified things.  If we were starting from scratch, I
 think it would probably look quite a bit different.

 Standard Generators only return a type-name (which can possibly be
 null).  The RebindResult allows legacy generators to be cleanly wrapped
 and presented to the rebind oracle in a uniform way.

 A RebindResult is not the same as a CachedRebindResult.  The
 StandardRebindOracle uses the info in the RebindResult to decide how to
 proceed.  It may or may not choose to construct a cache entry, and that
 cached entry might contain a partial subset of newly generated types and
 types from a previous cache entry.  Since a generator itself shouldn't
 need to know how to integrate cached types and artifacts, this logic is
 better left up to the StandardRebindOracle.  The RebindResult also
 contains a target type name, and client data, so it's just a container
 to wrap a generators results.

 In the case that an IncrementalGenerator decides it can return quickly
 and request that all previously cached output can be reused, it doesn't
 need to do anything, including not re-committing cached compilation
 units and artifacts to the context, etc.  That's all magic handled by
 the rebind oracle.

 A CachedRebindResult is specifically input to an IncrementalGenerator,
 but it's cumbersome to pass it in as a separate arg to
 generateIncrementally.  Having it live in the GeneratorContext makes one
 less thing a generator implementation needs to pass around to it's
 internal methods (since GeneratorContext at the least is commonly needed
 all over the place for a generator anyway).

 Remember too, that much of the time, an IncrementalGenerator will run
 when generatorResultCaching is not enabled, such as currently for all
 web-mode compiles, so it's more of a contextual thing anyway, which
 makes it more intuitive for it to live in the GeneratorContext.

 I did have a separate GeneratContextExt interface, which extended the
 base GeneratorContext interface, but ultimately this became unnecessary,
 and it greatly simplified the framework by unifying things.

 I think you had a couple other comments offline (but not summarized
 above), I'll wait for your further comments to respond to those.


 http://gwt-code-reviews.**appspot.com/1468804/http://gwt-code-reviews.appspot.com/1468804/


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

[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread Ray Ryan
Oh, and putClientData seems like a better name.

On Wed, Aug 3, 2011 at 1:02 PM, Ray Ryan rj...@google.com wrote:

 I'm still not crazy about having addClientData() and getClientData() on
 separate objects. It seems to me that you've violated your own principal
 that the GeneratorContext should be the only object that has to get passed
 to the generator's helpers.

 Can addClientData() move to the context? That would require getClientData()
 to be able to retrieve both cached and freshly added data. Is that
 practical? Sounds like it would be hugely convenient.


 On Wed, Aug 3, 2011 at 12:43 PM, jbrosenb...@google.com wrote:

 Some responses.  I did consider most of your suggestions, and in fact
 for a while I did have things as you suggest, so great minds think alike
 :).  I'll outline my reasoning:

 First, IncrementalGenerators have to live in the same ecosystem as all
 the currently extent non-incremental Generator implementations.  Having
 a uniform rebind process whereby the StandardRebindOracle is agnostic to
 this greatly simplified things.  If we were starting from scratch, I
 think it would probably look quite a bit different.

 Standard Generators only return a type-name (which can possibly be
 null).  The RebindResult allows legacy generators to be cleanly wrapped
 and presented to the rebind oracle in a uniform way.

 A RebindResult is not the same as a CachedRebindResult.  The
 StandardRebindOracle uses the info in the RebindResult to decide how to
 proceed.  It may or may not choose to construct a cache entry, and that
 cached entry might contain a partial subset of newly generated types and
 types from a previous cache entry.  Since a generator itself shouldn't
 need to know how to integrate cached types and artifacts, this logic is
 better left up to the StandardRebindOracle.  The RebindResult also
 contains a target type name, and client data, so it's just a container
 to wrap a generators results.

 In the case that an IncrementalGenerator decides it can return quickly
 and request that all previously cached output can be reused, it doesn't
 need to do anything, including not re-committing cached compilation
 units and artifacts to the context, etc.  That's all magic handled by
 the rebind oracle.

 A CachedRebindResult is specifically input to an IncrementalGenerator,
 but it's cumbersome to pass it in as a separate arg to
 generateIncrementally.  Having it live in the GeneratorContext makes one
 less thing a generator implementation needs to pass around to it's
 internal methods (since GeneratorContext at the least is commonly needed
 all over the place for a generator anyway).

 Remember too, that much of the time, an IncrementalGenerator will run
 when generatorResultCaching is not enabled, such as currently for all
 web-mode compiles, so it's more of a contextual thing anyway, which
 makes it more intuitive for it to live in the GeneratorContext.

 I did have a separate GeneratContextExt interface, which extended the
 base GeneratorContext interface, but ultimately this became unnecessary,
 and it greatly simplified the framework by unifying things.

 I think you had a couple other comments offline (but not summarized
 above), I'll wait for your further comments to respond to those.


 http://gwt-code-reviews.**appspot.com/1468804/http://gwt-code-reviews.appspot.com/1468804/




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

[gwt-contrib] Re: Replace RequestFactoryInterfaceValidator with an annotation-processor-based approach. (issue1503804)

2011-08-03 Thread Jeff Larsen
Does this mean something similar to RequestFactoryInterfaceValidator will 
still need to be present? I ask because of 
http://code.google.com/p/google-web-toolkit/issues/detail?id=6640 where 
RequestFactoryInterfaceValidator seems to be getting in my way. 

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

[gwt-contrib] Re: Replace RequestFactoryInterfaceValidator with an annotation-processor-based approach. (issue1503804)

2011-08-03 Thread Jeff Larsen
oops, I missed your first reply. 


The server code won't accept the RequestFactory interface if it hasn't
been validated.  A runtime error will occur, telling the user to run the
ValidationTool.


answers my question. 

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

[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread jbrosenberg

http://gwt-code-reviews.appspot.com/1468804/

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


[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread jbrosenberg

On 2011/08/03 20:03:28, rjrjr wrote:

Oh, and putClientData seems like a better name.



Done


On Wed, Aug 3, 2011 at 1:02 PM, Ray Ryan mailto:rj...@google.com

wrote:


 I'm still not crazy about having addClientData() and getClientData()

on

 separate objects. It seems to me that you've violated your own

principal

 that the GeneratorContext should be the only object that has to get

passed

 to the generator's helpers.

 Can addClientData() move to the context? That would require

getClientData()

 to be able to retrieve both cached and freshly added data. Is that
 practical? Sounds like it would be hugely convenient.



I'm not sure I see why it makes sense for it not to be part of the
cached result.  It is indeed closely associated specifically with that
previously generated result.  By keeping it as part of the cachedResult,
it makes one less thing that needs to be passed around internally to the
generator (only the context needs to be passed around).

The context is specific to the currently running generator environment,
and generally gets reset for each generator invocation.  Adding more
data to the context requires more api and more things for the context to
keep track of (currently it just keeps track of a CachedRebindResult
object, which it would still need to do).

Maybe there's a better name than clientData here, suggestions?  It's
specific to a generator run invoked that was invoked with the same
rebind rule and requested type name as are currently in effect.  But
it's historical data, and in fact is not essential at all to the
generator (if it's not there, the generator will run to completion).

http://gwt-code-reviews.appspot.com/1468804/

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


[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1468804/diff/7001/dev/core/src/com/google/gwt/core/ext/RebindMode.java
File dev/core/src/com/google/gwt/core/ext/RebindMode.java (right):

http://gwt-code-reviews.appspot.com/1468804/diff/7001/dev/core/src/com/google/gwt/core/ext/RebindMode.java#newcode52
dev/core/src/com/google/gwt/core/ext/RebindMode.java:52:
USE_ALL_NEW_WITH_NO_CACHING,
Well no, it is useful in a couple of contexts.  This mode allows the
framework to not bother creating a cache entry, and avoid incurring the
overhead of doing so, if the cache entry can't be made use of anyway.

First, in the code that wraps legacy Generators, this RebindMode is
always used.

Second, even for generators which implement IncrementalGenerator, there
are certain conditions whereby the generator can determine positively
that its result should not be cached, since it can't possibly make use
of any cached information subsequently.

Examples of this exist for both the RPC and ClientBundle.  In the case
of RPC, see ProxyCreator.java, line 875 (which gets returned to line
380).  This is basically saying that if a particular RPC implementation
is using deRPC, don't attempt caching, since support for deRPC wasn't
added.

In the case of AbstractClientBundleGenerator, see line 715 (which gets
returned to line 394).  In this case, it indicates that if a
ClientBundle calls for a ResourceGenerator implementation that doesn't
implement the SupportsGeneratorResultCaching interface, then this client
bundle should never attempt to make use of caching.  Since developers
can sub-class ResourceGenerator, or other GWT developers can add new
ResourceGenerators, this makes sure that they've considered incremental
caching in how they've implemented things, and if not,
AbstractClientBundleGenerator won't trust it as being cacheable.

http://gwt-code-reviews.appspot.com/1468804/diff/7001/dev/core/src/com/google/gwt/core/ext/RebindResult.java
File dev/core/src/com/google/gwt/core/ext/RebindResult.java (right):

http://gwt-code-reviews.appspot.com/1468804/diff/7001/dev/core/src/com/google/gwt/core/ext/RebindResult.java#newcode48
dev/core/src/com/google/gwt/core/ext/RebindResult.java:48: * cache reuse
decisions.
On 2011/08/03 19:50:55, rjrjr wrote:

Could you point out explicitly that this data is cached per generated

type?

Done.

http://gwt-code-reviews.appspot.com/1468804/

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


[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread Ray Ryan
On Wed, Aug 3, 2011 at 2:36 PM, jbrosenb...@google.com wrote:

 On 2011/08/03 20:03:28, rjrjr wrote:

 Oh, and putClientData seems like a better name.



 Done

  On Wed, Aug 3, 2011 at 1:02 PM, Ray Ryan mailto:rj...@google.com

 wrote:

   I'm still not crazy about having addClientData() and getClientData()

 on

  separate objects. It seems to me that you've violated your own

 principal

  that the GeneratorContext should be the only object that has to get

 passed

  to the generator's helpers.
 
  Can addClientData() move to the context? That would require

 getClientData()

  to be able to retrieve both cached and freshly added data. Is that
  practical? Sounds like it would be hugely convenient.
 


 I'm not sure I see why it makes sense for it not to be part of the
 cached result.  It is indeed closely associated specifically with that
 previously generated result.  By keeping it as part of the cachedResult,
 it makes one less thing that needs to be passed around internally to the
 generator (only the context needs to be passed around).


No, I have two things to pass around. I have to pass around generatorContext
to allow helpers to fetch cached data, and I also have to pass around
something to allow helpers to post new cached data.

That is, in the current scheme I have to write something like:

generateIncrementally(TreeLogger logger, GeneratorContext context, String
typeName) {
  MapString, Serializable helperCachedData;
  new HelperOne(context, helperCachedData).run();
  new HelperTwo(context, helperCachedData).run();

  RebindResult result = new RebindResult(USE_WHATEVER, typeName + Impl);
  for (Map.EntryString, Serializable entry : helperCachedData) {
result.putClientData(entry.key, entry.value);
  }
  return result;
}


instead of

generateIncrementally(TreeLogger logger, GeneratorContext context, String
typeName) {
  new HelperOne(context).run();
  new HelperTwo(context).run();

  return new RebindResult(USE_WHATEVER, typeName + Impl);
}


Further, my helpers have to look in two places for cacheable data generated
by an upstream helper.


 The context is specific to the currently running generator environment,
 and generally gets reset for each generator invocation.  Adding more
 data to the context requires more api and more things for the context to
 keep track of (currently it just keeps track of a CachedRebindResult
 object, which it would still need to do).

 Maybe there's a better name than clientData here, suggestions?  It's
 specific to a generator run invoked that was invoked with the same
 rebind rule and requested type name as are currently in effect.  But
 it's historical data, and in fact is not essential at all to the
 generator (if it's not there, the generator will run to completion).


 http://gwt-code-reviews.**appspot.com/1468804/http://gwt-code-reviews.appspot.com/1468804/


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

[gwt-contrib] [google-web-toolkit] r10491 committed - Include enclosing class in generated class name...

2011-08-03 Thread codesite-noreply

Revision: 10491
Author:   ncha...@google.com
Date: Wed Aug  3 12:02:05 2011
Log:  Include enclosing class in generated class name

Review at http://gwt-code-reviews.appspot.com/1499804

Review by: rchan...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10491

Modified:
 /trunk/user/src/com/google/gwt/validation/rebind/AbstractCreator.java
 /trunk/user/src/com/google/gwt/validation/rebind/ValidatorCreator.java

===
--- /trunk/user/src/com/google/gwt/validation/rebind/AbstractCreator.java	 
Fri May  6 07:35:25 2011
+++ /trunk/user/src/com/google/gwt/validation/rebind/AbstractCreator.java	 
Wed Aug  3 12:02:05 2011

@@ -1,12 +1,12 @@
 /*
  * Copyright 2010 Google Inc.
- *
+ *
  * Licensed under the Apache License, Version 2.0 (the License); you may  
not
  * use this file except in compliance with the License. You may obtain a  
copy of

  * the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -59,7 +59,8 @@
 return getQualifiedName();
   }

-  protected void addImports(ClassSourceFileComposerFactory  
composerFactory, Class?... imports) {

+  protected void addImports(ClassSourceFileComposerFactory composerFactory,
+  Class?... imports) {
 for (Class? imp : imports) {
   composerFactory.addImport(imp.getCanonicalName());
 }
@@ -82,37 +83,39 @@
 String packageName = serviceIntfPkg == null ?  :  
serviceIntfPkg.getName();

 return packageName;
   }
+
+  protected String getSimpleName() {
+  final int length = getPackage().length();
+  final String rawName =  
validatorType.getQualifiedSourceName().substring(

+  length == 0 ? 0 : length + 1);
+  return rawName.replace('.', '_') + Impl;
+}

   protected abstract void writeClassBody(SourceWriter sourceWriter)
   throws UnableToCompleteException;

   protected void writeValidatorInstance(SourceWriter sw, BeanHelper bean) {
-BeanHelper.writeInterface(context, logger, bean);
-// private final MyBeanValidator myBeanValidator =
-sw.print(private final  + bean.getFullyQualifiedValidatorName()  
+  );

-sw.print(bean.getValidatorInstanceName());
-sw.println( = );
-sw.indent();
-sw.indent();
-
-// MyBeanValidator.INSTANCE;
-sw.print(bean.getFullyQualifiedValidatorName());
-sw.println(.INSTANCE;);
-sw.outdent();
-sw.outdent();
-  }
+  BeanHelper.writeInterface(context, logger, bean);
+  // private final MyBeanValidator myBeanValidator =
+  sw.print(private final  + bean.getFullyQualifiedValidatorName() +  );
+  sw.print(bean.getValidatorInstanceName());
+  sw.println( = );
+  sw.indent();
+  sw.indent();
+
+  // MyBeanValidator.INSTANCE;
+  sw.print(bean.getFullyQualifiedValidatorName());
+  sw.println(.INSTANCE;);
+  sw.outdent();
+  sw.outdent();
+}

   private String getQualifiedName() {
 String packageName = getPackage();
 return (packageName ==  ?  : packageName + .) + getSimpleName();
   }

-  private String getSimpleName() {
-return validatorType.getSimpleSourceName() + Impl;
-  }
-
-  private SourceWriter getSourceWriter(TreeLogger logger,
-  GeneratorContext ctx) {
+  private SourceWriter getSourceWriter(TreeLogger logger, GeneratorContext  
ctx) {

 String packageName = getPackage();
 String simpleName = getSimpleName();
 PrintWriter printWriter = ctx.tryCreate(logger, packageName,  
simpleName);

===
--- /trunk/user/src/com/google/gwt/validation/rebind/ValidatorCreator.java	 
Mon Jun 13 07:06:54 2011
+++ /trunk/user/src/com/google/gwt/validation/rebind/ValidatorCreator.java	 
Wed Aug  3 12:02:05 2011

@@ -93,10 +93,6 @@
 sourceWriter.println();
 writeGwtValidate(sourceWriter);
   }
-
-  private String getSimpleName() {
-return validatorType.getSimpleSourceName() + Impl;
-  }

   private void writeConstructor(SourceWriter sw) {
 // public MyValidator() {

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


[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread jbrosenberg

Well, a generator has to keep it's own state anyway, in practice.  In
the case of AbstractClientBundleGenerator, it actually creates a
ResourceContext and passes that around, along with the GeneratorContext
(this was before any IncrementalGenerator enhancements).  In the case of
RPC, there are 2 SerializableTypeOracleBuilders and the GeneratorContext
that get passed around.

I'm not sure, it sounds like you are asking to have a generic
functionality for the GeneratorContext, so generators can park data
there as needed (not really specific to IncrementalGenerators).  What
would the semantics be, would it always get added to the cache in
entirety, or is there a separate api for saving data for current state
and another for specifically placing data that needs to be cached?  Is
it cleared when each new generator invocation occurs?

Since this change is not attempting to modify how the framework behaves
with respect to legacy generators, I'd rather not invent api in this
patch that's not related to the task at hand.

Using your example, before any IncrementalGenerator work, both
ClientBundle and RPC look similar to your first example (e.g. there's
both a GeneratorContext and helperCachedData passed around everywhere).
The only change I've done is to add a way (without modifying current
generators), to prepare extra data for subsequent cache reuse checking.
In fact, the client data stored for cache reuse checking is generally
newly prepared data, not really needed unless caching is enabled.  So,
the way things work now, are very similar to the current state, but with
cache  use support added at the beginning (to check reusability) and at
the end (to prepare and remember data for future checking).  Like so:

generateIncrementally(TreeLogger logger, GeneratorContext context,
String
typeName) {

  if (checkCacheReusability(context))
return new RebindResult(RebindMode.USE_CACHE,...)

  // this part is no different for non-incremental generators
  MyGeneratorStateClass generatorState;
  new HelperOne(context, generatorState).run();
  new HelperTwo(context, generatorState).run();

  if (canBeCacheable(context)) {
// possibly expensive task
PreparedClientData pcd = prepareClientData(context, helperData);

RebindResult result = new RebindResult(USE_WHATEVER, typeName +
Impl);
result.putClientData(pcd, pcd);

return result;
  } else {
// no need to prepare any client data
return new RebindResult(RebindMode.USE_ALL_NEW_WITH_NO_CACHING,...);
  }
}

http://gwt-code-reviews.appspot.com/1468804/

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


[gwt-contrib] Re: Make generator result caching framework api available publically. (issue1468804)

2011-08-03 Thread Ray Ryan
LGTM

On Wed, Aug 3, 2011 at 4:17 PM, jbrosenb...@google.com wrote:

 Well, a generator has to keep it's own state anyway, in practice.  In
 the case of AbstractClientBundleGenerator, it actually creates a
 ResourceContext and passes that around, along with the GeneratorContext
 (this was before any IncrementalGenerator enhancements).  In the case of
 RPC, there are 2 SerializableTypeOracleBuilders and the GeneratorContext
 that get passed around.

 I'm not sure, it sounds like you are asking to have a generic
 functionality for the GeneratorContext, so generators can park data
 there as needed (not really specific to IncrementalGenerators).  What
 would the semantics be, would it always get added to the cache in
 entirety, or is there a separate api for saving data for current state
 and another for specifically placing data that needs to be cached?  Is
 it cleared when each new generator invocation occurs?

 Since this change is not attempting to modify how the framework behaves
 with respect to legacy generators, I'd rather not invent api in this
 patch that's not related to the task at hand.

 Using your example, before any IncrementalGenerator work, both
 ClientBundle and RPC look similar to your first example (e.g. there's
 both a GeneratorContext and helperCachedData passed around everywhere).
 The only change I've done is to add a way (without modifying current
 generators), to prepare extra data for subsequent cache reuse checking.
 In fact, the client data stored for cache reuse checking is generally
 newly prepared data, not really needed unless caching is enabled.  So,
 the way things work now, are very similar to the current state, but with
 cache  use support added at the beginning (to check reusability) and at
 the end (to prepare and remember data for future checking).  Like so:


 generateIncrementally(**TreeLogger logger, GeneratorContext context,
 String
 typeName) {

  if (checkCacheReusability(**context))
return new RebindResult(RebindMode.USE_**CACHE,...)

  // this part is no different for non-incremental generators
  MyGeneratorStateClass generatorState;
  new HelperOne(context, generatorState).run();
  new HelperTwo(context, generatorState).run();

  if (canBeCacheable(context)) {
// possibly expensive task
PreparedClientData pcd = prepareClientData(context, helperData);


RebindResult result = new RebindResult(USE_WHATEVER, typeName +
 Impl);
result.putClientData(pcd, pcd);

return result;
  } else {
// no need to prepare any client data
return new RebindResult(RebindMode.USE_**ALL_NEW_WITH_NO_CACHING,...);

  }
 }

 http://gwt-code-reviews.**appspot.com/1468804/http://gwt-code-reviews.appspot.com/1468804/


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

Re: [gwt-contrib] About GWT opinion in thoughtworks technology radar july 2011

2011-08-03 Thread Miroslav Pokorny
The article is a poor source if one attempts to make a meaningful techincal
assesment on any opinion. Sure theres a lot of buzzwords but almiost no
technically minded examples to back any of the assumptions. Does it show you
why X is better than Y at attempting Z. No, so what your basically left is
the bias of the authors. Given the share number of technologies covered it
is by definition impossible that the authors have really spent sufficient
time with each in order to get confortable, become knowledgable and
effective with each. On the other hand, it shows that they probably did try
many or all for an afternoon and first impressions show in the lack of
detail given. This article is perfect for managers while someone who really
wants to get something done will after reading the article have gained
little benefit from the experience.

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