protected boolean isClicked(IRequestCycle cycle, String name) { // How to know which Submit button was actually // clicked? When submitted, it produces a request parameter // with its name and value (the value serves double duty as both // the label on the button, and the parameter value). // If the value isn't there, then this button wasn't // selected. return cycle.getParameter(name) != null; }
protected boolean isClicked(IRequestCycle cycle, String name) { String parameterName = name + ".x"; // the name.x parameter is not set for asynchronous submits String value = cycle.getParameter(FormConstants.SUBMIT_NAME_PARAMETER); return (cycle.getParameter(parameterName) != null) || name.equals(value); }
protected boolean isClicked(IRequestCycle cycle, String name) { String parameterName = name + ".x"; // the name.x parameter is not set for asynchronous submits String value = cycle.getParameter(FormConstants.SUBMIT_NAME_PARAMETER); return (cycle.getParameter(parameterName) != null) || name.equals(value); }
/** * Checks the submit name ({@link FormConstants#SUBMIT_NAME_PARAMETER}) to see if it matches * this LinkSubmit's assigned element name. */ protected boolean isClicked(IRequestCycle cycle, String name) { String value = cycle.getParameter(FormConstants.SUBMIT_NAME_PARAMETER); return name.equals(value); }
/** * Checks the submit name ({@link FormConstants#SUBMIT_NAME_PARAMETER}) to see if it matches * this LinkSubmit's assigned element name. */ protected boolean isClicked(IRequestCycle cycle, String name) { String value = cycle.getParameter(FormConstants.SUBMIT_NAME_PARAMETER); return name.equals(value); }
/** * {@inheritDoc} */ public boolean handlesResponse(IRequestCycle cycle) { String parm = cycle.getParameter(JSON_HEADER); if (parm != null && Boolean.valueOf(parm).booleanValue()) return true; if (_webRequest.getHeader(JSON_HEADER) != null) return true; return false; }
/** * {@inheritDoc} */ public boolean handlesResponse(IRequestCycle cycle) { String parm = cycle.getParameter(DOJO_AJAX_HEADER); if (parm != null && Boolean.valueOf(parm).booleanValue()) return true; return _webRequest.getHeader(DOJO_AJAX_HEADER) != null; }
/** * Triggerd by using filterOnChange logic. * * {@inheritDoc} */ public void trigger(IRequestCycle cycle) { setFilter(cycle.getParameter("filter")); }
/** * {@inheritDoc} */ public boolean handlesResponse(IRequestCycle cycle) { String parm = cycle.getParameter(DOJO_AJAX_HEADER); if (parm != null && Boolean.valueOf(parm).booleanValue()) return true; return _webRequest.getHeader(DOJO_AJAX_HEADER) != null; }
/** * Triggerd by using filterOnChange logic. * * {@inheritDoc} */ public void trigger(IRequestCycle cycle) { setFilter(cycle.getParameter("filter")); }
/** * @see org.apache.tapestry.form.AbstractFormComponent#rewindFormComponent(org.apache.tapestry.IMarkupWriter, * org.apache.tapestry.IRequestCycle) */ protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle) { String value = cycle.getParameter(getName()); updateValue(value); }
/** * @see org.apache.tapestry.form.AbstractFormComponent#rewindFormComponent(org.apache.tapestry.IMarkupWriter, * org.apache.tapestry.IRequestCycle) */ protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle) { String value = cycle.getParameter(getName()); updateValue(value); } }
/** * @see org.apache.tapestry.form.AbstractFormComponent#rewindFormComponent(org.apache.tapestry.IMarkupWriter, * org.apache.tapestry.IRequestCycle) */ protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle) { String value = cycle.getParameter(getName()); updateValue(value); } }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); // At one time, the page service required a session, but that is no longer necessary. // Users can now bookmark pages within a Tapestry application. Pages // can implement validate() and throw a PageRedirectException if they don't // want to be accessed this way. For example, most applications have a concept // of a "login" and have a few pages that don't require the user to be logged in, // and other pages that do. The protected pages should redirect to a login page. cycle.activate(pageName); _responseRenderer.renderResponse(cycle); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); if (_enabled) _resetEventHub.fireResetEvent(); cycle.activate(pageName); // Render the same page (that contained the reset link). _responseRenderer.renderResponse(cycle); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); if (_enabled) _resetEventHub.fireResetEvent(); cycle.activate(pageName); // Render the same page (that contained the reset link). _responseRenderer.renderResponse(cycle); }
/** * Invoked by the direct service to trigger the application-specific action by notifying the * {@link IActionListener listener}. */ public void trigger(IRequestCycle cycle) { String event = cycle.getParameter(BrowserEvent.NAME); IActionListener listener = (IActionListener)getAllListenerBindings().get(event); if (listener == null) throw Tapestry.createRequiredParameterException(this, event); getListenerInvoker().invokeListener(listener, this, cycle); }
/** * @see org.apache.tapestry.form.AbstractFormComponent#rewindFormComponent(org.apache.tapestry.IMarkupWriter, * org.apache.tapestry.IRequestCycle) */ protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle) { String optionValue = cycle.getParameter(getName()); IPropertySelectionModel model = getModel(); Object value = (optionValue == null) ? null : model .translateValue(optionValue); updateValue(value); }
/** * {@inheritDoc} */ public void trigger(IRequestCycle cycle) { String newValue = cycle.getParameter(getClientId()); setValue(newValue); if (getListener() != null) { getListenerInvoker().invokeListener(getListener(), this, cycle); } }
/** * {@inheritDoc} */ public void trigger(IRequestCycle cycle) { String newValue = cycle.getParameter(getClientId()); setValue(newValue); if (getListener() != null) { getListenerInvoker().invokeListener(getListener(), this, cycle); } }