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月前
|
C++
C++17使用std::apply和fold expression对tuple进行遍历
C++17使用std::apply和fold expression对std::tuple进行遍历
55 0
|
8月前
|
机器学习/深度学习 数据采集 人工智能
|
机器学习/深度学习 数据挖掘
【多标签文本分类】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
ValueError: Sample larger than population or is negative
ValueError: Sample larger than population or is negative
146 0
PAT (Advanced Level) Practice - 1053 Path of Equal Weight(30 分)
PAT (Advanced Level) Practice - 1053 Path of Equal Weight(30 分)
100 0
PAT (Advanced Level) Practice - 1060 Are They Equal(25 分)
PAT (Advanced Level) Practice - 1060 Are They Equal(25 分)
82 0
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发起请求。
109 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
118 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