chokdee schrieb:
It doesnt work, I created a simple maven project with the artifact creater
and add a tomahawk tag to a jsp.
After that the following exception is thrown:
Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast to
java.lang.String
at
org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:35)
at
org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.setThisPageAlreadyRenderedAnInputHtml(InputHtmlRenderer.java:107)
at
org.apache.myfaces.custom.inputHtml.InputHtmlRenderer.encodeEnd(InputHtmlRenderer.java:93)
It seems the the getRequestMap now only accepts Strings.....
Thanks
Juergen
[EMAIL PROTECTED] wrote:
chokdee schrieb:
Hi all,
I try to use the latest Tomahawk version 1.1.6 with the latest Core
version
1.2.3.
But it fails.
Is there a documentation how to use the 1.2.3 with Tomahawk?
I see at http://myfaces.apache.org/tomahawk/dependencies.html
that the Tomahawk was build with a snapshot of 1.1.6. Is that right?
No, the website is generated regularly from the trunk, ie that
dependency info is for 1.1.7-SNAPSHOT. Tomahawk will have been built
against the latest released version of core 1.1.x at the time tomahawk
1.1.6 was released.
Tomahawk 1.1.6 should work fine with core 1.2.3. There is no special
documentation for this, because nothing special needs to be done; just
put the jarfile in the classpath. For some components you also need to
set up the ExtensionsFilter as documented on the website.
What is the problem?
Regards, Simon
This appears to be a tomahawk bug that has been fixed in the svn trunk,
but not yet included in a released version.
In Tomahawk 1.1.6, class InputHtmlRenderer has;
static private void
setThisPageAlreadyRenderedAnInputHtml(FacesContext context){
context.getExternalContext().getRequestMap().put(InputHtmlRenderer.class,
Boolean.TRUE);
}
which is using a Class object as a key.
In tomahawk 1.1.7-SNAPSHOT there is;
static private void
setThisPageAlreadyRenderedAnInputHtml(FacesContext context){
context.getExternalContext().getRequestMap().put(InputHtmlRenderer.class.getName(),
Boolean.TRUE);
}
which uses a string key.
I guess earlier versions of JSF implementations (including Sun's) didn't
care.
The javadoc for JSF1.2 is clear that the map keys *should* be strings:
http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/context/ExternalContext.html#getRequestMap()
The docs for JSF1.1 are not at all clear though:
http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html#getRequestMap()
Anyway, if you want to use tomahawk + myfaces 1.2.3, I guess you'll need
to use a tomahawk snapshot for now. There is currently some effort going
into getting a new tomahawk release out. I would guess one will be
available within 4 weeks, but that *is* just a guess.
Regards,
Simon