当前位置: 首页>>代码示例>>Java>>正文


Java ComponentFactory.getMessage方法代码示例

本文整理汇总了Java中org.kuali.rice.krad.uif.util.ComponentFactory.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java ComponentFactory.getMessage方法的具体用法?Java ComponentFactory.getMessage怎么用?Java ComponentFactory.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.krad.uif.util.ComponentFactory的用法示例。


在下文中一共展示了ComponentFactory.getMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: performApplyModel

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Sets up rich message content for the label, if any exists
 *
 * {@inheritDoc}
 */
@Override
public void performApplyModel(Object model, LifecycleElement parent) {
    super.performApplyModel(model, parent);

    if (richHeaderMessage == null && headerText != null && headerText.contains(
            KRADConstants.MessageParsing.LEFT_TOKEN) && headerText.contains(
            KRADConstants.MessageParsing.RIGHT_TOKEN)) {
        Message message = ComponentFactory.getMessage();
        message.setMessageText(headerText);
        message.setInlineComponents(inlineComponents);
        message.setRenderWrapperTag(false);
        
        this.setRichHeaderMessage(message);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:Header.java

示例2: performApplyModel

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Sets up rich message content for the label, if any exists
 *
 * {@inheritDoc}
 */
@Override
public void performApplyModel(Object model, LifecycleElement parent) {
    super.performApplyModel(model, parent);

    if (richLabelMessage == null && labelText != null &&
            labelText.contains(KRADConstants.MessageParsing.LEFT_TOKEN) &&
            labelText.contains(KRADConstants.MessageParsing.RIGHT_TOKEN)) {
        Message message = ComponentFactory.getMessage();
        message.setMessageText(labelText);
        message.setInlineComponents(inlineComponents);
        message.setRenderWrapperTag(false);

        this.setRichLabelMessage(message);
    }

}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:Label.java

示例3: performFinalize

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * The following actions are performed:
 *
 * <ul>
 * <li>Add all option if enabled and control is multi-value</li>
 * </ul>
 *
 * {@inheritDoc}
 */
@Override
public void performFinalize(Object model, LifecycleElement parent) {
    super.performFinalize(model, parent);

    // if enabled add option to select all values
    if (addControlSelectAllOption && (getControl() != null) && getControl() instanceof MultiValueControl) {
        String allOptionText = KRADServiceLocatorWeb.getMessageService().getMessageText(
                UifConstants.MessageKeys.OPTION_ALL);

        MultiValueControl multiValueControl = (MultiValueControl) getControl();
        if (multiValueControl.getOptions() != null) {
            multiValueControl.getOptions().add(0, new ConcreteKeyValue("", allOptionText));
        }

        if (multiValueControl.getRichOptions() != null) {
            Message message = ComponentFactory.getMessage();
            message.setMessageText(allOptionText);
            message.setRenderWrapperTag(false);

            multiValueControl.getRichOptions().add(0, new KeyMessage("", allOptionText, message));
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:33,代码来源:LookupInputField.java

示例4: addCustomContainerComponents

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
@Override
public void addCustomContainerComponents(ViewModel model, Container container) {
    if (PROPOSITION_GROUP_ID.equals(container.getId())) {
        RuleBo ruleDataObj = (RuleBo)((InquiryForm)model).getDataObject();
        PropositionBo proposition = ruleDataObj.getProposition();
        if (proposition != null) {
            if (PropositionType.COMPOUND.getCode().equals(proposition.getPropositionTypeCode())) {
                List<Component> groups = new ArrayList<Component>();
                handleCompoundPropositions(groups, proposition);
                container.setItems(groups);
            } else {
                Message simplePropName = ComponentFactory.getMessage();
                simplePropName.setId(PROPOSITION_ID + "_" + ID++);
                simplePropName.setMessageText(proposition.getDescription());
                List<Message> simpleProps = new ArrayList<Message>();
                simpleProps.add(simplePropName);
                container.setItems(simpleProps);
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:RuleStudentInquiryViewHelperServiceImpl.java

示例5: performApplyModel

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Process rich message content that may be in the options, by creating and initializing the richOptions
 *
 * @see org.kuali.rice.krad.uif.component.ComponentBase#performApplyModel(org.kuali.rice.krad.uif.view.View,
 *      Object, org.kuali.rice.krad.uif.component.Component)
 */
@Override
public void performApplyModel(View view, Object model, Component parent) {
    super.performApplyModel(view, model, parent);

    if (options != null && richOptions == null) {
        richOptions = new ArrayList<KeyMessage>();

        for (KeyValue option : options) {
            Message message = ComponentFactory.getMessage();
            view.assignComponentIds(message);
            message.setMessageText(option.getValue());
            message.setInlineComponents(inlineComponents);
            message.setGenerateSpan(false);

            view.getViewHelperService().performComponentInitialization(view, model, message);
            richOptions.add(new KeyMessage(option.getKey(), option.getValue(), message));
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:26,代码来源:MultiValueControlBase.java

示例6: performApplyModel

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Sets up rich message content for the label, if any exists
 *
 * @see Component#performApplyModel(org.kuali.rice.krad.uif.view.View, Object,
 *      org.kuali.rice.krad.uif.component.Component)
 */
@Override
public void performApplyModel(View view, Object model, Component parent) {
    super.performApplyModel(view, model, parent);

    if (richHeaderMessage == null && headerText != null && headerText.contains(
            KRADConstants.MessageParsing.LEFT_TOKEN) && headerText.contains(
            KRADConstants.MessageParsing.RIGHT_TOKEN)) {
        Message message = ComponentFactory.getMessage();
        view.assignComponentIds(message);

        message.setMessageText(headerText);
        message.setInlineComponents(inlineComponents);
        message.setGenerateSpan(false);

        view.getViewHelperService().performComponentInitialization(view, model, message);

        this.setRichHeaderMessage(message);
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:26,代码来源:Header.java

示例7: performApplyModel

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Sets up rich message content for the label, if any exists
 *
 * @see Component#performApplyModel(org.kuali.rice.krad.uif.view.View, Object, org.kuali.rice.krad.uif.component.Component)
 */
@Override
public void performApplyModel(View view, Object model, Component parent) {
    super.performApplyModel(view, model, parent);

    if (richLabelMessage == null && labelText != null &&
            labelText.contains(KRADConstants.MessageParsing.LEFT_TOKEN) &&
            labelText.contains(KRADConstants.MessageParsing.RIGHT_TOKEN)) {
        Message message = ComponentFactory.getMessage();
        view.assignComponentIds(message);

        message.setMessageText(labelText);
        message.setInlineComponents(inlineComponents);
        message.setGenerateSpan(false);

        view.getViewHelperService().performComponentInitialization(view, model, message);

        this.setRichLabelMessage(message);
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:25,代码来源:Label.java

示例8: performFinalize

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * The following actions are performed:
 *
 * <ul>
 * <li>Add all option if enabled and control is multi-value</li>
 * </ul>
 *
 * @see org.kuali.rice.krad.uif.component.ComponentBase#performFinalize(org.kuali.rice.krad.uif.view.View,
 *      java.lang.Object, org.kuali.rice.krad.uif.component.Component)
 */
@Override
public void performFinalize(View view, Object model, Component parent) {
    super.performFinalize(view, model, parent);

    // if enabled add option to select all values
    if (addControlSelectAllOption && (getControl() != null) && getControl() instanceof MultiValueControl) {
        String allOptionText = KRADServiceLocatorWeb.getMessageService().getMessageText(
                UifConstants.MessageKeys.OPTION_ALL);

        MultiValueControl multiValueControl = (MultiValueControl) getControl();
        if (multiValueControl.getOptions() != null) {
            multiValueControl.getOptions().add(0, new ConcreteKeyValue("", allOptionText));
        }

        if (multiValueControl.getRichOptions() != null) {
            Message message = ComponentFactory.getMessage();

            view.assignComponentIds(message);
            message.setMessageText(allOptionText);
            message.setGenerateSpan(false);

            multiValueControl.getRichOptions().add(0, new KeyMessage("", allOptionText, message));
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:36,代码来源:LookupInputField.java

示例9: addCustomContainerComponents

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
@Override
protected void addCustomContainerComponents(View view, Object model, Container container) {
    if (PROPOSITION_GROUP_ID.equals(container.getId())) {
        RuleBo ruleDataObj = (RuleBo)((InquiryForm)model).getDataObject();
        PropositionBo proposition = ruleDataObj.getProposition();
        if (proposition != null) {
            if (PropositionType.COMPOUND.getCode().equals(proposition.getPropositionTypeCode())) {
                List<Component> groups = new ArrayList<Component>();
                handleCompoundPropositions(groups, proposition);
                container.setItems(groups);
            } else {
                Message simplePropName = ComponentFactory.getMessage();
                simplePropName.setId(PROPOSITION_ID + "_" + ID++);
                simplePropName.setMessageText(proposition.getDescription());
                List<Message> simpleProps = new ArrayList<Message>();
                simpleProps.add(simplePropName);
                container.setItems(simpleProps);
            }
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:22,代码来源:RuleStudentInquiryViewHelperServiceImpl.java

示例10: performApplyModel

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Sets up rich message content for the label, if any exists
 *
 * {@inheritDoc}
 */
@Override
public void performApplyModel(Object model, LifecycleElement parent) {
    super.performApplyModel(model, parent);

    if (richLabelMessage == null) {
        Message message = ComponentFactory.getMessage();
        message.setMessageText(checkboxLabel);
        message.setInlineComponents(inlineComponents);
        message.setRenderWrapperTag(false);
        this.setRichLabelMessage(message);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:CheckboxControl.java

示例11: setMessageText

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * @see MessageView#getMessageText()
 */
public void setMessageText(String messageText) {
    if (this.message == null) {
        this.message = ComponentFactory.getMessage();
    }

    this.message.setMessageText(messageText);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:MessageView.java

示例12: performApplyModel

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Sets up rich message content for the label, if any exists
 *
 * @see Component#performApplyModel(org.kuali.rice.krad.uif.view.View, Object, org.kuali.rice.krad.uif.component.Component)
 */
@Override
public void performApplyModel(View view, Object model, Component parent) {
    super.performApplyModel(view, model, parent);

    if (richLabelMessage == null) {
        Message message = ComponentFactory.getMessage();
        view.assignComponentIds(message);
        message.setMessageText(checkboxLabel);
        message.setInlineComponents(inlineComponents);
        message.setGenerateSpan(false);
        view.getViewHelperService().performComponentInitialization(view, model, message);
        this.setRichLabelMessage(message);
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:20,代码来源:CheckboxControl.java

示例13: setMessageText

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Helper method for setting the message text
 *
 * @param messageText text to use for the message
 */
public void setMessageText(String messageText) {
    if (this.message == null) {
        this.message = ComponentFactory.getMessage();
    }

    this.message.setMessageText(messageText);
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:13,代码来源:MessageView.java

示例14: performApplyModel

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
/**
 * Process rich message content that may be in the options, by creating and initializing the richOptions
 *
 * {@inheritDoc}
 */
@Override
public void performApplyModel(Object model, LifecycleElement parent) {
    super.performApplyModel(model, parent);
    getStyleClassesAsString();
    if (options != null && richOptions == null) {
        richOptions = new ArrayList<KeyMessage>();
        internalMessageComponents = new ArrayList<Message>();

        for (KeyValue option : options) {

            // do this??
            if (option instanceof UifOptionGroupLabel) {
                continue;
            }

            Message message = ComponentFactory.getMessage();

            String key = option.getKey();
            if (key.contains(UifConstants.EL_PLACEHOLDER_PREFIX)) {
                key = ViewLifecycle.getExpressionEvaluator().evaluateExpression(this.getContext(), key).toString();
            }

            String value = option.getValue();
            if (value.contains(UifConstants.EL_PLACEHOLDER_PREFIX)) {
                value = ViewLifecycle.getExpressionEvaluator().evaluateExpression(this.getContext(), value).toString();
            }

            message.setMessageText(value);
            message.setInlineComponents(inlineComponents);
            message.setRenderWrapperTag(false);

            // if the option is a sub-class of AbstractKeyValue class, then we also include the disabled attribute
            if(AbstractKeyValue.class.isAssignableFrom(option.getClass()) && ((AbstractKeyValue)option).isDisabled()) {
                richOptions.add(new KeyMessage(key, value, message, ((AbstractKeyValue)option).isDisabled()));
            } else {
                richOptions.add(new KeyMessage(key, value, message));
            }

            internalMessageComponents.add(message);
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:48,代码来源:MultiValueControlBase.java

示例15: handleCompoundPropositions

import org.kuali.rice.krad.uif.util.ComponentFactory; //导入方法依赖的package包/类
private void handleCompoundPropositions(List<Component> components, PropositionBo proposition) {
    Group compoundGroup = getPropositionGroup();
    compoundGroup.setId(String.valueOf(PROPOSITION_GROUP_ID + "_" + ID++));
    ((GridLayoutManager)compoundGroup.getLayoutManager()).setNumberOfColumns(2);

    List<Component> componentItems = new ArrayList<Component>();

    //Heading
    Message propositionName = ComponentFactory.getMessage();
    propositionName.setId(PROPOSITION_ID + "_" + ID++);
    propositionName.setMessageText(proposition.getDescription());

    componentItems.add(propositionName);

    //Space (for layout purposes)
    SpaceField spaceField1 = ComponentFactory.getSpaceField();
    spaceField1.setId("space" + "_" + ID++);
    componentItems.add(spaceField1);

    //Space (for layout purposes)
    SpaceField spaceField2 = ComponentFactory.getSpaceField();
    spaceField2.setId("space" + "_" + ID++);
    componentItems.add(spaceField2);

    if (proposition.getCompoundComponents() != null) {
        int loopCounter = 0;
        for (PropositionBo nestedProposition : proposition.getCompoundComponents()) {
            if (loopCounter != 0) {

                //Space (for layout purposes)
                SpaceField spaceField3 = ComponentFactory.getSpaceField();
                spaceField3.setId("space" + "_" + ID++);
                componentItems.add(spaceField3);

                Message operator = ComponentFactory.getMessage();
                operator.setId(PROPOSITION_ID + "_" + ID++);
                operator.setMessageText(Operator.fromCode(proposition.getCompoundOpCode()).toString());
                componentItems.add(operator);

                //Space (for layout purposes)
                SpaceField spaceField4 = ComponentFactory.getSpaceField();
                spaceField4.setId("space" + "_" + ID++);
                componentItems.add(spaceField4);
            }
            if (PropositionType.COMPOUND.getCode().equals(nestedProposition.getPropositionTypeCode())) {
                handleCompoundPropositions(components, nestedProposition);
            } else {
                Message simplePropName = ComponentFactory.getMessage();
                simplePropName.setId(PROPOSITION_ID + "_" + ID++);
                simplePropName.setMessageText(nestedProposition.getDescription());

                componentItems.add(simplePropName);
            }
            loopCounter++;
        }
    }
    compoundGroup.setItems(componentItems);

    components.add(compoundGroup);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:61,代码来源:RuleStudentInquiryViewHelperServiceImpl.java


注:本文中的org.kuali.rice.krad.uif.util.ComponentFactory.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。