Search in sources :

Example 1 with FindUsersByIdsNotInRpc

use of cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc in project perun by CESNET.

the class AddGroupManagerTabItem method startSearching.

/**
	 * Starts the search for users
	 */
protected void startSearching(String text) {
    users.clearTable();
    // IS searched string IDs?
    if (JsonUtils.isStringWithIds(text)) {
        FindUsersByIdsNotInRpc req = new FindUsersByIdsNotInRpc(new JsonCallbackEvents() {

            @Override
            public void onFinished(JavaScriptObject jso) {
                ArrayList<User> usersList = JsonUtils.jsoAsList(jso);
                for (User u : usersList) {
                    users.addToTable(u);
                }
            }
        }, text);
        req.retrieveData();
        return;
    }
    users.searchFor(text);
}
Also used : JsonCallbackEvents(cz.metacentrum.perun.webgui.json.JsonCallbackEvents) User(cz.metacentrum.perun.webgui.model.User) JavaScriptObject(com.google.gwt.core.client.JavaScriptObject) ArrayList(java.util.ArrayList) FindUsersByIdsNotInRpc(cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc)

Example 2 with FindUsersByIdsNotInRpc

use of cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc in project perun by CESNET.

the class AddVoManagerTabItem method startSearching.

/**
	 * Starts the search for users
	 */
protected void startSearching(String text) {
    users.clearTable();
    // IS searched string IDs?
    if (JsonUtils.isStringWithIds(text)) {
        FindUsersByIdsNotInRpc req = new FindUsersByIdsNotInRpc(new JsonCallbackEvents() {

            @Override
            public void onFinished(JavaScriptObject jso) {
                ArrayList<User> usersList = JsonUtils.jsoAsList(jso);
                for (User u : usersList) {
                    users.addToTable(u);
                }
            }
        }, text);
        req.retrieveData();
        return;
    }
    users.searchFor(text);
}
Also used : JsonCallbackEvents(cz.metacentrum.perun.webgui.json.JsonCallbackEvents) User(cz.metacentrum.perun.webgui.model.User) JavaScriptObject(com.google.gwt.core.client.JavaScriptObject) ArrayList(java.util.ArrayList) FindUsersByIdsNotInRpc(cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc)

Example 3 with FindUsersByIdsNotInRpc

use of cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc in project perun by CESNET.

the class AddFacilityManagerTabItem method startSearching.

/**
	 * Starts the search for users
	 */
protected void startSearching(String text) {
    users.clearTable();
    // IS searched string IDs?
    if (JsonUtils.isStringWithIds(text)) {
        FindUsersByIdsNotInRpc req = new FindUsersByIdsNotInRpc(new JsonCallbackEvents() {

            @Override
            public void onFinished(JavaScriptObject jso) {
                ArrayList<User> usersList = JsonUtils.jsoAsList(jso);
                for (User u : usersList) {
                    users.addToTable(u);
                }
            }
        }, text);
        req.retrieveData();
        return;
    }
    users.searchFor(text);
}
Also used : JsonCallbackEvents(cz.metacentrum.perun.webgui.json.JsonCallbackEvents) User(cz.metacentrum.perun.webgui.model.User) JavaScriptObject(com.google.gwt.core.client.JavaScriptObject) ArrayList(java.util.ArrayList) FindUsersByIdsNotInRpc(cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc)

Example 4 with FindUsersByIdsNotInRpc

use of cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc in project perun by CESNET.

the class AddUserToBlacklistTabItem method startSearching.

/**
 * Starts the search for users
 */
protected void startSearching(String text) {
    users.clearTable();
    // IS searched string IDs?
    if (JsonUtils.isStringWithIds(text)) {
        FindUsersByIdsNotInRpc req = new FindUsersByIdsNotInRpc(new JsonCallbackEvents() {

            @Override
            public void onFinished(JavaScriptObject jso) {
                ArrayList<User> usersList = JsonUtils.jsoAsList(jso);
                for (User u : usersList) {
                    users.addToTable(u);
                }
            }
        }, text);
        req.retrieveData();
        return;
    }
    users.searchFor(text);
}
Also used : JsonCallbackEvents(cz.metacentrum.perun.webgui.json.JsonCallbackEvents) User(cz.metacentrum.perun.webgui.model.User) JavaScriptObject(com.google.gwt.core.client.JavaScriptObject) ArrayList(java.util.ArrayList) FindUsersByIdsNotInRpc(cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc)

Example 5 with FindUsersByIdsNotInRpc

use of cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc in project perun by CESNET.

the class AddSecurityTeamManagerTabItem method startSearching.

/**
 * Starts the search for users
 */
protected void startSearching(String text) {
    users.clearTable();
    // IS searched string IDs?
    if (JsonUtils.isStringWithIds(text)) {
        FindUsersByIdsNotInRpc req = new FindUsersByIdsNotInRpc(new JsonCallbackEvents() {

            @Override
            public void onFinished(JavaScriptObject jso) {
                ArrayList<User> usersList = JsonUtils.jsoAsList(jso);
                for (User u : usersList) {
                    users.addToTable(u);
                }
            }
        }, text);
        req.retrieveData();
        return;
    }
    users.searchFor(text);
}
Also used : JsonCallbackEvents(cz.metacentrum.perun.webgui.json.JsonCallbackEvents) User(cz.metacentrum.perun.webgui.model.User) JavaScriptObject(com.google.gwt.core.client.JavaScriptObject) ArrayList(java.util.ArrayList) FindUsersByIdsNotInRpc(cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc)

Aggregations

JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)5 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)5 FindUsersByIdsNotInRpc (cz.metacentrum.perun.webgui.json.usersManager.FindUsersByIdsNotInRpc)5 User (cz.metacentrum.perun.webgui.model.User)5 ArrayList (java.util.ArrayList)5