[jboss-user] [JBoss Tools (users)] - Problems with CRUD - Application (Jboss Tools Eclipse)

Smoeker do-not-reply at jboss.com
Wed Aug 20 05:39:07 EDT 2008

hi there,

i have some problems working with a jbosstools - generated Seam Crud Application : 

I generated the xhtmls/entity Beans/ DAOs by reverse engineering from an existing database.

-> the Crud - pages work fine, but i have problems implementing my own logic : 

i generated a new seam form "loginForm", in which i just wanted to test finding a database entry for an entered value using an Existing EntityQuery CustomerList (also generated from JbossTools).

heres the layout : 

<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
<ui:composition xmlns="http://www.w3.org/1999/xhtml"

	<h2 align="center"> Login Webshop</h2>
    <h:messages globalOnly="true" styleClass="message"/>
    <h:form id="loginFormForm" styleClass="edit">

        <rich:simpleTogglePanel label="Customer search parameters" switchType="ajax">
            <f:facet name="header">loginForm</f:facet>
              <h:outputLabel value="Username" style="width:500">
			  <h:inputText id="email" value="#{customerList.customer.email}"/>

                  <h:commandButton id="search" value="UserSearch" action="/loginForm.xhtml"/>
        <h:outputText value="The search returned no results." 
               rendered="#{empty customerList.resultList}"/>
        <h:dataTable id="customerList" 
           rendered="#{not empty customerList.resultList}">
            	<f:facet name="header">KundenKredit</f:facet>
            	<f:facet name="header">email</f:facet>



The EntityQueryClass looks as follows : 

package de.medint.webshop.session;

import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;

import de.medint.webshop.entity.*;

import java.util.List;
import java.util.Arrays;

public class CustomerList extends EntityQuery {

	private static final String[] RESTRICTIONS = {
			"lower(customer.email) like concat(lower(#{customerList.customer.email}),'%')" };

	private Customer customer = new Customer();

	public String getEjbql() {
		return "select customer from Customer customer";

	public Integer getMaxResults() {
		return 25;

	public Customer getCustomer() {
		return customer;

	public List getRestrictions() {
		return Arrays.asList(RESTRICTIONS);


When i call the layout via Browser, i always get the whole content of the table shown, even if i enter an invalid or valid value....

Watching the ConsoleLog it seems, as if my Querys is executed with a where clause, but directly after that, the same query is executed without where clause. (i think, the resultlist gets overwritten by the queryresult without where...)

Can somebody please explain me that behaviour?

thnx alot

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

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

More information about the jboss-user mailing list