[jboss-user] [JBoss Seam] - DataModel from EntityQuery problem?
Phantom
do-not-reply at jboss.com
Fri Jun 22 07:44:59 EDT 2007
Good day,
I have the following code:
template.xhtml:
| <h:panelGrid xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| xmlns:c="http://java.sun.com/jstl/core"
| >
| BEFORE: #{queryname.ejbql} <br/>
| <ui:insert name="query">
| <c:set var="queryname" value="#{driversall}"/>
| </ui:insert><br/>
| AFTER: #{queryname.ejbql}<BR/>
| COUNT: #{queryname.resultCount}
| <br/>
| <h:dataTable var="row" value="#{queryname.resultList}" >
| <h:column>
| #{row.username}
| </h:column>
| <h:column>
| #{row.fio}
| </h:column>
| <h:column>
| #{row.createdDate}
| </h:column>
| <h:column>
| <h:selectBooleanCheckbox value="#{row.active}" disabled="true"/>
| </h:column>
| <h:column>
| <h:selectBooleanCheckbox value="#{row.onlineStatus}" disabled="true"/>
| </h:column>
| <h:column>
| #{row.driverStatus}
| </h:column>
| <h:column>
| #{queryname.ejbql}
| </h:column>
| </h:dataTable>
| </h:panelGrid>
|
driversall.xhtml
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| xmlns:c="http://java.sun.com/jstl/core"
| template="template.xhtml">
| <ui:define name="query">
| ALL!
| <c:set var="queryname" value="#{driversall}"/>
| #{queryname.ejbql}
| </ui:define>
| </ui:composition>
|
and driversonline.xhtml
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| xmlns:c="http://java.sun.com/jstl/core"
| template="template.xhtml">
| <ui:define name="query">
| ONLINE!!!
| <c:set var="queryname" value="#{driversonline}"/>
| #{queryname.ejbql}
| </ui:define>
| </ui:composition>
|
In components.xml:
| <framework:entity-query name="driversall" ejbql="select object(d) from Driver d order by d.fio"/>
| <framework:entity-query name="driversonline" ejbql="select object(d) from Driver d where d.onlineStatus = true order by d.fio"/>
|
What the problem is?
In my example:
driversall query returns 3 rows and driversonline query returns just 1 query.
Also I have a switcher:
| <a4j:include viewId="#{mtmusermenu.viewId}"/>
|
Switcher can switch included pages driversall.xhtml and driversonline.xhtml.
Count field in template for first page shows 3 rows and for second 1. This is correct!
But(!) h:dataTable shows 3 rows in both cases!!! Where is the problem?
(Also, as you can see, the latest column shows the EQL of the request within dataTable. And in both cases the displayed EQL is correct.)
Jboss Seam: 1.2.1
myfaces-api-1.1.5
myfaces-impl-1.1.5
tomahawk-1.1.6
jsf-facelets-1.1.6
I think that the problem in el-ri, but I can find the latest version. Can anyone help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056826#4056826
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056826
More information about the jboss-user
mailing list