Examples of FormFields


Examples of au.id.jericho.lib.html.FormFields

  }

  private void saveFormFilesForImport(String definition, String defVerId) throws Exception {
    Source source = new Source(new String(definition));
    source.setLogWriter(new OutputStreamWriter(System.err));
    FormFields formFields = source.findFormFields();

    StringBuffer sb = new StringBuffer();
    for (Iterator i = formFields.iterator(); i.hasNext();) {
      FormField formField = (FormField) i.next();
      formFields.addValue(formField.getName(), sb.toString());
      sb.setLength(0);
    }
   
    OutputDocument outputDocument = new OutputDocument(source);
    outputDocument.replace(formFields);
View Full Code Here

Examples of au.id.jericho.lib.html.FormFields

      source.setLogWriter(new OutputStreamWriter(System.err)); // send
                                    // log
                                    // messages
                                    // to
                                    // stderr
      FormFields formFields=source.findFormFields();
      System.out.println("The document contains "+formFields.size()+" form fields:\n");
     
      StringBuffer sb = new StringBuffer();
      for (Iterator i=formFields.iterator(); i.hasNext();) {
        FormField formField=(FormField)i.next();
        System.out.println(formField.getName());
        System.out.println(formField.getFormControl().getFormControlType().toString());
        System.out.println(formField.getDebugInfo());
       
        // sb.append("<" + "%=" + formField.getName() + "%" + ">");
        formFields.addValue(formField.getName(),sb.toString());
        sb.setLength(0);
      }
     
     
      OutputDocument outputDocument=new OutputDocument(source);
View Full Code Here

Examples of com.alibaba.citrus.turbine.dataresolver.FormFields

        if (groupsAnnotation != null) {
            return new GroupsResolver(context, paramType, groupsAnnotation);
        }

        // Fields对象:annotation @FormFields,参数类型可为Field[],List<Field>或任意可转换的类型
        FormFields fieldsAnnotation = context.getAnnotation(FormFields.class);

        if (fieldsAnnotation != null) {
            return new FieldsResolver(context, paramType, fieldsAnnotation);
        }
View Full Code Here

Examples of com.alibaba.citrus.turbine.dataresolver.FormFields

        if (groupsAnnotation != null) {
            return new GroupsResolver(context, paramType, groupsAnnotation);
        }

        // Fields����annotation @FormFields���������Ϳ�ΪField[]��List<Field>�������ת��������
        FormFields fieldsAnnotation = context.getAnnotation(FormFields.class);

        if (fieldsAnnotation != null) {
            return new FieldsResolver(context, paramType, fieldsAnnotation);
        }
View Full Code Here

Examples of com.aspose.words.FormFields

      // /* Replace text directly */
      // int count = wordDoc.getRange().replace("DATE_DEP_AFF_FAX",
      // "DOMINIQUE", true, true);
      // System.out.printf("%s items replaced !\n", count);
      /* Replace text fields */
      FormFields formFields = wordDoc.getRange().getFormFields();
      for (int i = 0; i < formFields.getCount(); i++) {
        FormField formField = formFields.get(i);
        String value = "VALUE_" + Integer.toString(i);
        System.out.printf("Processing FormFiled['%s'] to ['%s']\n",
            formField.getName(), value);
        int count = formField.getDocument().getRange().replace(
            formField.getName(), value, true, true);
View Full Code Here

Examples of net.htmlparser.jericho.FormFields

        List<NameValuePair> result = new ArrayList<NameValuePair>();
        if (input instanceof NameValuePair){
            result.add((NameValuePair) input);
        } else if (input instanceof FormFields){
            //println "parseNameValues() - FormFields - input: ${input.getClass()}, formControls.size(): ${input.formControls.size()}"
            FormFields formFields = (FormFields) input;
            for (Object formControl : formFields.getFormControls()){
                result.addAll(parseNameValues(formControl));
            }

        } else if (input instanceof FormControl){
            //println "parseNameValues() - FormControl - input: ${input.getClass()}, input: ${input}, input.values: ${input.values}, getAttributesMap() : ${input.getPredefinedValues()  }"
View Full Code Here

Examples of net.htmlparser.jericho.FormFields

            httpclient.setRedirectStrategy(new LaxRedirectStrategy());
           
            Source source = new Source(EntityUtils.toString(entity));
            List <NameValuePair> nvps = new ArrayList <NameValuePair>();
            FormFields formFields = source.getFormFields();
           
            List<Element> forms = source.getAllElements(HTMLElementName.FORM);
            Assert.assertEquals("Only one form expected but got " + forms.size(), 1, forms.size());
            String postUrl = forms.get(0).getAttributeValue("action");
           
            Assert.assertNotNull("Form field 'wa' not found", formFields.get("wa"));
            Assert.assertNotNull("Form field 'wresult' not found", formFields.get("wresult"));
           
            for (FormField formField : formFields) {
                if (formField.getUserValueCount() != 0) {
                    nvps.add(new BasicNameValuePair(formField.getName(),
                             formField.getValues().get(0)));
View Full Code Here

Examples of net.htmlparser.jericho.FormFields

            httpclient.setRedirectStrategy(new LaxRedirectStrategy());
           
            Source source = new Source(EntityUtils.toString(entity));
            List <NameValuePair> nvps = new ArrayList <NameValuePair>();
            FormFields formFields = source.getFormFields();
           
            List<Element> forms = source.getAllElements(HTMLElementName.FORM);
            Assert.assertEquals("Only one form expected but got " + forms.size(), 1, forms.size());
            String postUrl = forms.get(0).getAttributeValue("action");
           
            Assert.assertNotNull("Form field 'wa' not found", formFields.get("wa"));
            Assert.assertNotNull("Form field 'wresult' not found", formFields.get("wresult"));
           
            for (FormField formField : formFields) {
                if (formField.getUserValueCount() != 0) {
                    nvps.add(new BasicNameValuePair(formField.getName(),
                             formField.getValues().get(0)));
View Full Code Here

Examples of net.htmlparser.jericho.FormFields

            httpclient.setRedirectStrategy(new LaxRedirectStrategy());
           
            Source source = new Source(EntityUtils.toString(entity));
            List <NameValuePair> nvps = new ArrayList <NameValuePair>();
            FormFields formFields = source.getFormFields();
           
            List<Element> forms = source.getAllElements(HTMLElementName.FORM);
            Assert.assertEquals("Only one form expected but got " + forms.size(), 1, forms.size());
            String postUrl = forms.get(0).getAttributeValue("action");
           
            Assert.assertNotNull("Form field 'wa' not found", formFields.get("wa"));
            Assert.assertNotNull("Form field 'wresult' not found", formFields.get("wresult"));
           
            for (FormField formField : formFields) {
                if (formField.getUserValueCount() != 0) {
                    nvps.add(new BasicNameValuePair(formField.getName(),
                             formField.getValues().get(0)));
View Full Code Here

Examples of net.htmlparser.jericho.FormFields

            httpclient.setRedirectStrategy(new LaxRedirectStrategy());
           
            Source source = new Source(EntityUtils.toString(entity));
            List <NameValuePair> nvps = new ArrayList <NameValuePair>();
            FormFields formFields = source.getFormFields();
           
            List<Element> forms = source.getAllElements(HTMLElementName.FORM);
            Assert.assertEquals("Only one form expected but got " + forms.size(), 1, forms.size());
            String postUrl = forms.get(0).getAttributeValue("action");
           
            Assert.assertNotNull("Form field 'wa' not found", formFields.get("wa"));
            Assert.assertNotNull("Form field 'wresult' not found", formFields.get("wresult"));
           
            for (FormField formField : formFields) {
                if (formField.getUserValueCount() != 0) {
                    nvps.add(new BasicNameValuePair(formField.getName(),
                             formField.getValues().get(0)));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.