Announcement

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

    UploadItem and ValuesManager

    Hi,

    We want to combine two forms into one logical form via ValuesManager, one of these two forms includes a UploadItem. Our target is use ordinary HTML submit but not DataBound.

    We setup the two forms, including call form.setCanSubmit(true) to indicate that we want to use DataBound, and add these two forms into ValuesManager (using addMember). And we also setup the type as POST/MULTIPART, and using setAction to set the same URL to these two forms.

    The problem is when we call valuesManager.submit(), we got the exception:

    16:18:35.812:MUP2:WARN:ValuesManager:isc_ValuesManager_3:saveData() called on a non-databound ValuesManager. This is not supported. for information on databinding of components look at the documentation for the DataSource class. If this was intended to be a native HTML form submission, set the canSubmit property to true on this form.

    com.smartgwt.client.core.JsObject$SGWT_WARN: 16:18:35.812:MUP2:WARN:ValuesManager:isc_ValuesManager_3:saveData() called on a non-databound ValuesManager. This is not supported. for information on databinding of components look at the documentation for the DataSource class. If this was intended to be a native HTML form submission, set the canSubmit property to true on this form.

    We are sure the canSubmit value is true here, so what can we do?

    PS: we are using SmartGWT 2.5 + GWT 2.2

    #2
    Today, I set the canSubmit property of ValuesManager (also setCanSubmit =true for two forms), then I got the following error:

    10:30:12.015:MUP6:WARN:Log:Error:
    'Object does not support the property or method'
    in http://kuaixunda.sinaapp.com/ikabao/sc/modules/ISC_DataBinding.js
    at line 1540
    EditorActionMethods.submit(_1=>undef, _2=>undef)
    StatefulCanvas.handleActivate(_1=>Obj, _2=>undef)
    StatefulCanvas.handleClick(_1=>Obj, _2=>undef)
    [c]EventHandler.bubbleEvent(_1=>[IButton ID:isc_IButton_11], _2=>"click", _3=>undef, _4=>undef)
    [c]EventHandler.handleClick(_1=>[IButton ID:isc_IButton_11], _2=>undef)
    [c]EventHandler.$k5(_1=>Obj{type:error}, _2=>undef)
    [c]EventHandler.handleMouseUp(_1=>Obj{type:error}, _2=>undef)
    [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>Obj{type:error})
    anonymous(event=>undef)
    "if (!isc.Browser.isIE && event == null) return;var returnVal=arguments.callee.$ch.isc.EH.dispatch(arguments.callee.$j2,event);return returnVal;"

    It seems the submitForm() function on ValuesManager does not work.

    Any idea?

    Comment


      #3
      Hi,

      I've just ran into the same problem. Have you ever found a solution please?

      Comment


        #4
        Hi,

        May be you needed to set the ValuesManager datasource using the method setDatasource

        Comment

        Working...
        X