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
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:
http://www.nabble.com/RestFaces-problem-...-tp17773696p17997780.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.