Hi,

On Sat, Sep 25, 2021 at 3:45 PM vahid ghasemi <vahidghasemi...@gmail.com>
wrote:

> Hello
> I have a <h1> tag and <small> tag inside of it:
>
> <h1 class="d-flex align-items-center text-dark fw-bolder my-1 fs-3"
> wicket:id="panelName">
>     Dashboard
>     <!--begin::Separator-->
>     <span class="h-20px border-gray-200 border-start ms-3 mx-2"></span>
>     <!--end::Separator-->
>     <!--begin::Description-->
>     <small class="text-muted fs-7 fw-bold my-1 ms-1"
> wicket:id="panelDes">#XRS-45670</small>
>     <!--end::Description--></h1>
>
> my h1 has a Label component.
>
> how I can add Lable into Label?
>

You cannot! A Label is a leaf component that cannot have children. Only
components which extend from MarkupContainer could have children.
You need to change your code to:

<h1 class="d-flex align-items-center text-dark fw-bolder my-1 fs-3"
wicket:id="panel">
    Dashboard
    <!--begin::Separator-->
    <span wicket:id="panelSeparator" class="h-20px border-gray-200
border-start ms-3 mx-2"></span>
    <!--end::Separator-->
    <!--begin::Description-->
    <small class="text-muted fs-7 fw-bold my-1 ms-1"
wicket:id="panelDes">#XRS-45670</small>
    <!--end::Description--></h1>


WebMarkupContainer panel = new WebMarkupContainer("panel");
add(panel);
panel.add(new Label("panelSeparator", ....));
panel.add(new Label("panelDes", ....));

Reply via email to