[JBoss Seam] - problem with s:button, s:link and action
by Vitalik
I try to use s:button with action attribute and i use EntityHome class: xml-declarations kinds in components.xml:
| <factory name="myEntity" value="#{myEntityHome.instance}"/>
| <fwk:entity-home name="myEntityHome"
| entity-class="com.mycompany.MyEntity"
| entity-manager="#{entityManager}"/>
|
With s:button action-attribute i assign following:
<s:button action="#{myEntityHome.persist}" view="/myPage.xhtml" value="Create" />
Also I have following form:
| <s:validateAll>
| <div>
| <table>
| <tr>
| <td><h:outputLabel value="#{messages['common.name']}"/></td>
| <td><s:decorate><h:inputText value="#{myEntity.name}"/></s:decorate></td>
| </tr>
| <tr>
| <td><h:outputLabel value="#{messages['common.description']}"/></td>
| <td><h:inputText value="#{myEntity.description}"/></td>
| </tr>
| </table>
| </div>
| </s:validateAll>
|
But I get entity with empty fields in my database, when I click on the button.
All works well, if I use <h:commandButton ... />
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994742#3994742
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994742
19 years, 4 months
[JBoss jBPM] - 3.2alpha2 enterprise / JTA exceptions
by dhartford
Hey all,
I'm playing with the enterprise-version in SCM and just came across two issues to share:
1. The jbpm-console.war within the .ear package may want to have the javassist.jar under WEB-INF/lib removed as it already exists in the Jboss AS.
2. JTA issue on a JEMS-installed JBoss 4.0.5.GA-EJB3 profile server:
| 11:53:12,518 ERROR [STDERR] Dec 18, 2006 11:53:12 AM com.sun.facelets.FaceletViewHandler handleRenderException
| SEVERE: Error Rendering View[/main/user/usertasklist.xhtml]
| javax.el.ELException: /search/form/formtemplate.xhtml @14,73 session="#{jbpmBean.jbpmContext.session}": org.hibernate.Hi
| bernateException: Unable to locate current JTA transaction
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
| at org.jbpm.webapp.tag.jbpm.ui.Search.getSession(Search.java:47)
| at org.jbpm.webapp.tag.jbpm.ui.UICriteria.initialize(UICriteria.java:70)
| at org.jbpm.webapp.tag.jbpm.ui.UICriteria.initialize(UICriteria.java:110)
| at org.jbpm.webapp.tag.jbpm.ui.UICriteria.getSearchBean(UICriteria.java:203)
| at org.jbpm.webapp.tag.jbpm.ui.Search.initialize(Search.java:187)
| at org.jbpm.webapp.tag.jbpm.ui.Search.encodeBegin(Search.java:92)
| ....
| ...
| Caused by: org.hibernate.HibernateException: Unable to locate current JTA transaction
| at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:61)
| at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:542)
| at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:103)
| at org.jbpm.JbpmContext.getSession(JbpmContext.java:467)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994738#3994738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994738
19 years, 4 months