public NewRestResourceActionBase(String title, String description) {
super(title, description);
}
public void perform(T parent, Object param) {
RestUriDialogHandler dialogBuilder = new RestUriDialogHandler();
XFormDialog dialog = dialogBuilder.buildDialog(messages);
if (param instanceof URL) {
XmlBeansRestParamsTestPropertyHolder params = new XmlBeansRestParamsTestPropertyHolder(null, RestParametersConfig.Factory.newInstance());
String path = RestUtils.extractParams(param.toString(), params, false);
dialog.setValue(Form.RESOURCEPATH, path);
}
if (dialog.show()) {
String path = dialogBuilder.getUri();
RestResource resource = createRestResource(parent, path);
RestUtils.extractParams(dialog.getValue(Form.RESOURCEPATH), resource.getParams(), false);
resource.setPath(removeParametersFrom(resource.getPath()));
createMethodAndRequestFor(resource);