Not sure but you could try a IntegerBox (
http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/IntegerBox.html)
 
or ValueBox (
http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/ValueBox.html)
 
?


On Thursday, August 8, 2013 10:04:25 AM UTC+2, aurelie...@gmail.com wrote:
>
> I Forgot.
> Tried to change <g:TextBox stylePrimaryName="{style.editField}" /> to <g: 
> IntegerBox but without success
>  
> <g: ShortBox   doesn't exist ?
>  
> Pierre
>  
>
> Le jeudi 8 août 2013 09:28:50 UTC+2, aurelie...@gmail.com a écrit :
>
>> Hi there,
>>
>> I do have a Strange behaviour on my project regarding class 
>> ValueBoxEditor.
>>
>> Project is using maven, rf, hibernate, spring.
>> Focusing on the problem, i'm trying to get values from a postgre database 
>> and grab two datas to a modal window. A String and a short value. (postgre 
>> respectively character and smalint )
>>
>> Error is : 
>>
>> com.google.web.bindery.event.shared.UmbrellaException: Exception caught: 
>>> java.lang.Short cannot be cast to java.lang.String
>>
>> Here are the files involved : 
>>
>>  PostgreMvtEditor .java
>>
>> public
>>
>>  class PostgreMvtEditor extends Composite implements 
>> Editor<PostgreMvtProxy> {
>>
>> interface Binder extends UiBinder<Widget, PostgreMvtEditor> {
>>
>> }
>>
>> @UiField
>>
>>  ValueBoxEditorDecorator<String> num;
>>
>>  
>>
>> @UiField
>>
>>  ValueBoxEditorDecorator<Short> confirm;
>>
>>  [...]
>>
>>  
>> Xml linked
>>
>>      <e:ValueBoxEditorDecorator ui:field="confirm"
>>>         stylePrimaryName="{style.editField}">
>>>         <e:valuebox>
>>>           <g:TextBox stylePrimaryName="{style.editField}" />
>>>         </e:valuebox>
>>>       </e:ValueBoxEditorDecorator>
>>>
>>  
>> Proxy (ValueProxy) has got the following Inside
>>
>>  
>>
>>> Short getConfirm();
>>> void setConfirm(Short confirm);
>>>
>> Serializable Class has got a proper field 
>>
>> private Short   confirm;
>>
>> When debugging, it get through ValueBoxEditor.class and setValue(T value) 
>> which follows
>>
>>   @Override
>>   public void setValue(T value) {
>>     peer.setValue(this.value = value);
>>   }
>>
>> value is seen as a short equals to 5
>>
>> peer is seen as <input class="GD-W3NDFK" type="text"> and many others 
>> properties. Nothing is written regarding String.
>>  
>> But it throws an exception : java.lang.ClassCastException: 
>> java.lang.Short cannot be cast to java.lang.String
>> Did i misunderstood something ? 
>>  
>> I tried to cast at different point but either maven is crying or 
>> application.
>> Any workaround for this ?
>>
>> Thanks in advance.
>>
>> Pierre
>>  
>>
>>

-- 
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/groups/opt_out.


Reply via email to