Package info.jtrac.domain

Examples of info.jtrac.domain.User


       
        super(id);
        setOutputMarkupId(true);
       
        final Space space = usr.getSpace();
        final User user = usr.getUser();
                           
        WebMarkupContainer spaceCell = new WebMarkupContainer("space");       
        add(spaceCell);

        spaceCell.add(new Label("name", space.getName()));
        spaceCell.add(new Label("prefixCode", space.getPrefixCode()));
       
        if(usr.isAbleToCreateNewItem()) {
            add(new Link("new") {
                public void onClick() {
                    setCurrentSpace(space);
                    setResponsePage(ItemFormPage.class);
                }
            });
        } else {
            add(new Label("new").setVisible(false));
        }

        add(new Link("search") {
            public void onClick() {
                setCurrentSpace(space);
                ItemSearch itemSearch = new ItemSearch(space);
                setResponsePage(ItemSearchFormPage.class, itemSearch.getAsQueryString());
            }
        });       
       
        add(new IndicatingAjaxLink("link") {
            public void onClick(AjaxRequestTarget target) {
                Counts tempCounts = counts;               
                // avoid hitting the database again if re-expanding
                if (!tempCounts.isDetailed()) {                   
                    tempCounts = getJtrac().loadCountsForUserSpace(user, space);                   
                }
                DashboardRowExpandedPanel dashboardRow = new DashboardRowExpandedPanel("dashboardRow", usr, tempCounts);
                DashboardRowPanel.this.replaceWith(dashboardRow);
                target.addComponent(dashboardRow);
            }
        });         
       
        if(user.getId() > 0) {       
            add(new Link("loggedByMe") {
                public void onClick() {
                    setCurrentSpace(space);
                    ItemSearch itemSearch = new ItemSearch(space);
                    itemSearch.setLoggedBy(user);
View Full Code Here

TOP

Related Classes of info.jtrac.domain.User

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.