<%@ page language= "java" contentType ="text/html; charset=UTF-8"

    pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> OCS对接</title >
<script src="../../../resources/ext5/ext-all.js" ></script>
<script src="../../../resources/ext5/packages/ext-locale/ext-locale-zh_CN.js" ></script>
<link href="../../../resources/ext5/packages/ext-theme-access/build/resources/ext-theme-access-all.css" rel="stylesheet" />
 
    <!-- example code -->
 
    <link rel="stylesheet" type="text/css" href="../../../resources/ext5/warnConfig.css" >
    <script src="../../../resources/ext5/treefilter.js"></script >
<script type="text/javascript" >
 
 
//
// This is the main layout definition.
//
//
// Note that these are all defined as panel configs, rather than instantiated
// as panel objects.  You could just as easily do this instead:
//
// var absolute = Ext.create('Ext.Panel', { ... });
//
// However, by passing configs into the main container instead of objects, we can defer
// layout AND object instantiation until absolutely needed.  Since most of these panels
// won't be shown by default until requested, this will save us some processing
// time up front when initially rendering the page.
//
// Since all of these configs are being added into a layout container, they are
// automatically assumed to be panel configs, and so the xtype of 'panel' is
// implicit.  To define a config of some other type of component to be added into
// the layout, simply provide the appropriate xtype config explicitly.
//
function getBasicLayouts() {
    // This is a fake CardLayout navigation function.  A real implementation would
    // likely be more sophisticated, with logic to validate navigation flow.  It will
    // be assigned next as the handling function for the buttons in the CardLayout example.
    var cardNav = function(incr){
        var l = Ext.getCmp('card-wizard-panel' ).getLayout();
        var i = l.activeItem.id.split('card-' )[1];
        var next = parseInt(i, 10) + incr;
        l.setActiveItem(next);
     //   Ext.getCmp('card-prev').setDisabled(next===0);
     //   Ext.getCmp('card-next').setDisabled(next===2);
    };
    return {
        /*
         * ================  Start page config  =======================
         */
        // The default start page, also a simple example of a FitLayout.
        start: {
            id: 'mainPanel',
            title: 'OCS系统点号对接配置' ,
            layout: 'fit',
            bodyPadding: 25
        }
    };
}
 
Ext.onReady(function(){
 
    Ext.tip.QuickTipManager.init();
 
    var detailsCmp;
 
    // Gets all layouts examples
    /*
    var layoutExamples = [];
    Ext.Object.each(getBasicLayouts(), function(name, example) {
        layoutExamples.push(example);
    });
*/
//     Ext.Object.each(getCombinationLayouts(), function(name, example){
//         layoutExamples.push(example);
//     });
 
//     Ext.Object.each(getCustomLayouts(), function(name, example){
//         layoutExamples.push(example);
//     });
 
    // This is the main content center region that will contain each example layout panel.
    // It will be implemented as a CardLayout since it will contain multiple panels with
    // only one being visible at any given time.
 
<%--    var contentPanel = {--%>
<%--        id: 'content-panel',--%>
<%--    //    region: 'border', // this is what makes this panel into a region within the containing layout--%>
<%--        margins: '2 5 5 0',--%>
<%--        fit:true,--%>
<%--        activeItem: 0,--%>
<%--        border: false,--%>
<%--        items: layoutExamples--%>
<%--    };--%>
 
    var store = Ext.create( 'Ext.data.TreeStore', {
      
        root: {
             expanded: true,
                text: "My Root",
                children: [
                    { text: "Child 1", leaf: true },
            { text: "Child 2", expanded: true, children: [
                        { text: "GrandChild", leaf: true }
                    ] }
                ]
        }
     /*
        proxy: {
             actionMethods: {
                 create: "POST", read: "POST", update: "POST", destroy: "POST"
             },
            type: 'ajax',
            autoLoad : true,
            noCache: false,
         //   url: '${pageContext.request.contextPath}/sysLoginAction/getTreeAction_ext.action',
                  extraParams:{pid:'1'}
        }
         */
    });
 
    // Go ahead and create the TreePanel now so that we can use it below
    var tab1 = Ext.create( 'MyTreePanel', {
        id: 'tab1',
        title: 'tab1',
        region: 'center',
        split: true,
        height: 360,
        minSize: 150,
        rootVisible: false,
        autoScroll: true,
          store: store
    });
    var tab2 = Ext.create( 'MyTreePanel', {
        id: 'tab2',
        title: 'tab2',
        region: 'center',
        split: true,
        height: 360,
        minSize: 150,
        rootVisible: false,
        autoScroll: true
    });
   
   
    /*
    treePanel.getSelectionModel().on('select', function(selModel, record) {
        if (record.get('leaf')) {
//            Ext.getCmp('content-panel').layout.setActiveItem(record.getId() + '-panel');
//
//            detailsCmp = Ext.getCmp('details-panel');
//            detailsCmp.body.hide().slideIn('l', {stopAnimation:true,duration: 200});
//            detailsCmp.update(Ext.getDom(record.getId() + '-details').innerHTML);
//            detailsCmp.doLayout();
        }
    });
*/
    // This is the Details panel that contains the description for each example layout.
        var tabs = Ext.widget('tabpanel' , {
        resizeTabs: true,
        enableTabScroll: true,
       
        items: [tab1,tab2]
    });
 
<%--{--%>
<%--    id: 'tabsPanel',--%>
<%--    region: 'center', // this is what makes this panel into a region within the containing layout--%>
<%--    border: false,--%>
<%--    layout: 'fit' ,--%>
<%--    items:tabs--%>
<%--//tabs为tab页,在items中增加fit即可--%>
<%--  //  height:500,--%>
<%--    //bodyStyle: 'background:#fff;' --%>
<%--}--%>
 
    var detailsPanel = {
        id: 'main',
        region: 'center',
        title: 'Details',
        border: false,
        layout: 'fit' ,
       items:tabs
 
    };
 
    // Finally, build the main layout once all the pieces are ready.  This is also a good
    // example of putting together a full-screen BorderLayout within a Viewport.
 
 
    Ext.create('Ext.Viewport', {
        layout: 'border',
        title: 'Ext Layout Browser',
        items: [
                detailsPanel
                ]
    });
 
 
 
    
<%--    var field = Ext.get('textfieldid');  --%>
<%--          field.on('keyup', function(e) {  --%>
<%--              //  alert(Ext.getCmp('textfieldid').getValue());--%>
<%--                treePanel.filterByText(Ext.getCmp('textfieldid').getValue()) ; --%>
<%--             });  --%>
 
});
 
</script>
</head>
<body>
 
</body>
</html>

Extjs5 tabs实例的更多相关文章

  1. javascript面向对象——tabs实例

    面向过程—>面向对象 之前在未学习面向对象时,我们都是面向过程编程的.它的优点就是简单,明了,下面就来把面向过程的tabs切换改写成面向对象的方式. html: <div class=&q ...

  2. 最近学习工作流 推荐一个activiti 的教程文档

    全文地址:http://www.mossle.com/docs/activiti/ Activiti 5.15 用户手册 Table of Contents 1. 简介 协议 下载 源码 必要的软件 ...

  3. [ExtJS5学习笔记]第十一节 Extjs5MVVM模式下系统登录实例

    本文地址:http://blog.csdn.net/sushengmiyan/article/details/38815923 实例代码下载地址: http://download.csdn.net/d ...

  4. jQuery EasyUI 选项卡面板tabs使用实例精讲

    1. 对选项卡面板区域 div 设置 class=”easyui-tabs” 2. 对选项卡面板区域添加多个 div,每个 div 就是一个选项卡(每个面板一定设置 title) 3. 设置面板 fi ...

  5. 微信小程序实例:实现tabs选项卡效果

    最近微信应用号是炒的如火如荼,热门满满,但是也可以发现搜索关键词出来,各类网站出现的还都是微信的官方文档解释.正好赶上这个热潮,这几天先把小程序技术文档看了个遍,就直接着手写案例了.很多组件微信内部已 ...

  6. Android应用底部导航栏(选项卡)实例

    现在很多android的应用都采用底部导航栏的功能,这样可以使得用户在使用过程中随意切换不同的页面,现在我采用TabHost组件来自定义一个底部的导航栏的功能. 我们先看下该demo实例的框架图: 其 ...

  7. ASP.NET MVC+EF框架+EasyUI实现权限管理系列(23)-设置角色遗留问题和为权限设置角色以及EasyUI Tabs的使用

    ASP.NET MVC+EF框架+EasyUI实现权限管系列 (开篇)   (1):框架搭建    (2):数据库访问层的设计Demo    (3):面向接口编程   (4 ):业务逻辑层的封装    ...

  8. 多iframe使用tab标签方式添加、删除、切换的处理实例

    紧接着上一篇随笔iframe的内容增高或缩减时设置其iframe的高度的处理方案 如果采用iframe来切换显示内容的方式来展现办公Web.那么需要解决几个问题 1.tab标签需要和显示的iframe ...

  9. Qt StyleSheet样式表实例(转)

    QT论坛看到的,收藏一下! 在涉及到Qt 美工的时候首先需要掌握CSS 级联样式表. 下面将通过几个例子来介绍一下怎样使用Qt中的部件类型设计.自定义的前台背景与后台背景的颜色: 如果需要一个文本编辑 ...

随机推荐

  1. Entity Framework 6 Recipes 2nd Edition(11-2)译 -> 为一个”模型定义”函数返回一个计算列

    11-3. 为一个”模型定义”函数返回一个计算列 问题 想从”模型定义”函数里返回一个计算列 解决方案 假设我们有一个员工(Employee)实体,属性有: FirstName, LastName,和 ...

  2. 在网上摘录一段对于IOC的解析,比较直观,大家观摩观摩

    其实IoC非常简单,基本思想就是面向接口的编程,只是老外给起了个名字名充分利用之. 简单的说,传统模式下,如果你要用钱,你需要去银行取,IoC模式下,银联在你家安了一个取款机,你直接找取款机要钱就可以 ...

  3. Js删除数组重复元素的多种方法

    js对数组元素去重有很多种处理的方法,本篇文章中为网络资源整理,当然每个方法我都去实现了:写下来的目的是希望自己活学活用,下次遇到问题后方便解决. 第一种 function oSort(arr){ v ...

  4. BVT & BAT (版本验证测试和版本验收测试)

    BVT & BAT 版权声明:本文为博主原创文章,未经博主允许不得转载. 一.BVT: (Build Verification Test ) BVT的概念: BVT(版本验证测试)是在所有开发 ...

  5. 今天有群友不是很清楚htm直接存数据库的危害,我简单举个例子

     通过这个案例就知道为什么不要把原生的html放数据库了  常见的几种转码  常用的几种显示方法 只有原生html和最下面一种弹框了,变成了持久xss 如果是Ajax的方式,请用@Ajax.JavaS ...

  6. Windows下MySQL的常用操作

    1.MySQL关闭与重启 1.MYSQL服务 我的电脑——(右键)管理——服务与应用程序——服务——MYSQL——开启(停止.重启动) 2.如果你没安装系统服务,可在命令行模式定位到mysql下的bi ...

  7. 前端学HTTP之WEB服务器

    前面的话 Web服务器每天会分发出数以亿计的Web页面,它是万维网的骨干.本文主要介绍WEB服务器的相关内容 总括 Web服务器会对HTTP请求进行处理并提供响应.术语“Web服务器”可以用来表示We ...

  8. Android自定义控件之自定义组合控件

    前言: 前两篇介绍了自定义控件的基础原理Android自定义控件之基本原理(一).自定义属性Android自定义控件之自定义属性(二).今天重点介绍一下如何通过自定义组合控件来提高布局的复用,降低开发 ...

  9. Java:泛型基础

    泛型 引入泛型 传统编写的限制: 在Java中一般的类和方法,只能使用具体的类型,要么是基本数据类型,要么是自定义类型.如果要编写可以应用于多种类型的代码,这种刻板的限制就会束缚很多! 解决这种限制的 ...

  10. python3爬取1024图片

    这两年python特别火,火到博客园现在也是隔三差五的出现一些python的文章.各种开源软件.各种爬虫算法纷纷开路,作为互联网行业的IT狗自然看的我也是心痒痒,于是趁着这个雾霾横行的周末瞅了两眼,作 ...