Examples of ItemSearch


Examples of info.jtrac.domain.ItemSearch

    private ItemSearch itemSearch;
    private boolean expandAll;
   
    public ItemSearchFormPanel(String id, User user) {
        super(id);
        this.itemSearch = new ItemSearch(user);
        addComponents();
    }
View Full Code Here

Examples of info.jtrac.domain.ItemSearch

   
    public ItemSearchFormPanel(String id) {
        super(id);
        Space s = getCurrentSpace();
        if(s != null) {
            this.itemSearch = new ItemSearch(s);
        } else {
            this.itemSearch = new ItemSearch(getPrincipal());
        }
        addComponents();
    }
View Full Code Here

Examples of info.jtrac.domain.ItemSearch

        itemId = item.getId(); // required for itemRelatePanel
        addComponents(item);
   
   
    private void addComponents(final Item item) { 
        final ItemSearch itemSearch = JtracSession.get().getItemSearch();
        add(new ItemRelatePanel("relate", true, itemSearch));       
        Link link = new Link("back") {
            public void onClick() {
                itemSearch.setSelectedItemId(item.getId());
                if(itemSearch.getRefId() != null) {
                     // user had entered item id directly, go back to search page
                     setResponsePage(new ItemSearchFormPage(itemSearch));
                } else {
                     setResponsePage(new ItemListPage(itemSearch));
                }
            }
        };
        if(itemSearch == null) {
            link.setVisible(false);
        }
       
        add(link);
       
        boolean isRelate = itemSearch != null && itemSearch.getRelatingItemRefId() != null;
       
        User user = getPrincipal();
       
        if(!user.isAllocatedToSpace(item.getSpace().getId())) {
            logger.debug("user is not allocated to space");
View Full Code Here

Examples of info.jtrac.domain.ItemSearch

                });

                if(user.getId() > 0) {           
                    total.add(new Link("loggedByMe") {
                        public void onClick() {                           
                            ItemSearch itemSearch = new ItemSearch(user);
                            itemSearch.setLoggedBy(user);                           
                            setResponsePage(ItemListPage.class, itemSearch.getAsQueryString());
                        }
                    }.add(new Label("loggedByMe", new PropertyModel(countsHolder, "totalLoggedByMe"))));

                    total.add(new Link("assignedToMe") {
                        public void onClick() {                           
                            ItemSearch itemSearch = new ItemSearch(user);
                            itemSearch.setAssignedTo(user);                           
                            setResponsePage(ItemListPage.class, itemSearch.getAsQueryString());
                        }
                    }.add(new Label("assignedToMe", new PropertyModel(countsHolder, "totalAssignedToMe"))));
                } else {
                    total.add(new WebMarkupContainer("loggedByMe").setVisible(false));
                    total.add(new WebMarkupContainer("assignedToMe").setVisible(false));
                }

                total.add(new Link("total") {
                    public void onClick() {                       
                        ItemSearch itemSearch = new ItemSearch(user);                       
                        setResponsePage(ItemListPage.class, itemSearch.getAsQueryString());
                    }
                }.add(new Label("total", new PropertyModel(countsHolder, "totalTotal"))));

            } else {            
                total.setVisible(false);
View Full Code Here

Examples of info.jtrac.domain.ItemSearch

        }

        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);
                    // setCurrentItemSearch(itemSearch);
                    setResponsePage(ItemListPage.class, itemSearch.getAsQueryString());                   
                }
            }.add(new Label("loggedByMe", new PropertyModel(counts, "loggedByMe"))));       


            add(new Link("assignedToMe") {
                public void onClick() {
                    setCurrentSpace(space);
                    ItemSearch itemSearch = new ItemSearch(space);
                    itemSearch.setAssignedTo(user);
                    // setCurrentItemSearch(itemSearch);
                    setResponsePage(ItemListPage.class, itemSearch.getAsQueryString());                   
                }
            }.add(new Label("assignedToMe", new PropertyModel(counts, "assignedToMe"))));
        } else {
            add(new WebMarkupContainer("loggedByMe").setVisible(false));
            add(new WebMarkupContainer("assignedToMe").setVisible(false));           
        }
       
        add(new Link("total") {
            public void onClick() {
                setCurrentSpace(space);
                ItemSearch itemSearch = new ItemSearch(space);
                // setCurrentItemSearch(itemSearch);
                setResponsePage(ItemListPage.class, itemSearch.getAsQueryString());               
            }
        }.add(new Label("total", new PropertyModel(counts, "total"))));
     
    }
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.