/** * Submits this form using the web client from which it was originally obtained. * Will usually return the result of that submission; however, if the submit button's 'onclick' * or the form's 'onsubmit' event is triggered and * inhibits the submission, will return the updated contents of the frame containing this form. **/ public WebResponse submit( SubmitButton button ) throws IOException, SAXException { WebResponse result=submit(button,0,0); return result; }
/** * Submits this form using the web client from which it was originally obtained. * Will usually return the result of that submission; however, if the submit button's 'onclick' * or the form's 'onsubmit' event is triggered and * inhibits the submission, will return the updated contents of the frame containing this form. **/ public WebResponse submit( SubmitButton button ) throws IOException, SAXException { WebResponse result=submit(button,0,0); return result; }
/** * Submits this form using the web client from which it was originally obtained. * Will usually return the result of that submission; however, if the submit button's 'onclick' * or the form's 'onsubmit' event is triggered and * inhibits the submission, will return the updated contents of the frame containing this form. **/ public WebResponse submit( SubmitButton button ) throws IOException, SAXException { WebResponse result=submit(button,0,0); return result; }
/** * Submits this form using the web client from which it was originally obtained. **/ public WebResponse submit() throws IOException, SAXException { return submit( getDefaultButton() ); }
/** * Submits this form using the web client from which it was originally obtained, ignoring any buttons defined for the form. * @since 1.6 **/ public WebResponse submitNoButton() throws SAXException, IOException { return submit( SubmitButton.createFakeSubmitButton( this /* fake */ ) ); }
/** * Submits this form using the web client from which it was originally obtained, ignoring any buttons defined for the form. * @since 1.6 **/ public WebResponse submitNoButton() throws SAXException, IOException { return submit( SubmitButton.createFakeSubmitButton( this /* fake */ ) ); }
/** * Submits this form using the web client from which it was originally obtained. **/ public WebResponse submit() throws IOException, SAXException { return submit( getDefaultButton() ); }
/** * Submits this form using the web client from which it was originally obtained. **/ public WebResponse submit() throws IOException, SAXException { return submit( getDefaultButton() ); }
/** * Submits this form using the web client from which it was originally obtained, ignoring any buttons defined for the form. * @since 1.6 **/ public WebResponse submitNoButton() throws SAXException, IOException { return submit( SubmitButton.createFakeSubmitButton( this /* fake */ ) ); }
protected Object scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(project._getURL()+"/servlets/ProjectForumDelete?forumID="+id); WebForm form = Util.getFormWithAction(response,"ProjectForumDelete"); checkError(form.submit()); return null; } }.run();
protected Object scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(project._getURL()+"/servlets/MailingListDelete?list="+name); WebForm form = Util.getFormWithAction(response,"MailingListDelete"); if(form==null) throw new ProcessingException("form not found"); checkError(form.submit()); return null; } }.run();
protected Void scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(project._getURL()+"/issues/enter_bug.cgi"); WebForm form = Util.getFormWithAction(response, "post_bug.cgi"); for (Action action : actions) action.update(form); response = checkError(form.submit()); return null; } }.run();
protected Object scrape() throws IOException, SAXException, ProcessingException { WebResponse r = goTo( project._getURL()+"/servlets/ProjectFolderDelete?folderID="+id); checkError(Util.getFormWithAction(r,"ProjectFolderDelete").submit()); parent.reset(); return null; } }.run();
protected Object scrape() throws IOException, SAXException, ProcessingException { WebResponse r = goTo( folder.project._getURL()+"/servlets/ProjectDocumentDelete?documentID="+id+"&maxDepth="); checkError(Util.getFormWithAction(r,"ProjectDocumentDelete").submit()); folder.reset(); return null; } }.run();
protected Object scrape() throws IOException, SAXException, ProcessingException { WebResponse r = goTo( folder.project._getURL()+"/servlets/ProjectDocumentEdit?documentID="+id); WebForm f = Util.getFormWithAction(r, "ProjectDocumentEdit?action=Edit%20file&documentID=" + id); f.setParameter("folder",String.valueOf(newFolder.getId())); checkError(f.submit()); folder.reset(); newFolder.reset(); return null; } }.run();
protected String scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(_getURL()+"/servlets/ProjectEdit"); WebForm form = Util.getFormWithAction(response,"ProjectEdit"); String old = form.getParameterValue("status"); form.setParameter("status",msg); checkError(form.submit()); return old; } }.run();
protected Object scrape() throws IOException, SAXException, ProcessingException { String url = project._getURL() + "/servlets/ProjectNewsApproval"; WebResponse response = goTo(url); WebForm form = Util.getFormWithAction(response, url); if(form==null) throw new ProcessingException("missing form"); form.setParameter("operation "+id, action); checkError(form.submit()); return null; } }.run();
protected Void scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(project._getURL()+"/issues/show_bug.cgi?id="+id); WebForm form = Util.getFormWithAction(response, "process_bug.cgi"); for (Action action : actions) action.update(form); form.setParameter("comment",comment); response = checkError(form.submit()); // TODO: how do we check if there was an error? // the response code is 200 when I submit a form without any comment. // what happens with a collision? return null; } }.run();
protected JNFileFolder scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(project._getURL()+"/servlets/ProjectFolderAdd?folderID="+id); WebForm form = Util.getFormWithAction(response, "ProjectFolderAdd"); form.setParameter("name",name); form.setParameter("description",description); response = checkError(form.submit()); // make sure there's no error if(response.getText().indexOf("Validation error")!=-1) throw new ProcessingException("failed to create a folder"); subFolders = null; return getSubFolder(name); } }.run();
protected Object scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(project._getURL()+"/servlets/ProjectNewsDelete?newsItemID="+id); WebForm form = Util.getFormWithAction(response,"ProjectNewsDelete"); if(form==null) throw new ProcessingException("missing form"); SubmitButton submit = form.getSubmitButton("Button","Confirm delete"); if(submit==null) throw new ProcessingException("no submit button"); checkError(form.submit(submit)); return null; } }.run();