001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.bean.html5;
018
019import org.apache.juneau.marshall.*;
020
021/**
022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/tabular-data.html#the-tbody-element">&lt;tbody&gt;</a>
023 * element.
024 *
025 * <p>
026 * The tbody element represents a group of rows that consist of a body of data for the parent table
027 * element. It is used to group the main content rows of a table, separating them from the header
028 * (thead) and footer (tfoot) sections. The tbody element can contain multiple tr elements and is
029 * typically used to organize table data for styling and scripting purposes.
030 *
031 * <h5 class='section'>Examples:</h5>
032 * <p class='bcode w800'>
033 *    <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*;
034 *
035 *    <jc>// Simple table body with data rows</jc>
036 *    Tbody <jv>simple</jv> = <jsm>tbody</jsm>(
037 *       <jsm>tr</jsm>(
038 *          <jsm>td</jsm>(<js>"John"</js>),
039 *          <jsm>td</jsm>(<js>"25"</js>),
040 *          <jsm>td</jsm>(<js>"New York"</js>)
041 *       ),
042 *       <jsm>tr</jsm>(
043 *          <jsm>td</jsm>(<js>"Jane"</js>),
044 *          <jsm>td</jsm>(<js>"30"</js>),
045 *          <jsm>td</jsm>(<js>"Los Angeles"</js>)
046 *       )
047 *    );
048 *
049 *    <jc>// Table body with styling</jc>
050 *    Tbody <jv>styled</jv> = <jsm>tbody</jsm>(
051 *       <jsm>tr</jsm>(
052 *          <jsm>td</jsm>(<js>"Product A"</js>),
053 *          <jsm>td</jsm>(<js>"100"</js>),
054 *          <jsm>td</jsm>(<js>"$10.00"</js>)
055 *       )
056 *    ).class_(<js>"data-rows"</js>);
057 *
058 *    <jc>// Table body with multiple rows</jc>
059 *    Tbody <jv>multiple</jv> = <jsm>tbody</jsm>(
060 *       .children(
061 *          new Tr()
062 *             .children(
063 *                new Td().children("Row 1, Col 1"),
064 *                new Td().children("Row 1, Col 2")
065 *             ),
066 *          new Tr()
067 *             .children(
068 *                new Td().children("Row 2, Col 1"),
069 *                new Td().children("Row 2, Col 2")
070 *             )
071 *       );
072 *
073 *    // Table body with event handlers
074 *    Tbody interactive = new Tbody()
075 *       .onclick("handleRowClick(event)")
076 *       .children(
077 *          new Tr()
078 *             .children(
079 *                new Td().children("Clickable Row")
080 *             )
081 *       );
082 * </p>
083 *
084 * <h5 class='section'>See Also:</h5><ul>
085 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
086 * </ul>
087 */
088@Marshalled(typeName = "tbody")
089public class Tbody extends HtmlElementContainer<Tbody> {
090
091   /**
092    * Creates an empty {@link Tbody} element.
093    */
094   public Tbody() {}
095
096   /**
097    * Creates a {@link Tbody} element with the specified child nodes.
098    *
099    * @param children The child nodes. Must not be <jk>null</jk>.
100    */
101   public Tbody(Object...children) {
102      children(children);
103   }
104
105}