Control InterfacesPermanent link for this heading

  • Init()
    Set some member variables. Usually the function RequestableControlInit can be used. The most important variables are:
    • data
      The object containing the data from server.
    • id
      The ID of the control.
  • portlet
    See chapter “Portlet Object”.
  • Render(output)
    Writes the HTML of the control into the output object and potentially adds events to the portlet object (see chapter “Events”).
  • GetFscArgs()
    Defines the arguments e.g. needed to show a context menu.

Example:

function ajaxMyControl()
{

  
this.Init = RequestableControlInit;
  

  
this.Render = function MyControlRender(output)
  {

    var
portletid = this.portlet.GetId();
    
output.Push("<div id=\"MyControlContainer"+this.id+portletid+
      "\" class=\"
FscMyControl\">...</div>");
  };


  
this.GetFscArgs = function MyControlGetFscArgs()
  {

    if (
this.fscargs === undefined) {
      var container =
window.document.getElementById(this.id+
        
this.portlet.GetId());
      
this.fscargs = new VAPPArgs(null, ";"+this.portlet.GetObject()+";;"+
        
this.data.GetAttrdef()+";"+this.data.GetFscargs(), this, container);
    }

    return
this.fscargs;
  };

}