build new editor framework driver to add JSON support feature to editor framework

2014-07-13 Thread saman sheikhtajian


my GWT application work with JSON instead of POJO,I want to bind my forms to 
JSON Objects and vise versa, is it possible add this feature to Editor 
framework ?

How can I extends EditorDriver  build new driver  some thing like 
SimpleJsonEditorDriver ?


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


Re: ConstraintViolationImpl.equals seems incorrect. Please verify / confirm.

2014-07-13 Thread Rutger van der Eijk
Done: https://code.google.com/p/google-web-toolkit/issues/detail?id=8824 

On Sunday, 13 July 2014 22:56:29 UTC+2, Jens wrote:
>
> Please open an issue for it
>
> https://code.google.com/p/google-web-toolkit/issues/list
>
> -- J.
>

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


Re: ConstraintViolationImpl.equals seems incorrect. Please verify / confirm.

2014-07-13 Thread Jens
Please open an issue for it

https://code.google.com/p/google-web-toolkit/issues/list

-- J.

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


Re: ConstraintViolationImpl.equals seems incorrect. Please verify / confirm.

2014-07-13 Thread Rutger van der Eijk
Ok.

Indeed this is the cause of the orginal issue I was facing.

When compiling gwt 2.6.1 from scratch and modifying the equals method to:

public boolean equals(Object obj) {
> if (this == obj)
> return true;
> if (obj == null)
> return false;
> if (getClass() != obj.getClass())
> return false;
> ConstraintViolationImpl other = (ConstraintViolationImpl) obj;
> if (elementType != other.elementType)
> return false;
> if (invalidValue == null) {
> if (other.invalidValue != null)
> return false;
> } else if (!invalidValue.equals(other.invalidValue))
> return false;
> if (leafBean == null) {
> if (other.leafBean != null)
> return false;
> } else if (!leafBean.equals(other.leafBean))
> return false;
> if (message == null) {
> if (other.message != null)
> return false;
> } else if (!message.equals(other.message))
> return false;
> if (propertyPath == null) {
> if (other.propertyPath != null)
> return false;
> } else if (!propertyPath.equals(other.propertyPath))
> return false;
> if (rootBean == null) {
> if (other.rootBean != null)
> return false;
> } else if (!rootBean.equals(other.rootBean))
> return false;
> return true;
> }



the problem is gone.

I am not familiar with inclusion process into a future gwt release. Could 
someone easily do that for me?


best regards,

Rutger

On Saturday, 12 July 2014 23:58:52 UTC+2, Rutger van der Eijk wrote:
>
> Hi,
>
> While trying to understand a weird issue I'm facing (
> http://stackoverflow.com/questions/24599410/gwt-bean-validation-does-not-return-all-constraint-violations-in-compiled-mode
>  
> ) I seem to have found an issue with the equals method 
> of ConstraintViolationImpl that could be at the root of the issue.
>
> As I'm not 100% sure could someone verify my observatiom.
>
> the source (I'm using 2.6.0) of the ConstraintViolationImpl.equals method 
> is:
>
>  @Override
>>   public boolean equals(Object o) {
>> if (this == o) {
>>   return true;
>> }
>> if (!(o instanceof ConstraintViolationImpl)) {
>>   return false;
>> }
>> ConstraintViolationImpl other = (ConstraintViolationImpl) o;
>> return (message == null ? other.message == null : 
>> message.equals(other.message)
>> && propertyPath == null ? other.propertyPath == null :
>>   propertyPath.equals(other.propertyPath)
>> && rootBean == null ? other.rootBean == null : 
>> rootBean.equals(other.rootBean)
>> && leafBean == null ? other.leafBean == null : 
>> leafBean.equals(other.leafBean)
>> && elementType == null ? other.elementType == null : 
>> elementType.equals(other.elementType)
>> && invalidValue == null ? other.invalidValue == null :
>>   invalidValue.equals(other.invalidValue));
>>   }
>
>
> I think the comparisons at the return statement are incorrect as ?: has a 
> lower precedence than &&. (see also 
> http://stackoverflow.com/questions/18788063/why-does-false-falsefalsetrue-return-true
> ).
>
> A simple unit test showing the issue is:
>
> @Test
>> public void equalsReturnsTrueWhileItShouldnt() {
>>
>> Path propertyPath = new PathImpl();
>> String message1 = "[message1]";
>> String message2 = "[message2]";
>> Builder builder = ConstraintViolationImpl.builder();
>> builder.setPropertyPath(propertyPath);
>> // ... normally other fields should be set but not needed to show issue
>> builder.setMessage(message1);
>> ConstraintViolationImpl constraintViolation1 = builder.build();
>> builder.setMessage(message2);
>> ConstraintViolationImpl constraintViolation2 = builder.build(); 
>
>
>> boolean equalsGotten = constraintViolation1
>> .equals(constraintViolation2);
>>
>> assertFalse(equalsGotten);
>> }
>
>
> where the assertion will fail.
>
>
> Am I overlooking something or is this indeed a bug?
>
>
> best regards,
>
> Rutger
>

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


Re: symbolMap file : wrong source line number ?

2014-07-13 Thread Thomas Broyer


On Sunday, July 13, 2014 8:36:59 PM UTC+2, Jens wrote:
>
> GWT optimizes your Java code before transforming it to JavaScript. One of 
> these optimizations is method inlining. In your case your Java code from 
> the @UiHandler method body has been inlined into the class that is 
> generated by the UiBinder generator 
> (HomeViewImpl_HomeViewImplUiBinderImpl$Widgets)
>
> Thats why the exception does not point to your file but instead to the 
> generated UiBinder file.
>

…which you'll find in the "-gen" folder (not "-extra") 

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


Re: symbolMap file : wrong source line number ?

2014-07-13 Thread Jens
GWT optimizes your Java code before transforming it to JavaScript. One of 
these optimizations is method inlining. In your case your Java code from 
the @UiHandler method body has been inlined into the class that is 
generated by the UiBinder generator 
(HomeViewImpl_HomeViewImplUiBinderImpl$Widgets)

Thats why the exception does not point to your file but instead to the 
generated UiBinder file.

-- J.

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


Re: symbolMap file : wrong source line number ?

2014-07-13 Thread 'Thomas Lacroix' via Google Web Toolkit


Hi Paul,

Thanks for the reply. I managed to get the symbolMap file point to the line 
of the method that throws the exception by declaring the method in a java 
body :

 

*myLink**.addClickHandler(new ClickHandler() {*

*   @Override*

*   public void onClick(ClickEvent event) {*

 

Previously I was declaring the clickHandler through the @UiHandler 
annotation :

 

*@UiHandler("myLink ")*

*void onMyLinkClick(ClickEvent e) {*

 

I guess that confuses the symbolMap process because the line that it then 
returned did not correspond to anything I can trace back to the method that 
throws the error.

 

Does someone knows how to make the SymbolMap files correspond to the 
@UiHandler method ?

Otherwise it is not big deal, I will update my scripts to not use the 
@UiHandler.

Thomas

It's probably the line number of the start of the method the exception 
> occurred in.
>
> Paul
>

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