Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- conversations join/nest

- conversations join/nest

2007-07-12       - By rapowder

 Back
Hi,

In my application (Seam 1.2.1GA) I use 2 level of nested conversations to
navigate across categories, subcategories and items of each subcategory. That's
my scenario:

Bean 1 (select a category) -> Root Conversation
Bean 2 (select a subcategory) -> Nested inside the root
Bean 3 (edit an item of the subcategory)  -> Nested inside the previous

When I switch between categories the subcategories are updated, when I click on
a subcategory I see the respective items, and when I click on an item I can
edit its properties. In order not to create a new (or new nested) conversation
each time I switch cat, subcat or item I have written this method (called in
the @(protected) methods of my backing beans) to always join the correct level of
conversation.  


 |     public void joinSameOrNest(Class caller) {
 |         Conversation current = Conversation.instance();
 |         boolean started = false;
 |         for (ConversationEntry entry : ConversationEntries.instance()
.getConversationEntries()) {
 |             if(entry.getDescription().equals(caller.getName())) {
 |                 entry.select();
 |                 log.info("Joining conversation " + caller.getName());
 |                 current.begin(true, false);
 |                 started = true;
 |             }
 |         }
 |         if(!started) {
 |             log.info("Starting nested conversation " + caller.getName());
 |             current.beginNested();
 |         }
 |     }
 |  

I recognize the level of conversation since, in the @(protected) methods of my
backing beans I first call the method:


 |     public void setDescription(Class caller) {
 |         Conversation.instance().setDescription(caller.getName());
 |     }
 |

Until the first level of nesting it works fine and in the conversation stack I
always see the root and the nested, but when I try to edit an item (starting
the 2nd level of nesting) I get an exception:

java.lang.IllegalStateException Source code of java.lang.IllegalStateException: beginNested() called with no long-running
conversation

Is it actually possible to have multiple nesting? Is something wrong in my
method? I was using the annotations before @(protected)(nested/join), but a limited
behaviour can be achieved with that. Or am I wrong?

Thanks for any suggestions!
Cheers



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4063416#4063416

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4063416
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.