]
George Gastaldi closed FORGE-1925.
----------------------------------
Fix Version/s: 2.7.1.Final
Resolution: Done
Forge fails to assign values to UIInputMany instances
-----------------------------------------------------
Key: FORGE-1925
URL:
https://issues.jboss.org/browse/FORGE-1925
Project: Forge
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: UI - Shell
Affects Versions: 2.7.0.Final
Environment: Fedora 20, Oracle Java 8
Reporter: Vineet Reynolds
Assignee: Vineet Reynolds
Fix For: 2.7.1.Final
When I have a UIInputMany instance like so:
{noformat}
@Inject
@WithAttributes(label = "Content Type", defaultValue =
MediaType.APPLICATION_JSON, required = true)
private UIInputMany<String> contentType;
{noformat}
with an auto-completor configured as:
{noformat}
contentType.setCompleter(new UICompleter<String>() {
@Override
public Iterable<String> getCompletionProposals(UIContext context,
InputComponent<?, String> input, String value) {
List<String> options = new ArrayList<>();
options.add(MediaType.APPLICATION_XML);
options.add(MediaType.APPLICATION_JSON);
return options;
}
});
{noformat}
then, when I execute a command that contains the {{UIInputMany}} field, the value entered
by the end-user to the named parameter is not assigned to the component, resulting in an
error:
{noformat}
[demo]$ rest-generate-endpoints-from-entities --targets org.demo.model.Customer
--contentType application/oml
***ERROR*** Content Type must be specified.
{noformat}