Re: Offline support for mobile devices

2012-02-20 Thread dominikz
Thanks,

I was aware of the project, but did not know that it supports the feature 
we 'alternatively' implemented. I hope they resolved the issue with Opera 
Mobile and Firefox we had. Will definitely check and compare against our 
version.

Always great to have support from the community.

Thanks again

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



No time is shown in ColumnDate

2012-02-20 Thread tong123123
DateCell dateCell = new DateCell();
ColumnLog, Date dateColumn = new ColumnLog, Date(dateCell){
 public Date getValue(Log log){
  return log.getLog_dtm();
 }
};

the return type is java.util.Date, but when output is UI, only date
portion is shown, what is the reason?

-- 
You received 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: No time is shown in ColumnDate

2012-02-20 Thread Jens
DateCell uses DateTimeFormat.PredefinedFormat.DATE_FULL as default, 
see: 
http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/cell/client/DateCell.html#DateCell()

If your want a different format string you have to provide one 
using: 
http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/cell/client/DateCell.html#DateCell(com.google.gwt.i18n.client.DateTimeFormat)

-- J.

-- 
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/-/h0Xel8G2-OEJ.
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: No type for token

2012-02-20 Thread Marco Asteriti
Thanks Brandon, I tied cleaning and GWT compile just in case (it did work 
for getting request factory validation to work, once) but it didn't have 
the desired effect.  My request context is very similar to the one you 
linked, the difference is I used only RequestT for all my method 
invocations, not the InstanceRequestT, T. Here's the code bit:

@ServiceName(value = com.masteriti.manager.server.access.PersonDao, 
 locator = 
com.masteriti.manager.server.locator.DaoServiceLocator)
public interface PersonRequest extends RequestContext {
 RequestListPersonProxy listAll();
 RequestVoid save(PersonProxy person);
 RequestPersonProxy saveAndReturn(PersonProxy person);
 RequestVoid delete(PersonProxy person); 
}

The other thing I noticed looking around demo source code is that hardly 
anyone uses @Embedded objects in their entities.  Even the DynaTableRF 
source doesn't use the @Embedded notation as shown in Google's RequestFactory 
Tutorialhttp://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#valueProxies,
 
instead it simply has 

  private Address address = new Address();

I'll try that today and see if it works, but any other suggestions would be 
welcome!

Marco

-- 
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/-/xkDH2eCm9dcJ.
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 in enterprise systems (SAP, AS/400)

2012-02-20 Thread Jeff Chimene
Hi Dominik:

Very impressive! Good luck w/ these projects. It's great to see how
the legacy and current technologies work together.

Cheers,
jec

On 2012-02-19, dominikz dominik.zalew...@gmail.com wrote:
 Dear developers,

 I'm using GWT in combination with SAP and IBM's AS/400 (aka IBM i) systems.
 I thought that this topic may be interesting for some of you.

 Please see the attachment.

 --
 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/-/rJdyAFa2clcJ.
 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: No type for token

