[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2006) Improve handling of dependencies in examples
by Pete Muir (JIRA)
Improve handling of dependencies in examples
--------------------------------------------
Key: JBSEAM-2006
URL: http://jira.jboss.com/jira/browse/JBSEAM-2006
Project: JBoss Seam
Issue Type: Task
Affects Versions: 2.0.0.CR1
Reporter: Pete Muir
Assigned To: Pete Muir
Priority: Critical
Fix For: 2.0.1.GA
Currently dependencies are just handled as before, with all dependencies copied into lib/
I propose to replace lib/ with a local maven repository (just a simple directory structure). This will only be used if present (not present in CVS, created using dependency:copy-dependencies when running dist target). The fileset's used to declare example libraries and inclusion into deployed archives will be altered to use maven ant tasks to pull in these filesets from repositories (using the local repo if present).
This requires some extensions to existing ant tasks.
A similar scheme can be used for seam-gen
--
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
13 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2389) HibernatePersistenceProvider fails with java.lang.Integer version check
by Christian Bauer (JIRA)
HibernatePersistenceProvider fails with java.lang.Integer version check
-----------------------------------------------------------------------
Key: JBSEAM-2389
URL: http://jira.jboss.com/jira/browse/JBSEAM-2389
Project: JBoss Seam
Issue Type: Bug
Components: Core
Reporter: Christian Bauer
Priority: Critical
My entity had a version property:
@Version
@Column(name = "OBJ_VERSION", nullable = false)
protected Integer version;
In a very involved ajax reRender/conversation situation I sometimes got the following exception from HibernatePersistenceProvider:
public static void checkVersion(Object value, Session session, Object oldVersion, Object version)
{
ClassMetadata classMetadata = getClassMetadata(value, session);
VersionType versionType = (VersionType) classMetadata.getPropertyTypes()[ classMetadata.getVersionProperty() ];
if ( !versionType.isEqual(oldVersion, version) )
{
throw new StaleStateException("current database version number does not match passivated version number");
}
}
This failed because oldVersion was 'null' and version was '0'.
Hibernate returned '0' from ClassMetaData.getVersion(), it looks like it can't return null, from Javadoc: Get the version number (or timestamp) from the object's version property (or return null if not versioned).
We should do a null check before asking Hibernate.
Workaround: Use primitive for version field in entity or initialize it to '0'.
--
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
13 years, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2820) Remoting should not throw exception but 400/404 on invalid request
by Christian Bauer (JIRA)
Remoting should not throw exception but 400/404 on invalid request
------------------------------------------------------------------
Key: JBSEAM-2820
URL: http://jira.jboss.com/jira/browse/JBSEAM-2820
Project: JBoss Seam
Issue Type: Bug
Components: Remoting
Reporter: Christian Bauer
Assigned To: Shane Bryzak
Some crazy Java program is making HTTP requests on our live site:
85.82.169.224 - - [04/Apr/2008:15:38:48 +0100] "GET /seam/resource/remoting/interface.js HTTP/1.1" 200 - "null" "Java/1.5.0_13"
I'm guessing this is a home-written HTML parser or something from a Danish ;) guy or a website "downloader" or something. In any case, it cuts off the request parameters and we throw an exception:
15:38:48,818 ERROR [Remoting] Error
javax.servlet.ServletException: Invalid request - no component specified
at org.jboss.seam.remoting.InterfaceGenerator$1.process(InterfaceGenerator.java:73)
at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
at org.jboss.seam.remoting.InterfaceGenerator.handle(InterfaceGenerator.java:64)
at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:111)
at org.jboss.seam.servlet.SeamResourceServlet.doGet(SeamResourceServlet.java:75)
Do not throw an exception but either return 400 INVALID REQUEST or 404 NOT FOUND.
--
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
13 years, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1620) "java.lang.IllegalStateException: No application context active" thrown on legacy components.xml declaration
by Przemyslaw Jaskierski (JIRA)
"java.lang.IllegalStateException: No application context active" thrown on legacy components.xml declaration
------------------------------------------------------------------------------------------------------------
Key: JBSEAM-1620
URL: http://jira.jboss.com/jira/browse/JBSEAM-1620
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.BETA1
Environment: Tomcat 6.0.13
Reporter: Przemyslaw Jaskierski
Fix For: 2.0.0.CR1
Reporting on Gavin's demand. After migrating from 1.3.0 ALPHA to latest 2.0.0 cvs snapshot I got this exception because on my classpath was an alternate components.xml with core:microcontainer. Please see forum topic for complete description. Posting only stacktrace here.
java.lang.IllegalStateException: No application context active
at org.jboss.seam.Component.forName(Component.java:1707)
at org.jboss.seam.Component.getInstance(Component.java:1757)
at org.jboss.seam.Component.getInstance(Component.java:1740)
at org.jboss.seam.Component.getInstance(Component.java:1719)
at org.jboss.seam.core.ResourceBundle.instance(ResourceBundle.java:209)
at org.jboss.seam.jsf.SeamApplicationMessageBundle.handleGetObject(SeamApplicationMessageBundle.jav
a:28)
at java.util.ResourceBundle.getObject(ResourceBundle.java:380)
at java.util.ResourceBundle.getString(ResourceBundle.java:346)
at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:151)
at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:122)
at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:828)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:486)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jul 7, 2007 7:21:43 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.conf
ig.ConfigureListener
javax.faces.FacesException: java.lang.IllegalStateException: No application context active
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:387)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.IllegalStateException: No application context active
at org.jboss.seam.Component.forName(Component.java:1707)
at org.jboss.seam.Component.getInstance(Component.java:1757)
at org.jboss.seam.Component.getInstance(Component.java:1740)
at org.jboss.seam.Component.getInstance(Component.java:1719)
at org.jboss.seam.core.ResourceBundle.instance(ResourceBundle.java:209)
at org.jboss.seam.jsf.SeamApplicationMessageBundle.handleGetObject(SeamApplicationMessageBundle.jav
a:28)
at java.util.ResourceBundle.getObject(ResourceBundle.java:380)
at java.util.ResourceBundle.getString(ResourceBundle.java:346)
at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:151)
at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:122)
at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:828)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:486)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381)
... 15 more
--
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
13 years, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2588) s:conversationPropagation breaks a4j:commandButton
by Fijai Cairo (JIRA)
s:conversationPropagation breaks a4j:commandButton
--------------------------------------------------
Key: JBSEAM-2588
URL: http://jira.jboss.com/jira/browse/JBSEAM-2588
Project: JBoss Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.0.1.GA
Environment: Firefox OSX 10.51, JBoss AS 4.22, JAVA 1.5.0_13-b05-237
Reporter: Fijai Cairo
<a4j:commandButton styleClass="btn" id="contactButton#{accountHolder}" oncomplete="UIControl('contactForm', 'contact', 'identification');" reRender="contactBlock#{accountHolder},uiSec" actionListener="#{accountOpen.submitContactInfo}" value="Continue" >
<a4j:actionparam name="holder" value="getSuffix()" noEscape="true"/>
<s:conversationPropagation type="join" />
</a4j:commandButton>
Renders the following: Notice that the onclick handler is rendered before the input is rendered and causes a document.getElementById("contactButton1") has no properties javascript error.
<div id="contactContinueSection1" style="padding: 10px 10px 10px 10px; display: block">
<script language="JavaScript" type="text/javascript">
//<![CDATA[
document.getElementById('contactButton1').onclick = new Function("event", "{if (document.getElementById){var form = document.getElementById('contactForm1');var input = documen
t.createElement('input');if (document.all){ input.type = 'hidden';input.name = 'conversationPropagat
ion';input.value = 'join';}else if (document.getElementById) {input.setAttribute('type', 'hidden');i
nput.setAttribute('name', 'conversationPropagation');input.setAttribute('value', 'join');}form.appen
dChild(input);return true;}}");
//]]>
</script>
<input id="contactButton1" name="contactButton1" onclick="A4J.AJAX.Submit('_viewRoot','contactForm1',event,{'parameters':{'holder':getSuffix(),'conversationPr
opagation':'join','contactButton1':'contactButton1'} ,'actionUrl':'/BaisiPrototype/AE/primary.jspv?j
avax.portlet.faces.DirectLink=true','oncomplete':function(request,event,data){UIControl('contactForm
', 'contact', 'identification');}} );return false;" value="Continue" class="btn" type="button" />
</div>
Without <s:conversationPropagation type="join" />, the onclick handler is rendered as an attribute of the button as ff:
<div id="contactContinueSection1" style="padding: 10px 10px 10px 10px; display: block"><input id="contactButton1" name="contactButton1" onclick="A4J.AJAX.Submit('_viewRoot','contactForm1',event,{'parameters':{'holder':getSuffix(),'contactButton1
':'contactButton1'} ,'actionUrl':'/BaisiPrototype/AE/primary.jspv?javax.portlet.faces.DirectLink=tru
e','oncomplete':function(request,event,data){UIControl('contactForm', 'contact', 'identification');}
} );return false;" value="Continue" class="btn" type="button" />
--
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
13 years, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2652) s:decorate does not respect prependId="false" on h:form
by Erik Magnusson (JIRA)
s:decorate does not respect prependId="false" on h:form
-------------------------------------------------------
Key: JBSEAM-2652
URL: http://jira.jboss.com/jira/browse/JBSEAM-2652
Project: JBoss Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.0.1.GA
Environment: JBoss Seam 2.0.1GA
Reporter: Erik Magnusson
Given the following code:
<h:form id="login" prependId="false">
<s:validateAll>
<f:facet name="afterInvalidField">
<s:label styleClass="error">
<s:message/>
</s:label>
</f:facet>
<div class="labelinputcombo ilcblock">
<h:outputLabel for="username">User name:</h:outputLabel>
<s:decorate>
<h:inputText id="username" value="#{registrationService.newUser.userName}" required="true"/>
</s:decorate>
</div>
</s:validateAll>
<div>
<h:commandButton value="Register" action="#{registrationService.registerUser}"/>
</div>
</h:form>
One would expect that none of the generated <input> elements would have prepended IDs, since the h:form has prependId="false". However, since s:decorate insists on inserting a superfluous <div> with a generated ID around the <input> elements it surrounds, those <input> elements end up having prepended IDs from that <div>. The relevant generated HTML:
<div class="labelinputcombo ilcblock">
<label for="j_id31:username">User name:</label><div id="j_id31"><input id="j_id31:username" type="text" name="j_id31:username" /></div>
</div>
I did not ask for either the <div> or it's ID (<div id="j_id31">), or its insertion into my <input> element's ID (id="j_id31:username").
Proposed solutions:
1. Remove the generated <div>. Is it really necessary for the functionality of s:decorate? If I want a div I can always add it myself.
2. If the <div> really is necessary, at least make s:decorate respect the prependId="false" attribute of the surrounding h:form.
3. If that is not possible, as a last resort, introduce a prependId attribute on the <s:decorate> tag so we can at least force this behaviour if we want it.
On a more general note,
I'm a really big fan of the JSF-Seam-EJB3 combo, but some of the design decisions in the frameworks are baffling. Why so many superfluous generated html tags? And who thought of the bright idea of prepending element id attributes using : (colon) as the delimeter?? This effectively cripples the ability to use CSS to style JSF-generated HTML elements with a simple CSS id selector (since : is a reserved symbol in CSS).
--
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
13 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2275) Document on Seam iText charting
by Joshua Partogi (JIRA)
Document on Seam iText charting
-------------------------------
Key: JBSEAM-2275
URL: http://jira.jboss.com/jira/browse/JBSEAM-2275
Project: JBoss Seam
Issue Type: Patch
Affects Versions: 2.0.0.GA
Environment: JBoss 4.2.1.GA
Reporter: Joshua Partogi
Fix For: 2.0.1.GA
Point 16.2
1. Write in doc to use the charting support, we need to add the jfreechart.jar and jcommon-*.jar in the project classpath. We can also add this is our build.xml
2. The key attribute is needed upon p:data component usage otherwise it will throw
this exception java.lang.IllegalArgumentException: Null 'key' argument.
at org.jfree.data.DefaultKeyedValues.setValue(DefaultKeyedValues.java:239)
at org.jfree.data.DefaultKeyedValues2D.setValue(DefaultKeyedValues2D.java:337)
at org.jfree.data.DefaultKeyedValues2D.addValue(DefaultKeyedValues2D.java:303).
In examples, it is used in (the ones below are the fixed value):
Barchart, Linechart, Series
PieChart
1. Attributes:
title — The chart title text.
legend — A boolean value indicating whether or not the chart should include a legend. Default value is true
is3D - A boolean value indicating that the chart should be rendered in 3D instead of 2D.
labelLinkMargin - The link margin
labelLinkPaint - The paint used for the label linking lines.
labelLinkStroke - The stroke used for the label linking lines.
labelLinksVisible - A flag that controls whether or not the label links are drawn.
labelOutlinePaint - The paint used to draw the outline of the section labels
labelOutlineStroke - The stroke used to draw the outline of the section labels
labelShadowPaint - The paint used to draw the shadow for the section labels
labelPaint - The color used to draw the section labels
labelGap - The gap between the labels and the plot as a percentage of the plot width.
labelBackgroundPaint - The color used to draw the background of the section labels. If this is null, the background is not filled.
startAngle - The starting angle
circular - A boolean value indicating whether whether to draw an ellipse or a perfect circle.
direction - The direction for the pie segments. If value is not set "anticlockwise" then by default it is clockwise.
sectionOutlinePaint - The outline paint for ALL sections (overrides list).
sectionOutlineStroke - The outline stroke for ALL sections (overrides list).
sectionOutlinesVisible - A flag that controls whether or not an outline is drawn for each section in the plot.
baseSectionOutlinePaint - The base section outline paint
baseSectionPaint - The base section paint
baseSectionOutlineStroke - The base section outline stroke
2. Usage:
<p:document xmlns:p="http://jboss.com/products/seam/pdf">
<p:piechart title="Pie Chart" circular="false" direction="anticlockwise"
startAngle="30" labelGap="0.1" labelLinkPaint="red">
<p:series key="Prices">
<p:data key="2003" columnKey="2003" value="7.36" />
<p:data key="2004" columnKey="2004" value="11.50" />
<p:data key="2005" columnKey="2005" value="34.625" />
<p:data key="2006" columnKey="2006" value="76.30" />
<p:data key="2007" columnKey="2007" value="85.05" />
</p:series>
</p:piechart>
</p:document>
--
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
13 years, 11 months