logic:equal 标签的使用(转)

简介:

<logic:equal name="music" property="distrubute" value="true">
      选中
</logic:equal>
<logic:equal name="music" property="distrubute" value="false">
      未选中
</logic:equal>

logic:equal 标签相当于一个判断语句,判断一个boolean类型的属性书否为真,假.

  • name属性:是指已经存在的一个Bean,在page,session,request范围中
  • property属性:是指这个Bean的一个属性,通常是boolean类型
  • value属性:其值有true,false;当为true时执行标签体内的代码,


<logic:empty name="movieExs">
 

      <center>数据库中没有你所需要的记录</center>
</logic:empty>
logic:empty 标签相当于一个判断语句,即判断name属性(存放的集合对象),当这个集合对象为空时候即执行标签体,相当于:
if(movieExs.isEmpty){
    System.out.println("数据库中没有你所需要的记录");
}

与其相反的标签类似的使用方法
<logic:notEmpty name="movieExs">
    ............
</logic:notEmpty>

本文转载自SharkBin博客园博客,原文链接: http://www.cnblogs.com/SharkBin/p/6423065.html 如需转载自行联系原作者
相关文章
|
7月前
|
XML 安全 数据安全/隐私保护
SAP Success Factor Single Sign On(单点集成) 的文档清单
SAP Success Factor Single Sign On(单点集成) 的文档清单
34 0
|
机器学习/深度学习 数据挖掘
【多标签文本分类】Balancing Methods for Multi-label Text Classification with Long-Tailed Class Distribution
【多标签文本分类】Balancing Methods for Multi-label Text Classification with Long-Tailed Class Distribution
【多标签文本分类】Balancing Methods for Multi-label Text Classification with Long-Tailed Class Distribution
|
机器学习/深度学习 算法
Re9:读论文 DEAL Inductive Link Prediction for Nodes Having Only Attribute Information
Re9:读论文 DEAL Inductive Link Prediction for Nodes Having Only Attribute Information
Re9:读论文 DEAL Inductive Link Prediction for Nodes Having Only Attribute Information
Multiple Origin composition test - Opportunity Creation case
Sent: Wednesday, 3 December, 2014 2:48 PM 结论是:如果gateway系统上针对一个odata service维护了多个mark成default的backend system,在creation的case下,runtime时候gateway只会向第一个 Default system发起请求。
111 0
Multiple Origin composition test - Opportunity Creation case
SAP Fiori Elements - smart filter bar study - filter display logic
SAP Fiori Elements - smart filter bar study - filter display logic
119 0
SAP Fiori Elements - smart filter bar study - filter display logic
Fiori elements:when smart template is entered for first time, no data filled
Fiori elements:when smart template is entered for first time, no data filled
Fiori elements:when smart template is entered for first time, no data filled
A small tip to explore how to call a method of a control
Created by Jerry Wang, last modified on Mar 20, 2015
112 0
A small tip to explore how to call a method of a control
SAP Spartacus user form去除嵌套label的side effect之一
SAP Spartacus user form去除嵌套label的side effect之一
SAP Spartacus user form去除嵌套label的side effect之一
|
监控 JavaScript Java
SAP ABAP一组关键字 IS BOUND, IS NOT INITIAL和IS ASSIGNED的用法辨析
SAP ABAP一组关键字 IS BOUND, IS NOT INITIAL和IS ASSIGNED的用法辨析
470 0
SAP ABAP一组关键字 IS BOUND, IS NOT INITIAL和IS ASSIGNED的用法辨析