2012-02-20 Thread Thomas Broyer
Several things:

   - InstanceRequest vs. Request doesn't matter
   - Your AddressProxy is obviously referenced from PersonProxy (I suppose 
   you have a getter in addition to the setter?)
   - The DynaTableRf doesn't use JPA or JDO or whatever, it stores 
   everything in-memory, so it doesn't need any annotation on the domain 
   objects. http://code.google.com/p/listwidget/ (by David Chandler, Google 
   Developer Advocate for GWT) uses EntityProxy and ValueProxy if you want 
   some example with an @Embedded annotation (if that can reassure you), it's 
   the @Embedded annotation from Objectify though, not JPA or JDO.
   - I suppose your AddressProxy is a ValueProxy?
   - Annotation processing in Eclipse a barely usable. I battled for hours 
   yesterday to make it refresh the generated DeobfuscatorBuilder. IIRC, I 
   refresh the project in eclipse, then restarted it, then disabled annotation 
   processing, deleted the .apt_generated folder and re-enabled annotation 
   processing. If you can use Maven for your project, then I'd bet it works 
   much better there! (I had the issue on the gwt-user project itself, so it 
   wasn't an option for me) Next time, I'll try setting up a build action (or 
   whatever) to run javac -proc:only instead of relying of Eclipse's 
   built-in (and awfully buggy) APT.
   - If it's not an issue with Eclipse's annotation processing but rather 
   with GWT, try launching the ValidationTool (or javac) on your classes, 
   it'll log issues with your classes that makes it exclude them from the 
   generated DeobfuscationBuilder.

-- 
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/-/MPS4CqU9o-EJ.
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: No type for token

2012-02-20 Thread Marco Asteriti


On Monday, February 20, 2012 9:29:54 AM UTC-5, Thomas Broyer wrote:

 Several things:

- Annotation processing in Eclipse a barely usable. I battled for 
hours yesterday to make it refresh the generated DeobfuscatorBuilder. 
 IIRC, 
I refresh the project in eclipse, then restarted it, then disabled 
annotation processing, deleted the .apt_generated folder and re-enabled 
annotation processing. If you can use Maven for your project, then I'd bet 
it works much better there! (I had the issue on the gwt-user project 
itself, so it wasn't an option for me) Next time, I'll try setting up a 
build action (or whatever) to run javac -proc:only instead of relying of 
Eclipse's built-in (and awfully buggy) APT.

 Thanks for the reply, Thomas.  This item did the trick.  Following your 
procedure to refresh the project took care of the No type for token... 
error.  The code now runs without errors although its still not saving 
 addresses, but at least I'll have an opportunity to debug it in my code. 
 I've never used maven, and have been resistant to adding more new stuff on 
my plate, but I may have to at this point.  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/-/yPhwdjkGGU8J.
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.create - why the ? wildcard?

2012-02-20 Thread Chris Price
I've just been caught out by a ClassCastException from GWT.create, it
turned out to be a simple copy/paste fail when writing unit tests but
it got me thinking.

How come GWT.create is defined like so -

public static T T create(Class? classLiteral) {

instead of like so -

public static TArg, TRet extends TArg TRet create(ClassTArg
classLiteral) {

?

Chris

-- 
You received 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 strange code generation on float numbers

2012-02-20 Thread Steve
My guess is it's because .01 cannot be expressed exactly as a
float.  Like base 10 cannot express 1/3, IEEE floats have trouble with
1/10 and derivatives.

Steve



On Feb 8, 9:54 am, Andrey Korzhevskiy a.korzhevs...@gmail.com wrote:
 Hello everyone,

 I found interesting issue. Suppose I have this java code:

 float f = 0.01f;
 someFunc(f)

 which is generated by GWT into js code, something like that

 someFunc(9.9534e-7)

 So my question is: if GWT sees constant in code why it processes this
 constant so strange? I expect to see in generated js this call:
 someFunc(0.01)
 Is there some complex float numbers processing in gwt-dev?

 Thank you,
 Andrew

-- 
You received 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 in enterprise systems (SAP, AS/400)

2012-02-20 Thread karim duran
Hi Dominik,

I read the PDF and i'd like to tell you that i do the same on the AS400.
You can embed a JAVA library into your project, containing anything you
need to communicate with RPG programs on the iSerie.
If you add this library into your GWT project, it's even more easy and fun.

You can also add the library into Android device project. ( i didn't test
yet ).

For SAP, there is also a big Java API library you can use to talk to ABAP
pgm, or directly to SAP data.

(*) for iSerie -

Have a look at this library : http://jt400.sourceforge.net/ ( open source
version )

You can find it (IBM production version ) directly on your AS400 :
jt400native.jar if you setup the right PTF for Java support.

Today, i connect to OS400 from my Android Phone or Tablet with a tn5250
terminal emulator from anywhere.

It was just a notice. I'm really interrested by your work.

Thanks.

Regards.

Karim Duran



2012/2/19 dominikz dominik.zalew...@gmail.com

 Dear developers,

 I'm using GWT in combination with SAP and IBM's AS/400 (aka IBM i)
 systems.
 I thought that this topic may be interesting for some of you.

 Please see the attachment.

 --
 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/-/rJdyAFa2clcJ.
 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: GWT.create - why the ? wildcard?

2012-02-20 Thread Thomas Broyer
Because of GWT-RPC: MyServiceAsync service = GWT.create(MyService.class); 
MyServiceAsync doesn't extend MyService, they technically have no 
relationship at all, they're only tied together by a naming rule.

-- 
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/-/_IRRvy9La8kJ.
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 strange code generation on float numbers

2012-02-20 Thread Alan Chaney

On 2/20/2012 7:46 AM, Steve wrote:

My guess is it's because .01 cannot be expressed exactly as a
float.  Like base 10 cannot express 1/3, IEEE floats have trouble with
1/10 and derivatives.

Steve
Yes, that's right, 0.01f is not exactly representable with an IEEE 
floating point number. I suspect that the OP's original 9.9534e-7 is the 
closest a 64 bit FP number can get to 0.01f. Its one reason why you 
must be very careful with expressions like:


if (fpnumber == 0.01f) then

And, of course, the original java.lang.Float gets converted to a JS 
equivalent which is (almost) the same as a java.lang.Double in JS - but 
will still have the same precision when emulated in hosted mode - so, 
beware!


In my code I rarely, if ever, use floats anymore, especially if I think 
that they are going to be used in GWT. The issues of additional 
serialization payload are best solved by compression.


Alan






On Feb 8, 9:54 am, Andrey Korzhevskiya.korzhevs...@gmail.com  wrote:

Hello everyone,

I found interesting issue. Suppose I have this java code:

float f = 0.01f;
someFunc(f)

which is generated by GWT into js code, something like that

someFunc(9.9534e-7)

So my question is: if GWT sees constant in code why it processes this
constant so strange? I expect to see in generated js this call:
someFunc(0.01)
Is there some complex float numbers processing in gwt-dev?

Thank you,
Andrew


--
You received 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 in enterprise systems (SAP, AS/400)

2012-02-20 Thread dominikz
Dear Karim,

I'm very aware of jt400 library. I've done tons of things with that over a 
couple of past years. One problem with it is that it does not support 
everything you'd like to do with AS/400. The other is that it's performance 
is dreadful. Trust me, I checked it, even had lectures about it during 
conferences. I wouldn't even be going near RPG (since I'm java programmer) 
if the performance of jt400 wasn't so bad.

The same is with JCo library on SAP. You need to run Java server in order 
to use it. And it's efficiency is also dreadful. Not even mentioning that 
if you look at its source code, you'll start tearing your hair out of your 
head. They've put there one class with dozens of static methods. One 
library with one class that is 1500 lines long. A nightmare.

One more fact against Java is that you need to have java server to run it 
(WebSphere or Tomcat). And admins of AS400 don't like java since when they 
hear java they think 'WebSphere' which is a total mess. But this is another 
conversation I don't want to start here. The same is with SAP guys. When 
they hear 'Java', they run away in anger. 

Anyway going back to the original point, the whole idea is NOT TO USE JAVA 
AT ALL IN RUNTIME. This is how you should look at the PDF I've sent.

Other than the above I really appreciate your answer :)

-- 
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/-/ETFpZEtuiGEJ.
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.create - why the ? wildcard?

2012-02-20 Thread Chris Price
Thanks, I haven't looked into GWT-RPC since I did the tutorial so I'd
forgotten about that use case.

On Mon, Feb 20, 2012 at 4:09 PM, Thomas Broyer t.bro...@gmail.com wrote:
 Because of GWT-RPC: MyServiceAsync service = GWT.create(MyService.class);
 MyServiceAsync doesn't extend MyService, they technically have no
 relationship at all, they're only tied together by a naming rule.

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

 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.



MVP and RPC: What makes sense?

2012-02-20 Thread Thad
I'm still trying to get my head around this aspect of MVP: Where do I
handle my RPC calls? Theory's answer seems to be in the Activity/
Presenter while simplicity's answer as often is in the View. I'm
mindful of Thomas Broyer's comment, My rule of thumb: do what you
think is best for you (http://groups.google.com/group/google-web-
toolkit/msg/2b758d66dc1c13f0). The best answer to Activity/Presenter
vs. View seems to be it depends.

Here's the situation that arises in my current application: Within a
View a user will open and edit a document. The document may be opened
from the server through a list of available documents, from the local
workstation though a FormPanel and FileUpload widget, or created new
within my app (which may involve an optional image that is also
selected via a FormPanel and FileUpload).

In the case of the listing the server documents, it makes sense to
Place to request the list as well as a Place that uniquely selects the
document on the server. In either case I would ask the Activity to
make the RPC call and the Activity/Presenter to tell the View display
this.

However in the case of a local file, the user selects the file within
the View (the FileUpload) then clicks a submit button within the View
(the FormPanel) that uploads the file. The upload's
SubmitCompleteHandler triggers an RPC call to open the document from
the server for display in the browser. In this case, why should the
View tell the Presenter get the file and the Presenter the tell the
view show this file. It seems to me that the steps from picking the
local file through its display can be handled entirely--and more
simply--within the View. Bringing the Presenter into it complicates
the code.

Another RPC that seems to belong solely with the View is one where the
View needs information for display that can be calculated only on the
server and that is not useful outside of the View. Examples might be
image DPI, image color depth, or processing text files where a String
returned from via RPC to the TextArea display might eat non-printing
characters. In this case, why should the View ask the Presenter and
the Presenter then update the View? Again, bringing the Presenter into
it complicates the code. (As for testing, the heavy lifting is done
server-side and the tests are performed on the server side.)

Finally, an example not involving RPC that seems go belong solely
within the View: Changing the state of one widget that enables/
disables or shows/hides other widgets. Yes, Presenters tell Viewers to
display, but in this case why make the trip back and forth? The app's
other Views don't care what is selected moment to moment, only what
final generated object is.

Thoughts? Comments?

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



No LayoutPanel.onResize() event on panel attach

2012-02-20 Thread Antón Kuranov
Hello,

I need a panel that lays out its children manually according it's
current size. I did it changing onResize() method of LayoutPanel. The
problem is that onResize() is not called initially when the panel is
just attached, only when resized, and thus children sizes could not be
set: when attaching getOffsetHeight() and 
getOffsetWidth() always
return 0. Intercepting of onLoad() and onAttach() does not help.

Is there any way to intercept an event when LayoutPanel aquires it's
initial size?

Antón

-- 
You received 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 strange code generation on float numbers

2012-02-20 Thread Andrey Korzhevskiy
.01 can be expressed in JS floating number. The thing is not in IEEE 
and runtime number representation. The thing is in that literal constant 
should not be changed.
I mean if in Java code I see   'float myNum = 0.01', I expect to see it 
in generated JS as 'var myNum = 0.01'

-- 
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/-/i999wNTvMx0J.
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: MVP and RPC: What makes sense?

2012-02-20 Thread Matias Costa
 why should the View tell the Presenter get the file and the Presenter 
the tell the 
 view show this file.

Because :

1) Error handling, this complicates the logic.
2) Display independence. Useful if you go mobile or more usual, while you 
create a new version of the interface, you can have a stable version to 
ship updates.
3) Testability. It is easy to test blind logic. Good luck testing a view.

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



Deploy GWT App to Tomcat - Validation Errors

2012-02-20 Thread Henry Crocker
I have a very small sample GWT application that I created as a proof
of concept for my company.  The goal was to use existing DAOs and
Beans along with the RequestFactory to access and display data.  It
appears I am very close to getting this to work.  I see the following
in my tomcat log:

SEVERE: Unexptected error java.lan.RuntimeException: The
RequestFactory ValidationTool must be run for the
com.ca.queueanagertoo.shared.QueueManagerToolRequestFactory
RequestFactory type at
com.google.web.bindery.requestfactory.vm.impl.Deobfuscator#Builder.load(Deobfuscator.java:
59)..

I receive the following during compile from eclipse:

   Validating newly compiled units
  Errors in 'file:/C:/home/workspaces/harvest-indigo/
queueManagerTool/.apt_generated/com/ca/queuemanagertool/shared/
QueueManagerToolRequestFactoryDeobfuscatorBuilder.java'
 Line 7: No source code is available for type
com.google.web.bindery.requestfactory.vm.impl.Deobfuscator.Builder;
did you forget to inherit a required module?
 Line 9: No source code is available for type
com.google.web.bindery.requestfactory.vm.impl.OperationKey; did you
forget to inherit a required module?
 Line 10: No source code is available for type
com.google.web.bindery.requestfactory.vm.impl.OperationData.Builder;
did you forget to inherit a required module?
   Removing invalidated units
   Finding entry point classes

I have seen comments that the eclipse error does not matter; however,
the tomcat log seems to disagree.

I have included the hibernate-validator-4.1.0.Final.jar in the WEB-INF/
lib directory.

I have been working on this for two days.  I need some assitance to
move forward.

Thanks.

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



Re: GWT in enterprise systems (SAP, AS/400)

2012-02-20 Thread karim duran
Dear Dominikz*,*
*
*
Ok, i understand that you don't want to use Java and i had a look at your
PDF before my last answer.
I agree with you : RPG native *pgm are fast.

But there's some points i had to consider when i worked on projects i told
you about.

1) You can use jt400 without any WebSphere or Tomcat. And i did client
applications without these
heavy gaz factory !!! You're right !

2) Performance are not so bad if you tell the OS400 to pre-compile your
Java pgm and use JIT ( just in time )
option. Don't use PDM option CRTJVPGM because you get bad performance.
Instead, build the pgm
in Rational studio and put it on IFS with FTP or client access.

3) I met situation where it wasn't possible to do simple things that i
could do with jt400 in minutes :
( DATAQUEUE, OUTQUEUE, thread programming, generate PDF without using
elephant infoprint service, and many others things)

