Bug 928002 - Seam2.3 pages rewrite doesn't rewrite s:link params
Summary: Seam2.3 pages rewrite doesn't rewrite s:link params
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: Seam
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER1
: 2.3.0
Assignee: Marek Novotny
QA Contact: Marek Schmidt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-26 16:32 UTC by Marek Schmidt
Modified: 2013-07-16 11:33 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-16 11:33:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBSEAM-5085 0 Major Closed Pages rewrite doesn't rewrite s:link params 2015-12-15 16:09:02 UTC

Description Marek Schmidt 2013-03-26 16:32:04 UTC
Description of problem:

Having this in the pages.xml:

<page view-id="/entry.xhtml"> 
        <rewrite pattern="/entry/{blogEntryId}" />
        <rewrite pattern="/entry" />
        
        <param name="blogEntryId" 
               value="#{blogEntry.id}"/>
        
        <action execute="#{entryAction.loadBlogEntry(blogEntry.id)}"/>
    </page>

and a link to entry in a page:

<s:link id="link" view="/entry.xhtml" propagation="none" value="#{blogEntry.title}">
   <f:param name="blogEntryId" value="#{blogEntry.id}"/>
</s:link>

this should render as a link to "/entry/foo", but it renders as "/entry?blogEntryId=roadmap11"

Version-Release number of selected component (if applicable):
WFK 2.2.0.CR1 

How reproducible:
Always

Steps to Reproduce:
1. build and deploy the seam-blog example
2. Go to http://127.0.0.1:8080/seam-blog/
3. Notice the URL in [Link] link in the Seam Text article.
  
Actual results:
http://127.0.0.1:8080/seam-blog/entry?blogEntryId=seamtext

Expected results:
http://127.0.0.1:8080/seam-blog/entry/seamtext

Comment 1 Marek Schmidt 2013-03-26 18:02:47 UTC
Interesting observation: removing the '<rewrite pattern="/entry" />' rule makes the other rule work.

Comment 4 Marek Novotny 2013-04-04 06:25:53 UTC
This issue goes away with reverted patch for https://bugzilla.redhat.com/show_bug.cgi?id=921660

Comment 5 Marek Novotny 2013-04-04 06:28:04 UTC
My previous comment was a mistake, it doesn't work.

Comment 6 Petr Penicka 2013-04-17 22:39:10 UTC
Edited release note and inserted it into the 2.2.0 RN book.

Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/2.2/html-single/2.2.0_Release_Notes/index.html

Build: JBoss_Web_Framework_Kit-2.2.0_Release_Notes-2.2-en-US-0-23

Comment 7 JBoss JIRA Server 2013-05-17 12:49:05 UTC
Marek Novotny <mnovotny> made a comment on jira JBSEAM-5085

I figured out how to change the incorrect behavior of org.jboss.seam.ui.util.ViewUrlBuilder. The existence of viewHandler.getBookmarkableUrl was premature to call in ViewUrlBuilder initialization, because we need added parameters in URL. So after discussion with Marek Schmidt I prepared the change. However that change broke the calling of page actions due double url encoding - experienced in org.jboss.seam.test.integration.faces.conversations.ConversationPropagationsTest.testSButtonActionPropagationNone(). So I changed default url encoding to false in org.jboss.seam.ui.util.ViewUrlBuilder.ViewUrlBuilder(String, String).

The test case for Page rewrite is added as org.jboss.seam.test.integration.faces.ViewUrlBuilderTest.

Comment 8 JBoss JIRA Server 2013-05-17 12:50:09 UTC
Marek Novotny <mnovotny> made a comment on jira JBSEAM-5085

I figured out how to change the incorrect behavior of {{org.jboss.seam.ui.util.ViewUrlBuilder}}. The existence of {{viewHandler.getBookmarkableUrl}} was premature to call in {{ViewUrlBuilder}} initialization, because we need added parameters in URL. So after discussion with Marek Schmidt I prepared the change. However that change broke the calling of page actions due double url encoding - experienced in {{org.jboss.seam.test.integration.faces.conversations.ConversationPropagationsTest.testSButtonActionPropagationNone()}}. So I changed default url encoding to false in {{org.jboss.seam.ui.util.ViewUrlBuilder.ViewUrlBuilder(String, String)}}.

The test case for Page rewrite is added as {{org.jboss.seam.test.integration.faces.ViewUrlBuilderTest}}.

Comment 9 JBoss JIRA Server 2013-05-17 12:52:10 UTC
Marek Novotny <mnovotny> updated the status of jira JBSEAM-5085 to Resolved

Comment 10 Marek Novotny 2013-06-03 13:41:09 UTC
back ported the fix as https://source.jboss.org/changelog/Seam?cs=15510 and

Comment 12 JBoss JIRA Server 2013-06-07 13:55:04 UTC
Marek Novotny <mnovotny> updated the status of jira JBSEAM-5085 to Closed

Comment 13 JBoss JIRA Server 2013-06-07 13:55:04 UTC
Marek Novotny <mnovotny> made a comment on jira JBSEAM-5085

2.3.1.CR1 is now out, so closing all resolved issues

Comment 14 Tomas Remes 2013-06-13 07:58:11 UTC
Verified on 2.3.0.ER1 release.

Comment 15 Sneha 2013-07-03 09:48:04 UTC
Updated doc text.


Note You need to log in before you can comment on or make changes to this bug.