-1 (?)
I've just found a bug in the new inline enclosure feature. It's not a
showstopper, but probably is trivial enough to get corrected before
the release.
If you setup a IComponentInstantiationListener that calls
setOutputMarkupId(true) to every component, the tags with the
enclosure attribute don't get re-rendered on ajax requests, because
the generated IDs from the HTML placeholder and the Ajax response
don't match.
Code:
public class App extends WebApplication {
@Override
protected void init() {
addComponentInstantiationListener(new
IComponentInstantiationListener() {
public void onInstantiation(Component component) {
component.setOutputMarkupId(true);
}
});
}
@Override
public Class<? extends Page> getHomePage() {
return HomePage.class;
}
}
public class HomePage extends WebPage {
public HomePage() {
final Label label = new Label("label", "VISIBLE!");
add(label.setVisible(false).setOutputMarkupId(true));
add(new AjaxLink<Void>("link") {
@Override
public void onClick(AjaxRequestTarget target) {
label.setVisible(!label.isVisible());
target.addComponent(label);
}
});
}
}
<html xmlns:wicket="http://wicket.apache.org">
<body>
<a wicket:id="link">Clique!</a>
<div wicket:enclosure="label">
<hr/>
<h1 wicket:id="label"></h1>
<hr/>
</div>
</body>
</html>
On Thu, Mar 31, 2011 at 4:54 AM, Martijn Dashorst
<[email protected]> wrote:
> +1
>
> On Wed, Mar 30, 2011 at 9:11 PM, Juergen Donnerstag
> <[email protected]> wrote:
>> +1
>>
>> Juergen
>>
>> On Wed, Mar 30, 2011 at 6:40 PM, Jan Kriesten
>> <[email protected]> wrote:
>>>
>>>
>>>> This vote is to release wicket 1.4.17. This is a bugfix release on the
>>>> 1.4.x (stable) branch.
>>>
>>> +1
>>>
>>> Best regards, --- Jan.
>>>
>>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>