But, what i wanted exactly to tell you, is that i run directly native RPG
PGM on os400 from my mobile device
used as a java client, without any server ( even apache and CGI PGM) on AS.
So it meets your idea.

About SAP i'm not enough specialist and i trust you and your experience.

Anyway, it was very interesting to talk with you, and i'd like to follow
your project or posts about it.

Hoping hear about you soon if you like.

Regards.

Karim Duran

2012/2/20 dominikz dominik.zalew...@gmail.com

 Dear Karim,

 I'm very aware of jt400 library. I've done tons of things with that over a
 couple of past years. One problem with it is that it does not support
 everything you'd like to do with AS/400. The other is that it's performance
 is dreadful. Trust me, I checked it, even had lectures about it during
 conferences. I wouldn't even be going near RPG (since I'm java programmer)
 if the performance of jt400 wasn't so bad.

 The same is with JCo library on SAP. You need to run Java server in order
 to use it. And it's efficiency is also dreadful. Not even mentioning that
 if you look at its source code, you'll start tearing your hair out of your
 head. They've put there one class with dozens of static methods. One
 library with one class that is 1500 lines long. A nightmare.

 One more fact against Java is that you need to have java server to run it
 (WebSphere or Tomcat). And admins of AS400 don't like java since when they
 hear java they think 'WebSphere' which is a total mess. But this is another
 conversation I don't want to start here. The same is with SAP guys. When
 they hear 'Java', they run away in anger.

 Anyway going back to the original point, the whole idea is NOT TO USE JAVA
 AT ALL IN RUNTIME. This is how you should look at the PDF I've sent.

 Other than the above I really appreciate your answer :)

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

 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.



why hasn't GWT an interface for Node or Element?

2012-02-20 Thread Alex Luya
In some use cases,we do need it.

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



MVP event generation

2012-02-20 Thread Nitheesh Chandran
Hello ,

I am working on a MVP project. I want to generate an event when the
user clicks on the FlexTable cell. So using the MVP pattern i have
created a event class and its corresponding handler interface in the
event package. And the following way i fired the event. I want anyone
of you to tell me is this the correct way of generating events and i
am getting exceptions when i am implementing some what to do code on
the successful event generation

  The code below shows the event firing when the user clicks on the
