Package info.jtrac.domain

Examples of info.jtrac.domain.Space


       
        DropDownChoice columnChoice = new DropDownChoice("column");
        columnChoice.setChoices(new AbstractReadOnlyModel() {
            public Object getObject() {
                // avoid lazy init problem
                Space s = getJtrac().loadSpace(space.getId());
                List<ColumnHeading> list = ColumnHeading.getColumnHeadings(s);
                list.remove(new ColumnHeading(Name.ID));
                list.remove(new ColumnHeading(Name.SPACE));
                return list;
            }
View Full Code Here


*/
public class ItemSearchFormPage extends BasePage {
           
    public ItemSearchFormPage() {
        ItemSearch itemSearch = null;
        Space s = getCurrentSpace();
        if(s == null) {
            itemSearch = new ItemSearch(JtracSession.get().getUser());
        } else {
            itemSearch = new ItemSearch(s);
        }
View Full Code Here

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

        if(ch.getFilterCriteria().getExpression() == null) {
            return new WebMarkupContainer("fragParent");
        }       
        User user = JtracSession.get().getUser();
        // the space could be null also
        Space space = JtracSession.get().getCurrentSpace();
        Jtrac jtrac = JtracApplication.get().getJtrac();
        return ch.getFilterUiFragment(this, user, space, jtrac);
    }
View Full Code Here

    public void setPrevious(WebPage previous) {
        this.previous = previous;
    }   
   
    public SpaceFormPage() { 
        Space space = new Space();   
        space.getMetadata().initRoles();
        add(new SpaceForm("form", space));
    }   
View Full Code Here

            });           
            // validation: does space already exist with same prefixCode ?
            prefixCode.add(new AbstractValidator() {
                protected void onValidate(IValidatable v) {
                    String s = (String) v.getValue();
                    Space temp = getJtrac().loadSpace(s);
                    if(temp != null && temp.getId() != space.getId()) {
                        error(v);
                    }
                }
                @Override
                protected String resourceKey() {                   
View Full Code Here

        }       
       
        @Override
        protected void onSubmit() {
            if(copyFrom != null) {
                Space temp = getJtrac().loadSpace(copyFrom.getId());
                space.getMetadata().setXmlString(temp.getMetadata().getXmlString());
            }
            setResponsePage(new SpaceFieldListPage(space, null, previous));
        }       
View Full Code Here

        List<Space> spaces = getJtrac().findAllSpaces();       
        DropDownChoice spaceChoice = new DropDownChoice("space", spaces);
        spaceChoice.setModel(new PropertyModel(this, "space"));
        spaceChoice.setChoiceRenderer(new IChoiceRenderer() {
            public Object getDisplayValue(Object o) {
                Space s = (Space) o;
                return s.getName() + " [" + s.getPrefixCode() + "]";
            }
            public String getIdValue(Object o, int i) {
                return ((Space) o).getId() + "";
            }
        });
View Full Code Here

    public DashboardRowPanel(String id, final UserSpaceRole usr, final Counts counts) {
       
        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);
View Full Code Here

TOP

Related Classes of info.jtrac.domain.Space

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.