On SeamTest converters for page parameters are not called
---------------------------------------------------------
Key: JBSEAM-4449
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4449
Project: Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 2.1.1.GA
Environment: Linux version 2.6.28-15-generic (buildd@palmer) (gcc version 4.3.3
(Ubuntu 4.3.3-5ubuntu4) ) #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009
Kubuntu 9.04
JBoss 4.2.3 GA
Reporter: Tommy Key
I have converter used in pages.xml like this:
<page view-id="/basket.xhtml">
<param name="basketId" required="true"
value="#{basketHome.id}"
converterId="javax.faces.convert.LongConverter" />
</page>
My entity Basket has field id is of type Long. This combination works fine on production
server.
However in tests it doesn't work. No converters are used in
AbstractSeamTest$Request#setStandardJspVariables. It inserts String argument, not
converted to Long. There should be a conversion similar (although I'm not 100% sure)
to something like this one : Pages#convertAndValidateStringValuesInPageContext.
I use this code to reproduce a bug:
new FacesRequest("/basket.xhtml") {
protected void beforeRequest() {
setParameter("basketId", "77");
}
protected void invokeApplication() throws Exception {
try {
BasketHome basketHome = (BasketHome) Component.getInstance("basketHome");
basketHome.getInstance();
} catch (IllegalArgumentException a) {
//bug - expected Long, actually got String
}
}
}.run();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira