This content has been marked as final.
Show 2 replies
-
1. Re: Problems with EntityQuery
fpsdyl Jun 23, 2009 12:53 PM (in response to dklogica)I think if your using richfaces u can add a dataScroller to your data table like this :
<rich:panel>
<s:decorate template="../layout/display.xhtml">
<ui:define name="label">Pojo Search Property</ui:define>
<h:inputText id="prop" value="#{pojoQuery.entity.property}">
<a4j:support event="onkeyup" reRender="results" />
</h:inputText>
</s:decorate>
</rich:panel>
<rich:dataTable id="results" reRender="ds" rows="25" value="#{pojoQuery.resultList}">
<h:column>
....
<h:column>
<f:facet name="footer">
<rich:datascroller id="ds" for="clubEntityList"></rich:datascroller>
</f:facet>
</rich:dataTable>
And then in you Pojo :
public class PojoQuery extends EntityQuery<Entity> {
private Entity entity = new Entity();
// create getter+setter for entity property(avoid excessive outjection).
public PojoQuery(){
setEjbql( "from Entity e where e.property = " + entity.getProperty() );
}
}
This is currently what I'm using and it works nicely..
Let me know if you are still having problems.. -
2. Re: Problems with EntityQuery
fpsdyl Jun 23, 2009 12:55 PM (in response to dklogica)Sorry I double-checked my post after I saved it change :
<rich:datascroller id="ds" for="clubEntityList"></rich:datascroller>
to :
<rich:datascroller id="ds" for="results"></rich:datascroller>