[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3920) Seam-gen creates code which will not compile for multiple foreign keys (mysql)
by philip andrew (JIRA)
Seam-gen creates code which will not compile for multiple foreign keys (mysql)
------------------------------------------------------------------------------
Key: JBSEAM-3920
URL: https://jira.jboss.org/jira/browse/JBSEAM-3920
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.1.GA
Reporter: philip andrew
The bug is described at forum reference. Duplicate description is below.
Hi,
I have two mysql tables, user and staff. On my user table I have three foreign keys, social_security_assistance_confirmed_by_staff_id, approved_by_staff_id, rejected_by_staff_id, all reference staff.id.
I seam-gen with seam generate-entities and one problem is it makes my UserHome class wrong with:
@Name("userHome")
public class UserHome extends EntityHome<User> {
@In(create = true)
StaffHome staffHome;
@In(create = true)
StaffHome staffHome;
@In(create = true)
StaffHome staffHome;
That does NOT compile, how come it generates this? Everything is ok if I delete the multiples and cut it down to one.
Here are the mysql tables
CREATE TABLE `staff` (
`id` int(10) NOT NULL auto_increment,
`user` varchar(80) collate utf8_unicode_ci NOT NULL,
`password` varchar(80) collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user` (`user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
CREATE TABLE `user` (
`id` int(10) NOT NULL auto_increment,
`user` varchar(80) collate utf8_unicode_ci NOT NULL,
`password` varchar(80) collate utf8_unicode_ci NOT NULL,
`first_name_chinese` varchar(80) collate utf8_unicode_ci default NULL,
`last_name_chinese` varchar(80) collate utf8_unicode_ci default NULL,
`first_name_english` varchar(80) collate utf8_unicode_ci default NULL,
`last_name_english` varchar(80) collate utf8_unicode_ci default NULL,
`hk_id_number` varchar(20) collate utf8_unicode_ci NOT NULL,
`date_of_birth` date NOT NULL,
`contact_phone_number` varchar(20) collate utf8_unicode_ci default NULL,
`email` varchar(80) collate utf8_unicode_ci NOT NULL,
`address` varchar(255) collate utf8_unicode_ci default NULL,
`school` varchar(80) collate utf8_unicode_ci default NULL,
`social_security_assistance_indicated` tinyint(1) NOT NULL,
`social_security_assistance_confirmed` tinyint(1) NOT NULL default '0',
`social_security_assistance_confirmed_by_staff_id` int(10) default NULL,
`date_signed` date default NULL,
`approved_by_staff` tinyint(1) NOT NULL default '0',
`approved_by_staff_id` int(10) default NULL,
`rejected_by_staff` tinyint(1) NOT NULL default '0',
`rejected_by_staff_id` int(10) default NULL,
`blacklist` tinyint(1) NOT NULL default '0',
`created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`updated` timestamp NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `user` (`user`),
UNIQUE KEY `hk_id_number` (`hk_id_number`),
UNIQUE KEY `email` (`email`),
KEY `social_security_assistance_confirmed_by_staff_id_idxfk` (`social_security_assistance_confirmed_by_staff_id`),
KEY `approved_by_staff_id_idxfk` (`approved_by_staff_id`),
KEY `rejected_by_staff_id_idxfk` (`rejected_by_staff_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
ALTER TABLE `user`
ADD CONSTRAINT `user_ibfk_3` FOREIGN KEY (`rejected_by_staff_id`) REFERENCES `staff` (`id`),
ADD CONSTRAINT `user_ibfk_1` FOREIGN KEY (`social_security_assistance_confirmed_by_staff_id`) REFERENCES `staff` (`id`),
ADD CONSTRAINT `user_ibfk_2` FOREIGN KEY (`approved_by_staff_id`) REFERENCES `staff` (`id`);
--
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, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2658) s:defaultAction only works 1 submit
by Susanne Jarl (JIRA)
s:defaultAction only works 1 submit
-----------------------------------
Key: JBSEAM-2658
URL: http://jira.jboss.com/jira/browse/JBSEAM-2658
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.1.GA
Environment: JBoss 4.2.2, RichFaces 3.1.4, Firefox 2.0.0.12, Windows XP
Reporter: Susanne Jarl
I use the s:defaultAction and it works the first time i hit enter, but if the inputtextfield is not validated and/or I get an error message, and then hit enter in the inputtextfield again it does not work. But if I click the submitbutton instead the second time it works. So there is a difference between clicking the button and hit enter the second time.
This is my code:
<h:form>
<s:validateAll>
<h:panelGrid columns="2">
<h:outputLabel value="#{messages['programkey.writePin']}:" for="pinCode" title="#{messages['handin.pinCode.title']}" />
<s:decorate for="pinCode">
<h:inputSecret id="pinCode" label="#{messages['programkey.writePin']}" value="#{agentHandler.pinCode}" size="4" required="true" />
<h:message for="pinCode" styleClass="errorMessage" />
</s:decorate>
<a4j:commandButton action="#{handin.handin}" value="#{messages['generic.button.ok']}" reRender="pollForProgrammingResult, pinCodePanel, feedbackPanel">
<s:defaultAction/>
</a4j:commandButton>
<s:button value="#{messages['generic.button.cancel']}" onclick="Richfaces.hideModalPanel('programModalPanel')"/>
</h:panelGrid>
</s:validateAll>
</h:form>
I have this form in a RichFaces modal panel.
--
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, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-633) remoting extension in handling exceptions on client side
by Nico Gau (JIRA)
remoting extension in handling exceptions on client side
--------------------------------------------------------
Key: JBSEAM-633
URL: http://jira.jboss.com/jira/browse/JBSEAM-633
Project: JBoss Seam
Issue Type: Patch
Components: Remoting
Affects Versions: 1.1.0.GA
Reporter: Nico Gau
Priority: Optional
Hi all,
I don't really know what JIRA is by the way, so hopefully nobody is upset by this post. I first mailed Gavin but he told me I should put it in JIRA.
I currently work on a project which uses Seam Remoting directly and I didn't find a neat way in handling errors on the client side as Exceptions are not propagated to it. Therefore I changed Seam to transmit all exceptions which can be handled in the javascript part via another callback. E.g.:
Seam.Component.getInstance('userManager').currentUser(function(user) {
alert("user: " + user);
},
function(ex) {
alert("exception occured: " + ex.getMessage());
});
As the exception handler is optional, the change would not brake any client code. If you are interested in the change, you can reach me at heinzbeinz AT googlemail.com
--
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, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3904) Property 'logout' not found on type Identity when commeting XHTML
by Loïc Lefèvre (JIRA)
Property 'logout' not found on type Identity when commeting XHTML
-----------------------------------------------------------------
Key: JBSEAM-3904
URL: https://jira.jboss.org/jira/browse/JBSEAM-3904
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.1.GA
Environment: Windows XP
JBoss AS 5.0.0
Reporter: Loïc Lefèvre
If I comment in booking example the file view/template.xhtml:
...
<div id="document">
<div id="header">
<div id="title"><img src="img/hdr.title.gif" alt="JBoss Suites: seam framework demo"/></div>
<!-- <div id="status">
Welcome #{user.name}
| <s:link id="search" view="/main.xhtml" value="Search" propagation="none"/>
| <s:link id="settings" view="/password.xhtml" value="Settings" propagation="none"/>
| <s:link id="logout" action="#{identity.logout}" value="Logout"/>
</div> -->
</div>
...
for test purposes, I get the following exception:
14:45:12,255 ERROR [viewhandler] Error Rendering View[/main.xhtml]
javax.el.PropertyNotFoundException: Property 'logout' not found on type org.jboss.seam.security.Identity
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170)
at javax.el.BeanELResolver.property(BeanELResolver.java:279)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.ELText$ELTextVariable.toString(ELText.java:174)
at com.sun.facelets.el.ELText$ELTextComposite.toString(ELText.java:115)
at com.sun.facelets.compiler.CommentInstruction.write(CommentInstruction.java:38)
at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
at com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
--
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, 2 months