/** * 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 HtmlPage page = (HtmlPage) getPage(); if (page != defaultPage) { return defaultPage; } final HtmlForm form = getEnclosingForm(); if (form != null) { return form.submit(this); } return super.doClickAction(defaultPage); }
/** * 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 HtmlPage page = (HtmlPage) getPage(); if (page != defaultPage) { return defaultPage; } final HtmlForm form = getEnclosingForm(); if (form != null) { return form.submit(this); } return super.doClickAction(defaultPage); }
/** * 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 HtmlPage page = (HtmlPage) getPage(); if (page != defaultPage) { return defaultPage; } final HtmlForm form = getEnclosingForm(); if (form != null) { return form.submit(this); } return super.doClickAction(defaultPage); }
/** * Creates an instance. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ HtmlSubmitInput(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(namespaceURI, qualifiedName, page, attributes); if (getPage().getWebClient().getBrowserVersion().isIE() && !hasAttribute("value")) { setAttribute("value", DEFAULT_VALUE); } }
/** * Creates an instance. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ HtmlSubmitInput(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(namespaceURI, qualifiedName, page, attributes); if (getPage().getWebClient().getBrowserVersion().isIE() && !hasAttribute("value")) { setAttribute("value", DEFAULT_VALUE); } }
/** * Creates an instance. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ HtmlSubmitInput(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(namespaceURI, qualifiedName, page, attributes); if (getPage().getWebClient().getBrowserVersion().isIE() && !hasAttribute("value")) { setAttribute("value", DEFAULT_VALUE); } }