Re: GWT and Web Cam

2012-12-07 Thread Daniel Mauricio Patino León
May bad. I should have quoted to Christopher.

Sorry.

Webrtc it's nice, but, what we do with the down fall back on other browsers.





2012/12/7 Alberto Mancini ab.manc...@gmail.com

 Thanks,
 actually I do not want a dependency on flash but in case your project will
 be our first test :)
 My target, in the post I cited ,was doing 'capture' in javascript only so
 the real interest was on
 WebRTC, but I suppose Christopher will certainly like the project.

 Looking at the code adding webrtc support to the lib may be not so
 terrible just in case one
 want to use 'native' support when available and flash as a fallback, don't
 know if may be useful.


 Ciao,
Alberto.

 On Sat, Dec 8, 2012 at 1:40 AM, Daniel Mauricio Patino León 
 ceo.lion@gmail.com wrote:

 Hey Alberto.

 Use http://code.google.com/p/gwt-webcam/

 I just finished a project where i used it and works very well.

 It wraps the JSWebcam library, i add an example widget using it.

 Best regards


 2012/12/7 Alberto Mancini ab.manc...@gmail.com

 Hi Christopher,
 accessing the webcam is something the browser may be unable to do:
 recent browsers (just chrome afaik) that implement WebRTC's getUserMedia
 (http://www.webrtc.org/)  may provide access to the stream coming from
 the webcam,
 else you're forced to use a plugin, for instance flash.

 If you want to use WebRTC, moving to  GWT 2.5 and Elemental is in my
 opinion a good choice.
 If you want, you can find some info here
 http://jooink.blogspot.it/2012/11/gwt-augmented-reality-howto-step-2.html
 (just the first few lines, up to the copy into a canvas, then canvas's
 toDataURL() will give you the snapshot).

 Ciao,
Alberto.

 On Thu, Dec 6, 2012 at 8:53 AM, Christopher sahayachristop...@gmail.com
  wrote:

 Hi All,

  My GWT version is 2.4.0

 My Query is , In my application  a requirement to capture images
 through webcam . What is the best way to do it.

 Thanks,
 Christopher

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


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




 --
 ISC. Daniel Mauricio Patiño León.
 Director ejecutivo
 Liondev S.A. de C.V.



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


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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: Activities and places with MVP approach question

2012-12-05 Thread Daniel Mauricio Patino León
Hi Joseph i am not trying to move the backend things on AP i meant the
actions of the user.

Some user could bookmark the place of edit, create or read  Products,  for
example.

The place and activity per action.

/#Addproduct:
/#Editproduct:1312
/#Readproduct:

or just one place different activities.

/#Product:Read
/#Product:New
/#Product:Edit-1312




2012/11/26 Jesse Hutton jesse.hut...@gmail.com

 I have previously used one activity for C and U, and another for R (and
 D). It basically came down to the fact that the views were mostly the same
 between those pairs, so they could be reused and the activity (and
 presenter) could figure out the details and which controls to show based
 the action information the place (which you can get away with having one
 of). In addition, I also had a list activity for a total of 3 activities
 for each entity type.

 Jesse


 On Sun, Nov 4, 2012 at 1:50 PM, Daniel Mauricio Patino León 
 ceo.lion@gmail.com wrote:

 I recently started a new project usign Activities and palces with mvp.
 Now i have a quiestion of approach.

 Example:

 Employee CRUD

 Activity and place for each operation C, R, U

 One place differente activities for operations C, R, U.

 what you guys suggest to use and why?

 many thanks

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


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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: SuperDevMode not so super

2012-11-14 Thread Daniel Mauricio Patino León
It's to sad that if i want to change a small line of code, like css on 
uibinder i need to recompile all the project.

Plus JSR 303 Validation annotations aren't compiled in superdev mode i will 
put a issue

El miércoles, 14 de noviembre de 2012 02:24:35 UTC-6, StefanR escribió:

 In a larger GWT multi project app and it took me several hours to get the 
 new SuperDevMode running (I found this 
 videohttp://jeff-davis.blogspot.de/2012/07/setting-up-gwt-25s-superdevmode.htmlvery
  helpful).
 Now, I'm a bit disappointed about the coolest new feature of 2.5 and I 
 wonder if I have missed something.

- Compilation is slow. It takes between 1 and 2 minutes plus the 
bootstrap time of my server app. The app has sth above 20k LOC and heavily 
uses RequestFactory and GIN code generators, maybe that's the reason? So 
overall startup performance is worse than with standard DevMode.
- Code changes require a recompile. In DevMode non-structural changes 
are applied automatically by the Eclipse Debugger.
- Debugging the code in the Browser is ... hm, it works. But honestly, 
nothing compare to a IDE debugger. Browsing through the source tree in 
Chrome is a pain with thousands of classes.
- GWT CodeServer is very resource intensive. During compilation, I 
cannot use my machine for anything else. If it's running it takes more 
 than 
1GB of RAM.

 Is anyone successfully using SuperDevMode for larger apps?


-- 
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/-/AMpYpWpT0zYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Drag and Drop Tutorial

2012-11-12 Thread Daniel Mauricio Patino León
Thanks for sharing.

2012/11/12 Jamie jamiesharbor-sou...@yahoo.com

 Hi,

 I required Drag and Drop for a project I am working on.
 I couldn't find a lot of info on it, so I wrote a tutorial on how to add
 Drag and Drop to a Tree, using GWT 2.4+'s built-in DnD.

 You can read the tutorial here:
 http://jamies-gwt.blogspot.ca/2012/11/gwt24-drag-drop-in-tree.html

 I hope it helps somebody out!

 Jamie.

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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 JSR 303 and setConstraintViolations() wrong Path name bug ?

2012-11-12 Thread Daniel Mauricio Patino León
Hello there today i am almost finish with a medium complex EntityProxy 
editor module.

But now seems that i found a new hole or don't know why this happens.

This the proxy scenario:

in ProductoProxy i have:

@Valid
public ImpuestoProxy getImpuesto();
@Valid
public ImpuestoProxy getIeps();

whose are @Embedded pojos.

Then on the ImpuestoProxy i have properties that need be validated 
differently when it is Impuesto or Ieps so i created a ImpuestoGroup and 
ImpuestoIepsTasaGroup marker interfaces to validate differently using the 
same Editor (see below why):

@NotNull(message=notNull, groups = {ImpuestoGroup.class, 
ImpuestoIepsTasaGroup.class}) /*so be validated when it;s Impuesto or Ieps 
*/
@DecimalMin(value=0.0, message=decimalMin:0.0, groups = 
{ImpuestoGroup.class, ImpuestoIepsMontoGroup.class})
public Double getTasaImpuesto();

@NotNull(message=notNull, groups = {ImpuestoIepsMontoGroup.class}) /* 
so be validated when it's type is Impuesto only */
@DecimalMin(value=0.0, message=decimalMin:0.0, groups = 
{ImpuestoIepsMontoGroup.class})
public BigDecimal getMontoImpuesto();

...

Plus i need let user choose predefined valueproxy so i used a:

public class UiOptionalValueListBoxImplT, E extends EditorT extends 
UiBaseBox implements IsEditorOptionalFieldEditorT, E{
   ...
}

So when the user edits a getImpuesto() and then want to save it i check for 
constraints  in this manner:

   driver.flush();

   ImpuestoProxy proxy = productoProxy.getIeps(); 

   /* Here i cannot validate the whole ProductoProxy because some 
constraints fails due my custom groups. 
   *  so i need validate only the @Embedded proxy
   */   
   Set constraints = AddProductViewImpl.this.validator.validate(proxy, 
proxy.getTipoIeps().equals(TipoIeps.MONTO) ? ImpuestoIepsMontoGroup.class : 
ImpuestoIepsTasaGroup.class);

   if(!constraints.isEmpty()){
  driver.setConstraintViolations(constraints);
   }

   logger.log(Level.INFO, After the flush we got 
+driver.getErrors().size());

In my Editor of ImpuestoProxy view i have my own validation ui framework 
(user ui messages, etc ...) and to identify a property who us failing i use 
their path then i compare with the path reported by ListEditorError 
reported by the main driver.

The problem becomes here. The next behavior happens:

IsEditorValueBoxEditorT report path ok 
foo.bar.client.view.Products.ImpuestoEditorImpl INFO: On the sub view we 
got: ieps.unidadImpuesto notNull 

but IsEditorTakesValueEditorT and IsEditorLeafValueEditorT don't

foo.bar.client.view.Products.ImpuestoEditorImpl INFO: On the sub view we 
got: iepstipoIeps notNull 

foo.bar.client.view.Products.ImpuestoEditorImpl INFO: On the sub view we 
got: iepsnombreImpuesto notNull 

As you can see there is missing . on the path name. ( iepsnombreImpuesto 
should be ieps.nombreImpuesto )

Plase note if i validate the whole ProductoProxy  the paths are reported 
fine

Don't know it the conversion from 
driver.setConstraintViolations(constraints); to ListEditorError fails or 
it's the validation who reports badly the path. Will try atm.

Please help me.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/to-czZXXX2YJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 JSR 303 and setConstraintViolations() wrong Path name bug ?

2012-11-12 Thread Daniel Mauricio Patino León
I just confirm that seems to be a bug ? on the conversion of

driver.setConstraintViolations(constraints) to ListEditorError in the 
Editor framework

the jsr 303 reports like this:


Mon Nov 12 21:29:55 GMT-600 2012 foo.bar.client.view.BaseViewImpl INFO: 
tipoIeps

Mon Nov 12 21:29:55 GMT-600 2012 foo.bar.client.view.BaseViewImpl INFO: 
unidadImpuesto 

Just to complement the information i have my subeditors in this manner in 
my Top editor :

public class AddProductViewImpl extends BaseViewImpl implements 
AddProductView, EditorProductoProxy{

@UiField(provided=true)
UiOptionalValueListBoxImplImpuestoProxy,ImpuestoEditorImpl impuesto = new 
UiOptionalValueListBoxImplImpuestoProxy,ImpuestoEditorImpl(new 
RendererImpuestoProxy() {

@Override
public String render(ImpuestoProxy object) {
return object != null ? (object.getNombreImpuesto() != null ? 
object.getNombreImpuesto() : n/d) : Seleccione un impuesto;
}

@Override
public void render(ImpuestoProxy object, Appendable appendable) throws 
IOException {
render(object);
}
}, new ImpuestoEditorImpl(true));
...
}

public class UiOptionalValueListBoxImplT, E extends EditorT extends 
UiBaseBox implements IsEditorOptionalFieldEditorT, E {
...
} 


Thank you.


El lunes, 12 de noviembre de 2012 21:26:45 UTC-6, Daniel Mauricio Patino 
León escribió:

 Hello there today i am almost finish with a medium complex EntityProxy 
 editor module.

 But now seems that i found a new hole or don't know why this happens.

 This the proxy scenario:

 in ProductoProxy i have:

 @Valid
 public ImpuestoProxy getImpuesto();
 @Valid
 public ImpuestoProxy getIeps();

 whose are @Embedded pojos.

 Then on the ImpuestoProxy i have properties that need be validated 
 differently when it is Impuesto or Ieps so i created a ImpuestoGroup and 
 ImpuestoIepsTasaGroup marker interfaces to validate differently using the 
 same Editor (see below why):

 @NotNull(message=notNull, groups = {ImpuestoGroup.class, 
 ImpuestoIepsTasaGroup.class}) /*so be validated when it;s Impuesto or Ieps 
 */
 @DecimalMin(value=0.0, message=decimalMin:0.0, groups = 
 {ImpuestoGroup.class, ImpuestoIepsMontoGroup.class})
 public Double getTasaImpuesto();

 @NotNull(message=notNull, groups = {ImpuestoIepsMontoGroup.class}) 
 /* so be validated when it's type is Impuesto only */
 @DecimalMin(value=0.0, message=decimalMin:0.0, groups = 
 {ImpuestoIepsMontoGroup.class})
 public BigDecimal getMontoImpuesto();

 ...

 Plus i need let user choose predefined valueproxy so i used a:

 public class UiOptionalValueListBoxImplT, E extends EditorT extends 
 UiBaseBox implements IsEditorOptionalFieldEditorT, E{
...
 }

 So when the user edits a getImpuesto() and then want to save it i check 
 for constraints  in this manner:

driver.flush();
 
ImpuestoProxy proxy = productoProxy.getIeps(); 

/* Here i cannot validate the whole ProductoProxy because some 
 constraints fails due my custom groups. 
*  so i need validate only the @Embedded proxy
*/   
Set constraints = AddProductViewImpl.this.validator.validate(proxy, 
 proxy.getTipoIeps().equals(TipoIeps.MONTO) ? ImpuestoIepsMontoGroup.class : 
 ImpuestoIepsTasaGroup.class);
 
if(!constraints.isEmpty()){
   driver.setConstraintViolations(constraints);
}
 
logger.log(Level.INFO, After the flush we got 
 +driver.getErrors().size());

 In my Editor of ImpuestoProxy view i have my own validation ui framework 
 (user ui messages, etc ...) and to identify a property who us failing i use 
 their path then i compare with the path reported by ListEditorError 
 reported by the main driver.

 The problem becomes here. The next behavior happens:

 IsEditorValueBoxEditorT report path ok 
 foo.bar.client.view.Products.ImpuestoEditorImpl INFO: On the sub view we 
 got: ieps.unidadImpuesto notNull 

 but IsEditorTakesValueEditorT and IsEditorLeafValueEditorT don't

 foo.bar.client.view.Products.ImpuestoEditorImpl INFO: On the sub view we 
 got: iepstipoIeps notNull 

 foo.bar.client.view.Products.ImpuestoEditorImpl INFO: On the sub view we 
 got: iepsnombreImpuesto notNull 

 As you can see there is missing . on the path name. ( iepsnombreImpuesto 
 should be ieps.nombreImpuesto )

 Plase note if i validate the whole ProductoProxy  the paths are reported 
 fine

 Don't know it the conversion from 
 driver.setConstraintViolations(constraints); to ListEditorError fails or 
 it's the validation who reports badly the path. Will try atm.

 Please help me.

 Thanks.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/SlSKoF-GAAMJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr

Re: DoubleBox and Editor framework bug?

2012-11-11 Thread Daniel Mauricio Patino León
Seems that edioto framework is trying to get the Double.doubleValue()
without check if the object is null.

Any one ?

2012/11/11 Daniel Mauricio Patino León ceo.lion@gmail.com

 Its normal when i use a DoubleBox in a Editor to edit a double property
 (RequestFactoryEditorDriver)
 if i clear the value of the box i get a null pointer exception?

 If so how can i validate a DoubleBox with the JSR 303 Validation?

 My code looks something like this:

 @DecimalMin(value=0.0, message=decimalMin:0.0, groups =
 {ImpuestoGroup.class, ImpuestoIepsGroup.class})
 public double getTasaImpuesto();

 g:DoubleBox ui:field=tasaImpuesto/g:DoubleBox
 @UiField DoubleBox tasaImpuesto;

 When i call the driver.flush() need to check the constraints i have this
 results:

 if i put a value diferent than number i get the on the ListEditorError
 the bad value
 if i put a lower than 0.0 value i can set the constraints to the
 EditorDriver with driver.setConstraintViolations(constraints);

 When i leave blank the field i expect a ListEditorError with a bad value
 or the constraint but not a null pointer exception.

 The line i get my atention is this one:

 Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) :
 Cannot read property 'value_0' of null
 at Unknown.$doubleValue(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@21:38447
 )

 Seems that DoubleBox cannot handle the null value.

 Please help me. Thank you.

 This the stack trace of Superdev Mode:

 00:56:19 GMT-600 2012 com.google.gwt.logging.client.LogConfiguration
 SEVERE: Exception caught: Exception caught: (TypeError) : Cannot read
 property 'value_0' of null
 com.google.gwt.event.shared.UmbrellaException: Exception caught: Exception
 caught: (TypeError) : Cannot read property 'value_0' of null
 at Unknown.createStackTrace(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@52:3207
 )
 at Unknown.fillInStackTrace_1(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@11:3463
 )
 at Unknown.fillInStackTrace(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@45:3229
 )
 at Unknown.$fillInStackTrace(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2267
 )
 at Unknown.$$init_87(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2263
 )
 at Unknown.Throwable_2(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2325
 )
 at Unknown.Exception_2(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@15:2367
 )
 at Unknown.RuntimeException_2(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@15:2391
 )
 at Unknown.UmbrellaException_1(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@22:8149
 )
 at Unknown.UmbrellaException_2(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@23:8185
 )
 at Unknown.$fireEvent(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@13:7781
 )
 at Unknown.$fireEvent_2(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@44:18481
 )
 at Unknown.fireEvent_7(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:18624
 )
 at Unknown.fireNativeEvent(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@21:6766
 )
 at Unknown.$onBrowserEvent(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:18522
 )
 at Unknown.onBrowserEvent(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:18636
 )
 at Unknown.dispatchEventImpl(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@12:15759
 )
 at Unknown.dispatchEvent_2(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:15753
 )
 at Unknown.anonymous(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@9:16748
 )
 at Unknown.apply(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@23:2820
 )
 at Unknown.entry0(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@16:2866
 )
 at Unknown.anonymous(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@14:2851
 )
 Caused by: com.google.gwt.event.shared.UmbrellaException: Exception
 caught: (TypeError) : Cannot read property 'value_0' of null
 at Unknown.createStackTrace(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@52:3207
 )
 at Unknown.fillInStackTrace_1(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@11:3463
 )
 at Unknown.fillInStackTrace(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@45:3229
 )
 at Unknown.$fillInStackTrace(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2267
 )
 at Unknown.$$init_87(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2263
 )
 at Unknown.Throwable_2(
 http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2325
 )
 at Unknown.Exception_2

