我在我的项目和它的工作中很好地使用了prettyfaces,但是当我尝试对两个url映射使用类似的模式时,它总是记住第一个,而忽略了具有相同模式的第二个url映射。
我想问您,是否有一种方法可以让不同的页面有相同的图案,有漂亮的面孔,这就是我的代码:
<pretty-config xmlns="http://ocpsoft.com/prettyfaces/3.3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ocpsoft.com/prettyfaces/3.3.0
http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.0.xsd">
<url-mapping id="accueillogin">
<pattern value="/login" />
<view-id value="/faces/login.xhtml" />
</url-mapping>
<url-mapping id="afficherarticlehome">
<pattern value="/article" />
<view-id value="/faces/admin/gestiondesarticles/afficherarticlehome.xhtml" />
</url-mapping>
<url-mapping id="afficherarticleges">
<pattern value="/article" />
<view-id value="/faces/admin/gestiondesarticles/afficherarticleges.xhtml" />
</url-mapping>
</pretty-config>知道吗?
发布于 2013-06-21 17:11:06
当然是不可能的。在输入模式时,两个不同的urls之间不可能有区别。但是,可以传递一个参数来确定您想要显示的内容(它们具有相同的视图-id):
<url-mapping id="afficherarticle">
<pattern value="/article" />
<view-id value="/faces/admin/gestiondesarticles/afficherarticle.xhtml" />
</url-mapping>/article?section=home
/article?section=ges
https://stackoverflow.com/questions/17238715
复制相似问题