S: checkboxlist usage, and take the default value,

Source: Internet
Author: User

Many people will not use this label. The usage is as follows:

 

 

<Tr> <TH> select a role </Th> <TD> <s: checkboxlist list = "# request. roleuserlist "listkey =" roleid "listvalue =" rolename "value =" # request. rolelist. {roleid} "name =" roleids "> </S: checkboxlist> </TD> </tr>

 

Where # request. roleuserlist is placed in the request scope in the backgroundRoleuserlistThis list;

Listkey = "roleid" The roleid corresponds to the roleid of the bean attribute in the background roleuserlist. The listkey is also the value to be passed in to the background;

Listvalue = "rolename" is naturally the content displayed on the page;

Value = "# request. rolelist. {roleid}" means to select the default value for S: checkboxlist and put the corresponding background in the request ScopeRolelistRoleid in this list is combined into an array,

Similar to {1, 2, 3}, then the tag will automatically match.

Name = "roleids" This roleids can be set in the background action by using the Get Set roleids array attribute or directly using the request scope value, which must be placed in the array;

 

The effect is similar:

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.