Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexedListInstantiator "consumir índice dos nomes dos parâmetros" #32

Open
ettoreleandrotognoli opened this issue Dec 12, 2017 · 0 comments

Comments

@ettoreleandrotognoli
Copy link

Precisei alterar isso para funcionar como eu esperava, mas não tenho certeza se é o esperado pela biblioteca.
Criei meu próprio "Converter" no Vraptor e ele não recebia o "id" por parâmetro quando era um parâmetro indexável. Exemplo: cliente.pedido[1]=id

final Object newElement = listElementInstantiator.instantiate(elementTarget , atIndex);

Parameters itemParamaters = new Parameters(atIndex.forTarget(target).stream()
          .map(p -> new Parameter(p.getName().replaceFirst("\\[\\w\\]", ""), p.getValue()))
          .collect(Collectors.toList()));
      final Object newElement = listElementInstantiator.instantiate(elementTarget, itemParamaters);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant