2016-10-17 7 views
0

私のextbaseリポジトリでは、このチュートリアルで説明したような類似のクエリ関数を作成しました:thisとフィルタオブジェクト$demandを使用していました。
私は流体の中でオブジェクトを扱うために、私のフィルター用のクラスも作成しました。クエリフィルタオブジェクトは1回だけ動作します - extbase 6.2

これは動作しますが、一度しか変更できません。「フィルタ」をクリックすると変更できます。
しかし、何かをもう一度変更して「フィルタ」をクリックすると、前の値に戻り、何も変わりません。

キャッシングと関係があるように感じますが、わかりません。
フィルタオブジェクトをデバッグすると、「フィルタ」の2回目のクリック後にデバッグコードが表示されません。なぜなら、何も変わっていないときに気がついたからです。

フィルタの設定を何度でも変更できますか?

マイフィルタクラス:

class AppointmentFilter extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { 

    /** 
    * future 
    * 
    * @var int 
    */ 
    protected $future = 1; 

    /** 
    * booked 
    * 
    * @var int 
    */ 
    protected $booked = 2; 

    /** 
    * student 
    * 
    * @var \vendor\extension\Domain\Model\Student 
    */ 
    protected $student = NULL; 

    /** 
    * expertise 
    * 
    * @var \vendor\extension\Domain\Model\Expertise 
    */ 
    protected $expertise = NULL; 

    function getFuture() { 
     return $this->future; 
    } 

    function getBooked() { 
     return $this->booked; 
    } 

    function getStudent() { 
     return $this->student; 
    } 

    function getExpertise() { 
     return $this->expertise; 
    } 

    function setFuture($future) { 
     $this->future = $future; 
    } 

    function setBooked($booked = NULL) { 
     $this->booked = $booked; 
    } 

    function setStudent(\vendor\extension\Domain\Model\Student $student = NULL) { 
     $this->student = $student; 
    } 

    function setExpertise(\vendor\extension\Domain\Model\Expertise $expertise = NULL) { 
     $this->expertise = $expertise; 
    } 

} 

と、対応する流体の形態:

<f:form action="list" name="appointmentFilter" 
      class="filter-form" 
      object="{appointmentFilter}" 
      arguments="{students:students,expertises:expertises}"> 
     Termine: 
     <label> 
      <f:form.radio property="future" value="1"/> Bevorstehende 
      <f:form.radio property="future" value="0"/> Vergangene 
     </label> 
     <label> 
      <f:form.radio property="booked" value="2"/> Alle 
      <f:form.radio property="booked" value="1"/> Gebuchte 
      <f:form.radio property="booked" value="0"/> Freie 
     </label> 
     <label> 
      Studenten: 
      <f:form.select property="student" options="{students}" optionLabelField="fullName" prependOptionLabel="Alle Studenten" class="filterSelect" />     
     </label> 
     <label> 
      Expertise: 
      <f:form.select property="expertise" options="{expertises}" optionLabelField="name" prependOptionLabel="Alle" class="filterSelect" /> 
     </label> 

     <f:form.submit value="Filter anwenden" class="rm-with-js" /> 
    </f:form> 

答えて

2

はあなたの説明によれば、これはキャッシュの問題です。アクションは、localconf.phpのプラグイン設定の2番目の配列に追加することで、キャッシュできないように設定できます。例:

+0

私はすでにそれをしているので問題はないと思った - しかし、私がチェックしたときに、拡張ビルダーが設定を上書きしてしまったので、再度設定しなければならなかった。この行はlocalconf.phpにあります: '## EXTENSION BUILDER DEFAULTS END TOKEN - この行が拡張ビルダーのデフォルトで上書きされる前のすべてですが、私は単純にその行の後に同じ行を書き直すことはできません。問題を引き起こす。 –

関連する問題