3 Replies Latest reply on Apr 14, 2008 8:50 AM by odo

    Static Seam Hibernate Filter

    odo

      Hi all,


      can someone give an example to define a Seam/Hibernate filter with a static value ?


      I want to filter all Entities with active = 1 flag.
      I do not want to set this dynamically, instead i want to set the value in the components.xml.


      Cheers,
      Oliver

        • 1. Re: Static Seam Hibernate Filter
          pmuir
          <persistence:filter name="currentFilter">
              <persistence:name>current</persistence:name>
              <persistence:parameters>
                  <key>active</key>
                  <value>#{'1'}</value>
              </persistence:parameters>
          </persistence:filter>

          • 2. Re: Static Seam Hibernate Filter
            odo

            Thnx :) Live can be that easy, with qoutes...that was the missing part in my filter.

            • 3. Re: Static Seam Hibernate Filter
              odo

              One more question.


              I try to activate the filter with enabled="true", but this throws
              a
              No converter for type: org.jboss.seam.core.Expressions$ValueExpression


              Exception.



              Is it possible, to enable the filter at startup ? It looks that it do not understand the Seam EL ?!


              Cheers,
              Oliver