Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
a9d3788e
Commit
a9d3788e
authored
8 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-2048: fix autoboxing of boolean value which can be null
parent
aaff1b21
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/course/nodes/ta/DropboxForm.java
+5
-2
5 additions, 2 deletions
src/main/java/org/olat/course/nodes/ta/DropboxForm.java
with
5 additions
and
2 deletions
src/main/java/org/olat/course/nodes/ta/DropboxForm.java
+
5
−
2
View file @
a9d3788e
...
@@ -77,7 +77,8 @@ public class DropboxForm extends FormBasicController {
...
@@ -77,7 +77,8 @@ public class DropboxForm extends FormBasicController {
protected
void
formOK
(
UserRequest
ureq
)
{
protected
void
formOK
(
UserRequest
ureq
)
{
fireEvent
(
ureq
,
Event
.
DONE_EVENT
);
fireEvent
(
ureq
,
Event
.
DONE_EVENT
);
}
}
@Override
protected
void
formInnerEvent
(
UserRequest
ureq
,
FormItem
source
,
FormEvent
event
)
{
protected
void
formInnerEvent
(
UserRequest
ureq
,
FormItem
source
,
FormEvent
event
)
{
if
(
source
==
enablemail
)
{
if
(
source
==
enablemail
)
{
confirmation
.
setMandatory
(
enablemail
.
isSelected
(
0
));
confirmation
.
setMandatory
(
enablemail
.
isSelected
(
0
));
...
@@ -112,7 +113,9 @@ public class DropboxForm extends FormBasicController {
...
@@ -112,7 +113,9 @@ public class DropboxForm extends FormBasicController {
confirmation
=
uifactory
.
addTextAreaElement
(
"confirmation"
,
"form.dropbox.confirmation"
,
2500
,
4
,
40
,
true
,
sConfirmation
!=
null
?
sConfirmation
:
""
,
formLayout
);
confirmation
=
uifactory
.
addTextAreaElement
(
"confirmation"
,
"form.dropbox.confirmation"
,
2500
,
4
,
40
,
true
,
sConfirmation
!=
null
?
sConfirmation
:
""
,
formLayout
);
Boolean
enableMail
=
(
Boolean
)
config
.
get
(
TACourseNode
.
CONF_DROPBOX_ENABLEMAIL
);
Boolean
enableMail
=
(
Boolean
)
config
.
get
(
TACourseNode
.
CONF_DROPBOX_ENABLEMAIL
);
confirmation
.
setMandatory
(
enableMail
);
if
(
enableMail
!=
null
)
{
confirmation
.
setMandatory
(
enableMail
.
booleanValue
());
}
enablemail
=
uifactory
.
addCheckboxesHorizontal
(
"enablemail"
,
"form.dropbox.enablemail"
,
formLayout
,
new
String
[]{
"xx"
},
new
String
[]{
null
});
enablemail
=
uifactory
.
addCheckboxesHorizontal
(
"enablemail"
,
"form.dropbox.enablemail"
,
formLayout
,
new
String
[]{
"xx"
},
new
String
[]{
null
});
enablemail
.
select
(
"xx"
,
enableMail
!=
null
?
enableMail
.
booleanValue
()
:
true
);
enablemail
.
select
(
"xx"
,
enableMail
!=
null
?
enableMail
.
booleanValue
()
:
true
);
enablemail
.
addActionListener
(
FormEvent
.
ONCLICK
);
enablemail
.
addActionListener
(
FormEvent
.
ONCLICK
);
...
...
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