Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Location
    Earth
    Posts
    243
    Vote Rating
    1
    nbuesing is on a distinguished road

      0  

    Default Entering invalid number in Number Field, JavaScritpException

    Entering invalid number in Number Field, JavaScritpException


    GXT 3.0.0-beta2

    When I enter an invalid number in a number field, for example "3.4.5.6", instead of the the mark invalid actually getting called, it throws an exception.

    Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
    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.dom.client.Node$.appendChild$(Node.java)
    at com.sencha.gxt.widget.core.client.form.error.SideErrorHandler.markInvalid(SideErrorHandler.java:116)
    at com.sencha.gxt.widget.core.client.form.Field.markInvalid(Field.java:446)
    at com.sencha.gxt.widget.core.client.form.Field.markInvalid(Field.java:253)
    at com.sencha.gxt.widget.core.client.form.Field.forceInvalid(Field.java:128)
    at com.sencha.gxt.widget.core.client.form.NumberField.onCellParseError(NumberField.java:86)
    at com.sencha.gxt.widget.core.client.form.ValueBaseField$1.onParseError(ValueBaseField.java:44)
    at com.sencha.gxt.widget.core.client.event.ParseErrorEvent.dispatch(ParseErrorEvent.java:85)
    at com.sencha.gxt.widget.core.client.event.ParseErrorEvent.dispatch(ParseErrorEvent.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.sencha.gxt.cell.core.client.AbstractEventInputCell.fireEvent(AbstractEventInputCell.java:41)
    at com.sencha.gxt.cell.core.client.form.TriggerFieldCell.finishEditing(TriggerFieldCell.java:205)
    at com.sencha.gxt.widget.core.client.form.Field.finishEditing(Field.java:205)
    at com.sencha.gxt.widget.core.client.grid.editing.GridInlineEditing.onEnter(GridInlineEditing.java:283)

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    I am unable to reproduce this at http://www.sencha.com/examples-dev/#...e:formsexample or http://www.sencha.com/examples-dev/#...e:basicbinding - can you offer a quick sample of how you are creating the number field so it causes this issue?

  3. #3
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Location
    Earth
    Posts
    243
    Vote Rating
    1
    nbuesing is on a distinguished road

      0  

    Default


    Actually, something you reminded me from my other post and our custom BigDecimalPropertyEditor made me think that was the issue (even though it wasn't part of the stack trace, that GWT provided). It was in my parseString() method.

    So, this is a non-issue, but rather I need need to do more investigation if I get an UmbrellaException; I would have expected a NumberFormatException from my BigDecimalPropertyEditor.

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    I believe that all exceptions thrown by NumberPropertyEditor.parseString are ignored, to allow multiple ways of parsing an inputted value. If you want custom behavior in that area, consider directly overriding the parse(String) method, and throwing a ParseException to make the error visible.

    Of course, if you are calling parseString(String) yourself, then you need to catch any exception that it emits.

  5. #5
    Sencha User
    Join Date
    Jan 2013
    Location
    Melbourne, Australia
    Posts
    17
    Vote Rating
    0
    pacmendoza is on a distinguished road

      0  

    Default


    Has this been resolved? I'm getting a similar error. Instead of a stacktrace, I get an error icon beside the field (which i'm expecting) but no error message is display.

    I tried overridding onCellParseError to check if the error message is set and I can confirm that it is correct. I'm wondering why it is not being displayed.

    The demo (3.0.0-rc2) is working just fine. What has changed since?

    Using gxt 3.0.1.

  6. #6
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    pacmendoza, no issue was ever filed as nbuesing discovered that it was likely an issue in his own code. Do you have a test case that demonstrates your issue?

  7. #7
    Sencha User
    Join Date
    Jan 2013
    Location
    Melbourne, Australia
    Posts
    17
    Vote Rating
    0
    pacmendoza is on a distinguished road

      0  

    Default


    Hi Colin, I just tried it again on the 3.0.1 examples and it is working fine. I'm still puzzled why I'm having this issue.

    I'm using the UI binder approach, without any customisation. I noticed that I am using an HTML Panel parent container where the examples are using a vertical panel. Does this have any effect? I'm also not using any container and widget tags like in the example.
    Capture.PNG
    Initially I used the NumberField of type BigDecimal but changed it to Integer to be closer to the example provided (i.e. age field) but I'm still getting the same issue. There is no stack trace, just an error icon with no message.

    For my scenario, I just entered ... as input to the field and was expecting a validation error like below:
    Capture.PNG

  8. #8
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    It is hard to say what could be causing your issue without a runnable code sample. The error tooltip is generated by the side error handler - if you are using different error support, something else might be happening instead.

    Can you put together a class implementing EntryPoint that can be run on its own to demonstrate the issue?

  9. #9
    Sencha User
    Join Date
    Jan 2013
    Location
    Melbourne, Australia
    Posts
    17
    Vote Rating
    0
    pacmendoza is on a distinguished road

      0  

    Default Code with attachments

    Code with attachments


    This is a stripped down version of the code in question. I just extracted these from the code base. I have not run it in isolation.

    Java file:
    Code:
    public class InvoiceFieldView implements IsWidget, EntryPoint {
    
        private static final String TWO_DECIMAL_FORMAT = "0.00";
    
        public static Binder uiBinder = GWT.create(Binder.class);
    
        private VerticalPanel vp;
    
        @UiField(provided = true)
        NumberField<BigDecimal> invoiceCostTextField;
    
        @Override
        public void onModuleLoad() {
            RootPanel.get().add(asWidget());
        }
    
        @Override
        public Widget asWidget() {
            invoiceCostTextField = new NumberField<BigDecimal>(new NumberPropertyEditor.BigDecimalPropertyEditor());
            invoiceCostTextField.setSelectOnFocus(true);
            invoiceCostTextField.setFormat(getFormat(TWO_DECIMAL_FORMAT));
    
            vp = uiBinder.createAndBindUi(this);
    
            return vp;
        }
    
        interface Binder extends UiBinder<VerticalPanel, InvoiceFieldView> {
        }
    }
    UI binding:
    Code:
    <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:gwt='urn:import:com.google.gwt.user.client.ui'
                 xmlns:form="urn:import:com.sencha.gxt.widget.core.client.form" >
    
        <ui:style>
            .container {
                border: .1em solid #a9bfd3;
                padding: .5em;
                margin: 0.5em;
                overflow: auto;
                width: 76em;
                background-color: white;
            }
    
            .quoted-invoice-cost-label {
                font-weight: bold;
                float: left;
                margin: 0 2.75em;
            }
    
            .quoted-cost-input-field {
                float: left;
                margin: 0 2em .75em;
            }
    
            .float-left {
                float: left;
            }
    
        </ui:style>
    
        <gwt:HTMLPanel>
            <div class="{style.container}">
                <div class="{style.float-left}">
                    <div class="{style.float-left}">
                        <gwt:Label text="BigDecimal Field" 
                                   addStyleNames="{style.quoted-invoice-cost-label}"/>
                        <div style="clear:both"/>
                        <form:NumberField width="10em" ui:field="invoiceCostTextField"
                                                       addStyleNames="{style.quoted-cost-input-field}"/>
                    </div>
                </div>
            </div>
        </gwt:HTMLPanel>
    </ui:UiBinder>

  10. #10
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    I have not run it in isolation.
    I could try to run it, but if the bug doesn't occur, then where are we left? Verify that the bug still exists, and please document the steps you are using to reproduce this issue, expected and actual results, as well as the browser you are using.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar