Reply To: h:link rendered as http://bla?com.ocpsoft.mappingId=home

Splash Forums PrettyFaces Users h:link rendered as http://bla?com.ocpsoft.mappingId=home Reply To: h:link rendered as http://bla?com.ocpsoft.mappingId=home

#25763

azakovorotny
Participant

JSF 2.1, Primefaces 4.O, Prettyfaces 3.3.3, Omnyfaces 1.6.3, JBoss 7.3
This is still confusing. Although it might be a result of using too many frameworks in one application.

<url-mapping id="parent">
        <pattern value="/#{tnt: manager.name}/parent"/>
        <view-id value="/default.jsf"/>
 </url-mapping>
 ...  
 <url-mapping parentId="parent" id="editPortal">
        <pattern value="/editPortal/#{portalId: portalMaintenance.portalId}"/>
        <view-id value="/parent/portal/edit.jsf"/>
        <action>#{portalMaintenance.loadPortal}</action>
    </url-mapping>

Either

<h:link value="Link Edit" outcome="pretty:editPortal" styleClass="action-button primary">
   <f:param value="#{manager.name}"/>
   <f:param value="#{portalMaintenance.portalId}"/>
</h:link>

or

<h:button outcome="pretty:editPortal" value="Button Edit" styleClass="action-button primary">
    <f:param value="#{manager.name}"/>
    <f:param value="#{portalMaintenance.portalId}"/>
</h:button>

both results in
http://localhost:8080/Test/parent/portal/edit?com.ocpsoft.mappingId=editPortal
while expected is http://localhost:8080/Test/parent/editPortal/100

Cannot figure out what is going on here. pretty:urlbuffer and pretty:link work fine.