}
gridBuilder.newGridPanel();
{
// Receiver
final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.postausgang.empfaenger"));
final PFAutoCompleteMaxLengthTextField empfaengerTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
new PropertyModel<String>(data, "empfaenger")) {
@Override
protected List<String> getChoices(final String input)
{
return getBaseDao().getAutocompletion("empfaenger", input);
}
};
empfaengerTextField.withMatchContains(true).withMinChars(2).withFocus(true);
empfaengerTextField.setRequired(true);
WicketUtils.setStrong(empfaengerTextField);
fs.add(empfaengerTextField);
}
{
// Person
final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.postausgang.person"));
final PFAutoCompleteMaxLengthTextField personTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
new PropertyModel<String>(data, "person")) {
@Override
protected List<String> getChoices(final String input)
{
return getBaseDao().getAutocompletion("person", input);
}
};
personTextField.withMatchContains(true).withMinChars(2);
fs.add(personTextField);
}
{
// Content
final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.post.inhalt"));
final PFAutoCompleteMaxLengthTextField inhaltTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
new PropertyModel<String>(data, "inhalt")) {
@Override
protected List<String> getChoices(final String input)
{
return getBaseDao().getAutocompletion("inhalt", input);
}
};
inhaltTextField.withMatchContains(true).withMinChars(2);
inhaltTextField.setRequired(true);
fs.add(inhaltTextField);
}
{
// Comment
final FieldsetPanel fs = gridBuilder.newFieldset(getString("comment"));