Re: need a quick help on defining erxroute

"Y. Dong" <[email protected]> Wed, 17 Apr 2013 01:11:07 +0800 (CST)
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <[email protected]>
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

Thanks

________________________________
 From: Jesse Tayler <[email protected]>
To: Y. Dong <[email protected]> 
Cc: "[email protected]" <[email protected]> 
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" <[email protected]> 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc