- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.metawidget.util.XmlUtils.getAttributesAsMap()
方法的一些代码示例,展示了XmlUtils.getAttributesAsMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtils.getAttributesAsMap()
方法的具体详情如下:
包路径:org.metawidget.util.XmlUtils
类名称:XmlUtils
方法名:getAttributesAsMap
[英]Gets the DOM attributes of the given Node as a Map.
[中]获取给定节点的DOM属性作为映射。
代码示例来源:origin: org.metawidget.modules/metawidget-core
@Override
protected Map<String, String> getAttributesAsMap( Element element ) {
return XmlUtils.getAttributesAsMap( element );
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
@Override
protected Map<String, String> getAttributesAsMap( Element element ) {
return XmlUtils.getAttributesAsMap( element );
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-core
@Override
protected Map<String, String> inspectAction( Element toInspect ) {
if ( ACTION.equals( toInspect.getNodeName() ) ) {
return XmlUtils.getAttributesAsMap( toInspect );
}
return null;
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
@Override
protected Map<String, String> inspectAction( Element toInspect ) {
if ( ACTION.equals( toInspect.getNodeName() ) ) {
return XmlUtils.getAttributesAsMap( toInspect );
}
return null;
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-core
@Override
protected Map<String, String> inspectProperty( Element toInspect ) {
if ( PROPERTY.equals( toInspect.getNodeName() ) ) {
Map<String, String> attributes = XmlUtils.getAttributesAsMap( toInspect );
// Warn about some common typos
if ( attributes.containsKey( "readonly" ) ) {
throw InspectorException.newException( "Attribute named 'readonly' should be '" + InspectionResultConstants.READ_ONLY + "'" );
}
if ( attributes.containsKey( "dontexpand" ) ) {
throw InspectorException.newException( "Attribute named 'dontexpand' should be '" + InspectionResultConstants.DONT_EXPAND + "'" );
}
// All good
return attributes;
}
return null;
}
代码示例来源:origin: org.metawidget.modules/metawidget-core
public static Element importElement( Document document, Element element ) {
try {
return (Element) document.importNode( element, true );
} catch ( DOMException e ) {
// Note: importNode returns 'DOMException' under Android 1.1_r1
Element imported = document.createElementNS( element.getNamespaceURI(), element.getNodeName() );
setMapAsAttributes( imported, getAttributesAsMap( element ) );
NodeList nodeList = imported.getChildNodes();
for ( int loop = 0; loop < nodeList.getLength(); loop++ ) {
Node node = nodeList.item( loop );
if ( !( node instanceof Element ) ) {
continue;
}
imported.appendChild( importElement( document, (Element) node ) );
}
return imported;
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
public static Element importElement( Document document, Element element ) {
try {
return (Element) document.importNode( element, true );
} catch ( DOMException e ) {
// Note: importNode returns 'DOMException' under Android 1.1_r1
Element imported = document.createElementNS( element.getNamespaceURI(), element.getNodeName() );
setMapAsAttributes( imported, getAttributesAsMap( element ) );
NodeList nodeList = imported.getChildNodes();
for ( int loop = 0; loop < nodeList.getLength(); loop++ ) {
Node node = nodeList.item( loop );
if ( !( node instanceof Element ) ) {
continue;
}
imported.appendChild( importElement( document, (Element) node ) );
}
return imported;
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
protected void addColumnTags( TableTag tableTag, Map<String, String> attributes, NodeList elements, MetawidgetTag metawidgetTag ) {
// For each property...
int columnsAdded = 0;
for ( int loop = 0, length = elements.getLength(); loop < length; loop++ ) {
Node node = elements.item( loop );
if ( !( node instanceof Element ) ) {
continue;
}
Element element = (Element) node;
// ...that is visible...
if ( TRUE.equals( element.getAttribute( HIDDEN ) ) ) {
continue;
}
// ...add a column...
if ( addColumnTag( tableTag, attributes, XmlUtils.getAttributesAsMap( element ), metawidgetTag ) ) {
columnsAdded++;
}
// ...up to a sensible maximum
if ( columnsAdded == 5 ) {
break;
}
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
@Override
protected Map<String, String> inspectProperty( Element toInspect ) {
if ( PROPERTY.equals( toInspect.getNodeName() ) ) {
Map<String, String> attributes = XmlUtils.getAttributesAsMap( toInspect );
// Warn about some common typos
if ( attributes.containsKey( "readonly" ) ) {
throw InspectorException.newException( "Attribute named 'readonly' should be '" + InspectionResultConstants.READ_ONLY + "'" );
}
if ( attributes.containsKey( "dontexpand" ) ) {
throw InspectorException.newException( "Attribute named 'dontexpand' should be '" + InspectionResultConstants.DONT_EXPAND + "'" );
}
// All good
return attributes;
}
return null;
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
addColumnComponent( dataTable, attributes, PROPERTY, XmlUtils.getAttributesAsMap( element ), metawidget );
代码示例来源:origin: org.metawidget.modules/metawidget-all
public Element processInspectionResultAsDom( Element inspectionResult, M metawidget, Object toInspect, String type, String... names ) {
Element entity = XmlUtils.getFirstChildElement( inspectionResult );
// Sanity check
String elementName = entity.getNodeName();
if ( !ENTITY.equals( elementName ) ) {
throw InspectionResultProcessorException.newException( "Top-level element name should be " + ENTITY + ", not " + elementName );
}
Map<String, String> attributes = XmlUtils.getAttributesAsMap( entity );
processEntity( attributes, metawidget, toInspect, type, names );
XmlUtils.setMapAsAttributes( entity, attributes );
processTraits( entity, metawidget, toInspect, type, names );
return inspectionResult;
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
addColumnComponent( dataTable, attributes, PROPERTY, XmlUtils.getAttributesAsMap( element ), metawidget );
代码示例来源:origin: org.metawidget.modules/metawidget-core
public Element processInspectionResultAsDom( Element inspectionResult, M metawidget, Object toInspect, String type, String... names ) {
Element entity = XmlUtils.getFirstChildElement( inspectionResult );
// Sanity check
String elementName = entity.getNodeName();
if ( !ENTITY.equals( elementName ) ) {
throw InspectionResultProcessorException.newException( "Top-level element name should be " + ENTITY + ", not " + elementName );
}
Map<String, String> attributes = XmlUtils.getAttributesAsMap( entity );
processEntity( attributes, metawidget, toInspect, type, names );
XmlUtils.setMapAsAttributes( entity, attributes );
processTraits( entity, metawidget, toInspect, type, names );
return inspectionResult;
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
Map<String, String> attributes = XmlUtils.getAttributesAsMap( trait );
processTrait( attributes, metawidget );
XmlUtils.setMapAsAttributes( trait, attributes );
代码示例来源:origin: org.metawidget.modules.faces/metawidget-faces
childAttributes.putAll( XmlUtils.getAttributesAsMap( inspectionResult.getFirstChild() ) );
代码示例来源:origin: org.metawidget.modules/metawidget-core
Map<String, String> attributes = XmlUtils.getAttributesAsMap( trait );
processTrait( attributes, metawidget );
XmlUtils.setMapAsAttributes( trait, attributes );
代码示例来源:origin: org.metawidget.modules/metawidget-all
childAttributes.putAll( XmlUtils.getAttributesAsMap( inspectionResult.getFirstChild() ) );
代码示例来源:origin: org.metawidget.modules/metawidget-all
Map<String, String> attributes = XmlUtils.getAttributesAsMap( trait );
代码示例来源:origin: org.jboss.forge.addon/scaffold-spi
/**
* Inspects a {@link JavaClass} instance and provides inspection results in return.
*
* @param klass The {@link JavaClass} to inspect.
* @return A list representing inspection results for the {@link JavaClass}. Each list item corresponds to the
* inspection result for every property of the provided {@link JavaClass}.
*/
public List<Map<String, String>> inspect(JavaClassSource klass)
{
setupCompositeInspector();
Element inspectionResult = compositeInspector.inspectAsDom(null, klass.getQualifiedName(), (String[]) null);
Element inspectedEntity = XmlUtils.getFirstChildElement(inspectionResult);
Element inspectedProperty = XmlUtils.getFirstChildElement(inspectedEntity);
List<Map<String, String>> viewPropertyAttributes = new ArrayList<Map<String, String>>();
while (inspectedProperty != null)
{
Map<String, String> propertyAttributes = XmlUtils.getAttributesAsMap(inspectedProperty);
viewPropertyAttributes.add(propertyAttributes);
inspectedProperty = XmlUtils.getNextSiblingElement(inspectedProperty);
}
return viewPropertyAttributes;
}
代码示例来源:origin: org.jboss.forge/forge-scaffoldx-api
/**
* Inspects a {@link JavaClass} instance and provides inspection results in return.
*
* @param klass The {@link JavaClass} to inspect.
* @return A list representing inspection results for the {@link JavaClass}. Each list item corresponds to the
* inspection result for every property of the provided {@link JavaClass}.
*/
public List<Map<String, String>> inspect(JavaClass klass)
{
setupCompositeInspector();
Element inspectionResult = compositeInspector.inspectAsDom(null, klass.getQualifiedName(), (String[]) null);
Element inspectedEntity = XmlUtils.getFirstChildElement(inspectionResult);
Element inspectedProperty = XmlUtils.getFirstChildElement(inspectedEntity);
List<Map<String, String>> viewPropertyAttributes = new ArrayList<Map<String, String>>();
while (inspectedProperty != null)
{
Map<String, String> propertyAttributes = XmlUtils.getAttributesAsMap(inspectedProperty);
viewPropertyAttributes.add(propertyAttributes);
inspectedProperty = XmlUtils.getNextSiblingElement(inspectedProperty);
}
return viewPropertyAttributes;
}
本文整理了Java中org.metawidget.util.XmlUtils类的一些代码示例,展示了XmlUtils类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
我正在使用 JavaScript 的 Metawidgets,并且希望访问并显示更新后的域模型(如果对其进行了任何更改),而无需路由回服务器(例如:全部在同一客户端 JavaScript 中)。遗憾的
本文整理了Java中org.metawidget.util.XmlUtils.getSiblingWithAttribute()方法的一些代码示例,展示了XmlUtils.getSiblingWith
本文整理了Java中org.metawidget.util.XmlUtils.inspectionResultToJsonSchema()方法的一些代码示例,展示了XmlUtils.inspectio
本文整理了Java中org.metawidget.util.XmlUtils.getChildWithAttributeValue()方法的一些代码示例,展示了XmlUtils.getChildWit
本文整理了Java中org.metawidget.util.XmlUtils.newDocument()方法的一些代码示例,展示了XmlUtils.newDocument()的具体用法。这些代码示例主
本文整理了Java中org.metawidget.util.XmlUtils.setMapAsAttributes()方法的一些代码示例,展示了XmlUtils.setMapAsAttributes(
本文整理了Java中org.metawidget.util.XmlUtils.getFirstChildElement()方法的一些代码示例,展示了XmlUtils.getFirstChildElem
本文整理了Java中org.metawidget.util.XmlUtils.getNextSiblingElement()方法的一些代码示例,展示了XmlUtils.getNextSiblingEl
本文整理了Java中org.metawidget.util.XmlUtils.arrayToJsonSchema()方法的一些代码示例,展示了XmlUtils.arrayToJsonSchema()的
本文整理了Java中org.metawidget.util.XmlUtils.escapeForXml()方法的一些代码示例,展示了XmlUtils.escapeForXml()的具体用法。这些代码示
本文整理了Java中org.metawidget.util.XmlUtils.getLocalName()方法的一些代码示例,展示了XmlUtils.getLocalName()的具体用法。这些代码示
本文整理了Java中org.metawidget.util.XmlUtils.getChildWithAttribute()方法的一些代码示例,展示了XmlUtils.getChildWithAttr
本文整理了Java中org.metawidget.util.XmlUtils.importElement()方法的一些代码示例,展示了XmlUtils.importElement()的具体用法。这些代
本文整理了Java中org.metawidget.util.XmlUtils.combineElements()方法的一些代码示例,展示了XmlUtils.combineElements()的具体用法
本文整理了Java中org.metawidget.util.XmlUtils.getAttributesAsMap()方法的一些代码示例,展示了XmlUtils.getAttributesAsMap(
本文整理了Java中org.metawidget.util.XmlUtils.documentFromString()方法的一些代码示例,展示了XmlUtils.documentFromString(
本文整理了Java中org.metawidget.util.XmlUtils.documentToString()方法的一些代码示例,展示了XmlUtils.documentToString()的具体
我正在使用 MetaWidget for Swing。我能够生成 UI 并且 BeanBinding 也能正常工作。但是,诸如“强制字段”和“最大长度”之类的验证不起作用。我希望当我将“名字”字段留空
我正在使用 Metawidget在 GUI 中自动查看/编辑对象中的值。我能够绑定(bind)对象的初始值,并在它们各自的 GUI 组件中看到它们。但是,当我更改 GUI 中的值时,这些更改不会同步回
我是一名优秀的程序员,十分优秀!