org.inria.ns.dsi.raweb2.client.views
Class ConferencesList

java.lang.Object
  extended by org.inria.ns.dsi.raweb2.client.widgets.LiveGrid
      extended by org.inria.ns.dsi.raweb2.client.views.ConferencesList

public class ConferencesList
extends LiveGrid

Liste des conférences.

Author:
Guillaume Pilot, Philippe Poulard

Field Summary
 java.lang.String countrySelected
          Le pays sélectionné dans le formulaire, ou null, ou ""
 java.lang.String title
          Le titre saisi dans le formulaire, ou null, ou ""
 java.lang.String yearSelected
          L'année sélectionnée dans le formulaire, par défaut l'année en cours
 
Fields inherited from class org.inria.ns.dsi.raweb2.client.widgets.LiveGrid
grid
 
Constructor Summary
ConferencesList()
           
 
Method Summary
 Field[] getFields()
          Get the fields of the grid.
 int getTotalRows(Document doc)
          Once XML data are fetched from the server, the total number of rows must be known; typically, as an attribute set on the root element.
 java.lang.String getUrl(int offset, int limit)
          Forge the URL that will be used to query the server.
 java.util.List<ModelData> populateList(Document doc)
          Populates a list from the XML data.
 
Methods inherited from class org.inria.ns.dsi.raweb2.client.widgets.LiveGrid
refresh
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

countrySelected

public java.lang.String countrySelected
Le pays sélectionné dans le formulaire, ou null, ou ""


yearSelected

public java.lang.String yearSelected
L'année sélectionnée dans le formulaire, par défaut l'année en cours


title

public java.lang.String title
Le titre saisi dans le formulaire, ou null, ou ""

Constructor Detail

ConferencesList

public ConferencesList()
Method Detail

getFields

public Field[] getFields()
Description copied from class: LiveGrid
Get the fields of the grid.

Specified by:
getFields in class LiveGrid
Returns:
The set of fields that will be used to extract data from the XML content fetched from the server, and that will be used to define how rows will be displayed in the grid.

populateList

public java.util.List<ModelData> populateList(Document doc)
Description copied from class: LiveGrid
Populates a list from the XML data.
public List populateList(Document doc) {
    List list = Util.populateList(doc, "rowElement", getFields());
    return list;
}

Specified by:
populateList in class LiveGrid
Parameters:
doc - The document read from the server.
Returns:
A list of data.
See Also:
Util.populateList(Document, String, Field[])

getTotalRows

public int getTotalRows(Document doc)
Description copied from class: LiveGrid
Once XML data are fetched from the server, the total number of rows must be known; typically, as an attribute set on the root element.
public int getTotalRows(Document doc) {
    int totalRow = Integer.parseInt(doc.getDocumentElement().getAttribute("totalRow"));
    return totalRow;
}

Specified by:
getTotalRows in class LiveGrid
Parameters:
doc - The XML document that was fetched from the server.
Returns:
The total number of rows, regardless the limits of the query.

getUrl

public java.lang.String getUrl(int offset,
                               int limit)
Description copied from class: LiveGrid
Forge the URL that will be used to query the server. The server MUST return XML data in the range specified; additionally, the total number of rows should be retrievable.

Specified by:
getUrl in class LiveGrid
Parameters:
offset - The offset from which start the data.
limit - The number of rows to get.
Returns:
The URL.