精品资源在线看,亚洲一区二区三区精品在线,成年在线观看免费人视频http://www.aygfsteel.com/anchor110/category/45622.htmlzh-cnTue, 12 May 2015 02:21:09 GMTTue, 12 May 2015 02:21:09 GMT60extjs給radio的文字label替換成圖片+文字方法http://www.aygfsteel.com/anchor110/articles/424903.html小一敗涂地小一敗涂地Thu, 07 May 2015 02:08:00 GMThttp://www.aygfsteel.com/anchor110/articles/424903.htmlhttp://www.aygfsteel.com/anchor110/comments/424903.htmlhttp://www.aygfsteel.com/anchor110/articles/424903.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/424903.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/424903.html方法如下:

{
xtype: 'radiogroup',
   items: [
     { boxLabel: "<img src='xyz1.gif'/>radio1", name: 'radio', inputValue: 'radio1', checked: true },
     { boxLabel: "<img src='xyz2.gif'/>radio2", name: 'radio', inputValue: 'radio2' },
     { boxLabel: "<img src='xyz3.gif'/>radio3", name: 'radio', inputValue: 'radio3' },
   ]
}

小一敗涂地 2015-05-07 10:08 發表評論
]]>
如何給ext表格中的行添加類html title 的提示信息http://www.aygfsteel.com/anchor110/articles/402411.html小一敗涂地小一敗涂地Mon, 05 Aug 2013 16:10:00 GMThttp://www.aygfsteel.com/anchor110/articles/402411.htmlhttp://www.aygfsteel.com/anchor110/comments/402411.htmlhttp://www.aygfsteel.com/anchor110/articles/402411.html#Feedback1http://www.aygfsteel.com/anchor110/comments/commentRss/402411.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/402411.html{
            header : 
'通道名稱',
            dataIndex : 
'name',
            renderer: function(value,metadata,record,rowIndex,colIndex,store) { 
                metadata.attr 
= 'ext:qtip="' + record.get("name"+ '"';
                
return record.get("name");
            }
}


小一敗涂地 2013-08-06 00:10 發表評論
]]>
ext.grid.RowExpander模板數據刷新問題http://www.aygfsteel.com/anchor110/articles/359413.html小一敗涂地小一敗涂地Sat, 24 Sep 2011 06:48:00 GMThttp://www.aygfsteel.com/anchor110/articles/359413.htmlhttp://www.aygfsteel.com/anchor110/comments/359413.htmlhttp://www.aygfsteel.com/anchor110/articles/359413.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/359413.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/359413.html
this.expander = new Ext.grid.RowExpander({
        lazyRender : false,
        enableCaching : false,
        tpl : new Ext.Template(
            '<p><b>主隊:</b> {hostPlayers}</p>' +
            '<p><b>客隊:</b> {guestPlayers}</p>'
        )
    });
   
當編輯hostPlayers和guestPlayers數據后,store里面的數據已經修改,但是界面依然無刷新。

解決辦法:
給RowExpander設置兩個屬性:
lazyRender : false,
enableCaching : false
即可。


小一敗涂地 2011-09-24 14:48 發表評論
]]>
ext中this.form.getForm().submit,返回參數問題http://www.aygfsteel.com/anchor110/articles/355782.html小一敗涂地小一敗涂地Thu, 04 Aug 2011 07:30:00 GMThttp://www.aygfsteel.com/anchor110/articles/355782.htmlhttp://www.aygfsteel.com/anchor110/comments/355782.htmlhttp://www.aygfsteel.com/anchor110/articles/355782.html#Feedback3http://www.aygfsteel.com/anchor110/comments/commentRss/355782.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/355782.htmlthis.form.getForm().submit方式提交表單時,如果不在返回的文本中包含success:true這個屬性,則默認返回函數是failure。
只有設置后,返回才會到success處理方法。

小一敗涂地 2011-08-04 15:30 發表評論
]]>
讓iframe居中顯示http://www.aygfsteel.com/anchor110/articles/347900.html小一敗涂地小一敗涂地Fri, 08 Apr 2011 08:49:00 GMThttp://www.aygfsteel.com/anchor110/articles/347900.htmlhttp://www.aygfsteel.com/anchor110/comments/347900.htmlhttp://www.aygfsteel.com/anchor110/articles/347900.html#Feedback3http://www.aygfsteel.com/anchor110/comments/commentRss/347900.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/347900.html

