-
1. Re: How to hide Transaction Failed message?
nickarls Jun 11, 2008 11:08 PM (in response to mcsous)Tried nulling the org.jboss.seam.TransactionFailed key in your properties files?
-
2. Re: How to hide Transaction Failed message?
mcsous Jun 11, 2008 11:35 PM (in response to mcsous)This not work... another idea?
-
3. Re: How to hide Transaction Failed message?
nickarls Jun 11, 2008 11:37 PM (in response to mcsous)Well if you have edited away the value and the text still appears then one thing that comes to mind is that you haven't edited the correct thing ;-)
-
4. Re: How to hide Transaction Failed message?
mcsous Jun 11, 2008 11:46 PM (in response to mcsous)ok, but appears to me an empty message.
-
5. Re: How to hide Transaction Failed message?
nickarls Jun 12, 2008 7:52 AM (in response to mcsous)If you really hate the message you can override addTransactionFailedMessage in SeamPhaseListener. Hmm, there has to be a more simple way.
-
6. Re: How to hide Transaction Failed message?
gena Jun 15, 2008 1:17 AM (in response to mcsous)I've got the same issue. I think it's unnecessary here to raise a FacesMessage, because the web page user shouldn't be informed about the transaction failure.
If we need, we could add a more meaningful message on a transaction failure but just in appropriate form within a controller and not from framework.
In my case, i expect those exception but will not inform the user about it.
-
7. Re: How to hide Transaction Failed message?
dan.j.allen Jun 15, 2008 2:36 AM (in response to mcsous)Actually, the correct solution for this problem would be to have a FacesTransactionEvents which observes the transaction failed event. That way, if you don't want the event, it's just a matter of overriding the FacesTransactionEvents component either to disable it or do your own thing. You can see this handoff used with security-related events and messages.
Can you file a JIRA?
-
8. Re: How to hide Transaction Failed message?
dan.j.allen Jun 15, 2008 2:40 AM (in response to mcsous) -
9. Re: How to hide Transaction Failed message?
przemjaskier Jun 16, 2008 1:01 PM (in response to mcsous)Resolution of JBSEAM-2989 will fix a whole class of Seam's over verbose messages problems. This one as well.
Please fix/vote for JBSEAM-2989 instead.
-
10. Re: How to hide Transaction Failed message?
arnieoag Jun 20, 2008 9:53 PM (in response to mcsous)I too am getting this message in my queue and don't even know where its coming from!
Isn't there a way to prevent it in the first place - like turning off this
transaction
service if I'm not using it?What kind of transaction is this about anyway?
-
11. Re: How to hide Transaction Failed message?
ikhnaton Apr 15, 2009 6:18 AM (in response to mcsous)If anyone's still looking for it, here's a hack that works to hide the message. Just call as your last call before returning control to Seam.
try
{
if (Transaction.instance().isRolledBackOrMarkedRollback())
{
if (Transaction.instance() instanceof UTTransaction)
{
UTTransaction trans = (UTTransaction) Transaction.instance();
trans.rollback();
}
}
}
catch (SystemException e1)
{
logger.error(e);
} -
12. Re: How to hide Transaction Failed message?
hhcofcmds Apr 22, 2009 12:16 PM (in response to mcsous)Seam 2.1.1.GA still adds the message from the SeamPhaseListener, which you cannot avoid. 2.1.2.CR1 introduced the FacesTransactionEvents class to add the message, so finally we are at the same point, however, that class allows you to avoid the adding of the message. You can call this at some point of your initialization:
((FacesTransactionEvents)Component. getInstance("org.jboss.seam.transaction.facesTransactionEvents")). setTransactionFailedMessageEnabled(false);
However, this should be configurable in SEAM, so vote for My Link
-
13. Re: How to hide Transaction Failed message?
dan.j.allen Apr 22, 2009 9:16 PM (in response to mcsous)There is a much easier way to disable the message than what you suggest, and the approach is configurable. Just add the following to a seam.properties file:
org.jboss.seam.transaction.facesTransactionEvents.transactionFailedMessageEnabled=false
You can also do this in a component descriptor (components.xml):
<component name="org.jboss.seam.transaction.facesTransactionEvents"> <property name="transactionFailedMessageEnabled">false</property> </component>
I haven't created a namespaced element for this yet. I haven't decided actually. In that case, it could be as simple as:
<tx:faces-transaction-events transaction-failed-message-enabled="false"/>
You can use that today, but it won't validate in your IDE.
-
14. Re: How to hide Transaction Failed message?
hhcofcmds Apr 22, 2009 9:50 PM (in response to mcsous)Thanks, this works well. (I didn't know about this way to configure SEAM component properties, probably I should have read the manual more carefully).