Load the output form bean into the request.
@param request the request
@param bean the output form bean
349326
public static void loadOutputFormBean(ServletRequest request, Object bean) {
        if(bean != null)
            request.setAttribute(OUTPUT_FORM_BEAN_OBJECT_KEY, bean);
    }
832276
protected void setForm(final T bean, final AjaxRequestTarget target) {
        LOG.debug("Setting form to {}", bean);

        // update the model with the new bean
        formModel.setObject(bean);

        // add the form to the target
        target.add(form);

        // update the button
        updateSaveButton.setModel(Model.of("Update"));
        target.add(updateSaveButton);
    }
1057735
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);

		String targetId = getContent().getId();
		String contentId = getId() + "-content";

		switch (getComponentModel().mode) {
			case LAZY: {
				getContent().setVisible(isOpen());
				AjaxHelper.registerContainer(getId(), contentId, targetId);
				break;
			}
			case DYNAMIC: {
				AjaxHelper.registerContainer(getId(), contentId, targetId);
				getContent().setVisible(isOpen());
				break;
			}
			case EAGER: {
				AjaxHelper.registerContainer(getId(), contentId, targetId);
				// Will always be visible
				break;
			}
			case SERVER: {
				// same as DYNAMIC
				AjaxHelper.registerContainer(getId(), contentId, targetId);
				getContent().setVisible(isOpen());
				break;
			}
			case CLIENT: {
				// Will always be visible
				break;
			}

			default:
				// do nothing.
				break;
		}
	}
843823
@RequestMapping(method = RequestMethod.GET)
    @ResponseBody
    protected final String bind(HttpServletRequest request) {
        if (isLegal(request)) {
            //绑定微信服务器成功
            return request.getParameter("echostr");
        } else {
            //绑定微信服务器失败
            return "";
        }
    }
1231609
public synchronized void setRequest(HttpServletRequest request) {

        if (perThreadRequest == null) {
            perThreadRequest = new ThreadLocal<HttpServletRequest>();
        }
        perThreadRequest.set(request);
    }
708909
@Override
	public void handleRequest(final Request request) {
		if (isDisabled()) {
			// Protect against client-side tampering of disabled/read-only fields.
			return;
		}

		// Remember which client side tab we were on.
		String[] indicesStr = request.getParameterValues(getId());

		if (indicesStr != null && indicesStr.length > 0) {
			List<Integer> oldIndices = getActiveIndices();
			List<Integer> changes = new ArrayList<>(1);
			int[] indices = new int[indicesStr.length];

			if (Util.empty(indicesStr[0])) {
				// Special case - no tab selected
				if (getType() == TYPE_ACCORDION) {
					indices = null;
				} else {
					int idx = findFirstVisibleTab();
					indices = new int[idx];
				}
			} else {
				// Normal case - one or more tabs selected
				for (int i = 0; i < indices.length; i++) {
					int clientIndex = Integer.parseInt(indicesStr[i]);
					int idx = clientIndexToTabIndex(clientIndex);
					indices[i] = idx;

					if (!oldIndices.contains(idx)) {
						// Check for a server mode tab and set focus
						WTab tab = getTab(idx);
						if (TabMode.SERVER.equals(tab.getMode()) && UIContextHolder.getCurrent().getFocussed() == null) {
							tab.setFocussed();
						}
						changes.add(idx);
					}
				}
			}

			setActiveIndices(indices);

			// Invoke action if tab selection has changed
			final Action action = getActionOnChange();

			if (action != null && !changes.isEmpty()) {
				final ActionEvent event = new ActionEvent(this, changes.toString(), null);

				Runnable later = new Runnable() {
					@Override
					public void run() {
						action.execute(event);
					}
				};

				invokeLater(later);
			}
		}

		String showHeadOnlyStr = request.getParameter(getId() + ".showHeadOnly");

		if (showHeadOnlyStr != null) {
			boolean showHeadOnly = "true".equals(showHeadOnlyStr);
			setShowHeadOnly(showHeadOnly);
		}
	}
623393
public static void loadFacesBackingBean(ServletRequest request, FacesBackingBean facesBackingBean) {
        if(facesBackingBean != null)
            request.setAttribute(BACKING_IMPLICIT_OBJECT_KEY, facesBackingBean);
    }
239755
public ImageHelper load(ImageView v, Request request) {
        loadInternal(v, request, listener, null);

        return this;
    }
1093307
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);

		if (!isInitialised()) {
			List<Serializable> items = new ArrayList<>();
			items.add(new SimpleTableBean("A", "none", "thing"));
			items.add(new SimpleTableBean("B", "some", "thing2"));
			items.add(new SimpleTableBean("C", "little", "thing3"));
			items.add(new SimpleTableBean("D", "lots", "thing4"));
			items.add(new SimpleTableBean("E", "none", "thing5"));
			items.add(new SimpleTableBean("F", "some", "thing6"));
			items.add(new SimpleTableBean("G", "little", "thing7"));
			items.add(new SimpleTableBean("H", "lots", "thing8"));
			items.add(new SimpleTableBean("I", "none", "thing9"));
			items.add(new SimpleTableBean("J", "some", "thing10"));
			items.add(new SimpleTableBean("K", "little", "thing11"));
			items.add(new SimpleTableBean("L", "lots", "thing12"));

			table.setDataModel(new SimpleBeanListTableDataModel(
					new String[]{"name", "type", "thing"}, items));
			setInitialised(true);
		}
	}
