Announcement

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

    Problem with getValues() with custom canvasItem

    Hey,

    i created the following custom canvas item:
    Code:
    isc.ClassFactory.defineClass("DatePickerComboBox", CanvasItem);
    
    DatePickerComboBox.addProperties({
    
        valueMap: null,
    
        selectedValue: "",
    
        init:function () {
            this.canvas = isc.DynamicForm.create({
                numCols:"4",
                cellPadding : 0,            
                fields:[
                    {
                        valueMap: this.valueMap,
                        editorType:"comboBox",
                        showTitle:false,
                        width:244,
                        change: function (form, item, value) {
                            this.selectedValue = value;
                        }
                    },
                    {
                        type:"date",
                        showTitle:false,
                        useTextField:true,
                        width: 16,
                        pickerIconPrompt: "",
                        textFieldProperties:{
                            visible:false
                        },
                        change:function (form, item, value) {
                            var date = this.parseDate(value);
                            form.getItems()[0].setValue(date);
                            this.selectedValue = date;
                        }
                    }
                ]
            });
    
            return this.Super("init", arguments);
        }
    
    });
    the component embeds a combo-box with date picker button next to it.

    I have 2 problems with it:

    1. when i try setting the "selectedValue" with the change functions, it is not being set. why is that?

    2. when i do "getValues()" on the containing DynamicForm, I'm not getting any value from my component. what do i need to do to fix this? should i implement a function for that?

    Thanks.
    Last edited by YoniMSP; 17 Feb 2013, 12:54.

    #2
    Read the docs on CanvasItem (the class comment) and look at the samples if you need further help.

    Comment

    Working...
    X