Because I do not use some special statesaving stuff, I`ll copy my code here.
If I hit that save button, it shows me this exception.

  | @Stateful
  | @Name("cateditor")
  | @Conversational(ifNotBegunOutcome="categorys")
  | public class CategoryEditorBean implements CategoryEditor,Serializable {
  | 
  |     @In(create=true,value="digizoneDatabase")
  |     EntityManager em;
  | 
  |     @Out(required=false)
  |     @In(required=false)
  |     private Category category;
  |     
  |     Logger logger = Logger.getLogger(CategoryEditorBean.class);
  |     
  |     @RequestParameter
  |     int catid;
  | 
  |     Map<String,Category> categoryMap;       
  |     List<Category>       categories;
  |     
  |     @Create 
  |     public void loadData() {
  |             categories = em.createQuery("from Category c")
  |          .setHint("org.hibernate.cacheable", true)
  |          .getResultList();
  |     Map<String,Category> results = new TreeMap<String,Category>();
  |    
  |     for (Category category: categories) {
  |        results.put(category.getName(),category);
  |     }
  |    
  |     categoryMap = results;
  |     }
  |     
  |     public void create() {
  |             em.persist(category);
  |     }
  |     public void save() {
  |             em.refresh(category);
  |     }
  |     @Begin(join=true)
  |     public void selectCreate() {
  |         category = new Category();
  |         category.setHead(em.find(Category.class,catid));
  |     }
  |     @Begin(join=true)
  |     public void selectModify() {
  |             category = em.find(Category.class,catid);
  |     }
  |     
  |     @End
  |     public String delete() {
  |             category  = em.find(Category.class,catid);
  |             em.remove(category);
  |             return null;
  |     }
  | 
  |     public Map<String,Category> getCategories() {
  |         return categoryMap;
  |     }
  |     public Category getCategory() {
  |             return this.category;
  |     }
  |     
  |     @Destroy @Remove
  |     public void destroy() {}
  | }
  | 
  | <?xml version="1.0" encoding="iso-8859-15"?>
  | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
  | <html xmlns="http://www.w3.org/1999/xhtml";
  |       xmlns:ui="http://java.sun.com/jsf/facelets";
  |       xmlns:h="http://java.sun.com/jsf/html";
  |       xmlns:f="http://java.sun.com/jsf/core";
  |       xmlns:t="http://myfaces.apache.org/tomahawk";
  |       xmlns:s="http://jboss.com/products/seam/taglib";>
  | <body>
  |     <ui:composition template="templates/layout.xhtml">
  |     <ui:define name="tabs">
  |             <div class="tab enabled">
  |                     <div class="tab_l"></div>
  |                             <a 
href="categorys.jsf">#{msgs.allCategories}</a>
  |                     <div class="tab_r"></div>
  |             </div>
  |             <div class="tabs_separator"></div>
  |             <div class="tab choosed">
  |                     <div class="tab_l"></div>
  |                             Grupi muutmine
  |                     <div class="tab_r"></div>
  |             </div>
  |             <div class="tabs_separator"></div>
  |             <div class="tab disabled">
  |                     <div class="tab_l"></div>
  |                             Grupi loomine
  |                     <div class="tab_r"></div>
  |             </div>
  |             <div class="tabs_separator"></div>
  |     </ui:define>
  |     <ui:define name="body">
  |             <h1><span class="heading"></span>ANDMED</h1>
  |             <div id="andmed">
  |                     <h:form>
  |     
  |                     <span class="errors"><h:message for="name"/></span>     
  |                     <h:outputLabel for="name" value="Grupi nimi"/>
  |                     <h:inputText id="name" value="#{category.name}" 
styleClass="field"/>
  |                     <div class="separator"></div>
  |                     
  |                     <span class="errors"><h:message for="head"/></span>
  |                     <h:outputLabel for="head" value="Tüvikategooria"/>
  |                     <h:selectOneMenu converter="#{categoryConverter}" 
id="head" value="#{category.head}" styleClass="field">
  |                             <f:selectItems  
value="#{cateditor.categories}"/>
  |                     </h:selectOneMenu>
  |                     <div class="separator"></div>
  | 
  |                     <span class="errors"><h:message for="showed"/></span>
  |                     <h:outputLabel for="showed" value="Avalik"/>
  |                     <h:selectOneRadio id="showed" 
value="#{category.showed}" styleClass="field">
  |                             <f:selectItem itemValue="true" itemLabel="Jah"/>
  |                             <f:selectItem itemValue="false" itemLabel="Ei"/>
  |                     </h:selectOneRadio>
  |                     <div class="separator"></div>
  |                     
  |                     <s:link id="submit" value="Salvesta muudatused" 
action="#{cateditor.save}" 
  |                       buttonClass="button" linkStyle="button"/>
  | 
  |                     
  |                     </h:form>
  |             </div>
  |             <h1><span class="heading"></span>PARAMEETRID</h1><br />
  |             <div id="andmed">
  |                     <h:form>                                
  |                     </h:form>
  |             </div>          
  |             </ui:define>
  |     </ui:composition>
  | 
  | </body>
  | </html>
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945169


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to