JSP uses tags to control content display

Source: Internet
Author: User

JSP uses the <C: Choose> label to control content display

 
<C: Choose> <C: When test = "$ {task. status EQ 1} "> not started </C: When> <C: When test =" $ {task. status EQ 2} "> in progress </C: When> <C: When test =" $ {task. status EQ 3} "> terminated </C: When> <C: When test =" $ {task. status EQ 4} "> completed </C: When> </C: Choose>
<C: Choose> <C: When test = "$ {typename. name = NULL} ">  

<C: Choose> is used only as the parent label of <C: When> and <C: otherwise>. Syntax <C: Choose> body content (<when> and <otherwise>) </C: Choose> attributes are unrestricted. <C: Choose> the body content can only be: · blank spaces · 1 or more <C: When> · 0 or more <C: otherwise> indicate that <C: When> and <C: when using otherwise> for process control, both of them must be sub-labels of <C: Choose>: <C: Choose >:< C: When> </C: When>: <C: otherwise> </C: otherwise >:</C: Choose> ● <C: When>ProgramThe same as the when. Syntax <C: When test = "testcondition"> body content </C: When> attribute name description El type must be set to test by default. If the expression returns true, the body content is executed. If the value is false, y Boolean is unlimited? <C: When> must be the same between <C: Choose> and </C: Choose>? In <C: Choose>, <C: When> must be specified before <C: otherwise>. <C: When> must have the test attribute. When the expression result in test is true, the body content is executed. If the value is false, the body content is not executed.

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.