Package org.apache.tapestry.vlib

Examples of org.apache.tapestry.vlib.Visit


    }

    public boolean isAdmin()
    {
        IEngine engine = getPage().getEngine();
        Visit visit = (Visit) engine.getVisit();

        if (visit == null)
            return false;

        IRequestCycle cycle = getPage().getRequestCycle();

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


        page.activate(cycle);
    }

    public void login(IRequestCycle cycle)
    {
        Visit visit = (Visit) cycle.getEngine().getVisit();

        if (visit != null && visit.isUserLoggedIn())
            return;

        ICallback callback = new PageCallback(getPage().getPageName());
        Login loginPage = (Login) cycle.getPage("Login");
        loginPage.setCallback(callback);
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

        }

        if (isInError())
            return;

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

        attributes.put("ownerId", userId);
        attributes.put("holderId", userId);
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[] updatedUserIds = (Person[]) updatedUsers.toArray(new Person[updatedUsers.size()]);

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

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

        if (Tapestry.isNull(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

     *
     **/

    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

        _userConverter = null;
    }

    private void readUsers()
    {
        Visit visit = getVisitState();

        Integer userId = visit.getUserId();

        RemoteCallback<Person[]> callback = new RemoteCallback()
        {

            public Person[] doRemote()
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.