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
f1e46b3d
Commit
f1e46b3d
authored
12 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-291: use generics and strong type check
parent
cd8c20cc
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/group/ui/wizard/MemberListWizardController.java
+33
-6
33 additions, 6 deletions
.../org/olat/group/ui/wizard/MemberListWizardController.java
with
33 additions
and
6 deletions
src/main/java/org/olat/group/ui/wizard/MemberListWizardController.java
+
33
−
6
View file @
f1e46b3d
...
...
@@ -270,9 +270,9 @@ public class MemberListWizardController extends BasicController {
}
}
else
{
if
(
GROUPS_MEMBERS
.
equals
(
wizardType
))
{
setGroupList
(
getSelected
Value
s
(
groupsOrAreaChoice
));
setGroupList
(
getSelected
Group
s
(
groupsOrAreaChoice
));
}
else
if
(
AREAS_MEMBERS
.
equals
(
wizardType
))
{
setAreaList
(
getSelected
Value
s
(
groupsOrAreaChoice
));
setAreaList
(
getSelected
Area
s
(
groupsOrAreaChoice
));
}
velocityContainer2
.
put
(
"colsChoice"
,
colsChoiceController
.
getInitialComponent
());
wizardController
.
setNextWizardStep
(
translate
(
"memberlistwizard.colchoice"
),
velocityContainer2
);
...
...
@@ -367,8 +367,8 @@ public class MemberListWizardController extends BasicController {
* @param choice
* @return a list with the selected values of the input choice component.
*/
private
List
getSelected
Value
s
(
Choice
choice
)
{
List
<
Object
>
selValues
=
new
ArrayList
<
Object
>();
private
List
<
BGArea
>
getSelected
Area
s
(
Choice
choice
)
{
List
<
BGArea
>
selValues
=
new
ArrayList
<
BGArea
>();
List
<
Integer
>
selRowsIndexes
=
choice
.
getSelectedRows
();
int
numRows
=
choice
.
getTableDataModel
().
getRowCount
();
for
(
int
i
=
0
;
i
<
numRows
;
i
++)
{
...
...
@@ -376,11 +376,38 @@ public class MemberListWizardController extends BasicController {
boolean
booleanValue
=
((
Boolean
)
choice
.
getTableDataModel
().
getValueAt
(
i
,
0
)).
booleanValue
();
if
(
booleanValue
)
{
ObjectWrapper
objWrapper
=
(
ObjectWrapper
)
choice
.
getTableDataModel
().
getValueAt
(
i
,
1
);
selValues
.
add
(
objWrapper
.
getWrappedObj
());
if
(
objWrapper
.
getWrappedObj
()
instanceof
BGArea
)
{
selValues
.
add
((
BGArea
)
objWrapper
.
getWrappedObj
());
}
}
}
else
if
(
selRowsIndexes
.
contains
(
new
Integer
(
i
)))
{
ObjectWrapper
objWrapper
=
(
ObjectWrapper
)
choice
.
getTableDataModel
().
getValueAt
(
i
,
1
);
selValues
.
add
(
objWrapper
.
getWrappedObj
());
if
(
objWrapper
.
getWrappedObj
()
instanceof
BGArea
)
{
selValues
.
add
((
BGArea
)
objWrapper
.
getWrappedObj
());
}
}
}
return
selValues
;
}
private
List
<
BusinessGroup
>
getSelectedGroups
(
Choice
choice
)
{
List
<
BusinessGroup
>
selValues
=
new
ArrayList
<
BusinessGroup
>();
List
<
Integer
>
selRowsIndexes
=
choice
.
getSelectedRows
();
int
numRows
=
choice
.
getTableDataModel
().
getRowCount
();
for
(
int
i
=
0
;
i
<
numRows
;
i
++)
{
if
(
selRowsIndexes
.
size
()
==
0
)
{
boolean
booleanValue
=
((
Boolean
)
choice
.
getTableDataModel
().
getValueAt
(
i
,
0
)).
booleanValue
();
if
(
booleanValue
)
{
ObjectWrapper
objWrapper
=
(
ObjectWrapper
)
choice
.
getTableDataModel
().
getValueAt
(
i
,
1
);
if
(
objWrapper
.
getWrappedObj
()
instanceof
BusinessGroup
)
{
selValues
.
add
((
BusinessGroup
)
objWrapper
.
getWrappedObj
());
}
}
}
else
if
(
selRowsIndexes
.
contains
(
new
Integer
(
i
)))
{
ObjectWrapper
objWrapper
=
(
ObjectWrapper
)
choice
.
getTableDataModel
().
getValueAt
(
i
,
1
);
if
(
objWrapper
.
getWrappedObj
()
instanceof
BusinessGroup
)
{
selValues
.
add
((
BusinessGroup
)
objWrapper
.
getWrappedObj
());
}
}
}
return
selValues
;
...
...
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