Package com.alkacon.vie.shared

Examples of com.alkacon.vie.shared.I_Entity


     * @param context the context element
     * @param scrollParent the scroll element to be used for automatic scrolling during drag and drop
     */
    public void renderEntityForm(String entityId, Panel context, Element scrollParent) {

        I_Entity entity = m_vie.getEntity(entityId);
        if (entity != null) {
            I_Type type = m_vie.getType(entity.getTypeName());
            FlowPanel formPanel = new FlowPanel();
            context.add(formPanel);
            AttributeHandler.setScrollElement(scrollParent);
            RootHandler rootHandler = new RootHandler();
            m_widgetService.getRendererForType(type).renderForm(entity, formPanel, rootHandler, 0);
View Full Code Here


     * @param entityId the entity id
     * @param context the context element
     */
    public void renderInlineEntity(String entityId, Element context) {

        I_Entity entity = m_vie.getEntity(entityId);
        if (entity != null) {
            I_Type type = m_vie.getType(entity.getTypeName());
            m_widgetService.getRendererForType(type).renderInline(entity, context);
        }
    }
View Full Code Here

     * @param entityId the entity id
     * @param formParent the form parent widget
     */
    public void renderInlineEntity(String entityId, I_InlineFormParent formParent) {

        I_Entity entity = m_vie.getEntity(entityId);
        if (entity != null) {
            I_Type type = m_vie.getType(entity.getTypeName());
            m_widgetService.getRendererForType(type).renderInline(entity, formParent);
        }
    }
View Full Code Here

     */
    public void saveEntities(Set<String> entityIds, boolean clearOnSuccess, Command callback) {

        List<com.alkacon.acacia.shared.Entity> entities = new ArrayList<com.alkacon.acacia.shared.Entity>();
        for (String entityId : entityIds) {
            I_Entity entity = m_vie.getEntity(entityId);
            if (entity != null) {
                entities.add(com.alkacon.acacia.shared.Entity.serializeEntity(entity));
            }
        }
        saveEntities(entities, clearOnSuccess, callback);
View Full Code Here

     * @param clearOnSuccess <code>true</code> to clear all entities from VIE on success
     * @param callback the callback executed on success
     */
    public void saveEntity(String entityId, boolean clearOnSuccess, Command callback) {

        I_Entity entity = m_vie.getEntity(entityId);
        saveEntity(entity, clearOnSuccess, callback);
    }
View Full Code Here

     * @param entityId the entity id
     * @param callback the callback executed on success
     */
    public void saveEntity(String entityId, Command callback) {

        I_Entity entity = m_vie.getEntity(entityId);
        saveEntity(entity, false, callback);
    }
View Full Code Here

        I_LayoutBundle.INSTANCE.form().ensureInjected();

        I_Vie vie = Vie.getInstance();
        ContentDefinition definition = generateContentDefinition();
        I_Entity person = register(vie, definition);

        WidgetService service = new WidgetService();
        service.init(definition);
        service.addWidgetFactory("string", new I_WidgetFactory() {
View Full Code Here

                    }

                }
                valueWidget.setValueWidget(widget, value, true);
            } else {
                I_Entity value = m_vie.createEntity(null, m_attributeType.getId());
                insertValueAfterReference(value, reference);
            }
        }
        updateButtonVisisbility();
    }
View Full Code Here

     * @param value the value
     */
    public void changeValue(AttributeValueView reference, String value) {

        if (getEntityType().isChoice()) {
            I_Entity choice = m_entity.getAttribute(Type.CHOICE_ATTRIBUTE_NAME).getComplexValues().get(
                reference.getValueIndex());
            String attributeName = getChoiceName(reference.getValueIndex());
            if (attributeName != null) {
                choice.setAttributeValue(attributeName, value, 0);
            }
        } else {
            m_entity.setAttributeValue(m_attributeName, value, reference.getValueIndex());
        }

View Full Code Here

     * @param value the entity into which the new entities for the given path should be inserted
     * @param choicePath the path of choice attributes
     */
    public void createNestedEntitiesForChoicePath(I_Entity value, List<String> choicePath) {

        I_Entity parentValue = value;
        for (String attributeChoice : choicePath) {
            I_Type choiceType = m_vie.getType(parentValue.getTypeName()).getAttributeType(Type.CHOICE_ATTRIBUTE_NAME);
            I_Entity choice = m_vie.createEntity(null, choiceType.getId());
            parentValue.addAttributeValue(Type.CHOICE_ATTRIBUTE_NAME, choice);
            I_Type choiceOptionType = choiceType.getAttributeType(attributeChoice);
            if (choiceOptionType.isSimpleType()) {
                String choiceValue = m_widgetService.getDefaultAttributeValue(attributeChoice);
                choice.addAttributeValue(attributeChoice, choiceValue);
                break;
            } else {
                I_Entity choiceValue = m_vie.createEntity(null, choiceOptionType.getId());
                choice.addAttributeValue(attributeChoice, choiceValue);
                parentValue = choiceValue;
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.alkacon.vie.shared.I_Entity

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.