Maximale Länge für das Feld Name (URL) in BasicPageForm (und damit in allen anderen Formularen für Content-Items) wird jetzt
gesetzt um zu lange Namen für Items zu unterbinden (Ticket #1345). git-svn-id: https://svn.libreccm.org/ccm/trunk@1959 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
371c8e4ef4
commit
c80e2042a0
|
|
@ -179,11 +179,13 @@ public abstract class BasicItemForm
|
||||||
add(new Label(getNameLabel()));
|
add(new Label(getNameLabel()));
|
||||||
TextField nameWidget = new TextField(new TrimmedStringParameter(NAME));
|
TextField nameWidget = new TextField(new TrimmedStringParameter(NAME));
|
||||||
nameWidget.addValidationListener(new NameValidationListener());
|
nameWidget.addValidationListener(new NameValidationListener());
|
||||||
|
nameWidget.setMaxLength(190);
|
||||||
nameWidget.setOnFocus("defaulting = false");
|
nameWidget.setOnFocus("defaulting = false");
|
||||||
nameWidget.setOnBlur(
|
nameWidget.setOnBlur(
|
||||||
"if (this.value == '') "
|
"if (this.value == '') "
|
||||||
+ "{ defaulting = true; this.value = urlize(this.form." + TITLE
|
+ "{ defaulting = true; this.value = urlize(this.form." + TITLE
|
||||||
+ ".value) } " + " else { this.value = urlize(this.value); }");
|
+ ".value) } " + " else { this.value = urlize(this.value); }");
|
||||||
|
nameWidget.addValidationListener(new NotNullValidationListener());
|
||||||
add(nameWidget);
|
add(nameWidget);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,8 @@ public abstract class BasicPageForm extends BasicItemForm {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void validate(final FormSectionEvent fse) throws FormProcessException {
|
public void validate(final FormSectionEvent fse) throws FormProcessException {
|
||||||
|
super.validate(fse);
|
||||||
|
|
||||||
final ContentItem item = getItemSelectionModel().getSelectedItem(fse.getPageState());
|
final ContentItem item = getItemSelectionModel().getSelectedItem(fse.getPageState());
|
||||||
ACSObject parent = item.getParent();
|
ACSObject parent = item.getParent();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue