Re: [gwt-contrib] Java to WebAssembly Compiler

2015-11-07 Thread Alexander Orlov
Would not a bytecode to WebAssembly compiler make more sense instead? There 
are many great JVM languages and Java is a major one but still there are 
many other great languages that have bytecode as a compilation target. 
Would it not make more sense to a have a bytecode to WebAssembly compiler 
once GC is support by WebAssembly?

-- 
._.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/595901c0-3559-4d55-9622-eeae6ec66e60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Showing and Editor's errors

2012-08-08 Thread Alexander Orlov
If an Editor doesn't satisfy an Entity's constraints, it calls

driverCtx.fire(new ReceiverVoid() {
   @Override
   public void onConstraintViolation(SetConstraintViolation? 
 violations) {
 dialog.setText(Errors detected);
 Driver.DRIVER.setConstraintViolations(violations);
 ListEditorError editorErrors = Driver.DRIVER.getErrors();
 for (EditorError editorError : editorErrors) {
   Logger.getLogger(editorError.getMessage(): ).log(Level.INFO, 
 editorError.getMessage() + ); // prints two constraint violations
 }
  }


Are the constraint violations visualized in some way? Because I don't see 
any visualizations

Before firing the Receiver I do

final RequestContext driverCtx = Driver.DRIVER.flush();

if (Driver.DRIVER.hasErrors()) {

  dialog.setText(Invalid input);
   return;
 }


but *Driver.DRIVER.hasErrors()* remains always *false* although *
onConstraintViolation* is executed when some fields are missing.

-- 
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/-/5Ev4rqgXgXMJ.
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.



SuperDevMode and server-side code

2012-08-06 Thread Alexander Orlov
I want to run my RequestFactory using GWT' SuperDevMode. The client-side 
code compilesruns fine but as soon as I make any RF-using server call I 
get an exception because server-side code isn't supported in SuperDevMode 
yet. The reason is:

Currently, Super Dev Mode doesn't support running Java web apps (war files) 
 like classic Dev Mode. The workaround is to run them on a separate 
 server.https://developers.google.com/web-toolkit/articles/superdevmode


But how should I run two separate servers (GWT compilation server  my app 
server) on the same port? And the same port is required because how else 
should I redirect my RF calls to another port of the same server?

-- 
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/-/5KioCD5wGwsJ.
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.



Delegate an Editor's edit() save() functionality via Activities Places' Presenter to an Activity class?

2012-07-30 Thread Alexander Orlov
I have an architectural question. I've introduced 
EntityWorkflowhttps://developers.google.com/web-toolkit/doc/latest/DevGuideUiEditors#Quickstart
 to 
my Activities  
Placeshttps://developers.google.com/web-toolkit/doc/latest/DevGuideMvpActivitiesAndPlacesenabled
 app. In GWT's 
*Activities  Places* there are the *Presenter* interfaces which is used by 
a view to delegate the implementation of certain action (like edit()  
save()) to the *Activities* class. So does it make sense to treat an *
EntityWorkflow* as a AP view and to apply AP's action delegation feature 
here? Or to speak code-wise:

public class EntityEditorWorkflow {
// Empty interface declaration, similar to UiBinder
interface Driver extends RequestFactoryEditorDriverEmployeeProxy, 
EmployeeEditor {
}

private static final Driver driver = GWT.create(Driver.class);

@UiHandler(save)
public void onSave(ClickEvent event) {
 * // implementing the actual SaveEntity code*

Person edited = driver.flush();
if (driver.hasErrors()) {
  // A sub-editor reported errors
}
doSomethingWithEditedPerson(edited);


*  vs. *

*  // ...*
*  presenter.save(entity);*
}
}

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



Support for custom time zones in GWT

2012-07-13 Thread Alexander Orlov
GWT's Date object operates just like its JavaScript counterpart in a user's 
system time zone. Is there a way to override GWT's Date object time zone? 
Creating something like 
 



public class FakeDate extends Date { 

 public FakeDate(String timeZoneConstantJson) {
 FakeDate.timeZoneConstantJson = timeZoneConstantJson;
 TimeZoneInfo timeZoneInfo = 
 TimeZoneInfo.buildTimeZoneData(FakeDate.timeZoneConstantJson);
 TimeZone timeZone = TimeZone.createTimeZone(timeZoneInfo);
 int currentDateOffsetInMin = timeZone.getOffset(this);
 FakeDate.currentDateOffsetInMs = currentDateOffsetInMin * 60 * 
 1000; 


 super.setTime(super.getTime() - FakeDate.currentDateOffsetInMs);
 }

} 

...doesn't work with RequestFactory proxy classes because they expect the 
Date super class instead of the *FakeDate* subclass just like the model 
classes that have a Date field (which has to stay for reasons that would 
take a while to explain :).

-- 
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/-/CilWiNqcr1YJ.
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: CellTable vs DataGrid

2012-05-16 Thread Alexander Orlov
I haven't ever used gwtdesigner. Search for gwt showcase, there you will
find it.

Sent from my phone.
On May 16, 2012 9:13 PM, Mike Dee mdichiapp...@gmail.com wrote:

 Where is the uibinder stuff for DataGrid defined?  I can't seem to find it
 and it doesn't appear in GWTDesigner.

 On Tuesday, March 20, 2012 6:23:08 AM UTC-7, Thomas Broyer wrote:



 On Monday, March 19, 2012 7:23:07 PM UTC+1, Alexander Orlov wrote:

 *CellTable vs DataGrid* — when to use which? DataGrid is for large
 data sets and CellTable for (kind of) smaller data sets. But is there a
 *reason not to use* the DataGrid Composite for all kinds of data sets?
 What would be the disadvantage, besides an (non-user-perceivable) init
 delay?

- http://gwt.google.com/samples/**Showcase/Showcase.html#!**

 CwDataGridhttp://gwt.google.com/samples/Showcase/Showcase.html#!CwDataGrid
- http://gwt.google.com/samples/**Showcase/Showcase.html#!**

 CwCellTablehttp://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable


 To my knowledge, both CellTable and DataGrid are for large data sets
 (as all the other Cell widgets; as opposed to Grid or FlexTable). The main
 (if not only) difference is that Datagrid has a fixed header/footer and a
 scrolling area for data (and thus is a RequiresResize), whereas CellTable
 generates a single grid with headers, data and footers (and thus has to be
 put inside a ScrollPanel to handle overflow, and then the headers and
 footers can scroll along with the data, and outside the viewport).

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



RequestFactoryEditorDriver remains dirty

2012-03-26 Thread Alexander Orlov
I followed the Editor 
examplehttps://developers.google.com/web-toolkit/doc/latest/DevGuideUiEditors 
using RequestFactoryEditorDriver 
for RF-driven persistence. But it doesn't work for me. 

When I call 
*
*
*public class EmployeeEditor extends Composite implements 
EditorEmployeeProxy *

the model data is transfered into the *Composite* and all UiBinder fields 
get their values. 

I use this code 

void edit(EmployeeProxy employee) {
driver.initialize(cf.getRF(), employeeEditor);
final EmployeeReqCtx reqCtx = cf.getRF().employeeReqCtx();
driver.edit(employee, reqCtx);

cf.getLogger().log(Level.INFO, driver.isDirty:  + 
driver.isDirty());
}

to achieve this.The *driver*

interface Driver extends RequestFactoryEditorDriverEmployeeProxy, 
EmployeeEditor 

*is clean at this point*. As soon as I call

*void save() {*
*cf.getLogger().log(Level.INFO, driver.isDirty:  + 
driver.isDirty());*
*final RequestContext reqCtx = driver.flush();*
*if (driver.hasErrors()) {*
*cf.getLogger().log(Level.INFO, DRIVER HAS ERRORS.);*
*}*
*cf.getLogger().log(Level.INFO, driver.isDirty:  + 
driver.isDirty());*
*
*
*
*
*// Send the request*
*reqCtx.fire(new ReceiverVoid() {*
*@Override*
*public void onConstraintViolation(SetConstraintViolation? 
errors) {*
*cf.getLogger().log(Level.SEVERE, ERRORS DETECTED ON THE 
SERVER + errors.size());*
*}*
*
*
*@Override*
*public void onSuccess(Void response) {*
*cf.getLogger().log(Level.SEVERE, SUCCESS!);*
*cf.getLogger().log(Level.INFO, driver.isDirty:  + 
driver.isDirty());*
*}*
*});*
*cf.getLogger().log(Level.INFO, driver.isDirty:  + 
driver.isDirty());*
*}*

the *driver becomes dirty *and the *SUCCESS! *message appears. So the 
entity has been persisted at this point? However the subsequent log message 
in *onSuccess() reports* that *the driver is still dirty*. And when I call *
save()* again, the 

*Caused by: java.lang.IllegalStateException: A request is already in 
progress*
*
*
exception is thrown*.*

My persistence framework is Objectify and the corresponding RequestFactory 
using JUnit tests are working and modify the entities as expected.

-- 
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/-/B7S4AZxrvgMJ.
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: RequestFactoryEditorDriver remains dirty

2012-03-26 Thread Alexander Orlov
On Monday, March 26, 2012 1:49:59 PM UTC+2, Thomas Broyer wrote:

 The private field storing the LeafValueEditor's values is only initialized 
 in edit(), so in your case you have to call edit() again from your 
 onSuccess.


Thx, for the clarification in respect to *isDirty(). *In fact isDirty() 
become clean after I've called edit() again. But my *actual problem was 
that the modifications I've made were also not been persisted*. I've found 
a way to persist them doing something like 

  final *EmployeeReqCtx* reqCtxDriver = *(EmployeeReqCtx) *
cf.getDriver().flush();
  reqCtxDriver.*put(employee)*.fire(new ReceiverVoid() {
// persists the edited *employee** *
  }

instead of 

  final RequestContext reqCtxDriver =  cf.getDriver().flush();
  reqCtxDriver.fire(new ReceiverVoid() {  
// ... doesn't work at all for editing entities(?) although it's 
mentioned in the Editor example
  }

*in save()*. Although I can't imagine that one needs explicit casting to 
edit an entity..., it works.

-- 
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/-/78D6x878SusJ.
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: RequestFactoryEditorDriver remains dirty

2012-03-26 Thread Alexander Orlov
Thx again, your hint simplified my code a lot!

On Monday, March 26, 2012 4:22:27 PM UTC+2, Thomas Broyer wrote:



 On Monday, March 26, 2012 4:18:19 PM UTC+2, Alexander Orlov wrote:

 On Monday, March 26, 2012 1:49:59 PM UTC+2, Thomas Broyer wrote:

 The private field storing the LeafValueEditor's values is only 
 initialized in edit(), so in your case you have to call edit() again from 
 your onSuccess.


 Thx, for the clarification in respect to *isDirty(). *In fact isDirty() 
 become clean after I've called edit() again. But my *actual problem was 
 that the modifications I've made were also not been persisted*. I've 
 found a way to persist them doing something like 

   final *EmployeeReqCtx* reqCtxDriver = *(EmployeeReqCtx) *
 cf.getDriver().flush();
   reqCtxDriver.*put(employee)*.​fire(new ReceiverVoid() {
 // persists the edited *employee** *
   }

 instead of 

   final RequestContext reqCtxDriver =  cf.getDriver().flush();
   reqCtxDriver.fire(new ReceiverVoid() {  
 // ... doesn't work at all for editing entities(?) although it's 
 mentioned in the Editor example
   }


 It's works very well... provided you previously queued a call to your 
 put() method in the RequestContext !
 The example does this just before calling edit() on the EditorDriver.
  

 *in save()*. Although I can't imagine that one needs explicit casting to 
 edit an entity..., it works.



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



CellTable vs DataGrid

2012-03-19 Thread Alexander Orlov
*CellTable vs DataGrid* — when to use which? DataGrid is for large data 
sets and CellTable for (kind of) smaller data sets. But is there a *reason 
not to use* the DataGrid Composite for all kinds of data sets? What would 
be the disadvantage, besides an (non-user-perceivable) init delay?

   - http://gwt.google.com/samples/Showcase/Showcase.html#!CwDataGrid
   - http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable

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



An inherent and non-fixable GWTTestCase warning?

2012-03-05 Thread Alexander Orlov
*logging for HtmlUnit thread*
*   [WARN] Expected content type of 'application/javascript' or 
'application/ecmascript' for remotely loaded JavaScript element at 
'http://200.200.5.141:8011/dp.verp.actas.ActAs.JUnit/dp.verp.actas.ActAs.JUnit.nocache.js',
 
but got 'application/x-javascript'.*

How can I get rid of this warning? Apparently I've to change the content 
type that is expected by HtmlUnit to 'application/x-javascript' or the 
GWTTestCase emitted content type to 'application/javascript'...

Just read a comment from somebody on this issue: Those are warnings, you 
can safely ignore them — Warnings that can be ignored? In that case what's 
the purpose of warnings?

-- 
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/-/noModHXT-UwJ.
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.



GWTTestCase and RequestFactory calls containing client code

2012-03-02 Thread Alexander Orlov
When I call RequestFactory calls containing methods from my 
*GWTTestCase*extending JUnit test I always get: 

*[WARN] 404 - POST /dp.verp.actas.ActAs.JUnit/gwtRequest (192.168.1.51) 
1422 bytes
*
*Mar 2, 2012 7:36:54 PM 
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl 
runJob*
*SEVERE: Job run failed with unexpected RuntimeException: [object Class 
JavaObject] (injected script#49)*

The code works fine when it runs in DevMode or ProdMode:

void *check*() {
ActAsRequest actAsRequest = ActAs.RF.actAsReqCtx();
actAsRequest.isManager(something).fire(new ReceiverBoolean() {
@Override
public void onSuccess(Boolean response) {
Core.log(response.toString());
System.out.println(response =  + response);
}
});
}

*GWTTestCase:*
public void testIsManager() {
Main main = new Main();
main.*check*();
}

-- 
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/-/HfBMqi83LggJ.
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: GWTTestCase and RequestFactory calls containing client code

2012-03-02 Thread Alexander Orlov
Delays or enforcing an execution order doesn't help. I think the problem is 

[WARN] 404 - POST /dp.verp.planer.Planer.JUnit/gwtRequest (192.168.1.51) 
1424 bytes

If I'd get this message in DevMode I'd fix web.xml's servlet-mapping but 
what's the equivalent of the servlet-mapping when using GWTTestCase? The 
WARN message occurs exactly when *calling fire()*. When calling fire() 
always 

*@Override*
*public void onFailure(ServerFailure error) {*
*}*
*
*
*is entered, instead of *
*
*
*@Override*
*public void onSuccess(MyType response) {*
*}*


On Friday, March 2, 2012 10:31:13 PM UTC+1, Thomas Broyer wrote:



 On Friday, March 2, 2012 8:45:36 PM UTC+1, Alexander Orlov wrote:

 When I call RequestFactory calls containing methods from my 
 *GWTTestCase*extending JUnit test I always get: 

 *[WARN] 404 - POST /dp.verp.actas.ActAs.JUnit/gwtRequest (192.168.1.51) 
 1422 bytes
 *
 *Mar 2, 2012 7:36:54 PM 
 com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl 
 runJob*
 *SEVERE: Job run failed with unexpected RuntimeException: [object Class 
 JavaObject] (injected script#49)*

 The code works fine when it runs in DevMode or ProdMode:

 void *check*() {
 ActAsRequest actAsRequest = ActAs.RF.actAsReqCtx();
 actAsRequest.isManager(something).fire(new ReceiverBoolean() {
 @Override
 public void onSuccess(Boolean response) {
 Core.log(response.toString());
 System.out.println(response =  + response);
 }
 });
 }

 *GWTTestCase:*
 public void testIsManager() {
 Main main = new Main();
 main.*check*();
 }

  
 You should rewrite your test to:

- call delayTestFinish()
- pass some callback to your check() method to be notified when the 
response comes back
- call finishTest() from that callback

 I suspect the error comes from the fact the test is actually finished when 
 the response comes back, and that code running outside the tests is causing 
 the whole thing to fail.


-- 
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/-/h8A9lOuHHxMJ.
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: GWTTestCase and RequestFactory calls containing client code

2012-03-02 Thread Alexander Orlov
I guess, you're running your GWTTestCases with Eclipse? I'm using IntelliJ 
and when I run the test cases, no folder like *dp.verp.planer.Planer**.JUnit 
*is being created. However this folder is created when running the test 
cases with Eclipse (although they failed for other, Eclipse-specific 
reasons). Also this folder name corresponds to the missing 
servlet-mapping... And the GWT Maven plugin doesn't even find any tests 
at all.

-- 
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/-/Fda6JKJ1u_kJ.
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: GWTTestCase and RequestFactory calls containing client code

2012-03-02 Thread Alexander Orlov
*Solution:*
*
*
A *servlet path=/gwtRequest 
class=com.google.web.bindery.requestfactory.server.RequestFactoryServlet/ 
*in the **.gwt.xml* is your/my friend.

-- 
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/-/1HiOnmRNiTYJ.
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] Re: Porting RequestFactory to Dart

2012-02-29 Thread Alexander Orlov
On Wednesday, February 29, 2012 12:30:58 PM UTC+1, Thomas Broyer wrote:

 Yes, that's what's great with RF: it's a more a protocol than a API 
 (contrary to GWT-RPC). The protocol itself hasn't changed since GWT 2.1.0 
 (or maybe 2.1.1), so it's feasible to write RF clients (or servers) in any 
 language.


Even both ways?! That would be great! We could reuse existing Java RF 
backends to communicate w/ Dart clients that used to be GWT clients. 

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

[gwt-contrib] int vs Integer and the impact of final

2012-01-19 Thread Alexander Orlov
I've asked this question in the regular GWT group but I think this question 
is too specific for the regular group.

###
In Java, *Integer* is an object and can be set to null whereas *int *is a 
primitive and cannot be set to null.

In RequestFactory only the wrapped versions of primitives (= objects) are 
allowed. So you might use *Boolean* and *Integer* but not *boolean* and *int
*. In GWT you can use both but *does is affect the generated JavaScript 
code whether you use Integer or int*?

In Java *final* is used to declare immutable values. Often it has a 
positive impact on the execution performance. Also the usage of *final* 
enforces 
good programming style (values cannot be reassigned which makes the code 
easier to comprehend  maintain). *But which impact does the usage of finalhas 
on the generated JavaScript code?
*

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

Is there a difference between int and Integer?

2012-01-18 Thread Alexander Orlov
In Java, *Integer* is an object and can be set to null whereas *int *is a 
primitive and cannot be set to null.

In RequestFactory only the wrapped versions of primitives (= objects) are 
allowed. So you might use *Boolean* and *Integer* but not *boolean* and *int
*. In GWT you can use both but *does is affect the generated JavaScript 
code whether you use Integer or int*?

-- 
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/-/J698-WLJtdIJ.
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.



Module inheritance problem: Refused to display document because display forbidden by X-Frame-Options.

2012-01-16 Thread Alexander Orlov
I have two modules

Manager.gwt.xml
inherits name=dp.verp.planer.Planer/
entry-point class=dp.verp.manager.client.Main/
add-linker name=xsiframe/

which inherits Planer.gwt.xml but when I call the Manager module I get 

*Refused to display document because display forbidden by 
X-Frame-Options.*

which is displayed in the Web Inspector console. Everything works fine when 
I omit the *getI18nFacet()* call. 

@Override
public void onModuleLoad() {
final Widget app = binder.createAndBindUi(this);

cookieInit();
*//getI18nFacet();*

RootPanel.get().add(app);
}

public void getI18nFacet() {
final I18nFacetReqCtx ctx = PlanerUtils.RF.textpoolReqCtx();
final RequestListI18nFacetProxy req = ctx.getI18nFacet(
Integer.valueOf(Cookies.getCookie(nativeLanguage))
);

req.fire(new ReceiverListI18nFacetProxy() {
@Override
public void onSuccess(ListI18nFacetProxy response) {
for (final I18nFacetProxy i18nFacet : response) {
Planer.property.i18nFacet.put(i18nFacet.getMacroName(), 
i18nFacet.getTranslation());
}
}
});
}




-- 
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/-/ZNVWLkX--K4J.
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: Module inheritance problem: Refused to display document because display forbidden by X-Frame-Options.

2012-01-16 Thread Alexander Orlov
...the *onMouduleLoad()* code is located in *dp.verp.manager.client.**Main*.

-- 
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/-/OWB0hlTC8xkJ.
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: Module inheritance problem: Refused to display document because display forbidden by X-Frame-Options.

2012-01-16 Thread Alexander Orlov
Solution: 

I haven't initialized the RequestFactory *before calling* *getI18nFacet()*.

-- 
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/-/rrKJPiXEsSsJ.
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: RequestFactory: How to retrieve an EntityProxy within another EntityProxy?

2011-12-13 Thread Alexander Orlov
So you basically have to do sth. like 

*final RequestListReportProxy req = ctx.getReports(sessionId).with(user); 
// user is the Report entity's UserProxy representation*

...which works perfectly. 

-- 
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/-/9gxj0XytmxsJ.
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.



RequestFactory: How to retrieve an EntityProxy within another EntityProxy?

2011-12-12 Thread Alexander Orlov
I've got sth. like:

@ProxyFor(value = Report.class, locator = CommonLocator.class)
public interface ReportProxy extends EntityProxy {
// ...
Integer getUserId(); *// works*

void setUserId(Integer userId); 

UserProxy getUser(); *// doesn't work*

void setUser(UserProxy user); 
}

@Service(value = ReportDAOService.class, locator = DAOServiceLocator.class)
public interface ReportRequest extends RequestContext {
   // ...
RequestListReportProxy getReports(Integer sessionId);
}


Calling getReports(sessionId) retrieves the reports where *getUserId() 
 returns the proper userId* whereby *getUser()* returns *null. *On the *
server* side *calling getUser() on result.get(0) * returns the proper 
entity/object value as well.
*
*
Any idea, *how I can get getUser()'s UserProxy representation?*

-- 
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/-/6Zms_FFiL6wJ.
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.



Best practice for working with separate GWT modules and their inheritance

2011-12-08 Thread Alexander Orlov
Assumed I've a Customer.gwt.xml and a Manager.gwt.xml module. Manager 
inherits Customer because I want to use Customer's functionality and RF's 
proxy classes in Manager. Ok, those proxy classes could be also put into a 
Common.gwt.xml but let's omit this option for the moment. Now the problem 
is when I call the Manager view/module, I also see the Customer widget in 
the same view. However I just want to see the Manager widget when I call 
the Manager view and not the Customer widget which I want to call 
separately. 

How should I handle this problem, *how can I inherit functionality of 
Customer without being forced to explicitly hide Customer's widgets when I 
call Manager. How can I systematically choose/hide/override/specify the 
widgets which should be displayed when I call the Manager module.*

-- 
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/-/mORFQHgR5moJ.
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: Best practice for working with separate GWT modules and their inheritance

2011-12-08 Thread Alexander Orlov
So I'll have a CustomerBase module (without an entry-point) that is 
inherited by both Customer *and* Manager (both with their specific 
entry-points)?

-- 
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/-/RmtK9_wbd4oJ.
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: Best practice for working with separate GWT modules and their inheritance

2011-12-08 Thread Alexander Orlov
Thanks again for the clarification!

-- 
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/-/3HEbjspCCxcJ.
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.



RequestFactory Security: prevent the user from retrieving other users content

2011-12-02 Thread Alexander Orlov
A RF call retrieves bookings for the current user. How can I prevent the 
current user from opening Web Inspector, changing the *userId* of the RF 
call and retrive bookings from another user? A classic problem isn't it? :) 
Are there RF/GWT-specific solutions and/or best practices?

-- 
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/-/NCtCHvkSSEQJ.
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: RequestFactory Security: prevent the user from retrieving other users content

2011-12-02 Thread Alexander Orlov
That's what I had in mind too but I wanted to know if there is also a 
GWT-specific out-of-the-box solution.

Thx!

-- 
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/-/Pj_a_I-ZapAJ.
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: RequestFactory Security: prevent the user from retrieving other users content

2011-12-02 Thread Alexander Orlov
I'll go with the token approach because I assume, cookies require HTTP and 
if you want to use the same app over Web Sockets, the cookies approach 
would not work?

-- 
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/-/QGaMBK2XUZsJ.
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: A static EventBus / SimpleEventBus: Pro Contra

2011-11-07 Thread Alexander Orlov
Maybe I've misguided you mentioning the SimpleEventBus implementation of
the EventBus interface. The actual question was whether I should use a
*static* EventBus that can be defined in a Common class and reference
this static EventBus from any other view.

E.g. using

*MyView() {*
*// MyView Constructor*
*}*
*
*
*Common.myEventBus.fireEvent(new MyEvent()); // the _static_ way*

VS.

*MyView(final EventBus myEventBus) {*
*this.myEventBus = myEventBus;*
*// The rest of MyView Constructor*
*}*
*
*
*myEventBus.fireEvent(new MyEvent()); // the _non-static_ way*

On Mon, Nov 7, 2011 at 12:15 PM, Thomas Broyer t.bro...@gmail.com wrote:

 Injecting an EventBus allows you to pass the one instance you want
 (SimpleEventBus, ResettableEventBus, CountingEventBus, RecordingEventBus,
 or your own subtype), and change that between dev, production, and tests.

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



The RequestFactory version of GWT RPC XSRF protection

2011-11-07 Thread Alexander Orlov
There is the GWT RPC XSRF 
protectionhttp://code.google.com/webtoolkit/doc/latest/DevGuideSecurityRpcXsrf.html
 to 
make GWT apps more secure. I know that RequestFactory isn't using GWT RPC 
although RF is using JSON to communicate with the backend just like GWT RPC 
does.

So does RF has a built-in XSRF protection or do I have to use a server-side 
token to prevent any unauthorized requests to the database?

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



A static EventBus / SimpleEventBus: Pro Contra

2011-11-06 Thread Alexander Orlov
EventBus is a really nice mechanism to *decouple methods from callbacks* by 
adding corresponding event handlers to an EventBus.

By nature EventBus is something that should be known to both classes, the 
calling and the called class. So you can

*1. pass an EventBus in a constructor or*
*2. use a static EventBus that can be called from any View*

Is there a rule of thumb how you should use an EventBus? So far I saw only 
constructor usage examples. Are there some significant disadvantages that 
come with a static EventBus?

-- 
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/-/1W_HXJS76-AJ.
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: what does the symbol @ mean?

2011-11-06 Thread Alexander Orlov
Seems to be a variable delimiter, a kind of $my_variable$.

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



A Maven repo with daily or at least weekly GWT snapshots?

2011-11-06 Thread Alexander Orlov
Is there a Maven repo that provides daily/weekly GWT 2.5 snapshots?

-- 
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/-/jFCgwj-Lt7UJ.
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: Create custom callbacks to achieve synchronous code execution

2011-10-11 Thread Alexander Orlov
Thx a lot! Pretty much what I've looked for! 

-- 
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/-/58zGUENhpooJ.
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.



Get more info out of a client-side UmbrellaException

2011-10-11 Thread Alexander Orlov
Sometimes I get *UmbrellaExceptions* in production mode that I don't get in 
development mode. Most of the time it happens when I fire GWT requests very 
frequently when I e.g. select different fields quickly. *How do I get more 
info out of this Umbrella?*

Any clues?

-- 
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/-/B-EIElo8l3wJ.
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.



RequestFactory: Request vs InstanceRequest

2011-10-10 Thread Alexander Orlov
There is no clear advice in the docs when you should use which kind of 
request. Using regular *Request*s (need to reference static methods on the 
server side) is not so verbose (on the client side) as using *
InstanceRequest*s. But what's about the performance or other implications?

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



Create custom callbacks to achieve synchronous code execution

2011-10-04 Thread Alexander Orlov
It seems that Dev Mode code runs synchronously... Otherwise I can't explain 
a bug that occurs only in production mode where the results are already 
there before a table has been cleaned to receive those new results and still 
has its outdated results. So both are mixed, although I call cleanView() 
before getResults(). But this doesn't matter because JS 
runs asynchronously. So *getResults()* is executed before *cleanView(). *What 
I need is synchronous code execution, *I need a callback*.

How can achieve that *getResults()* will be only executed once *clearView()*has 
done its job? Basically I need to call 
*getResults()* in a *clearView() callback.*

-- 
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/-/8XpKL3tZH6gJ.
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.



[SOLUTION] Re: Create custom callbacks to achieve synchronous code execution

2011-10-04 Thread Alexander Orlov
Use code like:

RunAsyncCallback getResourceItems = new RunAsyncCallback() {
@Override
public void onFailure(Throwable reason) {
GWT.log(reason.getMessage());
}

@Override
public void onSuccess() {
System.out.println(THIRD);
System.out.println(==);
getSlotsOfDate();
getSessionsOfUserAndDate();
}
};

RunAsyncCallback clearView = new RunAsyncCallback() {
@Override
public void onFailure(Throwable reason) {
GWT.log(reason.getMessage());
}

@Override
public void onSuccess() {
Common.clearView(mainPanel);
System.out.println(SECOND);
GWT.runAsync(getResourceItems);
}
};

private void refreshView() {
System.out.println(FIRST);
GWT.runAsync(clearView);
System.out.println(LAST);
}

-- 
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/-/oVFpbbeh11MJ.
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: Create custom callbacks to achieve synchronous code execution

2011-10-04 Thread Alexander Orlov
On Tue, Oct 4, 2011 at 5:59 PM, Ashton Thomas ash...@acrinta.com wrote:

 Hey Alexander, I am not sure you are going about this the correct way. Dev
 Mode is NOT synchronous and it functions just like production mode. There is
 another reason why you are getting your results. It may be because the
 requests take longer in Dev Mode and your client has time to send the
 request, then clear, the load.


Yep, that could be a reason too.



 The Solution you posted is creating a split point which will download the
 code the first time possible solving the timing problem but does it work if
 you keep loading? (not refreshing but keep loading the activity without a
 refresh?)


That's the point. It works most of the time but sometimes it stalls and
hangs.


 You should try clearing the table and then creating a request to the
 server.


That's what clearView() does. Afterwards getResourceItems is called.


 I may not understand you question so please let me know if I am
 misunderstanding you somewhere

 I want to *clearView() * and only when this method finishes, I want to
call *getResourceItems()*. Is the approach I've mentioned the right one?
Basically I want to execute A and after A has done its job I want to do B
and all of these synchronously.

-- 
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: [SOLUTION] Re: Create custom callbacks to achieve synchronous code execution

2011-10-04 Thread Alexander Orlov
On Tue, Oct 4, 2011 at 6:37 PM, Jens jens.nehlme...@gmail.com wrote:

 You shouldn't use this solution. GWT.runAsync is used to create a code
 split point and not to execute things asynchronously.


I don't want to execute things asynchronously. I want to execute things *
synchronously*.


 As far as I know these code split points act synchronously in dev mode but
 asynchronous in production/compiled mode. I think this is because in dev
 mode there are no .js files (each code split point will result in a separate
 .js file when you compile your app) that can be downloaded asynchronously
 using GWT.runAsync. So in dev mode GWT.runAsync gets somehow (synchronously)
 emulated.

 Do you really want to code split these single methods?


That's not I primary want to do but how can I achieve what I want to do?

I want to be sure that *first()* is executed before *second()* and that
second() is executed exactly when first() has finished its job.

-- 
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: Create custom callbacks to achieve synchronous code execution

2011-10-04 Thread Alexander Orlov
On Tue, Oct 4, 2011 at 6:53 PM, Ashton Thomas ash...@acrinta.com wrote:

 My understanding is that the simple solution below would work. Is this
 correct?

 service.getStuff(new AsyncCallbackThisThat(){
   public void onSuccess(result){
 updateStuff(result);
   }
 }

 public void updateStuff(ThisThat obj){
   //execute A
   //execute B
 }


I don't use GWT-RPC but RequestFactory. My case is the following:


 void getStuff() {
final SessionRequest proxyReq =
Common.mainRequestFactory.sessionRequest();
final RequestListSessionProxy req =
proxyReq.getSessionsOfUserAndDate(userId, Common.getNow());

req.fire(new ReceiverListSessionProxy() {
@Override
public void onSuccess(ListSessionProxy response) {
   doCompletelyOtherStuff();
}
});
}

void doStuff(AbsolutePanel mainPanel) {
}


*void executeAllTheseStuff() {*
*   doStuff(); // this should be necessarily executed first, and only if
this method has been executed...*
*   getStuff(); // ...I want getStuff() being executed*
*}*

...it's that simple.

-- 
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: [SOLUTION] Re: Create custom callbacks to achieve synchronous code execution

2011-10-04 Thread Alexander Orlov
On Tue, Oct 4, 2011 at 7:53 PM, Jens jens.nehlme...@gmail.com wrote:

 Yeah ok maybe I missunderstood your solution example. But your general idea
 is correct:

 1.) do the first async request
 2.) in the callbacks onSuccess method of the first request execute the
 second async request.

 So basically you are chaining async requests.


Yep, by chaining async reqs I want to enforce a strict order of execution.


 Thats the way to go, or try to fix your code in a way that its not
 dependent on the order of async request results.


I think that's the way to go ...kind of. Somehow I should make every
non-RPC/RequestFactory method capable of being executed inside a callback
and *not *vice versa (as I'm [trying] to do it now). In fact my code sample
works but on each 10th request or so, I get a client-side
UmbreallaException, could be anything ... :(

-- 
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: A DateBox where I can select the time and hide the DatePicker

2011-09-20 Thread Alexander Orlov
Thx, however I try to avoid third-party extensions as *much as possible*. 
Really, with time their maintenance can become the biggest pain in ones 
behind. So I suppose, I have to use a TextBox.

-- 
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/-/v9ZBle-hBP8J.
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: Using @UiHandler annotation on static fields

2011-09-20 Thread Alexander Orlov


On Monday, September 19, 2011 5:43:09 PM UTC+2, gwa wrote:

 *@UiHandler(dialogOk)*
 *void dialogOk(final ClickEvent event) {*
 *yourOtherClass.doSomething();*
 *}*


 Imagine your other class is an Activity (Presenter from MVP pattern), and 
 you have a correcttly separated View / activity...



   1. I consider @UiHandler not a part of the Presenter (due to its 
   annotation marker) like everything else in GWT that uses annotations.
   2. I wanted to know whether assigning a Handler to a static widget via 
   @UiHandler is possible at all.

-- 
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/-/FwLkXup6M3sJ.
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 + Server Paths

2011-09-20 Thread Alexander Orlov
Also using a */shop*, */news *pattern requires the browser to reload the 
page, each time you navigate from one path to another. With GWT you don't 
need to reload the page at all. Using *hashtags,* like already mentioned, 
enables you to implement a reload-less navigation structure: */#shop, /#news
*

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



A DateBox where I can select the time and hide the DatePicker

2011-09-19 Thread Alexander Orlov
final DateBox.Format format = new 
DateBox.DefaultFormat(DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.TIME_SHORT));
begin.setFormat(format);
begin.hideDatePicker();

I have two problems with this DateBox

   1. I don't want it to show the DatePicker and although *
   begin.isDatePickerShowing()* reports *false,* every time I click on the 
   DateBox the DatePicker comes down
   2. I want let the DatePicker not show the Calendar but a TimeSelector 
   (I suppose it's not possible?)

To hide the DatePicker I could also use a TextBox but in this particular 
case a semantic Date widget would be nice to use.

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

attachment: Screen Shot 2011-09-19 at 9.36.44 AM.png

Re: Panel exposed as url?

2011-09-19 Thread Alexander Orlov
As far as I understand you, you can do the following:

*http://path/showWidget=infoPanel*

String widgetToShow = Window.Location.getParameter(showWidget);

if(widgetToShow.equals(infoPanel)) {
// DO something to expose your Panel to the user

// infoPanel should be *visible=false* by default
 infoPanel.setVisible(true);
}

-- 
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/-/bmKMNhr6HxEJ.
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: Panel exposed as url?

2011-09-19 Thread Alexander Orlov
I mean rather something like *http://host/index.html?showWidget=infoPanel*

-- 
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/-/TWvZ0Mw8s1YJ.
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 @UiHandler annotation on static fields

2011-09-19 Thread Alexander Orlov
I have 

*@UiHandler(dialogOk)*
*void dialogOk(final ClickEvent event) {*
*// do something*
*}*
*
*
This is perfectly valid code if dialogOk is within THIS class but how can I 
add a ClickHandler to a static Widget that is defined in another class?

I want to avoid putting this code into another class or using the *
addClickHandler* method within THIS class. Is there a way around?

-- 
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/-/UQJDOxcV8GgJ.
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: Dart GWT

2011-09-18 Thread Alexander Orlov


On Sunday, September 18, 2011 11:11:51 PM UTC+2, nino wrote:

 Is Dart even out yet ? 


Not yet and therefore I'm asking those questions. Dart will be introduced on 
10-12th Oct. during the GOTO Conference.

-- 
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/-/hfc75rz0-fcJ.
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] Any facts about GWT Dart?

2011-09-18 Thread Alexander Orlov
Some of you maybe already read this 
mailhttp://markmail.org/message/uro3jtoitlmq6x7t. 
Yes, Google's new structural web programming language aka Dart... Also I 
suppose that some of you are even working on its integration into GWT.

Keeping it within your NDA frame, is it possible tot tell how GWT's Dart 
integration will look like? I am thinking of a *compile to Dart* option or 
something like *JSNI on steroids* version for Dart... /dreaming :)

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

Re: Cannot lo0ad my application since the upgrade to gwt 2.4

2011-09-16 Thread Alexander Orlov
You need to add validation-api-1.0.0.GA.jar to your 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/-/vLXHE6By7CAJ.
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.



Generating module.cache.js instead of module.nocache.js

2011-09-16 Thread Alexander Orlov
The default behavior of GWT is to generate the *module.nocache.js* versions. 
But how can I generate a *module.cache.js* version of a module? I've foundsome 
informationhttp://code.google.com/p/google-web-toolkit/wiki/LinkerDesignabout 
this issue but it seems to be obsolete. Also what does 
*cache.js *mean exactly? Can't I achieve the same result by adding 
*.*nocache.js 
to HTML5's App Cache?*

-- 
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/-/Lw3HChYQBC0J.
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: Generating module.cache.js instead of module.nocache.js

2011-09-16 Thread Alexander Orlov


On Friday, September 16, 2011 12:00:59 PM UTC+2, Thomas Broyer wrote:

 *.cache.* and *.nocache.* are just naming conventions adopted by GWT to 
 help setup the perfect 
 cachinghttp://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#perfect_cachingconfigurations.


Really useful insights!
 


 If you enable caching for the *.nocache.js file, then you explicitly allow 
 intermediate servers/proxies, and browsers, to serve/use a possibly obsolete 
 version of you app, without necessarily checking for a fresher on at your 
 server. That means your servlets have to be prepared receiving requests from 
 such versions even after you pushed an update to your server.


That's also what I had in mind. I just wondered why so many Google apps use 
the *.cache.js version. Ok, if the content ist pretty static and for a *very 
high* number of reqs/s it may be a viable solution.

-- 
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/-/3LfdY32RvbwJ.
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: java.lang.NoClassDefFoundError:org/json/JSONException

2011-09-16 Thread Alexander Orlov


On Friday, September 16, 2011 4:45:45 PM UTC+2, Cristian Rinaldi wrote:

 I have an error when the application is deployed. 
 The exception is Caused by: java.lang.NoClassDefFoundError: org/json/ 
 JSONException. But the rare is that I have all libraries in de WEB- 
 INF/lib 

 gwt-servlet.jar 
 gwt-servlet-deps.jar 
 requestfactory-servlet.jar 
 validation-api-1.0.0.GA.jar 


There is no requestfactory-servlet.jar, I suppose you mean *
requestfactory-server.jar* which should be available during both run time 
and compile time. Also you *don't need neither gwt-servlet-deps.jar 
nor gwt-servlet.jar* since you're using requestfactory-server.jar. Also you 
probably don't need validation-api-1.0.0.GA.jar. However you must have a 
working Annotation Processing 
configurationhttp://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation
.

-- 
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/-/t_WwHPoXxGQJ.
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: RequestFactory error

2011-09-12 Thread Alexander Orlov
Try to include gwt-servlet-deps.jar in compile scope, although you don't 
need it at all... This is the minimal configuration for 
RFhttp://blog.loxal.net/2011/09/maven-configuration-for-requestfactory.html
.

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



Sb. uses the Unit Test pattern w/ GWT?

2011-09-12 Thread Alexander Orlov
I've tried it and found that the GWT startup or re-compilation time wasn't 
shortened which was the primary reason I've tried it.

Has sb. gained real production advantages using *GWT's JUnit*?

-- 
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/-/ZnMQQ7qau7YJ.
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: Autoboxing

2011-09-12 Thread Alexander Orlov
I suppose: In JS there is no distinction between *Integer* and *int*. In JS 
there's only a single *var* type*.*

-- 
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/-/Vh89_PPMV0YJ.
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: Sb. uses the Unit Test pattern w/ GWT?

2011-09-12 Thread Alexander Orlov
On Monday, September 12, 2011 12:33:20 PM UTC+2, Thomas Broyer wrote:

 What do you mean by GWT's JUnit? (and actually how do you expect it to 
 shorten startup or re-compilation time?)


I mean GWT's GWTTestCase extending JUnit that's not redering any UI. 
Therefore the dev mode re-compilation time could be shortened (must not but 
could). 
 


 Unit-testing is about software quality.
 The most important gains are in the long run, because a set of automated 
 tests that can be replayed at any time will ensure you don't have 
 regressions.


For me JUnit is also about TDD. Avoiding regressions is another thing...
 

 With GWT, you should try as hard as possible to use plain JUnit (or 
 TestNG or whatever) tests vs. GWTTestCase, because the former are much 
 faster; and that's one of the main goals of using MVP (by mocking your view, 
 you no longer need a GWTTestCase to test your presenter logic).


I've hoped for this kind of tips.
 

 This is also where you'll have the most important productivity gains: 
 writing unit tests for your presenters allows you to develop in short 
 iterations, without the need to even start up the DevMode. You'd use the 
 DevMode either early on to design your view, and/or later on to do some 
 additional manual testing (and actually test your view, rather than your 
 presenter).


 ...and this kind. I guess, I'll give (this time plain) JUnit another 
chance.

-- 
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/-/mosrhPiF4gQJ.
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: RequestFactory error

2011-09-12 Thread Alexander Orlov
Compile scope in Maven means that it's also available at runtime. I had 
exact the same error several times and as far as I remember I solved it by 
adding gwt-servlet-deps.jar to the system scope which is basically the same 
as the compile scope in Maven.

Also gwt-servlet-deps.jar has *JSONException* you're missing.

-- 
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/-/jdYtjVd09NAJ.
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: RequestFactory error

2011-09-12 Thread Alexander Orlov
Did you add a corresponding RF servlet handler to your web.xml?

servlet
servlet-namereqFactory/servlet-name

servlet-classcom.google.web.bindery.requestfactory.server.RequestFactoryServlet/servlet-class
/servlet
servlet-mapping
servlet-namereqFactory/servlet-name
url-patternplaner/gwtRequest/url-pattern
/servlet-mapping

-- 
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/-/GMZ8uwrOi6gJ.
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: RequestFactory error

2011-09-12 Thread Alexander Orlov
in your case maybe: url-pattern*/gwtRequest*/url-pattern

-- 
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/-/BuTwBMjVxgQJ.
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: RequestFactory error

2011-09-12 Thread Alexander Orlov
On Monday, September 12, 2011 6:36:45 PM UTC+2, Pavel Byles wrote:

 So now I'm getting a 500 error: Problem accessing /gwtRequest


500? You would get Error 404 when */* isn't your app context what's mostly 
the case. My url-pattern is *planer/gwtRequest *because in my *.gwt.xml 
I've *module rename-to=planer*. If you're using Maven this would be the 
absolute minimal 
configurationhttp://blog.loxal.net/2011/09/maven-configuration-for-requestfactory.htmlto
 get RF working. 

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



Re: Calling *.nocache.js from a remote page

2011-09-10 Thread Alexander Orlov
Thx, worked like a charm!

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



2.4: Is gwt-user required at runtime?

2011-09-09 Thread Alexander Orlov
In 2.3

*dependency*
*groupIdcom.google.gwt/groupId*
*artifactIdgwt-user/artifactId*
*version${gwt.ver}/version*
*!--COMPILE scope necessary since 2.4?!--*
*scopeprovided/scope*
*/dependency*

worked fine for me. Now I have to use compile scope to avoid this

[WARN] Server class 
'com.google.web.bindery.requestfactory.server.RequestFactoryServlet' could 
not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 
'file:/Users/alex/.m2/repository/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar'
 
to the web app classpath for this session

*
*
Is gwt-user also required at runtime now?! Hope for enlightenment. 

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



2.4: Is gwt-servlet still necessary when using RF instead of RPC?

2011-09-09 Thread Alexander Orlov
On Fri, Sep 9, 2011 at 10:50 AM, Thomas Broyer t.bro...@gmail.com wrote:

 Make sure you have gwt-servlet.jar (and check the version) or
 requestfactory-server.jar in your WEB-INF/lib.


Ah, thx! I've added requestfactory-server and thought it would make
gwt-servlet obsolete. So I've removed gwt-servlet completely. Is gwt-servlet
still necessary although I'm using RequestFactory instead of GWT-RPC?

Btw I have no WEB-INF/lib at all as I'm using Maven.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: 2.4: Is gwt-servlet still necessary when using RF instead of RPC?

2011-09-09 Thread Alexander Orlov
Thx a lot for uploading the JARs to Maven Central! 

Unfortunately I've got your message just now. In the meantime I came to the 
same result which background you've described. The absolute minium to get RF 
+ GWT working is:

dependency
groupIdcom.google.gwt/groupId
artifactIdgwt-user/artifactId
version${gwt.ver}/version
scopeprovided/scope
/dependency
dependency
groupIdcom.google.web.bindery/groupId
artifactIdrequestfactory-apt/artifactId
version${gwt.ver}/version
scopeprovided/scope
/dependency
dependency
groupIdcom.google.web.bindery/groupId
artifactIdrequestfactory-server/artifactId
version${gwt.ver}/version
/dependency

Also the scopes are set as small as possible. requestfactory-server has to 
be in the *compile* scope as it contains the validation-api (which was a 
separate JAR in previous versions).

On Friday, September 9, 2011 3:55:40 PM UTC+2, David Chandler (Google) 
wrote:

 Hi Alexander,

 If using RF only, you no longer need gwt-servlet, just 
 requestfactory-server, which is now available in Maven Central. The POM for 
 requestfactory-server also declares the javax.validation and json 
 dependencies so you no longer need them explicitly in your project POM; 
 however, you do need requestfactory-apt as shown in the wiki page below. You 
 can pull in requestfactory-server as follows:

 dependency
   groupIdcom.google.web.bindery/groupId
   artifactIdrequestfactory-server/artifactId
   version2.4.0/version
 /dependency

 For a working POM that puts it all together, see 


 http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mobilewebapp/pom.xml

 For explanation on using RequestFactory with Maven, see


 http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation#Maven_builds
 http://code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven

 /dmc

 On Fri, Sep 9, 2011 at 5:03 AM, Alexander Orlov alexand...@loxal.netwrote:

 On Fri, Sep 9, 2011 at 10:50 AM, Thomas Broyer t.br...@gmail.com wrote:

 Make sure you have gwt-servlet.jar (and check the version) or 
 requestfactory-server.jar in your WEB-INF/lib. 


 Ah, thx! I've added requestfactory-server and thought it would make 
 gwt-servlet obsolete. So I've removed gwt-servlet completely. Is gwt-servlet 
 still necessary although I'm using RequestFactory instead of GWT-RPC?

 Btw I have no WEB-INF/lib at all as I'm using Maven.

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




 -- 
 David Chandler
 Developer Programs Engineer, GWT+GAE
 w: http://code.google.com/
 b: http://turbomanage.wordpress.com/
 b: http://googlewebtoolkit.blogspot.com/
 t: @googledevtools

  

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



DevMode turnaround times: Very slow view recompilation

2011-08-23 Thread Alexander Orlov
I'm working with a really fast desktop machine with a SSD but a view refresh 
in DevMode still takes 5-10s using GWT 2.3 (only for client-side code). Is 
the situation going to improve anytime soon? I've read about some 
compilation caching mechanisms in 2.4...

Are there any other tweaks one can make to reduce the DevMode refresh time?

-- 
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/-/LTt0w2ODW28J.
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: Error while compiling gwt module ?.

2011-08-23 Thread Alexander Orlov
Putting 

*inherits name=javax.validation.Validation/*

into your *.gwt.xml might solve the problem.

-- 
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/-/engnMcr5PiMJ.
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: Error while compiling gwt module ?.

2011-08-23 Thread Alexander Orlov
On Tue, Aug 23, 2011 at 3:08 PM, suresh babu sureshgbab...@gmail.comwrote:

  Even after adding inherits name=javax.validation.Validation/ in
 gwt.xml it shows same error.


Are validation-api-*.jar and validation-api-*-sources.jar in your
classpath?

-- 
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: DevMode turnaround times: Very slow view recompilation

2011-08-23 Thread Alexander Orlov
Just recognized that sub-classing classes which already have sub-classed *
Composite* also greatly increases the refresh time. Using the 
*@UiChild*annotation achieves almost the same effects in 1/3 of the time.

-- 
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/-/S07YzkNwOO8J.
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: Error while compiling gwt module ?.

2011-08-23 Thread Alexander Orlov
On Tue, Aug 23, 2011 at 4:03 PM, suresh babu sureshgbab...@gmail.comwrote:

 But I don't known where this jar is used.


It's a dependency for some *CellWidgets*. You should be able to compile your
code without this dependency using GWT 2.4-rc1.

-- 
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: Remove ALL CSS from GWT

2011-08-22 Thread Alexander Orlov
On Mon, Aug 22, 2011 at 1:36 PM, Sudhakar Abraham 
s.abra...@datastoregwt.com wrote:


 Change the property in gwt.xml file as follows.

 In the Project.gwt.xml file do not inherit the css  file.
 comment as follows !-- inherits
 name='com.google.gwt.user.theme.standard.Standard'/ --


...is supposed to work only if you are using non-Layout widgets, i.e.
RootPanel instead of RootLayoutPanel. If you use it with RLP some
layout-related CSS properties still remain.

Fortunately you can override RootLayoutPanel's defaults with your own CSS
values.

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



Remove ALL CSS from GWT

2011-08-19 Thread Alexander Orlov
Even if you don't specify any specific theme in the *.gwt.xml some CSS 
directives are always inserted into the app. How can I specify that GWT 
should not insert any single line of CSS into the app?

-- 
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/-/JYj1VAgG00YJ.
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: Remove ALL CSS from GWT

2011-08-19 Thread Alexander Orlov
Using

RootPanel.get().add(app);

instead of

RootLayoutPanel.get().add(app);


...was the solution. Eventually you should add

inherits name=com.google.gwt.user.theme.standard.StandardResources/

to your *.gwt.xml as described 
herehttp://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html#themes
.
 

-- 
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/-/8cSCQOpy_qgJ.
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.



RequestFactory: Advantages of using the ServiceLocator pattern

2011-08-18 Thread Alexander Orlov
I think using ServiceLocator boils down to 

Methods that return a Request object in the client interface are 
implemented as static methods in the service class. Alternatively, they may 
be implemented as instance methods in a service object returned by a 
ServiceLocator.

what pretty much describes how SL works. An obvious advantage of using SL is 
that you don't clutter your data model classes with any related methods.

But are there further *advantages of using SL *(and therefore implementing 
not static but instance methods)* vs. implementing static methods*?

-- 
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/-/EcdfWQm-gIQJ.
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: RequestFactory: Advantages of using the ServiceLocator pattern

2011-08-18 Thread Alexander Orlov
But what's about this case: This method is from a server-side entity class 
that has to associate it's *user* field with a given user (retrieved by its 
userId).

public void setUser(final Integer userId) {
this.user = User.find(userId); // this is what I need to do using 
the static way

// below is what I have to do when I'm using SL
//  MainServiceLocator mainServiceLocator = new 
MainServiceLocator();
//  UserDAOService userService = (UserDAOService) 
mainServiceLocator.getInstance(UserDAOService.class);
//  userService.find(User.class, userId)
}

Ok, the SL could be simpler but the point is: I've to instantiate the SL in 
order to use the find method which could be declared static.

-- 
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/-/g3VZ4gRhMA4J.
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: RequestFactory: Advantages of using the ServiceLocator pattern

2011-08-18 Thread Alexander Orlov
On Thursday, August 18, 2011 2:48:56 PM UTC+2, Magno Machado wrote:

 I didn't understand your exemple. Who is responsible for doing all of this 
 stuff is the requestfactory framework, not you

 
I haven't implemented SL for all entities. So I still rely on this static 
server-side method to keep the rest functional.

-- 
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/-/R-cu1q1SKEEJ.
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: Aw: Re: RequestFactory: Advantages of using the ServiceLocator pattern

2011-08-18 Thread Alexander Orlov
On Thursday, August 18, 2011 2:59:43 PM UTC+2, Jens wrote:

 Of course in this example using a SL doesn't seem nice..but the example 
 itself isn't really nice to me :)


Agree :) This is called successively grown. 

-- 
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/-/uY-vvWDS22wJ.
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: RequestFactory: Advantages of using the ServiceLocator pattern

2011-08-18 Thread Alexander Orlov
On Thursday, August 18, 2011 2:43:47 PM UTC+2, Alexander Orlov wrote:

 public void setUser(final Integer userId) {
 this.user = User.find(userId); // this is what I need to do using 
 the static way

 // below is what I have to do when I'm using SL
 //  MainServiceLocator mainServiceLocator = new 
 MainServiceLocator();
 //  UserDAOService userService = (UserDAOService) 
 mainServiceLocator.getInstance(UserDAOService.class);
 //  userService.find(User.class, userId)
 }


I think that's better within the data model:

this.user = (User)entityController.find(User.class, userId); 

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



Obtaining the click position of the underlying widget from an overlay widget

2011-08-16 Thread Alexander Orlov
I have something like

g:ScrollPanel
/g:FocusPanel
!-- a few FocusPanels --
/g:ScrollPanel

The FocusPanel is attached to a random place within the ScrollPanel. Now I 
want to get the position of the place where the user places his click. I've 
tried the following 

focusPanel.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
  System.out.println(event.getClientX());
System.out.println(event.getX());

System.out.println(event.getRelativeX(event.getRelativeElement().getOffsetLeft()));

System.out.println(event.getRelativeElement().getOffsetLeft());

System.out.println(event.getRelativeElement().getOffsetWidth());

System.out.println(event.getRelativeElement().getOffsetHeight());

System.out.println(event.getRelativeElement().getOffsetTop());
System.out.println(event.getScreenX());
}
}

...but I always get the same values, no matter where I place my click on the 
focusPanel.

-- 
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/-/J4cH7AUDKBcJ.
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: Obtaining the click position of the underlying widget from an overlay widget

2011-08-16 Thread Alexander Orlov
On Tue, Aug 16, 2011 at 2:38 PM, Ivan Pulleyn ivan.pull...@gmail.comwrote:


 I believe you want this:

 int x = event.getRelativeX(event.getRelativeElement());
 int y = event.getRelativeY(event.getRelativeElement());


Unfortunately not, I always get:

event.x = -266
 event.y = -133


...no matter where on the FocusPanel I click, the value remain static. When
I click on another FocusPanel the values change but reamin static within the
same FocusPanel.




 On Tue, Aug 16, 2011 at 7:26 PM, Alexander Orlov 
 alexander.or...@loxal.net wrote:

 I have something like

 g:ScrollPanel
 /g:FocusPanel
 !-- a few FocusPanels --
 /g:ScrollPanel

 The FocusPanel is attached to a random place within the ScrollPanel. Now I
 want to get the position of the place where the user places his click. I've
 tried the following

 focusPanel.addClickHandler(new ClickHandler() {
 @Override
 public void onClick(ClickEvent event) {
   System.out.println(event.getClientX());
 System.out.println(event.getX());

 System.out.println(event.getRelativeX(event.getRelativeElement().getOffsetLeft()));

 System.out.println(event.getRelativeElement().getOffsetLeft());

 System.out.println(event.getRelativeElement().getOffsetWidth());

 System.out.println(event.getRelativeElement().getOffsetHeight());

 System.out.println(event.getRelativeElement().getOffsetTop());
 System.out.println(event.getScreenX());
 }
 }

 ...but I always get the same values, no matter where I place my click on
 the focusPanel.

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




-- 
www.loxal.net
Mobile: +49 176 4440-3969
Rablstr. 12 • 81669 Munich • Germany

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



Resizable panel-like widget

2011-08-11 Thread Alexander Orlov
I'm looking for a panel-like widget that can be resized (vertically) when 
the users clicks and moves its bottom/top end. Couldn't find anything 
suitable in GWT's Showcase app.

-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/-/5YmF6b_ZqxYJ.
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: Offline Google Web Toolkit

2011-08-08 Thread Alexander Orlov
The most convenient and appropriate way would be to use the newly added 
Canvas (part of the HTML5 spec) 
APIhttp://code.google.com/webtoolkit/doc/latest/DevGuideHtml5.html. Here 
is a demo of GWT using Canvas http://gwtcanvasdemo.appspot.com/.

I doubt that using all these GWT extension stuff is really helpful in the 
longterm. 

-- 
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/-/G6XNwJOy9KcJ.
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-05 Thread Alexander Orlov
On Fri, Aug 5, 2011 at 6:07 AM, Nick Hristov nick.hris...@gmail.com wrote:

 You are going to generate page content on the browser which you will
 post on the server so that it can be loaded by the browser.


Please read what I wrote! I wrote during *compile time*. And compile time is
the time when Ajax is generated out of Java on the dev machine.


 Generate the simple html content on the server, and let the browser
 load a GWT module which (possibly with gwtquery) attaches event
 handlers into the page and links into the rest of the module's
 functionality.


Why should static HTML content be generated on the server?

And if you mean not generated but just served by the server: in this case
you might have an HTML container page that cannot use the LayoutPanels...
but I think, I don't get what you mean with your proposal.

Alex



 On Aug 4, 7:24 am, dreamer venugopal.vasire...@gmail.com wrote:
   = static pages
I tried to develop a page uisng UIBinder (mix of html and widgets)
  and RPC calls where it makes
sense and ultimately I wanted to post entire page to server and let
  server serve next page.
 
  Here are My roadblocks for now
 
   * Not sure how to post entire page to servlet, develop just using
  designer and plugin
 
   * If some how, able to post UIBinder page to servlet, how servlet
  creates a RequestDispatcher for another UIBinder page?
 
   * Can UIBinder page be identifiable like jsp/html page on
  server ???
 
  -Venuhttp://schoolk12.appspot.com/
 
  On Aug 4, 6:45 am, Alexander Orlov alexander.or...@loxal.net wrote:
 
 
 
 
 
 
 
   On Thu, Aug 4, 2011 at 3:11 PM, Alex Dobjanschi
   alex.dobjans...@gmail.comwrote:
 
As far as it goes, you're basically running Javascript code, in a
(simple-to-complex) app, inside client code (browser sandbox). I
 don't how
crawling such an app would be straightforward.
 
The appsparts of an app shouldn't be crawled... There are static
 parts
 
   in almost every app, e.g. product descriptions and exactly those
 parts of
   an app should be crawled.

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




-- 
www.loxal.net
Mobile: +49 176 4440-3969
Rablstr. 12 • 81669 Munich • Germany

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



Best practice for using values returned in callbacks (RequestFactory)

2011-08-05 Thread Alexander Orlov
In GWT and particularly the RequestFactory framework many callbacks are used 
to retrieve certain values

void callBack(final Integer userId) {
final MainRequestFactory.ResourceRequest reqFactory = 
mainRequestFactory.resourceRequest();
final com.google.web.bindery.requestfactory.shared.RequestInteger 
req = reqFactory.getUserResourceId(userId);
req.fire(new ReceiverInteger() {
@Override
public void onSuccess(final Integer response) {
   System.out.println(My VALUE I want to return or assign to 
globally accessible variable =  + response); // *MyValue*
}
});
}

However I cannot neither return MyValue or assign it to a (even static) 
field because the callBack is asynchronous. 

What is the best (a good one is fine enough too :) practice to process *
MyValue*?

-- 
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/-/2GExHWqNpccJ.
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: Best practice for using values returned in callbacks (RequestFactory)

2011-08-05 Thread Alexander Orlov
On Fri, Aug 5, 2011 at 12:15 PM, Jens jens.nehlme...@gmail.com wrote:

 You can assign your response to an instance variable, you just can not
 write this.variable inside onSuccess because that references the Receiver
 and not the real class that contains the async call. Just omit this and it
 should work.


Yep, that's basically what I've done too but I could not imagine assigning a
value to a (global) field could be advisable.


 If you want to be complete you could write it the long way
 RealClass.this.variablename. I do this all the time in my async callbacks.
 But its only useful if you want to remember some information obtained by an
 async call.


That's almost always the case.


 If you really need to process the response you have to do it in the
 onSuccess method either directly or by calling a separate method (or by
 firing an event which is basically the same as calling a separate method).


So If I have a callback that requires a value from another callback, I have
to chain these callbacks? Could result in a pretty long callback chain...

-Alex

-- 
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: Aw: Re: Best practice for using values returned in callbacks (RequestFactory)

2011-08-05 Thread Alexander Orlov
On Friday, August 5, 2011 1:06:14 PM UTC+2, Jens wrote:

 Yes you have to use chaining or you introduce a new service method that 
 does all the work in just one server request. If you have code flows like 
 finding an ID_b for a given ID_a and then immediately use ID_b to fetch the 
 final object you could create a specialized method that takes ID_a and 
 directly fetches and returns the final object. Finding ID_b would then only 
 happen on server side.
 I prefer the last option as I want to reduce server requests as much as 
 possible.


Plausible. 


 If you have to chain then you should call good named methods in your 
 callbacks onSuccess methods to start the next server request. I think this 
 will increase readability at least a bit.


Might increase it but I'm afraid chaining produces badly readable code by 
its nature. Working with methods which are independent from each other would 
simplify many things. OTOH you can do everything server-side which 
encourages to write very performant code.

Thx for the enlightenment!
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/-/d7Ne54vPEaAJ.
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-04 Thread Alexander Orlov
On Thursday, August 4, 2011 5:57:23 AM UTC+2, Nick Hristov wrote:

 If I am understanding you correctly, you want to have the server 
 generate some html page content and the the embedded gwt module will 


A server-side approach that generates static snapshots of every — in a 
certain way annotated — state is a possible solution.

But there could be also a compile time approach. That is,* during compile 
time the appropriate static snapshots could be generated* to represent a 
certain state of the app pre-filled with certain default values. This would 
be even a more elegant solution as the server don't need to be bothered with 
this stuff in the future.

Hope to read something from the core devs... :)

-- 
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/-/A2tDpVurUtgJ.
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-04 Thread Alexander Orlov
On Thu, Aug 4, 2011 at 11:27 AM, Jambi michael.lukaszc...@googlemail.comwrote:

 I don´t think this is a good idea. The dynamic content, that should be
 crawlable, doesn´t exist at compile time.


What I mean is that you should be able to annotate static parts of your
app that might be relevant for crawlers and put default values where your
dynamic parts are. These default values could simply state USERNAME, DATE,
CURRENT BALANCE. So the crawler could get a better context of the static
parts of your app, actually a page in this case.

-- 
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-04 Thread Alexander Orlov
On Thu, Aug 4, 2011 at 3:11 PM, Alex Dobjanschi
alex.dobjans...@gmail.comwrote:

 As far as it goes, you're basically running Javascript code, in a
 (simple-to-complex) app, inside client code (browser sandbox). I don't how
 crawling such an app would be straightforward.

 The apps parts of an app shouldn't be crawled... There are static parts
in almost every app, e.g. product descriptions and exactly those parts of
an app should be crawled.

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



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: How to get GWT's Session Key?

2011-08-01 Thread Alexander Orlov
On Wednesday, May 11, 2011 7:42:07 PM UTC+2, Juan Pablo Gardella wrote:

 For what?


To get this session key...?  Also to understand the how this session key 
is integrated into GWT and to understand its functionality.

So to sum up: How can I get AaGq!pC9K[JE$8q} in Session 
key: AaGq!pC9K[JE$8q}?

-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/-/I72NrxiIK0MJ.
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/GPE 2.4.0 RC1 is available

2011-07-29 Thread Alexander Orlov
David, you've mentioned that you would also upload the requestfactory-*.jars 
to Maven Central. Currently I can find only the gwt-*.jars but no rf-*.jars.

I'd like to replace gwt-servlet monster JAR by rf-server+client.jars as I'm 
not using GWT-RPC but only the RF.

Are both, rf-server and rf-client required to replace gwt-servlet and which 
scope each of them should have?

-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/-/H8K_N-KuPgIJ.
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: Declare an array of panels in UiBinder

2011-07-26 Thread Alexander Orlov
On Tue, Jul 26, 2011 at 1:28 AM, Tomasz Gawel tomaszga...@op.pl wrote:

 a list or an array? it's not
 the right place because these are visiual templates, and a visual


That (variable list) was basically what I wanted to do. I know that UiBinder
is a declarative descriptor but I've thought that a variable container of
WhateverWidgets could be seen as a declarative element as well.

But @UiFactory is an annotation that helped me to find a better solution
than I had before, less elegant than I wanted but still better than I had...

-Alex

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



Declare an array of panels in UiBinder

2011-07-25 Thread Alexander Orlov
Currently I do

@UiField
VerticalPanel vp;

void addSlot() {
final FocusPanel fp = new FocusPanel();
vp.add(fp);
}

...so, vp contains a variable number of fps at runtime. However I try
to use UiBinder wherever it's possible.

Is it possible to declare Widget Arrays resp. ArrayLists in UiBinder
that might have a different size at runtime and (if not) are there
plans to implement it?

-Alex

-- 
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: Declare an array of panels in UiBinder

2011-07-25 Thread Alexander Orlov
On Jul 25, 12:09 pm, Tomasz Gawel tomaszga...@op.pl wrote:
 ListFocusPanel slots;
 @UiField FlowPanel slotTargetPanel;

 @UiFactory FocusPanel void addSlot() {

I suppose this should be
 @UiFactory FocusPanel addSlot() {

    FocusPanel slot = new FocusPanel();
    slots.add(slot);
Here I get:
ERROR: Failed to create an instance of
'dp.verp.planer.client.ResourceDefiner' via deferred binding .
java.lang.NullPointerException: null

Didn't know about @UiFactory. This annotation could be very useful in
many other cases...

-Alex

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



  1   2   >