[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2111) coerceToType / javaassist error when converting types for multi selection
by Damian Harvey (JIRA)
coerceToType / javaassist error when converting types for multi selection
-------------------------------------------------------------------------
Key: JBSEAM-2111
URL: http://jira.jboss.com/jira/browse/JBSEAM-2111
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.CR2
Environment: Mac OSX. Jboss 4.2.1, Java 1.5
Reporter: Damian Harvey
When trying to display values in an h:selectManyCheckbox I get an error:
java.lang.IllegalArgumentException: Cannot convert com.locuslive.odyssey.entity.Groups@3960f3 of typ
e class com.locuslive.odyssey.entity.Groups to class com.locuslive.odyssey.entity.Groups_$$_javassis
t_219
I have created a very basic project with PERSON, GROUP and PERSONGROUP entities. I've attached it after emptying the lib directory.
Essentially on the PersonEdit page I want to be able to select which Groups the Person may belong to. This is done with the selectManyCheckbox. The checkbox is populated with a list of GROUPs from a GroupList. It is bound to a variable in the PersonHome called 'groups'. This is a list of Groups that is extracted from the PersonGroup table for that user.
The stacktrace is in the forum post. I have also generated the attached project under Seam 1.2.1.GA and the problem is not there.
--
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
16 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2132) consult class attribute on component XML declaration with namespace
by Dan Allen (JIRA)
consult class attribute on component XML declaration with namespace
-------------------------------------------------------------------
Key: JBSEAM-2132
URL: http://jira.jboss.com/jira/browse/JBSEAM-2132
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.CR2
Reporter: Dan Allen
Assigned To: Dan Allen
Priority: Critical
Fix For: 2.0.1.GA
When a component template class is being configured (such as EntityHome, EntityQuery, etc), the class attribute should be considered prior to deriving the class name from the namespace info + XML element name. Doing so prevents the case where two components are being configured for the same name when the developer intends only to use it for configuration.
Case in point:
Let's say I create a class that extends EntityHome to provide some extra behavior.
@Name("myEntityHome")
public class MyEntityHome extends EntityHome {
}
Now I want to configure the properties of this class in components.xml
<framework:entity-home name="myEntityHome" class="org.example.model.MyEntityHome">
<framework:created-message>You created it! Yeah!</framework:created-message>
<framework:updated-message>You updated it! Yeah!</framework:updated-message>
<framework:deleted-message>You deleted it! Yeah!</framework:deleted-message>
</framework:entity-home>
If the class attribute is not consulted, it will look for a @Name annotation on org.jboss.seam.framework.EntityHome rather than org.example.model.MyEntityHome. When it doesn't find one on the built-in class, it tries to create a new component definition.
Why would I want to use XML namespace tags in this case? Simple. Tag completion and property recognition support.
Note that this works if the class resolved from XML namespace + element name is the same as the component class. In the case when the component class extends the built-in class, you get this problem.
--
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
16 years, 10 months