Re: DoubleBox and Editor framework bug?

2012-11-11 Thread Daniel Mauricio Patino León
Hello Thomas, thank you for your answer.

I understand how the ValueBox with their Render and Parser works.

And i understand the difference using Double and double, so a work arround
would be use Double wrapper instead primitive types?

I think would be nice if the editor generate some code to handle this case
and report like when the user use some bad input and then this can be
reported in to the getErrors() so the NPE wont be raised.

Like when you use bad values
(1a) Bad value(1a)
(empty) bad value(null)

I will put a issue.


2012/11/11 Thomas Broyer t.bro...@gmail.com



 On Sunday, November 11, 2012 7:47:11 PM UTC+1, Daniel Mauricio Patino León
 wrote:

 Seems that edioto framework is trying to get the Double.doubleValue()
 without check if the object is null.

 Any one ?


 DoubleBox uses DoubleParser. DoubleParser returns 'null' if the value is
 the empty string, and otherwise uses a NumberFormat, and throws a
 ParserException if it cannot parse. Your edited object's property is of
 type 'double', not 'java.lang.Double', so when the field is empty,
 getValue() returns 'null', and the Editor framework tries to unbox the
 'null' to put it into your 'double' property, hence the
 NullPointerException. With any illegal value, DoubleParser throws; in that
 case, the ValueBoxEditor returns the last known value, which explains why
 it doesn't throw in that case.
 I think you can file an issue, but I wonder what the fix should be (if
 any): what value should be put into your property when the field is empty
 (i.e. the value is 'null')? or should the Editor framework generate
 specific code for primitive values to handle nulls and report errors
 without trying to change the value (to avoid NPEs)?

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

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



DoubleBox and Editor framework bug?

2012-11-10 Thread Daniel Mauricio Patino León
Its normal when i use a DoubleBox in a Editor to edit a double property 
(RequestFactoryEditorDriver)
if i clear the value of the box i get a null pointer exception?

If so how can i validate a DoubleBox with the JSR 303 Validation?

My code looks something like this:

@DecimalMin(value=0.0, message=decimalMin:0.0, groups = 
{ImpuestoGroup.class, ImpuestoIepsGroup.class})
public double getTasaImpuesto();

g:DoubleBox ui:field=tasaImpuesto/g:DoubleBox
@UiField DoubleBox tasaImpuesto;

When i call the driver.flush() need to check the constraints i have this 
results:

if i put a value diferent than number i get the on the ListEditorError 
the bad value
if i put a lower than 0.0 value i can set the constraints to the 
EditorDriver with driver.setConstraintViolations(constraints);

When i leave blank the field i expect a ListEditorError with a bad value 
or the constraint but not a null pointer exception.

The line i get my atention is this one:

Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : 
Cannot read property 'value_0' of null
at 
Unknown.$doubleValue(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@21:38447)

Seems that DoubleBox cannot handle the null value.

Please help me. Thank you.

This the stack trace of Superdev Mode:

00:56:19 GMT-600 2012 com.google.gwt.logging.client.LogConfiguration
SEVERE: Exception caught: Exception caught: (TypeError) : Cannot read 
property 'value_0' of null
com.google.gwt.event.shared.UmbrellaException: Exception caught: Exception 
caught: (TypeError) : Cannot read property 'value_0' of null
at 
Unknown.createStackTrace(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@52:3207)
at 
Unknown.fillInStackTrace_1(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@11:3463)
at 
Unknown.fillInStackTrace(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@45:3229)
at 
Unknown.$fillInStackTrace(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2267)
at 
Unknown.$$init_87(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2263)
at 
Unknown.Throwable_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2325)
at 
Unknown.Exception_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@15:2367)
at 
Unknown.RuntimeException_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@15:2391)
at 
Unknown.UmbrellaException_1(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@22:8149)
at 
Unknown.UmbrellaException_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@23:8185)
at 
Unknown.$fireEvent(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@13:7781)
at 
Unknown.$fireEvent_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@44:18481)
at 
Unknown.fireEvent_7(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:18624)
at 
Unknown.fireNativeEvent(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@21:6766)
at 
Unknown.$onBrowserEvent(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:18522)
at 
Unknown.onBrowserEvent(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:18636)
at 
Unknown.dispatchEventImpl(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@12:15759)
at 
Unknown.dispatchEvent_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:15753)
at 
Unknown.anonymous(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@9:16748)
at 
Unknown.apply(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@23:2820)
at 
Unknown.entry0(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@16:2866)
at 
Unknown.anonymous(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@14:2851)
Caused by: com.google.gwt.event.shared.UmbrellaException: Exception caught: 
(TypeError) : Cannot read property 'value_0' of null
at 
Unknown.createStackTrace(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@52:3207)
at 
Unknown.fillInStackTrace_1(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@11:3463)
at 
Unknown.fillInStackTrace(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@45:3229)
at 
Unknown.$fillInStackTrace(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2267)
at 
Unknown.$$init_87(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2263)
at 
Unknown.Throwable_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@3:2325)
at 
Unknown.Exception_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@15:2367)
at 
Unknown.RuntimeException_2(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@15:2391)
at 
Unknown.UmbrellaException_1(http://localhost:9876/proj/C6E66C9FC3DCB1FC08DFFFC07FE049E0.cache.js@22:8149)
at 

GWT 2.5 Validation problem

2012-11-09 Thread Daniel Mauricio Patino León
I want to validate a child  Proxy (@Embeddable) on an EntityProxy with the 
new Validation frame work but i have a problem

The code looks some thing like this:

@ProxyFor(locator=BaseEntityLocator.class, value=Producto.class)
public interface ProductoProxy extends EntityProxy {

public void setInformacionAduanera(InformacionAduaneraProxy 
informacionAduanera);
@Valid
public InformacionAduaneraProxy getInformacionAduanera();
...
}

@ProxyFor(value=InformacionAduanera.class)
public interface InformacionAduaneraProxy extends ValueProxy {

@NotNull(message=notNull)
public Date getFecha();
}

On other part of the App

this.productoProxy = request.create(ProductoProxy.class);
informacionAduaneraProxy = request.create(InformacionAduaneraProxy.class);
this.productoProxy.setInformacionAduanera(informacionAduaneraProxy);

Then finally 

RequestContext r =  driver.flush();
Set contraints = 
Validation.buildDefaultValidatorFactory().getValidator().validate(productoProxy);

I expect the @Valid annotation on the Entity proxy cascade the @NotNull on 
my InformacionAduaneraProxy but it dosn't
happen.

The validator only returns the constraints for the EntityProxy

I have both classes on the :

@GwtValidation(value={ CredencialesUsuario.class, ProductoProxy.class, 
InformacionAduaneraProxy.class })

Why?
Thank 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/-/YiKaemeKo3gJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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.5 Validation problem

2012-11-09 Thread Daniel Mauricio Patino León
Seems that Superdev mode doesn't recompile the proxies

I did a recompile of all the project.

now works

Fri Nov 09 14:51:20 GMT-600 2012 Validation INFO: informacionAduanera.fecha
informacionAduanera.fecha notNull
8868B8CCE0C8FEE0ACC285CD147AC8B1.cache.js:13326http://localhost:9876/misventas/8868B8CCE0C8FEE0ACC285CD147AC8B1.cache.js
Fri Nov 09 14:51:20 GMT-600 2012 Validation INFO:
informacionAduanera.numeroDocumento informacionAduanera.numeroDocumento
notNull


2012/11/9 Daniel Mauricio Patino León ceo.lion@gmail.com

 I want to validate a child  Proxy (@Embeddable) on an EntityProxy with the
 new Validation frame work but i have a problem

 The code looks some thing like this:

 @ProxyFor(locator=BaseEntityLocator.class, value=Producto.class)
 public interface ProductoProxy extends EntityProxy {

 public void setInformacionAduanera(InformacionAduaneraProxy
 informacionAduanera);
 @Valid
 public InformacionAduaneraProxy getInformacionAduanera();
 ...
 }

 @ProxyFor(value=InformacionAduanera.class)
 public interface InformacionAduaneraProxy extends ValueProxy {

 @NotNull(message=notNull)
 public Date getFecha();
 }

 On other part of the App

 this.productoProxy = request.create(ProductoProxy.class);
 informacionAduaneraProxy = request.create(InformacionAduaneraProxy.class);
 this.productoProxy.setInformacionAduanera(informacionAduaneraProxy);

 Then finally

 RequestContext r =  driver.flush();
 Set contraints =
 Validation.buildDefaultValidatorFactory().getValidator().validate(productoProxy);

 I expect the @Valid annotation on the Entity proxy cascade the @NotNull on
 my InformacionAduaneraProxy but it dosn't
 happen.

 The validator only returns the constraints for the EntityProxy

 I have both classes on the :

 @GwtValidation(value={ CredencialesUsuario.class, ProductoProxy.class,
 InformacionAduaneraProxy.class })

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



Activities and places with MVP approach question

2012-11-04 Thread Daniel Mauricio Patino León
I recently started a new project usign Activities and palces with mvp. Now 
i have a quiestion of approach.

Example:

Employee CRUD

Activity and place for each operation C, R, U 

One place differente activities for operations C, R, U.

what you guys suggest to use and why?

many thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/U7HG3XPNSk8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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.5 GA is Here!

2012-10-25 Thread Daniel Mauricio Patino León
Nice

2012/10/25 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Great!!!


 2012/10/25 unnurg unn...@google.com

 Hey all,

 We're excited to announce the GWT 2.5 Release! There will be an
 announcement soon on the GWT 
 Bloghttp://googlewebtoolkit.blogspot.com/2012/06/gwt-2.html,
 and you can download it 
 herehttp://developers.google.com/web-toolkit/download (bottom
 of the page). The GA has been uploaded to Maven Central with the version
 string of 2.5.0

 -Unnur, on behalf of the GWT team

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


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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



