Examples of numberOfLines()


Examples of org.apache.isis.core.metamodel.facets.propparam.multiline.MultiLineFacet.numberOfLines()

            } else {
                field.setWidth(typicalLengthFacet.value());
            }

            final MultiLineFacet multiLineFacet = param.getFacet(MultiLineFacet.class);
            field.setHeight(multiLineFacet.numberOfLines());
            field.setWrapped(!multiLineFacet.preventWrapping());

            final ObjectSpecification spec = param.getSpecification();
            if (spec.containsFacet(BooleanValueFacet.class)) {
                field.setType(InputField.CHECKBOX);
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.propparam.multiline.MultiLineFacet.numberOfLines()

                }
            }
        });

        final MultiLineFacet multiLineFacet = getModel().getFacet(MultiLineFacet.class);
        setAttribute(textField, "rows", multiLineFacet.numberOfLines());
       
       
        final Integer maxLength = getValueOf(getModel(), MaxLengthFacet.class);
        if(maxLength != null) {
            // in conjunction with javascript in jquery.isis.wicket.viewer.js
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.propparam.multiline.MultiLineFacet.numberOfLines()

    public int getNumberOfLines(final ScalarModel scalarModel) {
        final MultiLineFacet multiLineFacet = scalarModel.getFacet(MultiLineFacet.class);
        int numberOfLines = 1;
       
        if (multiLineFacet != null) {
            numberOfLines = multiLineFacet.numberOfLines();
        }
       
        return numberOfLines;
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.propparam.multiline.MultiLineFacet.numberOfLines()

            }
        });
       

        final MultiLineFacet multiLineFacet = getModel().getFacet(MultiLineFacet.class);
        setAttribute(textField, "rows", multiLineFacet.numberOfLines());
       
       
        final Integer maxLength = getValueOf(getModel(), MaxLengthFacet.class);
        if(maxLength != null) {
            // in conjunction with javascript in jquery.isis.wicket.viewer.js
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.propparam.multiline.MultiLineFacet.numberOfLines()

    public int getNumberOfLines(final ScalarModel scalarModel) {
        final MultiLineFacet multiLineFacet = scalarModel.getFacet(MultiLineFacet.class);
        int numberOfLines = 1;
       
        if (multiLineFacet != null) {
            numberOfLines = multiLineFacet.numberOfLines();
        }
       
        return numberOfLines;
    }
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.multiline.annotation.MultiLineFacetAnnotationOnType.numberOfLines()

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MultiLineFacetAnnotationOnType);
        final MultiLineFacetAnnotationOnType multiLineFacetAnnotation = (MultiLineFacetAnnotationOnType) facet;
        assertEquals(3, multiLineFacetAnnotation.numberOfLines());
        assertEquals(false, multiLineFacetAnnotation.preventWrapping());
    }

    public void testMultiLineAnnotationPickedUpOnProperty() {
        final MultiLineOnPropertyFacetFactory facetFactory = new MultiLineOnPropertyFacetFactory();
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.multiline.annotation.MultiLineFacetAnnotationOnType.numberOfLines()

        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        final MultiLineFacetAnnotationOnType multiLineFacetAnnotationOnType = (MultiLineFacetAnnotationOnType) facet;
        assertEquals(6, multiLineFacetAnnotationOnType.numberOfLines());
        assertEquals(true, multiLineFacetAnnotationOnType.preventWrapping());
    }

    public void testMultiLineAnnotationIgnoredForNonStringProperties() {
        final MultiLineOnPropertyFacetFactory facetFactory = new MultiLineOnPropertyFacetFactory();
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.multiline.annotation.MultiLineFacetAnnotationOnType.numberOfLines()

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MultiLineFacetAnnotationOnType);
        final MultiLineFacetAnnotationOnType multiLineFacetAnnotation = (MultiLineFacetAnnotationOnType) facet;
        assertEquals(3, multiLineFacetAnnotation.numberOfLines());
        assertEquals(false, multiLineFacetAnnotation.preventWrapping());
    }

    public void testMultiLineAnnotationPickedUpOnProperty() {
        final MultiLineAnnotationOnPropertyFacetFactory facetFactory = new MultiLineAnnotationOnPropertyFacetFactory();
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.multiline.annotation.MultiLineFacetAnnotationOnType.numberOfLines()

        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        final MultiLineFacetAnnotationOnType multiLineFacetAnnotationOnType = (MultiLineFacetAnnotationOnType) facet;
        assertEquals(6, multiLineFacetAnnotationOnType.numberOfLines());
        assertEquals(true, multiLineFacetAnnotationOnType.preventWrapping());
    }

    public void testMultiLineAnnotationIgnoredForNonStringProperties() {
        final MultiLineAnnotationOnPropertyFacetFactory facetFactory = new MultiLineAnnotationOnPropertyFacetFactory();
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.multiline.annotation.MultiLineFacetAnnotationOnType.numberOfLines()

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MultiLineFacetAnnotationOnType);
        final MultiLineFacetAnnotationOnType multiLineFacetAnnotation = (MultiLineFacetAnnotationOnType) facet;
        assertEquals(3, multiLineFacetAnnotation.numberOfLines());
        assertEquals(false, multiLineFacetAnnotation.preventWrapping());
    }

    public void testMultiLineAnnotationPickedUpOnProperty() {
        MultiLineAnnotationOnPropertyFacetFactory facetFactory = new MultiLineAnnotationOnPropertyFacetFactory();
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.