Skip to content
Snippets Groups Projects
Commit 9eb14844 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Merge branch 'TE_SpotIT_wp34' into 'develop'

Update with develop before real branch work starts

See merge request !9
parents e8c72bc9 8e8e27ab
No related branches found
No related tags found
2 merge requests!17Develop,!9Update with develop before real branch work starts
......@@ -134,7 +134,7 @@ public class OrganizationController extends HttpServlet {
organization.setDefaultMapZoom(
formValidation.getFormField("defaultMapZoom").isEmpty() ?
null
: formValidation.getFormField("defaultVipsCoreUserId").getValueAsInteger()
: formValidation.getFormField("defaultMapZoom").getValueAsInteger()
);
organization.setDefaultMapCenter(
formValidation.getFormField("defaultMapCenter").isEmpty() || formValidation.getFormField("defaultMapCenter").getWebValue().trim().equals(",") ?
......
......@@ -24,6 +24,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Point;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
......@@ -200,7 +201,9 @@ public class PointOfInterestController extends HttpServlet {
if(user.isSuperUser())
{
request.getSession().setAttribute("users", em.createNamedQuery("VipsLogicUser.findAll", VipsLogicUser.class).getResultList());
List<VipsLogicUser> users = em.createNamedQuery("VipsLogicUser.findAll", VipsLogicUser.class).getResultList();
Collections.sort(users);
request.getSession().setAttribute("users", users);
}
Integer organizationId = Integer.valueOf(request.getParameter("organizationId"));
request.setAttribute("returnURL","weatherStation?organizationId=" + organizationId);
......@@ -239,7 +242,9 @@ public class PointOfInterestController extends HttpServlet {
request.setAttribute("messageKey", request.getParameter("messageKey"));
if(user.isSuperUser())
{
request.getSession().setAttribute("users", em.createNamedQuery("VipsLogicUser.findAll", VipsLogicUser.class).getResultList());
List<VipsLogicUser> users = em.createNamedQuery("VipsLogicUser.findAll", VipsLogicUser.class).getResultList();
Collections.sort(users);
request.getSession().setAttribute("users", users);
}
request.setAttribute("returnURL","weatherStation?organizationId=" + weatherStation.getUserId().getOrganizationId().getOrganizationId());
request.getRequestDispatcher("/weatherstationForm.ftl").forward(request, response);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment