Set the given form in either the request or session, as appropriate, so Struts/NetUI
tags will have access to it.
485566
public static void setFormInScope( String formName, ActionForm form, ActionMapping mapping,
                                       HttpServletRequest request, boolean overwrite )
    {
        if ( formName != null && form != null )
        {
            if ( isSessionScope( mapping ) )
            {
                HttpSession session = request.getSession();

                if ( overwrite || session.getAttribute( formName ) == null )
                {
                    session.setAttribute( formName, form );
                }
            }
            else
            {
                if ( overwrite || request.getAttribute( formName ) == null )
                {
                    request.setAttribute( formName, form );
                }
            }
        }
    }
1209627
protected function setDataFormCheckout()
    {
        $form = $this->render('checkout/form', $this->data_form, true);

        if ($this->isAjax()) {
            $this->response->outputHtml($form);
        }

        $this->setData('checkout_form', $form);
    }
457060
def apply_request_and_page_to_values(self, request, page=None):
        
        value_is_set = False
        for value in self._values:
            value.apply_request_and_page(request, page)
535393
def set_form form
      raise "Form is nil in set_form" if form.nil?
      @form = form
      @id = form.add_widget(self) if !form.nil? and form.respond_to? :add_widget
      # 2009-10-29 15:04 use form.window, unless buffer created
      # should not use form.window so explicitly everywhere.
      # added 2009-12-27 20:05 BUFFERED in case child object needs a form.
      # We don;t wish to overwrite the graphic object
      if @graphic.nil?
        #$log.debug " setting graphic to form window for #{self.class}, #{form} "
        @graphic = form.window unless form.nil? # use screen for writing, not buffer
      end
      # execute those actions delayed due to absence of form -- used internally 
      # mostly by buttons and labels to bind hotkey to form
      fire_handler(:FORM_ATTACHED, self) if event? :FORM_ATTACHED
    end
1120910
def set(self, name, value):
        '''
        
        '''

        def change(session):
            session[name] = value
        self.__change_session(change)
1243220
public void setRefreshInterval(final HttpServletRequest request,
                                 final HttpServletResponse response,
                                 final int refreshInterval,
                                 final String refreshAction,
                                 final UtilActionForm form) {
    if (refreshInterval != 0) {
      StringBuilder sb = new StringBuilder(250);

      sb.append(refreshInterval);
      sb.append("; URL=");
      sb.append(form.getUrlPrefix());
      if (!refreshAction.startsWith("/")) {
        sb.append("/");
      }
      sb.append(refreshAction);
      response.setHeader("Refresh", sb.toString());
    }
  }
1004282
public void setBinding(String binding) 
        throws JspException {
        if (binding!= null && !UIComponentTag.isValueReference(binding)) {
            // PENDING i18n
            throw new JspException("Invalid Expression:"+binding);
        }
        this.binding = binding;
    }
233590
protected void insertUploadForm(FormPanel form) {

        form.getElement().getStyle().setDisplay(Display.NONE);
        m_contentWrapper.add(form);
    }
372550
protected void swapFragments(final AjaxRequestTarget target, final Form<?> form)
	{
		if (modeContext.equals(ModeContext.VIEW_MODE))
		{
			onSwapToEdit(target, form);
		}
		else
		{
			onSwapToView(target, form);
		}
	}
51087
public void setSessionAttr(final String attrName,
                             final Object val) {
    final HttpSession sess = request.getSession(false);

    if (sess == null) {
      return;
    }

    sess.setAttribute(attrName, val);
  }
1124012
public void actionDefine() throws JspException {

        // save initialized instance of this class in request attribute for included sub-elements
        getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this);
        try {
            performDefineOperation();
            // set the request parameters before returning to the overview
            setParamAction(DIALOG_SHOW_DEFAULT);
            setParamNewproperty(null);
            sendForward(CmsWorkplace.VFS_PATH_COMMONS + "property_advanced.jsp", paramsAsParameterMap());
        } catch (Throwable e) {
            // error defining property, show error dialog
            includeErrorpage(this, e);
        }
    }
767493
public void setScope(String scope) throws ApplicationException {
	scope = scope.toLowerCase().trim();

	if (scope.equals("server")) this.scope = SCOPE_SERVER;
	else if (scope.equals("application")) this.scope = SCOPE_APPLICATION;
	else if (scope.equals("session")) this.scope = SCOPE_SESSION;
	else if (scope.equals("request")) this.scope = SCOPE_REQUEST;
	else throw new ApplicationException("invalid value [" + scope + "] for attribute [scope] from tag [lock]", "valid values are [server,application,session]");
    }
1151985
def start_element(self, tag, attrs):
        """"""
        if tag == u'form':
            if u'action' in attrs:
                url = attrs['action']
                self.form = Form(url)
        elif tag == u'input':
            if self.form:
                if 'name' in attrs:
                    key = attrs['name']
                    value = attrs.get('value')
                    self.form.add_value(key, value)
                else:
                    log.warning(LOG_CHECK, "nameless form input %s" % attrs)
                    pass
            else:
                log.warning(LOG_CHECK, "formless input´%s" % attrs)
                pass
378756
public function setForm($form)
    {
        // Associate Form Instance (via parent):
        
        parent::setForm($form);
        
        // Associate Rules with Fields:
        
        foreach ($this->rules as $fieldName => $rules) {
            
            if ($field = $this->getDataField($fieldName)) {
                
                foreach ($rules as $rule) {
                    $rule->setField($field);
                }
                
            }
            
        }
        
        // Associate Backend with Self:
        
        $this->backend->setFrontend($this);
        
        // Initialise Backend:
        
        $this->backend->doInit();
        
        // Define Form Classes:
        
        if ($classes = $this->getClassesForForm($form)) {
            
            foreach ($classes as $class) {
                $form->addExtraClass($class);
            }
            
        }
        
        // Define Form Attributes:
        
        if ($attributes = $this->getAttributesForForm($form)) {
            
            foreach ($attributes as $key => $value) {
                $form->setAttribute($key, $value);
            }
            
        }
        
        // Answer Self:
        
        return $this;
    }
276766
public static void setForwardedFormBean( ServletRequest request, ActionForm form )
    {
        if ( form == null )
        {
            request.removeAttribute( FORWARDED_FORMBEAN_ATTR );
        }
        else
        {
            request.setAttribute( FORWARDED_FORMBEAN_ATTR, form );
        }
    }
36438
def realForm(self, req, tag):
        
        self.liveForm.setFragmentParent(self)
        return self.liveForm
313342
def submitbutton(self, request, tag):
        
        return tags.input(type='submit',
                          name='__submit__',
                          value=self._getDescription())