Re: [gwt-contrib] Some separate compilation errors/questions

2014-07-19 Thread Miroslav Genov
Hello, 

Is there issue about this ?

I was searching for it, but I can't find it. 

On Saturday, June 21, 2014 7:21:30 PM UTC+3, Jens wrote:

 Hey Jens

 Thanks for trying it out.


 Hey John,

 are you aware of issues regarding GWT's RuntimeRebinder classes and 
 incremental compilation? I am trying SDM incremental from time to time and 
 have these issues:

 1.) In current GWT trunk a new app with empty entry point does not work 
 anymore at runtime when using incremental compile. It fails with


1. Uncaught TypeError: Cannot read property 
'containsKey__Ljava_lang_Object_2Z' of undefined Example-0.js:8181
   1. 
   
 com_google_gwt_lang_RuntimeRebinder_createInstance__Ljava_lang_Class_2Ljava_lang_Object_2
   Example-0.js:8181
   2. java_util_AbstractHashMap_clearImpl__VExample-0.js:21715
   3. java_util_AbstractHashMap_$init__VExample-0.js:21695
   4. java_util_AbstractHashMap_AbstractHashMap__VExample-0.js:21667
   5. java_util_HashMap_HashMap__VExample-0.js:26220
   6. com_google_gwt_lang_RuntimeRebinder_$clinit__VExample-0.js:8167
   7. 
   
 com_google_gwt_lang_RuntimeRebinder_createInstance__Ljava_lang_Class_2Ljava_lang_Object_2
   Example-0.js:8178
   8. com_google_gwt_core_client_impl_Impl_$clinit__VExample-0.js:3534
   9. 
   
 com_google_gwt_core_client_impl_Impl_registerEntry__Lcom_google_gwt_core_client_JavaScriptObject_2
   Example-0.js:3728
   10. 
   
 com_google_gwt_lang_ModuleUtils_registerEntry__Lcom_google_gwt_core_client_JavaScriptObject_2
   Example-0.js:197
   11. (anonymous function)
   

 2.) In an older GWT trunk version, which does not cause the issue in 1.), 
 sometimes the RuntimeRebinder.runtimeRebindRuleByRequestTypeName Map has 
 some missing entries. Because of that the app fails to start at runtime 
 when using incremental compilation because no RuntimeRebindRule for my 
 AppGinjector can be found in the map. When not using incremental compile, 
 everything works.


 -- J.


-- 
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/89f131d9-99f1-4ecf-971c-064a16b9aedb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Super Dev Mode (GWT 2.7-SNAPSHOT) fails with filename too long

2014-06-03 Thread Miroslav Genov
Hello, 

I'm getting a strange error when I try to use the Super Dev Mode with the 
latest version of GWT. 


[WARN] Error writing out generated unit at 
'/var/folders/fw/bkhx08rn6kzbfk7rfkbpn38wgn/T/gwt-codeserver-4461955773179816365.tmp/com.xxx.xxx.App/compile-1/gen/com/xxx/xxx/device/shared/RequestedDeviceProxy_RequestedDeviceInfoProxyAutoBean_com_google_web_bindery_requestfactory_shared_impl_EntityProxyCategory_com_google_web_bindery_requestfactory_shared_impl_ValueProxyCategory_com_google_web_bindery_requestfactory_shared_impl_BaseProxyCategory.java':
 
java.io.FileNotFoundException: 
/var/folders/fw/bkhx08rn6kzbfk7rfkbpn38wgn/T/gwt-codeserver-4461955773179816365.tmp/com.xxx.xxx.App/compile-1/gen/com/xxx/xxx/device/shared/RequestedDeviceProxy_RequestedDeviceInfoProxyAutoBean_com_google_web_bindery_requestfactory_shared_impl_EntityProxyCategory_com_google_web_bindery_requestfactory_shared_impl_ValueProxyCategory_com_google_web_bindery_requestfactory_shared_impl_BaseProxyCategory.java
 
(File name too long)

It seems that by default the GWT is using the -gen flag which is using 
too long filenames for any operating system ( as described in: 
https://code.google.com/p/google-web-toolkit/issues/detail?id=6015 )

Any idea how this issue can be fixed ?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


(RequestFactory) Searching for issue related to http://bit.ly/SldSlF

2012-11-26 Thread Miroslav Genov
Hello, 

I'm searching for issue that is related to: 
http://stackoverflow.com/questions/12977922/gwt-requestfactory-performance-suggestions
 
.Does anyone could point me to it cause I couldn't find it.

Regards, 
 Miroslav

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



textbox focus is not working as expected on IE8

2012-10-08 Thread Miroslav Genov
Hello,

It seems that focus is not working as expected on IE8. Does anyone has an 
idea why FocusImpl is using FocusImplIE6 when ie8 when FocusImplStandard 
seens more reasonable as described 
in: 
http://stackoverflow.com/questions/1326993/jquery-focus-sometimes-not-working-in-ie8

-- 
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/-/m14BikMiHjIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 default wire format specification

2012-03-27 Thread Miroslav Genov
:) I see. 

My question was related to documentation, because I've heard you to say 
that some RF parts are working by design, so I was wondering where there 
is a such a document, that describes it. I know that GWT project has some 
Wiki pages about RF, but non of them is explaining in details the format of 
the request/response messages.

I'm digging into the source, to find out how the things are working and to 
find a way to make some optimization on the server side, cause It's really 
slow. 50 small entities are serialized in ~10 seconds on GAE, where with 
GSON, the serialization takes 300 ms. I made profiling of a simple request 
that doesn't accept any parameters and returns 50 entities.

Here is the test code that is making the request and measures the request 
time:

 public void testMethodReturningLargeDataSet() {
delayTestFinish(DELAY_TEST_FINISH);

SimpleFooRequest request = simpleFooRequest();

final long start = System.currentTimeMillis();
request.returnValueProxies().to(new ReceiverListSimpleValueProxy() {
  @Override
  public void onSuccess(ListSimpleValueProxy response) {
long end = System.currentTimeMillis();

System.out.println(Size:  + response.size() +  Time:  + (end - 
start) +  ms);
  }
}).fire();
  }

Result time of this test is: Size: 50 Time: 1336 ms, where with gson, the 
serialization time of this 50 objects is ~ 300 ms which means that RF is 4 
times slower then the simple json serialization. 

The profiler is saying that: SimpleRequestProcessor.process method is 
taking 58% of the processing time, where:
createReturnOperations - 20%
   - EntityCodex.encode   10%
   - AutoBeanUtils.getAllProperties()  4%
   - setTypeToken  - 2%
   - Other invocations - 3%

processInvocationMessages  - 37%
   - resolveClientValue - 28%
   - ServiceLayerDecorator.invoke (Service method invocation) - 1 ms (0%)
   - EntityCodex.encode   - 9%

Thomas, do you have any thoughts about some optimizations of RF ?

On Tuesday, March 27, 2012 12:14:11 PM UTC+3, Thomas Broyer wrote:

 The specification is the code ;-)
 Have a look at the com.google.web.bindery.requestfactory.shared.messages.* 
 classes for the payload data, and the AbstractRequestContext and 
 SimpleRequestProcessor for how their semantics.
 In the ResponseMessage, there will either be general failure (causes 
 onFailure to be called on all Receivers, including most importantly the 
 global one, optionally passed to the fire() method of the 
 RequestContext), violations (same as a general failure, but 
 onConstraintViolations will be called instead of onFailure) or all three of 
 operations, status codes and invocation results (actually, status codes and 
 invocation results go by pair, and either one of operations or 
 status-codes/invocation-results could be empty, but I don't think they 
 could both be). Operations are data about proxies (have they been 
 created/updated/deleted, along with their properties, as requested by the 
 with() on the Requests); status codes gives the result/failure status of 
 each method invocation (will trigger either onSuccess or onFailure of the 
 Receiver associated with the method invocation) and invocation results 
 (paired to the status codes by their index in the lists) will be either a 
 ServiceFailureMessage (passed on onFailure) or the result (passed to 
 onSuccess), depending on the status code.

 On Monday, March 26, 2012 10:11:20 PM UTC+2, Miroslav Genov wrote:

 Hello,

 Does anyone knows where there is a specification of the wire format which 
 RF is using by default ?

 Regards,
   Miroslav



-- 
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/-/PXOdel8GqfkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 with JsonRpc

2012-03-26 Thread Miroslav Genov
Hello,

Was wondering where anyone is using RequestFactory with JsonRpc ?

I'm trying to get it working, due performance issue with the standart 
serialization of RF, but the RfValidator complains with:  The type 
JsonRpcRequestContext must be annotated with Service, ServiceName, or 
JsonRpcService. The strange part is that my RequestContext already have 
it: 

public interface JsonRpcRequestFactory extends RequestFactory {

  @JsonRpcService
  public interface JsonRpcRequestContext extends RequestContext {

@JsonRpcWireName(value = findAll)
RequestListSimpleJsonRpcProxy findAll();
  }

  JsonRpcRequestContext simpleRequest();
}

-- 
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/-/MMO-Cd_Y2nYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 default wire format specification

2012-03-26 Thread Miroslav Genov
Hello,

Does anyone knows where there is a specification of the wire format which 
RF is using by default ?

Regards,
  Miroslav

-- 
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/-/NVR1QlaKRrcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 takes long time to handle responce

2011-10-23 Thread Miroslav Genov
Forgot to mention that the my version of GWT is 2.4.0 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/IfsM6uHF6DAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 takes long time to handle responce

2011-10-23 Thread Miroslav Genov
Hello Thomas, 

I added some more logging statements to my code (doPost method and in the 
ServiceLayerDecorator) and here are the results:
2011-10-23 20:04:17.441

invoke executed in: 12 ms

2011-10-23 20:04:17.805

getProperty executed in: 0 ms

2011-10-23 20:04:19.273 - (all getProperty invocations are with 0ms time), 
i.e ~2 seconds lost in get property invocations 

Total time in do post:

doPost executed in: 3736 ms

Where my own code execution time is from: 2011-10-23 20:04:17.428 
to
2011-10-23 20:04:17.441
i.e  20  ms

Any other ideas ? 

-- 
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/-/MApKbrp8ok8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 takes long time to handle responce

