[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-1916) EntityQuery: Refresh method doesn't refresh changes made in getEjbql()

Pete Muir (JIRA) jira-events at lists.jboss.org
Fri Sep 28 10:01:41 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1916?page=all ]

Pete Muir closed JBSEAM-1916.
-----------------------------

    Resolution: Won't Fix

Updated javadoc on Query and EntityQuery classes to make the contract of refresh() clear. Posted on forum topic with how to do this properly.

> EntityQuery: Refresh method doesn't refresh changes made in getEjbql()
> ----------------------------------------------------------------------
>
>                 Key: JBSEAM-1916
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1916
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 2.0.0.BETA1, 1.2.1.GA
>         Environment: Windows XP, JBOSS 4.2.1GA
>            Reporter: Ricardo Memoria
>         Assigned To: Pete Muir
>            Priority: Minor
>             Fix For: 2.0.0.CR2
>
>
> The Refresh method doesn't update changes in the Ejbql property. 
> My EntityQuery has a condition that can't be included as a restriction. It is: 
> Code: 
> @Name("mdrCases")
> public class MdrCasesQuery extends EntityQuery {
> private boolean allCases;
> @Override
> public String getEjbql() {
> 	String cond = allCases? "": " where (c.endingTreatmentDate is null)";
> 	
> 	return "from MdrCase c".concat(cond);
> }	 
> Since it doesn't contain any EL expression, it can't be included as a restriction. So the condition is placed on the fly when the user clicks a button to refresh the page: 
> Code: 
> 	<s:decorate template="/layout/edit.xhtml">
> 		<ui:define name="label">#{messages['patients.allcases']}:</ui:define>
> 		<h:selectBooleanCheckbox value="#{mdrCases.allCases}"></h:selectBooleanCheckbox>
> 	</s:decorate>
> 	
> 		<h:commandButton action="#{mdrCases.refresh}" value="#{messages['form.search']}" styleClass="button" />
> 	 
> The problem is that after the refresh method is called the Ejbql is not rebuild. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list