webpiecesxxxxxpackage.web.secure.crudajax.AjaxCrudRoutes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of WEBPIECESxAPPNAME Show documentation
Show all versions of WEBPIECESxAPPNAME Show documentation
Someone forgot to fill this in. See http://stackoverflow.com/questions/38272550/how-to-fail-the-gradle-build-if-subproject-is-missing-a-property
package webpiecesxxxxxpackage.web.secure.crudajax;
import static webpiecesxxxxxpackage.web.secure.crudajax.AjaxCrudUserRouteId.AJAX_ADD_USER_FORM;
import static webpiecesxxxxxpackage.web.secure.crudajax.AjaxCrudUserRouteId.AJAX_CONFIRM_DELETE_USER;
import static webpiecesxxxxxpackage.web.secure.crudajax.AjaxCrudUserRouteId.AJAX_EDIT_USER_FORM;
import static webpiecesxxxxxpackage.web.secure.crudajax.AjaxCrudUserRouteId.AJAX_LIST_USERS;
import static webpiecesxxxxxpackage.web.secure.crudajax.AjaxCrudUserRouteId.AJAX_POST_DELETE_USER;
import static webpiecesxxxxxpackage.web.secure.crudajax.AjaxCrudUserRouteId.AJAX_POST_USER_FORM;
import org.webpieces.router.api.routebldr.RouteBuilder;
import org.webpieces.router.api.routebldr.ScopedRouteBuilder;
import org.webpieces.router.api.routes.CrudRouteIds;
import org.webpieces.router.api.routes.Port;
import org.webpieces.router.api.routes.ScopedRoutes;
public class AjaxCrudRoutes extends ScopedRoutes {
@Override
protected String getScope() {
return "/ajax";
}
@Override
protected void configure(RouteBuilder baseBldr, ScopedRouteBuilder scopedBldr) {
//basic crud example(which just calls the same addRoute methods for you for Create/Read/Update/Delete and
//the GET render page views as well)
//it adds all these routes
//addRoute(GET , "/user/list", "crud/CrudUserController.userList", listRoute);
//addRoute(GET , "/user/new", "crud/CrudUserController.userAddEdit", addRoute);
//addRoute(GET , "/user/edit/{id}", "crud/CrudUserController.userAddEdit", editRoute);
//addRoute(POST, "/user/post", "crud/CrudUserController.postSaveUser", saveRoute);
//addRoute(GET , "/"+entity+"/confirmdelete/{id}", "crud/CrudUserController.confirmDeleteUser", confirmDelete);
//addRoute(POST, "/user/delete/{id}", "crud/CrudUserController.postDeleteUser", deleteRoute);
CrudRouteIds routeIds = new CrudRouteIds(
AJAX_LIST_USERS, AJAX_ADD_USER_FORM, AJAX_EDIT_USER_FORM,
AJAX_POST_USER_FORM, AJAX_CONFIRM_DELETE_USER, AJAX_POST_DELETE_USER);
scopedBldr.addCrud(Port.HTTPS, "user", "AjaxCrudUserController", routeIds);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy