Package com.webobjects.directtoweb

Examples of com.webobjects.directtoweb.EditPageInterface


        EOEnterpriseObject localObject = localInstanceOfObject();
        String configuration = (String)valueForBinding(Keys.editConfigurationName);
        if(log.isDebugEnabled()){
           log.debug("configuration = "+configuration);
        }
        EditPageInterface epi = (EditPageInterface)D2W.factory().pageForConfigurationNamed(configuration, session());
        epi.setObject(localObject);
        epi.setNextPage(context().page());
        localObject.editingContext().hasChanges(); // Ensuring it survives.
        return (WOComponent)epi;
    }
View Full Code Here


      }
        return nextPage;
    }

    public EditPageInterface editPageNamed(String pageConfiguration, EOEnterpriseObject eo) {
        EditPageInterface epi = (EditPageInterface) inspectPageNamed(pageConfiguration, eo);
        epi.setObject(eo);
        return epi;
    }
View Full Code Here

        epi.setObject(eo);
        return epi;
    }

    protected InspectPageInterface createPageNamed(String name) {
        EditPageInterface epi = editPageForNewObjectWithConfigurationNamed(name, session());
        epi.setNextPage(homePage());
        return epi;
    }
View Full Code Here

        return page;
    }
   
    public WOComponent createBugFromTestItem(TestItem testItem) {
        EOEditingContext peer = ERXEC.newEditingContext(testItem.editingContext().parentObjectStore());
        EditPageInterface epi = null;
        peer.lock();
        try {
            testItem = (TestItem) testItem.localInstanceIn(peer);
            People user = People.clazz.currentUser(peer);
            Component component = testItem.component();

            Bug bug = Bug.clazz.createAndInsertObject(peer);
            testItem.setState(TestItemState.BUG);

            bug.setTextDescription("[From Test #" + testItem.primaryKey()+"]");
            bug.addToTestItems(testItem);
            bug.setOriginator(user);
            bug.setComponent(component);

            epi=(EditPageInterface)createPageNamed("CreateBugFromTestItem");
            epi.setObject(bug);
            epi.setNextPage(session().context().page());
        } finally {
            peer.unlock();
        }
         return (WOComponent)epi;       
    }
View Full Code Here

            TestItem testItem = TestItem.clazz.createAndInsertObject(peer);
            testItem.setComponent(bug.component());
            String description = ERXLocalizer.currentLocalizer().localizedTemplateStringForKeyWithObject("CreateTestItemFrom"+bug.entityName()+".templateString", bug);
            testItem.setTextDescription(description);
            bug.addToTestItems(testItem);
            EditPageInterface epi=(EditPageInterface)createPageNamed("CreateTestItemFrom" + bug.entityName() );
            epi.setObject(testItem);
            epi.setNextPage(session().context().page());
            return (WOComponent)epi;
        } finally {
            peer.unlock();
        }
    }
View Full Code Here

        return page;
    }


    public WOComponent editBug(Bug bug) {
        EditPageInterface epi = editPageNamed("Edit" + bug.entityName(), bug);
        epi.setNextPage(homePage());
        return (WOComponent)epi;
    }
View Full Code Here

    }
   

    public WOComponent resolveBug(Bug bug) {
        EOEditingContext peer = ERXEC.newEditingContext(bug.editingContext().parentObjectStore());
        EditPageInterface epi = null;
        peer.lock();
        try {
            bug = (Bug) bug.localInstanceIn(peer);
            bug.close();
            epi=editPageNamed("Edit" +bug.entityName()+ "ToClose", bug);
            epi.setObject(bug);
            epi.setNextPage(currentPage());
        } finally {
            peer.unlock();
        }

        return (WOComponent)epi;
View Full Code Here

        return (WOComponent)epi;
    }

    public WOComponent commentBug(Bug bug) {
        EOEditingContext peer = ERXEC.newEditingContext(bug.editingContext().parentObjectStore());
        EditPageInterface epi = null;
        peer.lock();
        try {
            bug = (Bug) bug.localInstanceIn(peer);
            epi=editPageNamed("Edit" +bug.entityName()+ "ToComment", bug);
            epi.setObject(bug);
            epi.setNextPage(currentPage());
        } finally {
            peer.unlock();
        }

        return (WOComponent)epi;
View Full Code Here

        return (WOComponent)epi;
    }

    public WOComponent reopenBug(Bug bug) {
        EOEditingContext peer = ERXEC.newEditingContext(bug.editingContext().parentObjectStore());
        EditPageInterface epi = null;
        peer.lock();
        try {
            bug = (Bug) bug.localInstanceIn(peer);
            bug.reopen();
            epi=editPageNamed("Edit" +bug.entityName()+ "ToReopen", bug);
            epi.setObject(bug);
            epi.setNextPage(currentPage());
        } finally {
            peer.unlock();
        }

        return (WOComponent)epi;
View Full Code Here

    }


    public WOComponent rejectBug(Bug bug) {
        EOEditingContext peer = ERXEC.newEditingContext(bug.editingContext().parentObjectStore());
        EditPageInterface epi = null;
        peer.lock();
        try {
            bug = (Bug) bug.localInstanceIn(peer);
            bug.rejectVerification();
            epi=editPageNamed("Edit" +bug.entityName()+ "ToReject", bug);
            epi.setObject(bug);
            epi.setNextPage(currentPage());
        } finally {
            peer.unlock();
        }

        return (WOComponent)epi;
View Full Code Here

TOP

Related Classes of com.webobjects.directtoweb.EditPageInterface

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.