Created
March 10, 2020 09:59
-
-
Save machak/0daba92ed8eb81aef60a83b5991b3afc to your computer and use it in GitHub Desktop.
Wicket panel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns:wicket="http://wicket.apache.org/"> | |
<wicket:panel> | |
<div yui:id="custom-perspective-wrapper" class="hippo-reporting-perspective hippo-panel-plugin"> | |
<div yui:id="custom-perspective-top" class="custom-perspective-top"> | |
<div yui:id="custom-perspective-top-body" class="hippo-panel-plugin-breadcrumbs" style="float:left; width:100%"> | |
<span wicket:id="bread-crumb-bar"></span> | |
</div> | |
</div> | |
<div yui:id="custom-perspective-center" class="custom-perspective-body" style="clear:both;"> | |
<div yui:id="custom-perspective-center-body"> | |
<span wicket:id="panel"></span> | |
</div> | |
</div> | |
</div> | |
</wicket:panel> | |
</html> | |
import javax.jcr.Session; | |
import org.apache.wicket.markup.head.CssHeaderItem; | |
import org.apache.wicket.markup.head.IHeaderResponse; | |
import org.apache.wicket.request.resource.CssResourceReference; | |
import org.apache.wicket.request.resource.ResourceReference; | |
import org.hippoecm.frontend.plugin.IPluginContext; | |
import org.hippoecm.frontend.plugin.config.IPluginConfig; | |
import org.hippoecm.frontend.plugins.standards.panelperspective.PanelPluginPerspective; | |
import org.hippoecm.frontend.plugins.standards.perspective.Perspective; | |
import org.hippoecm.frontend.session.UserSession; | |
public class MyCustomPerspective extends PanelPluginPerspective { | |
private static final ResourceReference PERSPECTIVE_CSS = | |
new CssResourceReference(MyCustomPerspective.class, "MyCustomPerspective.css"); | |
public MyCustomPerspective(IPluginContext context, IPluginConfig config) { | |
super(context, config,"custom"); | |
setOutputMarkupId(true); | |
Session session = UserSession.get().getJcrSession(); | |
} | |
@Override | |
public String getPanelServiceId() { | |
return "MyCustomPerspective.service"; | |
} | |
@Override | |
public void renderHead(final IHeaderResponse response) { | |
response.render(CssHeaderItem.forReference(PERSPECTIVE_CSS)); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment