Changeset 4070


Ignore:
Timestamp:
Dec 10, 2010, 12:52:09 PM (13 years ago)
Author:
olle
Message:

Refs #732. Class/file action/mascot/SelectMascotParameterSetStorage.java in client/servlet/ updated to allow selection of a Mascot parameter set that is not on the first table page:

  1. Protected method void runMe() updated to set table configuration action id to the id of the class itself, and inform the TableFactory instance about selected values for scroller variables.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/mascot/SelectMascotParameterSetStorage.java

    r3986 r4070  
    3636import org.proteios.core.MascotParameterSetStorage;
    3737import org.proteios.core.User;
     38import org.proteios.gui.Scroller;
    3839import org.proteios.gui.Title;
    3940import org.proteios.gui.Toolbar;
     
    6768      throws ActionException, InvalidParameterValue
    6869  {
    69   FormFactory formFactory;
    70   formFactory = this.getFormFactory();
     70    FormFactory formFactory;
     71    formFactory = this.getFormFactory();
    7172    /***********************************************************************
    7273     * Check input
     
    112113    TableFactory tableFactory = getTableFactory();
    113114    tableFactory.setItemClass(MascotParameterSetStorage.class);
     115        Integer from = getValidInteger(Scroller.VFROM);
     116        Integer max = getValidInteger(Scroller.VMAXRESULT);
     117        log.debug("from = " + from + " max = " + max);
     118        if (from != null)
     119        {
     120            tableFactory.setQueryFrom(from);
     121        }
     122        if (max != null)
     123        {
     124            tableFactory.setMaxResults(max);
     125        }
    114126    ItemQuery<MascotParameterSetStorage> query = MascotParameterSetStorage.getQuery();
    115127    // Only include MascotParameterSetStorage belonging to the active project.
     
    121133    Table table = tableFactory.build();
    122134    table.setTitle("MascotParameterSetsInDatabase");
     135    if (table.getScroller() != null)
     136    {
     137      table.getScroller().setTableConfActionId(getActionFactory().getId(
     138        SelectMascotParameterSetStorage.class));
     139    }
    123140    /*
    124141     * Add the tool bar with 'Next' button(s) to the form.
     
    130147    for (Integer spectrumFileId : spectrumFileIds)
    131148    {
    132       table.add(SearchMascot.VSPECTRUMFILEID,spectrumFileId);
     149      table.add(SearchMascot.VSPECTRUMFILEID,spectrumFileId);
    133150    }
    134151    nextSearch.addParameter(SearchMascot.VMASCOTUSEWEBINTERFACEFLAG, true);
Note: See TracChangeset for help on using the changeset viewer.