You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by vahid ghasemi <va...@gmail.com> on 2021/09/25 12:45:13 UTC

tag into

tag

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?

Re: tag into

tag

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Sat, Sep 25, 2021 at 3:45 PM vahid ghasemi <va...@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", ....));

Re: tag into

tag

Posted by Martin Terra <ma...@koodaripalvelut.com>.
Hi!

To me it looks like you have a webmarkupcontainer and a small label inside
it. Or how do you expect it to render?

If all text is dynamic then I would still make it one label which partly
generates html markup.

**
Martin

la 25. syysk. 2021 klo 15.45 vahid ghasemi (vahidghasemi119@gmail.com)
kirjoitti:

> 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?
>