[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1161) s:link breaks @DataModelSelection functionallity, when having a page action
by Daniel Wiell (JIRA)
s:link breaks @DataModelSelection functionallity, when having a page action
---------------------------------------------------------------------------
Key: JBSEAM-1161
URL: http://jira.jboss.com/jira/browse/JBSEAM-1161
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.2.1.GA
Environment: Seam 1.2.1.GA, MyFaces 1.1.6 nighly from march, Facelets 1.1.11
Reporter: Daniel Wiell
If a s:link is used to select a row in a dataTable. A field annotated with @DataModelSelection always get the first row of the dataModel **if** the view has a page action. When the page action is removed or a regular h:commandLink is used, everything works as expected.
Here are some code to help reproducing this:
------------------------ The controller
@Name("fruitStore")
public class FruitStore {
public static final List<Fruit> FRUITS = Arrays.asList(
new Fruit(1, "Apple", "Red"),
new Fruit(2, "Pear", "Green"),
new Fruit(3, "Orange", "Orange"),
new Fruit(4, "Banana", "Yellow"));
@DataModel(scope = ScopeType.PAGE)
private List<Fruit> fruits = FRUITS;
@DataModelSelection
private Fruit selectedFruit;
public Fruit getSelectedFruit() { return selectedFruit; }
public String init() { return null; }
}
------------------------ The domain object
public class Fruit {
private long id;
private String name;
private String color;
public Fruit(long id, String name, String color) {
this.id = id;
this.name = name;
this.color = color;
}
public long getId() { return id; }
public void setId(long id) { this.id = id; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public String getColor() { return color; }
public void setColor(String color) { this.color = color; }
}
------------------------ Relavant parts from pages.xml
<page view-id="/fruitSelection.xhtml" action="#{fruitStore.init}">
<navigation>
<rule if-outcome="selectFruit">
<begin-conversation/>
<redirect view-id="/fruitOverview.xhtml">
<param name="fruitId" value="#{fruitStore.selectedFruit.id}"/>
</redirect>
</rule>
</navigation>
</page>
------------------------ fruitSelection.xhtml
<?xml version='1.0' encoding='UTF-8'?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib">
<head></head>
<body>
<h:form>
Select a fruit:
<h:dataTable var="fruit" value="#{fruits}">
<h:column>
<!-- The page action (action="#{fruitStore.init}") breaks the @DataModelSelection
functionallity. It always get the first row.
When removing the page action everything works -->
<s:link value="#{fruit.name}" action="selectFruit"/>
</h:column>
<h:column>
<!-- This works -->
<h:commandLink value="#{fruit.name}" action="selectFruit"/>
</h:column>
</h:dataTable>
</h:form>
</body>
--
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
18 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1160) EMF implicit lookup/resolve precedence
by Christian Bauer (JIRA)
EMF implicit lookup/resolve precedence
--------------------------------------
Key: JBSEAM-1160
URL: http://jira.jboss.com/jira/browse/JBSEAM-1160
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Christian Bauer
Currently impossible to use WAR deployment and Unit testing. Only way to configure it is as follows:
<core:managed-persistence-context name="entityManager"
auto-create="true"
entity-manager-factory="#{wikiEntityManagerFactory}"
persistence-unit-jndi-name="java:/EntityManagerFactories/wiki">
</core:managed-persistence-context>
<core:entity-manager-factory installed="@seamPersistenceUnit@" name="wikiEntityManagerFactory" persistence-unit-name="wiki"/>
<core:ejb installed="@embeddedEjb@"/>
So either the EMF is started by Seam during WAR deployment (seamPersistenceUnit) and available as a component instance in application scope, or the EMF is deployed by the E-EJB3 container and bound to JNDI with the magic JBoss configuration property in persistence.xml.
The managed-persistence-context now needs to access the EMF polymorphically, no matter where it is bound. If you try the above code, you will see that the entity-manager-factory attribute always has precedence, and if it resolves to null, you get an NPE. Instead, the JNDI lookup should be attempted.
--
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
18 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1168) Attempting to configure parent conversation id parameter throws exception
by Mike Quilleash (JIRA)
Attempting to configure parent conversation id parameter throws exception
-------------------------------------------------------------------------
Key: JBSEAM-1168
URL: http://jira.jboss.com/jira/browse/JBSEAM-1168
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.1.6.GA
Environment: Any
Reporter: Mike Quilleash
Defining this (note this is what the xsd defines)
<core:manager conversation-timeout="5000" conversation-id-parameter="cid" conversation-is-long-running-parameter="clr" parent-conversation-id-parameter="pcid"/>
Throw the following:
java.lang.IllegalArgumentException: no such setter method: org.jboss.seam.core.Manager.parentConversationIdParameter
at org.jboss.seam.util.Reflections.getSetterMethod(Reflections.java:198)
at org.jboss.seam.Component.initInitializers(Component.java:375)
at org.jboss.seam.Component.<init>(Component.java:266)
at org.jboss.seam.Component.<init>(Component.java:207)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:781)
at org.jboss.seam.init.Initialization.addComponents(Initialization.java:690)
at org.jboss.seam.init.Initialization.init(Initialization.java:451)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
As Manager.setParentConversationIdParameter() is protected, not public.
--
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
18 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1186) log API improvement
by Mikhail Grushinskiy (JIRA)
log API improvement
-------------------
Key: JBSEAM-1186
URL: http://jira.jboss.com/jira/browse/JBSEAM-1186
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Environment: all
Reporter: Mikhail Grushinskiy
Priority: Minor
Instead of
log.debug("Creating new order for user: #0 product: #1 quantity: #2", user.username(), product.name(), quantity);
#0, #1, #2
why couldn't we just always use
#?
Parameters are already ordered. There is no need to number them in the format string, this will be just another source of errors.
Another question what happens if you have more parameters after format string than
#n placeholders. I think in such case these parameters should be appended
at the end of the format string in output so not values are lost
.
--
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
18 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1188) Using the Seam exception filter without JTA throws exception
by Mike Quilleash (JIRA)
Using the Seam exception filter without JTA throws exception
------------------------------------------------------------
Key: JBSEAM-1188
URL: http://jira.jboss.com/jira/browse/JBSEAM-1188
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.1.GA
Environment: Tomcat 6, no microcontainer
Reporter: Mike Quilleash
Upgraded to Seam 1.2.1 and the following exception gets printed to the logs when there is an exception.
ERROR [org.jboss.seam.web.ExceptionFilter] [http-56000-1] (ExceptionFilter.java:136) - could not roll back transaction
javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.seam.util.Transactions.getUserTransaction(Transactions.java:153)
at org.jboss.seam.util.Transactions.isUTTransactionActiveOrMarkedRollback(Transactions.java:122)
at org.jboss.seam.util.Transactions.isTransactionActiveOrMarkedRollback(Transactions.java:50)
at org.jboss.seam.web.ExceptionFilter.rollbackTransactionIfNecessary(ExceptionFilter.java:128)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
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)
I don't have JTA/microcontainer installed as I just want to use the exception filter for redirecting on error, rolling back transactions should be disabled/skipped in a non JTA configuration.
--
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
18 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1048) Documentation enhancement for injecting TaskInstance and ProcessInstance (add full package name)
by Arjan van Bentem (JIRA)
Documentation enhancement for injecting TaskInstance and ProcessInstance (add full package name)
------------------------------------------------------------------------------------------------
Key: JBSEAM-1048
URL: http://jira.jboss.com/jira/browse/JBSEAM-1048
Project: JBoss Seam
Issue Type: Feature Request
Components: Documentation
Affects Versions: 1.2.0.GA
Environment: All
Reporter: Arjan van Bentem
Priority: Optional
This may be too obvious for some, but maybe, just maybe, the following needs some enhancements:
http://fisheye.jboss.com/browse/JBoss/jboss-seam/doc/reference/en/modules... reads:
@StartTask
[...]
The jBPM TaskInstance will be available in a request context variable
named taskInstance. The jPBM ProcessInstance will be available in a
request context variable named processInstance. (Of course, these
objects are available for injection via @In.)
Built-in Seam components TaskInstance and ProcessInstance exist, but in fact are not used here. Due to the @Unwrap in org.jboss.seam.core.TaskInstance and ProcessInstance one actually gets an org.jbpm.taskmgmt.exe.TaskInstance and an org.jbpm.graph.exe.ProcessInstance injected.
The exception when the Java code expects a Seam component is in fact clear:
java.lang.IllegalArgumentException: Could not set field value by reflection:
TodoList.processInstance on: org.jboss.seam.example.todo.TodoList with
value: class org.jbpm.graph.exe.ProcessInstance
However, this error might be embedded in a long list of other exceptions. For example, when adding the injection to the TodoList example it will be the 5th embedded exception in a message that starts with "javax.servlet.ServletException: Cannot get value for expression '#{todoList.description}'".
Fix:
Maybe the text above could be changed to include the full package name (hoping that it will not change in the near future):
The jBPM org.jbpm.taskmgmt.exe.TaskInstance will be available in a request context variable
named taskInstance. The jBPM org.jbpm.graph.exe.ProcessInstance will be available in a
request context variable named processInstance. (Of course, these
objects are available for injection via @In.)
The very same text applies to @BeginTask.
When not changing the documentation then, as of now, at least JIRA will show a hit when searching for "injection AND ProcessInstance" ;-)
--
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
18 years, 10 months