2011-10-23 Thread Miroslav Genov
It seems that GWT-RPC is working correctly, cause I have another part of my 
code which is retrieving the same list of entities with the same properties 
using GWT-RPC and the whole request is executed in: ~50ms

I think that there is a big performance bottleneck in RF's response 
handling. 

-- 
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/-/4j2bVjNL1OIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 takes long time to handle responce

2011-10-22 Thread Miroslav Genov
Does anyone has encountered a similar issue ? 

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



Re: GWT 2.4 Spring Integration Using RequestFactory

2011-09-14 Thread Miroslav Genov
I made similar thing with Guice. You can take a look at: 
https://github.com/mgenov/injecting-request-factory

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



Request Factory: Sending same proxy twice with different requests is causing changes to be dismissed

2011-08-23 Thread Miroslav Genov
I’m encountering an issue that is causing client side changes to be not sent 
when same entity proxy is sent for the second time to the server. My 
workflow is looking like: 
   
   - load customer
   - edit customer in editor 
   - preview customer changes
   - save customer

The problem is that the request sent to the server when save operation is 
invoked doesn’t send any customer changes that where made in the editor. 

Loading our existing customer
customerRequest().findCustomerById(customerId).toReceiver(new Receiver() {
  public void onSuccess(CustomerProxy customerProxy) {

CustomerRequest customerRequest = rf.customerRequest();

customerRequest.previewCustomer(customerProxy).toReceiver(new Receiver() 
{ 

  public void onSuccess(String customerPreview) {

 display.renderCustomerPreview(customerPreview);

  }
});

editor.edit(customerRequest, customerProxy);

}
  }
}).fire();


Preview customer changes (response is a HTML generated content that is 
displayed in a HTML widget)

@UiHandler(“previewCustomer”)
public void onPreviewCustomer(ClickEvent event)  {
RequestContext previewCustomer = editor.flush();
previewCustomer.fire();
}

Save customer changes (here is the issue, the customer no longer contains 
changes that where set in the editor and the request that was sent to the 
server doesn’t contains any changed elements)
@UiHandler(“saveCustomer”)
public void onSaveCustomer(ClickEvent event)  {

CustomerRequest customerRequest = rf.customerRequest();

customerRequest.edit(customer);

customerRequest.persistCustomer(customer).toReceiver(new Receiver() {

  public void onSuccess(Void void) {

 

  }

}).fire();
}

In debug I can see the changes that are in the CustomerProxy before fire() 
of the requestContext is invoked, but the generated JSON that is sent to the 
server doesn’t contains any of these changes. 

If I make a copy of the entity, the changes are sent, but the problem is 
that my CustomerProxy contains many inner object and I have to make a huge 
proxy copying, which is bad, cause when I add a new property to the proxy, I 
have to add a logic that copies it. 

Any idea how this issue could be resolved ?

btw, The version of GWT which I’m using is GWT 2.4.0.RC1 

-- 
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/-/x281oZmenwIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Request Factory: Sending same proxy twice with different requests is causing changes to be dismissed

2011-08-23 Thread Miroslav Genov
I don't think that I could append RequestContext to another RequestContenxt 
which was already sent to the server. I thought that append() method is used 
for appending several RequestContext invocations into a single http round 
trip. I'm I right about this?

-- 
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/-/paZEAAdOaHYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Request Factory: Sending same proxy twice with different requests is causing changes to be dismissed

2011-08-23 Thread Miroslav Genov
Thomas, do you have any idea how this issue could be resolved? 

I'm still thinking that there should be some solution, cause 
load-edit-preview-save is a common workflow for document based 
application. 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/6NAw8WM22zEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Request Factory: Sending same proxy twice with different requests is causing changes to be dismissed

2011-08-23 Thread Miroslav Genov
I made that change in my example app and I'm encountering the same issue. 

Here is the commit of my change, also you can checkout the project and run 
it in hosted mode to see how the things are going. 

https://github.com/mgenov/injecting-request-factory/commit/e18e3bbaa70790935c77dc6be2ed5b5ee17ad350

Here is what I'm doing:

Change name of the customer to: newname
Hit preview button: Alert is displayed with newname
After that when I click the save button, then the server receives 
customer1, which is the original name of the customer that comes from the 
database (in my case my In memory implementation). 

-- 
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/-/u3VMVIl_UsgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Request Factory: Sending same proxy twice with different requests is causing changes to be dismissed

2011-08-23 Thread Miroslav Genov
I just made a simple ant build script, so you could run the application 
directly, without any IDE setup. To run it you only have to set up your path 
to the GWT SDK and type:

ant devmode

Hope this will help. 

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



MAC OS Lion: Hosted mode compilation succeed when Service class was renamed to ServiceFoo

2011-08-18 Thread Miroslav Genov
Hello, 
I'm encountering strange issue when using GWT 2.4 RC1. When I compile my app 
(from Intellij IDEA) the code is compiled to JS and everything is working 
like a charm. The problem occurs when I try to use the hosted mode browser. 
Here is the error that is printed in the hosted mode console:

  ERROR: Errors in 
'file:/Users/mgenov/Workspaces/idea/evoadm-current/src/com/evo/adm/service/shared/ServiceProxy.java'.
 
  ERROR: Line 4: Only a type can be imported. 
com.evo.adm.service.server.Service resolves to a package. 
  ERROR: Line 13: Service cannot be resolved to a type. 
ERROR: Unable to find type 
'com.evo.adm.contract.client.history.ContractHistoryViewWidget.ContractHistoryViewBinder'.
 
  ERROR: Hint: Previous compiler errors may have made this type 
unavailable. 
  ERROR: Hint: Check the inheritance chain from your module; it may not 
be inheriting a required module or a module may not be adding its source 
path entries properly. 

Here is the package structure: 

service.server.Service
service.shared.ServiceProxy

also my module contains source definition for the shared folder. 


When I rename Service class to ServiceFoo, the page is displayed correctly 
in hosted mode too. Does anyone have an idea what can cause this issue? 

On the latest version of linux everything is working 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/-/k0A0xowLW2EJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: MAC OS Lion: Hosted mode compilation succeed when Service class was renamed to ServiceFoo

2011-08-18 Thread Miroslav Genov
ops, forgot to mention the distribution name - ubuntu

-- 
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/-/CKRHWeTeevkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: MAC OS Lion: Hosted mode compilation succeed when Service class was renamed to ServiceFoo

2011-08-18 Thread Miroslav Genov
Now I just moved the Service class in the parent package ( service.Service ) 
and hosted mode is working 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/-/J1wy57lUfaEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Dynamically editing list of ValueProxies with ListEditor

2011-08-15 Thread Miroslav Genov
What version of GWT  you are using  ?

What happens if you try something like:

PhoneNumber p1 = request.create(PhoneNumber.class);
PhoneNumber p2 = request.create(PhoneNumber.class);

p1.setValue(234234234);
p2.setValue(12312);

p1.equals(p2) 

?

-- 
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/-/ienKaIPryj4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 use Mockito for testing Async calls?

2011-08-11 Thread Miroslav Genov
In my experience, using of mocking frameworks for testing of Async calls is 
not so good and tests are becoming un-readable at some point of time. In our 
app we are using Command Pattern to send different requests 
(Action/Response) and here is our helper class that we are using for 
testing: 

public class FakeRpcService implements RpcServiceAsync {

  public Action? lastAction;
  public AsyncCallback? lastCallback;

  public T extends Response void execute(ActionT action, 
AsyncCallbackT async) {
lastAction = action;
lastCallback = async;
  }

  public T T lastAction() {
return (T) lastAction;
  }

  public void responsesWith(Response response) {
// SMELL private members of simple object are referencing template 
members?
((AsyncCallbackResponse) lastCallback).onSuccess(response);
  }

  public void failsWith(RuntimeException e) {
((AsyncCallbackResponse) lastCallback).onFailure(e);
  }
}

so our tests now are looking like:

 @Test
  public void exportSelectedInvoices() {
ListInvoiceDto invoices = 
Lists.newArrayList(createInvoice(1,PaymentType.CASH));

// filter button was clicked
presenter.onReportRequested();
service.responsesWith(new GetInvoicesPeriodReportResponse(invoices));

presenter.onExportSelectedInvoices(new HashSetInvoiceDto());

GenerateAjurExportAction action = service.lastAction();
assertThat(the one selected invoice was not sent for 
export?,action.getInvoices(), is(equalTo(invoices)));

service.responsesWith(new GenerateAjurExportResponse(test test));
assertThat(export response was not 
displayed?,display.exportResponse,is(equalTo(test test)));
  }

Hope this will help you figure out what's the best choice for you.

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



Отг: Handling next and prev buttons of SimplePager ??

2011-08-09 Thread Miroslav Genov
If you are using GAE cursors, then I'm mostly sure that they are forward 
only cursors. So if you want to make your pager working, you had to keep all 
received cursors in a list, to move back. 

So

[page-1] -  cursor null 
hit next
[page-2] - cursor 1 
hit previous
[page-1] - cursor null 


