[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3676) s:validateEquality doesn't work in s:decorate
by Frederic Nauleau (JIRA)
s:validateEquality doesn't work in s:decorate
---------------------------------------------
Key: JBSEAM-3676
URL: https://jira.jboss.org/jira/browse/JBSEAM-3676
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.1.0.SP1
Environment: JBoss 4.2.2 with Java 1.5 (Mac Os X)
Reporter: Frederic Nauleau
Priority: Minor
Hello,
I have dicovered the s:validateEquality control. It's perfect for email and password double check.
I have a problem, if the tags are in a s:decorate template... The validation failed with this exception:
Caused by: java.lang.IllegalStateException: forId must reference an EditableValueHolder ("input") component
at org.jboss.seam.ui.validator.EqualityValidator$OtherComponent.<init>(EqualityValidator.java:168)
at org.jboss.seam.ui.validator.EqualityValidator.validate(EqualityValidator.java:74)
at org.richfaces.component.html.HtmlInputText.validateValue(HtmlInputText.java:35)
at javax.faces.component.UIInput.validate(UIInput.java:867)
This code is working:
<h:inputText id="emailInput" value="#{classicUser.email}" required="true">
<s:validate />
</h:inputText>
<h:inputText id="emailInputVerification">
<s:validateEquality message="Mails must be identical" for="emailInput" />
</h:inputText>
This code is not working
<s:decorate ...>
<h:inputText id="emailInput" value="#{classicUser.email}" required="true">
<s:validate />
</h:inputText>
</s:decorate>
<s:decorate ...>
<h:inputText id="emailInputVerification">
<s:validateEquality message="Mails must be identical" for="emailInput" />
</h:inputText>
</s:decorate>
Regards
--
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
15 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1350) Provide download component (e.g.<s:download value=#{FileManager.getFileById('10')" contentType="#{FileManager.contentType}" />)
by jarkko Lietolahti (JIRA)
Provide download component (e.g.<s:download value=#{FileManager.getFileById('10')" contentType="#{FileManager.contentType}" />)
-------------------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-1350
URL: http://jira.jboss.com/jira/browse/JBSEAM-1350
Project: JBoss Seam
Issue Type: Feature Request
Reporter: jarkko Lietolahti
<s:download value=#{FileManager.getFileById('10')" contentType="#{FileManager.contentType}" />
We're going to create new (more general component) which allows the user to download a file (any resource, Excel file, Document whatever).
The plan is to create a new UI component named UIDownload which has attributes like value, contentType (some more?).
1) UIDownload a backing bean (value) (is this still valid word in the seam world?) to generate the data ( allow byte[], OutputStreams ?).
2) UIDownload creates DownloadResource which is stored in DownloadStore.
3) UIDownload generates HTML which redirects the browser to ResourceServlet
4) ResourceServlet then uses DownloadResource to get hold of the data and the pushes it to browser
The reason for this is that we're building portlets with Seam and it's impossible to "download" files from a portal environment without additional servlet and we think it's good idea to reuse existing stuff.
Patch coming soon (if we can make it work ;)
--
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
15 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2973) EjbSynchronisations are destroyed before afterCompletion call
by stefan meyer (JIRA)
EjbSynchronisations are destroyed before afterCompletion call
-------------------------------------------------------------
Key: JBSEAM-2973
URL: http://jira.jboss.com/jira/browse/JBSEAM-2973
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.1.GA
Environment: JBOSS4.2.2GA
Reporter: stefan meyer
http://www.seamframework.org/Community/EjbSynchronisationsAfterCompletion...
I use an MDB. The EJBSynchronisations.registerSynchronisation are called by MangedPersistenceContext and ManagedJbpmContext. Thus creating 3 Synchronisation-Registration on the UserTransaction (first once is created by creating the ejb or maybe calling the create-method - dont know exactly). At some point the EJBSychronisations will be destroyed since they are stateful. Seam destroys them when calling Lifecycle.endCall and destroying the Contexts. The destruction will create another TransactionSynchronisation implemented by the StatefulRemoveInterceptor from Jboss. The beforeCompletion will be called in the order the synchronisations were registered. The afterCompletion will be called in the reverse order. The StatefulRemoveInterceptor is first and removes the EjbYnchronisation from the cache (whatever that is). The other calls fail because the ejb container cannot find them.
My ugly workaround is to force a different order calling create and destroy of EJBSynchronisations upon entering the MDB. This leads to only one failure - the very first Synchronisations.
Reproducing this problem should be very straight forward. Just call an MDB and do sonething with the seam managed entityManager.
Another bug closely related is that ManagedPersistenceContext.afterCompletion calls close. and in close it unsuccessfully tries to get a hold of the transaction component (Transaction.instance) - the contexts are gone already.
here is the critical code (Please see the comment in afterCompletion):
public void afterCompletion(int status)
{
synchronizationRegistered = false;
//if ( !Contexts.isConversationContextActive() )
if (destroyed)
{
//in calls to MDBs and remote calls to SBs, the
//transaction doesn't commit until after contexts
//are destroyed, so wait until the transaction
//completes before closing the session
//on the other hand, if we still have an active
//conversation context, leave it open
close();
}
}
private void close()
{
boolean transactionActive = false;
try
{
transactionActive = Transaction.instance().isActive();
}
catch (SystemException se)
{
log.debug("could not get transaction status while destroying persistence context");
}
if ( transactionActive )
{
throw new IllegalStateException("attempting to destroy the persistence context while an active transaction exists (try installing <transaction:ejb-transaction/>)");
}
if ( log.isDebugEnabled() )
{
log.debug("destroying seam managed persistence context for persistence unit: " + persistenceUnitJndiName);
}
if (entityManager!=null)
{
entityManager.close();
}
}
--
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
15 years, 6 months