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
 String getCompanyId()
          Deprecated.  
 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.  
 String getFishingGearDCFId()
          Deprecated.  
 String getObserverId()
          Deprecated.  
 GenericSelectModel<WaoUser> getObserverSelectModel()
          Deprecated. Get the select model for observers.
protected  List<org.apache.tapestry5.OptionModel> getOptionModels(List<String> names)
          Deprecated.  
 org.apache.tapestry5.SelectModel getProgramSelectModel()
          Deprecated. Get select model for sampleRow program.
 String getSampleRowId()
          Deprecated.  
 GenericSelectModel<SampleRow> getSampleRowSelectModel()
          Deprecated. Get select model for sampleRows.
 org.apache.tapestry5.SelectModel getSectorSelectModel()
          Deprecated. Get select model for fishingZone sector.
 String getTargetSpeciesDCFId()
          Deprecated.  
 String getTerrestrialDistrictId()
          Deprecated.  
 GenericSelectModel<TerrestrialLocation> getTerrestrialDistrictSelectModel()
          Deprecated.  
 void initCompagnyFilter()
          Deprecated.  
 void initCompanyFilter()
          Deprecated. Need to be call in setupRender of the page which inherits this abstract class.
 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.
 boolean isObserverSelect()
          Deprecated.  
 boolean isProgramSelect()
          Deprecated.  
 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.
 void resetCompanySelectModel()
          Deprecated.  
 void resetFacadeSelectModel()
          Deprecated.  
protected abstract  void resetFilter()
          Deprecated.  
 void resetFishingGearDCFModel()
          Deprecated.  
 void resetModels()
          Deprecated.  
 void resetObserverSelectModel()
          Deprecated.  
 void resetProgramSelectModel()
          Deprecated.  
 void resetSampleRowSelectModel()
          Deprecated.  
 void resetSectorSelectModel()
          Deprecated.  
 void resetTargetSpeciesDCFModel()
          Deprecated.  
 void resetTerrestrialDistrictModel()
          Deprecated.  
 void setCompanyId(String companyId)
          Deprecated.  
 void setFishingGearDCFId(String fishingGearDCFId)
          Deprecated.  
 void setObserverId(String observerId)
          Deprecated.  
 void setSampleRowId(String sampleRowId)
          Deprecated.  
 void setTargetSpeciesDCFId(String targetSpeciesDCFId)
          Deprecated.  
 void setTerrestrialDistrictId(String terrestrialDistrictId)
          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

isObserverSelect

public boolean isObserverSelect()
Deprecated. 

isProgramSelect

public boolean isProgramSelect()
Deprecated. 

getSampleRowId

public String getSampleRowId()
Deprecated. 

setSampleRowId

public void setSampleRowId(String sampleRowId)
Deprecated. 

getCompanyId

public String getCompanyId()
Deprecated. 

setCompanyId

public void setCompanyId(String companyId)
Deprecated. 

getObserverId

public String getObserverId()
Deprecated. 

setObserverId

public void setObserverId(String observerId)
Deprecated. 

getFishingGearDCFId

public String getFishingGearDCFId()
Deprecated. 

setFishingGearDCFId

public void setFishingGearDCFId(String fishingGearDCFId)
Deprecated. 

getTargetSpeciesDCFId

public String getTargetSpeciesDCFId()
Deprecated. 

setTargetSpeciesDCFId

public void setTargetSpeciesDCFId(String targetSpeciesDCFId)
Deprecated. 

getTerrestrialDistrictId

public String getTerrestrialDistrictId()
Deprecated. 

setTerrestrialDistrictId

public void setTerrestrialDistrictId(String terrestrialDistrictId)
Deprecated. 

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

public 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

initCompagnyFilter

public void initCompagnyFilter()
Deprecated. 

resetCompanySelectModel

public void resetCompanySelectModel()
                             throws WaoException
Deprecated. 
Throws:
WaoException

resetSampleRowSelectModel

public void resetSampleRowSelectModel()
                               throws WaoException
Deprecated. 
Throws:
WaoException

resetObserverSelectModel

public void resetObserverSelectModel()
Deprecated. 

resetTerrestrialDistrictModel

public void resetTerrestrialDistrictModel()
Deprecated. 

resetTargetSpeciesDCFModel

public void resetTargetSpeciesDCFModel()
Deprecated. 

resetFishingGearDCFModel

public void resetFishingGearDCFModel()
Deprecated. 

resetFacadeSelectModel

public void resetFacadeSelectModel()
                            throws WaoException
Deprecated. 
Throws:
WaoException

resetSectorSelectModel

public void resetSectorSelectModel()
                            throws WaoException
Deprecated. 
Throws:
WaoException

resetProgramSelectModel

public void resetProgramSelectModel()
Deprecated. 

resetModels

public void resetModels()
Deprecated. 

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

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

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

getTerrestrialDistrictSelectModel

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

getOptionModels

protected List<org.apache.tapestry5.OptionModel> getOptionModels(List<String> names)
Deprecated. 

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

resetFilter

protected abstract void resetFilter()
Deprecated. 

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.


Copyright © 2009-2011 Ifremer. All Rights Reserved.