Hi, have a table and use row selection with DataModelSelection. If the whole table is loaded all is perfect. But when I use searchpattern like in booking example(ajax) to reduce tablesize DataModelSelection not updated. For example all times the first row from whole table is selected while this row no longer exist in reduced table.
| public abstract class AbstractListBean<T extends BaseEntity>implements Serializable { | | protected String searchString; | | @PersistenceContext | protected EntityManager em; | | | @DataModelSelection | private T selectedEntity; | } | | @Stateful | @Scope(ScopeType.CONVERSATION) | @Name("specialreleaselist") | @SuppressWarnings("unchecked") | public class SpecialreleaseListBean extends AbstractListBean<SpecialRelease> implements | SpecialreleaseList { | | /** | * | */ | private static final long serialVersionUID = 1L; | | | @In | FacesMessages facesMessages; | | @DataModel | protected List<SpecialRelease> sprTablelist; | | | @Factory("sprTablelist") | public void find(){ | sprTablelist = loadList(); | } | @Factory(value="specialreleasepattern", scope=ScopeType.EVENT) | public String getSearchPattern(){ | return searchString==null ? | "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%'; | } | | | protected List<SpecialRelease> loadList() { | List readFromDB = null; | readFromDB = readFromDB("select s from SpecialRelease s where lower(s.description) like #{specialreleasepattern}"); | | return readFromDB; | } | } What is the right way updating DataModelSelection? Thanks Andi View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035958#4035958 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035958 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user