I have an application that needs to have a dynamic panel, I was able to create and display the screen and put the values from the database, but I can not get the values of the inputnumber if the user modifies, my question is how do I get these values? Below is the panel creation with input and output
public void criarPainelBoleto() {
panelBoleto = new PanelGrid();
panelBoleto.setColumns(2);
OutputLabel opcoes = (OutputLabel) FacesContext.getCurrentInstance().getApplication()
.createComponent(OutputLabel.COMPONENT_TYPE);
OutputLabel descontos = (OutputLabel) FacesContext.getCurrentInstance().getApplication()
.createComponent(OutputLabel.COMPONENT_TYPE);
opcoes.setValue("Opções de Pagamento");
descontos.setValue("Descontos (%)");
opcoes.setStyle("font-weight:bold");
descontos.setStyle("font-weight:bold");
panelBoleto.getChildren().add(opcoes);
panelBoleto.getChildren().add(descontos);
if (listaDescontosEComissoesBoleto.size() != 0) {
for (int i = 1; i <= listaDescontosEComissoesBoleto.size(); i++) {
OutputLabel outputLabel = (OutputLabel) FacesContext.getCurrentInstance().getApplication()
.createComponent(OutputLabel.COMPONENT_TYPE);
InputNumber inputNumber = (InputNumber) FacesContext.getCurrentInstance().getApplication()
.createComponent(InputNumber.COMPONENT_TYPE);
inputNumber.setSymbol(Mensagens.get().getString("comum.pe.inputnumber.percent.symbol"));
inputNumber
.setSymbolPosition(Mensagens.get().getString("comum.pe.inputnumber.percent.symbol.position"));
inputNumber.setMaxValue("99.99");
inputNumber.setRequired(true);
inputNumber.setRequiredMessage(
Mensagens.get().getString("painel.configuracoes.cliente.parcela.boleto.obrigatoria"));
int posicao = i-1;
inputNumber.setValue(listaDescontosEComissoesBoleto.get(posicao).getPercentualDesconto());
if (i == 1) {
outputLabel.setValue("Pagamento à vista");
} else {
outputLabel.setValue("Pagamento em " + i + " vezes");
}
panelBoleto.getChildren().add(outputLabel);
panelBoleto.getChildren().add(inputNumber);
}
}
}