inputView = new ListView<InputParameterValues>("inputs", new PropertyModel(execute, "inputs")) {
@Override
protected void populateItem(ListItem item) {
InputParameterValues pv = (InputParameterValues) item.getModelObject();
Parameter p = pv.getParameter();
item.add(new Label("param", buildParamSpec(p)));
item.add(new Label("paramDescription", p.description.toString(Locale.ENGLISH)));
// TODO: roll out an extension point for these editors
final PropertyModel property = new PropertyModel(pv,
"values[0].value");
if (pv.isBoundingBox()) {
EnvelopePanel envelope = new EnvelopePanel("paramValue", property);
envelope.setCRSFieldVisible(true);
item.add(envelope);
} else if (pv.isCoordinateReferenceSystem()) {
CRSPanel crs = new CRSPanel("paramValue", property);
item.add(crs);
} else if (pv.isEnum()) {
EnumPanel panel = new EnumPanel("paramValue", ((Class<Enum>) pv.getParameter().type),
property);
item.add(panel);
} else if(pv.isComplex()) {
ComplexInputPanel input = new ComplexInputPanel("paramValue", pv, 0);
item.add(input);
} else {
Fragment f = new Fragment("paramValue", "literal", WPSRequestBuilderPanel.this);
FormComponent literal = new TextField("literalValue", property);
literal.setRequired(p.minOccurs > 0);
literal.setLabel(new Model<String>(p.key));
f.add(literal);
item.add(f);
}
}
};
inputView.setReuseItems(true);
inputContainer.add(inputView);
outputContainer = new WebMarkupContainer("outputContainer");
outputContainer.setVisible(false);
add(outputContainer);
outputView = new ListView("outputs", new PropertyModel(execute, "outputs")) {
@Override
protected void populateItem(ListItem item) {
OutputParameter pv = (OutputParameter) item.getModelObject();
Parameter p = pv.getParameter();
item.add(new CheckBox("include", new PropertyModel<Boolean>(pv, "include")));
item.add(new Label("param", buildParamSpec(p)));
item.add(new Label("paramDescription", p.description.toString(Locale.ENGLISH)));
if (pv.isComplex()) {
DropDownChoice mime = new DropDownChoice("mime", new PropertyModel(pv,