View Javadoc

1   /*
2    * $Id: CheckboxList.java 451544 2006-09-30 05:38:02Z mrdon $
3    *
4    * Copyright 2006 The Apache Software Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  package org.apache.struts2.components;
19  
20  import javax.servlet.http.HttpServletRequest;
21  import javax.servlet.http.HttpServletResponse;
22  
23  import com.opensymphony.xwork2.util.ValueStack;
24  
25  /***
26   * <!-- START SNIPPET: javadoc -->
27   *
28   * Creates a series of checkboxes from a list. Setup is like &lt;s:select /&gt; or &lt;s:radio /&gt;, but creates checkbox tags.
29   *
30   * <!-- END SNIPPET: javadoc -->
31   *
32   * <p/> <b>Examples</b>
33   *
34   * <pre>
35   * <!-- START SNIPPET: example -->
36   * &lt;s:checkboxlist name="foo" list="bar"/&gt;
37   * <!-- END SNIPPET: example -->
38   * </pre>
39   *
40   * @s.tag name="checkboxlist" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.CheckboxListTag"
41   * description="Render a list of checkboxes"
42    */
43  public class CheckboxList extends ListUIBean {
44      final public static String TEMPLATE = "checkboxlist";
45  
46      public CheckboxList(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
47          super(stack, request, response);
48      }
49  
50      protected String getDefaultTemplate() {
51          return TEMPLATE;
52      }
53  }