[
https://issues.apache.org/jira/browse/WICKET-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545211
]
Gerolf Seitz commented on WICKET-1173:
--------------------------------------
i think you somehow misuse the bodyContainer. for one, the wicket:body tag is
not even rendered when you run the application in standard deployment mode (see
MarkupSettings->stripWicketTags).
as for your example:
<wicket:border>
<a wicket:id="hideLink">Hide/Show</a>
<wicket:body></wicket:body>
</wicket:border>
i'd suggest wrapping the body in a separate container and hiding/showing the
container instead:
(code based on your example)
HTML:
<wicket:border>
<a wicket:id="hideLink">Hide/Show</a>
<div wicket:id="bodyWrapper"><wicket:body></wicket:body></div>
</wicket:border>
JAVA:
public class HideableBorder extends Border {
private WebMarkupContainer wrapper
public HideableBorder(String name) {
super(name);
addHideLink();
wrapper= new WebMarkupContainer("bodyWrapper");
wrapper.setOutputMarkupPlaceholderTag(true);
wrapper.setVisible(false);
}
private void addHideLink() {
add(new AjaxLink("hideLink") {
public void onClick(AjaxRequestTarget target) {
wrapper.setVisible(!wrapper.isVisible());
target.addComponent(wrapper);
}
});
}
}
> Border bodycontainer doesn't render a markup placeholder
> --------------------------------------------------------
>
> Key: WICKET-1173
> URL: https://issues.apache.org/jira/browse/WICKET-1173
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-rc1
> Reporter: Carlos Pita
> Fix For: 1.3.0-rc2
>
> Attachments: border.tgz
>
>
> A border with getBodyContainer().setOutputMarkupPlaceholderTag(true); doesn't
> generate a placeholder after its body is hidden. I've attached an example.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.