Plant More Tree wrote:
> 
> Hi Agori,
> 
>    Thanks a lot and it's working fine now. I got 1 more question here
> where I need to pass 2 parameters to backing bean like below :
> 
>       @Instance("#{home}")
>       @HttpAction(value="homeAction", pattern="comments/{title}")
>       public String retrieveComment(@Param("title") String title,
> @Param("sharedUrlId") String sharedUrlId){
> 
> 
> <rest:link value="homeAction">
> <f:param name="sharedUrlId" value="123456789"/>
> <f:param name="title" value="title1"/>
> #{text['comments']}
> </rest:link>
> 
> however, the url came out like :
> 
> http://localhost:8080/pikepier/comments/ning+ning+the+world?sharedUrlId=b4043a51-2d76-102b-9617-869ad24e2f93
> 
> instead of the expected :
> 
> http://localhost:8080/pikepier/comments/ning+ning+the+world
> 
> Appreciate if you could further advice me on this. Thanks !
> 
> regards,
> Mark
> 
> 

You regeistered a query parameter with 

@Param("sharedUrlId") String sharedUrlId

so I didn't understand why it shouldn't append it to the URL. If you don't
want that parameter remove it from the method signature.

A further note: you can move the @Instance annotation at class level so you
do not have to specify it for every method in the class. And if the bean
name is the same of the class name (with first letter in lower case) you can
omit the annotation also.


-- 
View this message in context: 
http://www.nabble.com/RestFaces-problem-...-tp17773696p17998537.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to