我正在使用Ext4 ......
如何检查一个类是否继承了另一个类?
例如:
Ext.define("A", {});
Ext.define("B", { extend: "A" });
Ext.define("C", { extend: "B" });
var a = Ext.create("A");
var c = Ext.create("C");
Run Code Online (Sandbox Code Playgroud)
我需要这样的东西:c instanceof a
???
谢谢
我的xml文件反序列化有问题.让我们假设我们有一个xml文件和一个我们用于反序列化的类.
例如:
xml -
<dataStore>
<name>newDataStore1</name>
<description>sdffasdfasdf</description>
<type>Shapefile</type>
<enabled>false</enabled>
<workspace>
<name>newTestWorkspace</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="ht
tp://192.168.6.71:8080/geoserver/rest/workspaces/newTestWorkspace.xml" type="app
lication/xml"/>
</workspace>
<connectionParameters>
<entry key="memory mapped buffer">false</entry>
<entry key="create spatial index">true</entry>
<entry key="charset">ISO-8859-1</entry>
<entry key="filetype">shapefile</entry>
<entry key="cache and reuse memory maps">true</entry>
<entry key="url">file:data/shapefiles/states.shp</entry>
<entry key="namespace">http://www.opengeospatial.net/cite</entry>
</connectionParameters>
<__default>false</__default>
<featureTypes>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="ht
tp://192.168.6.71:8080/geoserver/rest/workspaces/newTestWorkspace/datastores/new
DataStore1/featuretypes.xml" type="application/xml"/>
</featureTypes>
</dataStore>
Run Code Online (Sandbox Code Playgroud)
类
namespace GeoServerApiTester
{
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.225")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute("dataStore", Namespace="", IsNullable=false)]
public partial class DataStore
{
private string nameField;
private string typeField;
private …Run Code Online (Sandbox Code Playgroud) 我有关于<a>标签的问题.我必须打败这个元素的行为之间存在差异.
我有一个网址:
<a onclick="return Tms.Utils.Window.OpenOrFocus('#detector/14046-1', 'DT14046-1');"
href="#detector/14046-1"
id="ttQSearchHref">DT14046-1</a>
Run Code Online (Sandbox Code Playgroud)
我通过这段代码编写的:
var divEl = document.createElement("div");
divEl.innerHTML = Ext.String.format('<a id="ttQSearchHref" href="{0}" onclick="return Tms.Utils.Window.OpenOrFocus(\'{0}\', \'{1}\');">{1}</a>', Ext.htmlEncode(url), Ext.htmlEncode(name));
document.body.appendChild(divEl);
//var a = document.getElementById('ttQSearchHref');
//a.click();
//document.body.removeChild(divEl);
Run Code Online (Sandbox Code Playgroud)
如果我通过鼠标点击此链接,它会在新窗口中作为Chrome中的标签打开(第23节,所有浏览器都采用相同的方式),这是适合我的行为.但是,如果我在我的代码中调用click方法,它将在一个新的弹出窗口中打开.我有点困惑.为什么我调用click方法是将它作为弹出窗口处理,但是当它单击它时,它有不同的行为?
OpenOrFocus: function(url, name) {
if (!window.popups)
window.popups = {};
if (window.popups[name]) {
window.popups[name].close();
}
window.popups[name] = window.open(url, name);
return false;
}
Run Code Online (Sandbox Code Playgroud)