Jsp judges the List Length

Source: Internet
Author: User

Jsp judges the List Length

Hello everyone:

One problem encountered today is that the back-end uploads a List to the front-end and the front-end judges the List length!

Other tags are required to search for other users.

In jsp development, it is often necessary to determine the length of the list or string to do something. Because if in the jstl label does not support else, select while. <% @ Taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %> <% @ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %> -------- standard is required here. the jar package introduces two tag libraries to determine the length, for example, Jsp code
           
  
   
Not grouped
            
            
   
    
$ {Tags. tagname}
             
        
   
What I want to talk about today is just the tag <% @ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>.

You only need to add an implicit tag to the body to easily determine


So OK !!!

     
 
 
Traditional Chinese medicine:
              

$ {TcMedicineList. name }$ {tcMedicineList. standard}

Dose: $ {ptcMedicineList. num }$ {ptcMedicineList. unit}
<% -- Dose: $ {ptcMedicineList. dosage}
-- %> Usage: $ {ptcMedicineList. usemethod }$ {ptcMedicineList. dosage}

>

Dose: $ {ptcMedicineList. num }$ {ptcMedicineList. unit}
Usage: $ {ptcMedicineList. usemethod }$ {ptcMedicineList. dosage} expand

$ {TcMedicineList. name }$ {tcMedicineList. standard}

Dose: $ {ptcMedicineList. num }$ {ptcMedicineList. unit}
Usage: $ {ptcMedicineList. usemethod }$ {ptcMedicineList. dosage} collapse

Western medicines:

$ {WeMedicineList. name }$ {weMedicineList. standard}

... Expand

$ {WeMedicineList. name }$ {weMedicineList. standard}

Collapse

<% --
Check items:

$ {Entity. name}

Expand

$ {Entity. name}

Collapse

-- %>
Others:

$ {OtMedicineList. name }$ {otMedicineList. standard}

Treatment items:

$ {TrMedicineList. name }$ {trMedicineList. standard}

Total: $ {RMB} yuan




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.