This is an example (based on Link-o-matic of wicket-examples) of how to use customized state tracking.

Play with this and see how it reacts on using your back-button.

// Action link counts link clicks on works with onclick handler
final Link actionOnClickLink = new Link("actionOnClickLink")
{
	public void onClick()
	{
		addStateChange(new Change()
		{
			private int tmpCount = Home.this.onClickLinkClickCount;
			public void undo()
			{
				onClickLinkClickCount = tmpCount;
			}
		});
		onClickLinkClickCount++;
	}
};