This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Custom State Tracking

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

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.

Code Block
// 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++;
	}
};