[page-1] -  cursor null 
hit next
[page-2] - cursor 1 
hit next
[page-3] - cursor 2 
hit previous
[page-2] - cursor 1 (so when cursor2 is returned, you know how to move to 
page - 4, but don't know how to move to page 2.

-- 
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/-/5trJtiumaH8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Отг: Handling next and prev buttons of SimplePager ??

2011-08-09 Thread Miroslav Genov
*If i am keeping track of cursors, and what if i click last page arrow 
button, then how do i get the last 20(assume) values ??*

   - If we are talking in GAE context, in order to do that, you have to have 
   a reference to the last cursor. I don't think that there is a way on GAE to 
   retrieve the last cursor, so you can create a work-around over this by using 
   a background task which iterates over list of entities and store the first 
   and the last cursor values when new entity is added or existing is updated. 
   I don't think that this is a good idea, because if you have a millions of 
   rows then you have to use tons of CPU time to end this job, and the data 
   that user sees will be in inconsistent state.

Why the people that are using your app are going to use that functionality ? 
I think that simple text search could help them to lookup for the thing that 
they are looking or maybe some kind of filter to filter data rows. 


   - If are talking about SQL database, then I'm not sure why you ever have 
   to use cursors at all. 

*if i click prev arrow button then how do i display the last page(here i am 
understanding that pager holds the previous data so no need of call to the 
server).*

   - You can keep a reference to the last cursor position. 

To be honest, I'm not sure that GWT page functionality is made for GAE or 
any other datastore that is using cursors. Just pagination and cursors don't 
fit well together. 

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



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

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

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

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

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



GWT 2.3 - ie8 user agent is recognized as ie6

2011-06-23 Thread Miroslav Genov
Hello,
I'm encountering a strange issue which is causing IE8 user agent to be 
recognized as IE6. 

My app is compiled with:
set-property name=user.agent value=ie8 /

And my page contains the following definition:

meta http-equiv=X-UA-Compatible content=IE=8

But when I compile my app to js, the browser is showing alert that version 
of my app is for ie8, but my browser version is ie6, but my version of IE 
is 8.0.6001 and also the compatibility mode is disabled. Any idea what is 
causing this issue ? 

Also there is and another issue. If I have multiple user agents, the 
application generates only permutations for the latest one that is 
specified. Any idea how can I specify several permutations to be created ?
set-property name=user.agent value=ie8 /
set-property name=user.agent value=safari / 
// only safari is generated 

set-property name=user.agent value=ie8, safari /  // fails 
If I use the following definition, the UserAgentGenerator fails 
with BadPropertyValueException

-- 
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/-/9O5cGW7y3TwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 2.3 - ie8 user agent is recognized as ie6

2011-06-23 Thread Miroslav Genov
Here is header information that comes from my browser:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 
1.1.4322)


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



Broken editor type conversions in GWT trunk r10227

2011-05-26 Thread Miroslav Genov
Hello,
I'm trying to use trunk version of GWT but I'm encountering some conversion 
issues with the Editor framework. 

Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
java.lang.String
at 
com.google.gwt.text.shared.testing.PassthroughRenderer.render(PassthroughRenderer.java:1)
at 
com.google.gwt.user.client.ui.ValueBoxBase.setValue(ValueBoxBase.java:394)
at 
com.google.gwt.user.client.ui.ValueBoxBase.setValue(ValueBoxBase.java:389)
at 
com.google.gwt.editor.ui.client.adapters.ValueBoxEditor.setValue(ValueBoxEditor.java:106)
at com.google.gwt.editor.client.impl.Refresher.visit(Refresher.java:45)
at com.google.gwt.editor.client.impl.Initializer.visit(Initializer.java:49)
at 
com.google.gwt.editor.client.impl.AbstractEditorContext.traverse(AbstractEditorContext.java:128)
at 
com.clouway.requestfactory.app.client.CustomerEditor_RequestFactoryEditorDelegate.accept(CustomerEditor_RequestFactoryEditorDelegate.java:54)
at 
com.google.gwt.editor.client.impl.AbstractEditorContext.traverse(AbstractEditorContext.java:129)
at 
com.clouway.requestfactory.app.client.CustomerEditorWorkflow_DriverImpl.accept(CustomerEditorWorkflow_DriverImpl.java:6)
at 
com.google.gwt.editor.client.impl.BaseEditorDriver.doEdit(BaseEditorDriver.java:92)
at 
com.google.web.bindery.requestfactory.gwt.client.impl.AbstractRequestFactoryEditorDriver.edit(AbstractRequestFactoryEditorDriver.java:178)

The AbstractEditorDriverGenerator is generating different 
AbstractEditorContext for each property of the entity, so the following 
declaration:
  @UiField
  ValueBoxEditorDecoratorInteger age;

  Age:
  e:ValueBoxEditorDecorator ui:field=age
e:valuebox
  g:TextBox/
/e:valuebox
  /e:ValueBoxEditorDecorator

generates AbstractEditorContext for age field as 
@Override public Class getEditedType() { return java.lang.Integer.class; 
}
  @Override public java.lang.Integer getFromModel() {
return (parent != null  true) ? parent.getAge() : null;
  }

And here is the problem, the   TextBoxBase class is using the default 
PassthroghtParser (of type String)

protected TextBoxBase(Element elem) {
  super(elem, PassthroughRenderer.instance(), PassthroughParser.instance());
}
which is causing the provided exception. Any idea how I can make it working 
?

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



[gwt-contrib] Отг: Re: Broken editor type conversions in GWT trunk r10227

2011-05-26 Thread Miroslav Genov
Ah my mistake. Sorry about that post, but I wasn't sure where the problem is 
with my usage or some GWT issue. Thats why I posted it on both groups. 

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

RequestFactory updating issue: update entity which has fields that are not listed in the proxy interface

2011-05-25 Thread Miroslav Genov
Hello,

I'm encountering an issue with RequestFactory when I'm trying to update an 
entity which has properties that are not listed in the proxy objects. For 
example, in my case I have the following structure: 

Contract
  String contractCode; // gets/sets
  String serviceName; // gets/sets
  Date installationDate // get/sets - updated from external service, not 
from the UI

ContractProxy {
  String contractCode;  //gets/sets 
  String serviceName;  //gets/sets
}

and we have a service class ContractService: 
public class ContractService { 
  @Transactional
  public void updateContract(Contract contract) {
dataStore.get().storeOrUpdate(contract); // twig-persist dataStore 
object (GAE)
  }
}

So, the problem is that when contract is updated, the installationDate is 
set to null, cause RF's ContractProxy-Contract transformation doesn't have 
any information about that installation date. Was wondering how you guys are 
handling this situations ? 

I know that It could be done by copying and updating some of the properties, 
but why I have to use RF, when I have to do it manually ? 



-- 
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: RequestFactory updating issue: update entity which has fields that are not listed in the proxy interface

2011-05-25 Thread Miroslav Genov
I just wrote a small test in my sample project injecting-request-factory 
that explains for what I'm talking about. Here is the commit of changes:

https://github.com/mgenov/injecting-request-factory/commit/c7855f9bca9ae07982d7298af63350c697f2582b

Here is the source code of the test: 
https://github.com/mgenov/injecting-request-factory/blob/c7855f9bca9ae07982d7298af63350c697f2582b/test/com/clouway/testing/requestfactory/UpdateExistingEntityTest.java

Can you take a look whether I'm doing something wrong ?

-- 
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: RequestFactory updating issue: update entity which has fields that are not listed in the proxy interface

2011-05-25 Thread Miroslav Genov
I think that I found where is the problem. The problem is that I'm 
initializing my id locally and RF is checking whether you are doing that by 
using the EPHEMERAL placeholder. 

  /**
   * A placeholder value for {@link #clientId} to indicate the id was not
   * created locally.
   */
  public static final int NEVER_EPHEMERAL = -1;

So I have to load object first then I have to update it. The following 
change makes the things working:

 CustomerRequestFactory.CustomerRequest request = rf.customerRequest();
request.findCustomer(1l).to(new ReceiverCustomerProxy() {
  @Override
  public void onSuccess(CustomerProxy entity) {
CustomerRequestFactory.CustomerRequest editRequest = 
rf.customerRequest();

entity = editRequest.edit(entity);

entity.setName(test test);
entity.setVersion(2l);

editRequest.store(entity).to(new ReceiverVoid() {
  @Override
  public void onSuccess(Void response) {

  }
}).fire();
  }
}).fire();

Are there are any workarounds which I can use to lie RF that request was 
loaded ?

In my case object is loaded as in the example, but proxy values are copied 
from one proxy to another due some old bugs with RF  Editor integration. It 
seems that this copy functionality is broking everything. 

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



Attaching custom AutoBeanVisitor in the RequestFactoryServlet

2011-02-20 Thread Miroslav Genov
Does anyone knows if there are some plans RequestFactoryServlet to support 
adding of custom AutoBeanVisitor to the existing MessageFactory ?

-- 
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 2.2 and gwt-maps.jar not compatible

2011-02-14 Thread Miroslav Genov
You made a new build of gwt-maps ? 

-- 
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: CellTable and GAE Datastore cursors

2011-02-01 Thread Miroslav Genov
I think that they are not suitable each other, due the lack of rewind of 
datastore cursors, i.e you can seek to the next offset but you are not 
allowed to move back. To do that you have to make some kind of hack that 
keeps all previous cursor positions. For more information about paging you 
can take a look at 
http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine
 (Slide 
33-34). 

-- 
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 - Basic RequestFactory example

2011-01-19 Thread Miroslav Genov
Hello, 
Are you sure that all jar from lib folder are added in your classpath ? 

It seems that guice-servlet-3.0-rc1.jar is missing. 

Also you can check whether you have only one version of guice 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: GWT - Basic RequestFactory example

2011-01-19 Thread Miroslav Genov
In my example, dependency injection is used over the server side service 
classes, so I can inject into them other classes using DI. This gives me the 
ability to test my services in isolation and also few more advantages such 
as scopes and etc. 

-- 
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 - Basic RequestFactory example

2011-01-18 Thread Miroslav Genov
I had a small sample project that could help: 
https://github.com/mgenov/injecting-request-factory 

I don't know how simple is it, but it may help you some how. 

-- 
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 Session Handling - user HTTP Session or own solution?

2011-01-17 Thread Miroslav Genov
Sounds well.

Also you can use a cache layer over your database to slow down the latency 
of your database requests. 

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



Re: GWT Validation Framework

2011-01-17 Thread Miroslav Genov
You can take a look into DynatableRf example that comes with the SDK.

-- 
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: Compressing JSON?

2010-12-23 Thread Miroslav Genov

Are you sure that you have to transfer such amount of data to your client ?

Have you considered some kind of data separation or maybe some 
pagination technique ?  If you are returning so much data, this means 
that your users have to look into that data, which in most cases takes a 
lot of time.



On 12/23/2010 02:40 PM, shahid wrote:

My application uses .NET C# on the server side and GWT on the client
side/UI. I use JSON to interchange data between the UI and the server
and the server application is served by IIS 7.
There are situations when my JSON gets bigger and it causes a delay in
UI display. Is there a way that I can compress/decompress JSON and
would that be any helpful?



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



Re: Compressing JSON?

2010-12-23 Thread Miroslav Genov
Why you have to render trend on the client side ?

You probably could ask the server to render graphic as image, then you could 
render it using Image widget ?

