Skip to content

Commit

Permalink
Add form with AsOfDate and SourceDOI, name is subject to change
Browse files Browse the repository at this point in the history
  • Loading branch information
misdoro committed Nov 15, 2012
1 parent 5b8c0dc commit 1ffc417
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<hibernate-commons-annotations.version>3.3.0.ga</hibernate-commons-annotations.version>
<registry-client.version>12.07r1-SNAPSHOT</registry-client.version>
<query-parser.version>12.07</query-parser.version>
<dictionary.version>12.07</dictionary.version>
<dictionary.version>12.07r1-SNAPSHOT</dictionary.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -62,4 +62,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.vamdc.portal.session.queryBuilder.forms.ParticlesForm;
import org.vamdc.portal.session.queryBuilder.forms.QueryEditForm;
import org.vamdc.portal.session.queryBuilder.forms.RadiativeForm;
import org.vamdc.portal.session.queryBuilder.forms.UtilForm;
import org.vamdc.portal.session.queryLog.QueryLog;
import org.vamdc.portal.session.security.UserInfo;

Expand Down Expand Up @@ -162,6 +163,10 @@ public void addFormQueryEditor(){
public void addFormBranches(){
queryData.addForm(new BranchesForm());
}

public void addFormUtil(){
queryData.addForm(new UtilForm());
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ public class Order implements Comparator<Form>{
final static Integer Environment=7;

public final static Integer SINGLE_LIMIT=10;//Forms above this number can occur once
final static Integer Process=12;
final static Integer Branches=13;
final static Integer Query=14;
static final Integer Comments = 15;
final static Integer Process = 12;
final static Integer Util = 15;
final static Integer Branches = 18;
final static Integer Query = 19;
static final Integer Comments = 20;

@Override
public int compare(Form o1, Form o2) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.vamdc.portal.session.queryBuilder.forms;

import org.vamdc.dictionary.Restrictable;
import org.vamdc.portal.session.queryBuilder.fields.SimpleField;

public class UtilForm extends AbstractForm{

private static final long serialVersionUID = 604009831586236633L;

@Override
public String getTitle() { return "Misc."; }

@Override
public String getView() { return "/xhtml/query/forms/standardForm.xhtml"; }

@Override
public Integer getOrder() { return Order.Util; }

public UtilForm(){
super();

addField(new SimpleField(Restrictable.AsOfDate, "History date"));
addField(new SimpleField(Restrictable.SourceDOI,"Source DOI"));

}

}
2 changes: 2 additions & 0 deletions portal.war/src/main/webapp/xhtml/query/formMenu.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

<rich:dropDownMenu styleClass="queryMenuBlock" value="Advanced"
submitMode="ajax" direction="bottom-right" jointPoint="tr">
<rich:menuItem value="Util" reRender="formPanel"
action="#{query.addFormUtil()}" />
<rich:menuItem value="Query editor" reRender="formPanel"
action="#{query.addFormQueryEditor}" />
<rich:menuItem value="Request" reRender="formPanel"
Expand Down

0 comments on commit 1ffc417

Please sign in to comment.