[JBoss Seam] - facesMessages and @Redirect question
by X490812
here is my custom exception
| @ApplicationException
| @Redirect(viewId="genericErrorPage.xhtml")
| public class FraudException extends Exception {
| public FraudException(){}
| }
|
|
here is my genericErrorPage.xhtml
|
| .
| .
| .
| <body>
| <h:messages
| globalOnly="true"
| styleClass="message"
| id="globalMessages" />
| </body>
|
| </html>
|
|
here is where I throw it:
|
| private void doQry(String qry) throws FraudException {
| Connection con = null;
| Statement st = null;
|
| try {
| con = ds.getConnection();
| st = con.createStatement();
| ResultSet rs = st.executeQuery(qry);
| caseList.clear();
| while (rs.next()) {
| caseList.add(new Tblcase(rs.getObject(1), rs.getObject(2), rs
| .getObject(3), rs.getObject(4), rs.getObject(5), rs
| .getObject(6), rs.getObject(7), rs.getObject(8), rs
| .getObject(9), rs.getObject(10), rs.getObject(11), rs
| .getObject(12)));
| }
| } catch (Exception e) {
| e.printStackTrace();
| log.error("ERROR: " + e.getMessage());
| facesMessages.add("ERROR RENDERING DATA: " + e.getMessage());
| throw new FraudException();
| } finally {
| try {
| con.close();
| st.close();
| } catch (Exception e) {
| e.printStackTrace();
| log.error("ERROR: " + e.getMessage());
| facesMessages.add("ERROR CLOSING CONNECTIONS: " + e.getMessage());
| throw new FraudException();
| }
| }
|
|
Why Does facesMessages get blown away before rendering in the debug page? The result is no error message displaying.
When I put a hardcoded message in the redirect, the hardcoded message displays, but the message I programmatically added to facesMessages does not display - as follows:
| @Redirect(viewId="/genericErrorPage.xhtml", message="TESTMESSAGE")
|
To solve, I tried the following:
I added this to my session bean
| @Out(Scope = ScopeType.SESSION)
| @In
| facesMessage
|
That did not work - the errmessage still did not display
I also tried this:
| @Redirect(viewId="/genericErrorPage.xhtml", message="#{errMessage}")
|
using an outject errMessage as follows:
| } catch (Exception e) {
| e.printStackTrace();
| log.error("ERROR: " + e.getMessage());
| //facesMessages.add("ERROR RENDERING DATA: " + e.getMessage());
| errMessage = "ERROR RENDERING DATA: " + e.getMessage();
|
- neither works.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102021#4102021
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102021
18 years, 5 months
[JBoss Messaging] - Re: Problems with MaxDeliveryAttempts
by noxis
"timfox" wrote : What's max delivery attempts set to in your MDB container config?
It's a default value on JBAS 4.2.1.GA. If you need an exact value, I can give it to you in 2 weeks (I am on vacation:)).
I think I have to clarify my last post.
- JBM 1.4.0.CR1 with MaxDeliveryAttempts=10: OK
- JBM 1.4.0.CR2 (CR3, GA, trunk) with MaxDeliveryAttempts=10:
| 2007-10-25 15:49:37,118 WARN [org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler] Message redelivered=6 max=5 sending it to the dlq delegator->JBossMessage[2]:PERSISTENT, deliveryId=7
|
- JBM 1.4.0.CR2 (CR3, GA, trunk) with DLQMaxResent=10: OK
- JBM 1.4.0.CR2 (CR3, GA, trunk) with MaxDeliveryAttempts=10,
and 1 patch reverted - "Fix on JMSXDeliveryCount": OK
So, MaxDeliveryAttempts stopped to work with MDBs with that patch. Bug or feature?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102018#4102018
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102018
18 years, 5 months
[JBoss Seam] - clickable lists problem...
by minamti
I have the following scenario.
I have a page that displays the clickable list.
say (objs is the list and obj is each object)
John Public | iPod Nano
Jane Public | iPod Video
I need to go to a detail page for John if I click on John and a detail page for iPod Nano if I click on iPod Nano. Same for Jane and iPod Video.
I would need something like
<s:link value="obj.user.name" action="/userDetail.xhtml>
<f:param name="user" value="#{obj.user}">
</s:link>
Can I do this... ??
I am able to get the clicked data in a method which I invoke in the action part of command link as is shown in the messages example of Seam Reference.
In the hotel booking example too it calls a method in the backend object
I want to know how I can go to a page with a parameter as an object.
I guess I can use s:link only with raw data and not objects.
Any help is appreciated.
Thanks,
M
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102015#4102015
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102015
18 years, 5 months