小一敗涂地 2011-04-08 16:49 發表評論
]]>
web開發者必備的15個Firefox插件(注:轉載于http://www.jz123.cn/text/0415757.html)http://www.aygfsteel.com/anchor110/articles/341781.html小一敗涂地小一敗涂地Tue, 28 Dec 2010 07:19:00 GMThttp://www.aygfsteel.com/anchor110/articles/341781.htmlhttp://www.aygfsteel.com/anchor110/comments/341781.htmlhttp://www.aygfsteel.com/anchor110/articles/341781.html#Feedback3http://www.aygfsteel.com/anchor110/comments/commentRss/341781.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/341781.html  Aardvark:Aardvark使你能夠選擇網頁上的元素,以展示其上的行為。我用它來分析頁面結構。你也能夠移除、隔離元素或產生DOM代碼。我強烈推薦。

  ColorZilla:如果網頁上有你喜歡的顏色,ColorZilla會找到其精確值,你就可以粘貼到代碼程序里了。還能根據內建的調色板來產生自定義的顏色。它還保存經常使用的顏色,方便隨后使用。強大、簡單,必不可少。

  CSS Validator:CSS Validator在瀏覽器增加一個右擊選項,以發送CSS到W3C CSS Validator。它在新開的標簽(tab)里顯示結果。CSS Validator是個好工具,遲早用得著。

  CSSViewer:沒有web設計師應該不使用CSSViewer。該插件告訴你所需要的關于某個站點的所有CSS信息。僅僅單擊頁面,打開工具菜單,它就顯示了CSS信息。我幾乎天天用。

  FireBug:FireBug是那些不可或缺的擴展之一。它允許你編輯、debug、查看CSS、HTML和JavaScript。一旦你修改了站點的HTML,FireBug會自動在同一個窗戶顯示。非常強大。

  FirePHP:FireBug是面向CSS、HTML和JavaScript的好工具,而FirePHP,僅在你已安裝FireBug擴展之后,會產生具有豐富功能的開發體驗。你可以查看PHP的質量、排錯。很有幫助。

  Font Finder:它可以高亮任意站點上的字體,在選擇區域右擊,選擇“Font Finder”,以查看選擇部分整個CSS文本樣式。然后你就能粘貼到自己的網頁里。

  HTML Validator:功能非常強大,僅windows用戶使用。它把網頁的錯誤反饋給你。它還告訴你問題出在哪里。但是,如果你不是一個高級的web設計師,還是遠離它。太過復雜。

  IE View:只要你在使用windows,IE Viewer就是有用的工具。它在右鍵菜單里增加了“Open in IE”選項,從而快速地在Internet Explorer里打開網址。它還可以對比一個網頁在兩個瀏覽器里的樣子。

  Java Console:如果你想知道Java applets如何在網頁上運行,Java Console就適合你。你可以監視、調試applets,并獲得一份有關性能的完整報告。

  LinkChecker:高亮任何網站的鏈接,告訴你該鏈接把你帶到一個可用的站點,否則將返回404.我天天用。

  Poster:如果你想調試服務器,發出HTTP請求,Poster就是最佳工具。操作簡單,你先設定一個內容類型,數分鐘內,你將擁有需要檢視HTTP請求結果的所有信息。適用。

  Style Sheet Chooser II:它取代FireFox內建的樣式單選擇器,讓你選用不同的樣式,并持續應用整個網站。它不經常被用到,但是,某些工作還是需要它的。

  Web Developer:如果你安裝了這里提到的任何擴展,Web Development也應當包括在內。它給Firefox增加了一個菜單和工具條,你可以選擇顯示網頁的樣式,查看或編輯CSS等等。Web開發者必不可少。

  YSlow:需要安裝了FireBug,它可以找到網站速度慢的原因。它根據《》分析網頁,并返回使網站變慢的因素。我經常讓它幫我找到如何提高網站速度。試試看。



小一敗涂地 2010-12-28 15:19 發表評論
]]>
Extjs ajax同步請求時post方式參數發送方式(注:轉載于http://www.jb51.net/article/19537.htm)http://www.aygfsteel.com/anchor110/articles/341498.html小一敗涂地小一敗涂地Fri, 24 Dec 2010 14:40:00 GMThttp://www.aygfsteel.com/anchor110/articles/341498.htmlhttp://www.aygfsteel.com/anchor110/comments/341498.htmlhttp://www.aygfsteel.com/anchor110/articles/341498.html#Feedback4http://www.aygfsteel.com/anchor110/comments/commentRss/341498.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/341498.html     ajax同步請求一般下面這樣:
var conn = Ext.lib.Ajax.getConnectionObject().conn;
conn.open(
"POST"'http://localhost:8080/struts2study/TreeDDGet?node=-1',false);
//設置為false,代表同步請求
// 這里的conn對象其實就是 xmlHttpRequest 對象。

conn.setRequestHeader(
"Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
conn.send(
"start=" + 0 + "&limit=" + 30 );
var rootJson 
= conn.responseText;

    一般參數傳遞通過url后面跟后臺也能取到,不過看到send參數也可以發送參數,試驗了一下服務器端接受不到發送的參數,在firebug里看到發送的 請求post部分是一個串,不太象正常發送的參數。搜索了很久也沒有找到方法,后來搜到一篇文章介紹了xmlHttpRequest對象的send方法解 釋,才知道需要設置一個header屬性Content-Type 告訴服務器是form方式發送數據,然后send方法里的參數串才會被服務器解釋到。

小一敗涂地 2010-12-24 22:40 發表評論
]]>
ExtJs 之簡單 Form提交(注:轉載于http://www.aygfsteel.com/supercrsky/articles/218037.html)http://www.aygfsteel.com/anchor110/articles/341497.html小一敗涂地小一敗涂地Fri, 24 Dec 2010 14:37:00 GMThttp://www.aygfsteel.com/anchor110/articles/341497.htmlhttp://www.aygfsteel.com/anchor110/comments/341497.htmlhttp://www.aygfsteel.com/anchor110/articles/341497.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/341497.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/341497.html<%@ page language="java" pageEncoding="gbk"%>
<%
    String path 
= request.getContextPath();
    String basePath 
= request.getScheme() + "://"
            
+ request.getServerName() + ":" + request.getServerPort()
            
+ path + "/";
%>
<html>
    
<head>
        
<link rel="stylesheet" type="text/css"
            href
="<%=basePath%>/js/ext/resources/css/ext-all.css" />
        
<script type="text/javascript"
            src
="<%=basePath%>/js/ext/adapter/ext/ext-base.js"></script>
        
<script type="text/javascript" src="<%=basePath%>/js/ext/ext-all.js"></script>
        
<script type="text/javascript">
  Ext.onReady(function()
  {
       var form1 
= new Ext.form.FormPanel({
       renderTo:
"loginForm"//要渲染的div
       labelWidth: 75// label settings here cascade unless overridden 
       method:'POST',
       title: 
'登錄窗口',
       bodyStyle:
'padding:5px 5px 0',
       width: 
300,
       defaults: {width: 
200},
       defaultType: 
'textfield',
       
//實現非AJAX提交表單一定要加下面的兩行!
       onSubmit: Ext.emptyFn,
       submit: function() 
       {
           
this.getEl().dom.action= 'index.jsp'//連接到服務器的url地址
           this.getEl().dom.submit();
       },
       
       items: [{
           fieldLabel: 
'用戶名',
           id: 
'username'
           name: 
'name',   
           allowBlank:
false,
           blankText : 
"用戶名不能為空",
           width:
150
           },{
           fieldLabel: 
'密碼',
           blankText : 
"密碼不能為空",
           id: 
'password',
           name: 
'pwd',
           allowBlank:
false,
           minLength : 
6,
           width:
150,
           inputType:
'password' //類型為password
       }
       ],
       buttons: [{
           text: 
'登錄',
           type:
'button',
           id:
'login',
           handler: function()
           {
                   
//表單驗證通過
                   if (form1.form.isValid())
                   {    
                       
//提交form
                       form1.form.submit();
                   }    
           }
       },{
           text: 
'重置',
           type:
'reset',
           id:
'clear',
           handler: function()
           {
                form1.form.reset();
           }
       }
       ]
       }); 
    
    
//將form添加window中
    var window = new Ext.Window({
        title: 
'用戶登錄',
        width: 
300,
        height:
180,
        layout: 
'fit',
        plain:
true,
        bodyStyle:
'padding:5px;',
        buttonAlign:
'center',
        items: form1
    });
    
//顯示window
    window.show();    
  });
  
 
</script>
    
</head>
    
<body>
        
<div id="loginForm"></div>
    
</body>
</html>

小一敗涂地 2010-12-24 22:37 發表評論
]]>
ext中使用文件上傳http://www.aygfsteel.com/anchor110/articles/340559.html小一敗涂地小一敗涂地Mon, 13 Dec 2010 15:30:00 GMThttp://www.aygfsteel.com/anchor110/articles/340559.htmlhttp://www.aygfsteel.com/anchor110/comments/340559.htmlhttp://www.aygfsteel.com/anchor110/articles/340559.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/340559.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/340559.html this.form.getForm().submit({
    waitTitle : '請稍后...',
    waitMsg : '正在保存菜譜信息,請稍后...',
    url: '../cookbook',
    method: 'POST',
    success: this.addCookbook,
    failure: function(form, action) {
        DelayMessage.show("系統消息", action.failureType);
    },
    scope: this
});
開始的時候,從服務器端返回JSON數據的時候,直接彈出下載提示對話框,success函數從來不執行。
不明白什么原因。

經過在EXT JS官方論壇上查找,發現有如下解釋:
Your server needs to return a page with Content-type:text/html (so NOT application/json!).

Also, since it's HTML the response should be:
HTML Code:
<html><body>{success:true}</body></html>
于是,我修改服務器端返回,由原來的application/json返回,改成html返回,并且,按照數據規定格式寫。

注意:返回的html中,必須帶success:true參數。如果要回傳其他數據,請在后面加上對應的數據即可。如下:
<html><body>{success:true,cookbook:[{name:"gbjd"},{name:"szr"}]}</body></html>



小一敗涂地 2010-12-13 23:30 發表評論
]]>
extjs 處理HTML事件和自定義事件(注:轉載于http://www.aygfsteel.com/algz/articles/317021.html)http://www.aygfsteel.com/anchor110/articles/340164.html小一敗涂地小一敗涂地Thu, 09 Dec 2010 09:18:00 GMThttp://www.aygfsteel.com/anchor110/articles/340164.htmlhttp://www.aygfsteel.com/anchor110/comments/340164.htmlhttp://www.aygfsteel.com/anchor110/articles/340164.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/340164.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/340164.html extjs 處理HTML事件和自定義事件

1. 處理HTML元素的標準事件

HTML元素的標準事件是指mouseover、mousedown、click、 blur、focus、change等。在ExtJS中,這些事件的處理如下:

  • 注冊一個事件處理函數使用: Ext.get('myElement').on('click', myHandler, myScope) myElement是要注冊的元素的ID,click是事件的名稱(注意,和HTML元素中的聲明onXXX不同,這里不需要on),myHandler 是處理函數的函數名稱,myScope是一個可選的參數,指定處理函數綁定的對象,也就是處理函數的作用域,如果不提供這個參數,則是默認的 window。
  • 撤銷一個事件處理函數: Ext.get('myElement').un('click', myHandler, myScope) 參數的意義同上。

ExtJS 會根據不同的瀏覽器進行相應的處理,支持多瀏覽器。事件處理函數的參數只能參考ExtJS的文檔了,必要時還得參考源代碼。

2. 處理自定義事件

在ExtJS中使用自定義事件,需要從Ext.util.Observable繼承,示例代碼如下:

Employee = function(name){
this.name = name;
this.addEvents({
"fired" : true,
"quit" : true
});
}
Ext.extend(Employee, Ext.util.Observable, { ... });

在這段代碼中,定義了一個Employee類,定義了fired和quit兩個事件。如何觸發這兩個事件呢,基類 Ext.util.Observable提供了觸發自定義事件的方法fireEvent(eventName, arg1, arg2, ... argn), eventName是要觸發的時間的名稱(不區分大小寫),后面的參數arg1,arg2等是要傳給事件處理函數的參數。用上面的Employee類做示 例,觸發quit事件:

this.fireEvent('quit', this);

這行代碼將觸發quit事件,并將Empolyee類的實例傳給quit事件的處理函數,quit事件的訂閱可以采用如下代碼:

function myHandler1(empolyee){ ... }
function myHandler2(empolyee){ ... }
var emp = new Empolyee('tom');
emp.on('quit', myHandler1);
emp.on('quit', myHandler2);

在上面的代碼中,為quit事件注冊了兩個處理函數(myHandler1與myHandler),當quit事件被激發時,將會依次調用 myHandler1和myHandler2兩個函數。

值得注意的是,不管是HTML元素的標準事件還是自定義事件,如果為某個時間注冊了多個處理函數,如前面的例子,如果myHandler1返回 false的話,則會取消在myHandler1之后注冊的處理函數的執行,即該事件被取消,從而停止繼續執行該事件的處理函數,而這個返回值false 會作為事件激發的結果,返回給empolyee,即:

var result = this.fireEvent('quit', this);
if (result === false) {
alert('event canceled'); //這里表示事件被某個處理函數取消
}
else {
alert('event complete'); // 這里表示事件執行完畢
}

通過Ext的自定義事件的機制,可以實現一對多的觀察者模式,也可以實現一對一的綁定模式,這一點,在ExtJS的開發中是很重要的。



小一敗涂地 2010-12-09 17:18 發表評論
]]>
主站蜘蛛池模板: 吴川市| 新宁县| 永善县| 隆子县| 谷城县| 西城区| 宜兴市| 光山县| 桂东县| 正阳县| 儋州市| 洛阳市| 津市市| 陈巴尔虎旗| 石台县| 德州市| 永定县| 乐东| 麟游县| 长葛市| 工布江达县| 开阳县| 邵武市| 黑龙江省| 广河县| 石林| 莱芜市| 遂平县| 左贡县| 博乐市| 华容县| 进贤县| 靖江市| 霸州市| 灵璧县| 湖北省| 舒城县| 房山区| 凯里市| 松溪县| 称多县|