org.apache.wicket.Request.getParameter()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(220)

本文整理了Java中org.apache.wicket.Request.getParameter方法的一些代码示例,展示了Request.getParameter的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getParameter方法的具体详情如下:
包路径:org.apache.wicket.Request
类名称:Request
方法名:getParameter

Request.getParameter介绍

[英]Gets a given (query) parameter by name.
[中]按名称获取给定(查询)参数。

代码示例

代码示例来源:origin: org.wicketstuff/jquery

  1. @Override protected void respond(AjaxRequestTarget target) {
  2. Request req = RequestCycle.get().getRequest();
  3. onCropped(target, Integer.parseInt(req.getParameter("width")), Integer.parseInt(req.getParameter("height")),
  4. Integer.parseInt(req.getParameter("top").replace("px", "")), Integer.parseInt(req.getParameter("left").replace("px", "")));
  5. }

代码示例来源:origin: org.wicketstuff/jwicket-core

  1. public SpecialKeys(final Request request) {
  2. String rawKeys = request.getParameter("keys");
  3. if (rawKeys != null && rawKeys.length() > 0) {
  4. String[] strings = Strings.split(rawKeys, ',');
  5. for (String string : strings)
  6. specialKeys.add(SpecialKey.getSpecialKey(string));
  7. }
  8. }

代码示例来源:origin: org.wicketstuff/jquery

  1. @Override
  2. public final void respond(AjaxRequestTarget target) {
  3. Request req = RequestCycle.get().getRequest();
  4. onDrop(req.getParameter("src"), req.getParameter("dest"), target);
  5. }

代码示例来源:origin: org.wicketstuff/wicket-html5

  1. @Override
  2. protected void respond(AjaxRequestTarget target) {
  3. final Request request = RequestCycle.get().getRequest();
  4. final String latitude = request.getParameter("lat");
  5. final String longitude = request.getParameter("long");
  6. onGeoAvailable(target, latitude, longitude);
  7. }

代码示例来源:origin: org.onehippo.cms7/hippo-cms-xinha-integration

  1. protected Map<String, String> getParameters() {
  2. Request request = RequestCycle.get().getRequest();
  3. HashMap<String, String> p = new HashMap<String, String>();
  4. Map<String, ?> requestParams = request.getRequestParameters().getParameters();
  5. for (String key : requestParams.keySet()) {
  6. if (key.startsWith(AbstractXinhaPlugin.XINHA_PARAM_PREFIX)) {
  7. p.put(key.substring(AbstractXinhaPlugin.XINHA_PARAM_PREFIX.length()), request.getParameter(key));
  8. }
  9. }
  10. return p;
  11. }

代码示例来源:origin: org.wicketstuff/yui

  1. @Override
  2. protected final void onEvent(AjaxRequestTarget target) {
  3. String top = getComponent().getRequest().getParameter("top");
  4. String left = getComponent().getRequest().getParameter("left");
  5. String height = getComponent().getRequest().getParameter("height");
  6. String width = getComponent().getRequest().getParameter("width");
  7. onCropInternal(Integer.parseInt(top), Integer.parseInt(left), Integer.parseInt(height), Integer
  8. .parseInt(width), target);
  9. }

代码示例来源:origin: org.onehippo.cms7/hippo-cms-yui

  1. @Override
  2. protected void respond(AjaxRequestTarget target) {
  3. Request request = RequestCycle.get().getRequest();
  4. FlashVersion flash = new FlashVersion();
  5. try {
  6. flash.setMajorVersion(Integer.parseInt(request.getParameter("major")));
  7. flash.setMinorVersion(Integer.parseInt(request.getParameter("minor")));
  8. flash.setRevisionVersion(Integer.parseInt(request.getParameter("rev")));
  9. } catch (NumberFormatException ignored) {
  10. }
  11. handleFlash(flash);
  12. }

代码示例来源:origin: org.onehippo.jcr.console/hippo-jcr-console-api

  1. @Override
  2. protected void respond(AjaxRequestTarget target) {
  3. Request request = RequestCycle.get().getRequest();
  4. FlashVersion flash = new FlashVersion();
  5. try {
  6. flash.setMajorVersion(Integer.parseInt(request.getParameter("major")));
  7. flash.setMinorVersion(Integer.parseInt(request.getParameter("minor")));
  8. flash.setRevisionVersion(Integer.parseInt(request.getParameter("rev")));
  9. } catch (NumberFormatException ignored) {
  10. }
  11. handleFlash(flash);
  12. }

代码示例来源:origin: org.wicketstuff/yui

  1. protected void respond(AjaxRequestTarget target) {
  2. String action = RequestCycle.get().getRequest().getParameter("action");
  3. String targetId = RequestCycle.get().getRequest().getParameter(
  4. "targetId");
  5. String menuId = RequestCycle.get().getRequest().getParameter("contextMenuId");
  6. YuiContextMenu menu = getMenuById(menuId);
  7. menu = (menu == null) ? defaultMenu : menu;
  8. MenuItem item = menu.getMenuItem(action);
  9. if (item != null) {
  10. item.onClick(target, targetId);
  11. } else {
  12. System.out.println("Invalid action: " + action);
  13. }
  14. }

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

  1. /**
  2. * @see org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#respond(org.apache.wicket.ajax.AjaxRequestTarget)
  3. */
  4. @Override
  5. protected void respond(AjaxRequestTarget target)
  6. {
  7. final RequestCycle requestCycle = RequestCycle.get();
  8. final String val = requestCycle.getRequest().getParameter("q");
  9. onRequest(val, requestCycle);
  10. }
  11. }

代码示例来源:origin: org.wicketstuff/jquery

  1. @Override
  2. protected void respond(AjaxRequestTarget target) {
  3. final String componentId = RequestCycle.get().getRequest().getParameter(HistoryAjaxBehavior.HISTORY_ITEM_PARAM);
  4. onAjaxHistoryEvent(target, componentId);
  5. }

代码示例来源:origin: org.wicketstuff/jquery

  1. /**
  2. * Registers a new entry in the history if this request is not triggered by back/forward buttons
  3. *
  4. * @param target the current request target
  5. * @param component the component which triggered this Ajax request
  6. */
  7. public void registerAjaxEvent(final AjaxRequestTarget target, final Component component) {
  8. if (RequestCycle.get().getRequest().getParameter(HistoryAjaxBehavior.HISTORY_ITEM_PARAM) == null) {
  9. target.appendJavascript("HistoryManager.addHistoryEntry('"+ component.getId() +"');");
  10. }
  11. }
  12. }

代码示例来源:origin: org.wicketstuff/yui

  1. @Override
  2. protected void respond(AjaxRequestTarget target)
  3. {
  4. final String type = RequestCycle.get().getRequest().getParameter(EVENT_TYPE);
  5. if (usesOverlayManager) {
  6. target.prependJavascript(deregisterPanelJs());
  7. }
  8. onHide(target, type);
  9. }
  10. });

代码示例来源:origin: org.wicketstuff/datatable-autocomplete

  1. public void onAjaxUpdate(Request request, AjaxRequestTarget target) {
  2. String value = request.getParameter(callbackName);
  3. textModel.setModelObject(value);
  4. // enable since this is an ajax update
  5. autoCompletingPanel.setInitialRenderDisabledMode(false);
  6. // will be revaluated during rendering
  7. autoCompletingPanel.setVisible(true);
  8. target.addComponent(autoCompletingPanel);
  9. }

代码示例来源:origin: org.onehippo.jcr.console/hippo-jcr-console-api

  1. @Override
  2. protected void respond(AjaxRequestTarget target) {
  3. final RequestCycle requestCycle = RequestCycle.get();
  4. String position = requestCycle.getRequest().getParameter("position");
  5. if (!Strings.isEmpty(position)) {
  6. onToggleFromClient(position, toggle(position, target));
  7. }
  8. }

代码示例来源:origin: org.onehippo.cms7/hippo-cms-yui

  1. @Override
  2. protected void respond(AjaxRequestTarget target) {
  3. final RequestCycle requestCycle = RequestCycle.get();
  4. String position = requestCycle.getRequest().getParameter("position");
  5. if (!Strings.isEmpty(position)) {
  6. onToggleFromClient(position, toggle(position, target));
  7. }
  8. }

代码示例来源:origin: org.wicketstuff/tinymce

  1. protected final void respond(AjaxRequestTarget target) {
  2. Request request = RequestCycle.get().getRequest();
  3. String newContent = request.getParameter(PARAM_HTMLCONT);
  4. newContent = onSave(target, newContent);
  5. Component component = getComponent();
  6. IModel defaultModel = component.getDefaultModel();
  7. defaultModel.setObject(newContent);
  8. target.addComponent(component);
  9. }

代码示例来源:origin: net.ontopia/ontopoly-editor

  1. @Override
  2. protected void respond(AjaxRequestTarget target) {
  3. final String draggableId = getComponent().getRequest().getParameter("id");
  4. // find component with the markup id given in the 'id' request parameter
  5. MarkupIdVisitor visitor = new MarkupIdVisitor(draggableId);
  6. // System.out.println("R: " + getComponent() + " " + getComponent().getParent()+ " " + getComponent().getParent().getParent());
  7. // getComponent().getPage().visitChildren(visitor);
  8. getDropContainer().visitChildren(visitor);
  9. onDrop(visitor.getFoundComponent(), target);
  10. }

代码示例来源:origin: net.ontopia/ontopoly-editor

  1. protected void onSetPosition(AjaxRequestTarget target) {
  2. String lat = RequestCycle.get().getRequest().getParameter("lat");
  3. String lng = RequestCycle.get().getRequest().getParameter("long");
  4. findFields();
  5. set(thetopic.getTopic().getTopicIF(), lat, PSI.ON_LATITUDE);
  6. set(thetopic.getTopic().getTopicIF(), lng, PSI.ON_LONGITUDE);
  7. latpan.getFieldValuesModel().setShowExtraField(false, false);
  8. latpan.onUpdate(target);
  9. lngpan.getFieldValuesModel().setShowExtraField(false, false);
  10. lngpan.onUpdate(target);
  11. onCloseOk(target);
  12. }

代码示例来源:origin: ontopia/ontopia

  1. protected void onSetPosition(AjaxRequestTarget target) {
  2. String lat = RequestCycle.get().getRequest().getParameter("lat");
  3. String lng = RequestCycle.get().getRequest().getParameter("long");
  4. findFields();
  5. set(thetopic.getTopic().getTopicIF(), lat, PSI.ON_LATITUDE);
  6. set(thetopic.getTopic().getTopicIF(), lng, PSI.ON_LONGITUDE);
  7. latpan.getFieldValuesModel().setShowExtraField(false, false);
  8. latpan.onUpdate(target);
  9. lngpan.getFieldValuesModel().setShowExtraField(false, false);
  10. lngpan.onUpdate(target);
  11. onCloseOk(target);
  12. }

相关文章