Elemental missing getWindow().newFormData()

2012-10-17 Thread Daniel Mauricio Patino León
Iam trying to implement a html5 file api + xmlhttrequest level 2  upload on 
my project.


But sems that Elemental is missing things of FormData and i can't send 
over XMLHttpRequest object.

How to construct a object of FormData ?

FormData formData = /*getWindow().newFormData() - doesn't exist */null;

from http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#interface-formdata

interface FormData {
  void append 
http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-formdata-append(DOMString
 name, Blob http://dev.w3.org/2006/webapi/FileAPI/#blob value, optional 
DOMString filename);
  void append 
http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-formdata-append(DOMString
 name, DOMString value);
};


in the elemental one just 

formData.append(name, value, filename)

Where all parameters are strings.


-- 
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/-/rmkPDiZ0tVkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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.5 RC2 EntityProxy Validation

2012-10-12 Thread Daniel Mauricio Patino León
Hello there.

I have a question of wich is the best option to validate my domain objects 
on the client side with RequestFactory.

It's posible to validate a Proxy with the new Validation of 2.5 RC2 ?

If i do a validation of my proxy don't get any constraints violations.

What i did to get a work arround of this was move the anoations to my proxy:

@ProxyFor(value=Employee.class, locator=EntityLocator.class)
public interface EmployeeProxy extends EntityProxy {
 @NotNull(message=Cannot be empty.)
@Size(min = 4, message = Name must be at least 4 characters long.)
public String getFirstName();
/* ..   */
}

Then i implemented that interface on my domain object.


@Entity
public class Employee extends EntityBase implements EmployeeProxy {
  @Column(nullable = false) 
  private String firstName;
  @Override
public String getFirstName() {
return firstName;
}
   /* ..   */
   @Override
public EntityProxyId? stableId() {
return null;
}
}


Now i get validation on the client side with:

EmployeeRequest request = requestFactory.employeeRequest();
EmployeeProxy employeeProxy = request.create(EmployeeProxy.class);
request.addNewEmployee(employeeProxy);
 driver.edit(employeeProxy, request);
SetConstraintViolationEmployeeProxy violations = 
validator.validate(employeeProxy);
System.out.println(violations);


and also on the server side when i click on save button with this:


driver.flush().fire(new ReceiverVoid() {
 @Override
public void onSuccess(Void response) {
Window.alert(Succeed);
}
 @Override
public void onConstraintViolation(SetConstraintViolation? violations) {
//ConstraintViolation? violation = violations.iterator().next();
 //Window.alert(violation.getMessage() +   
+violation.getPropertyPath().toString());
for(ConstraintViolation? violation: violations){
if(violation.getPropertyPath().toString().equals(age)){
ageError.setText(violation.getMessage());
}else if(violation.getPropertyPath().toString().equals(firstName)){
firstNameError.setText(violation.getMessage());
}else if(violation.getPropertyPath().toString().equals(lastName)){
lastNameError.setText(violation.getMessage());
}
}
// ... others
}
});


I this correct?

This can cause problems ?


thank 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/-/ukZJMTj84wAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 and Editor Frame Work Question

2012-07-31 Thread Daniel Mauricio Patino León
Hello there RequestFactory and EditorFramework gurus and all the comunity.

I have the following structure

public class CitaWidget{

 //here i load a complex graph with request factory

 // in some place of this class i create a Editor of each proxy on a list

for(UnidadProxy unidadProxy: response.getUnidades()){

// i create editors here ...

final UnidadCitaEditor unidadCitaEditor = new 
UnidadCitaEditor(unidadProxy); 

// 

} 

}


public class UnidadCitaEditor implements EditorUnidadProxy{

// this class is a editor for the UnidadProxy obtained by the previous class

 

// here each UnidadProxy has many CitaProxy so i created a ListEditor  

@UiField(provided=true) CitaListEditor citas; 

 

protected DefaultRequestFactory factory = DefaultRequestFactory.instance; 

protected interface Driver extends RequestFactoryEditorDriverUnidadProxy, 
UnidadCitaEditor{}
protected Driver driver = GWT.create(Driver.class); 


 

 public UnidadCitaEditor (){


driver.initialize(this);
factory.initialize(new SimpleEventBus()); 


// then i create the top driver and the request context

final UnidadRequest unidadRequest = factory.unidadRequest();

unidadRequest.citaUnidadChange(unidadProxy).with(citas,citas.alumno,citas.doctor,citas.responsable).to(new
 
ReceiverUnidadProxy() { 

@Override
public void onSuccess(UnidadProxy response) { 
UnidadRequest unidadRequest = factory.unidadRequest();
unidadRequest.citaUnidadChange(response).with(driver.getPaths()).to(this);

 

 // iam trying to reuse the editor with  a new RequestContext, for better 
ui experience for the final user

driver.edit(response, unidadRequest);
}
});
driver.edit(unidadProxy, unidadRequest); 

 

}

}


public class CitaListEditor extends FlexTable implements 
IsEditorListEditorCitaProxy, CitaEditor, 
HasRequestContextListCitaProxy{

 protected class CitaEditorSource extends EditorSourceCitaEditor{

// business  logic for the cita editor source

}

private void onNewProxy(){

 final CitaProxy citaProxy = ctx.create(CitaProxy.class);

//  the cita proxy is atached to the list 

// the the CitaEditor can handle the binding ...

// on save of the  CitaEditor i fire the main RequestContext that one on 
the UnidadCitaEditor to persist the data

 

} 

} 


Well as you friends can see i have a widget that retrive a list of Unidades 
then each unidad has a List of Citas then i create a editor for each Unidad.
Then the user call the onNewProxy() the new cita proxy its atached to the 
list correctly.

The thing here is i want when a user creted a new CitaProxy and when the 
editor of this Cita hides () call save fire the requestcontext
This because iam using a extensive UI layout (FlexTable DND some visual 
validation, etc..) to represent the Cita's proxys.

I want to maintain the Client side ui but save the CitaProxy on the server.

I know the RequestFactory is per request only, so i have a problem here.

I tryed to getback the same Unidad proxy and then reatach to the driver as 
the follow lines of the class UnidadCitaEditor :


unidadRequest.citaUnidadChange(unidadProxy).with(citas,citas.alumno,citas.doctor,citas.responsable).to(new
 
ReceiverUnidadProxy() { 

@Override
public void onSuccess(UnidadProxy response) { 
UnidadRequest unidadRequest = factory.unidadRequest();
unidadRequest.citaUnidadChange(response).with(driver.getPaths()).to(this);
driver.edit(response, unidadRequest);
}
});


Iam trying to reuse the editor and create a new RequestContext to be fired 
when a new CitaProxy is added to the list of the ListEditor 
so my ListEditor CitaListEditor can maitain the UI and add the new ones 
only.


The problem is that iam getting an exception here...


at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.AssertionError: Unfrozen bean with null RequestContext
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.checkStreamsNotCrossed(AbstractRequestContext.java:981)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.editProxy(AbstractRequestContext.java:509)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$4.visitCollectionProperty(AbstractRequestContext.java:1036)
at 
mx.com.liondev.GrupoEndodontico.shared.Model.Unidad.UnidadProxyAutoBean_com_google_web_bindery_requestfactory_shared_impl_EntityProxyCategory_com_google_web_bindery_requestfactory_shared_impl_ValueProxyCategory_com_google_web_bindery_requestfactory_shared_impl_BaseProxyCategory.traverseProperties(UnidadProxyAutoBean_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:243)
at 
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166)
at 
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101)
at 

Use RequestFactoryProxy on UiBinder Template.

2012-07-19 Thread Daniel Mauricio Patino León
Should be great if we can use a proxy on a UiBinder template with 
the ui:with

I tryed to do it, but i get a error.

public class VerPresupuestos extends TabItem
  PacienteProxy pacienteProxy;
  public VerPresupuestos(final PacienteProxy pacienteProxy) {
  this.pacienteProxy = pacienteProxy;
  initWidget(uiBinder.createAndBindUi(this));
   }
...
}

and on the UiBinder template.

ui:with type=xx.xxx.Project.shared.Model.Paciente.PacienteProxy 
field=pacienteProxy/ui:with

g:Label width=100% height=100% styleName={style.lbl}Presupuestos de 
ui:text from={pacienteProxy.getNombre}/ui:text/g:Label 

i get an exception:

13:26:44.736 [ERROR] [Porject] Deferred binding result type  
xx.xxx.Project.shared.Model.Paciente.PacienteProxy' should not be abstract.

Would be nice make thing like this.

I use GWT 2.4

-- 
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/-/Kf6_BZEWZQkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Use RequestFactoryProxy on UiBinder Template.

2012-07-19 Thread Daniel Mauricio Patino León
Yhea! this rocks!

I missed the @UiField(provided=true)

Nice, its better to do at this way than change in code.

Thank you thomas.

2012/7/19 Thomas Broyer t.bro...@gmail.com

 I don't see the @UiField(provided=true) on the pacienteProxy field on your
 code.


 On Thursday, July 19, 2012 8:37:23 PM UTC+2, Daniel Mauricio Patino León
 wrote:

 Should be great if we can use a proxy on a UiBinder template with
 the ui:with

 I tryed to do it, but i get a error.

 public class VerPresupuestos extends TabItem
   PacienteProxy pacienteProxy;
   public VerPresupuestos(final PacienteProxy pacienteProxy) {
   this.pacienteProxy = pacienteProxy;
   initWidget(uiBinder.**createAndBindUi(this));
}
 ...
 }

 and on the UiBinder template.

 ui:with type=xx.xxx.Project.shared.**Model.Paciente.PacienteProxy
 field=pacienteProxy/ui:**with

 g:Label width=100% height=100% styleName={style.lbl}**Presupuestos
 de ui:text from={pacienteProxy.**getNombre}/ui:text/g:**Label

 i get an exception:

 13:26:44.736 [ERROR] [Porject] Deferred binding result type
 xx.xxx.Project.shared.Model.**Paciente.PacienteProxy' should not be
 abstract.

 Would be nice make thing like this.

 I use GWT 2.4

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

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: Simple GWT Dual list

2012-07-10 Thread Daniel Mauricio Patino León
Thank you for your sharing.

2012/7/10 Alain Ekambi jazzmatad...@gmail.com

 Nice job Juan. Works great.
 Maybe you should also think and Drag and Drop ?

 Cheers,

 Alain


 2012/7/10 Juan Pablo Gardella gardellajuanpa...@gmail.com

 Hi

 Thanks for the suggestions. I will include this features soon.

 Juan


 2012/7/9 Ian Mayo i...@planetmayo.com

 Hi there, nice clean implementation - well done.

 A couple of minor suggestions, if you don't mind ;-)

 There's a UI precedent in controls like this whereby double-clicking on
 an item moves it to the other list.  This lets the user to continue to
 focus their gaze on the list in question.

 The second, more minor suggestion is that it's also quite common to have
 move all buttons (  ) that move the whole list from one side to the
 other - though I believe this has more infrequent value.

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

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


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


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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: changing an entity proxy within request in GWT editor framework

2012-06-26 Thread Daniel Mauricio Patino León
In this scenario i think you are using a ListEditor

What i do is this:

From your editor when you create your new EntityProxy pass it to the
ListEditor of Bar implementing TakesValueV

then when you create a new EntityProxy of Bar set it as if you are working
on the server side with bar.setFoo(foo);

The RF on the server side will populate the relationship for you.

That's all a client only side approach for this scenario.



2012/6/26 Human izatara izat...@gmail.com

 I try to build an application based on spring-roo generated GWT code. now
 I want to do this scenario.

 class Foo{
 ListBar barList;
 }
 class Bar{
 Foo foo;
 }

 and barList is owned entity collection for Foo, that means Bars will be
 saved in Foo crud scenario. but foo link in Bar is not set automatically
 and I got a constraint violation.

 I want to find best place for setting foo link in each newly created Bar.
 where can I create such link in an application with spring roo gwt
 application architecture like or generally in an mvp gwt application which
 used editor framework and 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/-/XTBto4o43k4J.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.
http://www.liondev.com.mx

-- 
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: accessing web service in gwt

2012-06-15 Thread Daniel Mauricio Patino León
This need be done on the server side.

Use wsimport to generate the jaxb clasess ot the wsdl (SOAP)

then on the implementation of yourRPC or your DAO (Request factory) make
your calls to the ws.

send to the client what do you need.

2012/6/15 Harshal Patil harshal...@gmail.com

 Hello,

 I have to access the web service of Microsoft Dynamic Nav in GWT.

 Can anyone plz help me ?


 Regards,

 Harshal

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: Printing from GWT -- how to?

2012-06-01 Thread Daniel Mauricio Patino León
http://code.google.com/p/gwt-print-it/



2012/6/1 Rob Tanner caspersg...@gmail.com

 I have a project where the request has been made that I add a print button
 to several different panels so that users can print them out for their
 records.  I know how to print a page in JavaScript, but in this case all I
 want to print is the specific panel and nothing else.  How do I set that up
 in GWT?

 Thanks,

 Rob Tanner
 Linfield College

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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 axing GWT?

2012-04-27 Thread Daniel Mauricio Patino León
I think GWT its a very good open source project. We use it to develop RIA
and we love it. Like  Joseph i'll pray to google make it better and improve
it.
What about a thread where people +1 if want that google keep working on it?
there  exist one?

Greetings from Mexico.

El 27 de abril de 2012 15:12, Steve strat...@gmail.com escribió:

 https://plus.google.com/110412141990454266397/posts/8nmmgp4AChM

 Enjoy.

 On Apr 27, 3:26 pm, Mauro Oliveira mauro.no...@gmail.com wrote:
  +1
 
  On 27 April 2012 14:11, Joseph Lust lifeofl...@gmail.com wrote:
 
 
 
 
 
 
 
   I'll keep praying for GWT. Let's see what transpires at Google IO in
 June.
 
   Joe
 
   --
   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/-/VrsH8tPIQs4J.
   To post to this group, send email to
 google-web-toolkit@googlegroups.com.
   To unsubscribe from this group, send email to
   google-web-toolkit+unsubscr...@googlegroups.com.
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



Re: How to wire multiple editor to same bean.

2012-04-18 Thread Daniel Mauricio Patino León
Use a main view

PatientRegistrationFormEditor implements EditorBeanProxy{
}

then use separated views

PersonalDetailsView implements EditorBeanProxy /*
ValueAwareEditorBeanProxy if you need the proxy for some reason*/{
}

Then anonate you partial views on your main view with

@Path() /* this make the subeditor (partial view) edit the same beanproxy
*/
@UiField  PersonalDetailsView  personalDetailsView;

Done.

El 18 de abril de 2012 10:49, saurabh saurabh saurabh.bl...@gmail.comescribió:

 Hi all,
 I don't have much experience with Editor frameworks so this question
 may appear naive or dumb.

 So suppose we have a big bean or proxy having a many fields. A good
 idea in view part could be having group them under TabLayoutPanel
 otherwise a big form on a page may not appear user friendly.

 Example:
 Patient Registration Form

 ---
 ||Personal Details || Patient Habbits || Family History || Medical
 History || Insurance || |

 ---
 |
 |
 |
 |
 |

 ---

 Here I feel comfortable to have five different UI like detailsView,
 habbitsView and so on and having them under one composite but all of
 'em are concerned to one Class Patient.

 So my question is how I can wire multiple Editors to same bean, each
 for different set of properties.

 I don't find much on net for Editors, I guess it could be
 CompositeEditors, but I need some help for how to do it.

 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.




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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 and @OneToMany association

2012-04-17 Thread Daniel Mauricio Patino León
Yes was the issue. Thank you.  Aidan

El 16 de abril de 2012 15:27, Aidan O'Kelly aida...@gmail.com escribió:

 You'll probably need:
 with(parents, parents.childs)

 getChilds() is not a method on your Callback object..

 2012/4/16 Daniel Mauricio Patino León ceo.lion@gmail.com

 Iam stuck here! any help would be appreciated. (sorry for duplicate the
 post :
 http://stackoverflow.com/questions/10180282/requestfactory-and-onetomany-association
  )

 My case is that i have a @OneToMany association on my module.

  class Parent{
 @OneToMany(
mappedBy=parent
 )
 return ListChild getChilds();
  }

  class Child{
@ManyToOne
return Parent getParent();
  }

 The in the client side i want get get the whole object map.

 i do this (AsyncDataProvider with a DataGrid as display):

  requestContext.getParents().with(childs).fire(new
 ReceiverCallbackProxy() {
  @Override
 public void onSuccess(CallbackProxy response) {
 display.setRowData(range.getStart(),response.getParents());
  updateRowCount(response.getCount().intValue(), true);
 }
 });

 My DAO its just querying the whole map.

  Criteria criteria = session.createCriteria(Parent.class);
  criteria.setFetchMode(childs, FetchMode.JOIN);
  criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
  /* we got all the map here on the server side */

  Callback callback = new Callback();
  callback.setCount(count);
  callback.setParents(criteria.list());

  return callback;

 But i cant get the childs. The list of them are null. Please note iam
 using with(childs)

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


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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



RequestFactory and @OneToMany association

2012-04-16 Thread Daniel Mauricio Patino León
Iam stuck here! any help would be appreciated. (sorry for duplicate the 
post : 
http://stackoverflow.com/questions/10180282/requestfactory-and-onetomany-association
 )

My case is that i have a @OneToMany association on my module.

 class Parent{
@OneToMany(
   mappedBy=parent
)
return ListChild getChilds();
 }

 class Child{
   @ManyToOne
   return Parent getParent();
 }

The in the client side i want get get the whole object map.

i do this (AsyncDataProvider with a DataGrid as display):

 requestContext.getParents().with(childs).fire(new 
ReceiverCallbackProxy() {
@Override
public void onSuccess(CallbackProxy response) {
display.setRowData(range.getStart(),response.getParents());
updateRowCount(response.getCount().intValue(), true);
}
});

My DAO its just querying the whole map.

 Criteria criteria = session.createCriteria(Parent.class);
 criteria.setFetchMode(childs, FetchMode.JOIN);
 criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
 /* we got all the map here on the server side */ 

 Callback callback = new Callback();
 callback.setCount(count);
 callback.setParents(criteria.list());

 return callback;

But i cant get the childs. The list of them are null. Please note iam using 
with(childs)

Thank 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/-/0J0QrK3tolYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 Performance : Good or Bad ?

2012-04-09 Thread Daniel Mauricio Patino León
What about the gxt 3 licence? I mean we are talking about GWT performace or
a gxt3 vs gwt ?

El 9 de abril de 2012 09:40, dhoffer dhoff...@gmail.com escribió:

 Thanks for the updated comparison.  I wanted to point out that the
 summary line is not always correct.  Examples:

 GXT Render Time: 1ms
 GWT Render Time: 0ms
 GXT was 1x faster...

 and

 GXT Render Time: 1ms
 GWT Render Time: 1ms
 GXT was 1x faster...

 -Dave


 On Apr 4, 5:40 am, Fabrice fabrice.ledo...@gmail.com wrote:
  I do this quickly :http://gxt3vsgwt.appspot.com/
  thanks to code source of previous demo, by replacing GXT 2.2.5 with
  Ext GWT 3.0 Release Candidate (http://dev.sencha.com/deploy/gxt-3.0.0-
  rc.zip).
 
  Performance are better !
 
  On 27 mar, 16:12, dhoffer dhoff...@gmail.com wrote:
 
 
 
 
 
 
 
   Regarding GXT I noticed that comparison website is using GXT 2.2.5 yet
   is comparing with new GWT 2.4, if making GWT 2.4 compliant app one
   would probably use the new GXT 3.0 which is in beta right now (almost
   RC)...I wonder how that compairs to GWT 2.4.  I hope not worse.
 
   -Dave
 
   On Mar 27, 6:28 am, dodo dard keratonj...@gmail.com wrote:
 
Thanks Frank,
 
I think that too, GXT make pretty component but very expensive and
 very big.
Btw I found an interesting website :
 http://gxtvsgwt.appspot.com/after
looking at your anwser.
 
Le mardi 27 mars 2012 13:54:52 UTC+2, Frank a écrit :
 
 GXT and SmartGWT have bad performance imo.
 Better to write your own widgets (which takes a lot of time) using
 vanilla
 GWT and make them perform better.
 That is what we did and our GWT projects have very high
 performance.
 
 Op dinsdag 27 maart 2012 11:55:14 UTC+2 schreef dodo dard het
 volgende:
 
 Helo,
 
 I've got friends complaining about GWT/GXT (GWT Ext)
 performances, well I
 notice that if we put to many component with GXT, there will be a
 certain
 waiting time (3-4s) before it got completely loaded. They said
 that is
 better to write the application directly with Javascript that may
 I'm not
 agreed 100%. So guys, is there any solution, best practice,
 limitation or
 restriction using GXT/GWT ? Or it can't be helped ?
 
 Honestly is fun using GWT/GXT, but I'm looking a performance
 solution too.
 
 Regards,
 Bowie

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



ListEditor question.

2012-04-09 Thread Daniel Mauricio Patino León
Hello Every one.

I have a problem with ListEditor. The case is this:

I have a main editor for AProxy then AProxy has a list of BProxy 's
so in the main view i have this:

@UiField RespositorioUsuario archivos;

Then i have a sub view with something like this:

public class RespositorioUsuario extends Composite implements 
IsEditorListEditorArchivoProxy, RepositoryItem , 
HasRequestContextListArchivoProxy {
   // i manage a list of RepositoryItem editors
   private class RepositorioEditorSource extends 
EditorSourceRepositoryItem {

@Override
public RepositoryItem create(int index) {
 RepositoryItem item = new RepositoryItem();
 container.insert(item, index);
return item;
}

@Override
public void dispose(RepositoryItem subEditor) {
subEditor.removeFromParent();
}

@Override
public void setIndex(RepositoryItem subEditor, int index) {
 container.insert(subEditor, index);
}

}
 
private ListEditorArchivoProxy, RepositoryItem subeditors = 
ListEditor.of(new RepositorioEditorSource());
 @Override
public ListEditorArchivoProxy, RepositoryItem asEditor() {
return subeditors;
  }

private AlumnoRequest request;
 @Override
public void setRequestContext(RequestContext ctx) {
request = (AlumnoRequest) ctx;
}
}

Then the BProxy editor is RepositoryItem

public class RepositoryItem extends Composite implements 
EditorArchivoProxy {
  // iam the editor of BProxy
}


So finally i want to add one Item the the list with something like this:

ArchivoProxy a = request.create(ArchivoProxy.class);
subeditors.getList().add(a);


But i cant, and dont know why... i got a NullPointerException.


Caused by: java.lang.NullPointerException: null
at 
x.y.z.client.Alumnos.Editor.RespositorioUsuario$1.onChange(RespositorioUsuario.java:160)
at 
com.google.gwt.event.dom.client.ChangeEvent.dispatch(ChangeEvent.java:54)
at 
com.google.gwt.event.dom.client.ChangeEvent.dispatch(ChangeEvent.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at 
com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at 
com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at 
com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at 
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)

etc 

So the getList() is returning nulll



Why?


Any help would be apreciated.

Thank 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/-/Y4W-kzI_qxUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: ListEditor question.

2012-04-09 Thread Daniel Mauricio Patino León
My bad.

Of course i need to initialize the ArrayList on the main Proxy when create
a new one. So proxy.setArchivos(new ArrayListArchivoProxy());
solved this issue.

Great GWT.

El 9 de abril de 2012 15:08, Daniel Mauricio Patino León 
ceo.lion@gmail.com escribió:

 Hello Every one.

 I have a problem with ListEditor. The case is this:

 I have a main editor for AProxy then AProxy has a list of BProxy 's
 so in the main view i have this:

 @UiField RespositorioUsuario archivos;

 Then i have a sub view with something like this:

 public class RespositorioUsuario extends Composite implements
 IsEditorListEditorArchivoProxy, RepositoryItem ,
 HasRequestContextListArchivoProxy {
// i manage a list of RepositoryItem editors
private class RepositorioEditorSource extends
 EditorSourceRepositoryItem {

 @Override
 public RepositoryItem create(int index) {
  RepositoryItem item = new RepositoryItem();
  container.insert(item, index);
 return item;
 }

 @Override
 public void dispose(RepositoryItem subEditor) {
 subEditor.removeFromParent();
 }

 @Override
 public void setIndex(RepositoryItem subEditor, int index) {
  container.insert(subEditor, index);
 }

 }

 private ListEditorArchivoProxy, RepositoryItem subeditors =
 ListEditor.of(new RepositorioEditorSource());
  @Override
 public ListEditorArchivoProxy, RepositoryItem asEditor() {
 return subeditors;
   }

 private AlumnoRequest request;
  @Override
 public void setRequestContext(RequestContext ctx) {
 request = (AlumnoRequest) ctx;
 }
 }

 Then the BProxy editor is RepositoryItem

 public class RepositoryItem extends Composite implements
 EditorArchivoProxy {
   // iam the editor of BProxy
 }


 So finally i want to add one Item the the list with something like this:

 ArchivoProxy a = request.create(ArchivoProxy.class);
 subeditors.getList().add(a);


 But i cant, and dont know why... i got a NullPointerException.


 Caused by: java.lang.NullPointerException: null
 at
 x.y.z.client.Alumnos.Editor.RespositorioUsuario$1.onChange(RespositorioUsuario.java:160)
 at
 com.google.gwt.event.dom.client.ChangeEvent.dispatch(ChangeEvent.java:54)
 at
 com.google.gwt.event.dom.client.ChangeEvent.dispatch(ChangeEvent.java:1)
 at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
 at
 com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
 at
 com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
 at
 com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
 at
 com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
 at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)

 etc 

 So the getList() is returning nulll



 Why?


 Any help would be apreciated.

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




-- 
ISC. Daniel Mauricio Patiño León.
Liondev S.A. de C.V.

-- 
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/Server communication. GWT-RPC ? GIlead ? Dozer ? RequestFactory ?

2012-04-07 Thread Daniel Mauricio Patino León
RF awkward ? I dont think so, finally the rpc aproach with dto's and other
stuff are sent to the client side in some like JSON (GWT Serialization),
RequestFactory uses JSON to pass from server to the client and it just
works well. In my opinion (i did two projects with the DTO thing) the
RequestFactory its the best way to build Enterprise Applications with JPA
 (Hibernate). I recommend to you read careful the documentation about the
RF.
Just my opinion.

El 7 de abril de 2012 17:20, Jeff Schnitzer j...@infohazard.org escribió:

 Just to clarify:  Objectify isn't a serialization framework.  It's a
 persistence API - Hibernate for the GAE datastore makes me cringe
 but it gives you the right idea.  Using Objectify you still have to
 decide whether to use your entity domain objects or DTOs for the
 GWT-RPC boundaries.  I tend to use DTOs, although I'll use the entity
 objects themselves if they are simple enough.  They usually aren't.

 Jeff (creator of Objectify)

 On Sat, Apr 7, 2012 at 1:09 PM, Joseph Lust lifeofl...@gmail.com wrote:
  fabio,
 
  While mechanisms like Objectify exist to pass the same entity to the UI
 from
  Hibernate, I have found that DTO objects are still the most robust
 solution.
  Obviously you don't want to send the secret Hibernate goodness to the UI,
  you don't want LazyLoading exceptions, and chances are the entity has way
  more information than you need in the UI. Since we often have to move a
 lot
  of information to the UI (i.e. 10K plus records) it makes sense to use
 the
  Entity in the DAO layer and pack up the data into the DTO's in the
 service
  layer in an efficient manner. Keep in mind too that if you pass your
 entity
  bean to the UI, you're telling prying eyes a lot about your DB design.
 
  Also, we usually use a DtoContainer object for many pages. For example,
 if
  WidgetX needs 10 fooDTO's and 3 barDTO's, then you pack them up in a
  WidgetXContainer. This is especially useful because if you decide later
 that
  WidgetX needs 4 wombatDTO's, you whole RPC setup from interfaces, to
  services, to async handlers don't need to be touched. You just add
 another
  property to the container and then just put in and take out the new
 object.
 
  Others might push for a framework like Objectify, but my experience with
  such frameworks is that you lose in the long term if you plan to do
 anything
  beyond the purview of their limited use cases.
 
  Sincerely,
  Joseph
 
  --
  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/-/odd9_XG1AHAJ.
 
  To post to this group, send email to google-web-toolkit@googlegroups.com
 .
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

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




-- 
ISC. Daniel Mauricio Patiño León.
Liondev S.A. de C.V.

-- 
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: DataGrid right click

2012-03-06 Thread Daniel Mauricio Patino León
Hey  Sachin  thank you.


Do you know if this property has cross browser support?

2012/3/6 Sachin Shekhar R sachin@gmail.com

 In the application html file ensure you have set up body tag like - body
 *oncontextmenu=return false;*
 This suppresses the *default *browser context menu.


 On Tuesday, 6 March 2012 09:26:13 UTC+5:30, Daniel Mauricio Patino León
 wrote:

 Iam trying to figure out how to implement a right click to my
 DataGrid, here is my code:

 @UiField(provided=true) DataGridEmployeeProxy dataGrid = new
 DataGridEmployeeProxy(){
 protected void onBrowserEvent2(Event event) {
 switch (DOM.eventGetType(event)) {
 case Event.ONMOUSEDOWN:
 if (DOM.eventGetButton(event) ==
 Event.BUTTON_RIGHT) {


 event.preventDefault(**);
 event.**stopPropagation();


PopupPanel pop = new PopupPanel(true);

MenuBar menuBar = new MenuBar(true);
menuBar.setVisible(true);
menuBar.addItem(new MenuItem(Click
 me, new Command() {

   **  @Override
   **  public void execute()
 {
   **  
 **Window.alert(Clicked
 me!);
   **  }
   ** }));
menuBar.addItem(new MenuItem(Poke
 me,new Command(){
@Override
   **  **public void
 execute() {
   **  **
 Window.alert(Poked
 me!);
   **  }
}));

pop.setWidget(menuBar);


 pop.setPopupPosition(DOM.**eventGetClientX(event)
 ,DOM.eventGetClientY(event));
pop.show();

 } else {
 super.onBrowserEvent2(event);
 }
 break;
 default:
 super.onBrowserEvent2(event);
 break;
 }
 };
 };


 This works ok but dont know how to prevent the default browser right
 click behavior.


 Any help would be nice. Thank 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/-/fKgliG4HeB4J.

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: DataGrid right click

2012-03-06 Thread Daniel Mauricio Patino León
   event.preventDefault();
   event.stopPropagation();

Why these lines doesnt work?

In DataGrid you can overdrive the onBrowserEvent2(){} but it is fired after
the onBrowserEvent(){}
and i think is why my code doesnt work.


Is there another w3c validation pass way to do this?


Thank you.

2012/3/6 Daniel Mauricio Patino León ceo.lion@gmail.com

 Hey  Sachin  thank you.


 Do you know if this property has cross browser support?


 2012/3/6 Sachin Shekhar R sachin@gmail.com

 In the application html file ensure you have set up body tag like - body
 *oncontextmenu=return false;*
 This suppresses the *default *browser context menu.


 On Tuesday, 6 March 2012 09:26:13 UTC+5:30, Daniel Mauricio Patino León
 wrote:

 Iam trying to figure out how to implement a right click to my
 DataGrid, here is my code:

 @UiField(provided=true) DataGridEmployeeProxy dataGrid = new
 DataGridEmployeeProxy(){
 protected void onBrowserEvent2(Event event) {
 switch (DOM.eventGetType(event)) {
 case Event.ONMOUSEDOWN:
 if (DOM.eventGetButton(event) ==
 Event.BUTTON_RIGHT) {


 event.preventDefault(**);
 event.**stopPropagation();


PopupPanel pop = new
 PopupPanel(true);

MenuBar menuBar = new MenuBar(true);
menuBar.setVisible(true);
menuBar.addItem(new MenuItem(Click
 me, new Command() {

   **  @Override
   **  public void execute()
 {
   **  
 **Window.alert(Clicked
 me!);
   **  }
   ** }));
menuBar.addItem(new MenuItem(Poke
 me,new Command(){
@Override
   **  **public void
 execute() {
   **  **
 Window.alert(Poked
 me!);
   **  }
}));

pop.setWidget(menuBar);


 pop.setPopupPosition(DOM.**eventGetClientX(event)
 ,DOM.eventGetClientY(event));
pop.show();

 } else {
 super.onBrowserEvent2(event);
 }
 break;
 default:
 super.onBrowserEvent2(event);
 break;
 }
 };
 };


 This works ok but dont know how to prevent the default browser right
 click behavior.


 Any help would be nice. Thank 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/-/fKgliG4HeB4J.

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




 --
 ISC. Daniel Mauricio Patiño León.
 Director ejecutivo
 Liondev S.A. de C.V.






-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



DataGrid right click

2012-03-05 Thread Daniel Mauricio Patino León
Iam trying to figure out how to implement a right click to my
DataGrid, here is my code:

@UiField(provided=true) DataGridEmployeeProxy dataGrid = new
DataGridEmployeeProxy(){
protected void onBrowserEvent2(Event event) {
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEDOWN:
if (DOM.eventGetButton(event) == 
Event.BUTTON_RIGHT) {


event.preventDefault();
event.stopPropagation();


   PopupPanel pop = new PopupPanel(true);

   MenuBar menuBar = new MenuBar(true);
   menuBar.setVisible(true);
   menuBar.addItem(new MenuItem(Click me, new 
Command() {

@Override
public void execute() {
Window.alert(Clicked 
me!);
}
   }));
   menuBar.addItem(new MenuItem(Poke me,new 
Command(){
   @Override
public void execute() {

Window.alert(Poked me!);
}
   }));

   pop.setWidget(menuBar);


pop.setPopupPosition(DOM.eventGetClientX(event) ,DOM.eventGetClientY(event));
   pop.show();

} else {
super.onBrowserEvent2(event);
}
break;
default:
super.onBrowserEvent2(event);
break;
}
};
};


This works ok but dont know how to prevent the default browser right
click behavior.


Any help would be nice. 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 
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 con Hibernate

2012-03-02 Thread Daniel Mauricio Patino León
Why you guys, just use RequestFactory?

2012/3/2 Harpal Grover harpal.gro...@gmail.com

 Try using the 'Gilead' project for GWT. This provides Hibernate + GWT
 integration.

 --
 Harpal Grover
 President
 *Harpal Grover Consulting Inc*


 On Fri, Mar 2, 2012 at 7:35 AM, Frank frank.wyna...@gmail.com wrote:

 You can't just use any Java library on the GWT client side since GWT is
 not Java.
 Hibernate uses a lot of stuff that the GWT compiler can't translate to
 javascript so using hibernate in this way is not going to work.

 You can however offcourse use Hibernate at the serverside.
 To have a good integration you can think hard (this is what I did) and
 create your own solution, or you can Google for GWT hibernate as there is
 a project available some where that does this.

 Op donderdag 1 maart 2012 13:15:11 UTC+1 schreef monical...@gmail.comhet 
 volgende:

 Hi all,
 I'm programming with GWT and I would like to use Hibernate as
 persistence framework .. But I have a problem when I make an action
 that I perform the operation of the log (I click on the button) come
 out the following errors:

 00:00:11,621 [ERROR] Line 20: No source code is available for type
 org.apache.commons.logging.**Log; did you forget to inherit a required
 module?

 00:00:11,621 [ERROR] Line 20: No source code is available for type
 org.apache.commons.logging.**LogFactory; did you forget to inherit a
 required module?

 00:00:11,621 [ERROR] Line 34: No source code is available for type
 org.hibernate.Session; did you forget to inherit a required module?

 00:00:11,621 [ERROR] Line 37: No source code is available for type
 org.hibernate.**HibernateException; did you forget to inherit a
 required
 module?

 00:00:11,622 [ERROR] Line 69: No source code is available for type
 org.hibernate.LockMode; did you forget to inherit a required module?

 00:00:11,622 [ERROR] Line 105: No source code is available for type
 org.hibernate.criterion.**Criterion; did you forget to inherit a
 required module?

 00:00:11,622 [ERROR] Line 107: No source code is available for type
 org.hibernate.Criteria; did you forget to inherit a required module?

 Infine lancia UmbrellaException


 However, in the configuration file path gwt.xml also specific classes
 of the persistence of the type:

 source path='persistence'/

 Thank you for availability.

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

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




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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: ValueListBox in GWT editor with one-to-one relationship creating a new entry in related table

2012-02-25 Thread Daniel Mauricio Patino León
I have some kind of problem lke yours.


I am creating a new Proxy:

LayoutExampleRequest r = requestFactory.employeeRequest();
DepartmentProxy d  = r.create(DepartmentProxy.class);
r.save(d);
departmentEditor.editProxy(d, r);

Then pass the Proxy and the Request(LayoutExampleRequest ) to my editor

driver.edit(proxy, request);

Ultil here ! everything works as espected. Now iam getting with a suggest
box Proxys of EmployeeProxy.

search = new SuggestBox(new SuggestOracle() {
@Override
public void requestSuggestions(final Request request,final Callback
callback) {
System.out.println(request.getQuery());

//ignore less than 3
if(request.getQuery().length()  3){
 requestFactory.employeeRequest().search(request.getQuery()).fire(new
ReceiverListEmployeeProxy(){
@Override
public void onSuccess(ListEmployeeProxy response) {

ListMySuggestionEmployeeProxy suggestions = new
ArrayListMySuggestionEmployeeProxy();
for(EmployeeProxy e:response){
MySuggestionEmployeeProxy suggestion = new MySuggestionEmployeeProxy();
suggestion.setModel(e,e.getFirstName(),e.getFirstName()+
+e.getLastName());
suggestions.add(suggestion);
}
callback.onSuggestionsReady(request, new Response(suggestions));
}
 });
}
}
});

MySuggestion is a wrapper class to handle the EmployeeProxy.

Now i want to add this EmployeeProxy to my DeparmentProxy since i have a
@OneToOne on JPA.


search.addSelectionHandler(new SelectionHandlerSuggestOracle.Suggestion()
{

@Override
public void onSelection(SelectionEventSuggestion event) {
MySuggestionEmployeeProxy s =
(MySuggestionEmployeeProxy)event.getSelectedItem();
proxy.setSupervisor(s.getModel());
}
});

proxy is a EntityProxy for Deparment

then i fire the driver:


departmentEditor.getDriver().flush().fire(new ReceiverVoid() {
@Override
public void onSuccess(Void response) {
Window.alert(Success);


// refresh the datagrid
Range range = dataGrid.getVisibleRange();
dataGrid.setVisibleRangeAndClearData(range, true); //1st way

// create a new DepartmentProxy to bind to
the Editor.
createProxy();

 // change button text
 updateButton.setText(Save);

}
@Override
public void onConstraintViolation(SetConstraintViolation? violations) {
for(ConstraintViolation v :violations){
Window.alert(v.getMessage()+ +v.getPropertyPath());
}

}

@Override
public void onFailure(ServerFailure error) {
Window.alert(error.getMessage());
}
});


The problem is iam getting ConstraintViolations from the EmployeeProxy, is
like the driver atach the EmployeeProxy but with null values.
(Take a look iam validating my Entityes with  *JSR*-*330* )

Dont know how to make a relationship with a new Proxy with other taked from
the server.


Any help would be nice!

Thank you


2012/2/25 Thomas Broyer t.bro...@gmail.com

 Without seeing more code, I'd say it's your server-side code fault: when
 sending the Address back to the server, you're not retrieving the entity
 back from the database but creating a new one, *or* you don't attach the
 entity correctly to your session when persisting, which then persists a
 new row instead of updating an existing one.


 On Friday, February 24, 2012 5:31:04 PM UTC+1, Rocky wrote:

 Hi,

 I have two objects person and address

 class Person{

 String name;

 @one-to-one
 Address adderss;
 }

 class Address{

 String HNo;

 String street;

 String zip;
 }

 I  developed a screen with Person information  and a ValueListBox with
 all the available addresses and a save button. By clicking on save
 button I need to map only one address to a new Person object. I am
 using RequestFactoryEditorDriver. But when i click on save button, a
 new addess row is getting created with Null values and its id is
 refering by new Person row in database instead of refering already
 selected Address object in the ValueListBox.

 Please suggest...

 Thanks,
 Rocky


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

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: Deploy GWT App to Tomcat - Validation Errors

2012-02-22 Thread Daniel Mauricio Patino León
I used ti had this kind of problems.

First see this:
http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation


And make sure there are not errors. Then clean the project then build.

And finally compile to deploy


Good look.

2012/2/20 Henry Crocker whc...@gmail.com

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

 SEVERE: Unexptected error java.lan.RuntimeException: The
 RequestFactory ValidationTool must be run for the
 com.ca.queueanagertoo.shared.QueueManagerToolRequestFactory
 RequestFactory type at

 com.google.web.bindery.requestfactory.vm.impl.Deobfuscator#Builder.load(Deobfuscator.java:
 59)..

 I receive the following during compile from eclipse:

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

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

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

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

 Thanks.

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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

2012-02-22 Thread Daniel Mauricio Patino León
I recomend to you see this:

http://code.google.com/intl/es-419/webtoolkit/doc/latest/DevGuideUiPanels.html


Good Look

2012/2/22 viv123 vivien.chan...@gmail.com

 why is it so hard to drag widgets around? Did I miss anything? I wan to
 have 3 simple panels, with cellbrowser in each of them. The first one is
 easy to do, flying to the top. But the second panel always dropped to the
 bottom and I can not get it close to my first panel. I have not even add
 the third one yet

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



Re: How do I call getServletContext from within GWT?

2012-02-22 Thread Daniel Mauricio Patino León
getServletContext().getRealPath(/)

Since RemoteServiceServlet is a subclass of HttpServlet

Will give you the path. This on server side ofcourse.

2012/2/22 Bill M blinte...@aol.com

 Hi all,

 Can someone explain to me how to call getServletContext() from within
 GWT?

 I need to obtain the servlet's real path so I can open a file.

 Could someone shoot me some sample code on how to do this?

 Thanks so much.

 PS - Are there any GWT books out there that are uptodate on the
 current features of GWT?
  I haven't seen any.

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: ColumnSorting with CellTable

2012-02-22 Thread Daniel Mauricio Patino León
final TextColumnPersonProxy lastNameColumn = new
TextColumnPersonProxy() {
  @Override
  public String getValue(PersonProxy contact) {
return contact.getLastName();
  }
};
lastNameColumn.setSortable(true);
cellTable.addColumn(lastNameColumn,Last Name);

AsyncDataProviderPersonProxy provider = new
AsyncDataProviderPersonProxy() {
@Override
protected void onRangeChanged(final HasDataPersonProxy display) {


   final Range range = display.getVisibleRange();
   final PersonRequest r2 = requestFactory.personRequest();
   final ColumnSortList sortList = cellTable.getColumnSortList();
   final ListSortConfigProxy sorts = new ArrayListSortConfigProxy();
   for(int i=0; i sortList.size();i++){

   if(sortList.get(i).getColumn().equals(lastNameColumn)){
 SortConfigProxy p = r2.create(SortConfigProxy.class);
 p.setColumn(lastName);
 p.setOrder(sortList.get(i).isAscending() ? asc : desc);
 sorts.add(p);
 }
}


r2.getAllPersons(sorts,range.getStart(),range.getLength()).with(pet).fire(new
ReceiverListPersonProxy(){
 @Override
public void onSuccess(ListPersonProxy response) {
updateRowData(range.getStart(), response);
}
});

}

@Override
public void addDataDisplay(HasDataPersonProxy display) {
 super.addDataDisplay(display);
 requestFactory.personRequest().countPersons().fire(new
ReceiverLong(){
  public void onSuccess(Long response) {
  updateRowCount(response.intValue(), true);
}
  });
}
};
provider.addDataDisplay(cellTable);

SortConfigProxy  is a ValueProxy that send to the server side the sort
column information.

On the server side.

public ListPerson getAllPersons(ListSortConfig sortConfig,int start,int
end){
Session session = HibernateUtil.getSessionFactory().openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
Criteria cri =
session.createCriteria(Person.class).setFirstResult(start).setMaxResults(end);
if(sortConfig.size()0){
System.out.println(order - +sortConfig);
for(SortConfig sort:sortConfig){
if(sort.getOrder().equals(asc))
cri.addOrder(Order.asc(sort.getColumn()));
else
cri.addOrder(Order.desc(sort.getColumn()));
}
}

@SuppressWarnings(unchecked)
ListPerson persons = cri.list();
tx.commit();
return persons;
} catch (RuntimeException e) {
if (tx != null)
tx.rollback();
throw e;
} finally {
session.close();
}
}

Example with Hibernate.

good luck

2012/2/21 kapricanon kaprica...@gmail.com

 Hi

 I am using the sample code example for ListDataProvider column sorting

 (http://code.google.com/webtoolkit/doc/latest/
 DevGuideUiCellTable.html#columnSorting)

  to sort on a column in my application. Debugging the application I
 can see the column is being sorted after I click on column header but
 the display is never refreshed in the view.

 Things to note is I am using paging for displaying my data as the data
 can be quite huge.

 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.




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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 to Swing-conversion

2012-02-22 Thread Daniel Mauricio Patino León
For me would be more easy to use Web services than try to implement RPC on
Java SE with Swing.

Or maybe take at look of this:

http://code.google.com/p/google-gson/

Good luck

2012/2/22 Jim Douglas jdou...@basis.com

 I'm not sure how you'd automate something like that.  We did it the
 hard way -- define a generic API for manipulating windows and
 controls, write two backends for it (Swing and GWT) to target at
 runtime.  Nothing automatic, though; just a lot of hard work.

 On Feb 22, 6:53 am, Lothar Kimmeringer j...@kimmeringer.de wrote:
  Hello Thomas,
 
  Am 22.02.2012 15:47, schrieb Thomas Broyer:
 
 
 
   On Wednesday, February 22, 2012 3:44:42 PM UTC+1, Cerberus wrote:
 
   Am 22.02.2012 14:35, schrieb Alain Ekambi:
Why do you need a swing app ? Any specific reason?
 
   There are specific reasons namely OSI levels 8 and 9: politics and
 religion ;-)
   Seriously: I need to implement an application that should run as
 desktop appli-
   cation and as application in a browser (the desktop-application
 can't run as
   browser-application for some reason). So I need to implement twice
 or find a
   way to get one using the other.
 
   This is partly why Adobe AIR and Titanium Desktop (among others) have
 been made.
   And it's the cheapest solution you could find.
 
  Without going into detail, I'm a bit stuck with the need to convert it
  to Swing. The target framework is fixed here.
 
  Best regards,
 
  Lothar

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: RequestFactoryEditorDriver example?

2012-02-17 Thread Daniel Mauricio Patino León
Buen ejemplo de GXT 3.0 y GWT 2.4.

Sin duda usar GXT resuelve mucho de lo que con GWT tendrías que codear por
ti mismo.
Espero que la versión completa este lista pronto.


Saludos.

2012/2/16 poseidonjm poseido...@gmail.com

 I have a tutorial in spanish
 http://vivagwt.blogspot.com/2012/02/basic-grid-with-ext-gwt-30-beta2.html
 and the source code is in eclipse
 http://www.2shared.com/file/__WFqp_Z/ExampleRF.html
 Greetings

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: save data to database with hibernate and rpc

2012-01-27 Thread Daniel Mauricio Patino León
I think the best way is use RequestFactory. Forguet DTO's or third party
librarys

