called by parent or form, otherwise its private
434171
def handle_key ch
      $log.debug " STACKFLOW handle_key #{ch} "
      return if @components.empty?
      _multiplier = ($multiplier == 0 ? 1 : $multiplier )

      # should this go here 2011-10-19 
      unless @_entered
        $log.warn "XXX WARN: calling ON_ENTER since in this situation it was not called"
        on_enter
      end
      if ch == KEY_TAB
        $log.debug "STACKFLOW GOTO NEXT TAB"
        return goto_next_component
      elsif ch == KEY_BTAB
        return goto_prev_component
      end
      comp = @current_component
      $log.debug " STACKFLOW handle_key #{ch}: #{comp}" 
      if comp
        ret = comp.handle_key(ch) 
        $log.debug " STACKFLOW handle_key#{ch}: #{comp} returned #{ret} " 
        if ret != :UNHANDLED
          comp.repaint # NOTE: if we don;t do this, then it won't get repainted. I will have to repaint ALL
          # in repaint of this.
          return ret 
        end
        $log.debug "XXX STACKFLOW key unhandled by comp #{comp.name} "
      else
        $log.warn "XXX STACKFLOW key unhandled NULL comp"
      end
      case ch
      when ?\C-c.getbyte(0)
        $multiplier = 0
        return 0
      when ?0.getbyte(0)..?9.getbyte(0)
        $log.debug " VIM coming here to set multiplier #{$multiplier} "
        $multiplier *= 10 ; $multiplier += (ch-48)
        return 0
      end
      ret = process_key ch, self
      # allow user to map left and right if he wants
      if ret == :UNHANDLED
        case ch
        when KEY_UP
          # form will pick this up and do needful
          return goto_prev_component #unless on_first_component?
        when KEY_LEFT
          # if i don't check for first component, key will go back to form,
          # but not be processes. so focussed remain here, but be false.
          # In case of returnign an unhandled TAB, on_leave will happen and cursor will move to 
          # previous component outside of this.
          return goto_prev_component unless on_first_component?
        when KEY_RIGHT
          return goto_next_component #unless on_last_component?
        when KEY_DOWN
          return goto_next_component #unless on_last_component?
        else 
          @_entered = false
          return :UNHANDLED
        end
      end

      $multiplier = 0
      return 0
    end
1279859
public void init(Object parent, Object record)
    {
        super.init(parent, record);

        this.addSubPanels(this);
        
        if (this.getBaseApplet() != null)
            if (this.getBaseApplet().getProperty(Constants.OBJECT_ID) != null)
                if (this.getFieldList() != null)
                    if ((this.getFieldList().getEditMode() == Constants.EDIT_NONE) || (this.getFieldList().getEditMode() == Constants.EDIT_ADD))
        {
            FieldInfo field = this.getFieldList().getCounterField();
            field.setString(this.getBaseApplet().getProperty(Constants.OBJECT_ID));
            this.readKeyed(field);
        }
        this.fieldsToControls();
    }
41829
public void init(Object parent, Object strURL)
    {
        BaseApplet applet = null;
        if (parent instanceof BaseApplet)
            applet = (BaseApplet)parent;
        if (strURL instanceof BaseApplet)
            applet = (BaseApplet)strURL;
        if (applet == null)
            applet = this.getBaseApplet();

        if (strURL == null)
        	if (applet != null)
        		if (applet.getProperty(Params.URL) == null)
        			strURL = "?" + Params.HELP + "=";

        this.setOpaque(false);
        super.init(parent, strURL);

        if (parent instanceof BaseApplet)
        	((BaseApplet)parent).setHelpView(this.getHtmlEditor());
    }
64996
def delete_private
      # Iterate all children, and repeat recursively if a child itself has children, to delete all private data elements:
      children.each do |element|
        delete(element.tag) if element.tag.private?
        element.delete_private if element.children?
      end
    end
200035
def public(self, boolean):
        """"""
        if(boolean):
            r = self.flag({
                "flag": "make_public"
            })
        else:
            r = self.flag({
                "flag": "make_private"
            })

        return r
1276117
protected function initForm()
    {
    	parent::initForm();
    	
    	$this->form->setName($this->formName);
    	
		$actions = tao_helpers_form_FormFactory::getCommonActions('top');
		$this->form->setActions($actions, 'top');
		$this->form->setActions($actions, 'bottom');
    }
692590
def parent(self):
        ''''''

        if not hasattr(self, '_parent'):

            if 'parent' in self.kwargs:

                try:
                    self._parent = Page.objects.get(id=self.kwargs["parent"])
                except Exception as e:
                    raise e
            else:
                if hasattr(self.request, 'leonardo_page'):
                    self._parent = self.request.leonardo_page
                else:
                    return None

        return self._parent
