Hi there guys,
This topic heading looks just like others in this forum, I've read them and implmented the proposed solutions but something is still not working.
Here's what I have.
jsf page.....
...
<h:panelGroup id="parameterPanel" binding="#{reportBean.parameterPanel}"/>
...
<h:commandButton value="Request Report" id="requestReportButton" action="#{reportBean.requestReport}"/>
...
backing bean
...
public UIPanel getParameterPanel() {
return parameterPanel;
}
public void setParameterPanel(UIPanel parameterPanel) {
this.parameterPanel = parameterPanel;
}
...
private void loadParameters() {
HtmlOutputText table = new HtmlOutputText();
table.setValue("<table>");
table.setEscape(false);
parameterPanel.getChildren().add(table);
for (Parameter parameter : parameters) {
if (!parameter.isVisible()) {
continue;
}
table = new HtmlOutputText();
table.setValue("<tr><td valign='top'>");
table.setEscape(false);
parameterPanel.getChildren().add(table);
// add the label/////////////////////////////
HtmlOutputText label = new HtmlOutputText();
label.setValue(parameter.getLabel() + (parameter.isRequired() ? " * " : ""));
parameterPanel.getChildren().add(label);
table = new HtmlOutputText();
table.setValue("</td><td> </td><td valign='top'>");
table.setEscape(false);
parameterPanel.getChildren().add(table);
// add the parameter control/////////////////////////////
parameterPanel.getChildren().add(parameter.getControl());
table = new HtmlOutputText();
table.setValue("</td><td> </td><td valign='top'>");
table.setEscape(false);
parameterPanel.getChildren().add(table);
// add the blurp/////////////////////////////
HtmlOutputText blurp = new HtmlOutputText();
blurp.setValue(parameter.getBlurp());
blurp.setStyle("font-size:small;font-style:italic");
parameterPanel.getChildren().add(blurp);
table = new HtmlOutputText();
table.setValue("</td></tr>");
table.setEscape(false);
parameterPanel.getChildren().add(table);
}
table = new HtmlOutputText();
table.setValue("</table>");
table.setEscape(false);
parameterPanel.getChildren().add(table);
}
All the get control does is check the parameter attributes and decide whether to make the type an html input, radio button drop down box etc...
All works well when loading the page, but after I have filled values in to the input fields the setter for the panel never gets called.
When I click on the requestReport button the framework doesn't ever call the setParameterPanel method.
Like the binding isn't working after the first time.
Please help, let me know if you need any more info.
thanks
Darryl