fr.ifremer.wao.ui.base
Class AbstractFilteredPage

java.lang.Object
  extended by fr.ifremer.wao.ui.base.AbstractFilteredPage
Direct Known Subclasses:
Boats, Contacts

Deprecated. since 1.5.1 : too difficult to adapt on each page, use FiltersModel instead

@Deprecated
public abstract class AbstractFilteredPage
extends Object

AbstractFilteredPage Created: 14 janv. 2010 This class uses the BoatFilter bean (also SamplingFilter and UserFilter which are supertypes). Known implementations are Synthesis and Contacts You must override the three abstract methods and call initSelectFilters(boolean, boolean, boolean) () } in the setupRender of the page.

 - BoatName uses an Autocomplete mixins :
      
 - SampleRow select value is sampleRowId :
      
 - Company select value is companyId :
      
 - Observer select value is observerId :
      

 Use submit button with specific ids to refresh data depends on select change:
 - id="refreshByCompany" : refresh facadeSelect, sectorSelect, sampleRowSelect 
   and observerSelect
 - id="refreshByFacade" : refresh sectorSelect and sampleRowSelect
 - id="refreshBySector" : refresh sampleRowSelect

 

Author:
fdesbois

Constructor Summary
AbstractFilteredPage()
          Deprecated.  
 
Method Summary
 GenericSelectModel<Company> getCompanySelectModel()
          Deprecated. Get select model for companies.
 GenericSelectModel<FishingGearDCF> getDcfGearSelectModel()
          Deprecated.  
 GenericSelectModel<TargetSpeciesDCF> getDcfSpeciesSelectModel()
          Deprecated.  
 org.apache.tapestry5.SelectModel getFacadeSelectModel()
          Deprecated. Get select model for fishingZone facade.
protected abstract  SamplingFilter getFilter()
          Deprecated.  
 GenericSelectModel<WaoUser> getObserverSelectModel()
          Deprecated. Get the select model for observers.
 org.apache.tapestry5.SelectModel getProgramSelectModel()
          Deprecated. Get select model for sampleRow program.
 GenericSelectModel<SampleRow> getSampleRowSelectModel()
          Deprecated. Get select model for sampleRows.
 org.apache.tapestry5.SelectModel getSectorSelectModel()
          Deprecated. Get select model for fishingZone sector.
 GenericSelectModel<TerrestrialLocation> getTerrestrialDistrictSelectModel()
          Deprecated.  
 void initCompanyFilter()
          Deprecated. Need to be call in setupRender of the page which inherits this abstract class.
protected  void initSelectFilters(boolean companySelect, boolean observerSelect, boolean programSelect)
          Deprecated. Initialize all select for filters.
protected abstract  boolean isAvailableDataForFiltersOnly()
          Deprecated. Used to show only active company and observers.
protected  boolean isEdited()
          Deprecated. Used to indicate that a refresh as been triggered.
 String[] onProvideCompletionsFromBoatName(String input)
          Deprecated.  
 void onSelectedFromAddSampleRowCode()
          Deprecated.  
 void onSelectedFromRefreshByCompany()
          Deprecated. EVENT :: selected on refreshByCompany submit button.
 void onSelectedFromRefreshByFacade()
          Deprecated. EVENT :: selected on refreshByFacade submit button.
 void onSelectedFromRefreshByProgram()
          Deprecated. EVENT :: selected on refreshByProgram submit button.
 void onSelectedFromRefreshBySector()
          Deprecated. EVENT :: selected on refreshBySector submit button.
 void onSelectedFromRemoveSampleRowCode()
          Deprecated.  
 void onSelectedFromSearch()
          Deprecated. Called when search submit button is pressed.
protected  void resetCompanySelect()
          Deprecated.  
protected  void resetFacadeSelect()
          Deprecated.  
protected  void resetSampleRowSelect()
          Deprecated.  
protected  void resetSectorSelect()
          Deprecated.  
 void updateLocation(String terrestrialDistrictId)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFilteredPage

public AbstractFilteredPage()
Deprecated. 
Method Detail

onSelectedFromAddSampleRowCode

public void onSelectedFromAddSampleRowCode()
Deprecated. 

onSelectedFromRemoveSampleRowCode

public void onSelectedFromRemoveSampleRowCode()
Deprecated. 

initCompanyFilter

public void initCompanyFilter()
Deprecated. 
Need to be call in setupRender of the page which inherits this abstract class.


initSelectFilters

protected void initSelectFilters(boolean companySelect,
                                 boolean observerSelect,
                                 boolean programSelect)
                          throws WaoException
Deprecated. 
Initialize all select for filters. By default, only facade, sector and sampleRow selects will be initialized.

Parameters:
companySelect - if true, company select will be initialized
observerSelect - if true, observer select will be initialized
programSelect -
Throws:
WaoException

resetCompanySelect

protected void resetCompanySelect()
                           throws WaoException
Deprecated. 
Throws:
WaoException

resetFacadeSelect

protected void resetFacadeSelect()
                          throws WaoException
Deprecated. 
Throws:
WaoException

resetSectorSelect

protected void resetSectorSelect()
                          throws WaoException
Deprecated. 
Throws:
WaoException

resetSampleRowSelect

protected void resetSampleRowSelect()
                             throws WaoException
Deprecated. 
Throws:
WaoException

getFacadeSelectModel

public org.apache.tapestry5.SelectModel getFacadeSelectModel()
                                                      throws WaoException
Deprecated. 
Get select model for fishingZone facade. Depends on company set in filter.

Returns:
the SelectModel for facade names
Throws:
WaoException

getSectorSelectModel

public org.apache.tapestry5.SelectModel getSectorSelectModel()
                                                      throws WaoException
Deprecated. 
Get select model for fishingZone sector. Depends on facadeName and company set in filter.

Returns:
the SelectModel for sector names
Throws:
WaoException

getSampleRowSelectModel

public GenericSelectModel<SampleRow> getSampleRowSelectModel()
                                                      throws WaoException
Deprecated. 
Get select model for sampleRows. Depends on filter (Sampling part only). The sampleRow set from filter is temporarly extracted to avoid returning only one element in the select.

Returns:
the GenericSelectModel for sampleRows
Throws:
WaoException

getCompanySelectModel

public GenericSelectModel<Company> getCompanySelectModel()
                                                  throws WaoException
Deprecated. 
Get select model for companies. Depends on isAvailableDataForFiltersOnly() () } to return only activated companies. This select model is only used by admin users.

Returns:
the GenericSelectModel for companies
Throws:
WaoException

getObserverSelectModel

public GenericSelectModel<WaoUser> getObserverSelectModel()
                                                   throws WaoException
Deprecated. 
Get the select model for observers. Depends on isAvailableDataForFiltersOnly() to return only activated companies.

Returns:
the GenericSelectModel for observers
Throws:
WaoException

getProgramSelectModel

public org.apache.tapestry5.SelectModel getProgramSelectModel()
                                                       throws WaoException
Deprecated. 
Get select model for sampleRow program. Depends on company set in filter.

Returns:
the SelectModel for program names
Throws:
WaoException

getDcfGearSelectModel

public GenericSelectModel<FishingGearDCF> getDcfGearSelectModel()
                                                         throws WaoException
Deprecated. 
Throws:
WaoException

getDcfSpeciesSelectModel

public GenericSelectModel<TargetSpeciesDCF> getDcfSpeciesSelectModel()
                                                              throws WaoException
Deprecated. 
Throws:
WaoException

getFilter

protected abstract SamplingFilter getFilter()
                                     throws WaoException
Deprecated. 
Throws:
WaoException

isAvailableDataForFiltersOnly

protected abstract boolean isAvailableDataForFiltersOnly()
Deprecated. 
Used to show only active company and observers.

Returns:
true if only active users will be showed, false otherwise

onProvideCompletionsFromBoatName

public String[] onProvideCompletionsFromBoatName(String input)
                                          throws WaoException
Deprecated. 
Throws:
WaoException

onSelectedFromSearch

public void onSelectedFromSearch()
                          throws WaoException
Deprecated. 
Called when search submit button is pressed. This method is useful to refresh all filters data from selects.

Throws:
WaoException

updateLocation

public void updateLocation(String terrestrialDistrictId)
Deprecated. 

onSelectedFromRefreshByCompany

public void onSelectedFromRefreshByCompany()
                                    throws WaoException
Deprecated. 
EVENT :: selected on refreshByCompany submit button. Reset selects for company selected : programs, facades, sectors, sampleRows and observers. This method set the state to edited, you can use isEdited() method to test it.

Throws:
WaoException
See Also:
onSelectedFromRefreshByProgram()

onSelectedFromRefreshByProgram

public void onSelectedFromRefreshByProgram()
                                    throws WaoException
Deprecated. 
EVENT :: selected on refreshByProgram submit button. Reset selects for program selected : facades, sectors and sampleRows. This method set the state to edited, you can use isEdited() method to test it.

Throws:
WaoException
See Also:
onSelectedFromRefreshByFacade()

onSelectedFromRefreshByFacade

public void onSelectedFromRefreshByFacade()
                                   throws WaoException
Deprecated. 
EVENT :: selected on refreshByFacade submit button. Reset selects for facade selected : sectors and sampleRows. This method set the state to edited, you can use isEdited() method to test it.

Throws:
WaoException
See Also:
onSelectedFromRefreshBySector()

onSelectedFromRefreshBySector

public void onSelectedFromRefreshBySector()
                                   throws WaoException
Deprecated. 
EVENT :: selected on refreshBySector submit button. After refreshing data selected, reset selects for sector selected : sampleRows. This method set the state to edited, you can use isEdited() method to test it.

Throws:
WaoException
See Also:
onSelectedFromSearch()

isEdited

protected boolean isEdited()
Deprecated. 
Used to indicate that a refresh as been triggered.

Returns:
true if the page filter is in edited state.

getTerrestrialDistrictSelectModel

public GenericSelectModel<TerrestrialLocation> getTerrestrialDistrictSelectModel()
                                                                          throws WaoException
Deprecated. 
Throws:
WaoException


Copyright © 2009-2011 Ifremer. All Rights Reserved.