syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreapatrice...@apache.org
Subject syncope git commit: [SYNCOPE-1373] cron expression is preserved while updating a scheduled task
Date Thu, 20 Sep 2018 10:41:04 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X 16938c73b -> 1e9a5387b


[SYNCOPE-1373] cron expression is preserved while updating a scheduled task


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1e9a5387
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1e9a5387
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1e9a5387

Branch: refs/heads/2_0_X
Commit: 1e9a5387b7080d7f47615fcaac3d3fe8694bc8fc
Parents: 16938c7
Author: Andrea Patricelli <andreapatricelli@apache.org>
Authored: Thu Sep 20 12:40:05 2018 +0200
Committer: Andrea Patricelli <andreapatricelli@apache.org>
Committed: Thu Sep 20 12:40:05 2018 +0200

----------------------------------------------------------------------
 .../client/console/tasks/CrontabPanel.java      | 24 ++++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/1e9a5387/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java
index 34b005c..9a11df1 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java
@@ -161,20 +161,20 @@ public class CrontabPanel extends Panel {
     public String getCronExpression() {
         String cronExpression = null;
 
-        if (seconds != null && seconds.getField().getInput() != null
-                && minutes != null && minutes.getField().getInput() != null
-                && hours != null && hours.getField().getInput() != null
-                && daysOfMonth != null && daysOfMonth.getField().getInput()
!= null
-                && months != null && months.getField().getInput() != null
-                && daysOfWeek != null && daysOfWeek.getField().getInput()
!= null) {
+        if (seconds != null && seconds.getModelObject() != null
+                && minutes != null && minutes.getModelObject() != null
+                && hours != null && hours.getModelObject() != null
+                && daysOfMonth != null && daysOfMonth.getModelObject() !=
null
+                && months != null && months.getModelObject() != null
+                && daysOfWeek != null && daysOfWeek.getModelObject() != null)
{
 
             cronExpression = new StringBuilder().
-                    append(seconds.getField().getInput().trim()).append(" ").
-                    append(minutes.getField().getInput().trim()).append(" ").
-                    append(hours.getField().getInput().trim()).append(" ").
-                    append(daysOfMonth.getField().getInput().trim()).append(" ").
-                    append(months.getField().getInput().trim()).append(" ").
-                    append(daysOfWeek.getField().getInput().trim()).toString();
+                    append(seconds.getField().getModelObject().trim()).append(" ").
+                    append(minutes.getField().getModelObject().trim()).append(" ").
+                    append(hours.getField().getModelObject().trim()).append(" ").
+                    append(daysOfMonth.getField().getModelObject().trim()).append(" ").
+                    append(months.getField().getModelObject().trim()).append(" ").
+                    append(daysOfWeek.getField().getModelObject().trim()).toString();
         }
 
         return StringUtils.isNotBlank(cronExpression) ? cronExpression : null;


Mime
View raw message