enhancements
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@92634 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cca67dd50e
commit
8c5db2fae4
|
@ -10,7 +10,6 @@ import org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSha
|
|||
import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.SmartShare;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.FileModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.extjs.gxt.ui.client.event.BaseEvent;
|
||||
import com.extjs.gxt.ui.client.event.Events;
|
||||
|
@ -59,22 +58,22 @@ public class WorkspaceSmartSharingController {
|
|||
@Override
|
||||
public void handleEvent(BaseEvent be) {
|
||||
|
||||
if(smartShare.isValidForm(true)){
|
||||
//THAT'S OK
|
||||
|
||||
smartShare.getSharedListUsers(); //@return the selected contacts (as InfoContactModel)
|
||||
|
||||
smartShare.getSharedListUsersCredential(); //@return tthe selected contacts (as CredentialModel)
|
||||
|
||||
for (InfoContactModel contact : smartShare.getSharedListUsers()) {
|
||||
System.out.println(contact);
|
||||
}
|
||||
|
||||
for (CredentialModel credential : smartShare.getSharedListUsersCredential()) {
|
||||
System.out.println(credential);
|
||||
}
|
||||
|
||||
}
|
||||
// if(smartShare.isValidForm(true)){
|
||||
// //THAT'S OK
|
||||
//
|
||||
// smartShare.getSharedListUsers(); //@return the selected contacts (as InfoContactModel)
|
||||
//
|
||||
// smartShare.getSharedListUsersCredential(); //@return tthe selected contacts (as CredentialModel)
|
||||
//
|
||||
// for (InfoContactModel contact : smartShare.getSharedListUsers()) {
|
||||
// System.out.println(contact);
|
||||
// }
|
||||
//
|
||||
// for (CredentialModel credential : smartShare.getSharedListUsersCredential()) {
|
||||
// System.out.println(credential);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -98,7 +97,7 @@ public class WorkspaceSmartSharingController {
|
|||
*
|
||||
* @return gxt 2.2.5 Dialog
|
||||
*/
|
||||
public Dialog getSharingDialog() {
|
||||
public SmartShare getSharingDialog() {
|
||||
return smartShare;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Mar 4, 2014
|
||||
*
|
||||
*/
|
||||
public interface SmartDialogInterface {
|
||||
|
||||
List<InfoContactModel> getSharedListUsers();
|
||||
List<CredentialModel> getSharedListUsersCredential();
|
||||
boolean isValidForm(boolean displayAlert);
|
||||
}
|
|
@ -36,7 +36,7 @@ import com.google.gwt.user.client.ui.Label;
|
|||
* @Mar 3, 2014
|
||||
*
|
||||
*/
|
||||
public class SmartShare extends Dialog{
|
||||
public class SmartShare extends Dialog implements SmartDialogInterface{
|
||||
|
||||
private TextField<String> txtName;
|
||||
private FileModel fileToShare = null;
|
||||
|
|
Loading…
Reference in New Issue