syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1441361 - in /syncope/trunk/console/src/main: java/org/apache/syncope/console/pages/ java/org/apache/syncope/console/pages/panels/ java/org/apache/syncope/console/rest/ resources/org/apache/syncope/console/pages/
Date Fri, 01 Feb 2013 09:35:21 GMT
Author: ilgrosso
Date: Fri Feb  1 09:35:21 2013
New Revision: 1441361

URL: http://svn.apache.org/viewvc?rev=1441361&view=rev
Log:
[SYNCOPE-294] UserTO re-read from REST before opening the edit modal page

Modified:
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1441361&r1=1441360&r2=1441361&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
Fri Feb  1 09:35:21 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.syncope.console.pages;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.syncope.common.to.MappingItemTO;
 import org.apache.syncope.common.to.ResourceTO;
 import org.apache.syncope.common.types.AttributableType;
@@ -32,8 +33,10 @@ import org.apache.wicket.ajax.markup.htm
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.Model;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 
@@ -52,6 +55,14 @@ public class ResourceModalPage extends B
 
         super();
 
+        this.add(new Label("new", StringUtils.isBlank(resourceTO.getName())
+                ? new ResourceModel("new")
+                : new Model("")));
+
+        this.add(new Label("name", StringUtils.isBlank(resourceTO.getName())
+                ? ""
+                : resourceTO.getName()));
+
         final Form form = new Form("form");
         form.setModel(new CompoundPropertyModel(resourceTO));
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java?rev=1441361&r1=1441360&r2=1441361&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
Fri Feb  1 09:35:21 2013
@@ -33,6 +33,7 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.ResultStatusModalPage;
 import org.apache.syncope.console.pages.StatusModalPage;
 import org.apache.syncope.console.rest.AbstractAttributableRestClient;
+import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
@@ -147,14 +148,15 @@ public class UserSearchResultPanel exten
 
                             @Override
                             public Page createPage() {
-                                return new EditUserModalPage(
-                                        page.getPageReference(), editmodal, (UserTO) model.getObject());
+                                // SYNCOPE-294: re-read userTO before edit
+                                UserTO userTO = ((UserRestClient) restClient).read(model.getObject().getId());
+                                return new EditUserModalPage(page.getPageReference(), editmodal,
userTO);
                             }
                         });
 
                         editmodal.show(target);
                     }
-                }, ActionLink.ActionType.EDIT, "Users", "update");
+                }, ActionLink.ActionType.EDIT, "Users", "read");
 
                 panel.add(new ActionLink() {
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java?rev=1441361&r1=1441360&r2=1441361&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java
Fri Feb  1 09:35:21 2013
@@ -19,7 +19,6 @@
 package org.apache.syncope.console.rest;
 
 import java.util.List;
-
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.common.to.AbstractAttributableTO;
 import org.apache.syncope.common.to.ConnObjectTO;

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html?rev=1441361&r1=1441360&r2=1441361&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html
(original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html
Fri Feb  1 09:35:21 2013
@@ -44,7 +44,10 @@ under the License.
 </wicket:head>
 <wicket:extend>
   <div style="margin:10px">
-    <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+    <p class="ui-widget ui-corner-all ui-widget-header">
+      <span wicket:id="new"/>&nbsp;<wicket:message key="title"/>&nbsp;<span
wicket:id="name"/>
+    </p>
+
     <form wicket:id="form">
       <div id="tabs">
         <ul>

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties?rev=1441361&r1=1441360&r2=1441361&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties
(original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties
Fri Feb  1 09:35:21 2013
@@ -57,3 +57,4 @@ error_connection=Connection failure
 check=Check connection
 actionsClass=Actions class
 rmapping=Role mapping
+new=New

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties?rev=1441361&r1=1441360&r2=1441361&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties
(original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties
Fri Feb  1 09:35:21 2013
@@ -58,3 +58,4 @@ error_connection=Connessione non riuscit
 check=Verifica connessione
 actionsClass=Classe azioni
 rmapping=Mapping ruoli
+new=Nuova



Mime
View raw message