- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.google.gwt.uibinder.rebind.XMLElement.getAttribute()
方法的一些代码示例,展示了XMLElement.getAttribute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLElement.getAttribute()
方法的具体详情如下:
包路径:com.google.gwt.uibinder.rebind.XMLElement
类名称:XMLElement
方法名:getAttribute
[英]Get the attribute at the given index. If you are consuming attributes, remember to traverse them in reverse.
[中]获取给定索引处的属性。如果您正在使用属性,请记住反向遍历它们。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* An element will require a placeholder if the user has called it out with a
* ui:ph attribute, or if it will require run time swizzling (e.g. has a
* ui:field). These latter we can identify easily because they'll have an
* attribute that holds a tokenator token that was vended by
* {@link UiBinderWriter}, typically in id.
*
* @return true if it has an ui:ph attribute, or has a token in any attribute
*/
private boolean isDomPlaceholder(XMLElement elem) {
MessagesWriter mw = uiWriter.getMessages();
if (mw.hasMessageAttribute("ph", elem)) {
return true;
}
for (int i = elem.getAttributeCount() - 1; i >= 0; i--) {
if (elem.getAttribute(i).hasToken()) {
return true;
}
}
return false;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public String interpretElement(XMLElement elem)
throws UnableToCompleteException {
// Must be in the format: <ui:string from="{myMsg.message}" />
if (writer.isBinderElement(elem) && getLocalName().equals(elem.getLocalName())) {
if (!elem.hasAttribute("from")) {
logger.die(elem, "Attribute 'from' not found.");
}
if (!elem.getAttribute("from").hasComputedValue()) {
logger.die(elem, "Attribute 'from' does not have a computed value");
}
// Make sure all computed attributes are interpreted first
computedAttributeInterpreter.interpretElement(elem);
String fieldRef = elem.consumeStringAttribute("from");
// Make sure that "from" was the only attribute
elem.assertNoAttributes();
return "\" + " + fieldRef + " + \"";
}
return null;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public String interpretElement(XMLElement elem)
throws UnableToCompleteException {
Map<String, String> attNameToToken = new HashMap<String, String>();
for (int i = elem.getAttributeCount() - 1; i >= 0; i--) {
XMLAttribute att = elem.getAttribute(i);
if (att.hasComputedValue()) {
String attToken = delegate.getAttributeToken(att);
attNameToToken.put(att.getName(), attToken);
} else {
/*
* No computed value, but make sure that any {{ madness gets escaped.
* TODO(rjrjr) Move this to XMLElement RSN
*/
String n = att.getName();
String v = att.consumeRawValue().replace("\\{", "{");
elem.setAttribute(n, v);
}
}
for (Map.Entry<String, String> attr : attNameToToken.entrySet()) {
elem.setAttribute(attr.getKey(), attr.getValue());
}
// Return null because we don't want to replace the dom element
return null;
}
}
代码示例来源:origin: com.jhickman/gxt-uibinder
@Override
public void parse(XMLElement elem, String fieldName, JClassType type, UiBinderWriter writer) throws UnableToCompleteException {
// need to grab the "value" attribute as it's ambiguous
XMLAttribute attribute = elem.getAttribute("value");
if (attribute != null) {
String value = attribute.consumeRawValue();
writer.addStatement("%s.setValue(%s);", fieldName, value);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
XMLAttribute attribute = elem.getAttribute(i);
代码示例来源:origin: com.jhickman/gxt-uibinder
protected void handleLayoutData(XMLElement layoutDataElem, String fieldName, UiBinderWriter writer) throws UnableToCompleteException {
XMLAttribute typeAttribute = layoutDataElem.getAttribute("type");
if (typeAttribute != null) {
String layoutDataField = LayoutDataFieldFactory.declareField(layoutDataElem, typeAttribute.consumeRawValue(), writer);
for(XMLElement child : layoutDataElem.consumeChildElements()) {
String childField = writer.parseElementToField(child);
writer.addStatement("%s.add(%s, %s);", fieldName, childField, layoutDataField);
}
} else {
writer.die(layoutDataElem, "layoutdata missing type attribute");
}
}
代码示例来源:origin: org.vectomatic/lib-gwt-svg
/**
* Consumes all attributes, and returns a string representing the entire
* opening tag. E.g., "<div able='baker'>"
*/
public String consumeOpeningTag() {
String rtn = getOpeningTag();
for (int i = getAttributeCount() - 1; i >= 0; i--) {
getAttribute(i).consumeRawValue();
}
return rtn;
}
代码示例来源:origin: net.wetheinter/gwt-user
public String interpretElement(XMLElement elem)
throws UnableToCompleteException {
// Must be in the format: <ui:string from="{myMsg.message}" />
if (writer.isBinderElement(elem) && getLocalName().equals(elem.getLocalName())) {
if (!elem.hasAttribute("from")) {
logger.die(elem, "Attribute 'from' not found.");
}
if (!elem.getAttribute("from").hasComputedValue()) {
logger.die(elem, "Attribute 'from' does not have a computed value");
}
// Make sure all computed attributes are interpreted first
computedAttributeInterpreter.interpretElement(elem);
String fieldRef = elem.consumeStringAttribute("from");
// Make sure that "from" was the only attribute
elem.assertNoAttributes();
return "\" + " + fieldRef + " + \"";
}
return null;
}
代码示例来源:origin: laaglu/lib-gwt-svg
/**
* Consumes all attributes, and returns a string representing the entire
* opening tag. E.g., "<div able='baker'>"
*/
public String consumeOpeningTag() {
String rtn = getOpeningTag();
for (int i = getAttributeCount() - 1; i >= 0; i--) {
getAttribute(i).consumeRawValue();
}
return rtn;
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
public String interpretElement(XMLElement elem)
throws UnableToCompleteException {
// Must be in the format: <ui:string from="{myMsg.message}" />
if (writer.isBinderElement(elem) && getLocalName().equals(elem.getLocalName())) {
if (!elem.hasAttribute("from")) {
logger.die(elem, "Attribute 'from' not found.");
}
if (!elem.getAttribute("from").hasComputedValue()) {
logger.die(elem, "Attribute 'from' does not have a computed value");
}
// Make sure all computed attributes are interpreted first
computedAttributeInterpreter.interpretElement(elem);
String fieldRef = elem.consumeStringAttribute("from");
// Make sure that "from" was the only attribute
elem.assertNoAttributes();
return "\" + " + fieldRef + " + \"";
}
return null;
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Consumes all attributes, and returns a string representing the entire
* opening tag. E.g., "<div able='baker'>"
*/
public String consumeOpeningTag() {
String rtn = getOpeningTag();
for (int i = getAttributeCount() - 1; i >= 0; i--) {
getAttribute(i).consumeRawValue();
}
return rtn;
}
代码示例来源:origin: com.jhickman/gxt-uibinder
@Override
public void parse(XMLElement elem, String fieldName, JClassType type, UiBinderWriter writer) throws UnableToCompleteException {
String parameterizedType = elem.consumeRawAttribute("type", "java.lang.String");
JClassType valueType = writer.getOracle().findType(parameterizedType);
if (valueType == null) {
writer.die(elem, "Found type attribute, but unable to resolve the value: %s", parameterizedType);
}
for(XMLElement child : elem.consumeChildElements()) {
if ( ! child.getNamespaceUri().equals(elem.getNamespaceUri())) {
writer.die(elem, "Children of SimpleComboBox must be in the same namespace. Expected '%s' but found '%s'", elem.getPrefix(), child.getPrefix());
}
String data = parseChildElement(child, valueType, writer);
writer.addStatement("%s.add(%s);", fieldName, data);
}
if (elem.getAttribute("simpleValue") != null) {
writer.addStatement("%s.setSimpleValue(%s);", fieldName, elem.consumeAttribute("simpleValue", valueType));
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Consumes all attributes, and returns a string representing the entire
* opening tag. E.g., "<div able='baker'>"
*/
public String consumeOpeningTag() {
String rtn = getOpeningTag();
for (int i = getAttributeCount() - 1; i >= 0; i--) {
getAttribute(i).consumeRawValue();
}
return rtn;
}
代码示例来源:origin: com.jhickman/gxt-uibinder
XMLAttribute layoutAttribute = elem.getAttribute("layout");
if (layoutAttribute != null) {
if (layoutFound) {
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Ensure that the receiver has no attributes left.
*
* @throws UnableToCompleteException if it does
*/
public void assertNoAttributes() throws UnableToCompleteException {
int numAtts = getAttributeCount();
if (numAtts == 0) {
return;
}
StringBuilder b = new StringBuilder();
for (int i = 0; i < numAtts; i++) {
if (i > 0) {
b.append(", ");
}
b.append('"').append(getAttribute(i).getName()).append('"');
}
logger.die(this, "Unexpected attributes: %s", b);
}
代码示例来源:origin: org.vectomatic/lib-gwt-svg
/**
* Ensure that the receiver has no attributes left.
*
* @throws UnableToCompleteException if it does
*/
public void assertNoAttributes() throws UnableToCompleteException {
int numAtts = getAttributeCount();
if (numAtts == 0) {
return;
}
StringBuilder b = new StringBuilder();
for (int i = 0; i < numAtts; i++) {
if (i > 0) {
b.append(", ");
}
b.append('"').append(getAttribute(i).getName()).append('"');
}
logger.die(this, "Unexpected attributes: %s", b);
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Ensure that the receiver has no attributes left.
*
* @throws UnableToCompleteException if it does
*/
public void assertNoAttributes() throws UnableToCompleteException {
int numAtts = getAttributeCount();
if (numAtts == 0) {
return;
}
StringBuilder b = new StringBuilder();
for (int i = 0; i < numAtts; i++) {
if (i > 0) {
b.append(", ");
}
b.append('"').append(getAttribute(i).getName()).append('"');
}
logger.die(this, "Unexpected attributes: %s", b);
}
代码示例来源:origin: laaglu/lib-gwt-svg
/**
* Ensure that the receiver has no attributes left.
*
* @throws UnableToCompleteException if it does
*/
public void assertNoAttributes() throws UnableToCompleteException {
int numAtts = getAttributeCount();
if (numAtts == 0) {
return;
}
StringBuilder b = new StringBuilder();
for (int i = 0; i < numAtts; i++) {
if (i > 0) {
b.append(", ");
}
b.append('"').append(getAttribute(i).getName()).append('"');
}
logger.die(this, "Unexpected attributes: %s", b);
}
代码示例来源:origin: com.jhickman/gxt-uibinder
protected void applyColumnConfigProperties(UiBinderWriter writer,
Map<String, JType> columnConfigSetterTypes, XMLElement child,
String columnConfig) throws UnableToCompleteException {
int attributeCount = child.getAttributeCount();
for(int i = 0; i < attributeCount; i++) {
// always get 0 because we're consuming them
XMLAttribute attribute = child.getAttribute(0);
String setterMethod = "set" + initialCap(attribute.getName());
String value = child.consumeAttribute(attribute.getName(), columnConfigSetterTypes.get(setterMethod));
writer.addStatement("%s.%s(%s);", columnConfig, setterMethod, value);
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* An element will require a placeholder if the user has called it out with a
* ui:ph attribute, or if it will require run time swizzling (e.g. has a
* ui:field). These latter we can identify easily because they'll have an
* attribute that holds a tokenator token that was vended by
* {@link UiBinderWriter}, typically in id.
*
* @return true if it has an ui:ph attribute, or has a token in any attribute
*/
private boolean isDomPlaceholder(XMLElement elem) {
MessagesWriter mw = uiWriter.getMessages();
if (mw.hasMessageAttribute("ph", elem)) {
return true;
}
for (int i = elem.getAttributeCount() - 1; i >= 0; i--) {
if (elem.getAttribute(i).hasToken()) {
return true;
}
}
return false;
}
}
将 RadGrid 用于 Asp.Net Ajax(来自 Telerik) 我需要重新设置 CurrentPageIndex。 Some examples说下一行代码应该是 myGrid.Rebind
在 Rust 中,为了改变一个可变变量的值,let x = 12 有什么区别?或 x = 12在下面的示例代码中? fn main() { let mut x: i32 = 8; {
在 Rust 中,为了改变可变变量的值,以下示例代码中的 let x = 12 或 x = 12 有什么区别? fn main() { let mut x: i32 = 8; {
我已经能够使用按钮(图像映射器)设置 map 坐标,但在加载新图像时无法重新绑定(bind)到新坐标。 我有一张图像和映射,然后我用一个按钮更改图像。我还想更改映射坐标并为不同图像显示不同的映射。任何
这个问题来 self 之前的问题:Why shouldn't C++ operator new/delete/variants be in header files? .快速总结一下,我正在学习重写全
为了进一步了解标准库的实际实现方式,我正在检查 Visual Studio 中的所有容器。这里我看到了一些奇怪的结构: 在 std::list<> 的某些基类中找到以下typedef typedef
当我尝试编译GWT时,我收到一个错误,com.allen_sauer.gwt.log.client.util.impl.DOMUtilImpl无法抽象。如何解决这个错误? 我正在使用GWT 2.6。
我正在服务器上做一个议程,一切都很顺利,我启动了 RMI 注册表,服务器工作正常,我测试了代码并且能够登录。现在我想开始将代码放入方法中并从服务器在客户端中调用它们,当我将 Naming.rebind
我有一个问题。刷新 div 后,召唤灰盒表单的单击事件被破坏。如何将函数重新绑定(bind)到刷新的内容,其中包括将重新触发灰盒的链接?我假设我必须在单击事件后重新初始化功能。我是新手,感谢您的帮助。
我是编程新手,刚开始阅读有关 DataBinding 方法的内容。我也遇到了 Rebinding 方法,乍一看它们似乎在做同样的事情。似乎在任何地方都没有实际答案。 每次更改 DataSource 时
Python 简而言之: Eschew global Never use global if the function body just uses a global variable (includ
首先,我的问题仅适用于 Web 应用程序,我倾向于使用 InRequestScope 解决方案设置我的大部分 Ninject 绑定(bind)。 我正在考虑切换功能的方法,我的一个想法是调用: k
我正在尝试了解 SQL Server 执行计划中的物理运算符。此页面非常有帮助: http://technet.microsoft.com/en-us/library/ms191158.aspx SS
单击按钮后,我的脚本会加载新内容。只要它正在加载,我就不希望元素列表可点击。 是否有任何方法可以解除这些元素的点击事件的绑定(bind),加载内容,然后正确“重新绑定(bind)”事件? 我想要防止的
我取消绑定(bind) slider 以禁止人们在游戏结束后上下移动它,但是当他们再次单击玩时, slider 应该重新绑定(bind)以再次工作。 在我的 startGame() 函数中,该函数在
我认为容器必须将它们提供的任何分配器重新绑定(bind)到一个有效的分配器中,但在随 LLVM(我猜是 libc++ 的一部分)附带的 STL 中,情况似乎并非如此。这是 LLVM 中的错误,还是标准
所以我在网上找到了这段代码,它计算了 d3 图中节点上的 dijkstra 最短路径算法。问题是 d3.rebind 已被删除,我还没有找到修复这段代码以使其工作的方法。有什么建议么?我也知道这段代码
以下在 C++ 中是否合法? 据我所知,Reference 有一个微不足道的析构函数,所以它应该是合法的。 但我认为引用不能合法地反弹......可以吗? template struct Refere
本文整理了Java中com.bitfire.postprocessing.filters.Zoom.rebind()方法的一些代码示例,展示了Zoom.rebind()的具体用法。这些代码示例主要来源
我有一个 anchor 标记 next制作成“按钮”。有时,如果没有新内容可显示,则需要隐藏此标签。如果我只是用 .hide() 隐藏按钮并用 .show() 重新显示它,那么一切都可以正常工作。但我
我是一名优秀的程序员,十分优秀!