easyUI问题记录

在使用这个框架写后台的过程中 ,反复出现了一个问题,特此记录


富文本编辑框 由于本身内容会带上html的标签,java的后台和android前端可以无缝切换没有影响,但是ios在这个过程中总是会报出json格式异常;

所以我们特别需要一段代码来处理一下换行 标签、n/t/r之类的。


    public static String rhtml(String content) {
        if (content == null)
            return "";
        String html = content;
        html = StringUtils.replace(html, "\t", "");
        html = StringUtils.replace(html, "\r", "");
        html = StringUtils.replace(html, "\n", "");
        return html;
    }
   
对富文本编辑框中的内容过滤一下所有的标签 ,然后将纯净内容存在数据库中……


eaUI的list结果如果包含此类标签列表查询返回的结果list即使有值也不能正常显示列表,可见上面方法的重要性!!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Combotree 是 easyui 中的一个组件,它可以同显示树形结构和下拉框,可以方便地选择树形结构中的节点。下面是 combotree 的使用记录: 1. 引入 easyui 的 css 和 js 文件: ```html <link rel="stylesheet" type="text/css" href="https://cdn.bootcdn.net/ajax/libs/jquery-easyui/1.9.14/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="https://cdn.bootcdn.net/ajax/libs/jquery-easyui/1.9.14/themes/icon.css"> <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery-easyui/1.9.14/jquery.easyui.min.js"></script> ``` 2. 在 HTML 中添加 combotree 组件: ```html <input id="tree" class="easyui-combotree" style="width:200px;"> ``` 3. 初始化 combotree 组件: ```javascript $('#tree').combotree({ url: 'tree_data.json', // 树形结构数据的 URL method: 'get', // 数据请求方式 required: true, // 是否必填 panelHeight: 'auto', // 下拉框高度 multiple: true, // 是否允许多选 checkbox: true, // 是否显示复选框 onlyLeafCheck: true, // 是否只允许选择叶子节点 onLoadSuccess: function(node, data) { // 数据加载完成后的回调函数 console.log('load tree data success.'); } }); ``` 4. tree_data.json 文件内容如下: ```json [{ "id": 1, "text": "Node 1", "children": [{ "id": 11, "text": "Node 1.1" },{ "id": 12, "text": "Node 1.2" }] },{ "id": 2, "text": "Node 2", "children": [{ "id": 21, "text": "Node 2.1" },{ "id": 22, "text": "Node 2.2", "children": [{ "id": 221, "text": "Node 2.2.1" },{ "id": 222, "text": "Node 2.2.2" }] }] }] ``` 5. 运行代码后,会显示一个下拉框,点击下拉框会显示树形结构。可以选择节点,也可以多选。 以上就是 combotree 的使用记录,希望对你有帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值