![](/img/trans.png)
[英]JSF page element cannot trigger method from backing bean with action attribute.(JSF2.0 + primefaces)
[英]retrieving a url path in a jsf/primefaces backing bean
假設像
http://company.com/jsf-app-root/{groupName}/show.xhtml
和實際網址
http://company.com/jsf-app-root/accountant/show.xhtml
我如何在備用bean中獲得價值accountant
? 我可以作為構造函數的托管參數或作為bean的成員使用。
我發現的唯一內容是查詢參數解決方案查詢參數解決方案: a , b
或一些手工工作
FacesContext.getCurrentInstance().getExternalContext().getRequestPathInfo();
jsf / primeface中真的不支持url路徑參數嗎?
FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
檢查JavaDocs: http : //docs.oracle.com/javaee/6/api/javax/faces/context/ExternalContext.html#getRequestContextPath()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.