Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHOReVOLUTION
syncope
Commits
8936b9db
Commit
8936b9db
authored
Jun 07, 2017
by
Gianluca Filippone
Browse files
Refactoring EE edit panel
parent
95e9c93f
Changes
4
Hide whitespace changes
Inline
Side-by-side
ext/ee/client-console/src/main/java/org/apache/syncope/client/console/panels/AbstractEnactmentEngineModalPanel.java
View file @
8936b9db
...
...
@@ -16,6 +16,7 @@
package
org.apache.syncope.client.console.panels
;
import
java.io.Serializable
;
import
org.apache.syncope.client.console.rest.EnactmentEngineRestClient
;
import
org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal
;
import
org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel
;
import
org.apache.syncope.client.console.wicket.markup.html.form.EncryptedFieldPanel
;
...
...
@@ -29,6 +30,8 @@ public abstract class AbstractEnactmentEngineModalPanel extends AbstractModalPan
private
static
final
long
serialVersionUID
=
1570261203472359825L
;
protected
final
EnactmentEngineRestClient
restClient
;
protected
final
FieldPanel
<
String
>
nameInput
;
protected
final
FieldPanel
<
String
>
usernameInput
;
...
...
@@ -42,6 +45,8 @@ public abstract class AbstractEnactmentEngineModalPanel extends AbstractModalPan
final
PageReference
pageRef
)
{
super
(
modal
,
pageRef
);
this
.
restClient
=
new
EnactmentEngineRestClient
();
final
WebMarkupContainer
container
=
new
WebMarkupContainer
(
"container"
);
container
.
setOutputMarkupId
(
true
);
add
(
container
);
...
...
ext/ee/client-console/src/main/java/org/apache/syncope/client/console/panels/AddEnactmentEngineModalPanel.java
View file @
8936b9db
...
...
@@ -22,7 +22,6 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import
org.apache.syncope.client.console.commons.Constants
;
import
org.apache.syncope.client.console.pages.BasePage
;
import
static
org
.
apache
.
syncope
.
client
.
console
.
panels
.
AbstractModalPanel
.
LOG
;
import
org.apache.syncope.client.console.rest.EnactmentEngineRestClient
;
import
org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal
;
import
org.apache.syncope.common.lib.SyncopeClientException
;
import
org.apache.wicket.PageReference
;
...
...
@@ -33,12 +32,8 @@ public class AddEnactmentEngineModalPanel extends AbstractEnactmentEngineModalPa
private
static
final
long
serialVersionUID
=
-
8997920710314548677L
;
private
final
EnactmentEngineRestClient
restClient
;
public
AddEnactmentEngineModalPanel
(
final
BaseModal
<
Serializable
>
modal
,
final
PageReference
pageRef
)
{
super
(
modal
,
pageRef
);
restClient
=
new
EnactmentEngineRestClient
();
}
@Override
...
...
ext/ee/client-console/src/main/java/org/apache/syncope/client/console/panels/EditEnactmentEngineModalPanel.java
View file @
8936b9db
...
...
@@ -22,7 +22,6 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import
org.apache.syncope.client.console.commons.Constants
;
import
org.apache.syncope.client.console.pages.BasePage
;
import
static
org
.
apache
.
syncope
.
client
.
console
.
panels
.
AbstractModalPanel
.
LOG
;
import
org.apache.syncope.client.console.rest.EnactmentEngineRestClient
;
import
org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal
;
import
org.apache.syncope.common.lib.SyncopeClientException
;
import
org.apache.syncope.common.lib.to.AnyObjectTO
;
...
...
@@ -36,15 +35,13 @@ public class EditEnactmentEngineModalPanel extends AbstractEnactmentEngineModalP
private
final
AnyObjectTO
enactmentEngine
;
private
final
EnactmentEngineRestClient
restClient
;
public
EditEnactmentEngineModalPanel
(
final
BaseModal
<
Serializable
>
modal
,
final
PageReference
pageRef
,
final
AnyObjectTO
enactmentEngine
)
{
super
(
modal
,
pageRef
);
this
.
enactmentEngine
=
enactmentEngine
;
this
.
restClient
=
new
EnactmentEngineRestClient
();
nameInput
.
setModelObject
(
enactmentEngine
.
getName
());
urlInput
.
setModelObject
(
enactmentEngine
.
getPlainAttrMap
()
...
...
ext/ee/client-console/src/main/java/org/apache/syncope/client/console/panels/EnactmentEngineDirectoryPanel.java
View file @
8936b9db
...
...
@@ -53,7 +53,7 @@ public class EnactmentEngineDirectoryPanel extends AnyObjectDirectoryPanel {
private
static
final
long
serialVersionUID
=
7303610381539502741L
;
private
final
BaseModal
<
Serializable
>
utilityM
odal
=
new
BaseModal
<>(
"outer"
);
private
final
BaseModal
<
Serializable
>
m
odal
=
new
BaseModal
<>(
"outer"
);
private
final
EnactmentEngineRestClient
enactmentEngineRestClient
;
...
...
@@ -62,15 +62,18 @@ public class EnactmentEngineDirectoryPanel extends AnyObjectDirectoryPanel {
this
.
enactmentEngineRestClient
=
new
EnactmentEngineRestClient
();
utilityModal
.
addSubmitButton
();
utilityModal
.
size
(
Modal
.
Size
.
Medium
);
addOuterObject
(
utilityModal
);
modal
.
addSubmitButton
();
modal
.
size
(
Modal
.
Size
.
Medium
);
addOuterObject
(
modal
);
modal
.
setWindowClosedCallback
(
new
ModalWindow
.
WindowClosedCallback
()
{
private
static
final
long
serialVersionUID
=
8804221891699487139L
;
utilityModal
.
setWindowClosedCallback
(
new
ModalWindow
.
WindowClosedCallback
()
{
@Override
public
void
onClose
(
final
AjaxRequestTarget
target
)
{
target
.
add
(
container
);
utilityM
odal
.
show
(
false
);
m
odal
.
show
(
false
);
}
});
}
...
...
@@ -94,6 +97,9 @@ public class EnactmentEngineDirectoryPanel extends AnyObjectDirectoryPanel {
addPropertyColumn
(
"name"
,
ReflectionUtils
.
findField
(
AnyObjectTO
.
class
,
"name"
),
columns
);
columns
.
add
(
new
AbstractColumn
<
AnyObjectTO
,
String
>(
new
ResourceModel
(
""
,
"Base URL"
))
{
private
static
final
long
serialVersionUID
=
2054811145491901166L
;
@Override
public
void
populateItem
(
final
Item
<
ICellPopulator
<
AnyObjectTO
>>
item
,
...
...
@@ -140,11 +146,11 @@ public class EnactmentEngineDirectoryPanel extends AnyObjectDirectoryPanel {
@Override
public
void
onClick
(
final
AjaxRequestTarget
target
)
{
utilityM
odal
.
header
(
Model
.
of
(
"Edit Enactment Engine"
));
utilityM
odal
.
setContent
(
new
EditEnactmentEngineModalPanel
(
utilityM
odal
,
pageRef
,
model
.
getObject
()));
utilityM
odal
.
show
(
true
);
target
.
add
(
utilityM
odal
);
m
odal
.
header
(
Model
.
of
(
"Edit Enactment Engine"
));
m
odal
.
setContent
(
new
EditEnactmentEngineModalPanel
(
m
odal
,
pageRef
,
model
.
getObject
()));
m
odal
.
show
(
true
);
target
.
add
(
m
odal
);
}
},
ChoreographyActionsPanel
.
ChoreographyActionType
.
EDIT
);
choreographyActionsPanel
.
addAction
(
new
IndicatingAjaxLink
<
Void
>(
"link"
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment