Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
bd653479
Commit
bd653479
authored
15 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
extract code length as a constant
SVN: 13470
parent
0d360522
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/CodeField.java
+3
-1
3 additions, 1 deletion
...ric/client/web/client/application/ui/field/CodeField.java
with
3 additions
and
1 deletion
openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/CodeField.java
+
3
−
1
View file @
bd653479
...
@@ -28,6 +28,8 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IMess
...
@@ -28,6 +28,8 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IMess
*/
*/
public
class
CodeField
extends
TriggerField
<
String
>
public
class
CodeField
extends
TriggerField
<
String
>
{
{
private
static
final
int
CODE_MAX_LENGTH
=
40
;
private
static
final
String
CODE_CHAR_PATTERN
=
"a-zA-Z0-9_\\-\\."
;
private
static
final
String
CODE_CHAR_PATTERN
=
"a-zA-Z0-9_\\-\\."
;
public
static
final
String
CODE_CHARS
=
"["
+
CODE_CHAR_PATTERN
+
"]+"
;
public
static
final
String
CODE_CHARS
=
"["
+
CODE_CHAR_PATTERN
+
"]+"
;
...
@@ -107,7 +109,7 @@ public class CodeField extends TriggerField<String>
...
@@ -107,7 +109,7 @@ public class CodeField extends TriggerField<String>
final
String
pattern
,
final
String
allowedCharacters
)
final
String
pattern
,
final
String
allowedCharacters
)
{
{
VarcharField
.
configureField
(
this
,
label
,
true
);
VarcharField
.
configureField
(
this
,
label
,
true
);
setMaxLength
(
40
);
setMaxLength
(
CODE_MAX_LENGTH
);
setRegex
(
pattern
);
setRegex
(
pattern
);
getMessages
().
setRegexText
(
getMessages
().
setRegexText
(
messageProvider
.
getMessage
(
Dict
.
INVALID_CODE_MESSAGE
,
allowedCharacters
));
messageProvider
.
getMessage
(
Dict
.
INVALID_CODE_MESSAGE
,
allowedCharacters
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment