• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IValueMap类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.wicket.util.value.IValueMap的典型用法代码示例。如果您正苦于以下问题:Java IValueMap类的具体用法?Java IValueMap怎么用?Java IValueMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IValueMap类属于org.apache.wicket.util.value包,在下文中一共展示了IValueMap类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onComponentTag

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
@Override
public void onComponentTag(Component component, ComponentTag tag) {
	super.onComponentTag(component, tag);
	IValueMap attributes = tag.getAttributes();
	addAttribute(component, attributes, ATTRIBUTE_TITLE, titleModel);
	addAttribute(component, attributes, ATTRIBUTE_TEXT, textModel);
	addAttribute(component, attributes, ATTRIBUTE_YES_LABEL, yesLabelModel);
	addAttribute(component, attributes, ATTRIBUTE_NO_LABEL, noLabelModel);
	addAttribute(component, attributes, ATTRIBUTE_YES_ICON, yesIconModel);
	addAttribute(component, attributes, ATTRIBUTE_NO_ICON, noIconModel);
	addAttribute(component, attributes, ATTRIBUTE_YES_BUTTON, yesButtonModel);
	addAttribute(component, attributes, ATTRIBUTE_NO_BUTTON, noButtonModel);
	addAttribute(component, attributes, ATTRIBUTE_CSS_CLASS_NAMES, cssClassNamesModel);
	
	if (textNoEscape) {
		attributes.put(ATTRIBUTE_TEXT_NO_ESCAPE, textNoEscape);
	}
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:19,代码来源:ConfirmContentBehavior.java


示例2: replaceAttributeValue

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
private void replaceAttributeValue(ComponentTag tag) {
	if (removeModel != null && removeModel.getObject() != VALUELESS_ATTRIBUTE) {
		final IValueMap tagAttributes = tag.getAttributes();
		Object attributeValue = tagAttributes.get(attribute);
		
		List<String> valuesToRemove = getClassesToRemove();
		
		if (attributeValue != null && !valuesToRemove.isEmpty()) {
			List<String> values = Arrays.asList(attributeValue.toString().split(separator));
			
			StringBuilder newAttributeValue = new StringBuilder();
			for (String value : values) {
				if (!valuesToRemove.contains(value)) {
					newAttributeValue.append(value).append(separator);
				}
			}
			
			tagAttributes.put(attribute, newAttributeValue);
		}
	}
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:22,代码来源:AttributeRemover.java


示例3: onComponentTag

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void onComponentTag(final ComponentTag tag) {
    checkComponentTag(tag, "select");

    super.onComponentTag(tag);
    final IValueMap attrs = tag.getAttributes();

    attrs.put("multiple", "multiple");
    attrs.put("size", getPalette().getRows());

    if (!palette.isPaletteEnabled()) {
        attrs.put("disabled", "disabled");
    }

    avoidAjaxSerialization();
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:20,代码来源:AOptions.java


示例4: replaceAttributeValue

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
/**
 * Checks the given component tag for an instance of the attribute to modify
 * and if all criteria are met then replace the value of this attribute with
 * the value of the contained model object.
 *
 * @param component The component
 * @param tag The tag to replace the attribute value for
 */
   private void replaceAttributeValue(final Component component, final ComponentTag tag) {
	if (isEnabled(component)) {
		final IValueMap attributes = tag.getAttributes();
		final Object replacementValue = getReplacementOrNull(component);

		if (VALUELESS_ATTRIBUTE_ADD == replacementValue) {
			attributes.put(attribute, null);
		} else if (VALUELESS_ATTRIBUTE_REMOVE == replacementValue) {
			attributes.remove(attribute);
		} else {
			final String value = toStringOrNull(attributes.get(attribute));
			final String newValue = newValue(value, toStringOrNull(replacementValue));
			if (newValue != null) {
				attributes.put(attribute, newValue);
			}
		}
	}
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:27,代码来源:UserProfilePictureBackgroundBehaviour.java


示例5: onComponentTag

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
public void onComponentTag(ComponentTag tag) {
	// get options from the markup
	IValueMap valueMap = tag.getAttributes();

	// Iterate over valid options
	for (String s : optionNames) {
		if (valueMap.containsKey(s)) {
			// if option isn't set programmatically, set value from markup
			if (!attributes.containsKey(s) && !parameters.containsKey(s))
				setValue(s, valueMap.getString(s));
			// remove attribute - they are added in super.onComponentTag()
			// to
			// the right place as attribute or param
			valueMap.remove(s);
		}
	}

	super.onComponentTag(tag);
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:20,代码来源:ShockWaveComponent.java


示例6: onComponentTag

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
@Override
public void onComponentTag(Component component, ComponentTag tag) {
	super.onComponentTag(component, tag);
	
	IValueMap attributes = tag.getAttributes();
	attributes.put("data-header-selector", "#" + header.getMarkupId());
	attributes.put("data-footer-selector", "#" + footer.getMarkupId());
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:9,代码来源:ModalHeaderFooterBehavior.java


示例7: onComponentTag

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
@Override
protected void onComponentTag(final ComponentTag tag) {
    super.onComponentTag(tag);
    final IValueMap attrs = tag.getAttributes();

    final String onFocus = getPalette().getSelectionOnFocusJS();
    if (onFocus != null) {
        attrs.put("onfocus", onFocus);
    }

    tag.getAttributes().put("ondblclick", getPalette().getRemoveOnClickJS());
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:13,代码来源:Selection.java


示例8: onComponentTag

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
@Override
protected void onComponentTag(final ComponentTag tag) {
    super.onComponentTag(tag);
    final IValueMap attrs = tag.getAttributes();
    final String onFocus = getPalette().getChoicesOnFocusJS();
    if (onFocus != null) {
        attrs.put("onfocus", onFocus);
    }

    tag.getAttributes().put("ondblclick", getPalette().getAddOnClickJS());
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:12,代码来源:Choices.java


示例9: onComponentTag

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
@Override
public void onComponentTag(Component component, ComponentTag tag) {
    super.onComponentTag(component, tag);
    IValueMap attributes = tag.getAttributes();
    attributes.remove("href");
    attributes.remove("onclick");
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:8,代码来源:DisabledAddonBehavior.java


示例10: onComponentTag

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
public void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);

	// get the attributes from the html-source
	IValueMap attributeMap = tag.getAttributes();

	// set the content type
	String contentType = getContentType();
	if (contentType != null && !"".equals(contentType))
		attributeMap.put(ATTRIBUTE_CONTENTTYPE, contentType);

	// set clsid and codebase for IE
	if (getClientProperties().isBrowserInternetExplorer()) {
		String clsid = getClsid();
		String codeBase = getCodebase();

		if (clsid != null && !"".equals(clsid))
			attributeMap.put(ATTRIBUTE_CLASSID, clsid);
		if (codeBase != null && !"".equals(codeBase))
			attributeMap.put(ATTRIBUTE_CODEBASE, codeBase);
	}

	// add all attributes
	for (String name : getAttributeNames()) {
		String value = getValue(name);
		if (value != null)
			attributeMap.put(name, value);
	}
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:30,代码来源:ObjectContainer.java


示例11: addAttribute

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
private void addAttribute(Component component, IValueMap attributes, String attributeName, IModel<String> model) {
	String label = getLabel(component, model);
	if (label != null) {
		attributes.put(attributeName, label);
	}
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:7,代码来源:ConfirmContentBehavior.java


示例12: appendOptionHtml

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected void appendOptionHtml(final AppendingStringBuffer buffer, final T choice, int index,
    final String selected) {
    Object displayValue = getChoiceRenderer().getDisplayValue(choice);
    Class<?> objectClass = displayValue == null ? null : displayValue.getClass();

    // Get label for choice
    String label = "";
    if (objectClass != null && objectClass != String.class) {
        @SuppressWarnings("rawtypes")
        IConverter converter = getConverter(objectClass);
        label = converter.convertToString(displayValue, getLocale());
    } else if (displayValue != null) {
        label = displayValue.toString();
    }

    // If there is a display value for the choice, then we know that the
    // choice is automatic in some way. If label is /null/ then we know
    // that the choice is a manually created checkbox tag at some random
    // location in the page markup!
    if (label != null) {
        String id = getChoiceRenderer().getIdValue(choice, index);
        final String idAttr = getCheckBoxMarkupId(id);
        boolean isSlected = isSelected(choice, index, selected);

        // Append option suffix
        buffer.append(getPrefix(index, choice));

        Tag tag = new Tag("label").attr("for", idAttr);

        List<String> labelClasses = new ArrayList<>();
        labelClasses.add("btn");
        if (isSlected) {
            labelClasses.add("active");
            labelClasses.add(getActiveLabelClass(choice, index));
        } else {
            labelClasses.add(getLabelClass(choice, index));
        }
        tag.attr("class", labelClasses);

        // Add checkbox element
        Tag input = new Tag("input").attr("name", getInputName()).attr("type", "checkbox");
        input.attr("value", id).attr("id", idAttr);
        input.attr("checked", "checked", isSlected);
        input.attr("disabled", "disabled", isDisabled(choice, index, selected) || !isEnabledInHierarchy());

        // Allows user to add attributes to the <input..> tag
        {
            IValueMap attrs = getAdditionalAttributes(index, choice);
            if (attrs != null) {
                input.getAttributes().putAll(attrs);
            }
        }

        if (getApplication().getDebugSettings().isOutputComponentPath()) {
            CharSequence path = getPageRelativePath();
            path = Strings.replaceAll(path, "_", "__");
            path = Strings.replaceAll(path, ":", "_");
            input.attr("wicketpath", path + "_input_" + index);
        }

        tag.add(input);

        // Add label for checkbox
        tag.add(getLabelText(label));

        buffer.append(tag.toString());
        // Append option suffix
        buffer.append(getSuffix(index, choice));
    }
    // CHECKSTYLE:ON
}
 
开发者ID:flex-oss,项目名称:flex-ui,代码行数:74,代码来源:ButtonMultipleChoice.java


示例13: getData

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
public IValueMap getData() {
	return valueMap;
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:4,代码来源:DefaultSectionContext.java


示例14: getData

import org.apache.wicket.util.value.IValueMap; //导入依赖的package包/类
public IValueMap getData(); 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:2,代码来源:SectionContext.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ExecuteMethod类代码示例发布时间:2022-05-23
下一篇:
Java Schema类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap