Package com.alkacon.vie.shared

Examples of com.alkacon.vie.shared.I_Type


     * @return the registered content entity
     */
    private I_Entity register(I_Vie vie, ContentDefinition definition) {

        Map<String, I_Type> types = definition.getTypes();
        I_Type base = types.get(definition.getEntity().getTypeName());
        vie.registerTypes(base, types);
        return vie.registerEntity(definition.getEntity());
    }
View Full Code Here


     * @return the registered content entity
     */
    private I_Entity register(I_Vie vie, ContentDefinition definition) {

        Map<String, I_Type> types = definition.getTypes();
        I_Type base = types.get(definition.getEntity().getTypeName());
        vie.registerTypes(base, types);
        return vie.registerEntity(definition.getEntity());
    }
View Full Code Here

        HighlightingHandler.getInstance().clearFocusHighlighting();
        if (isChoiceHandler()) {
            addChoiceOption(reference, attributeChoice);
        } else {
            I_Entity value = m_vie.createEntity(null, getAttributeType().getId());
            I_Type choiceType = getAttributeType().getAttributeType(Type.CHOICE_ATTRIBUTE_NAME);
            I_Entity choice = m_vie.createEntity(null, choiceType.getId());
            value.addAttributeValue(Type.CHOICE_ATTRIBUTE_NAME, choice);
            // create the attribute choice
            I_Type choiceOptionType = choiceType.getAttributeType(attributeChoice);
            if (choiceOptionType.isSimpleType()) {
                String choiceValue = m_widgetService.getDefaultAttributeValue(attributeChoice);
                choice.addAttributeValue(attributeChoice, choiceValue);
            } else {
                I_Entity choiceValue = m_vie.createEntity(null, choiceOptionType.getId());
                choice.addAttributeValue(attributeChoice, choiceValue);
            }
            insertValueAfterReference(value, reference);
        }
        updateButtonVisisbility();
View Full Code Here

        if (isChoiceHandler()) {
            I_Entity value = m_entity.getAttribute(m_attributeName).getComplexValues().get(currentPosition);
            m_entity.removeAttributeValue(m_attributeName, currentPosition);
            m_entity.insertAttributeValue(m_attributeName, value, targetPosition);
            String attributeChoice = getChoiceName(targetPosition);
            I_Type optionType = getAttributeType().getAttributeType(attributeChoice);
            valueWidget = new AttributeValueView(
                this,
                m_widgetService.getAttributeLabel(attributeChoice),
                m_widgetService.getAttributeHelp(attributeChoice));
            parent.insert(valueWidget, targetPosition);
            if (optionType.isSimpleType()) {
                valueWidget.setValueWidget(
                    m_widgetService.getAttributeFormWidget(attributeChoice),
                    value.getAttribute(attributeChoice).getSimpleValue(),
                    true);
            } else {
View Full Code Here

     * @param reference the reference view
     * @param attributeChoice the attribute choice
     */
    private void addChoiceOption(AttributeValueView reference, String attributeChoice) {

        I_Type optionType = getAttributeType().getAttributeType(attributeChoice);
        I_Entity choiceEntity = m_vie.createEntity(null, getAttributeType().getId());
        AttributeValueView valueWidget = reference;
        if (reference.hasValue()) {
            valueWidget = new AttributeValueView(
                this,
                m_widgetService.getAttributeLabel(attributeChoice),
                m_widgetService.getAttributeHelp(attributeChoice));
        }
        for (String choiceName : getAttributeType().getAttributeNames()) {
            valueWidget.addChoice(
                m_widgetService.getAttributeLabel(choiceName),
                m_widgetService.getAttributeHelp(choiceName),
                choiceName);
        }
        int valueIndex = reference.getValueIndex() + 1;
        if (valueIndex < m_entity.getAttribute(m_attributeName).getValueCount()) {
            m_entity.insertAttributeValue(m_attributeName, choiceEntity, valueIndex);
            ((FlowPanel)reference.getParent()).insert(valueWidget, valueIndex);
        } else {
            m_entity.addAttributeValue(m_attributeName, choiceEntity);
            ((FlowPanel)reference.getParent()).add(valueWidget);

        }
        if (optionType.isSimpleType()) {
            String value = m_widgetService.getDefaultAttributeValue(attributeChoice);
            I_FormEditWidget widget = m_widgetService.getAttributeFormWidget(attributeChoice);
            choiceEntity.addAttributeValue(attributeChoice, value);
            valueWidget.setValueWidget(widget, value, true);
        } else {
            I_Entity value = m_vie.createEntity(null, optionType.getId());
            choiceEntity.addAttributeValue(attributeChoice, value);
            I_EntityRenderer renderer = m_widgetService.getRendererForAttribute(attributeChoice, optionType);
            valueWidget.setValueEntity(renderer, value);
        }
    }
View Full Code Here

     * @param definition the content definition
     */
    public void registerContentDefinition(ContentDefinition definition) {

        m_widgetService.addConfigurations(definition.getConfigurations());
        I_Type baseType = definition.getTypes().get(definition.getEntityTypeName());
        m_vie.registerTypes(baseType, definition.getTypes());
        m_vie.registerTypes(baseType, definition.getTypes());
        m_vie.registerEntity(definition.getEntity());
    }
View Full Code Here

     */
    public void renderEntityForm(String entityId, List<TabInfo> tabInfos, 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);
            TabbedPanel<?> formTabs = m_widgetService.getRendererForType(type).renderForm(entity, tabInfos, formPanel);
            ValidationHandler.getInstance().setContentService(m_service);
View Full Code Here

     */
    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);
            m_widgetService.getRendererForType(type).renderForm(entity, formPanel);
            ValidationHandler.getInstance().setContentService(m_service);
View Full Code Here

     */
    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

     */
    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

TOP

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

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.