cell of the FlexTable


table.addTableListener(new TableListener() {

@Override
public void onCellClicked(SourcesTableEvents sender, 
int row, int
cell) {


eventBus.fireEvent(new ChartEvent());

}

});

   Suppose i want to generate a chart when the user clicks on the
cell ,i would be writing the code for that like this

   eventBus.addHandler(ChartEvent.TYPE, new
ChartEventHandler() {

@Override
public  void ChartEvent(ChartEvent event) {
Window.alert(event created );

DialogBox db=new DialogBox();

db.setWidget( (IsWidget) new
ChartGenericPresenter(rpcService,eventBus,new LineView()));

db.show();

}
});


 }


Where ChartGenericPresenter is the presenter and LineView() is its
view. I am getting the following exception while i am using this


com.google.gwt.event.shared.UmbrellaException: One or more exceptions
caught, see full set in UmbrellaException#getCauses
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
129)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:124)
at
com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:
116)
at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:
172)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1321)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1277)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
326)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
207)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
132)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:
281)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
531)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.event.shared.UmbrellaException: One or more
exceptions caught, see full set in UmbrellaException#getCauses
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
129)
at com.dotentreprise.pulsev1.client.view.SystemStatusDisplay
$1.onCellClicked(SystemStatusDisplay.java:96)
at com.google.gwt.user.client.ui.ListenerWrapper
$WrappedTableListener.onClick(ListenerWrapper.java:713)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:
54)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at
com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:
193)
at

Re: MVP event generation

2012-02-20 Thread Nitheesh Chandran
Yeah that helped me to display the DialogBox when the user clicks on
the cell. i have used like this

db.setWidget(new LineView());

Now the DialogBox is displaying but i am creating a chart in the
LineView() with database records. That chart is not coming. But when i
simply use by passing a token like this in the AppController (not
using any click event ,just passing the token chart )  ,it works

  if (token.equals(chart)) {
presenter = new 
ChartGenericPresenter(rpcService,eventBus,new
LineView());

   If i use the above code. The chart will come in the DialogBox. But
unfortunately i want to display the chart depending on the user event.
So like you said i used  db.setWidget(new LineView());

And now DialogBox is showing but no chart inside




On Feb 21, 11:16 am, Alfredo Quiroga-Villamil laww...@gmail.com
wrote:
 It seems as if the call:

 *db.setWidget((IsWidget) new ChartGenericPresenter(rpcService,eventBus,new
 LineView()));*

 is not accurate. You are passing to a DialogBox, which is ultimately
 extending SimplePanel, a presenter and not a widget. The flow would be more
 or less as follows:

 1. Instantiate the view.
 2. Instantiate your presenter.
 3. Set the presenter on your view.
 4. Add the view to your widget (DialogBox) in this case.

 Regards,

 Alfredo

 On Tue, Feb 21, 2012 at 12:09 AM, Nitheesh Chandran 







 nithe...@dotentreprise.com wrote:
  Hello ,

  I am working on a MVP project. I want to generate an event when the
  user clicks on the FlexTable cell. So using the MVP pattern i have
  created a event class and its corresponding handler interface in the
  event package. And the following way i fired the event. I want anyone
  of you to tell me is this the correct way of generating events and i
  am getting exceptions when i am implementing some what to do code on
  the successful event generation

   The code below shows the event firing when the user clicks on the
  cell of the FlexTable

     table.addTableListener(new TableListener() {

                         @Override
                         public void onCellClicked(SourcesTableEvents
  sender, int row, int
  cell) {

                                 eventBus.fireEvent(new ChartEvent());

                                         }

                         });

    Suppose i want to generate a chart when the user clicks on the
  cell ,i would be writing the code for that like this

                        eventBus.addHandler(ChartEvent.TYPE, new
  ChartEventHandler() {

                         @Override
                         public  void ChartEvent(ChartEvent event) {
                         Window.alert(event created );

                         DialogBox db=new DialogBox();

                         db.setWidget( (IsWidget) new
  ChartGenericPresenter(rpcService,eventBus,new LineView()));

                         db.show();

                         }
                 });

          }

  Where ChartGenericPresenter is the presenter and LineView() is its
  view. I am getting the following exception while i am using this

  com.google.gwt.event.shared.UmbrellaException: One or more exceptions
  caught, see full set in UmbrellaException#getCauses
     at
  com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
  129)
     at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:124)
     at
  com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:
  116)
     at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:
  172)
     at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1321)
     at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1277)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at
  com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
     at
  com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
     at

  com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.jav 
  a:
  167)
     at

  com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingFo 
  rReturn(BrowserChannelServer.java:
  326)
     at

  com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChann 
  elServer.java:
  207)
     at
  com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
  132)
     at
  com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
  561)
     at
  com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
  269)
     at

  com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.j 
  ava:
  91)
     at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
     at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
     at 

