Author: vbriand Date: 2011-04-08 10:38:00 +0200 (Fri, 08 Apr 2011) New Revision: 66 Url: http://chorem.org/repositories/revision/chorem/66 Log: New method to get the quotations without project order Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectDetails.jsp Modified: trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-08 07:56:14 UTC (rev 65) +++ trunk/chorem-web/src/main/java/org/chorem/gepeto/action/ProjectAction.java 2011-04-08 08:38:00 UTC (rev 66) @@ -1,6 +1,7 @@ package org.chorem.gepeto.action; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.UUID; @@ -184,8 +185,13 @@ * @return the quotations without a project order */ public List<Quotation> getAttachedQuotationsWithoutProjectOrder() { - //TODO: implement - return null; + Collection<Quotation> allQuotations = new ArrayList<Quotation>(getAttachedQuotations()); + + //Gets all quotations and removes the ones with a project order + allQuotations.removeAll(getAttachedQuotationsWithProjectOrder()); + List<Quotation> withoutProjectOrder = (List<Quotation>)allQuotations; + + return withoutProjectOrder; } /** Modified: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectDetails.jsp =================================================================== --- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectDetails.jsp 2011-04-08 07:56:14 UTC (rev 65) +++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/gepeto/projectDetails.jsp 2011-04-08 08:38:00 UTC (rev 66) @@ -56,8 +56,7 @@ <br /> <br /> <% - //TODO: change to getAttachedQuotationsWithoutProjectOrder when it will be implemented - List<Quotation> quotations = ProjectAction.getAction().getAttachedQuotations(); + List<Quotation> quotations = ProjectAction.getAction().getAttachedQuotationsWithoutProjectOrder(); for (Quotation quotation : quotations) { %>