0 Replies Latest reply on May 15, 2009 9:59 AM by mkuzmik

    Property 'currentRow' not writable on type

      Hello. I have the next bean:

      /**
       * <p>Titre : ADPclearing java packages</p>
       * <p>Description : Java packages for ADPclearing web based products</p>
       * <p>Copyright : Copyright (c) 2003-2007</p>
       */
      package com.adpclr.ejb.session.tables;
      
      import java.io.Serializable;
      import java.util.List;
      
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;
      
      import org.jboss.seam.annotations.Name;
      
      import com.adpclr.ejb.entity.traduct.Menu_t;
      import com.adpclr.ejb.session.tables.local.Menu_tManager;
      
      /**
       * @author Maxim Kuzmik
       * Date of Create: 15.05.2009
       * @version 1.0
       *
       */
      
      @Stateful
      @Name("tablemanager_traduct_menu_t")
      public class Menu_tManagerBean implements Serializable, Menu_tManager{
       private static final long serialVersionUID = "com.adpclr.ejb.session.tables.Menu_tManagerBean".hashCode();
      
       @PersistenceContext(type = javax.persistence.PersistenceContextType.EXTENDED)
       private EntityManager em;
      
       private List<Menu_t> records;
      
       private Menu_t currentRow;
      
       public void select(){
       }
      
       public void delete(){
       records.remove(currentRow);
       em.remove(currentRow);
       currentRow = null;
       }
      
       @Remove
       public void destroy(){
       }
      
       /**
       * @param records The records to set.
       */
       public void setRecords(List<Menu_t> records){
       this.records = records;
       }
      
       /**
       * @return Returns the records.
       */
       @SuppressWarnings("unchecked")
       public List<Menu_t> getRecords(){
       records = em.createQuery("select tbl from Menu_t tbl").getResultList();
       return records;
       }
      
       /**
       * @param currentRow The currentRow to set.
       */
       public void setCurrentRow(Menu_t currentRow){
       this.currentRow = currentRow;
       }
      
       /**
       * @return Returns the currentRow.
       */
       public Menu_t getCurrentRow(){
       return currentRow;
       }
      
      }
      
      


      and code:
       <rich:dataTable
       onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       cellpadding="0" cellspacing="0" width="100%" rowKeyVar="row"
       border="0" var="record" value="${tablemanager_traduct_menu_t.records}" id="recordsTable">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Code"/>
       </f:facet>
       <h:outputText value="#{record.code}" id="code" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Actions"/>
       </f:facet>
       <a4j:commandLink ajaxSingle="true" id="deletelink"
       oncomplete="#{rich:component('deletePanel')}.show()">
       <h:graphicImage value="/site/pictures/delete.gif" style="border:0"/>
       <!-- a4j:actionparam name="selectedRecord" value="#{record}" assignTo="#{tablemanager_traduct_menu_t.currentRow}"/-->
       <f:setPropertyActionListener value="#{record}" target="#{tablemanager_traduct_menu_t.currentRow}" />
       </a4j:commandLink>
       <rich:toolTip for="deletelink" value="Delete"/>
       </rich:column>
       </rich:dataTable>
      


      After this i get the next error:
      javax.el.PropertyNotFoundException: /site/xhtml/includes/tables/schema/traduct/menu_t.xhtml @51,123 target="#{tablemanager_traduct_menu_t.currentRow}": Property 'currentRow' not writable on type com.adpclr.ejb.entity.traduct.Menu_t
      


      It's veru intresting why it access Menu_t then the tablemanager_traduct_menu_t link to the Menu_tManagerBean.