323817
function privateBrowsing(controller) {
  this._controller = controller;
  this._handler = null;

  /**
   * Menu item in the main menu to enter/leave Private Browsing mode
   * @private
   */
  this._pbMenuItem = new elementslib.Elem(this._controller.menus['tools-menu'].privateBrowsingItem);
  this._pbTransitionItem = new elementslib.ID(this._controller.window.document, "Tools:PrivateBrowsing");

  this.__defineGetter__('_pbs', function() {
    delete this._pbs;
    return this._pbs = Cc["@mozilla.org/privatebrowsing;1"].
                       getService(Ci.nsIPrivateBrowsingService);
  });
}
754722
def get_form_kwargs(self, **kwargs):
        '''
        
        '''
        kwargs = super(BookPrivateLessonView, self).get_form_kwargs(**kwargs)
        kwargs['user'] = self.request.user if hasattr(self.request,'user') else None
        return kwargs
405930
function bindParent (sticky) {
  if (!sticky instanceof Sticky) {
    return
  }
  const scroller = sticky.component.getParentScroller()
  let pt
  if (scroller) {
    pt = sticky.parent = scroller
    sticky.parentElement = pt.node
  }
  else {
    pt = sticky.parent = sticky.component.getRootContainer()
    sticky.parentElement = pt
  }
}
1203821
public void setParent(HierarchicalFormModel parent) {
		Assert.notNull(parent, "parent");
		this.parent = parent;
		this.parent.addPropertyChangeListener(ENABLED_PROPERTY, parentStateChangeHandler);
		this.parent.addPropertyChangeListener(READONLY_PROPERTY, parentStateChangeHandler);
		enabledUpdated();
		readOnlyUpdated();
	}
1052361
def set_parent(self, parent):
        '''
        '''
        if not isinstance(parent, Node):
            raise TypeError("parent must be a Node")
        self.parent = parent
406067
function(searchVal) {
    searchVal = searchVal.trim().toLowerCase();
    for (var key in treeObject) {
      var me = treeObject[key];
      if (me.val.indexOf(searchVal) !== -1 || searchVal.length == 0) {
        $(tocList[key]).show();
        if ($(tocList[me.parent]).is(":hidden")) {
         showParents(key);
        }
      } else {
        $(tocList[key]).hide();
      }
    }
  }
929302
function() {
        this.removeChildren(this.get('inputs'));

        var ancestor = this.get('parent.parent');
        if(ancestor) {
          ancestor.removeChildren(this.get('outputs'));
        }
        this.set('_additionalsIncluded', false);
      }
172462
protected Form getNearestForm()
    {
        Tag parentTag = getParent();
        while (parentTag != null) {
            if (parentTag instanceof Form)
                return (Form) parentTag;
            parentTag = parentTag.getParent();
        }
        return null;
    }
302596
public function definition() {
        $mform = $this->_form;

        list($requiresubmissionstatement,
             $submissionstatement,
             $coursemoduleid,
             $data) = $this->_customdata;

        if ($requiresubmissionstatement) {
            $mform->addElement('checkbox', 'submissionstatement', '', $submissionstatement);
            $mform->addRule('submissionstatement', get_string('required'), 'required', null, 'client');
        }

        $mform->addElement('static', 'confirmmessage', '', get_string('confirmsubmission', 'mod_assign'));
        $mform->addElement('hidden', 'id', $coursemoduleid);
        $mform->setType('id', PARAM_INT);
        $mform->addElement('hidden', 'action', 'confirmsubmit');
        $mform->setType('action', PARAM_ALPHA);
        $this->add_action_buttons(true, get_string('continue'));

        if ($data) {
            $this->set_data($data);
        }
    }
29679
public static void askForNewCategoryInfo(CmsUUID parentId, final AsyncCallback<CmsCategoryTitleAndName> callback) {

        CmsSitemapCategoryData categoryData = CmsSitemapView.getInstance().getController().getCategoryData();

        CmsCategoryTreeEntry entry = categoryData.getEntryById(parentId);
        String caption;
        if (entry == null) {
            caption = Messages.get().key(Messages.GUI_SITEMAP_CREATE_CATEGORY_TITLE_0);
        } else {
            caption = Messages.get().key(Messages.GUI_SITEMAP_CREATE_SUBCATEGORY_TITLE_1, entry.getPath());
        }
        CmsFormDialog dlg = new CmsFormDialog(caption, new CmsForm(true));
        dlg.setWidth(CmsPopup.DEFAULT_WIDTH);
        CmsDialogFormHandler fh = new CmsDialogFormHandler();
        fh.setSubmitHandler(new I_CmsFormSubmitHandler() {

            public void onSubmitForm(CmsForm form, Map<String, String> fieldValues, Set<String> editedFields) {

                String title = fieldValues.get("title");
                String name = fieldValues.get("name");
                callback.onSuccess(new CmsCategoryTitleAndName(title, name));

            }
        });

        dlg.setFormHandler(fh);
        fh.setDialog(dlg);
        String nameLabel = Messages.get().key(Messages.GUI_CATEGORY_NAME_LABEL_0);
        String titleLabel = Messages.get().key(Messages.GUI_CATEGORY_TITLE_LABEL_0);
        dlg.getForm().addField(CmsBasicFormField.createField(createBasicStringProperty("title", titleLabel)), "");
        dlg.getForm().addField(CmsBasicFormField.createField(createBasicStringProperty("name", nameLabel)), "");
        dlg.getForm().render();
        dlg.center();

    }