3 Replies Latest reply on May 24, 2011 11:12 AM by mikjall77

    Not understanding how to use EJBQL in a regular expression using Seam

    mikjall77

      I'm trying to look for two values within a column using EJBQL and a regular expression using a radio button. I am able to find single values but more than that I'm having problems. My working code for the single values are:




      "personData.status in (#{personSortDataList.statusChoice == 'A' ? "
           + "personSortDataList.statusChoice : null})", 
                   
      
      "personData.status in (#{bullSortDataList.statusChoice == 'I' ? " 
           + "personSortDataList.statusChoice : null})", 





      The personSortDataList is my session bean, statusChoice is a Character type with a getter and setter, and personData is my entity bean.


      For my main problem, my code that I been trying to make work is:




      "#{personSortDataList.statusChoice == 'B' ? " 
           + "(personData.status in ('A', 'I')) : null}",





      along with several other tries.


      My code from my .xhtml page is:






      <h:selectOneRadio layout="lineDirection" 
         value="#{bullSortDataList.statusChoice}">                  
           <f:selectItem itemLabel="#{messages['Active']}" itemValue="A" />
           <f:selectItem itemLabel="#{messages['Inactive']}" itemValue="I" />
           <f:selectItem itemLabel="#{messages['Active and Inactive']}" itemValue="B" />
      </h:selectOneRadio>







      Any help with this is greatly appreciated!