myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plant More Tree <>
Subject Re: RestFaces problem ...
Date Thu, 19 Jun 2008 05:52:09 GMT

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 :

	@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"/>

however, the url came out like :


instead of the expected :


Appreciate if you could further advice me on this. Thanks !


agori wrote:
> Plant More Tree wrote:
>> when I clicked on the link, in the backing bean the system.out print "id
>> = dwr". I really dunno what is going wrong. 
> I am a restfaces developer. For sure your problem is that your DWR script
> points to a not absolute path:
> <script src="dwr/....js" type="text/javascript"></script>
> for after clicking /items/123 you go to page /page.xhtml and the page ask
> for /items/dwr/....js
> items/dwr is a valid pattern for your action method.
> This can be solved absolutizing your path: 
> <script
> src="#{facesContext.externalContext.requestContextPath}/dwr/....js"
> type="text/javascript"></script>
> or removing the restfaces filter (but you loose its nice URLs).
> I would recommend to absolutize paths. The same is valid for css and other
> resources (images, ecc...).

View this message in context:
Sent from the MyFaces - Users mailing list archive at

View raw message