This is just an idea, I don't know whether this is possible in your 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Why does GWT+JUnit take so long to start?

2010-07-27 Thread Miroslav Genov
 I suggest you to take a look into MVP pattern. It will speed things 
up. About the UI interface and visualization, you can take a look into a 
webdriver or selenium. Both of them may test user interactions with the UI.


On 27.7.2010 г. 09:53 ч., Felipe Baytelman wrote:

I'm implementing a big project using TDD, but it's becoming a real
pain:
JUnit takes 2 minutes to start the first test (basically, setting up).
Is there a way to speed up JUnit with GWT?

Thanks in advance,
--Felipe Baytelman



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



Re: GWT / GIN: Adding user class to all presenters

2010-06-30 Thread Miroslav Genov

Hello,

You can bind User object to a singleton provider that is retrieving user 
information. Here is what we are doing in one of our projects:


public class UserInfo {

  public static UserInfo with(String email, String firstname, String 
surname, String family) {

UserInfo info = new UserInfo();
info.email = email;
info.firstname = firstname;
info.surname = surname;
info.family = family;

return info;
  }

  private UserInfo() {

  }

  private String email;
  private String firstname;
  private String family;
  private String surname;

  public String getEmail() {
return email;
  }

  public String getFirstname() {
return firstname;
  }

  public String getFamily() {
return family;
  }

  public String getSurname() {
return surname;
  }
}


and also we have a provider class:

public class UserInfoProvider implements ProviderUserInfo {

  public UserInfo get() {
Dictionary userInfoDict = Dictionary.getDictionary(userInfo);

String email = userInfoDict.get(email);
String firstname = userInfoDict.get(firstname);
String surname = userInfoDict.get(surname);
String family = userInfoDict.get(family);

UserInfo userInfo = UserInfo.with(email, firstname, surname, family);
return userInfo;
  }
}

As you can see the provider is retrieving user information using 
Dictionary provided by GWT. Currently our main page is rendering user 
information as an in-line json that looks as follow:

script language=JavaScript
var userInfo = {
email: johnu...@somedomain.com,
firstname: John,
surname: ,
family: Smith
}
/script

And finally we are adding binding to the provider class:
bind(UserInfo.class).toProvider(UserInfoProvider.class).in(Singleton.class); 
// we are binding it as a singleton, cause we don't want to instantiate 
new UserInfo object each time when user info have to be rendered.


And here is a sample usage:

public class UserDetailsEditor {

@Inject
public UserDetailsEditor(UserInfo userInfo) {

   }
}


Regards,
  Miroslav
On 06/29/2010 06:23 PM, jmccartie wrote:

I have a hazy understanding of GIN, but have it working for injecting
presenters, etc.

I'm trying to inject a self-made User class into all my presenters
in order to get the currently logged-in user.

I've added @Inject to the constructor on my User class, and added User
to my GIN module ... but apart from that, I'm totally lost. Do I bind
it to my app presenter (tried that, but I get an error since User
doesn't extend my AppPresenter)? As a singleton? Is this even the
right way to get pass this data around?

I hate to post this here (not looking for free homework), but I can't
find a decent tutorial/example on this anywhere else.

Much thanks in advance.

   


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



Re: Adding widgets to PagingScrollTable

2010-06-20 Thread Miroslav Genov
If you have to use dynamic images, then you have to ask the server for a 
proper image to display it with Image.


For example:
String avatarUrl = userProfile.getAvatarUrl(); // it may point to 
http://myserver.com/avatar?id=101

Image avatar = new Image(avatarUrl);

but if you want to use a static image resources, then you can take a 
look into http://code.google.com/p/google-web-toolkit/wiki/ImageResource.



Regards,
  Miroslav


On 06/19/2010 05:52 PM, seakey wrote:

Hi,

I would like to add some gwt-widgets (e.g. like images) to
PagingScrollTable from google-web-toolkit-incubator. If my
understanding of it is correct, there must be an attribute in my
object for each cell of a row. So, if want to have widgets in my
table, there must be an attribute for this widget, i.e. there must be
something like

public Image getImage() {
return image;
}

public void setImage(Image image) {
this.image = image;
}

in my class.
But now, if I intend to serialize it via RPC, I get a
SerializationException, because Image isn't serializable.

So, isn't it possible, to add widgets to PagingScrollTable (with RPC-
stuff)? Or is there another way to do this?

   


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



Re: SuggestBox: how to change suggestions sort order?

2010-01-29 Thread Miroslav Genov


You have to extend SuggestOracle and to implement your own Oracle that 
is sorting your results as you like.



Regards,
Miroslav

forewar wrote:

Still cant find a solution. Is it possible at all?

  


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



Re: gwt-dispatch + how to access request.getRemoteAddr()

2010-01-03 Thread Miroslav Genov
Hello,
  If you wanna do this probably you would have to patch gwt-dispatch a 
little bit. But I'm not at 100% sure about that, cause I'm not familiar 
with that library.

  Guice Servlet allows injections of HttpServletRequest and 
HttpServletResponse classes in case your class is scoped to the request, 
i.e annotated with @RequestScoped or bounded to the RequestScope. More 
information can be taken from: 
http://code.google.com/p/google-guice/wiki/ServletModule at heading 
Available Injections.
 
  Everything is looking perfect until you take a look at the 
ActionHandlerModule (located in the gwt-dispatch library)
  
http://www.google.com/codesearch/p?hl=en#TaNPybfe7cM/trunk/src/main/java/net/customware/gwt/dispatch/server/guice/ActionHandlerModule.javaq=ActionHandlerModulesa=Ncd=1ct=rc

  and more closely in the bindHandler method which currently has the 
following implementation:
 
  protected A extends ActionR, R extends Result void bindHandler( 
ClassA actionClass,
Class? extends ActionHandlerA, R handlerClass ) {
bind( ActionHandlerMap.class ).annotatedWith( 
UniqueAnnotations.create() ).toInstance(
new ActionHandlerMapImplA, R( actionClass, 
handlerClass ) );
  }
 

  As you can see the ActionHandlerMap class is not bound to any scope 
which means that you are not allowed to inject HttpServletRequest and 
HttpServletResponse in your handler classes.

  Hope that this information will help you to solve this issue.

Regards,
  Miroslav


mariyan nenchev wrote:

 I don't think i understand you. I need to use getRemoteAddr() in my 
 execute method (from gwt-dispatch).
 On Sun, Jan 3, 2010 at 3:20 PM, philippe vonck...@yahoo.fr 
 mailto:vonck...@yahoo.fr wrote:

 You can used a simple http filter.

 On 3 jan, 12:46, mariyan nenchev nenchev.mari...@gmail.com
 mailto:nenchev.mari...@gmail.com wrote:
  Hi,
  I am using gwt-dispatch to implement my GWT-RPC calls. I need to
 get the
  remote address from the http request. But i don't have access to the
  request. With direct gwt rpc i would use
  getThreadLocalRequest().getRemoteAddr, but how to do it with
 gwt-dispatch?
  For my session management i use ProviderHttpSession
 sessionProvider. May
  be the same for HttpRequest?

 --

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



 --

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

--

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




Re: gwt-dispatch + how to access request.getRemoteAddr()

2010-01-03 Thread Miroslav Genov
Cool :)

I think that such usage is okay.

Regards,
  Miroslav


mariyan nenchev wrote:
 Thanks!
 I tried to inject ProviderHttpServletRequest and it worked, but i'm 
 not sure if this is the right approach. Hupa project for example 
 injects ProviderHttpSession and uses it for session management. May 
 be i have to look at the implementation, because it is like some magic 
 at this moment :).

 On Sun, Jan 3, 2010 at 6:12 PM, Miroslav Genov mgenov.j...@gmail.com 
 mailto:mgenov.j...@gmail.com wrote:

 Hello,
  If you wanna do this probably you would have to patch gwt-dispatch a
 little bit. But I'm not at 100% sure about that, cause I'm not
 familiar
 with that library.

  Guice Servlet allows injections of HttpServletRequest and
 HttpServletResponse classes in case your class is scoped to the
 request,
 i.e annotated with @RequestScoped or bounded to the RequestScope. More
 information can be taken from:
 http://code.google.com/p/google-guice/wiki/ServletModule at heading
 Available Injections.

  Everything is looking perfect until you take a look at the
 ActionHandlerModule (located in the gwt-dispatch library)

 
 http://www.google.com/codesearch/p?hl=en#TaNPybfe7cM/trunk/src/main/java/net/customware/gwt/dispatch/server/guice/ActionHandlerModule.javaq=ActionHandlerModulesa=Ncd=1ct=rc
 
 http://www.google.com/codesearch/p?hl=en#TaNPybfe7cM/trunk/src/main/java/net/customware/gwt/dispatch/server/guice/ActionHandlerModule.javaq=ActionHandlerModulesa=Ncd=1ct=rc

  and more closely in the bindHandler method which currently has the
 following implementation:

  protected A extends ActionR, R extends Result void bindHandler(
 ClassA actionClass,
Class? extends ActionHandlerA, R handlerClass ) {
bind( ActionHandlerMap.class ).annotatedWith(
 UniqueAnnotations.create() ).toInstance(
new ActionHandlerMapImplA, R( actionClass,
 handlerClass ) );
  }


  As you can see the ActionHandlerMap class is not bound to any scope
 which means that you are not allowed to inject HttpServletRequest and
 HttpServletResponse in your handler classes.

  Hope that this information will help you to solve this issue.

 Regards,
  Miroslav


 mariyan nenchev wrote:
 
  I don't think i understand you. I need to use getRemoteAddr() in my
  execute method (from gwt-dispatch).
  On Sun, Jan 3, 2010 at 3:20 PM, philippe vonck...@yahoo.fr
 mailto:vonck...@yahoo.fr
  mailto:vonck...@yahoo.fr mailto:vonck...@yahoo.fr wrote:
 
  You can used a simple http filter.
 
  On 3 jan, 12:46, mariyan nenchev nenchev.mari...@gmail.com
 mailto:nenchev.mari...@gmail.com
  mailto:nenchev.mari...@gmail.com
 mailto:nenchev.mari...@gmail.com wrote:
   Hi,
   I am using gwt-dispatch to implement my GWT-RPC calls. I
 need to
  get the
   remote address from the http request. But i don't have
 access to the
   request. With direct gwt rpc i would use
   getThreadLocalRequest().getRemoteAddr, but how to do it with
  gwt-dispatch?
   For my session management i use ProviderHttpSession
  sessionProvider. May
   be the same for HttpRequest?
 
  --
 
  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
 mailto:google-web-toolkit@googlegroups.com
  mailto:google-web-toolkit@googlegroups.com
 mailto:google-web-toolkit@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com
 mailto:google-web-toolkit%2bunsubscr...@googlegroups.com
  mailto:google-web-toolkit%2bunsubscr...@googlegroups.com
 mailto:google-web-toolkit%252bunsubscr...@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
 mailto:google-web-toolkit@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com
 mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

 --

 You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com
 mailto:google-web-toolkit@googlegroups.com

Re: listbox that contains widgets instead of just text..

2009-12-05 Thread Miroslav Genov
Ops. My mistake, wrong answer of the right question :).
 Sorry about that. 

 So I think that you could define your own custom widget that is using
several existing widgets that are looking similar to that you wanna
build.
 You could extend the Composite widget and to combine other several
widgets together on it. Here is some example that would make the things
more clear (note that code is not compiled and may contains some
mistakes):

 public class MyListBox extends Composite {
   private Button showListButton = new Button();
   private MyListBoxListItemsView items = new MyListBoxListItemsView();

   private HorizontalPanel container = new HorizontalPanel();
   
   public MyListBox(MyObject[] items) {
 initWidget(container);
 showListButton.setStyleName(myListBoxButton); // set background
image and etc
 this.items.addAll(items);

 showListButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent e) {
 if (!items.showed()) {
   items.showList();
 } else {
   items.hideList(); // second button click have to hide list
items
 }

}
 }) 
 container.add(items);
 container.add(showListButton);
   }
 }
 and so on. 

 Hope this will help you to solve your issue. 

 Also You can look at the showcase example:
http://gwt.google.com/samples/Showcase/Showcase.html 
You could use Basic Popup for showing and hiding list items to the
user.(i.e in my example:showListButton could show and hide the Basic
Popup widget with rendered items) 

 Another option would be using of existing js widget and binding them
through JSNI, but I think that it's a little bit harder then using GWT's
widget library.


  
Regards,
  Miroslav
On Fri, 2009-12-04 at 20:48 -0800, Jaimon wrote:
 hi, thanks for the help :-) really learned something.
 but my problem is more UI related, i would like to have something that
 looks like dropdown and inside there are widgets.
 sorry if my question was not clear..
 
 me
 
 On Nov 20, 7:44 am, Miroslav Genov mgenov.j...@gmail.com wrote:
  Hello,
   You could use MVP to make things much easier and to make client code to
  use only objects instead of primitive widgets such as listbox.
 
   Here is some example that could make things more clear:
 
   // this class should be used by your code
   class CustomerListBox {
  interface Display {
void addListBoxItem(String item);
void removeListBoxItem(Integer index);
//.
Integer getSelectedItemIndex();
  }
 
  private final Display display;
  private final ListCustomer customers = new ArrayListCustomer();
 
  public CustomerListBox(Display display) {
  this.display = display;
  }
 
  public void addCustomer(Customer customer) {
display.addListBoxItem(customer.getCustomerName());
customers.add(customer);
  }
 
  public Customer getSelectedCustomer() {
 return customer.get(display.getSelectedItemIndex());
  }
 
  public void go(HasWidgets parent) {
 parent.add((Widget)display);
  }
   }
 
   class CustomerListBoxDisplay extends Composite implements
  CustomerListBox.Display {
   private ListBox listBox = new ListBox();
 
   public CustomerListBoxDisplay() {
 initWidget(listBox);
   }
 
   public Integer getSelectedItemIndex() {
  return listBox.getSelectedIndex();
   }
   // and etc
 
   }
 
  CustomerListBox customerListBox = new CustomerListBox(new
  CustomerListBoxDisplay());
 
  customerListBox.addCustomer(new Customer(1));
  customerListBox.addCustomer(new Customer(2));
 
  Customer selectedCustomer = customerListBox.getSelectedCustomer();
  and etc
 
  Hope this would help.
 
  Regards,
Miroslav
 
  On Thu, 2009-11-19 at 14:05 -0800, Jaimon wrote:
   hi,
 
   i have need to create a listbox/drop down that create something other
   then just plain text,
   can some one show me how to do it? or tell me if it is possible to do
   it?
 
   regards
   Me
 
   --
 
   You received this message because you are subscribed to the Google Groups 
   Google Web Toolkit group.
   To post to this group, send email to google-web-tool...@googlegroups.com.
   To unsubscribe from this group, send email to 
   google-web-toolkit+unsubscr...@googlegroups.com.
   For more options, visit this group 
   athttp://groups.google.com/group/google-web-toolkit?hl=.
 
 --
 
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.
 
 


--

You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com

Re: listbox that contains widgets instead of just text..

2009-11-19 Thread Miroslav Genov
Hello, 
 You could use MVP to make things much easier and to make client code to
use only objects instead of primitive widgets such as listbox.

 Here is some example that could make things more clear: 
  
 // this class should be used by your code
 class CustomerListBox {
interface Display {
  void addListBoxItem(String item);
  void removeListBoxItem(Integer index);
  //.
  Integer getSelectedItemIndex();
}
 
private final Display display;
private final ListCustomer customers = new ArrayListCustomer();
  
public CustomerListBox(Display display) {
this.display = display;
}

public void addCustomer(Customer customer) {
  display.addListBoxItem(customer.getCustomerName());
  customers.add(customer);
}

public Customer getSelectedCustomer() {
   return customer.get(display.getSelectedItemIndex());
}

public void go(HasWidgets parent) {
   parent.add((Widget)display);
}
 }
 
 class CustomerListBoxDisplay extends Composite implements
CustomerListBox.Display {
 private ListBox listBox = new ListBox(); 

 public CustomerListBoxDisplay() {
   initWidget(listBox);
 }
 
 public Integer getSelectedItemIndex() {
return listBox.getSelectedIndex();
 }
 // and etc

 }

CustomerListBox customerListBox = new CustomerListBox(new
CustomerListBoxDisplay());

customerListBox.addCustomer(new Customer(1));
customerListBox.addCustomer(new Customer(2));

Customer selectedCustomer = customerListBox.getSelectedCustomer();
and etc

Hope this would help. 

Regards,
  Miroslav


On Thu, 2009-11-19 at 14:05 -0800, Jaimon wrote:
 hi,
 
 i have need to create a listbox/drop down that create something other
 then just plain text,
 can some one show me how to do it? or tell me if it is possible to do
 it?
 
 regards
 Me
 
 --
 
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=.
 
 


--

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




Re: GWT, MVP a beginner's question

2009-10-04 Thread Miroslav Genov

Hello,
  How you test the following snippet ?

  The following snippet is not following the Law of Demeter and I'm not 
sure that such usage is correct, because in your test if have to mock 
the display, the MyReusablePanel and the Display of MyReusablePanel.

Regards,
  Miroslav


Dave Pinn wrote:
 You would typically have one presenter and one view for each discrete
 part of the page. The idea is to componentise the parts of the page so
 that they can be re-used in a variety of contexts; for example: you
 might have a page navigation sub-panel that gets used on several
 pages.

 To re-use your panel do something like this:

   public MyContainingPresenter(MyContainingPresenter.Display
 display, MyReusablePanel subPanel) {
 ...
 display.setSubPanel(subPanel.getDisplay().asWidget()).
 ...
   }
 

   


--~--~-~--~~~---~--~~
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: MVC and JUnit - how to handle handlers?

2009-07-09 Thread Miroslav Genov

 You could create a mock view which is listening for such events. For 
example:
  
  class MockAddressView implements AddressView, 
HasValueChangeHandlers... {
  
  ..
  }
and in your test:

testUpdateUserDataNotifiesViewThatUserDataHasBeenUpdated() {
 HandlerManager eventBus = new HandlerManager();
AddressModel model = new AddressModel (eventBus);
final MockAddressView view = new MockAddressView(eventBus);
view.addValueChangeHandler(new ValueChangeHandler() {
void onValueChange(ValueChangeEvetString event) {
view.notified = true;
}
});

model.updateUserData();

assertTrue(view.isNotified());

}



Regards,
  Miroslav

 
corpios wrote:
 I'm designing an application following the MVC pattern.
 Each view have its own controller and model.
 The view know about the model and the controller. The controller know
 about the model.

 The Observer pattern is used to handle the model - view relation. The
 model notifies the view about changes in the model.

 When I try to unit test the application logic, i.e the controller and
 model, then I face a problem with the changehandlers. The model will
 try to update the view, but there is no view to update.. and as a
 result a NullPointerException is thrown.

 Does that tell me that I can't unit test application logic where the
 model send notifications to its observers? Or is there a better way to
 do this?

 BR
 Tor

 
   


--~--~-~--~~~---~--~~
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 architecture MVP/EventBus (mentioned at Google I/O)

2009-07-01 Thread Miroslav Genov
Using of
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/ui/HasWidgets.htmlis
a better idea. If HasWidgets interface is used then you can use the
presenter in a simple unit test without the extension of GWTTestCase cause
the Widget is provided to the HasWidgets's add method as an argument.

Regards,
  Miroslav


