Reply To: What is the correct way to use pattern values?

Splash Forums PrettyFaces Users What is the correct way to use pattern values? Reply To: What is the correct way to use pattern values?



I think I finally found where I was looking for(in the manual 🙂 ):


and parent ID

So I could I use it like this, defining store:

<url-mapping id="viewItem">
  <pattern value="/store/item/#{ iid : bean.itemId }/" />
  <view-id value="/#pageBean.getPage" />
  <query-param name="language"> #{bean.language} </query-param>


With the property:


with the beans:

Setting bean.itemId

Or can I use pretty faces like this, the parent child way.?Hopefully a solustion for what I intended:
This examle is with the shoestore module:

<url-mapping id="module"> 
   <pattern value="/bean.module" /> 
   	<~-- Result: /shoestore -->
   <view-id value="/#{pageBean.getPage}" />

<url-mapping parentId="module" id="phase1"> 
   <pattern value="/#{phase1}" /> 
   	<~-- Result: /shoestore/#{phase1} -->
   <view-id value="#{pageBean.getPage}" /> 


<url-mapping parentId="module" id="phase2"> 
   <pattern value="/#{phase2}" /> 
   	<~-- Result: /shoestore/#{phase1}/#{phase2} -->
   <view-id value="#{pageBean.getPage}" /> 


With property:

with the beans:

module name is set as bean.module propertie after some checks
phase is set after some checks

Is this possible with <action>?
So is the pattern value set with the action properly? Do I not have to put the <action> above the pattern value?
Could I also add query parameters in this parent, child way?
Is it possible to add the module variable in a commandlink or commandButton, and not to use url-mapping id? This with above parent child example?
For example:

<h:commandLink action="pretty:shoestore"> Shoe Store </h:commandLink>