[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-432) Support @IfInvalid functionality without @IfInvalid
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-432?page=all ]
Gavin King updated JBSEAM-432:
------------------------------
Fix Version/s: 1.1.0.CR1
Assignee: Gavin King
> Support @IfInvalid functionality without @IfInvalid
> ---------------------------------------------------
>
> Key: JBSEAM-432
> URL: http://jira.jboss.com/jira/browse/JBSEAM-432
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.1.0.BETA1
> Reporter: Christian Bauer
> Assigned To: Gavin King
> Fix For: 1.1.0.CR1
>
>
> The "Previous Page" button has to Update Model Values, but not Process Validations:
> <h:form>
> <f:facet name="beforeInvalidField">
> <h:graphicImage value="/img/attention.gif"
> width="18" height="18"
> styleClass="attentionImage"/>
> </f:facet>
> <f:facet name="afterInvalidField">
> <s:message/>
> </f:facet>
> <f:facet name="aroundInvalidField">
> <s:span styleClass="errors"/>
> </f:facet>
> <div class="errors" align="center">
> <h:messages globalOnly="true"/>
> </div>
> <s:validateAll>
> <div class="entry">
> <div class="label">#{messages['Firstname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.firstname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Lastname']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.lastname}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label">#{messages['Email']}:</div>
> <div class="input">
> <s:decorate>
> <h:inputText size="32" required="true"
> value="#{register.user.email}"/>
> </s:decorate>
> </div>
> </div>
> <div class="entry">
> <div class="label"> </div>
> <div class="input">
> <h:commandButton value="#{messages['PrevPage']}" styleClass="button"
> action="register"/>
> <h:commandButton value="#{messages['NextPage']}" styleClass="button"
> action="#{register.enterProfile}"/>
> </div>
> </div>
> </s:validateAll>
> </h:form>
--
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
19 years, 5 months
[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-374) Normalize the event model
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-374?page=all ]
Gavin King updated JBSEAM-374:
------------------------------
Fix Version/s: 1.1.1.GA
(was: 1.1.0.CR1)
slip
> Normalize the event model
> -------------------------
>
> Key: JBSEAM-374
> URL: http://jira.jboss.com/jira/browse/JBSEAM-374
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Reporter: Gavin King
> Assigned To: Gavin King
> Fix For: 1.1.1.GA
>
>
> Currently some events can be handled by either an @Observer method, or a method binding in events.xml. Ideally we would like this to be true for ALL events, but for now our integration with JSF and jBPM is not quite that deep. Nevertheless, there are some things we could do to allow a more consistent model where everything can be handled by either a method binding or an annotated method:
> (1) Rebuild the page actions functionality on top of the Seam event bus - defining standard org.jboss.seam.page.<viewId> events that can be handled via @Observer("org.jboss.seam.page./myViewId.xhtml")
> (2) Introduce "outcome observers" for JSF: if I have <h:commandButton action="myOutcome"/>, allow us to handle it using @Observer("org.jboss.seam.outcome.myOutcome")
> (3) Ditto for jBPM: if I have <transition name="myTransition" ... />, allow us to handle it using @Observer("org.jboss.seam.transition.myTransition")
> (4) Finally, introduce annotations layered over @Observer: @RenderPage("/myViewId.xhtml"), @Outcome("myOutcome"), @Transition("myTransition")
--
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
19 years, 5 months
[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-426) Stateful bean destruction wants extended EM to join a transaction and fails
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-426?page=all ]
Gavin King closed JBSEAM-426.
-----------------------------
Fix Version/s: 1.1.0.BETA2
Resolution: Done
Assignee: Gavin King
this was already fixed.
> Stateful bean destruction wants extended EM to join a transaction and fails
> ---------------------------------------------------------------------------
>
> Key: JBSEAM-426
> URL: http://jira.jboss.com/jira/browse/JBSEAM-426
> Project: JBoss Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.0.BETA1
> Reporter: Christian Bauer
> Assigned To: Gavin King
> Fix For: 1.1.0.BETA2
>
>
> @Name("register")
> @Scope(ScopeType.CONVERSATION)
> @Stateful
> public class RegisterBean implements Register {
> @In
> private User currentUser;
> @In(create = true)
> private EntityManager caveatEmptorEM;
> @In(create=true)
> private transient FacesMessages facesMessages;
> private String verifyPassword;
> public String getVerifyPassword() {
> return verifyPassword;
> }
> public void setVerifyPassword(String verifyPassword) {
> this.verifyPassword = verifyPassword;
> }
> @Begin(join = true, flushMode = FlushModeType.MANUAL)
> public String enterAccount() {
> System.out.println("################### FLUSHMODE" +
> ((HibernateEntityManager)caveatEmptorEM).getSession().getFlushMode());
> if (
> verifyPasswordMismatch(currentUser.getPassword())
> ||
> usernameExists(currentUser.getUsername())
> ) {
> return null; // Redisplay page
> } else {
> return "profile";
> }
> }
> @IfInvalid(outcome = Outcome.REDISPLAY)
> public String enterProfile() {
> return "confirm";
> }
> @End
> public String doRegister() {
> System.out.println("################### FLUSHMODE" +
> ((HibernateEntityManager)caveatEmptorEM).getSession().getFlushMode()); // This is also wrong, different issue
> if ( usernameExists(currentUser.getUsername()) )
> return "register";
> caveatEmptorEM.persist(currentUser);
> caveatEmptorEM.flush();
> // Remove the "currentUser" from the session context. This is a detached object
> // after this method returns. We don't want it to leak into the next conversation!
> Contexts.getSessionContext().remove("currentUser");
> facesMessages
> .addFromResourceBundle("SuccessfulRegistration");
> return "login";
> }
> @Remove @Destroy
> public void destroy() {}
> ...
> }
> Exception during @Destroy:
> 00:03:34,505 DEBUG [org.jboss.seam.contexts.Contexts] destroying: conversation
> 00:03:34,505 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.conversation
> 00:03:34,505 DEBUG [org.jboss.seam.contexts.Contexts] destroying: register
> 00:03:34,505 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.register
> 00:03:34,506 DEBUG [org.jboss.seam.Component] trying to inject with hierarchical context search: caveatEmptorEM
> 00:03:34,506 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: caveatEmptorEM
> 00:03:34,507 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
> 00:03:34,507 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.register
> 00:03:34,507 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.register
> 00:03:34,507 DEBUG [org.jboss.seam.interceptors.RemoveInterceptor] Stateful component was removed: register
> 00:03:34,508 WARN [org.jboss.seam.contexts.Contexts] Could not destroy component: register
> javax.ejb.EJBException: java.lang.IllegalStateException: EntityManager is closed
> at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
> ...
> Caused by: java.lang.IllegalStateException: EntityManager is closed
> at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:42)
> at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:447)
> at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:442)
> at org.jboss.seam.core.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:91)
> at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
> at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:101)
> at org.jboss.seam.Component.callComponentMethod(Component.java:1642)
> at org.jboss.seam.Component.unwrap(Component.java:1663)
> at org.jboss.seam.Component.getInstance(Component.java:1501)
> at org.jboss.seam.Component.getInstance(Component.java:1461)
> at org.jboss.seam.Component.getInstanceToInject(Component.java:1688)
> at org.jboss.seam.Component.injectFields(Component.java:1218)
> at org.jboss.seam.Component.inject(Component.java:988)
> at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
> I can't make the doRegister() method @End @Remove @Destroy, it throws exceptions.
--
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
19 years, 5 months