Hello, I am following the Map Component tutorial to create my own custom component in Skuid. I can get HTML to render in the Builder just fine, but for some reason this HTML is not rendering on the Skuid page to which I added the custom component. I am also not seeing the Header or the Save/Cancel sections, even though I set the flags to ‘true’ on the editor. I am using the code below for the custom component. Is there something I’ve left out, or have I done something wrong in the self.draw method? Thanks. (function(skuid) { var $ = skuid.$; // Register a new Skuid Component Type skuid.componentType.register(‘spdocumentviewer’, function(domElement, xmlConfig) { // Establish a shorthand for the DOM element we will be building to, // (actually a jQuery object wrapper around that domElement) var self = domElement; // Get the name of the model we want to work with from our component definition, // as well as the Latitude and Longitude fields we want to work with. var modelName = xmlConfig.attr(‘model’); // If we do not have ALL of the first attributes, // then display an error in our domElement. // or save/cancel buttons self.editor = new skuid.ui.Editor(self, { showHeader: true, showSaveCancel: true }); // Register that we will be editing the specified Model. self.editor.registerModel(self.model); // Define the draw function, // which we will use for drawing our entire self.draw = function() { var div = $(‘’).html(‘hello world’) .appendTo(self); }; // Define how we will handle successful ‘saves’ to our model self.editor.handleSave = function(modelHasChanged) { self.draw(); }; // Define how we will handle successful ‘refreshes’ to our model self.editor.handleDataRefresh = function() { self.draw(); }; self.css(‘min-height’, ‘300px’); self.draw(); }); })(skuid);
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.