[gwt-contrib] Synchronous RPC

2012-02-20 Thread Deepak Patil
(Author of openwaf.com)

Using asynchronous RPC (GWT.runAsync) forces developer to split there code 
int two parts. It becomes difficult if you want to do some sequential RPC .
I understand Single threaded browser architecture wont allow us to easily 
execute synchronous RPC.

For example to get time from the server using RPC code looks time below 

   

TimerService.getTime(new AsyncCallbackString() {
public void onSuccess(String result) {
lblASync.setText(lblASync.getText()+Result 1:+result+br/);
}
public void onFailure(Throwable caught) {

 }
});

  Here response code goes in onSuccess method.

Just for example we want to get the server time twice synchronously. code 
will look like this

**

*TimerService.getTime(new AsyncCallbackString() {*
   public void onSuccess(String result) {

   lblASync.setText(lblASync.getText()+Result 1:+result+br/);

*   TimerService.getTime(new AsyncCallbackString() {*
 public void onSuccess(String result) {
lblASync.setText(lblASync.getText()+Result 
1:+result+br/);
 }
 public void onFailure(Throwable caught) {}
   });

} public void onFailure(Throwable caught) {} });


Code looks complicated now. Now imagine if we can write simple code like 
below.


lblSync.setText(lblSync.getText()+Result 
1:+TimerService.getTime()+br/);

lblSync.setText(lblSync.getText()+Result 
2:+TimerService.getTime()+br/);


Which does the same thing of the code above this.

I found a workaround for this. We can simulates synchronous RPC using 
asynchronous http requests. Where program is *logically* blocked till you 
receive any response  from the server. 

This is well tested for statements like for,while,if else.

Here compiler takes care of the generating some additional code which will 
return from the function when RPC is made and resume the code at 
appropriate location where it was blocked.

For more details please check  http://openwaf.com/ExRPCSyncAsync.jsp 
http://openwaf.com


You can have a quick look at code below to find a difference

public class ExRPCSyncAsync extends WAFController{
@ViewElement
public Button btnSync;
@ViewElement
public Button btnASync;
@ViewElement
public Label lblSync;
@ViewElement
public Label lblASync;
public ExRPCSyncAsync(){
btnSync.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
startSyncCalls();
}
});
btnASync.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
startASyncCalls();
}
});
}
public void startSyncCalls(){
lblSync.setText();
lblSync.setText(lblSync.getText()+Call 1br/);
lblSync.setText(lblSync.getText()+Result 
1:+TimerService.getTime()+br/);
lblSync.setText(lblSync.getText()+Call 2br/);
lblSync.setText(lblSync.getText()+Result 
2:+TimerService.getTime()+br/);
lblSync.setText(lblSync.getText()+Call 3br/);
lblSync.setText(lblSync.getText()+Result 
3:+TimerService.getTime()+br/);
lblSync.setText(lblSync.getText()+Call 4br/);
lblSync.setText(lblSync.getText()+Result 
4:+TimerService.getTime()+br/);


}
public void startASyncCalls(){
lblASync.setText();
lblASync.setText(lblASync.getText()+Call 1br/);
TimerService.getTime(new AsyncCallbackString() {
public void onSuccess(String result) {
lblASync.setText(lblASync.getText()+Result 1:+result+br/);
}
public void onFailure(Throwable caught) {}
});

lblASync.setText(lblASync.getText()+Call 2br/);
TimerService.getTime(new AsyncCallbackString() {
public void onSuccess(String result) {
lblASync.setText(lblASync.getText()+Result 2:+result+br/);
}
public void onFailure(Throwable caught) {}
});

lblASync.setText(lblASync.getText()+Call 3br/);
TimerService.getTime(new AsyncCallbackString() {
public void onSuccess(String result) {
lblASync.setText(lblASync.getText()+Result 3:+result+br/);
}
public void onFailure(Throwable caught) {}
});

lblASync.setText(lblASync.getText()+Call 4br/);
TimerService.getTime(new AsyncCallbackString() {
public void onSuccess(String result) {
lblASync.setText(lblASync.getText()+Result 4:+result+br/);
}
public void onFailure(Throwable caught) {}
});
}
}








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

