Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    I'll look into it and get back to you.

    Sanjiv

    Comment


      #17
      Thank you.

      Comment


        #18
        Originally posted by sjivan
        I'll look into it and get back to you.

        Sanjiv
        Thank you Sanjiv. I am BIG fan off your work.. i hope i ever get a change to know you personally and can have a beer with you. :)

        Cheers Dude!
        Last edited by rathiandi; 12 Aug 2009, 05:34.

        Comment


          #19
          Originally posted by shinji_inc
          Hi!
          I have the same problem and I has updated to smartGWT 1.2 but the error is still.

          Code:
          Uncaught JavaScript exception [com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
           number: -2146827850
           description: Object doesn't support this property or method
          	at com.smartgwt.client.widgets.form.fields.ComboBoxItem.getSelectedRecord(Native Method)
          	at com.kreators.grassias.client.presenter.SalesInvoicePresenter$4.onChanged(SalesInvoicePresenter.java:109)
          	at com.smartgwt.client.widgets.form.fields.events.ChangedEvent.dispatch(ChangedEvent.java:96)
          	at com.smartgwt.client.widgets.form.fields.events.ChangedEvent.dispatch(ChangedEvent.java:1)
          	at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
          	at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
          	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
          	at com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:189)] in http://localhost/grassias/grassias/hosted.html?grassias, line 8
          Let me summarized what I want to do:

          I have a ListGrid transactionListGrid.
          I have ComboBoxItem itemComboBoxItem with optionDataSource and pickListFields.
          transactionListGrid will use itemComboBoxItem in one of it's field as the editor.

          When itemComboBoxItem changed, I want other property of selectedRecord in itemComboBoxItem shown (such as description, unit, etc).

          Code:
              itemComboBoxItem.addChangedHandler(new ChangedHandler(){
                  
                  public void onChanged(ChangedEvent event){
                      itemComboBoxItem.getSelectedRecord();
                  }
          
              });
          It is work fine if the itemComboBoxItem is never use as editorType,
          but when it is put in

          Code:
          transactionListGrid.getField("itemCode").setEditorType(itemComboBoxItem)
          it will generate above error.

          Any idea or alternative ways?

          Thanks.
          Hi shinji_inc,

          I get following error in trying to upgrade to version 1.2. Did you face this during your upgrade process?

          "Attempt to use data source of type iscServer with out SmartClient Server option. Please either set or upgrade to either pro or enterprises"

          Thanks in advance for any advise.

          Comment


            #20
            Rathiandi,

            I didn't face that issue.

            Maybe because I use com.smartgwt.client.data.DataSource as the datasource,
            and only invoke datasource.setFields(...) and datasource.setDataUrl(...)

            What datasource did u use?

            Comment


              #21
              Originally posted by shinji_inc
              Rathiandi,

              I didn't face that issue.

              Maybe because I use com.smartgwt.client.data.DataSource as the datasource,
              and only invoke datasource.setFields(...) and datasource.setDataUrl(...)

              What datasource did u use?
              Thanks for reply.

              I use XML based datasource with spring DMI which uses SmartGWT EE components. It works fine with evolution version 1.1 but give me that licence error for version 1.2.

              Comment


                #22
                @rathiandi You've somehow mixed the LGPL and Pro versions. Your client-side .jar is missing code necessary to contact the SmartGWT Server components.

                Comment


                  #23
                  Originally posted by sjivan
                  I'll look into it and get back to you.

                  Sanjiv
                  Hi Sanjiv, Did you get a chance to look into it?

                  Comment


                    #24
                    Originally posted by rathiandi
                    Below exception occurs If you have data bound combo box as a editor in grid's field and you try to call getSelectedRecord().

                    Uncaught JavaScript exception [com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
                    number: -2146827850
                    description: Object doesn't support this property or method
                    at com.smartgwt.client.widgets.form.fields.ComboBoxItem.getSelectedRecord(Native Method)

                    And same combo box works well if it is not used editor inside list grid. I don't understand this behavior?
                    I faced the same problem. Does anyone have a solution for it? Any hint is appreciated.

                    GWT: 1.7.0
                    OS: Windows XP SP3
                    SmartGWT: 1.3

                    Comment


                      #25
                      The issue here is that the ComboBoxItem is set as an editor type

                      gridSymbolField.setEditorType(createComboBoxItem());

                      so when the onChanged() event is fired you cannot call comboBoxItem.getSelectedRecord() directly since comboBoxItem was used in setEditorType to set the editor properties only. Instead get the FormItem from the event instead. See the code below :

                      Code:
                          private ComboBoxItem createComboBoxItem() {
                              final ComboBoxItem comboBoxItem = new ComboBoxItem();
                              comboBoxItem.setOptionDataSource(ItemSupplyXmlDS.getInstance());
                              comboBoxItem.setFilterLocally(false);
                              comboBoxItem.addChangedHandler(new ChangedHandler() {
                                  public void onChanged(ChangedEvent event) {
                                       //cannot call this method since "comboBoxItem" is a prototype instance to be applied to all records as the editor type
                                      //ListGridRecord rec = comboBoxItem.getSelectedRecord();
                      
                                      //do this instead
                                      ListGridRecord rec = new ComboBoxItem(event.getItem().getJsObj()).getSelectedRecord();
                                      GWT.log("rec:" + rec, null);
                                  }
                              });
                              return comboBoxItem;
                          }

                      Comment

                      Working...
                      X