[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1117) support enum types in @RaiseEvent or a new @RaiseEventType annotation
by Bradley Smith (JIRA)
support enum types in @RaiseEvent or a new @RaiseEventType annotation
---------------------------------------------------------------------
Key: JBSEAM-1117
URL: http://jira.jboss.com/jira/browse/JBSEAM-1117
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Bradley Smith
RaiseEvent:
@Target(METHOD)
@Retention(RUNTIME)
@Documented
public @interface RaiseEvent
{
/**
* The event name, defaults to the name
* of the method.
*
* @return the event name
*/
String value() default "";
//TODO: String[] ifOutcome() default {};
}
Is it possible to make the value be based on an enum type? I currently have all my application event types enumerated in enum called EventType.
I've tried doing:
@RaiseEvent(EventType.ApplicationSaved.name())
however, this doesn't count as a constant String and is invalid syntax. It seems more 'elegant' to be able to enumerate the event types of an application in something like an enum than to sprinkle strings throughout the code with the specific event String values.
Maybe an alternate annotation is called for - say, @RaiseEventType(MyEnum.MyEventType)?
I'm not sure - I don't have a solid grasp of the syntax used to define an annotation.
--
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-1110) Support multiple bundle for a view-id in pages.xml
by Bing Zou (JIRA)
Support multiple bundle for a view-id in pages.xml
--------------------------------------------------
Key: JBSEAM-1110
URL: http://jira.jboss.com/jira/browse/JBSEAM-1110
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 1.2.0.GA
Reporter: Bing Zou
Since Seam supports Facelets. A typical thing we do by using Facelets is the idea of templates. For example, two concrete pages a.xhtml, b.xhtml both extend from template.xhtml. We want to separate the resource bundle for each concrete page as a coding standard. Then in pages.xml we will have
<page view-id="/parentfolder/a.xhtml" bundle="parentFolder/a" />
<page view-id="/parentfolder/b.xhtml" bundle="parentFolder/b" />
However, since both a.xhtml and b.xhtml has the same template.xhtml, we want to separate the common fields from template.xhtml to it's own resource bundle. Therefore, for each view-id should have an additional bundle, for example,
<page view-id="/parentfolder/a.xhtml" bundle="parentFolder/a,parentFolder/template" />
Or maybe Seam can be smart to find out that a.xhtml extends from template.xhtml and there is a <page view-id="/parentFolder/template.xhtml" bundle="parentFolder/template" /> and then both bundle will be available for view-id a.xhtml. Of course, if there is any conflict, the child page always override parent page's property.
--
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-1055) Query Pagination in JBoss Seam Framework
by Antonio Navas (JIRA)
Query Pagination in JBoss Seam Framework
----------------------------------------
Key: JBSEAM-1055
URL: http://jira.jboss.com/jira/browse/JBSEAM-1055
Project: JBoss Seam
Issue Type: Patch
Components: Framework
Affects Versions: 1.2.0.GA
Reporter: Antonio Navas
Priority: Minor
I'm not sure that this is the correct procedure, but I want to contribute to this project....
I think there is an issue regarding pagination in EntityQuery. The problem is that it adds an unnecessary last page when the actual size of the result list equals the maxResults attribute. For example, if maxResults is set to 5 and the total result count for the query is 10, the pagination returns 3 pages instead of 2, and the last page is empty. I think that the implementation of the methods "isNextExists" and "getLastFirstResult" are wrong, and the correct implementation should be:
public boolean isNextExists() {
return getResultCount() > (getFirstResult() == null ? 0 : getFirstResult()) + getMaxResults();
}
public long getLastFirstResult() {
return ( (getResultCount()-1) / getMaxResults() ) * getMaxResults();
}
--
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