@Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.renderJavascriptReference(MOOTOOLS_JS); } }
public void onComponentTag(Component component, ComponentTag tag) { tag.put("id", "bfFocusField"); super.onComponentTag(component, tag); } });
@Override public void bind(Component component) { super.bind(component); this.component = component; }
/** * @see org.apache.wicket.behavior.IBehavior#afterRender(org.apache.wicket.Component) */ public final void afterRender(final Component component) { try { onRendered(component); } finally { cleanup(); } }
/** * @see org.apache.wicket.behavior.IBehavior#exception(org.apache.wicket.Component, * java.lang.RuntimeException) */ public final void exception(Component component, RuntimeException exception) { try { onException(component, exception); } finally { cleanup(); } }
super.beforeRender(context);
/** * @see org.apache.wicket.behavior.IBehavior#afterRender(org.apache.wicket.Component) */ public final void afterRender(final Component component) { try { onRendered(component); } finally { cleanup(); } }
/** * @see org.apache.wicket.behavior.IBehavior#exception(org.apache.wicket.Component, * java.lang.RuntimeException) */ public final void exception(Component component, RuntimeException exception) { try { onException(component, exception); } finally { cleanup(); } }
/** * @see org.apache.wicket.behavior.AbstractBehavior#beforeRender(org.apache.wicket.Component) */ @Override public void beforeRender(Component component) { super.beforeRender(component); final RequestCycle requestCycle = RequestCycle.get(); // Temporarily replace the web response with a String response webResponse = requestCycle.getResponse(); // Determine encoding final String encoding = Application.exists() ? Application.get() .getRequestCycleSettings() .getResponseRequestEncoding() : "UTF-8"; // Set content type based on markup type for page webResponse.setContentType("text/" + getMarkupType(component) + "; charset=" + encoding); // Create a new response object final Response response = newResponse(); if (response == null) { throw new IllegalStateException("newResponse() must not return null"); } // and make it the current one requestCycle.setResponse(response); }
@Override public void renderHead(IHeaderResponse iHeaderResponse) { super.renderHead(iHeaderResponse); iHeaderResponse.renderOnLoadJavascript("var focusElement = document.getElementById('"+ component.getMarkupId() + "'); if (focusElement != null) focusElement.focus();"); }
@Override public void onComponentTag(Component component, ComponentTag tag) { super.onComponentTag(component, tag); tag.put(event, "Wicket.stopEvent(event);"); }
@Override public void bind(Component component) { super.bind(component); this.component = component; }
public void renderHead(IHeaderResponse iHeaderResponse) { super.renderHead(iHeaderResponse); iHeaderResponse.renderOnLoadJavascript("var focusElement = document.getElementById('"+ component.getMarkupId() + "'); if (focusElement != null) focusElement.focus();"); }
public void onComponentTag(Component component, ComponentTag tag) { super.onComponentTag(component, tag); tag.put("onclick", getStartEditorScriptName() + "();"); } };
@Override public void bind(Component component) { super.bind(component); component.add(new ProbeFlashBehavior() { @Override protected void handleFlash(FlashVersion flash) { WebAppBehavior.this.flash = flash; } }); }
@Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.renderJavascriptReference(SCRIPT); TextTemplateHeaderContributor.forJavaScript(INIT, model).renderHead(response); }
@Override public void onComponentTag(Component component, ComponentTag tag) { tag.put("id", getFocusTrackerFieldCssId()); super.onComponentTag(component, tag); } });
/** * {@inheritDoc} */ @Override public void bind(final Component component) { super.bind(component); component.setOutputMarkupId(true); }
@Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.renderJavascriptReference(SCRIPT); TextTemplateHeaderContributor.forJavaScript(INIT, model).renderHead(response); }
@Override public void onComponentTag(Component component, ComponentTag tag) { super.onComponentTag(component, tag); DateMidnight day = mDateModel.getObject(); Date end = mEventModel.getObject().getEndTime(); int numberOfDays = 1; if (end != null) { DateTime endTime = new DateTime(end); int days = Math.abs(Days.daysBetween(day, endTime).getDays()); numberOfDays = Math.min(days, mDaysLeftInRow) + 1; } // TODO: is it valid XHTML to just arbitrarily add attributes not defined // in the spec? It sure makes it simple on the JS-side to access // additional data about the event needed for the client-side // rendering. tag.put("days", numberOfDays); } }