[prettyfaces] r468 committed - Updated with note about passing parameters to <h:link> properly

1 view
Skip to first unread message

prett...@googlecode.com

unread,
Nov 11, 2010, 10:18:14 AM11/11/10
to prettyfac...@googlegroups.com
Revision: 468
Author: lincolnbaxter
Date: Thu Nov 11 07:17:25 2010
Log: Updated with note about passing parameters to <h:link> properly
http://code.google.com/p/prettyfaces/source/detail?r=468

Modified:
/prettyfaces/trunk/docs/src/main/docbook/en-US/Rewriting_outbound.xml

=======================================
--- /prettyfaces/trunk/docs/src/main/docbook/en-US/Rewriting_outbound.xml
Wed Oct 6 07:50:31 2010
+++ /prettyfaces/trunk/docs/src/main/docbook/en-US/Rewriting_outbound.xml
Thu Nov 11 07:17:25 2010
@@ -39,7 +39,8 @@
Notice that even though we did not define a <link
linkend="config.queryparams">managed
query-parameter</link>, the resulting URL still contains the 'lang'
parameter. This is
because PrettyFaces only rewrites the <link
linkend="config.pathparams.named">named
- path-parameters</link> defined in the URL-pattern; all other
query-parameters are ignored.
+ path-parameters</link> defined in the URL-pattern; all other
query-parameters are simply
+ left unchanged.
</para>
</section>

@@ -76,8 +77,25 @@
Notice that even though we did not define a <link
linkend="config.queryparams">managed
query-parameter</link>, the resulting URL still contains the 'lang'
parameter. This is
because PrettyFaces only rewrites the <link
linkend="config.pathparams.named">named
- path-parameters</link> defined in the URL-pattern; all other
query-parameters are ignored.
+ path-parameters</link> defined in the URL-pattern; all other
query-parameters are simply
+ left unchanged.
</para>
+
+ <tip>
+ <para>
+ Notice that all <code>&lt;f:param name="" value=""&gt;</code>
elements contain
+ both a name and a value attribute. These are required, since
(unlike the <code>
+ &lt;pretty:link&gt;</code> component,)
<code>&lt;h:link&gt;</code> does not
+ accept un-named parameters, even when passing a
<code>"pretty:mappingId"</code>
+ as the outcome.
+ </para>
+ <para>
+ This is due to the fact that PrettyFaces integration occurs
**after** the
+ original URL has already been rendered by the
<code>&lt;h:link&gt;</code>
+ component, intercepting the URL at the <link
linkend="java">externalContext.encodeRedirectURL</link>
+ step, explained above (in the section "<link
linkend="java">Rewriting URLs in Java</link>".)
+ </para>
+ </tip>
</section>

<section id="disabling">

Reply all
Reply to author
Forward
0 new messages