COOKIES! This blog uses cookies!
I am completely out of control of cookies here, otherwise I would have disabled them (it is controlled by the platform).
If you don't like cookies and being tracked please leave this blog immediately.

Saturday, 30 June 2018

Diff two files with powershell

Compare-Object -ReferenceObject $(Get-Content f1.txt) -DifferenceObject $(Get-Content f2.txt)

Friday, 5 January 2018

wicket:message with links and labels inside

wicket:message can contain markup inside of itself. It is an easy thing to do, but not quite obvious that it's allowed to do that.

For example wicket:message with a link and a label:

MyPanel.html
<wicket:message key="myMessage">
    <span wicket:id="myLabel" />
    <a wicket:id="myLink" />
</wicket:message>

MyPanel.java
//...
add(new Label("myLabel", myLabelModel));
add(new LabelledBookmarkablePageLink("myLink", ViewSomethingPage.class));
//...

MyPanel.properties
myMessage = a text before a label ${myLabel}, between label and a link ${myLink}, after link
myLink= My Link Text

${myLabel} and ${myLink} of myMessage will be replaced with appropriate components