Transclude HTML in Apache Wicket component

delpo

I want to transclude html in a component, similar on how angularjs does with transclude:true (directives).

Suppose I have this html

<div wicket:id="myComponent> My content </div>

I want the component to write "My content" where I specify. In MyComponent.html:

<wicket:panel>   
//Some other code
TRANSCLUDE HERE: "My content" should be here.
</wicket:panel>

Thanks in advance

martin-g

This is what org.apache.wicket.markup.html.border.Border component does.

The markup of a Border looks like:

<wicket:border>
  // some HTML with or without wicket:id here
 <wicket:body/>
  // some more HTML with or without wicket:id here
<wicket:border>

At the usage site you have:

<div wicket:id="myborder">
   // anything here will replace <wicket:body/> in the snippet above
</div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Apache Wicket: dynamic key for message with embedded HTML

From Dev

Component transclude with inline template

From Dev

Component transclude with inline template

From Dev

Appending JQuery to Wicket Component

From Dev

EJB Injection Apache Wicket

From Dev

Populating table with apache wicket

From Dev

Apache Wicket textfield onUpdate

From Dev

Apache Wicket DateTextField clear

From Dev

Jacoco support for apache wicket?

From Dev

Wicket - MarkupNotFoundException: Markup of type 'html' for component 'com.hello.Hello' not found

From Dev

Angular: using transclude with ng-bind-html

From Dev

How to edit LoadableDetachableModel in Apache Wicket

From Dev

Strange behavior using multiple transclude component in Angularjs 1.6.1

From Dev

Apache-Wicket renders tag <wicket:panel> in page body

From Java

How to pass in a react component into another react component to transclude the first component's content?

From Dev

Removing an HTML tag using Wicket

From Dev

How to reload html resources in wicket

From Dev

Removing an HTML tag using Wicket

From Dev

Trigger repainting a wicket component via push message

From Dev

Create Wicket component embedding a Textfield and its FeedbackPanel

From Dev

Re-render wicket component from backend

From Dev

Wicket 7 unable to find component in Form tree

From Dev

Trigger repainting a wicket component via push message

From Dev

Wicket AjaxRequestTarget of jQuery callback does not Component

From Dev

Wicket - How to use ListView in custom form component?

From Dev

Re-render wicket component from backend

From Dev

Reorder items in Apache Wicket's repeating views

From Dev

Multiple paths for one class in Apache Wicket

From Dev

Apache Wicket variable link text inside table

Related Related

  1. 1

    Apache Wicket: dynamic key for message with embedded HTML

  2. 2

    Component transclude with inline template

  3. 3

    Component transclude with inline template

  4. 4

    Appending JQuery to Wicket Component

  5. 5

    EJB Injection Apache Wicket

  6. 6

    Populating table with apache wicket

  7. 7

    Apache Wicket textfield onUpdate

  8. 8

    Apache Wicket DateTextField clear

  9. 9

    Jacoco support for apache wicket?

  10. 10

    Wicket - MarkupNotFoundException: Markup of type 'html' for component 'com.hello.Hello' not found

  11. 11

    Angular: using transclude with ng-bind-html

  12. 12

    How to edit LoadableDetachableModel in Apache Wicket

  13. 13

    Strange behavior using multiple transclude component in Angularjs 1.6.1

  14. 14

    Apache-Wicket renders tag <wicket:panel> in page body

  15. 15

    How to pass in a react component into another react component to transclude the first component's content?

  16. 16

    Removing an HTML tag using Wicket

  17. 17

    How to reload html resources in wicket

  18. 18

    Removing an HTML tag using Wicket

  19. 19

    Trigger repainting a wicket component via push message

  20. 20

    Create Wicket component embedding a Textfield and its FeedbackPanel

  21. 21

    Re-render wicket component from backend

  22. 22

    Wicket 7 unable to find component in Form tree

  23. 23

    Trigger repainting a wicket component via push message

  24. 24

    Wicket AjaxRequestTarget of jQuery callback does not Component

  25. 25

    Wicket - How to use ListView in custom form component?

  26. 26

    Re-render wicket component from backend

  27. 27

    Reorder items in Apache Wicket's repeating views

  28. 28

    Multiple paths for one class in Apache Wicket

  29. 29

    Apache Wicket variable link text inside table

HotTag

Archive