String description = localizer.localizedTemplateStringForKeyWithObject("CreateTestItemFromReq.templateString", bug); TestItem testItem = user.createTestItemFromRequestWithDescription(bug, (Component)valueForKey("component"), description);  EditPageInterface epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("CreateNewTestItemFromReq",session()); epi.setObject(testItem); epi.setNextPage(context().page());
String description = localizer.localizedTemplateStringForKeyWithObject("CreateTestItemFromReq.templateString", bug); TestItem testItem = user.createTestItemFromRequestWithDescription(bug, (Component)valueForKey("component"), description); epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("CreateNewTestItemFromReq",session()); epi.setObject(testItem); epi.setNextPage(context().page()); } finally { peer.unlock(); }
    public WOComponent createTestItem() {        ERXLocalizer localizer = ERXLocalizer.localizerForSession(session());        EOEditingContext peer = new EOEditingContext(bug.editingContext().parentObjectStore());        People user = (People)EOUtilities.localInstanceOfObject(peer,((Session)session()).getUser());        String description = localizer.localizedTemplateStringForKeyWithObject("CreateTestItemFromReq.templateString", bug);        TestItem testItem = user.createTestItemFromRequestWithDescription(bug, (Component)valueForKey("component"), description);        EditPageInterface epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("CreateNewTestItemFromReq",session());        epi.setObject(testItem);        epi.setNextPage(context().page());        return (WOComponent)epi;    }