Package vn.pyco.tinycms.model

Examples of vn.pyco.tinycms.model.ContentProperty


    }

    @OnEvent(value = EventConstants.SUCCESS, component = "contentPropertiesForm")
    Object submitPropertiesForm() {
        PropertyType propertyTypeObj = _propertyTypeService.getPropertyTypeByName(_propertyTypeName);
        _contentProperty = new ContentProperty();
        _contentProperty.setCode(_code);
        _contentProperty.setName(_name);
        _contentProperty.setConstraints(_constraints);
        _contentProperty.setOrder(_order);
        _contentProperty.setPropertyType(propertyTypeObj);
        if (_contentType == null) {
            _contentType = new ContentType();
        }

        List<ContentProperty> properties = _contentType.getProperties();
        if(properties == null) {
            properties = new ArrayList<ContentProperty>();
        }
        for (int i = _order; i < properties.size(); i++) {
            ContentProperty contentProperty = properties.get(i);
            contentProperty.setOrder(contentProperty.getOrder() + 1);
        }

        if (_order >= properties.size()) {
            //Add to end of list
            properties.add(_contentProperty);
View Full Code Here

TOP

Related Classes of vn.pyco.tinycms.model.ContentProperty

Copyright © 2018 www.massapicom. 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.