From: Pascal R. <pr...@ma...> - 2013-04-16 17:16:08
|
Le 2013-04-16 à 13:11, "Y. Dong" <sys...@ya...> a écrit : > Hi Jesse, > > Thanks for your answer. But what I need to do is to define a path for a controller. So in a ERXRouteController for example, > > @GET > @Path("/Article/{type:String}/({id:String})") > public WOActionResults showAction(@PathParam("type") String type, @PathParam("id") String id) > > @Path will define the format of url which will be accepted and processed by the showAction method here. The problem here is the id part is itself an http url, so it is not recognized as {id:String}, thus can not be directed to this showAction, is there anyway to get around this? You know in php, u can do ?id=http://xxx.xxx.xxx If you want to register your route with the JSR annotations, it will probably work by encoding the URL so that the slashes are not seen as "real" slashes. If you wish to use a parameter like ?id= : http://www.slideshare.net/wocommunity/er-rest-thebasics-13551691 Slides 25 and 26. > Thanks > From: Jesse Tayler <jt...@oe...> > To: Y. Dong <sys...@ya...> > Cc: "won...@li..." <won...@li...> > Sent: Tuesday, 16 April 2013, 18:00 > Subject: Re: [Wonder-disc] need a quick help on defining erxroute > > > maybe someone else has a better answer, or I don't totally follow - > > but I think you'd need to create a direct action and likely some apache rules to get the URL you want, with the route functionality you want. > > > > > On Apr 16, 2013, at 12:51 PM, "Y. Dong" <sys...@ya...> wrote: > > > Hello there, > > > > Basically I want to define a path for a controller in the form /Article/{type:String}/{id:String}, the problem is the id part is usually a http url, so a request like /Article/Business/http://repos.xxx.com/lds3 is not directed to the controller. In some other languages, you can possibly define it in the form /Article/{type:String}?id={id:String}, so how can I achieve the similar with ERXRoute? > > > > Thanks > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________ > > Wonder-disc mailing list > > Won...@li... > > https://lists.sourceforge.net/lists/listinfo/wonder-disc > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc |