Package org.apache.tapestry.vlib

Examples of org.apache.tapestry.vlib.Visit


        String email = person.getEmail();

        // Get the visit object; this will likely force the
        // creation of the visit object and an HttpSession.

        Visit visit = (Visit) getVisit();
        visit.setUser(person);

        // After logging in, go to the MyLibrary page, unless otherwise
        // specified.

        ICallback callback = getCallback();
View Full Code Here


    }

    private IPropertySelectionModel buildPersonModel()
    {
        VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
        Visit visit = (Visit) vengine.getVisit();
        Integer userPK = visit.getUserId();

        Person[] persons = null;

        int i = 0;
        while (true)
View Full Code Here

    }

    private IPropertySelectionModel buildBooksModel()
    {
        VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
        Visit visit = (Visit) vengine.getVisit();
        Integer userPK = visit.getUserId();
        Book[] books = null;

        int i = 0;
        while (true)
        {
View Full Code Here

        runQuery();
    }

    private void runQuery()
    {
        Visit visit = (Visit) getVisit();
        Integer userId = visit.getUserId();

        VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();

        SortOrdering ordering = new SortOrdering(getSortColumn(), isDescending());
View Full Code Here

    }

    private void setupListEditMap()
    {
        VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
        Visit visit = (Visit) vengine.getVisit();

        Integer userId = visit.getUserId();
        Person[] users = null;

        int i = 0;
        while (true)
        {
View Full Code Here

    public void updateUsers(IRequestCycle cycle)
    {
        if (isInError())
            return;

        Visit visit = (Visit) getVisit();
        VirtualLibraryEngine vengine = (VirtualLibraryEngine) cycle.getEngine();

        UserListEditMap map = getListEditMap();

        List updatedUsers = map.getValues();

        Person[] updates = (Person[]) updatedUsers.toArray(new Person[updatedUsers.size()]);

        Integer[] resetPasswordUserIds = toArray(map.getResetPasswordKeys());
        Integer[] deletedUserIds = toArray(map.getDeletedKeys());

        String password = getPassword();
        setPassword(null);

        if (Tapestry.isBlank(password) && Tapestry.size(resetPasswordUserIds) != 0)
        {
            setErrorField("inputPassword", getMessage("need-password"));
            return;
        }

        Integer adminId = visit.getUserId();

        int i = 0;
        while (true)
        {
            try
View Full Code Here

     * {@link org.apache.tapestry.valid.ValidField} components.
     */

    public void activate(IRequestCycle cycle)
    {
        Visit visit = (Visit) getVisit();
        VirtualLibraryEngine vengine = (VirtualLibraryEngine) cycle.getEngine();

        Integer userId = visit.getUserId();
        Map attributes = null;

        int i = 0;
        while (true)
        {
View Full Code Here

            }

            attributes.put("password", password1);
        }

        Visit visit = (Visit) getVisit();
        VirtualLibraryEngine vengine = (VirtualLibraryEngine) cycle.getEngine();
        Integer userId = visit.getUserId();

        int i = 0;
        while (true)
        {
            try
View Full Code Here

        return WINDOW_TITLE + ": " + subtitle;
    }

    public boolean isLoggedIn()
    {
        Visit visit = getVisit();

        if (visit == null)
            return false;

        return visit.isUserLoggedIn();
    }
View Full Code Here

        return visit.isUserLoggedIn();
    }

    public boolean isAdmin()
    {
        Visit visit = getVisit();

        IRequestCycle cycle = getPage().getRequestCycle();

        return visit.isUserLoggedIn() && visit.getUser(cycle).isAdmin();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.vlib.Visit

Copyright © 2018 www.massapicom. 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.