2012/1/27 Sebastian Gurin sgu...@softpoint.org

 I agree with you about gilead intrusiveness. Also I see the project is not
 mantained any more. In my case I didn't get it to work, but google's
 using_gwt_with_hibernate.html document refer to it as a sollution. That is
 why I recommended it.

 I will keep investigating Hibernate filter for future gwt+hibernate
 projects. Thanks for the info.

 Regards.

 On Fri, 27 Jan 2012 00:03:06 -0300
 Juan Pablo Gardella gardellajuanpa...@gmail.com wrote:

  Instead of use gilead (to me intrusive), you can use Hibernate filter.
 See
 
 http://groups.google.com/group/google-web-toolkit/browse_thread/thread/7e46e8c33e7ee5da
 
  El 26 de enero de 2012 20:56, Sebastian Gurin sgu...@softpoint.org
 escribió:
 
   Hi I developed my web apps gwt and persist the model with hibernate.
 You
   have lot of articles about it
  
  
  
 http://code.google.com/intl/es-ES/webtoolkit/articles/using_gwt_with_hibernate.html
  
   my advice:
   The main problem you will encounter is compatibility issues between
 model
   object managed by hibernate and gwt rpc java object serialization.
  
   Hibernate poblate your bean classes using datatypes unsupported by gwt
   rpc. Gwt rpc only understand common java type implementations ( like
   HashMap, HashSet ) . In particular, in many-relationships, if you
 configure
   hibernate with lazy=false for automatically loading collection
   properties, hibernate will use java.lang.Set implementation
 unsupported by
   gwt rpc serialization.
  
   I recommend you tu use data transfer objects (DTO) object to wrap your
   real model classes.
  
   If you really wnt to use your existing java model directly with
 hibernate
   and gwt rpc, you have choices:
  
   1) use a library like http://noon.gilead.free.fr/gilead/.
   2) do not let hibernate manage collections:
  - Use lazy=true in hiberate
  - Make your DAO or BL classes API to provide with methods for
   retrieving many-relations - like ListApple getApples(long treeId);
 make
   sure those methods return objects compatible with gwt rpc (like
 LinkedList,
   HashSet, etc)
  
   good look
  
   On Thu, 26 Jan 2012 11:32:54 -0800 (PST)
   odon odon.d@gmail.com wrote:
  
hii...
i need help ...
i get problem with save data to database with hibernate.
when i executed the event, i always get on failure
this is the code...
   
Button btn= new Button(create);
btn.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
  Info info= new Info();
  info.setId(null);
   
 info.setUsername(txtbxUsername.getText());
   
   info.setPassword(passwordTextBox.getText());
  infoService.saveInfo(info, new
   AsyncCallbackString() {
   
  @Override
  public void onSuccess(String
   result) {
  // TODO Auto-generated
   method stub
   
 Window.alert(success);
   
  }
   
  @Override
  public void onFailure(Throwable
   caught) {
  // TODO Auto-generated
   method stub
  Window.alert(fail+
   caught.getMessage());
  }
  });
  }
  });
   
how to make it on success?
please your help :)
   
--
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.
   
  
  
   --
   Sebastian Gurin sgu...@softpoint.org
  
   --
   You received this message because you are subscribed to the Google
 Groups
   Google Web Toolkit group.
   To post to this group, send email to
 google-web-toolkit@googlegroups.com.
   To unsubscribe from this group, send email to
   google-web-toolkit+unsubscr...@googlegroups.com.
   For more options, visit this group at
   http://groups.google.com/group/google-web-toolkit?hl=en.
  
  
 
  --
  You received this message because you are subscribed to the Google
 Groups Google Web Toolkit group.
  To post to this group, send email to google-web-toolkit@googlegroups.com
 .
  To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group at
 

How to transfer ColumnSortList info to the server side.

2012-01-27 Thread Daniel Mauricio Patino León
Iam taying to figure out how to send the informaction of the
ColumnSortList of a CellTable to do the Order on the server side.

I know RequestFactory can't trasnport Beans, just primitive types and
list (of course EntityProxy and ValueProxy)


So how can i send the info on ColumnSortList to the server trought
RequestFactory

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



Re: Invoking C++ programs on the client-side

2012-01-27 Thread Daniel Mauricio Patino León
Nice! native code on the browser. Sounds crazy!  good luck

2012/1/25 Gal Dolber gal.dol...@gmail.com

 You could check out this project http://code.google.com/p/nativeclient/


 On Wed, Jan 25, 2012 at 6:34 PM, mmorckos mikey.morc...@gmail.com wrote:

 Hello,

 I'm building a distributed system and I'd like to try GWT to build the
 client-side.

 I need the user to have a speech-based input. I'm using a C/C++ based
 speech recognition engine and I'd like to know if it's possible to
 call C++ code from within a GWT-based application.

 I'd really appreciate a prompt response.

  Regards,
 Michael

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




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

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





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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



Re: How to transfer ColumnSortList info to the server side.

2012-01-27 Thread Daniel Mauricio Patino León
Ok! i created this:

@ProxyFor(SortConfig.class)
public interface SortConfigProxy extends ValueProxy {
public String getColumn();
public void setColumn(String column);
public String getOrder();
public void setOrder(String order);
}

So my problem is how to create a instance of that proxy on the client side.

PersonRequest r = requestFactory.personRequest();
SortConfigProxy p = r.create(SortConfigProxy.class);
p.setColumn(myAge);
p.setOrder(desc);


i get an error.


Caused by: java.lang.IllegalArgumentException: Attempting to edit an
EntityProxy previously edited by another RequestContext
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.checkStreamsNotCrossed(AbstractRequestContext.java:987)
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.editProxy(AbstractRequestContext.java:509)

=S EntityProxy ?

Any help wuold be apreciated!


Thank you



2012/1/27 Daniel Mauricio Patino León ceo.lion@gmail.com

 Iam taying to figure out how to send the informaction of the
 ColumnSortList of a CellTable to do the Order on the server side.

 I know RequestFactory can't trasnport Beans, just primitive types and
 list (of course EntityProxy and ValueProxy)


 So how can i send the info on ColumnSortList to the server trought
 RequestFactory

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



Re: How to transfer ColumnSortList info to the server side.

2012-01-27 Thread Daniel Mauricio Patino León
r.test(p).fire();
sorts.add(p);


test() method in my RequestContext

RequestSortConfigProxy test(SortConfigProxy sortConfigProxy);


call my DAO!

public SortConfig test(SortConfig config){
return new SortConfig(config.getColumn(), config.getOrder());
}

Then i can use the proxy to send it again to the server.

Can i only create a ValueProxy from the Server Side?

From the Getting Started

A proxy type will be available on the client if it is:

   - Referenced from a RequestContext as a Request parameter or return type.



2012/1/27 Daniel Mauricio Patino León ceo.lion@gmail.com

 Ok! i created this:

 @ProxyFor(SortConfig.class)
 public interface SortConfigProxy extends ValueProxy {
 public String getColumn();
  public void setColumn(String column);
 public String getOrder();
 public void setOrder(String order);
 }

 So my problem is how to create a instance of that proxy on the client side.

 PersonRequest r = requestFactory.personRequest();
 SortConfigProxy p = r.create(SortConfigProxy.class);
 p.setColumn(myAge);
 p.setOrder(desc);


 i get an error.


 Caused by: java.lang.IllegalArgumentException: Attempting to edit an
 EntityProxy previously edited by another RequestContext
 at
 com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.checkStreamsNotCrossed(AbstractRequestContext.java:987)
 at
 com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.editProxy(AbstractRequestContext.java:509)

 =S EntityProxy ?

 Any help wuold be apreciated!


 Thank you



 2012/1/27 Daniel Mauricio Patino León ceo.lion@gmail.com

 Iam taying to figure out how to send the informaction of the
 ColumnSortList of a CellTable to do the Order on the server side.

 I know RequestFactory can't trasnport Beans, just primitive types and
 list (of course EntityProxy and ValueProxy)


 So how can i send the info on ColumnSortList to the server trought
 RequestFactory

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




 --
 ISC. Daniel Mauricio Patiño León.
 Director ejecutivo
 Liondev S.A. de C.V.






-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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



Re: GWT + CellTable + Paging with Hibernate

2012-01-24 Thread Daniel Mauricio Patino León
Any one can show me the direction of how to use Paging? Thank yopu

2012/1/23 Daniel Mauricio Patino León ceo.lion@gmail.com

 Hello everyone.

 I dont understan how paging works, and i cant get a SimplePaging get
 work with my example.

 I have a CellTable whit my own AsyncDataProvider:

 public class PersonDataProvider extends
 AsyncDataProviderPersonProxy  {

private final PersonRequestFactory requestFactory;

public PersonDataProvider(PersonRequestFactory requestFactory) {
super(null);
this.requestFactory = requestFactory;
}
@Override
protected void onRangeChanged(final HasDataPersonProxy display) {
final Range range = display.getVisibleRange();
final int start = range.getStart();
/* not used insted use
 display.getVisibleRange().getLength() as MAX
 values*/
final int end = start + range.getLength();



 requestFactory.personRequest().getAllPersons(start,display.getVisibleRange().getLength()).with(pet).fire(new
 ReceiverListPersonProxy(){
 @Override
public void onSuccess(ListPersonProxy response) {
 /* what should i have here? */
 updateRowData(start, response);
}
});
}

 @Override
public void addDataDisplay(HasDataPersonProxy display) {
 super.addDataDisplay(display);
  // Request the count anytime a view is added.
 requestFactory.personRequest().countPersons().fire(new
 ReceiverLong(){
  public void onSuccess(Long response) {
  // the total count from server
  updateRowCount(response.intValue(), true);
}
  });
}
 }


 Then i got in my DataAccesObject:

 public ListPerson getAllPersons(int start,int max){
Session session =
 HibernateUtil.getSessionFactory().openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();

System.out.println( limit +start+,5);
@SuppressWarnings(unchecked)
ListPerson persons =

 session.createCriteria(Person.class).addOrder(Order.desc(myAge)).setFirstResult(start).setMaxResults(max).list();

System.out.println(List size +persons.size());

tx.commit();
return persons;
} catch (RuntimeException e) {
if (tx != null)
tx.rollback();
throw e;
} finally {
session.close();
}
 }


 But i cant it work the paging isn't show me the right berhaivor.

 How can i use SimplePager with Hibernate on the server Side.

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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 + CellTable + Paging with Hibernate

2012-01-23 Thread Daniel Mauricio Patino León
Hello everyone.

I dont understan how paging works, and i cant get a SimplePaging get
work with my example.

I have a CellTable whit my own AsyncDataProvider:

public class PersonDataProvider extends
AsyncDataProviderPersonProxy  {

private final PersonRequestFactory requestFactory;

public PersonDataProvider(PersonRequestFactory requestFactory) {
super(null);
this.requestFactory = requestFactory;
}
@Override
protected void onRangeChanged(final HasDataPersonProxy display) {
final Range range = display.getVisibleRange();
final int start = range.getStart();
/* not used insted use display.getVisibleRange().getLength() as 
MAX
values*/
final int end = start + range.getLength();


requestFactory.personRequest().getAllPersons(start,display.getVisibleRange().getLength()).with(pet).fire(new
ReceiverListPersonProxy(){
 @Override
public void onSuccess(ListPersonProxy response) {
 /* what should i have here? */
 updateRowData(start, response);
}
});
}

 @Override
public void addDataDisplay(HasDataPersonProxy display) {
 super.addDataDisplay(display);
  // Request the count anytime a view is added.
 requestFactory.personRequest().countPersons().fire(new
ReceiverLong(){
  public void onSuccess(Long response) {
  // the total count from server
  updateRowCount(response.intValue(), true);
}
  });
}
}


Then i got in my DataAccesObject:

public ListPerson getAllPersons(int start,int max){
Session session = 
HibernateUtil.getSessionFactory().openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();

System.out.println( limit +start+,5);
@SuppressWarnings(unchecked)
ListPerson persons =
session.createCriteria(Person.class).addOrder(Order.desc(myAge)).setFirstResult(start).setMaxResults(max).list();

System.out.println(List size +persons.size());

tx.commit();
return persons;
} catch (RuntimeException e) {
if (tx != null)
tx.rollback();
throw e;
} finally {
session.close();
}
}


But i cant it work the paging isn't show me the right berhaivor.

How can i use SimplePager with Hibernate on the server Side.

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



Validation on client side whit Editors

2012-01-19 Thread Daniel Mauricio Patino León
Im traying to use Validation.

my module xml has:

inherits name=org.hibernate.validator.HibernateValidator /

replace-with
class=mx.com.liondev.UIBinder.client.SampleValidatorFactory
when-type-is class=javax.validation.ValidatorFactory /
/replace-with

My SampleValidatorFactory Class:

public final class SampleValidatorFactory extends
AbstractGwtValidatorFactory {
  @GwtValidation(value = Person.class, groups = {})
  public interface GwtValidator extends Validator {
  }
  @Override
  public AbstractGwtValidator createValidator() {
return GWT.create(GwtValidator.class);
  }
}

My pojo:

public class Person implements Serializable{
private static final long serialVersionUID = -120449367149704989L;

@Size(min = 10)
private String firstName;
private String lastName;
etc...
}

And my Editor:

@UiHandler(myButton)
void handleClick(ClickEvent e){
Person p = myDriver.flush();

Validator validator =
Validation.buildDefaultValidatorFactory().getValidator();
@SuppressWarnings(unused)
SetConstraintViolationPerson violations = 
validator.validate(p);

if(myDriver.hasErrors()){
Window.alert(myDriver.getErrors()+);
return;
}

Window.alert(Binding +p.getFirstName()+ +p.getLastName()+ 
has a
pet whit name +p.getMyPet().getName());
}


I should expect get violations  if the @Size(min = 10) of the String
firstName is violated


but i cant get it work

the error output is:


16:07:05.088 [ERROR] [uibinder] Uncaught exception escaped

com.google.gwt.event.shared.UmbrellaException: One or more exceptions
caught, see full set in UmbrellaException#getCauses
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
129)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at
com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:
116)
at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:
177)
at
com.google.gwt.user.cellview.client.CellWidget.onBrowserEvent(CellWidget.java:
180)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
172)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
337)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
218)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
136)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
172)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:
292)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
546)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
363)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Deferred binding failed for
'mx.com.liondev.UIBinder.client.SampleValidatorFactory
$GwtValidator' (did you forget to inherit a required module?)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at
mx.com.liondev.UIBinder.client.SampleValidatorFactory.createValidator(SampleValidatorFactory.java:
24)
at
com.google.gwt.validation.client.AbstractGwtValidatorFactory.getValidator(AbstractGwtValidatorFactory.java:
80)
at 

Re: GWT DialogBox Jquery DatePicker

2012-01-19 Thread Daniel Mauricio Patino León
convence a tu cliente de usar el Date picker del GWT. No tiene sentido
reemplazarlo por el de jQuery.


2012/1/19 Bruno MT bruno.martine...@gmail.com

 Hello,

 I'm spanish java developer, like u can read(horrible english...)

 I'm a little newbie in GWT development. I enter in a maintence
 project, and it's the worst code I had ever seen...
 Client told that he wants to use Jquery DatePicker in a GWT dialogBox.
 In Internet Explorer everything is all right, but in FF the calendar
 showed by Jquery is not responding to click events, is like jquery z-
 index were less than dialgobox z-index, but its not true.

 GWT 1 - Bruno 0

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




-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
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: Validation on client side whit Editors

2012-01-19 Thread Daniel Mauricio Patino León
Hi Nick

But now i get another errors.

[ERROR] [uibinder] - Errors in
'generated://47C2CAC521038D12F28F4909D7B7AE37/mx/com/liondev/UIBinder/shared/_PersonValidatorImpl.java'
[ERROR] [uibinder] - Line 36: No source code is available for type
org.hibernate.validator.constraints.impl.SizeValidatorForString; did you
forget to inherit a required module?
[ERROR] [uibinder] - Line 36: No source code is available for type
org.hibernate.validator.constraints.impl.SizeValidatorForCollection; did
you forget to inherit a required module?
[ERROR] [uibinder] - Line 36: No source code is available for type
org.hibernate.validator.constraints.impl.SizeValidatorForMap; did you
forget to inherit a required module?
[INFO] [uibinder] - See snapshot:
C:\Users\leon\AppData\Local\Temp\mx.com.liondev.UIBinder.shared._PersonValidatorImpl9215255454442796678.java

It seems that don't recognize the hibernate @Size(min = 10) anotation.

I got the hibernate validation jars on web-inf/lib/

This the complete trace


20:03:12.768 [ERROR] [uibinder] Failed to create an instance of
'mx.com.liondev.UIBinder.shared._PersonValidator' via deferred binding

java.lang.NoClassDefFoundError:
org/hibernate/validator/constraints/impl/SizeValidatorForString
at
mx.com.liondev.UIBinder.shared._PersonValidatorImpl.lt;initgt;(_PersonValidatorImpl.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at
mx.com.liondev.UIBinder.shared._PersonValidator.lt;clinitgt;(_PersonValidator.java:6)
at
mx.com.liondev.UIBinder.client.GwtValidatorImpl.validate(GwtValidatorImpl.java:24)
at mx.com.liondev.UIBinder.client.MyForm.handleClick(MyForm.java:58)
at
mx.com.liondev.UIBinder.client.MyForm_MyFormUiBinderImpl$1.onClick(MyForm_MyFormUiBinderImpl.java:57)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:54)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at
com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at
com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at
com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at
com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116)
at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177)
at
com.google.gwt.user.cellview.client.CellWidget.onBrowserEvent(CellWidget.java:180)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at

Best way to prevent dual login in gwt.

2011-08-17 Thread Daniel Mauricio Patino León
Some one can give me a idea of how to manage this? i dont want let
users log  in in my GWT app (pure GWT dom manipulation) in two places
at the same time, including the same browser (different tabs)

any help be apreciated

-- 
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: Best way to prevent dual login in gwt.

2011-08-17 Thread Daniel Mauricio Patino León
We use our own security implementation (implement shiro or spring will delay
our development), i just want a idea of how to implement this whit GWT only,
no external fw, a simple way.

I was thinking in Timer and check every some time if the USER - SESSION ID
are correct
but isn't the best way... imagine 1,000 users requesting the server every X
time

2011/8/17 Juan Pablo Gardella gardellajuanpa...@gmail.com

 See apache shiro or spring security. You must manage authentication and
 authorization in server side

 2011/8/17 Daniel Mauricio Patino León ceo.lion@gmail.com

 Some one can give me a idea of how to manage this? i dont want let
 users log  in in my GWT app (pure GWT dom manipulation) in two places
 at the same time, including the same browser (different tabs)

 any help be apreciated

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


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


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



Re: Best way to prevent dual login in gwt.

2011-08-17 Thread Daniel Mauricio Patino León
I think Juan Pablo Gardella just give me a idead, I will check every Action
of the user instead. i mean when the user open a new module or do some CRUD
operation and yes the server side
with help of the user table (db),  and some kind of Callback wrapper.

2011/8/17 Juan Pablo Gardella gardellajuanpa...@gmail.com

 You must check every request with a filter, and in the case the request is
 not valid, show the log. In meanwhile in client side don't check anithing

 2011/8/17 Daniel Mauricio Patino León ceo.lion@gmail.com

 We use our own security implementation (implement shiro or spring will
 delay our development), i just want a idea of how to implement this whit GWT
 only, no external fw, a simple way.

 I was thinking in Timer and check every some time if the USER - SESSION ID
 are correct
 but isn't the best way... imagine 1,000 users requesting the server every
 X time

 2011/8/17 Juan Pablo Gardella gardellajuanpa...@gmail.com

 See apache shiro or spring security. You must manage authentication and
 authorization in server side

 2011/8/17 Daniel Mauricio Patino León ceo.lion@gmail.com

 Some one can give me a idea of how to manage this? i dont want let
 users log  in in my GWT app (pure GWT dom manipulation) in two places
 at the same time, including the same browser (different tabs)

 any help be apreciated

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


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


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


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


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



GWT Modules

2011-06-30 Thread Daniel Mauricio Patino León
Since i read the FAQ and features of GWT and i dindt see info about
this, can someone please tell me how the modules works?


I mean if  i dev a Module Login whit a few clasess (Fast download just
a few kb's)
then i dev a Module A w/ arround 40 clasess (huge kb's)
then i dev a Module B w/ arround 40 clasess too

then i put a inherent to A and B  on my Login Module xml file
the final ...XXX.cache.hmtl of my Login Module will load all
the code from the A and B Modules?
or it will load if i use them? when i say use, i mean create objects
from that Modules
ModuleAObject obj = new 
or just for import a class from a Module A or B  my app will load all
the js generated

Can i work here whit code spliting ? i mean:

 GWT.runAsync(new RunAsyncCallback() {
  public void onFailure(Throwable caught) {
Window.alert(Code download failed);
  }

  public void onSuccess() {

/* the code will be loaded async */
ModuleAObject obj = new ModuleAObject ();

  }
});



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

2011-06-30 Thread Daniel Mauricio Patino León
Nice answer, Thank you Ryan.

I will do some refactor since i think its better dev into Modules than One
BIG Module

What do you think about Modules in GWT, you desing your apps in Modules?

2011/6/30 Ryan McFall mcfall.r...@gmail.com

 I am pretty sure that part of the optimization the compiler does is to
 only include code in the generated .js file that is actually in use.
 Therefore, only implementations of the methods in modules A  B that
 are used by your Login module will be downloaded by the client.

 Ryan

 On Jun 30, 12:58 pm, Daniel Mauricio Patino León
 ceo.lion@gmail.com wrote:
  Since i read the FAQ and features of GWT and i dindt see info about
  this, can someone please tell me how the modules works?
 
  I mean if  i dev a Module Login whit a few clasess (Fast download just
  a few kb's)
  then i dev a Module A w/ arround 40 clasess (huge kb's)
  then i dev a Module B w/ arround 40 clasess too
 
  then i put a inherent to A and B  on my Login Module xml file
  the final ...XXX.cache.hmtl of my Login Module will load all
  the code from the A and B Modules?
  or it will load if i use them? when i say use, i mean create objects
  from that Modules
  ModuleAObject obj = new 
  or just for import a class from a Module A or B  my app will load all
  the js generated
 
  Can i work here whit code spliting ? i mean:
 
   GWT.runAsync(new RunAsyncCallback() {
public void onFailure(Throwable caught) {
  Window.alert(Code download failed);
}
 
public void onSuccess() {
 
  /* the code will be loaded async */
  ModuleAObject obj = new ModuleAObject ();
 
}
  });
 
  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
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



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



Re: Problem with GWT Service results

2011-06-21 Thread Daniel Mauricio Patino León
  RootPanel.get(mainContainer).add(new Label(Array lista 2:
+lista.toString()));
   RootPanel.get().add(new Label(String.valueOf(Array lista 2:
+lista.size(;
   for(int i = 0; i  lista.size(); i++){
   RootPanel.get().add(new Label(BOTON +i));
   }

esto esta fuera del contexto de asíncrono

 public void onSuccess(ArrayListString result) {
 }

ese contrato del AsyncCallback es el que se ejecuta cuando el servidor
regresa el resultado
si ahi tu result esta vacio entonces checa el lado del servidor.
no debes tener problema con lista.addAll(result);  // no addAll(0,x)
ya que esa lista se va a sobreescribir cada llamada al servidor


2011/6/21 Jose Luis Hernandez jose.hernande...@gmail.com

 Hello!
 I have a problem. I am calling to server side on GWT. The results of
 call is an ArrayList (result). Inside onSuccess method another
 ArrayList is wrapped with the result. However, if I want to use
 ArrayList lista outside of onSuccess method it contains 0 elements,
 but inside is like result ArrayList. How can I solve it? I have tried
 to use lista as class attribute, static attribute,... but it doesn't
 run.
 Thanks!

 public void addContainers() throws Exception {
final ArrayListString lista = new ArrayListString();
gwtService.obtainAttributesDevice(1, new
 AsyncCallbackArrayListString(){
@Override
public void onFailure(Throwable caught) {
System.out.println(ERROR);
Window.alert(caught.getMessage());
}
@Override
public void onSuccess(ArrayListString result) {
RootPanel.get(mainContainer).add(new
 Label(Array result:
 +result.toString()));
RootPanel.get().add(new
 Label(String.valueOf(Array result:
 +result.size(;
lista.addAll(0, result);
RootPanel.get(mainContainer).add(new
 Label(Array lista 1:
 +lista.toString()));
RootPanel.get().add(new
 Label(String.valueOf(Array lista 1:
 +lista.size(;
}
});
RootPanel.get(mainContainer).add(new Label(Array lista 2:
 +lista.toString()));
RootPanel.get().add(new Label(String.valueOf(Array lista 2:
 +lista.size(;
for(int i = 0; i  lista.size(); i++){
RootPanel.get().add(new Label(BOTON +i));
}
 }

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



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



Eclipse plugin

2011-06-02 Thread Daniel Mauricio Patino León
Hello there, iam developing whit gwt and  gwt plug in for ecplise

and when i restart the server (usually 2 or 3 times after)

i always get this err

[SPAM] [proyecto] - Invoke native method
@com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/
lang/Object;Ljava/lang/Object;)
[ERROR] [proyecto] - exception thrown
[ERROR] [proyecto] - Out of memory; to increase the amount of
memory, use the -Xmx flag at startup (java -Xmx128M ...)



14:15:21.423 [ERROR] [proyecto] exception thrown

java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:
1078)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.extjs.gxt.ui.client.widget.treepanel.TreePanel.lt;initgt;
(TreePanel.java:273)
at com.liondev.Proyecto.client.Desktop.View.Desktop.lt;initgt;
(Desktop.java:79)
at com.liondev.Proyecto.client.Login.Controller.LoginController
$2.onSuccess(LoginController.java:126)
at com.liondev.Proyecto.client.Login.Controller.LoginController
$2.onSuccess(LoginController.java:1)
at
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:
232)
at
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
287)
at com.google.gwt.http.client.RequestBuilder
$1.onReadyStateChange(RequestBuilder.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
326)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
207)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
132)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)


i tryyed to increse the memory but dont know why i always get this err

thank you for you r help

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