Examples of ErrorEvent


Examples of org.richfaces.photoalbum.model.event.ErrorEvent

        this.event = (Event) event.getDropValue();

        // check if the album is already shared
        if (this.event.getGooglePlusAlbumIds().contains(albumId)) {
            setAlbumAlreadyShared(true);
            error.fire(new ErrorEvent("This album is already shared in this event"));
            return;
        }

        String albumName = "";
        try {
            albumName = gpac.getAlbum(albumId).getString("name");
        } catch (JSONException e) {
            // nothing, the exception will not be thrown
        }

        for (Album album : this.event.getShelf().getAlbums()) {
            if (album.getName() == albumName) {
                setAlbumAlreadyShared(true);
                error.fire(new ErrorEvent("Album with this name has already been imported to this event"));
                return;
            }
        }

        setAlbumAlreadyShared(false);
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

        event.getRemoteAlbumIds().add("G" + albumId);

        try {
            ea.editEvent(event);
        } catch (PhotoAlbumException pae) {
            error.fire(new ErrorEvent("Error saving event", pae.getMessage()));
        }
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

    public void importAlbum() {
        try {
            fdm.setUpDownload(gpac.getAlbum(albumId).getString("name"), albumId, gpac.getImagesOfAlbum(albumId), event);
        } catch (JSONException je) {
            error.fire(new ErrorEvent("Error importing album", je.getMessage()));
        }

    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

        this.event = (Event) event.getDropValue();

        // check if the album is already shared
        if (this.event.getFacebookAlbumIds().contains(albumId)) {
            setAlbumAlreadyShared(true);
            error.fire(new ErrorEvent("This album is already shared in this event"));
            return;
        }

        String albumName = "";
        try {
            albumName = fac.getAlbum(albumId).getString("name");
        } catch (JSONException e) {
            // nothing, the exception will not be thrown
        }

        for (Album album : this.event.getShelf().getAlbums()) {
            if (album.getName() == albumName) {
                setAlbumAlreadyShared(true);
                error.fire(new ErrorEvent("Album with this name has already been imported to this event"));
                return;
            }
        }

        setAlbumAlreadyShared(false);
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

        event.getRemoteAlbumIds().add("F" + albumId);

        try {
            ea.editEvent(event);
        } catch (PhotoAlbumException pae) {
            error.fire(new ErrorEvent("Error saving event", pae.getMessage()));
        }
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

    public void importAlbum() {
        try {
            fdm.setUpDownload(fac.getAlbum(albumId).getString("name"), albumId, fac.getImageMap(albumId), event);
        } catch (JSONException je) {
            error.fire(new ErrorEvent("Error importing album", je.getMessage()));
        }

    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

                }
                images.put(albumId, null);
                albums.put(albumId, jo);
            }
        } catch (JSONException je) {
            error.fire(new ErrorEvent("Error", je.getMessage()));
        }
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

            storeAlbums(jo.getJSONArray("albums"), jo.getJSONArray("covers"));
            storeImagesToAlbum(jo.getJSONArray("images"));
            setNeedsUpdate(false);
        } catch (JSONException e) {
            error.fire(new ErrorEvent("Error: ", e.getMessage()));
        }
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.event.ErrorEvent

            for (int i = 0; i < size; i++) {
                jo = ja.getJSONObject(i);

                if (!jo.has("albumId") || !jo.has("id")) {
                    error.fire(new ErrorEvent("Error, object does not contain images"));

                }

                imageId = jo.getString("id");

                images.get(albumId).put(imageId, jo);
            }

            albums.get(albumId).put("size", images.get(albumId).size());
        } catch (JSONException je) {
            error.fire(new ErrorEvent("Error", je.getMessage()));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.