On Tue, Jun 30, 2009 at 11:12 PM, Jason A. Beranek
jason.bera...@gmail.comwrote:


 I've struggled with the go(RootPanel.get()) function as well, but
 discounted the idea of casting my Presenter.Display interface to a
 Widget as it removes an amount of type safety from the presenter and
 somewhat defeats the purpose of having a nice generic Display
 interface for the Presenter to interact with. One solution I've tried,
 which I think is promising, is to add a method to the Display
 interface that accepts the Panel object presented to the go function.
 For example,

 class ContactViewer{
  interface Display {
...
void showDisplay( Panel panel );
  }
  ...
  public void go( Panel panel ) {
this.display.showDisplay(panel);
  }
 }

 Using this method, a Widget based ContactViewer.Display can add itself
 to the supplied Panel object and Mocks can ignore the parameter for
 testing purposes. As showing the Display object would be part of UI
 testing anyway, this shouldn't effect test cases for the Presenter.

 Cheers,

 Jason

 On Jun 29, 4:19 pm, mabogie mabo...@gmail.com wrote:
  check this out:
 
  http://www.webspin.be/
 
  I left out the model (Phone class here) and the command pattern, since
  I'm not using it yet.
 
  For your comment on the casting: I'm having trouble with that too.
  When I want to attach the widgets to the root panel or whatever other
  panel, I can't do anything but cast them. But nobody seems to have a
  good solution...
 
  On 29 jun, 23:13, Daniel Jue teamp...@gmail.com wrote:
 
   Does anyone have a working MVP/Eventbus sample of something simple
   like the PhoneEditor?
   I don't think I'm doing it right.  The code from the IO presentation
   leaves out enough details so that I'm not sure what to do.
   For instance, in my Presenter.class,
 
   I have something like this:
   public class Presenter {
   ...
   private Display display;
   interface Display {
   HasClickHandlers getSaveButton();
   HasClickHandlers getCancelButton();
   HasClickHandlers getNumberField();
   HasClickHandlers getLabelPicker();
   }
   void editPhone(Phone phone) {
   this.phone = Phone.from(phone);
   display.getNumberField().setValue(phone.getNumber());
   display.getLabelPicker().setValue(phone.getLabel());
   }
   ...}
 
   Obviously, a HasClickHandlers object doesn't have a setValue method.
   It doesn't feel like I should be casting to the widget here, since we
   went through all the trouble of using the Display interface.
 
   I started looking at Mvp4g, but it seems to go off on a tangent with a
   code generation class to wire up presenters and views via xml.
 http://code.google.com/p/mvp4g/
   It's also intertwined with some mvc4g classes.
 
   I just want something basic that works, so I can seed my project from
   there.  A minimalist, working command style RPC example would be nice
   too.
   Anyone?  If you're in the DC area, I'll buy you a drink!
 


--~--~-~--~~~---~--~~
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: TextBox allow only numbers (gwt 1.6.4)

2009-06-26 Thread Miroslav Genov

In GWT 1.6 old listener api has been deprecated and were introduced new 
event system which is using handlers. More information about your case 
can be taken from:

 
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/event/dom/client/KeyPressHandler.html

 textBox.addKeyPressHandler and so on.

 Wish you good luck.

Regards,
  Miroslav

Dominik Erbsland wrote:
 I just saw that addKeyListener() is deprecated in gwt 1.6.4.
 Actually I just wanted to make a listener which checks the user input
 in a text box and allows only numbers.

 with gwt 1.6.4 I could not figure out how to do that since I should
 not use the keyboard listener anymore.
 any hints how I can check the input with the KeyUpHandler of gwt
 1.6.4?

 thanks in advance.
 
   


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



Re: Client side vs Server side models

2009-06-06 Thread Miroslav Genov

You don't have any problems to access client classes from server side 
code. Just put all your model classes into client package
and use them in the persistence layer.


Kwhit wrote:
 I'm building my first serious GWT app and am looking for a 'template'
 model to structure things. On the client side I need much the same
 objects to populate the UI as on the server side to handle
 persistence. Let's say I need Employee on the client side to edit
 employee details and then I need Employee on the server side to
 persist it.

 As I understand it client side objects must be located in the
 package client.* and persistent objects in ...server.*. Therefore
 I need two Employee.java files - with slightly different contents -
 the one on the client side acting more or less only as a value object.

 Have I got things right?

 
   


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



Re: Design pattern for db driven GWT application

2009-05-10 Thread Miroslav Genov

Hello,
  MVP or MVC may help you to solve this issue.

  Here is some MVP solution that I'm using in one of my projects.
 
  public interface CityDao {
void getAllCities(ApplicationCallbackListCity cities);
  }

  // may be tested without GWTTestCase
  public class CityDaoRpc implements CityDao {
private MyCityServiceAsync  service;
public CityDaoRpc(MyCityServiceAsync service) {
 this.service = service;
}
   
public void getAllCities(ApplicationCallbackListCity cities) {
 service.getAllCities(new AsyncCallbackListCity result) {
// dispatch onSuccess and onFailure
 }
}
  }

  public interface CityListView{
   void setSities(ListCity cities);
  }

  public class CityListViewWidget extends Composite implements CityListView{
  public CityListViewWidget (CityDao dao) {
   CitiesListPresenter presenter = new 
CitiesListPresenter(new CityListModel(), this, dao);

  
// all user actions are redirected to the presenter 
which may update the database and the model if it's necessary
presenter.onRowClicked(rowClicked)
 }
  }

  public class CityListModel{
  private ListCity cities;
  get/setters

   public void rowChanged(int row) {
   //fire event to the coordinator or to the presenter
   }
  }

public class CitiesListPresenter {
   public CitiesListPresenter (CityListModel model, CityListView, 
CityDao dao) {
  model.addCitiesUpdateHandler(new CityUpdateHandlerListCity() 
{ 
   void onCitiesUpdated(ListCity cities) {
   updateCitiesView(cities);
   }
  }
  dao.getAllCities(new ApplicationCallBackListCity() {
@Override
void onSuccess(ListCity result) {
 model.setCities(result);
}

void onFail(Throwable t) {
// handle some kind of error or create an abstraction of 
application class
}
   }
 
  }
 
   public void onRowClicked(int row) {
model.setClickedRow(row);
   }

  private void updateCities(ListCity city) {
   view.setCities(city);
  }
 
}

Advantages
1. Separation of business logic from the view
2. Easy testing with jmock ( also the async callbacks - 
http://www.jmock.org/gwt.html) without using of GWTTestCase
3. Code is low coupled and allows better reusing
4. Definition of a custom client side dao allows using of GWT-RPC, XML, 
JSON at the same time or using of different implementation
5. Most of the code is testable without hosted mode browser, i.e. tests 
are running fast
6. Views may communicate each other via custom business events - 
CityChangeSelectionEvent and etc.

Disadvantages
1. Code gets bigger in size
2. Widgets are not tested. For this you are free to use GWTTestCase or 
selenium. Both of them may help
3. Much more efforts for creation of unit tests
4. Much more classes. Much more module and etc, but it depends from the 
size of your project.

Hope this will help you in some way.

btw: If anyone has some suggestions about the design of the code, please 
let me know.

Regards,
  Miroslav
Neo wrote:
 Hi,
 I am working on a database driven GWT application. Now, in my client
 side I make RPC calls to basically fetch information from the
 databse.
 But the problem is that my client side code gets cluttered with RPC
 calls and onFailure methods and onSuccess methods. Along with this my
 UI code is also getting mixed up.

 How can avoid this problem ?

 I would like to put all my RPC calling logic in some sort of a
 delegate class and let the delegate class return the values to my
 Client class. But I doubt if that will work out as the return type of
 the onSuccess method is void :(

 To summerize, this is what I would like to have :
 Client (Design Layout, Call delegate method) 
 Delegate (make RPC calls, return value to Client) -
 Server (Implement DAO logic, return value to delegate)

 Is it possible to achieve this sort of a design with GWT apps ?


 Could you please suggest a suitable design pattern for GWT
 applications so that the application can be maintained with ease in
 future?

 
   


--~--~-~--~~~---~--~~
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: Navigation and Filtering

2009-05-05 Thread Miroslav Genov

Hello,

1) GWT is java-to-javascript compiler which means that GWT is only 
client code, not server code. Here you are talking about the scope of 
the server.
2) Here I think that there are two options. The first one is to have a 
single page with history support of GWT for navigation where the second 
option is
multiple pages which are including one or several GWT modules that are 
attaching widgets to some nodes of the generated DOM tree.
3) Server Issue. The choice is yours.

Regards,
  Miroslav

robin.muellerb...@googlemail.com wrote:
 Hi,

 I´m new to the GWT and made the Stockwatcher Tutorial yesterday.
 I´m actually developing JSF in an internship, but because of problems
 with Ajax I started evaluating GWT for our purposes. It would be nice
 if you could answer me some questions about the difference between JSF
 and GWT and if the GWT fits to our requirements.
 1) As in JSF, is it possible to have the 'Beans' in scopes ? (Session,
 Application or Request)
 2) Is it possible to define navigationrules ? In JSF, its possible to
 say if outcome on page one.jsp is 'yes', goto page two.jsp, else goto
 three.jsp.
 3) Is there a possibilty to implement a Loginfilter so that the
 session of the users can be handled ?

 Thanks for your help in advance !

 Best regards,

 Robin

 
   


--~--~-~--~~~---~--~~
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 1.6 Custom Event Handler

2009-04-30 Thread Miroslav Genov

Maybe one of the following articles will help you:
http://www.itsolut.com/chrismusings/?p=41
http://lemnik.wordpress.com/2009/03/04/gwts-new-event-model-handlers-in-gwt-16/
http://lemnik.wordpress.com/2009/03/12/using-event-handlers-in-gwt-16/

Regards,
  Miroslav

Micky wrote:
 Seems like the Observer pattern is the best way to create this
 functionality

 On Apr 27, 5:16 pm, Kelo mcac...@gmail.com wrote:
   
 I wrote a post like yours asking for a guidance or something that it
 can explain how I can create
 my own handlers and events, and how I can make a drag  drop using
 mouse handlers but my issue disappeared.

 On 27 abr, 17:55, Micky micky.johns...@gmail.com wrote:

 
 I’m building an application that is similar in layout to the Showcase
 example that is part of the GWT 1.6 install  - there is central
 DeckPanel that contains a number of content widgets and only one of
 these widgets can be displayed at any one time. However, whereas the
 content widget being displayed in the Showcase example is controlled
 by the Tree on the left of the screen, my content widgets need to
 cause other content widgets to display.
   
 I’d like to be able to fire an event (e.g. ChangeContentWidgetEvent)
 from the content widgets and then have an application level handler
 manage the change in the DeckPanel.
   
 Do I need to create a custom event for this? If so, can someone
 provide some guidance or good articles on doing so? Is there a better
 approach to what I’m trying to do?
   
 Thanks.
   
 
   


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



Custom DialogBox with close button in tittle (GWT1.6)

2009-04-28 Thread Miroslav Genov

Hello,
I have a problem with the DialogBox widget. I saw that there is a topic 
about this in the mail list but it's for the older versions of GWT 
(prior 1.6).

As I saw from the documentation and also at the source of the DialogBox 
it seems that it's not possible adding of a widget to the title bar. 
Thats why I tried to extend the dialog box and
to remove the old caption panel and to replace it with a new one. Here 
is a snippet from my code that is doing this:

super();
Element td = getCellElement(0, 1);
DOM.removeChild(td, ((UIObject) getCaption()).getElement());
HorizontalPanel vp2 = new HorizontalPanel();
DOM.appendChild(td, vp2.getElement());
adopt(vp2);
vp2.setStyleName(Caption);
HTML label = new HTML(Нов Договор);
Button b = new Button(X);
b.addClickHandler(new ClickHandler() {

@Override
public void onClick(ClickEvent event) {
NewSchoolContractDialog.this.hide();
}

});

vp2.add(label);
vp2.add(b);
vp2.setCellHorizontalAlignment(label, HasHorizontalAlignment.ALIGN_LEFT);
vp2.setCellHorizontalAlignment(b, HasHorizontalAlignment.ALIGN_RIGHT);
vp2.setWidth(100%);

Everything is looking as it has to but the problem is that the 
CllickHandler isn't invoked when X button is clicked. I think that the 
problem is caused by the original DialogBox. In the constructor of the 
DialogBox there are few lines which are registering few mouse events to 
the widget which probably is the reason that my handler is not working. 
Does anyone know how can I solve it? (Or maybe some better solution, 
because this acts as a hack).

Thanks in advance

Regards,
Miroslav

--~--~-~--~~~---~--~~
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 thought about GWT project structure

2009-04-02 Thread Miroslav Genov

Hello,

Which means that you are using java as a server side language ?
If yes, what library you are using for json ?

Regards,
  Miroslav

flyingb...@gmail.com wrote:
 Well my gwt project I seperated the client and server side. The main
 thing that is possible if it was one project is passing objects
 stright to the server.

 So my project use json to create objects when the client ask for stuff
 from the server.

 There might be ways to have the object passing but I not sure how to
 do that.

 On Apr 1, 12:27 pm, Ken kenxu...@yahoo.com wrote:
   
 In GWT recommended project structure, client code and server code are
 placed in one project. I find this structure is not so development-
 friendly in practice. (GWT 1.6 has some new update to the project
 structure to make it more like standard WAR project, but client and
 server code are still in one project.)

 Client code will be eventually compiled to Javascript and run on web
 browser. Server code will run on web server. These two parts of code
 shouldn’t reference to each other. The only connection between them
 should be the RPC interface (sub-interfaces of RemoteService) and DTOs
 (the Java objects get transmitted between client and server). Any
 attempt to let your widget reference to an RPC implementation Servlet
 or let the Servlet reference to a widget is wrong. However, your Java
 compiler (not GWT compiler) can not detect this kind of error, as
 these Java classes are all in the same project, and they are “allowed”
 to reference to each other. You can’t detect the error either in
 hosted mode, because client and server code run in same JVM in hosted
 mode. You only can find out half the issue when you call GWTCompiler
 (Compiler in GWT 1.6) to translate the client to Javascript. I say
 half because GWTCompiler only shows you the toxic references from
 client to server, but not the other way.

 A solution would be to have three projects instead of one:
 MyProjectRpc
 MyProjectGwt
 MyProjectWeb

 MyProjectRpc is a GWT module. It only contains RemoteService
 interfaces and DTOs. It has no UI or widgets.
 MyProjectGwt is your client module. It inherits MyProjectRpc, and
 contains widgets. MyProjectGwt’s Java build path includes
 MyProjectRpc.
 MyProjectWeb is your server project. It is a standard WAR project.
 Your RPC implementation servlets go here. Its Java build path includes
 MyProjectRpc.

 Therefore, both MyProjectGwt and MyProjectWeb reference to
 MyProjectRpc only. If your widgets incidentally reference to a
 servlet, Eclipse (Java compiler) will tell you right away.

 To make above solution work, you need to configure GWTCompiler to
 output to MyProjectWeb instead of the default folder www. (-out
 argument will do the job.) You also need to run your own web server
 for hosted mode instead of GWT’s internal Tomcat. (Pass –noserver to
 GWTShell.)

 There may be better way to do it. Please share your idea for a better
 project structure. I would appreciate if developers from Google could
 provide advice.
 
 
   


--~--~-~--~~~---~--~~
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: Connecting GWT and PHP

2009-03-29 Thread Miroslav Genov

Hello, 
 Any of the following links may help you to find a way to do it:

 http://code.google.com/support/bin/answer.py?answer=65632topic=11368 
http://code.google.com/support/bin/answer.py?answer=65632topic=11368
 http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/DevGuideHttpRequests

Regards,
  Miroslav
scottland.yo...@googlemail.com wrote:
 Hello Folks,

 I was wondering how to send a string varible to a php script from my
 google webtoolkit code.

 i.e. I want to append a string to a php url so that the php script can
 take that string and query the yahoo or delicious api.

 I'm using wamp and as GWT is on localhost: and wamp is on
 localhost, I'm not sure how if I will be unable to do this because of
 the same origin policy.

 Help would be greatly appreciated,

 Thanks,

 Scott.
 
   


--~--~-~--~~~---~--~~
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: Connecting GWT and PHP

2009-03-29 Thread Miroslav Genov

Why you wanna do this ?

Probably this is what you are looking for: 
http://code.google.com/support/bin/answer.py?answer=87509topic=10454 
http://code.google.com/support/bin/answer.py?answer=87509topic=10454

Regards,
 Miroslav

scottland.yo...@googlemail.com wrote:
 Ok thanks, I understand that I can use request builder now.  Is there
 a way to host php files on the same server utilised by google web
 toolkit localhost:.

 On Mar 29, 5:50 pm, Miroslav Genov mgenov.j...@gmail.com wrote:
   
 Hello,
  Any of the following links may help you to find a way to do it:

  http://code.google.com/support/bin/answer.py?answer=65632topic=11368
 http://code.google.com/support/bin/answer.py?answer=65632topic=11368
  http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/DevGuideHttp...

 Regards,
   Miroslav

 scottland.yo...@googlemail.com wrote:
 
 Hello Folks,
   
 I was wondering how to send a string varible to a php script from my
 google webtoolkit code.
   
 i.e. I want to append a string to a php url so that the php script can
 take that string and query the yahoo or delicious api.
   
 I'm using wamp and as GWT is on localhost: and wamp is on
 localhost, I'm not sure how if I will be unable to do this because of
 the same origin policy.
   
 Help would be greatly appreciated,
   
 Thanks,
   
 Scott.
   
 
   


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



GWT Style and Comments

2009-02-20 Thread Miroslav Genov

Hello,
 I have question regarding the code style that is used by the GWT team. 
I know it's not GWT specific question but it is connected.  In the 
http://code.google.com/webtoolkit/makinggwtbetter.html
there is  a guide for formatting and structuring the code and here is 
small quote from it:

   1. public
   2. protected
   3. default
   4. private


What is the reason this modifiers to be in this order ?

First thought that come in my mind was about the javadoc but when I 
tested I saw that the standart javadoc tool that comes with the JDK is 
sorting them regarding this order in the documentation and I'm not sure 
that this is the real reason.

For some of my work I'm placing the private members after the public 
modifiers, because they are connected in somehow and If I have to modify 
something they are close each other in the source and it's easy to 
modify both of them without any scrolling and etc.


Regards,
  Miroslav

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



Google Security and GWT

2009-01-25 Thread Miroslav Genov

Hello, 

 I have a question regarding the security that is using google with GWT.
Does anyone can give some small overview of the design or maybe an
article about the security mechanism that is using google with GWT. 

 I'm asking this questions here, because I'm trying to create a small
security library for GWT which shall provide an easy way for securing of
GWT Server side code. I'm on the part where I have to find a secure way
for generation of a sid value and to define some interfaces for
authentication and for checking whether the SID that comes from the
client code is same as the SID stored in the database or some any other
kind of storage. Thats why I've spent some time to understand how google
health application security was realized. 

After a little sniffing on google healh application I found that there
are a lot of cookies values that are sent to the server. But the think
that really confused me was the SID value:
=DQAAAHoG8ODKHiiDYoiMJbU2-1sCJ7MsdDG7jpcxDKuTTTK20R9XKuRsUThI-d4xfC8SsqNz5k2VYwi0m1Ilgu_NBsh08oCorcezDdZ0YxYZgTQy79MBsdFcPE9ee61Uafl8iRLsj_EHnbXTXCoYrQz33UvKRh4yAMq3SwrL9M573zEwyw

Does anyone know the algorithm that generates this sid?


From that article
http://groups.google.com/group/Google-Web-Toolkit/web/security-for-gwt-applications

I found that to secure a single service method you have to add the sid
value as a parameter to the service method.

If you are using GWT's RPC mechanism, the solution is unfortunately not
quite as clean.  However, there are still several ways you can
accomplish it.  For instance, you can add an argument to each method in
your RemoteService interface that contains a String.  That is, if you
wanted this interface: 

Should all of service methods always use this pattern? Or maybe there is
a secure way to do that with cookie? 

The idea which I'm currently have is to filter the incoming data with a
servlet filter and in the filter to inject ( Google Guice ) the logic
that checks the sid value with the value in the storage. If the value is
matching the application will call the doFilter method and fill force
the request to be completed. When the value is not matching then the
application may throw an exception that the user that is trying to
access this service is not authorized to do that. 



Regards,
  Miroslav


--~--~-~--~~~---~--~~
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: Google Security and GWT

2009-01-25 Thread Miroslav Genov

Hello Matt, 

  Yeah, I know that it will work, but I'm not sure that this is at 100%
the right way and also a secure way.Thats why I was looking for opinions
and suggestions from other developers about this issue. 


Regards,
  Miroslav

On Sun, 2009-01-25 at 10:00 -0800, hazy1 wrote:
 Hi,
 
 I do what you describe (servlet filter).  It works OK.
 
 Regards,
 
 Matt
 
 On Jan 25, 11:59 am, Miroslav Genov mgenov.j...@gmail.com wrote:
  Hello,
 
   I have a question regarding the security that is using google with GWT.
  Does anyone can give some small overview of the design or maybe an
  article about the security mechanism that is using google with GWT.
 
   I'm asking this questions here, because I'm trying to create a small
  security library for GWT which shall provide an easy way for securing of
  GWT Server side code. I'm on the part where I have to find a secure way
  for generation of a sid value and to define some interfaces for
  authentication and for checking whether the SID that comes from the
  client code is same as the SID stored in the database or some any other
  kind of storage. Thats why I've spent some time to understand how google
  health application security was realized.
 
  After a little sniffing on google healh application I found that there
  are a lot of cookies values that are sent to the server. But the think
  that really confused me was the SID value:
  =DQAAAHoG8ODKHiiDYoiMJbU2-1sCJ7MsdDG7jpcxDKuTTTK20R9XKuRsUThI-d4xfC8SsqNz5k2VYwi0m1Ilgu_NBsh08oCorcezDdZ0YxYZgTQy79MBsdFcPE9ee61Uafl8iRLsj_EHnbXTXCoYrQz33UvKRh4yAMq3SwrL9M573zEwyw
 
  Does anyone know the algorithm that generates this sid?
 
  From that article
 
  http://groups.google.com/group/Google-Web-Toolkit/web/security-for-gw...
 
  I found that to secure a single service method you have to add the sid
  value as a parameter to the service method.
 
  If you are using GWT's RPC mechanism, the solution is unfortunately not
  quite as clean.  However, there are still several ways you can
  accomplish it.  For instance, you can add an argument to each method in
  your RemoteService interface that contains a String.  That is, if you
  wanted this interface:
 
  Should all of service methods always use this pattern? Or maybe there is
  a secure way to do that with cookie?
 
  The idea which I'm currently have is to filter the incoming data with a
  servlet filter and in the filter to inject ( Google Guice ) the logic
  that checks the sid value with the value in the storage. If the value is
  matching the application will call the doFilter method and fill force
  the request to be completed. When the value is not matching then the
  application may throw an exception that the user that is trying to
  access this service is not authorized to do that.
 
  Regards,
Miroslav
  


--~--~-~--~~~---~--~~
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 + SPRING + HIBERNTE

2009-01-17 Thread Miroslav Genov

Hello, 
  There are few examples located on springbyexample.org:
http://www.springbyexample.org/twiki/bin/view/Main/ExamplesHome

  But I'm not sure where the site contains any examples with GWT and
Hibernate. But for the hibernate you may use DTO ( Data Transfer Object)
pattern to transfer data between the client and the server and also you
may check Gilead ( http://noon.gilead.free.fr/gilead/ ) - the old name
was hibernate4gwt. 

  Hope that this information will help you find how to use them
together.


Regards,
  Miroslav

On Sat, 2009-01-17 at 18:37 -0800, Yossi wrote:
 Hello,
 
 I am looking for a template or sample project that will enable me to
 use GWT + SPRING + HIBERNATE.
 Also it would be great if it will contain a session management with
 authentication (register/login).
 
 As I see it, this is the infrastructure of the application and I don't
 want to make mistakes there.
 
 I searched the web a lot and didn't find anything useful.
 
 Thanks,
 Yossi
  


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



GWT and Business Intelligence.

2009-01-12 Thread Miroslav Genov

Hello ,
   I have a question regarding using of GWT for the creation of a
intranet system for business intelligence. Is GWT good for creation of
such application ?

   I know that the question is complex, but I'm asking it because I
don't know whether I'll have problems with the implementation of some of
the general purpose things that are main for such application. By main
things I mean: exporting types, charts, tabular structure visualization
and etc.

   I hope that there are people in this forum that are having such
experience.


Regards,
  Miroslav


   



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



JSON Mashups

2008-12-02 Thread Miroslav Genov

Hello guys,
 Currently I'm trying to use JSON  mashups in my application, but I'm 
falling on an issue with the binding and validation of the data objects. 
In another web project I was used simple POJO objects and the binding 
was implemented in this way:

public void setFirstName(String firstName) {
String old = this.firstName;
this.firstName = firstName;
changes.firePropertyChange(firstName, old, firstName);
}


And here is the question, how can I do this with JavaScriptObjects when 
my method stubs are looking like:
 public final native String getName() /*-{ return this.name; }-*/;
 public final native void setName(String name) /*-{ this.name = name; }-*/;


Probably I have to use some JSNI magic :).

Does anyone have an idea how to do this ?. Or some better solution for 
binding and validation of such an objects.

Thanks in advance


Regards,
  Miroslav

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: JSON Mashups

2008-12-02 Thread Miroslav Genov

This is a good solution. I like it.

Thanks for the support.

Regards,
  Miroslav

Shawn Pearce wrote:
 How about doing your setName like this:

   public void setFirstName(String firstName) {
 String old = getFirstName();
 setFirstNameImpl(firstName);
 changes.firePropertyChange(firstName, old, firstName);
   }
   private final native void setFirstNameImpl(String fn)/*-{ 
 this.firstName = fn; }-*/;

 ?  Yes, it take an extra method to jump into the JSNI, but the 
 compiler will erase that indirection anyway when it builds the 
 JavaScript.  Your only penalty is the slightly longer code to write 
 for each bound property method.


 On Tue, Dec 2, 2008 at 09:45, Miroslav Genov [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:


 Hello guys,
  Currently I'm trying to use JSON  mashups in my application, but I'm
 falling on an issue with the binding and validation of the data
 objects.
 In another web project I was used simple POJO objects and the binding
 was implemented in this way:

 public void setFirstName(String firstName) {
String old = this.firstName;
this.firstName = firstName;
changes.firePropertyChange(firstName, old, firstName);
 }


 And here is the question, how can I do this with JavaScriptObjects
 when
 my method stubs are looking like:
  public final native String getName() /*-{ return this.name
 http://this.name; }-*/;
  public final native void setName(String name) /*-{ this.name
 http://this.name = name; }-*/;


 Probably I have to use some JSNI magic :).

 Does anyone have an idea how to do this ?. Or some better solution for
 binding and validation of such an objects.

 Thanks in advance


 Regards,
  Miroslav




 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: php usage with gwt

2008-11-07 Thread Miroslav Genov

Hello,
Yes, it will if you are talking for non hosted mode. If you are 
talking about the hosted mode, you have to take a look at the 
documentation how to deploy the application to an external server.
 
Regards,
  Miroslav


tapan wrote:
 If i rename the .html to .php file will it work

 

   


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



GWT + Jetty + Maven

2008-11-07 Thread Miroslav Genov

Hello guys,

  I was wondering if there is a way to configure maven to deploy on 
jetty gwt code without recompile of client classes, i.e. with using of 
excludes in the scanTargetPattern configuration. Currently I'm having a 
completed set up of GWT with maven and jetty and I'm trying to  speed up 
the redeployment of the static content in hosted mode. At the moment 
I've tried two types of deployment:

Packaging of the application and running jetty with webdir pointing to 
the target directory.  To do that I'm executing the following command:
/mvn package jetty:run -Dwebdir=target/myapp-0.0.1-SNAPSHOT//

When I deploy my application and I change some of the html files, the 
application doesn't refreshes them. The problem is obvious - html pages 
are not redeployed to the target directory on save. Here I want to 
mention that I'm using eclipse as a development environment and maven 
goal's are started from eclipse.

The second situation is when jetty is started with webdir pointing to 
the src/main/webapp/. In this case the static content and jsp page are 
reloading like a charm but the problem is that when I change some GWT 
class Jetty reloads the context. Currently it is done for a few seconds 
but If I add few more libraries to my project like hibernate and spring 
this time will be much longer than now.

I've tried to exclude the client classes with the followed pattern:
scanTargetPatterns
scanTargetPattern
 directorytarget//myapp-0.0.1-SNAPSHOT///directory

excludes
exclude**/Admin.class/exclude
   
/excludes  
/scanTargetPattern
/scanTargetPatterns

But this pattern is not working correctly. I don't know where exactly is 
the problem. Probably I'm doing something wrong or maybe I'm missing 
some step.

Hope that someone can help. Thanks in advance.

Regards,
  Miroslav


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: ANN: SL 0.1.5a released

2008-09-09 Thread Miroslav Genov

Hello,
  Thanks for the good news :). I'm glad that this library now is 
integrated with the latest version of GWT.

  Thanks for the announcement.

Regards,
 Miroslav

George Georgovassilis wrote:
 Dear All

 We have recently released version 0.1.5a of the SL which is mainly a
 compatibility release for GWT 1.5 and Hibernate4GWT. For those of you
 who are new joiners, the SL is a sister project of the GWT-Widget
 Library [1] aimed at integrating the Spring framework via RPC with GWT
 through binding POJOs transparently to the RPC protocol.

 [1] http://gwt-widget.sourceforge.net/
 

   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Need help on writing test cases for asynchronous call backs.

2008-09-09 Thread Miroslav Genov

Hello,
 The main test class GWTTestCase contains two method which are used in 
this situation: delayTestFinish() and  finishTest. The first tells on 
the test to wait some time to allow on async callback to be executed 
where the second tells on the test class to end it's execution. To see 
more information about this methods, please check the java doc.

 I hope that my explanation has made the things more clear for you.

Regards,
  Miroslav

neversaydie wrote:
 Hello,

  I am facing a issue while writing a test cases for asynchronous call
 back through my http servlet.

  Problem is all my test cases fail because the response sent by the
 servlet will be delayed for some time since we are dealing with the
 asynchronous call backs.

  can somebody suggest me on how to write test cases for these
 servlets ?

  Thank you


 

   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: compilation time of GWT 1.5 with Intellij on OS X 10.5

2008-09-08 Thread Miroslav Genov

Hello,
 
  I have the same problem on windows vista with IntelliJ 8.0M1. Probably 
the same issue.
 
  I hope that anyone knows what causes the problem.

Regards,
  Miroslav

Peter Gershkovich wrote:
 I started using GWT 1.5 and noticed greatly increased compilation
 time. I am using IntelliJ 7.04 on Mac OS X (10.5 on Intel platform)
 and the compilation takes very long time.
 Are there ways to improve that process?



 

   


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