/** * Creates an instance. * * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ HtmlResetInput(final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(qualifiedName, page, addValueIfNeeded(page, attributes)); }
/** * Process {@link HtmlResetInput}. * * @param builder the StringBuilder to add to * @param htmlResetInput the target to process */ protected void appendResetInput(final StringBuilder builder, final HtmlResetInput htmlResetInput) { builder.append(htmlResetInput.asText()); }
/** * {@inheritDoc} Returns "Reset" if <tt>value</tt> attribute is not defined. */ @Override public String asText() { String text = getValueAttribute(); if (text == ATTRIBUTE_NOT_DEFINED) { text = DEFAULT_VALUE; } return text; }
result = new HtmlResetInput(namespaceURI, qualifiedName, page, attributeMap);
/** * {@inheritDoc} */ @Override protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { form.reset(); return false; } super.doClickStateUpdate(shiftKey, ctrlKey); return false; }
/** * {@inheritDoc} */ @Override protected void setAttributeNS(final String namespaceURI, final String qualifiedName, final String attributeValue, final boolean notifyAttributeChangeListeners, final boolean notifyMutationObservers) { if ("value".equals(qualifiedName)) { setDefaultValue(attributeValue, false); } super.setAttributeNS(namespaceURI, qualifiedName, attributeValue, notifyAttributeChangeListeners, notifyMutationObservers); }
HtmlResetInput btn = (HtmlResetInput) o; if (form == null) { form = btn.getEnclosingFormOrDie();
result = new HtmlResetInput(namespaceURI, qualifiedName, page, attributeMap);
/** * {@inheritDoc} */ @Override protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { form.reset(); return false; } super.doClickStateUpdate(shiftKey, ctrlKey); return false; }
/** * {@inheritDoc} */ @Override protected void setAttributeNS(final String namespaceURI, final String qualifiedName, final String attributeValue, final boolean notifyAttributeChangeListeners, final boolean notifyMutationObservers) { if ("value".equals(qualifiedName)) { setDefaultValue(attributeValue, false); } super.setAttributeNS(namespaceURI, qualifiedName, attributeValue, notifyAttributeChangeListeners, notifyMutationObservers); }
result = new HtmlResetInput(namespaceURI, qualifiedName, page, attributeMap);
/** * This method will be called if there either wasn't an onclick handler or there was * but the result of that handler was true. This is the default behavior of clicking * the element. The default implementation returns the current page - subclasses * requiring different behavior (like {@link HtmlSubmitInput}) will override this * method. * * @param defaultPage the default page to return if the action does not * load a new page. * @return the page that is currently loaded after execution of this method * @throws IOException if an IO error occurred */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { return form.reset(); } return super.doClickAction(defaultPage); }
/** * Process {@link HtmlResetInput}. * * @param builder the StringBuilder to add to * @param htmlResetInput the target to process */ protected void appendResetInput(final StringBuilder builder, final HtmlResetInput htmlResetInput) { builder.append(htmlResetInput.asText()); }
/** * {@inheritDoc} Returns "Reset" if <tt>value</tt> attribute is not defined. */ @Override public String asText() { String text = getValueAttribute(); if (text == ATTRIBUTE_NOT_DEFINED) { text = DEFAULT_VALUE; } return text; }
/** * Creates an instance. * * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ HtmlResetInput(final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(qualifiedName, page, addValueIfNeeded(page, attributes)); }
element = new HtmlResetInput(namespaceURI, qualifiedName, page, attributeMap);
/** * This method will be called if there either wasn't an onclick handler or there was * but the result of that handler was true. This is the default behavior of clicking * the element. The default implementation returns the current page - subclasses * requiring different behavior (like {@link HtmlSubmitInput}) will override this * method. * * @param defaultPage the default page to return if the action does not * load a new page. * @return the page that is currently loaded after execution of this method * @throws IOException if an IO error occurred */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { return form.reset(); } return super.doClickAction(defaultPage); }
element = new HtmlResetInput(namespaceURI, qualifiedName, page, attributeMap);
/** * This method will be called if there either wasn't an onclick handler or there was * but the result of that handler was true. This is the default behavior of clicking * the element. The default implementation returns the current page - subclasses * requiring different behavior (like {@link HtmlSubmitInput}) will override this * method. * * @param defaultPage the default page to return if the action does not * load a new page. * @return the page that is currently loaded after execution of this method * @throws IOException if an IO error occurred */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { return form.reset(); } return super.doClickAction(defaultPage); }
element = new HtmlResetInput(namespaceURI, qualifiedName, page, attributeMap);