Problem with variables
denise.elsa_denise.hotmail.com Aug 5, 2010 12:33 PMI can't get my variables to have values my code is in the view:
<s:decorate>
<h:selectOneMenu value="#{report1}" id="report1" required="true" >
<s:selectItems value="#{myReports}" var="s" label="#{s.title}" noSelectionLabel='--- Select ---'/>
</h:selectOneMenu>
</s:decorate>
</td></tr>
<tr><td><span class="required">*</span>Report 2: </td>
<td>
<s:decorate>
<h:selectOneMenu value="#{report2}" id="report2" required="true" >
<s:selectItems value="#{myReports}" var="s" label="#{s.title}" noSelectionLabel='--- Select ---'/>
</h:selectOneMenu>
</s:decorate>
in the controller:
@Begin(flushMode=FlushModeType.MANUAL,join=true)
public String compareReports(){
report=getReport1();
report.setCharts(new ArrayList<byte[]>());
ReportBuilder builder = getBuilder(report.getReportType());
builder.setReport(report);
builder.buildTimeSeriesPlot();
builder.buildBoxPlot();
builder.buildDotPlot();
builder.buildScatterPlot();
builder.buildBarPlot();
return "/compare-reports.xhtml";
}
what i'm trying to do is to be able to access report1 and report2 in the controller. Those variables are declared there and have their gets and sets.
<s:decorate>
<h:selectOneMenu value="#{report1}" id="report1" required="true" >
<s:selectItems value="#{myReports}" var="s" label="#{s.title}" noSelectionLabel='--- Select ---'/>
</h:selectOneMenu>
</s:decorate>
</td></tr>
<tr><td><span class="required">*</span>Report 2: </td>
<td>
<s:decorate>
<h:selectOneMenu value="#{report2}" id="report2" required="true" >
<s:selectItems value="#{myReports}" var="s" label="#{s.title}" noSelectionLabel='--- Select ---'/>
</h:selectOneMenu>
</s:decorate>
in the controller:
@Begin(flushMode=FlushModeType.MANUAL,join=true)
public String compareReports(){
report=getReport1();
report.setCharts(new ArrayList<byte[]>());
ReportBuilder builder = getBuilder(report.getReportType());
builder.setReport(report);
builder.buildTimeSeriesPlot();
builder.buildBoxPlot();
builder.buildDotPlot();
builder.buildScatterPlot();
builder.buildBarPlot();
return "/compare-reports.xhtml";
}
what i'm trying to do is to be able to access report1 and report2 in the controller. Those variables are declared there and have their gets and sets.