[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1111) NumberFormatException in graphicImage
by Shane Bryzak (JIRA)
NumberFormatException in graphicImage
-------------------------------------
Key: JBSEAM-1111
URL: http://jira.jboss.com/jira/browse/JBSEAM-1111
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 1.2.0.GA
Reporter: Shane Bryzak
Assigned To: Pete Muir
Pete - the seamspace example was throwing this exception as a result of previewing a blog entry or comment (see JBSEAM-1106 for details).
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:415)
at java.lang.Integer.<init>(Integer.java:620)
at org.jboss.seam.ui.graphicImage.UITransformImageSize.applyTransform(UITransformImageSize.java:60)
at org.jboss.seam.ui.graphicImage.UIGraphicImage.encodeBegin(UIGraphicImage.java:70)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:419)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlLinkRendererBase.encodeChildren(HtmlLinkRendererBase.java:142)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:613)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1045) enable the application message bundle to be connected to the core resource bundle
by Keith Naas (JIRA)
enable the application message bundle to be connected to the core resource bundle
---------------------------------------------------------------------------------
Key: JBSEAM-1045
URL: http://jira.jboss.com/jira/browse/JBSEAM-1045
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Keith Naas
On our projects, we wanted to be able to connect the core Seam ResourceBundle to the Faces Application message-bundle. Since the Faces Application message-bundle is instantiated by Faces, we cannot have it point directly to the Seam ResourceBundle. However, by fronting it with this class, we are able to make use of the nice Seam functionality from within core JSF controls (such as UIInput validation and conversion messages).
{code}
package com.biglots.common.web.util;
import java.util.Enumeration;
import org.jboss.seam.core.Interpolator;
import org.jboss.seam.core.ResourceBundle;
/**
* The <i>ApplicationResourceBundle</i> is an attempt to fix the disconnect between having multiple resource bundles
* and the lone application resource bundle used within the JSF. Within JSF2.1, it is possible to have multiple named
* resource bundles. However, all error messages, validation messages, conversion messages, that are generated from
* within core JSF classes go through the single message-bundle configured from within the faces-config.xml file. We
* want to be able to reuse the messages in such a way that we only specify the message values once, and simply hook up
* the messages bundles to the APIs in the seam components.xml. <p/> The ApplicationResourceBundle is just a class that
* fronts the org.jboss.seam.core.ResourceBundle while also correctly handling EL expressions defined in any messages.
* For instance, a message could be defined as "general.label.login.caption=#{someexpression}is invalid.". Pretty cool,
* huh? So what else does it provide? It allows for resource bundles to have precedence. <p/> How do I configure this?
* Well, pretty easily. To get the messasges available to Java classes, in the faces-config.xml just do
* <code>
* <application>
* <message-bundle>com.biglots.common.web.util.ApplicationResourceBundle</message-bundle>
* </application>
* </code>
* Then to configure the seam ResourceBundle that we are fronting, just do the following in components.xml.
* Note that the order of the values is also the order of precedence during a lookup.
* <code>
* <core:resource-bundle>
* <core:bundle-names>
* <value>general</value>
* <value>META-INF.messages</value>
* <value>messages</value>
* </core:bundle-names>
* </core:resource-bundle>
* </code>
*
* <p/> What if you want some named resource bundles? For instance to have a resource bundle named "generalMsg"
* available in Session scope, just do the following in components.xml.
* You can specify as many of the named resource bundles as you like, just make s
* sure to configure the core resource bundle one as well.
* <code>
* <component name="generalMsg" class="org.jboss.seam.core.ResourceBundle">
* <property name="bundleNames">
* <value>general</value>
* <value>META-INF.messages</value>
* </property>
* </component>
* </code>
*
* @author knaas
*/
public class ApplicationResourceBundle extends java.util.ResourceBundle
{
/**
* Returns the keys available in all of the configured resource bundles.
* @return
*/
@Override
public Enumeration<String> getKeys()
{
return ResourceBundle.instance().getKeys();
}
/**
* Returns the message that is looked up in the configured resource bundles.
* It also interpolates any EL in the message so that we can put EL in messages
* and they are properly evaluated in all Java Classes and JSF Views.
*
*/
@Override
protected Object handleGetObject(final String key)
{
return Interpolator.instance().interpolate(ResourceBundle.instance().getString(key), (Object[])null);
}
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 4 months