public NamespacePanel(final String componentId, final IModel selectedItemModel, final IModel paramLabelModel, final boolean required) { // make the value of the combo field the model of this panel, for easy // value retrieval super(componentId, selectedItemModel); // the label String requiredMark = required ? " *" : ""; Label label = new Label("paramName", paramLabelModel.getObject() + requiredMark); add(label); nsLabel = new Label("paramValue", new PropertyModel(selectedItemModel, "URI")); nsLabel.setOutputMarkupId(true); add(nsLabel); /* // the drop down field, with a decorator for validations choice = new DropDownChoice("paramValue", selectedItemModel, new NamespacesModel(), new NamespaceChoiceRenderer()); choice.setRequired(required); // set the label to be the paramLabelModel otherwise a validation error would look like // "Parameter 'paramValue' is required" choice.setLabel(paramLabelModel); choice.setOutputMarkupId(true); FormComponentFeedbackBorder feedback = new FormComponentFeedbackBorder("border"); feedback.add(choice); add(feedback); */ }
public NamespacePanel( final String componentId, final IModel selectedItemModel, final IModel paramLabelModel, final boolean required) { // make the value of the combo field the model of this panel, for easy // value retrieval super(componentId, selectedItemModel); // the label String requiredMark = required ? " *" : ""; Label label = new Label("paramName", paramLabelModel.getObject() + requiredMark); add(label); nsLabel = new Label("paramValue", new PropertyModel(selectedItemModel, "URI")); nsLabel.setOutputMarkupId(true); add(nsLabel); /* // the drop down field, with a decorator for validations choice = new DropDownChoice("paramValue", selectedItemModel, new NamespacesModel(), new NamespaceChoiceRenderer()); choice.setRequired(required); // set the label to be the paramLabelModel otherwise a validation error would look like // "Parameter 'paramValue' is required" choice.setLabel(paramLabelModel); choice.setOutputMarkupId(true); FormComponentFeedbackBorder feedback = new FormComponentFeedbackBorder("border"); feedback.add(choice); add(feedback); */ }