如何将工具栏添加到使用ExtJS的区域(How do I add a toolbar to a region with ExtJS)
我在ExtJS中有一个边界布局,
北部地区包含一些HTML,但也需要包含这样的工具栏...
所以我设法设置了边界布局,将html添加到了布局的北部区域,但是我找不到如何实现工具栏的可行示例。
我已经发现了许多自己的工具栏的例子,但我没有充分享受这些奢侈品或者彻底学习ExtJs,所以这对我来说都是希腊化的。
我怀疑有一种方法可以在繁琐的JSON风格的流程之外定义一个工具栏来创建布局,并以某种方式将它附加到该区域,我希望它相对简单。 如果有人能解释我会如何做到这一点,那真的会有所帮助。
这是迄今为止的代码...
//make sure YOUR path is correct to this image!! Ext.BLANK_IMAGE_URL = '../../ext-2.0.2/resources/images/default/s.gif'; //this runs on DOM load - you can access all the good stuff now. Ext.onReady(function(){ var viewport = new Ext.Viewport({ layout: "border", border: false, renderTo: Ext.getBody(), items: [ // ------------------------------------------------------------------ { region: "north", id : "toolbar-area", xtype: 'panel', html: [ "<div id=\"html-header\">", "<div id=\"council-logo\"></div>", "<ul id=\"ancillary-menu\">", "<li><a href=\"#\">Logout</a></li>", "<li><a href=\"#\">Gazeteer Home</a></li>", "<li>Hello Rachel</li>", "</ul>", "<img id=\"inteligent-logo\" src=\"applied-images/logos/inteligent.gif\">", "</div>" ], /* ++++++++++++++++++++++++++++++++++++++++++++ */ /* The toolbar needs to go around here.... */ /* ++++++++++++++++++++++++++++++++++++++++++++ */ height: 100 }, // ------------------------------------------------------------------ // WEST // ------------------------------------------------------------------ { region: 'west', xtype: 'panel', split: true, resizeable: false, maxWidth : 350, minWidth : 349, collapsible: true, title: 'Gazetteer Explorer', width: 350, minSize: 150, // -------------------------------------------------------------- title: 'Nested Layout', layout: 'border', border: false, id: "west", items: [ { // *********************************************** // Search Form // *********************************************** region : "north", height: 300, split : true, id : "left-form-panel", items : [{ xtype : "form", id : "search-form", items : [ // Authority combo box // =============================== { xtype : "combo", fieldLabel : "Authority", name : "authority", hiddenName : "authority", id : "authority-combo" }, // =============================== // Search Fieldset // =============================== { xtype : "fieldset", autoHeight : true, title : "Search by...", id : "search-fieldset", items : [ // Ref Number text Box // %%%%%%%%%%%%%%%% { xtype : "textfield", name : "ref-number", fieldLabel : "Ref. Number", id : "ref-number-textfield" }, // %%%%%%%%%%%%%%%% // Streetname Combo // %%%%%%%%%%%%%%% { xtype : "combo", name : "street-name", hiddenName : "street-name", fieldLabel : "Street Name", id : "street-name-combo" }, // %%%%%%%%%%%%%%%% // Postcode Combo // %%%%%%%%%%%%%%%% { xtype : "combo", name : "postcode", hiddenName : "postcode", fieldLabel : "Postcode", id : "postcode-combo" }, // %%%%%%%%%%%%%%%% // Postcode Combo // %%%%%%%%%%%%%%%% { xtype : "combo", name : "town", hiddenName : "town", fieldLabel : "Town", id : "towm-combo" }, // %%%%%%%%%%%%%%%% // Postcode Combo // %%%%%%%%%%%%%%%% { xtype : "combo", name : "locality", hiddenName : "locality", fieldLabel : "Locality", id : "locality-combo" }, // %%%%%%%%%%%%%%% // Search Button // %%%%%%%%%%%%%%%% { xtype : "button", text : "Search", id : "search-button" }, // Reset Button // %%%%%%%%%%%%%%% { xtype : "button", text : "Reset", id : "reset-button" } ] }, // ======================= ] }] // ********************************************* }, { region: 'center', html: 'Tree view goes here' } ] }, // ------------------------------------------------------------------ { region: 'center', xtype: 'panel', // -------------------------------------------------------------- layout: 'border', border: false, items: [ { region: 'center', height: 200, split: true, html: 'Map goes here' }, { region: 'south', title: "Selection", split: true, height: 200, collapsible: true, html: 'Nested Center' } ] }, // ------------------------------------------------------------------ { region: 'east', }, // ------------------------------------------------------------------ { region: 'south', }] }); });
对不起有很多代码,但ExtJS让我害怕碰触任何可以工作的东西。
I have a border layout in ExtJS,
The north region contains some HTML, but also needs to contain a toolbar like this...
So i've managed to get the border layout set up, added the html to the North Region of the layout, but I can't find any workable examples of how to implement a tool bar.
I have found lot's of examples of toolbars on their own, but I've not got the luxury or learning ExtJs thoroughly so it's all greek to me.
I suspect there's a way to define a tool bar outside of the cumbersome JSON style flow of creating a layout and somehow attaching it to the region, and I'm hoping it's relativley simple to do. If someone can explain how I'd do this, it would really help.
Here's the code so far...
//make sure YOUR path is correct to this image!! Ext.BLANK_IMAGE_URL = '../../ext-2.0.2/resources/images/default/s.gif'; //this runs on DOM load - you can access all the good stuff now. Ext.onReady(function(){ var viewport = new Ext.Viewport({ layout: "border", border: false, renderTo: Ext.getBody(), items: [ // ------------------------------------------------------------------ { region: "north", id : "toolbar-area", xtype: 'panel', html: [ "<div id=\"html-header\">", "<div id=\"council-logo\"></div>", "<ul id=\"ancillary-menu\">", "<li><a href=\"#\">Logout</a></li>", "<li><a href=\"#\">Gazeteer Home</a></li>", "<li>Hello Rachel</li>", "</ul>", "<img id=\"inteligent-logo\" src=\"applied-images/logos/inteligent.gif\">", "</div>" ], /* ++++++++++++++++++++++++++++++++++++++++++++ */ /* The toolbar needs to go around here.... */ /* ++++++++++++++++++++++++++++++++++++++++++++ */ height: 100 }, // ------------------------------------------------------------------ // WEST // ------------------------------------------------------------------ { region: 'west', xtype: 'panel', split: true, resizeable: false, maxWidth : 350, minWidth : 349, collapsible: true, title: 'Gazetteer Explorer', width: 350, minSize: 150, // -------------------------------------------------------------- title: 'Nested Layout', layout: 'border', border: false, id: "west", items: [ { // *********************************************** // Search Form // *********************************************** region : "north", height: 300, split : true, id : "left-form-panel", items : [{ xtype : "form", id : "search-form", items : [ // Authority combo box // =============================== { xtype : "combo", fieldLabel : "Authority", name : "authority", hiddenName : "authority", id : "authority-combo" }, // =============================== // Search Fieldset // =============================== { xtype : "fieldset", autoHeight : true, title : "Search by...", id : "search-fieldset", items : [ // Ref Number text Box // %%%%%%%%%%%%%%%% { xtype : "textfield", name : "ref-number", fieldLabel : "Ref. Number", id : "ref-number-textfield" }, // %%%%%%%%%%%%%%%% // Streetname Combo // %%%%%%%%%%%%%%% { xtype : "combo", name : "street-name", hiddenName : "street-name", fieldLabel : "Street Name", id : "street-name-combo" }, // %%%%%%%%%%%%%%%% // Postcode Combo // %%%%%%%%%%%%%%%% { xtype : "combo", name : "postcode", hiddenName : "postcode", fieldLabel : "Postcode", id : "postcode-combo" }, // %%%%%%%%%%%%%%%% // Postcode Combo // %%%%%%%%%%%%%%%% { xtype : "combo", name : "town", hiddenName : "town", fieldLabel : "Town", id : "towm-combo" }, // %%%%%%%%%%%%%%%% // Postcode Combo // %%%%%%%%%%%%%%%% { xtype : "combo", name : "locality", hiddenName : "locality", fieldLabel : "Locality", id : "locality-combo" }, // %%%%%%%%%%%%%%% // Search Button // %%%%%%%%%%%%%%%% { xtype : "button", text : "Search", id : "search-button" }, // Reset Button // %%%%%%%%%%%%%%% { xtype : "button", text : "Reset", id : "reset-button" } ] }, // ======================= ] }] // ********************************************* }, { region: 'center', html: 'Tree view goes here' } ] }, // ------------------------------------------------------------------ { region: 'center', xtype: 'panel', // -------------------------------------------------------------- layout: 'border', border: false, items: [ { region: 'center', height: 200, split: true, html: 'Map goes here' }, { region: 'south', title: "Selection", split: true, height: 200, collapsible: true, html: 'Nested Center' } ] }, // ------------------------------------------------------------------ { region: 'east', }, // ------------------------------------------------------------------ { region: 'south', }] }); });
Sorry there's so much code, but ExtJS makes me scared to touch anything that's working.
原文:https://stackoverflow.com/questions/2506711
最满意答案
不幸的是 - 它可能是很多事情 - 许多应用程序服务器和其他java包装容易发挥属性和他们自己的“钥匙串”,而不是。 所以它可能在看完全不同的东西。
没有桁架 - 我会尝试:
java -Djavax.net.debug=all -Djavax.net.ssl.trustStore=trustStore ...
看看是否有帮助。 而不是“全部”,也可以将其设置为“ssl”,密钥管理器和信任管理器,这可能有助于您的处理。 将其设置为“帮助”将在大多数平台上列出如下所示的内容。
无论如何 - 确保您完全了解密钥库(您拥有私钥和证书,证明您自己的身份)与信任存储(确定您信任的人)之间的区别 - 以及您自己的身份对根有一个“连锁”的信任 - 这与任何一个链条分开,你需要找出你信任的“谁”。
all turn on all debugging ssl turn on ssl debugging The following can be used with ssl: record enable per-record tracing handshake print each handshake message keygen print key generation data session print session activity defaultctx print default SSL initialization sslctx print SSLContext tracing sessioncache print session cache tracing keymanager print key manager tracing trustmanager print trust manager tracing pluggability print pluggability tracing handshake debugging can be widened with: data hex dump of each handshake message verbose verbose handshake message printing record debugging can be widened with: plaintext hex dump of record plaintext packet print raw SSL/TLS packets
资料来源:#请参阅http://download.oracle.com/javase/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Debug
Unfortunately - it could be many things - and lots of app servers and other java 'wrappers' are prone to play with properties and their 'own' take on keychains and what not. So it may be looking at something totally different.
Short of truss-ing - I'd try:
java -Djavax.net.debug=all -Djavax.net.ssl.trustStore=trustStore ...
to see if that helps. Instead of 'all' one can also set it to 'ssl', key manager and trust manager - which may help in your case. Setting it to 'help' will list something like below on most platforms.
Regardless - do make sure you fully understand the difference between the keystore (in which you have the private key and cert you prove your own identity with) and the trust store (which determines who you trust) - and the fact that your own identity also has a 'chain' of trust to the root - which is separate from any chain to a root you need to figure out 'who' you trust.
all turn on all debugging ssl turn on ssl debugging The following can be used with ssl: record enable per-record tracing handshake print each handshake message keygen print key generation data session print session activity defaultctx print default SSL initialization sslctx print SSLContext tracing sessioncache print session cache tracing keymanager print key manager tracing trustmanager print trust manager tracing pluggability print pluggability tracing handshake debugging can be widened with: data hex dump of each handshake message verbose verbose handshake message printing record debugging can be widened with: plaintext hex dump of record plaintext packet print raw SSL/TLS packets
Source: # See http://download.oracle.com/javase/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Debug
相关问答
更多-
不幸的是 - 它可能是很多事情 - 许多应用程序服务器和其他java包装容易发挥属性和他们自己的“钥匙串”,而不是。 所以它可能在看完全不同的东西。 没有桁架 - 我会尝试: java -Djavax.net.debug=all -Djavax.net.ssl.trustStore=trustStore ... 看看是否有帮助。 而不是“全部”,也可以将其设置为“ssl”,密钥管理器和信任管理器,这可能有助于您的处理。 将其设置为“帮助”将在大多数平台上列出如下所示的内容。 无论如何 - 确保您完全了解密 ...
-
truststoreFile="C:/Users/dpivovar/ssl_server.jks" truststorePass="start123" 这些属性不存在。 您必须通过系统属性设置它们。 I resolved this issue by setting in tomcat configuration system Java properties for keystore/truststore and keystorePassword/truststorePassword.
-
转到Firefox浏览器中的URL,单击HTTPS证书链(URL地址旁边)。 点击"more info" > "security" > "show certificate" > "details" > "export.." 。 拾取名称并选择文件类型example.cer。 现在你有了密钥库的文件,你必须将它添加到你的JVM 确定cacerts文件的位置,例如。 C:\Program Files (x86)\Java\jre1.6.0_22\lib\security\cacerts. 接下来,将exampl ...
-
您应该将server:port的证书导入到Java JRE密钥库,例如以下服务器和端口: serverAddress: myserver.mydomain.com serverPort: 443 keystore password is default: changeit 首先,在继续之前检查$ JAVA_HOME和java可执行文件,你应该确定选择正确的JAVA_HOME进行导入,如果你有不同的: $ ~/bin$ echo $JAVA_HOME /opt/jdk $ ~/bin$ which java ...
-
解决方法是仅在请求的页面上禁用SSL。 不一样的东西,理所当然,但这个垃圾太烦人了。 要禁用SSL,请在webClient对象上使用以下内容: webClient.getOptions().setUseInsecureSSL(true); A workaround is to just disable SSL on the requested page. Not the same thing, granted, but this crap just got too annoying. To disabl ...
-
也许这个关于SSL证书的讨论可以帮助你实现它。 如果您一直遇到证书问题,camunda Maven存储库也可以在没有SSL加密的情况下访问: http ://app-unsecure.camunda.com/nexus/content/groups/public/ Maybe this discussion about SSL certificates could help you to get it working. If you keep having trouble with the certific ...
-
终于搞清楚了,3个月后... Maven Artifactory存储库前面的apache服务器未配置为在链中提供中间证书。 我下载了中间证书 - 让我们加密权限X3(IdenTrust交叉签名) - 并配置apache来提供它。 实际上, domain.crt文件同时包含域名和中间证书,并且对于我所有的测试浏览器来说,总是足够好。 但是在一台机器上的eclipse / maven安装程序无法处理它。 在SSL实验室检查告诉我证书链不完整(即使没有浏览器似乎在意)后,我才开始查看Apache配置。 之前: ...
-
它在浏览器中工作,因为CA证书位于浏览器的密钥环中,而不是JDK使用的密钥环。 使用keytool将您的CA证书添加到JDK密钥环: keytool -keystore cacerts -importcert -alias aliasOfTheCertificate -file FileNameOfTheCertificate.cer 从命令行。 请注意,许多Linux发行版已经发布了包含所有受信任根的ca-certs-java软件包,如果可能,请尽量使用它。 It works in a browser ...
-
事实证明,答案比我想象的要简单。 我错过了将证书导入Trust密钥库的部分(我只是在cacerts jdk文件中导入它们)。 我做到了,工作得很好。 谢谢大家。 So turns out the answers was simpler than what I thought. I was missing the part of importing the certificates to the Trust keystore (I was just importing them on the cacerts ...
-
它对您的客户证书没有任何帮助。 您的信任库不信任服务器证书。 Use openssl to generate your P12 file openssl pkcs12 -export -in /Users/me/test.authclient.int.com.crt -inkey /Users/me/test.authclient.int.com.key -out authClient.p12 -name authClientCert Generate the trust store key keytool ...