Author: mwringe
Date: 2010-10-13 14:41:31 -0400 (Wed, 13 Oct 2010)
New Revision: 4659
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java
Log:
GTNWSRP-98: make consumer rewriting work for consumers other than just 1.0. Update tests
for this change.
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-10-13
18:40:27 UTC (rev 4658)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/MimeResponseHandler.java 2010-10-13
18:41:31 UTC (rev 4659)
@@ -143,10 +143,7 @@
false
);
- if (!consumer.isUsingWSRP2())
- {
- markup = markup.replaceAll(WSRPRewritingConstants.WSRP_REWRITE_TOKEN,
namespace);
- }
+ markup = markup.replaceAll(WSRPRewritingConstants.WSRP_REWRITE_TOKEN, namespace);
return markup;
}
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java 2010-10-13
18:40:27 UTC (rev 4658)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/handlers/RenderHandlerTestCase.java 2010-10-13
18:41:31 UTC (rev 4659)
@@ -82,12 +82,10 @@
"fadsfadsRender ns=JBPNS_ ws=null m=nullfajdshfkjdshgfgrept";
processMarkupAndCheck(markup, expected);
- // in WSRP 2, we don't process wsrp_rewrite_ tokens anymore as the consumer
MUST to provide a namespace
- // so the producer can generate the proper markup directly
markup = "<form method='post'
action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
"-interactionState=JBPNS_/wsrp_rewrite'
id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock
symbol</t" +
"d><td><input
name='symbol'/></td></tr><tr><td><input
type='submit'
value='Submit'></td></tr></table></form>";
- expected = "<form method='post' action='Action is=JBPNS_
ns=null ws=null m=null'
id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock
symbol</t" +
+ expected = "<form method='post' action='Action is=JBPNS_
ns=null ws=null m=null' id='" + NAMESPACE +
"portfolioManager'><table><tr><td>Stock symbol</t"
+
"d><td><input
name='symbol'/></td></tr><tr><td><input
type='submit'
value='Submit'></td></tr></table></form>";
processMarkupAndCheck(markup, expected);
}
Show replies by date