-- BobFurber - 28 Apr 2009

Perhaps along the following lines:
  • it creates a row in the hmiDescription object with empty attributes, save for the widgetType and the tnID
  • if the label and hint attributes are empty, these are retrieved from the tnId row of targetDescription object --> descrip value.
  • a property sheet for the chosen widgetType is opened or made visible, populated from the newly created/edited row in the hmiDescription object.
  • the designer edits this property sheet.
  • onOk, the property sheet is hidden and
    • a. The row in the hmiDescription object is updated
    • b. If it does not already exist, a new widget is created from this row in the hmiDescription object

To create a NewWidget?

dojo.declare("hmi.PopUpPS",        // declare a new  popup

    [dijit._Widget,                // derived from these existing widgets

     dijit._Templated,

     dijit.Dialog],

    {

        values: "",

        filterSelect: null,

        dataStore: null,

        templateString: null,

        widgetsInTemplate: true,

        templatePath: dojo.moduleUrl("hmi", "templates/popup3Prop.htm"),



        postCreate: function(  ) {

        this.attr("content", this.popupNode);    // add template to popup



            this.filterSelect = new dijit.form.FilteringSelect({

                id: "tnId",

                name: "tnId",

                value: "2",

                store: this.dataStore,

                searchAttr: "tnId",

        }, "tnIdSelect");

        //    this.show();

console.log("PopUpPS postCreate: " + this.id);

        },



        editValues: function(title, values) {

            this.attr('title', title);

console.log("editValues: " + title);

            this.attr('value', values);

console.log("editValues: " + values);

            this.show();

        }

    }

);

-- BobFurber - 28 Apr 2009

Perhaps along the following lines:
  • it creates a row in the hmiDescription object with empty attributes, save for the widgetType and the tnID
  • if the label and hint attributes are empty, these are retrieved from the tnId row of targetDescription object --> descrip value.
  • a property sheet for the chosen widgetType is opened or made visible, populated from the newly created/edited row in the hmiDescription object.
  • the designer edits this property sheet.
  • onOk, the property sheet is hidden and
    • a. The row in the hmiDescription object is updated
    • b. If it does not already exist, a new widget is created from this row in the hmiDescription object

To create a NewWidget?

Off Button http://www.foswiki.org/pub/Sandbox/WidgetWiki
I Attachment Action Size Date Who Comment
b32x18_0.pngpng b32x18_0.png manage 0.4 K 28 Apr 2009 - 02:08 BobFurber Button Off

This topic: Sandbox > WidgetWiki
Topic revision: 28 Apr 2009, BobFurber
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads