fr.ifremer.suiviobsmer.ui.base
Class AbstractFilteredPage

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

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 #initFilter() 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 :
      
 - Select change, use JavaScript :
      
 

Version:
$Revision: 264 $ Mise a jour: $Date: 2010-01-24 20:30:15 +0100 (dim., 24 janv. 2010) $ par : $Author$
Author:
fdesbois

Constructor Summary
AbstractFilteredPage()
           
 
Method Summary
protected abstract  boolean getAvailableDataForFiltersOnly()
          Used to show only active company and observers.
 GenericSelectModel<Company> getCompanySelectModel()
           
 org.apache.tapestry5.SelectModel getFacadeSelectModel()
           
protected abstract  BoatFilter getFilter()
           
 GenericSelectModel<User> getObserverSelectModel()
           
 GenericSelectModel<SampleRow> getSampleRowSelectModel()
           
 org.apache.tapestry5.SelectModel getSectorSelectModel()
           
protected  void initSelectFilters(boolean companySelect, boolean observerSelect)
          Initialize all select for filters.
protected  boolean isEdited()
           
 String[] onProvideCompletionsFromBoatName(String input)
           
 void onSelectedFromRefreshByCompany()
          EVENT :: selected on refreshByCompany submit button.
 void onSelectedFromRefreshByFacade()
          EVENT :: selected on refreshByFacade submit button.
 void onSelectedFromRefreshBySector()
          EVENT :: selected on refreshBySector submit button.
 void onSelectedFromSearch()
          Called when search submit button is pressed.
protected  void resetFacadeSelect()
           
protected  void resetSampleRowSelect()
           
protected  void resetSectorSelect()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFilteredPage

public AbstractFilteredPage()
Method Detail

initSelectFilters

protected void initSelectFilters(boolean companySelect,
                                 boolean observerSelect)
                          throws SuiviObsmerException
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
Throws:
SuiviObsmerException

resetFacadeSelect

protected void resetFacadeSelect()
                          throws SuiviObsmerException
Throws:
SuiviObsmerException

resetSectorSelect

protected void resetSectorSelect()
                          throws SuiviObsmerException
Throws:
SuiviObsmerException

resetSampleRowSelect

protected void resetSampleRowSelect()
                             throws SuiviObsmerException
Throws:
SuiviObsmerException

getFacadeSelectModel

public org.apache.tapestry5.SelectModel getFacadeSelectModel()
                                                      throws SuiviObsmerException
Throws:
SuiviObsmerException

getSectorSelectModel

public org.apache.tapestry5.SelectModel getSectorSelectModel()
                                                      throws SuiviObsmerException
Throws:
SuiviObsmerException

getSampleRowSelectModel

public GenericSelectModel<SampleRow> getSampleRowSelectModel()
                                                      throws SuiviObsmerException
Throws:
SuiviObsmerException

getCompanySelectModel

public GenericSelectModel<Company> getCompanySelectModel()
                                                  throws SuiviObsmerException
Throws:
SuiviObsmerException

getObserverSelectModel

public GenericSelectModel<User> getObserverSelectModel()
                                                throws SuiviObsmerException
Throws:
SuiviObsmerException

getFilter

protected abstract BoatFilter getFilter()
                                 throws SuiviObsmerException
Throws:
SuiviObsmerException

getAvailableDataForFiltersOnly

protected abstract boolean getAvailableDataForFiltersOnly()
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 SuiviObsmerException
Throws:
SuiviObsmerException

onSelectedFromSearch

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

Throws:
SuiviObsmerException

onSelectedFromRefreshByCompany

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

Throws:
SuiviObsmerException
See Also:
onSelectedFromRefreshByFacade()

onSelectedFromRefreshByFacade

public void onSelectedFromRefreshByFacade()
                                   throws SuiviObsmerException
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:
SuiviObsmerException
See Also:
onSelectedFromRefreshBySector()

onSelectedFromRefreshBySector

public void onSelectedFromRefreshBySector()
                                   throws SuiviObsmerException
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:
SuiviObsmerException
See Also:
onSelectedFromSearch()

isEdited

protected boolean isEdited()


Copyright © 2009-2010 Ifremer. All Rights Reserved.