[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1530) Seam-gen: @Length in char(1) property
by Luiz Augusto Ruiz (JIRA)
Seam-gen: @Length in char(1) property
-------------------------------------
Key: JBSEAM-1530
URL: http://jira.jboss.com/jira/browse/JBSEAM-1530
Project: JBoss Seam
Issue Type: Bug
Components: Tools
Affects Versions: 1.3.0.ALPHA
Reporter: Luiz Augusto Ruiz
Seam-gen put a @Length Hibernate validator in char property. When a field of a table is CHAR(1) Hibernate generates a char property and seam-gen put a @Length(size=1).
This can be fixed updating the template pojo/GetPropertyAnnotation.ftl:
<#include "Ejb3PropertyGetAnnotation.ftl"/>
<#if !property.optional>
@${pojo.importType("org.hibernate.validator.NotNull")}
</#if>
<#if property.columnSpan==1>
<#assign column = property.getColumnIterator().next()/>
<#if !c2h.isManyToOne(property) && !c2h.isTemporalValue(property) && column.length!=255 && column.length!=1>
@${pojo.importType("org.hibernate.validator.Length")}(max=${column.length?c})
</#if>
</#if>
" && column.length!=1" fix the bug.
--
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, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-715) Allow multiple pages.xml files
by Stephan Bublava (JIRA)
Allow multiple pages.xml files
------------------------------
Key: JBSEAM-715
URL: http://jira.jboss.com/jira/browse/JBSEAM-715
Project: JBoss Seam
Issue Type: Feature Request
Components: JSF
Affects Versions: 1.1.1.GA
Reporter: Stephan Bublava
Currently it's possible to use one global pages.xml file or one file per page. I believe that both options are not well-suited for large applications.
Consider an application like:
/catalog/foo.xhtml
/bar.xhtml
/...
/basket/foo.xhtml
/bar.xhtml
/...
/admin/foo.xhtml
/bar.xhtml
/...
In this case using a global file would be too convoluted, but at the same time one file per page is too fine grained.
It would be great to allow one file per directory ("module"), either using a similar naming convention to page.xml or by adding an "import" tag to pages.xml.
--
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, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1289) Conversation Propagation andTrinidad Dialogs
by Brian Smith (JIRA)
Conversation Propagation andTrinidad Dialogs
--------------------------------------------
Key: JBSEAM-1289
URL: http://jira.jboss.com/jira/browse/JBSEAM-1289
Project: JBoss Seam
Issue Type: Feature Request
Environment: JBoss 4.0.4GA
Reporter: Brian Smith
Seam does not automatically support Trinidad's dialog feature in terms of propagating long running conversations to the dialog window.
Forum User dajevtic has provided a custom phase listener and action listener to enable propagation but it requires a specific naming convention for the dialog page. It would be nice to enable support directly using standard Seam notation like the s:conversationPropagation tag or @Begin(join = true)
Here are the relevant phase listener and action listener
*Phase Listener*
private static final String CONVERSATION_ID_SESSION_PARAMETER = "conversationId";
private Map createParameterMapForConversationRestore(String conversationId) {
Map paramterMap = new Hashtable();
paramterMap.put(CONVERSATION_ID_SESSION_PARAMETER, conversationId);
return paramterMap;
}
private void restoreConversation(Context context) {
if (context.isSet(CONVERSATION_ID_SESSION_PARAMETER)) {
String convId = context.get(CONVERSATION_ID_SESSION_PARAMETER).toString();
Manager.instance().restoreConversation(createParameterMapForConversationRestore(convId));
context.remove(CONVERSATION_ID_SESSION_PARAMETER);
}
}
public void afterPhase(PhaseEvent event) {
try {
if (event.getPhaseId().equals(PhaseId.RESTORE_VIEW)) {
UIViewRoot root = event.getFacesContext().getViewRoot();
if (root != null) {
String viewId = root.getViewId();
if ((viewId != null) && viewId.endsWith("_dlg.jspx")) {
restoreConversation(Contexts.getSessionContext());
}
}
} else {
log.info("after " + event.getPhaseId());
}
} catch (Exception e) {
log.error("Could not restore Seam conversation", e);
}
}
*Action Listener*
public void processAction(ActionEvent actionEvent)
throws AbortProcessingException {
if (actionEvent.getComponent() instanceof CoreCommandLink) {
CoreCommandLink link = (CoreCommandLink)actionEvent.getComponent();
if (link.isUseWindow()) {
Contexts.getSessionContext().set("conversationId", Manager.instance().getCurrentConversationId());
}
}
super.processAction(actionEvent);
}
--
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, 7 months