Permalink
Browse files

Fix o:graphicImage URL fail when OWB is used to manage bean.

(simple name returns proxy name with $$ inside which is invalid in URL)
  • Loading branch information...
1 parent f811ace commit d82d6a0afdbea38b62eee85ccff56994c037c853 @BalusC BalusC committed Nov 24, 2015
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/org/omnifaces/resourcehandler/GraphicResource.java
@@ -250,7 +250,8 @@ else if (content instanceof byte[]) {
* This must return an unique and URL-safe identifier of the bean+method+type without any periods.
*/
private static String getResourceName(MethodReference methodReference, String type) {
- return methodReference.getBase().getClass().getSimpleName() + "_" + methodReference.getMethod().getName()
+ return methodReference.getBase().getClass().getSimpleName().replaceAll("\\W", "")
+ + "_" + methodReference.getMethod().getName()
+ (isEmpty(type) ? "" : ("_" + type));
}

0 comments on commit d82d6a0

Please sign in to comment.