[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2471) add s:concat and s:range functions
by Dan Allen (JIRA)
add s:concat and s:range functions
----------------------------------
Key: JBSEAM-2471
URL: http://jira.jboss.com/jira/browse/JBSEAM-2471
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.1.CR1
Reporter: Dan Allen
Assigned To: Dan Allen
Priority: Minor
Fix For: 2.0.x
Attachments: JBSEAM-2471-v1.txt
My #1 EL pet peeve is that there is no way to concatenate a string. This is like serious basic stuff and it is perfectly reasonable to want to perform this task in EL. I realize I could invent my own solution (and I have), but we want to sweep those common cases under the rug like what was done with the magic collection functions (size, isEmpty, etc).
How about s:concat('one', 'two')?
I am going to squeeze one more in here. I can't tell you the number of times I have needed to quickly create an iteration loop in the UI over a range of numbers, only to realize that there isn't an easy way aside from creating a component. Can we add an s:range() function that creates a collection on the fly?
s:range(1, 5)
This is somewhat of a precedence since the only two functions in s: right now are security related.
--
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, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1982) Improved documentation for Nested Conversations
by Jacob Orshalick (JIRA)
Improved documentation for Nested Conversations
-----------------------------------------------
Key: JBSEAM-1982
URL: http://jira.jboss.com/jira/browse/JBSEAM-1982
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.CR1
Reporter: Jacob Orshalick
Nested conversations have been discussed at length on several occasions on the forum. The documentation states:
"A conversation may be thought of as a continuable state. Nested conversations allow the application to capture a consistent continuable state at various points in a user interaction, thus insuring truly correct behavior in the face of backbuttoning and workspace management."
This gives the impression of use of nested conversations to achieve a continuation server approach. This approach is possible and is described at the forum reference, but it seems that most developers use nested conversations for sub-flows ending the conversation at the end of the sub-flow. This does not allow back-buttoning to the sub-flow (which seems to be in conflict with the documentation above).
(I will add a link to an article describing the continuation approach in a few weeks, perhaps it could serve as a patch)
--
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, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3302) Suquery not working correctly with <framework:restrictions>
by Tim Timson (JIRA)
Suquery not working correctly with <framework:restrictions>
-----------------------------------------------------------
Key: JBSEAM-3302
URL: https://jira.jboss.org/jira/browse/JBSEAM-3302
Project: Seam
Issue Type: Feature Request
Components: Framework
Environment: Windows XP
Reporter: Tim Timson
I have created a query in components xml and added a restriction using the <framework:restrictions> tag. The restriction should add a where clause, but instead it is adding an "and", thinking the "where" is already in place. I assume this is because there is a "where" statement in a subquery contained in the ejbql.
Here is the entry in components.xml which causes the error.
<framework:entity-query name="eventPricedItemsQuery"
ejbql="select pricedItem,
(select sum(cartEntries.amountCharged)
from Cart as cart
join cart.entries as cartEntries
join cartEntries.item as item
where pricedItem.id = item.id)
from PricedItem pricedItem">
<framework:restrictions>
<value>pricedItem.event = #{currentEvent}</value>
</framework:restrictions>
</framework:entity-query>
I can work around it by removing the restriction and adding a where clause to the ejbql, but have reasons for wanting to use the <framework:restrictions> tag instead.
Here is some of the stack trace I used to determine that an "and" was being placed into the query by Seam when a "where" should have been created:
Caused by: javax.el.ELException: /events/registration-report.xhtml @29,71 value="#{eventItems}": java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: and near line 1, column 879 [select pricedItem, (select sum(cartEntries.amountCharged) from com.el.sbo.model.user.Cart as cart join cart.entries as cartEntries join cartEntries.item as item where pricedItem.id = item.id) ,(select count(cartEntries.amountCharged) from com.el.sbo.model.user.Cart as cart join cart.entries as cartEntries join cartEntries.item as item where pricedItem.id = item.id) from com.el.sbo.model.event.PricedItem pricedItem and pricedItem.event = :el1]
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
at javax.faces.component.UIData.getValue(UIData.java:582)
... 68 more
Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: and near line 1, column 879 [select pricedItem, (select sum(cartEntries.amountCharged) from com.el.sbo.model.user.Cart as cart join cart.entries as cartEntries join cartEntries.item as item where pricedItem.id = item.id) ,(select count(cartEntries.amountCharged) from com.el.sbo.model.user.Cart as cart join cart.entries as cartEntries join cartEntries.item as item where pricedItem.id = item.id) from com.el.sbo.model.event.PricedItem pricedItem and pricedItem.event = :el1]
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:617)
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:96)
at org.jboss.seam.persistence.EntityManagerProxy.createQuery(EntityManagerProxy.java:79)
at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.createQuery(FullTextEntityManagerImpl.java:130)
at org.jboss.seam.persistence.EntityManagerProxy.createQuery(EntityManagerProxy.java:79)
at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:175)
--
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
17 years, 6 months