FieldSet fieldSet = new FieldSet( localize( "title.articleEdit" ) );
form.add( fieldSet );
fieldSet.add( new FormRow( localize( "label.name" ), new TextBox( "title" ).setAutoFocus( true ) ) );
fieldSet.add( new FormRow( localize( "label.content" ), new TextArea( "content" ) ) );
fieldSet.add( new FormRow( localize( "label.category" ), new Select<Category>( "category", getCategories(), new EntityChoiceRenderer(), true ) ) );
for ( int i = 1; i <= 5; i++ )
{
fieldSet.add( new FormRow( localize( "label.tag" ) + "_" + i, new Select<Tag>( "tag_" + i, getTags(), new EntityChoiceRenderer(), true ) ) );
}
form.add( new AjaxSubmitButton( "save", localize( "button.save" ) ) );
form.add( new Anchor( "cancel", localize( "button.cancel" ), ArticleList.class ) );
}