how can i get the stacktrace? my eclipse console does not show any errors. I was trying to instantiate my list with an empty list if the list is null, but the error consists:
package com.airwriting.frontend.pages.mobile; import java.util.ArrayList; import java.util.List; import org.apache.tapestry5.Block; import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.Link; import org.apache.tapestry5.annotations.Environmental; import org.apache.tapestry5.annotations.Import; import org.apache.tapestry5.annotations.InjectComponent; import org.apache.tapestry5.annotations.OnEvent; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.corelib.components.Zone; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.Request; import org.apache.tapestry5.services.javascript.JavaScriptSupport; import org.apache.tapestry5.EventConstants; import com.airwriting.domain.GeoPoint; import com.airwriting.domain.Group; import com.airwriting.service.GeometryService; import com.airwriting.service.data.GroupService; import com.vividsolutions.jts.geom.Geometry; @Import(library = { "context:js/mobilebrowsegroups.js" }) public class BrowseGroups { @Persist private List<Group> groups; @Property private Group group; @Inject private Block listBlock; @Inject private GroupService groupService; @Inject private JavaScriptSupport jsSupport; @Inject private Request request; @Inject private ComponentResources componentResources; @Property private boolean isLocationRetrieved; public void setupRender() { System.out.println("setupRender"); isLocationRetrieved = false; } public void afterRender(){ Link linkGetGroupsOnLocation = componentResources.createEventLink("getGroupsOnLocation"); jsSupport.addScript("init('%s');", linkGetGroupsOnLocation.toURI()); } public Object onGetGroupsOnLocation(){ Double lat = Double.parseDouble( request.getParameter("lat") ); Double lng = Double.parseDouble( request.getParameter("lng") ); Geometry location = GeometryService.getPolygon(new GeoPoint(lat, lng), 50000); groups = groupService.getGroupsOnLocation(location); System.out.println(groups.size()); System.out.println("ok"); return this.listBlock; } Object onProgressiveDisplayFromLoadingScreen(){ sleep(5000); System.out.println("si; " + groups.size()); return this.listBlock; } public List<Group> getGroups(){ if (groups == null){ return new ArrayList<Group>(); } return this.groups; } public static void sleep(int milis){ try { Thread.sleep(milis); }catch (final Exception e) { } } } JAVASCRIPT: var urlGetGroupsOnLocation; function init(url) { urlGetGroupsOnLocation = url; if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { new Ajax.Request(urlGetGroupsOnLocation, { onSuccess : finish, parameters : 'lat=' + position.coords.latitude + '&lng=' + position.coords.longitude }); }, function(msg) { alert ("geolocation not supported..") }); } } function finish(){ } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Ajax-failure-Status-500-for-mobile-browsegroups-loadingscreen-org-apache-tapestry5-runtime-Componentn-tp5663902p5665446.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org