584928
@Override
	protected void preparePaintComponent(final Request request) {
		assertConfigured();

		List beanList = getBeanList();

		List<Integer> used = new ArrayList<>();

		for (int i = 0; i < beanList.size(); i++) {
			Object rowData = beanList.get(i);

			// Each row has its own context. This is why we can reuse the same
			// WComponent instance for each row.
			UIContext rowContext = getRowContext(rowData, i);

			// Check the context has not been used for another row
			Integer subId = ((SubUIContext) rowContext).getContextId();
			if (used.contains(subId)) {
				Object rowId = ((SubUIContext) rowContext).getRowId();
				String msg = "The row context for row id ["
						+ rowId
						+ "] has already been used for another row. "
						+ "Either the row ID is not unique or the row bean has not implemented equals/hashcode "
						+ "or no rowIdBeanProperty set on the repeater that uniquely identifies the row.";
				throw new SystemException(msg);
			}
			used.add(subId);

			UIContextHolder.pushContext(rowContext);

			try {
				prepareRow(request, i);
			} finally {
				UIContextHolder.popContext();
			}
		}
	}
436793
@Override
	public void handleRequest(final Request request) {
		// Let the wcomponent gather data from the request.
		super.handleRequest(request);

		Object data = getData();

		if (data != null) {
			// Now update the data object (bound to this wcomponent) by copying
			// values from this wcomponent and its children into the data object.
			updateData(data);
		}
	}
928472
@Override
	public void handleRequest(final Request request) {
		if (!isInitialised()) {
			getOrCreateComponentModel().delegate = new SafetyContainerDelegate(UIContextHolder.
					getCurrent());
			setInitialised(true);
		}

		try {
			UIContext delegate = getComponentModel().delegate;
			UIContextHolder.pushContext(delegate);

			try {
				for (int i = 0; i < shim.getChildCount(); i++) {
					shim.getChildAt(i).serviceRequest(request);
				}

				delegate.doInvokeLaters();
			} finally {
				UIContextHolder.popContext();
			}
		} catch (final ActionEscape e) {
			// We don't want to catch ActionEscapes (e.g. ForwardExceptions)
			throw e;
		} catch (final Exception e) {
			if (isAjaxOrTargetedRequest(request)) {
				throw new SystemException(e.getMessage(), e);
			} else {
				setAttribute(ERROR_KEY, e);
			}
		}
	}
329525
public void load(InputStream input) throws IOException {

        ParameterReader reader = null;

        try {
            reader = new ParameterReader(new InputStreamReader(input, CmsEncoder.ENCODING_ISO_8859_1));

        } catch (UnsupportedEncodingException ex) {

            reader = new ParameterReader(new InputStreamReader(input));
        }

        while (true) {
            String line = reader.readParameter();
            if (line == null) {
                return; // EOF
            }
            int equalSign = line.indexOf('=');

            if (equalSign > 0) {
                String key = line.substring(0, equalSign).trim();
                String value = line.substring(equalSign + 1).trim();

                if (CmsStringUtil.isEmptyOrWhitespaceOnly(value)) {
                    continue;
                }

                add(key, value, true);
            }
        }
    }
283316
synchronized HttpRequest startRequest(HttpRequest request) {
		if (request == null) {
			throw new IllegalArgumentException("Request is null");
		}

		if (requestInjector != null) {
			request.setInjector(requestInjector);
		}

		registerRequest(request);
		dispatchRequest(request);
		notifyRequestStarted(request);

		return request;
	}
663438
public static void loadPageFlow(ServletRequest request, PageFlowController pageFlow) {
        if(pageFlow != null)
            request.setAttribute(PAGE_FLOW_IMPLICIT_OBJECT_KEY, pageFlow);

        Map map = InternalUtils.getPageInputMap(request);
        request.setAttribute(PAGE_INPUT_IMPLICIT_OBJECT_KEY, map != null ? map : Collections.EMPTY_MAP);
    }
1210932
@SuppressWarnings("unchecked")
	@Override
	public <T extends Resource> T request(final HttpRequestBase request) {
		try {
			HttpResponse response = execute(client, request);
			Resource resource = toPage(request, response);
			return (T)resource;
		} catch (Exception e) {
			throw MechanizeExceptionFactory.newException(e);
		}
	}
1191679
@Override
  public boolean service(RequestBaratine request)
  {
    request.status(HttpStatus.INTERNAL_SERVER_ERROR);
    request.header("content-type", "text/plain");
    
    if (_exn instanceof ConfigException) {
      request.write("ConfigException: " + _exn.getMessage());
    }
    else {
      request.write(_exn.toString());
      
      request.write("\n");
      
      for (StackTraceElement stack : _exn.getStackTrace()) {
        request.write("\n");
        request.write(String.valueOf(stack));
      }
    }
    
    return true;
  }