Re: [gwt-contrib] Synchronous RPC

2012-02-20 Thread John Tamplin
On Mon, Feb 20, 2012 at 4:05 AM, Deepak Patil deepakpati...@gmail.comwrote:

 (Author of openwaf.com)

 Using asynchronous RPC (GWT.runAsync) forces developer to split there code
 int two parts. It becomes difficult if you want to do some sequential RPC .


BTW, runAsync is totally different from RPC -- it is about code splitting,
so only the code needed for the initial app is downloaded in the initial
download.


 I understand Single threaded browser architecture wont allow us to easily
 execute synchronous RPC.

 For example to get time from the server using RPC code looks time below




 TimerService.getTime(new AsyncCallbackString() {
 public void onSuccess(String result) {
 lblASync.setText(lblASync.getText()+Result 
 1:+result+br/);
 }
 public void onFailure(Throwable caught) {

  }
 });

   Here response code goes in onSuccess method.

 Just for example we want to get the server time twice synchronously. code
 will look like this

 **

 *TimerService.getTime(new AsyncCallbackString() {*
public void onSuccess(String result) {

lblASync.setText(lblASync.getText()+Result 1:+result+br/);

 *   TimerService.getTime(new AsyncCallbackString() {*
  public void onSuccess(String result) {
 lblASync.setText(lblASync.getText()+Result 
 1:+result+br/);
  }
  public void onFailure(Throwable caught) {}
});

 } public void onFailure(Throwable caught) {} });


 Code looks complicated now. Now imagine if we can write simple code like
 below.



 lblSync.setText(lblSync.getText()+Result 
 1:+TimerService.getTime()+br/);

 lblSync.setText(lblSync.getText()+Result 
 2:+TimerService.getTime()+br/);


 Which does the same thing of the code above this.

 I found a workaround for this. We can simulates synchronous RPC using
 asynchronous http requests. Where program is *logically* blocked till you
 receive any response  from the server.

 This is well tested for statements like for,while,if else.

 Here compiler takes care of the generating some additional code which will
 return from the function when RPC is made and resume the code at
 appropriate location where it was blocked.

 For more details please check  http://openwaf.com/ExRPCSyncAsync.jsp
 http://openwaf.com


The web site doesn't give implementation details, but I assume it is by
rewriting the synchronous call to be continuation-passing.  Ie:

function f() {
  block1;
  x1 = asyncCall1();
  block2;
  while (asyncCall2()) {
block3;
  }
  return retval;
}

gets rewritten to:

function f(retCallback) {
  block1;
  asyncCall1(function(x1) {
block2;
loop = function(val) {
  if (val) {
block3;
asyncCall2(loop);
  } else {
retCallback(retval);
  }
};
asyncCall2(loop);
  }
}

The problem with doing this in general is that basically every call in the
app has to be rewritten in this form (if any of them might ever call an
async method), and you wind up with stack depth problems unless the VM has
tail-call elimination (which JS doesn't).

Chaining of async calls is awkward, and I don't think it is a solved
problem yet.

-- 
John A. Tamplin
Software Engineer (GWT), Google

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