[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2192) AbstractMap from org.jboss.seam.international.Messages needs containsKey()
by Damian Harvey (JIRA)
AbstractMap from org.jboss.seam.international.Messages needs containsKey()
--------------------------------------------------------------------------
Key: JBSEAM-2192
URL: http://jira.jboss.com/jira/browse/JBSEAM-2192
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.CR2
Environment: Mac OSX, Jboss 4.2.1
Reporter: Damian Harvey
Performing a containsKey() on the AbstractMap from org.jboss.seam.international.Messages results in severe performance problems (800ms on 1,800 properties compared to under 1ms for a get())
eg:
@In
Map<String, String> messages; //This is the Seam messages bundle
public void aMethod() {
if(messages.containsKey("key.mykey")) {
//do something
}
}
I traced the containsKey for a while but it went on a mad run through ELResolvers and Pages.java etc.
Simple solution is to add a containsKey to the AbstractMap:
public boolean containsKey(String key) {
if(messages.get(key).equals(key)) {
return false;
} else {
return true;
}
}
Would be nice to know why this 'mad run' happened though. Hopefully not symptomatic of something wrong deeper down.
Cheers,
Damian.
--
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, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1972) s:decorate input control ID change from 1.2.1 to 2.0
by steve tynor (JIRA)
s:decorate input control ID change from 1.2.1 to 2.0
----------------------------------------------------
Key: JBSEAM-1972
URL: http://jira.jboss.com/jira/browse/JBSEAM-1972
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 2.0.0.CR1
Reporter: steve tynor
I'm not sure if this is a bug or is intended behavior, but component ID's have changed from Seam version 1.2.1 to 2.0.0.CR1. This has broken our Selenium integration tests and many of our Javascript functions which access and manipulate the input controls via DHTML.
Given something like:
<s:decorate id="fooDecoration" template="/WEB-INF/facelets/templates/edit.xhtml">
<ui:define name="label">Foo</ui:define>
<h:inputText id="foo" value="#{fooHome.instance.foo}"/>
</s:decorate>
In Seam1.2.1, the control was addressable as "fooForm:foo". In Seam2, that has changed and we must address it as "fooForm:fooDecoration:foo".
Is this intentional? Is it likely to change before 2.0.0GA?
--
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, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1952) persistenceUnitProperties on EntityManagerFactory must be parameterized
by Dan Allen (JIRA)
persistenceUnitProperties on EntityManagerFactory must be parameterized
-----------------------------------------------------------------------
Key: JBSEAM-1952
URL: http://jira.jboss.com/jira/browse/JBSEAM-1952
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.CR1
Reporter: Dan Allen
Priority: Minor
The XML configuration schema boast support for persistence-unit-properties on the EntityManagerFactory component. However, the configuration does not work because persistenceUnitProperties is not parameterized and therefore the Seam map converter cannot figure out what to do. If key/value pairs are specified, Seam fails to start.
Here is an example:
<persistence:entity-manager-factory name="emf" persistence-unit-name="pu">
<persistence:persistence-unit-properties>
<key>hibernate.hbm2ddl.auto</key>
<value>create-drop</value>
</persistence:persistence-unit-properties>
</persistence:entity-manager-factory>
Here is the exception that is thrown:
Caused by: java.lang.IllegalArgumentException: collection type not parameterized
at org.jboss.seam.util.Reflections.getCollectionElementType(Reflections.java:188)
at org.jboss.seam.Component$MapInitialValue.<init>(Component.java:2457)
at org.jboss.seam.Component.getInitialValue(Component.java:526)
at org.jboss.seam.Component.getTopInitialValue(Component.java:510)
at org.jboss.seam.Component.initInitializers(Component.java:488)
at org.jboss.seam.Component.<init>(Component.java:260)
at org.jboss.seam.Component.<init>(Component.java:214)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:940)
Unfortunately, the best option we have, from the converters that Seam supports, is to make it a Map<String, String>. In the patch supplied I have used this signature.
--
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, 1 month