List of usage examples for org.apache.wicket.markup.html.image Image setMarkupId
final void setMarkupId(Component comp)
From source file:org.hippoecm.frontend.plugins.console.editor.ToggleHeader.java
License:Apache License
/** * Creates a clickable header./* w w w .ja v a2 s. com*/ * * @param id the Wicket ID of this component * @param name the name of the header (used as a parameter in the toggleBox() javascript call) * @param text the text the display in the header */ public ToggleHeader(String id, String name, String text) { super(id); this.name = name; final Label textLabel = new Label("text", text); add(textLabel); final Image toggleImage = new Image("toggle-icon", new PackageResourceReference(ToggleHeader.class, "group-expanded.png")); toggleImage.setMarkupId("toggle-" + name); toggleImage.setOutputMarkupId(true); add(toggleImage); }