[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4203) Interpolator swallows all exceptions
by Yuriy Lazarev (JIRA)
Interpolator swallows all exceptions
------------------------------------
Key: JBSEAM-4203
URL: https://jira.jboss.org/jira/browse/JBSEAM-4203
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.2.CR1
Environment: Any
Reporter: Yuriy Lazarev
org.jboss.seam.core.Interpolator swallows all exceptions, so if I have #{entityHome.instance.name} somewere in the page, and entityHome has id which is missed from database - I expect that org.jboss.seam.framework.EntityNotFoundException will be handled by this block in pages.xml
<exception class = "org.jboss.seam.framework.EntityNotFoundException">
<redirect view-id = "/error.xhtml">
<message severity = "warn">#{messages['org.jboss.seam.framework.EntityNotFoundException']}</message>
</redirect>
</exception>
but, instead I got
[WARN] exception interpolating string: #{entityHome.instance.name}
This is due
Interpolator.java:131
} catch (Exception e) {
log.warn("exception interpolating string: " + string, e);
}
--
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
14 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4325) ResourceLoader, moving from JBoss 4 to JBoss 5, page level messages.properties not workin any more.
by Riccardo Serafin (JIRA)
ResourceLoader, moving from JBoss 4 to JBoss 5, page level messages.properties not workin any more.
---------------------------------------------------------------------------------------------------
Key: JBSEAM-4325
URL: https://jira.jboss.org/jira/browse/JBSEAM-4325
Project: Seam
Issue Type: Feature Request
Components: Core, Documentation Issues
Reporter: Riccardo Serafin
Fix For: 2.2.1.CR1
We have moved our app from JBoss 4.2.3 to 5.1 and our page level messages.properties stopped to work correctly. After analyzing the issue, we traced the problem to the ResourceLoader loadBundle method which uses the getContextClassloader to load the bundles. In out app, the .properties files where located in the WAR root along with the faceltes .xhtml and the .page.xml, which use to work fine on 4.2.3. It is my understanding that with 5.1 the classloader has changed, and the one retrieved via getContextClassloader does not have access to the ServletContext anymore, hence our properties file are not found any more.
So, I suggest two things:
1) The documentation makes it explicit that the messages.properties file should be localed in WEB-INF/classes. The explanation for the page level messages.properties is instead a bit more open to interpretation. It could be good to reiterate there that also page level files need to go into WEB-INF/classes
2) Or, modify ResourceLoader to scan also the ServletContext for bundle files, which would make it compatible with apps that used to work on JBoss 4.2.3. Notice that the other ResourceLoader methods already use ServletLifecycle.getServletContext(), that is why .page.xml files can be nicely placed along .xhtml file in the context root.
Thanks,
Riccardo.
--
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
14 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4413) Date format error in .page.xml params when having custom date pattern
by Julien Kronegg (JIRA)
Date format error in .page.xml params when having custom date pattern
---------------------------------------------------------------------
Key: JBSEAM-4413
URL: https://jira.jboss.org/jira/browse/JBSEAM-4413
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.2.GA
Environment: Seam 2.1.2.GA, DB2
http://fisheye.jboss.org/browse/Seam/branches/community/Seam_2_1/src/main...
Reporter: Julien Kronegg
Priority: Minor
The java.util.Date passed by <param> tags in the .page.xml file are converted from Date to String for the GET request, using the date format defined in the last used rich:calendar. Then, the GET parameters are converted back from String to Date using the default date format which may not be the same as the one defined in the rich:calendar. This results in date conversion errors such as "value must be a date, eg. 10/13/2008".
The issue is fully described with an example in http://seamframework.org/Community/DateFormatErrorInPagexmlParamsASeamIssue
To correct this issue, the org.jboss.seam.navigation.Param should use its own date converter instead of sharing the converter with other JSF components (in other words, the Param class should use a technical date converter). This requires the following steps:
1) define a org.jboss.seam.faces.DateParamConverter date converter with a selectable date format defaulted to "yyyyMMddHHmmssSSS"
2) change the org.jboss.seam.navigation.Param class to use a the DateParamConverter converter if the param value is java.util.Date, else, use the converters registered in JSF. This is done by changing:
Class<?> type = valueExpression.getType();
if (type==null)
{
return null;
}
return FacesContext.getCurrentInstance().getApplication().createConverter(type);
by
Class<?> type = valueExpression.getType();
if (type==null)
{
return null;
}
+ if (type.equals(Date.class)) {
+ return org.jboss.seam.faces.DateParamConverter.getInstance(); // return an instance of the technical converter, to be created
+ } else {
return FacesContext.getCurrentInstance().getApplication().createConverter(type);
+ }
--
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
14 years, 4 months
[JBoss JIRA] Created: (JBSEAM-4519) Conditional navigation rules vs JSF 2.0
by Stephan Bublava (JIRA)
Conditional navigation rules vs JSF 2.0
---------------------------------------
Key: JBSEAM-4519
URL: https://jira.jboss.org/jira/browse/JBSEAM-4519
Project: Seam
Issue Type: Bug
Components: JSF Integration
Affects Versions: 2.2.0.GA
Reporter: Stephan Bublava
If the outcome of an action method is not covered by a navigation rule, you stay on the current page with JSF 1.2. With JSF 2.0 the outcome is interpreted as view id.
Example:
<page view-id="/administration/currency/edit-currency.html">
<navigation from-action="#{currencyEditor.confirmChanges}">
<rule if-outcome="confirm">
<render view-id="/administration/currency/confirm-edit-currency.html" />
</rule>
</navigation>
</page>
If currencyEditor.confirmChanges() returns "edit", JSF 2.0 tries to render /administration/currency/edit.html instead of /administration/currency/edit-currency.html.
BSEAM-4495 describes a similar problem.
--
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
14 years, 4 months
[JBoss JIRA] Commented: (JBSEAM-4543) seam-gen should not use resources:// for things that are in web/view content
by Pete Muir (JIRA)
[ https://jira.jboss.org/jira/browse/JBSEAM-4543?page=com.atlassian.jira.pl... ]
Pete Muir commented on JBSEAM-4543:
-----------------------------------
Added you back in. We just switched permission schemes and you weren't assigned anything.
> seam-gen should not use resources:// for things that are in web/view content
> ----------------------------------------------------------------------------
>
> Key: JBSEAM-4543
> URL: https://jira.jboss.org/jira/browse/JBSEAM-4543
> Project: Seam
> Issue Type: Bug
> Components: Tools
> Affects Versions: 2.1.2.GA, 2.2.0.GA
> Environment: winxp x86, jdk6, jboss5
> Reporter: Jacques Lemire
> Assignee: Dan Allen
> Priority: Blocker
> Fix For: 2.2.1.CR1
>
>
> seam-gen templates are using resource:// for things that are not on the classpath (currently build.xml hacks around this by duplicating the .xcss files in the war)
> Original description:
> In projects generated through "File" -> "New" -> "Seam web project", the facelets template "layout/template.xhtml" contains the following component in the "head" section:
> layout/template.xhtml:
> <a:loadStyle src="resource:///stylesheet/theme.xcss"/>
> This component, from a4j should transform the "richfaces templatable css" (xcss) file into a real CSS file and render as a <link> tag containing an a4j resource url. In projects created from the command-line seam-gen script, the output is as expected:
> <link class='user' rel='stylesheet' type='text/css' href='/testxcss/a4j/s/3_2_2.SR1stylesheet/theme.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__' />
> However, using jboss tools, I get:
> <link class='user' rel='stylesheet' type='text/css' href='/SeamThemeTest/stylesheet/theme.xcss' />
> This version does not work, however, as the xcss file is returned to the browser as is.
> By looking at the differences between the seam-gen project and the jbosstools project, i noticed the following section of the build.xml ant file generated by seam-gen:
> <copy todir="${war.dir}/WEB-INF/classes">
> <fileset dir="${basedir}/resources">
> <include name="**/*.xcss"/>
> </fileset>
> <!-- move XCSS into classpath for now
> loading from web context only works in JBoss AS 4 -->
> <fileset dir="${basedir}/view">
> <include name="**/*.xcss"/>
> </fileset>
> </copy>
> This step is not done by jbosstools (3.1.0), and indeed, by doing a quick web search, I fell on the following jira: https://jira.jboss.org/jira/browse/JBAS-6034, which states that:
> > [...] that would work in 4.2.x but not in jboss5 where the root of the war is no longer a part of the war's classpath (and never should have been!)
> Please fix it as soon as possible, as this problem affects any generated site and is pretty difficult to debug. On the other hand, it should be very easy to fix.
--
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
14 years, 4 months