[gee-svn] SF.net SVN: gabel: [186] trunk/gee/war
Status: Alpha
Brought to you by:
alllee
|
From: <al...@us...> - 2006-05-31 22:54:04
|
Revision: 186 Author: alllee Date: 2006-05-31 15:53:54 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/gabel/?rev=186&view=rev Log Message: ----------- default experiment configurations are now persisted/loaded from the DB when AbstractExperiment is being instantiated. Modified Paths: -------------- trunk/gee/src/java/edu/indiana/psych/gee/AbstractExperiment.java trunk/gee/src/java/edu/indiana/psych/gee/Experiment.java trunk/gee/src/java/edu/indiana/psych/gee/action/ManageExperiment.java trunk/gee/src/java/edu/indiana/psych/gee/action/ManageExperimentConfiguration.java trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.java trunk/gee/src/java/edu/indiana/psych/gee/dao/ExperimentConfigurationDao.java trunk/gee/src/java/edu/indiana/psych/gee/dao/HibernateExperimentConfigurationDao.java trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperimentParameters.java trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerServerGameState.java trunk/gee/src/java/edu/indiana/psych/gee/service/ExperimentConfigurationService.java trunk/gee/src/java/edu/indiana/psych/gee/service/ExperimentService.java trunk/gee/war/WEB-INF/applicationContext.xml trunk/gee/war/WEB-INF/classes/gee-admin.xml trunk/gee/war/WEB-INF/classes/xwork.xml trunk/gee/war/admin/configureExperiment.jsp trunk/gee/war/admin/listExperiments.jsp trunk/gee/war/css/gee.css trunk/gee/war/index.jsp trunk/gee/war/template.jsp Modified: trunk/gee/src/java/edu/indiana/psych/gee/AbstractExperiment.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/AbstractExperiment.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/AbstractExperiment.java 2006-05-31 22:53:54 UTC (rev 186) @@ -32,9 +32,8 @@ private boolean running; private ExperimentService experimentService; -// private ExperimentConfigurationService configurationService; + private ExperimentConfigurationService configurationService; - private String name; private C configuration; // private ExperimentRoundParameters currentParameters; @@ -64,11 +63,6 @@ return defaultConfiguration; } - public void setDefaultConfiguration(C defaultConfiguration) { - this.defaultConfiguration = defaultConfiguration; - } - - public synchronized void start() throws ExperimentLifecycleException { if ( isRunning() ) { getLogger().warn("Ignoring request to START an already running experiment."); @@ -94,6 +88,9 @@ } public int getServerPort() { + if (configuration == null) { + return -1; + } return getConfiguration().getServerPort(); } @@ -107,12 +104,16 @@ } public String getName() { - if (name == null) { - name = getConfiguration().getExperimentName(); + if (configuration == null) { + return super.toString(); } - return name; + return getConfiguration().getExperimentName(); } + public String getIdentifier() { + return getConfiguration().getExperimentIdentifier(); + } + public boolean equals(Object object) { return (this == object) || ((object instanceof Experiment) && ((Experiment) object).getName().equals(getName())); @@ -187,7 +188,6 @@ protected abstract StateMachine getStateMachine(); - private Thread createExperimentServerThread() { return new Thread(new Runnable() { public void run() { @@ -211,6 +211,22 @@ } public void setConfigurationService(ExperimentConfigurationService configurationService) { -// this.configurationService = configurationService; + this.configurationService = configurationService; } + + public void setDefaultConfiguration(C defaultConfiguration) { + if (defaultConfiguration == null) { + throw new IllegalArgumentException("Cannot set default configuration to null."); + } + ExperimentConfiguration configuration = configurationService.find(defaultConfiguration.getClass(), defaultConfiguration.getExperimentIdentifier()); + if (configuration == null) { + this.defaultConfiguration = defaultConfiguration; + configurationService.persist(defaultConfiguration); + } + else { + this.defaultConfiguration = (C) configuration; + } + } + + } Modified: trunk/gee/src/java/edu/indiana/psych/gee/Experiment.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/Experiment.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/Experiment.java 2006-05-31 22:53:54 UTC (rev 186) @@ -31,6 +31,9 @@ public String getName() { return "null"; } + public String getIdentifier() { + return "null"; + } public ConsentForm getConsentForm() { return null; } @@ -61,6 +64,7 @@ public String getDescription(); public String getName(); + public String getIdentifier(); public ConsentForm getConsentForm(); Modified: trunk/gee/src/java/edu/indiana/psych/gee/action/ManageExperiment.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/action/ManageExperiment.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/action/ManageExperiment.java 2006-05-31 22:53:54 UTC (rev 186) @@ -23,7 +23,7 @@ private Set<Experiment> experiments; - private String experimentName; + private String experimentIdentifier; private ExperimentConfiguration configuration; @@ -37,32 +37,18 @@ } public String start() { - getLogger().debug("Starting: " + experimentName); + getLogger().debug("Starting: " + experimentIdentifier); getExperiment().start(); return NONE; } - public String status() { - getLogger().debug("Retrieving status for: " + experimentName); - return SUCCESS; - } - public String stop() { Experiment experiment = getExperiment(); - getLogger().debug("Stopping: " + experimentName + ": " + experiment); + getLogger().debug("Stopping: " + experimentIdentifier + ": " + experiment); experiment.stop(); return NONE; } - public String listExperiments() { - return SUCCESS; - } - - public String createExperiment() { - - return SUCCESS; - } - public ExperimentConfiguration getConfiguration() { return getExperiment().getConfiguration(); } @@ -79,11 +65,11 @@ } public Experiment getExperiment() { - return getExperimentService().find(experimentName); + return getExperimentService().find(experimentIdentifier); } - public void setExperimentName(String experimentName) { - this.experimentName = experimentName; + public void setExperimentIdentifier(String experimentName) { + this.experimentIdentifier = experimentName; } } Modified: trunk/gee/src/java/edu/indiana/psych/gee/action/ManageExperimentConfiguration.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/action/ManageExperimentConfiguration.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/action/ManageExperimentConfiguration.java 2006-05-31 22:53:54 UTC (rev 186) @@ -15,22 +15,71 @@ @SuppressWarnings("serial") public class ManageExperimentConfiguration extends GeeAction { + private ExperimentConfiguration<? extends ExperimentRoundParameters> configuration; + private String configurationId; + private String configurationClass; public String save() { + if (configuration == null) { + configuration = findConfiguration(getConfigurationId()); + getLogger().warn("Trying to save a null configuration, ignoring.."); + return INPUT; + } getConfigurationService().persist(configuration); return SUCCESS; } + public String add() { + configuration = findConfiguration(-1L); + return INPUT; + } + + public String edit() { + configuration = findConfiguration(getConfigurationId()); + return INPUT; + } + + public String addParameters() { + return INPUT; + } + public String delete() { getConfigurationService().delete(configuration); return SUCCESS; } + public ExperimentConfiguration<? extends ExperimentRoundParameters> getConfiguration() { + return configuration; + } + + public Long getConfigurationId() { + return Long.valueOf(configurationId); + } + public void setConfigurationId(String configurationId) { + this.configurationId = configurationId; + } + + private ExperimentConfiguration<? extends ExperimentRoundParameters> findConfiguration(Long configurationId) { + return getConfigurationService().find(getConfigurationClass(), configurationId); + } + + private Class getConfigurationClass() { + // TODO Auto-generated method stub + try { + return Class.forName(configurationClass); + } + catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + getLogger().error("Could not find class:" + configurationClass); + return null; + } + } - public void setConfiguration(ExperimentConfiguration<? extends ExperimentRoundParameters> configuration) { - this.configuration = configuration; + public void setConfigurationClass(String configurationClass) { + this.configurationClass = configurationClass; } } Modified: trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.java 2006-05-31 22:53:54 UTC (rev 186) @@ -14,11 +14,11 @@ @SuppressWarnings("serial") public class StartExperiment extends GeeAction { - private String experimentName; + private String experimentIdentifier; private Participant participant; private ConsentForm consentForm; - public String prepare() { + public String consent() { consentForm = getExperiment().getConsentForm(); if (consentForm == null) { // no consent form available for this experiment.. just start? @@ -28,7 +28,7 @@ } public String start() { - if ( getExperimentService().start(experimentName) ) { + if ( getExperimentService().start(experimentIdentifier) ) { return SUCCESS; } else { @@ -38,21 +38,17 @@ } public Experiment getExperiment() { - return getExperimentService().find(experimentName); + return getExperimentService().find(experimentIdentifier); } public ConsentForm getConsentForm() { return consentForm; } - public String getExperimentName() { - return experimentName; + public void setExperimentIdentifier(String experimentName) { + this.experimentIdentifier = experimentName; } - public void setExperimentName(String experimentName) { - this.experimentName = experimentName; - } - public Participant getParticipant() { return participant; } Modified: trunk/gee/src/java/edu/indiana/psych/gee/dao/ExperimentConfigurationDao.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/dao/ExperimentConfigurationDao.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/dao/ExperimentConfigurationDao.java 2006-05-31 22:53:54 UTC (rev 186) @@ -5,6 +5,8 @@ import edu.indiana.psych.gee.ExperimentConfiguration; import edu.indiana.psych.gee.ExperimentRoundParameters; +import java.util.List; + /** * $Id$ * @@ -22,6 +24,8 @@ public <E extends ExperimentConfiguration> E find(final Class<E> configurationClass, final String experimentName); + public <E extends ExperimentConfiguration> List<E> findAll(Class<E> configurationClass); + public void persist(ExperimentConfiguration<? extends ExperimentRoundParameters> configuration); public void delete(ExperimentConfiguration<? extends ExperimentRoundParameters> configuration); Modified: trunk/gee/src/java/edu/indiana/psych/gee/dao/HibernateExperimentConfigurationDao.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/dao/HibernateExperimentConfigurationDao.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/dao/HibernateExperimentConfigurationDao.java 2006-05-31 22:53:54 UTC (rev 186) @@ -5,6 +5,7 @@ import org.hibernate.Criteria; import org.hibernate.HibernateException; import org.hibernate.Session; +import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import org.springframework.orm.hibernate3.HibernateCallback; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; @@ -12,6 +13,8 @@ import edu.indiana.psych.gee.ExperimentConfiguration; import edu.indiana.psych.gee.ExperimentRoundParameters; +import java.util.List; + /** * $Id: Exp $ * @@ -26,16 +29,31 @@ private final Log logger = LogFactory.getLog(getClass()); + public <E extends ExperimentConfiguration> List<E> findAll(Class<E> configurationClass) { + return (List<E>) getHibernateTemplate().findByCriteria( DetachedCriteria.forClass(configurationClass) ); + } + public <E extends ExperimentConfiguration> E find(Class<E> configurationClass, Long id) { + if (id == -1L) { + try { + return configurationClass.newInstance(); + } + catch (Exception e) { + e.printStackTrace(); + String errorMessage = "Unable to instantiate instance of: " + configurationClass; + logger.error(errorMessage); + throw new IllegalArgumentException(errorMessage, e); + } + } return configurationClass.cast(getHibernateTemplate().get(configurationClass, id)); } - public <E extends ExperimentConfiguration> E find(final Class<E> configurationClass, final String experimentName) { + public <E extends ExperimentConfiguration> E find(final Class<E> configurationClass, final String experimentIdentifier) { return configurationClass.cast( getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { Criteria criteria = session.createCriteria(configurationClass); - criteria.add(Restrictions.eq("experimentName", experimentName)); + criteria.add(Restrictions.eq("experimentIdentifier", experimentIdentifier)); return criteria.uniqueResult(); } })); Modified: trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperimentParameters.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperimentParameters.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperimentParameters.java 2006-05-31 22:53:54 UTC (rev 186) @@ -9,7 +9,6 @@ import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; -import javax.persistence.OneToMany; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.Transient; Modified: trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerServerGameState.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerServerGameState.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerServerGameState.java 2006-05-31 22:53:54 UTC (rev 186) @@ -25,7 +25,7 @@ /** * $Id$ * - * The ForagerServerGameState is the data model needed on the server side. + * Represents the server side data model. * * * @author Allen Lee Modified: trunk/gee/src/java/edu/indiana/psych/gee/service/ExperimentConfigurationService.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/service/ExperimentConfigurationService.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/service/ExperimentConfigurationService.java 2006-05-31 22:53:54 UTC (rev 186) @@ -1,9 +1,12 @@ package edu.indiana.psych.gee.service; + import edu.indiana.psych.gee.ExperimentConfiguration; import edu.indiana.psych.gee.ExperimentRoundParameters; import edu.indiana.psych.gee.dao.ExperimentConfigurationDao; +import java.util.List; + /** * $Id: Exp $ * @@ -21,9 +24,15 @@ // private ConsentFormDao consentFormDao; + public <E extends ExperimentConfiguration> List<E> findAll(Class<E> configurationClass) { + return experimentConfigurationDao.findAll(configurationClass); + } public <E extends ExperimentConfiguration> E find(Class<E> configurationClass, Long id) { - return experimentConfigurationDao.find(configurationClass, id); + if (configurationClass == null) { + return null; + } + return experimentConfigurationDao.find(configurationClass, id); } /* FIXME: figure out if it is even possible to support this sort of @@ -37,8 +46,8 @@ } */ - public <E extends ExperimentConfiguration> E find(Class<E> configurationClass, String experimentName) { - return experimentConfigurationDao.find(configurationClass, experimentName); + public <E extends ExperimentConfiguration> E find(Class<E> configurationClass, String experimentIdentifier) { + return experimentConfigurationDao.find(configurationClass, experimentIdentifier); } public void persist(ExperimentConfiguration<? extends ExperimentRoundParameters> configuration) { Modified: trunk/gee/src/java/edu/indiana/psych/gee/service/ExperimentService.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/service/ExperimentService.java 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/src/java/edu/indiana/psych/gee/service/ExperimentService.java 2006-05-31 22:53:54 UTC (rev 186) @@ -21,32 +21,24 @@ public class ExperimentService { @SuppressWarnings("serial") - private final Map<String, Experiment> allExperiments = - new HashMap<String, Experiment>() { - public Experiment get(String key) { - if (key == null) { - return Experiment.NULL; - } - return super.get(key); - } - }; + private final Map<String, Experiment> allExperiments = new HashMap<String, Experiment>(); private final Log logger = LogFactory.getLog(getClass()); - public boolean start(String experimentName) { - find(experimentName).start(); - return available(experimentName); + public boolean start(String experimentIdentifier) { + find(experimentIdentifier).start(); + return available(experimentIdentifier); } - public boolean available(String experimentName) { - return allExperiments.containsKey(experimentName); + public boolean available(String experimentIdentifier) { + return allExperiments.containsKey(experimentIdentifier); } public void add(Experiment experiment) { if (experiment == null) { throw new IllegalArgumentException("Trying to add a null experiment to the experiment service"); } - allExperiments.put(experiment.getName(), experiment); + allExperiments.put(experiment.getIdentifier(), experiment); } public void remove(Experiment experiment) { @@ -54,13 +46,13 @@ logger.warn("Trying to remove a null experiment from ExperimentService - ignoring"); return; } - if ( allExperiments.remove(experiment.getName()) == null ) { + if ( allExperiments.remove(experiment.getIdentifier()) == null ) { logger.warn("Tried to remove " + experiment + " which doesn't exist in ExperimentService"); } } - public Experiment find(String name) { - Experiment experiment = allExperiments.get(name); + public Experiment find(String experimentIdentifier) { + Experiment experiment = allExperiments.get(experimentIdentifier); if (experiment == null) { return Experiment.NULL; } Modified: trunk/gee/war/WEB-INF/applicationContext.xml =================================================================== --- trunk/gee/war/WEB-INF/applicationContext.xml 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/war/WEB-INF/applicationContext.xml 2006-05-31 22:53:54 UTC (rev 186) @@ -67,7 +67,8 @@ <bean id="defaultForagerWebConfiguration" class="edu.indiana.psych.gee.forager.ForagerConfiguration"> <constructor-arg value="groups.psych.indiana.edu"/> <constructor-arg type="int"><value>26000</value></constructor-arg> - <property name="experimentName" value="forager-web"/> + <property name="experimentName" value="forager"/> + <property name="experimentIdentifier" value="forager-web"/> <property name="description" value="The Forager web experiment explores how individuals allocate themselves in a world with scarce resources via an always-available applet."/> <property name='clientJarName' value='forager-client.jar'/> <property name='clientMainClass' value='edu.indiana.psych.gee.forager.client.ForagerApplet'/> @@ -75,20 +76,21 @@ <bean id="defaultForagerExperimentConfiguration" class="edu.indiana.psych.gee.forager.ForagerConfiguration"> <constructor-arg value="groups.psych.indiana.edu"/> <constructor-arg type="int"><value>26001</value></constructor-arg> - <property name="experimentName" value="forager-experiment"/> + <property name="experimentName" value="forager"/> + <property name="experimentIdentifier" value="forager-experiment"/> <property name="description" value="The in-house Forager experiment explores how individuals allocate themselves in a world with scarce resources under a facilitator's guidance in controlled settings."/> <property name='clientJarName' value='forager-client.jar'/> <property name='clientMainClass' value='edu.indiana.psych.gee.forager.client.ForagerApplet'/> <property name='triggeredExperiment' value='true'/> </bean> <bean id="forager-web" class="edu.indiana.psych.gee.forager.ForagerExperiment"> + <property name="configurationService" ref='configurationService'/> <property name="defaultConfiguration" ref="defaultForagerWebConfiguration"/> - <property name="configurationService" ref='configurationService'/> <property name="experimentService" ref="experimentService"/> </bean> <bean id="forager-experiment" class="edu.indiana.psych.gee.forager.ForagerExperiment"> + <property name="configurationService" ref='configurationService'/> <property name="defaultConfiguration" ref="defaultForagerExperimentConfiguration"/> - <property name="configurationService" ref='configurationService'/> <property name="experimentService" ref="experimentService"/> </bean> </beans> Modified: trunk/gee/war/WEB-INF/classes/gee-admin.xml =================================================================== --- trunk/gee/war/WEB-INF/classes/gee-admin.xml 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/war/WEB-INF/classes/gee-admin.xml 2006-05-31 22:53:54 UTC (rev 186) @@ -8,9 +8,9 @@ admin package o' actions and urls. define the login filter here? --> <package name="admin" extends="default" namespace="/admin"> - <action name="index" class="edu.indiana.psych.gee.action.ManageExperiment" method="authenticate"> + <action name="index" class="edu.indiana.psych.gee.action.ManageExperiment"> <result name="success" type="freemarker">listExperiments.jsp</result> - <result name="error">error.jsp</result> + <result name="error">/error.jsp</result> </action> <action name="experiment" class="edu.indiana.psych.gee.action.ManageExperiment"> <result name="success" type="freemarker">listExperiments.jsp</result> Modified: trunk/gee/war/WEB-INF/classes/xwork.xml =================================================================== --- trunk/gee/war/WEB-INF/classes/xwork.xml 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/war/WEB-INF/classes/xwork.xml 2006-05-31 22:53:54 UTC (rev 186) @@ -43,9 +43,8 @@ <result type="freemarker">startExperiment.jsp</result> <result name="input" type="freemarker">consent.jsp</result> </action> - <action name="consent" class="edu.indiana.psych.gee.action.StartExperiment" method="prepare"> + <action name="consent" class="edu.indiana.psych.gee.action.StartExperiment" method="consent"> <!-- FIXME: do not use a validating stack here --> - <interceptor-ref name="basicStack"/> <result type="freemarker">consent.jsp</result> <result name="input" type="freemarker">consent.jsp</result> </action> Modified: trunk/gee/war/admin/configureExperiment.jsp =================================================================== --- trunk/gee/war/admin/configureExperiment.jsp 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/war/admin/configureExperiment.jsp 2006-05-31 22:53:54 UTC (rev 186) @@ -6,10 +6,12 @@ <p> Configuring the <span class="highlight">${configuration.experimentName}</span> experiment: </p> -<@ww.form action="updateExperimentConfiguration"> - <@ww.hidden name="experimentName" value="${configuration.experimentName}"/> +<@ww.form action="configuration!save.action" method="post"> + <@ww.hidden name="configurationClass" value="${configuration.class.name}"/> + <@ww.hidden name="configurationId" value="${configuration.id}"/> <@ww.textfield size=40 label="Server port" name="configuration.serverPort"/> <@ww.textfield size=40 label="Experiment name" name="configuration.experimentName"/> + <@ww.textfield size=40 label="Experiment id" name="configuration.experimentIdentifier"/> <@ww.textfield size=40 label="Server name" name="configuration.serverName"/> <@ww.textarea cols=37 rows=6 label="Description" name="configuration.description"/> <@ww.checkbox label="Triggered?" name="configuration.triggeredExperiment"/> @@ -25,13 +27,16 @@ <#else> <h3> <div id="Error"> -No experiment parameters associated with ${configuration.experimentName}, please add some! +No experiment parameters associated with ${configuration.experimentName}, + <a href='javascript:void(0)' onclick='toggle("addExperimentParametersDiv")'>add some?</a>. </div> </h3> </#if> <hr/> -<@ww.form action="addExperimentParameters" method="POST" enctype="multipart/form-data"> +<div id="addExperimentParametersDiv" style="display:none;"> +<@ww.form action="configuration!addParameters.action" method="POST" enctype="multipart/form-data"> <@ww.file label="Add experiment parameters from file: " name="'experimentParametersFile'"/> <@ww.submit value="Load"/> </@ww.form> +</div> </body> Modified: trunk/gee/war/admin/listExperiments.jsp =================================================================== --- trunk/gee/war/admin/listExperiments.jsp 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/war/admin/listExperiments.jsp 2006-05-31 22:53:54 UTC (rev 186) @@ -9,7 +9,7 @@ (not implemented yet). <table> <tr> - <th>Name</th> + <th>Name/Identifier</th> <th>Description</th> <th>Status</th> <th>Action</th> @@ -20,18 +20,18 @@ <#else> <tr class="displayeven"> </#if> - <td width="10%"><span class='highlight'>${name}</span></td> + <td width="10%"><span class='highlight'>${name} / ${identifier}</span></td> <td width="50%">${description}</td> <td width="15%"> ${running?string("running", "not running")} </td> <td width="25%"> ( - <a href="experiment!start.action?experimentName=${name}">Start<a> + <a href="experiment!start.action?experimentIdentifier=${identifier}">Start<a> | - <a href='experiment!stop.action?experimentName=${name}'>Stop<a> + <a href='experiment!stop.action?experimentIdentifier=${identifier}'>Stop<a> | - <a href='experiment!configure.action?experimentName=${name}'>Edit</a> + <a href='experiment!configure.action?experimentIdentifier=${identifier}'>Edit</a> ) </td> </tr> Modified: trunk/gee/war/css/gee.css =================================================================== --- trunk/gee/war/css/gee.css 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/war/css/gee.css 2006-05-31 22:53:54 UTC (rev 186) @@ -73,7 +73,7 @@ } th { - background: #C96; + background: #A4B5C5; border-left: 1px solid #EB8; border-right: 1px solid #B74; border-top: 1px solid #EB8; Modified: trunk/gee/war/index.jsp =================================================================== --- trunk/gee/war/index.jsp 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/war/index.jsp 2006-05-31 22:53:54 UTC (rev 186) @@ -57,12 +57,13 @@ <tr class="displayeven"> </#if> <td style="white-space: nowrap;"> - <a href='consent.action?experimentName=${name}'> - <span class="highlight">[ ${name} ]</span> - </a> + <#assign url='consent.action?experimentIdentifier=${identifier}'> + <@ww.a href='${url}'> + <span class="highlight">[ ${identifier} ]</span> + </@ww.a> </td> <td>${description}</td> - <td><a href='consent.action?experimentName=${name}'><i>start</i></a></td> + <td><@ww.a href='${url}'><i>start</i></@ww.a></td> </tr> </@ww.iterator> </tbody> Modified: trunk/gee/war/template.jsp =================================================================== --- trunk/gee/war/template.jsp 2006-05-27 22:58:09 UTC (rev 185) +++ trunk/gee/war/template.jsp 2006-05-31 22:53:54 UTC (rev 186) @@ -9,6 +9,16 @@ <LINK REL="stylesheet" HREF="/gee/css/gee.css" TYPE="text/css" /> <title><decorator:title default="Group Experiments Environment" /></title> <decorator:head /> +<script> + function $(id) { + return document.getElementById(id); + } + function toggle(id) { + var display = $(id).style.display; + $(id).style.display = + (display == "block") ? "none" : "block"; + } +</script> </head> <body> <div id="Content"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |