Examples of FieldAttributes


Examples of com.sematext.searchschemer.index.FieldAttributes

  @Test
  public void testParseDynamicFields() throws Exception {
    SolrDynamicFieldsDefinitionReader reader = new SolrDynamicFieldsDefinitionReader(new File(getClass().getClassLoader()
        .getResource("solr/test_schema_small_dynamic.xml").getFile()));
    assertEquals(1, reader.readFields().size());
    FieldAttributes field = reader.readFields().get(0);
    assertNotNull(field);
    assertEquals("*_i", field.name());
    assertEquals(FieldType.INTEGER, field.fieldType());
  }
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.FieldAttributes

    public FieldElement(XDIMEContextInternal context) {
        // This element is unstyled, and does not require validation.
        super(WidgetElements.FIELD, UnstyledStrategy.STRATEGY,
                context);

        protocolAttributes = new FieldAttributes();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.FieldAttributes

    }

    // Javadoc inherited
    protected void initialiseElementSpecificAttributes(XDIMEContextInternal context,
            XDIMEAttributes attributes) throws XDIMEException {
        FieldAttributes fieldAttributes = (FieldAttributes) protocolAttributes;

        fieldAttributes.setRef(attributes.getValue("", "ref"));

        fieldAttributes.setMessageArea(attributes.getValue("", "message-area"));
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.FieldAttributes

        if (!isWidgetSupported(protocol)) {
            return;
        }

        // Add this field to the current multiple validator instance.
        FieldAttributes fieldAttributes = (FieldAttributes) attributes;

        WidgetDefaultModule widgetModule = (WidgetDefaultModule) protocol.getWidgetModule();
       
        MultipleValidatorBuilder builder = widgetModule.getMultipleValidatorBuilder();
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.FieldAttributes

            Iterator fieldsIterator = validator.getFieldsIterator();

            boolean firstField = true;

            while (fieldsIterator.hasNext()) {
                FieldAttributes fieldAttributes = (FieldAttributes) fieldsIterator.next();

                // Get attributes of refered input element.
                String inputId = fieldAttributes.getRef();

                XFFormFieldAttributes formFieldAttributes = actualProtocol.getFormFieldAttributes(inputId);

                // If no attributes were found, it means that the refered text
                // input field
                // does not exist. In that case, don't render it.
                if (formFieldAttributes != null) {
                    // Render comma, if this is not the first rendered field.
                    if (!firstField) {
                        scriptWriter.write(", ");
                    }

                    // Get styles of the input element.
                    stylesExtractor.setStyles(formFieldAttributes.getStyles());

                    stylesExtractor.setPseudoClass(null);

                    // Render field name, which equals to ID of the input
                    // element.
                    scriptWriter.write(createJavaScriptString(inputId) + ":{");

                    // Render ID of the input element.
                    scriptWriter.write("inputId: " + createJavaScriptString(inputId));

                    // Render message area for field, if 'message' was specified
                    // as one of the validation error actions.
                    boolean displayMessages = stylesExtractor
                            .containsMessageValidationErrorAction();

                    if (displayMessages) {
                        String messageId = fieldAttributes.getMessageArea();

                        if (messageId != null) {
                            scriptWriter.write(", messageAreaId: " + createJavaScriptString(messageId));
                        }
                    }
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.