Conversion issue - Schedule_editsettings.jsp not working with Schedule.Mode
setting
-----------------------------------------------------------------------------------
Key: TOMAHAWK-1224
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1224
Project: MyFaces Tomahawk
Issue Type: Bug
Components: Examples
Environment: Tomcat, Windows XP, Firefox and IE7
Reporter: Frederic Filiatrault
Priority: Minor
The actual mode selected is returning a "Value is not a valid option." due to a
conversion issue.
This can be fix very easily with 2 steps:
STEP 1 - Adding this code to
org.apache.myfaces.examples.schedule.ScheduleSettings.java :
private String mode;
public String getMode() { return mode;}
public void setMode(String value) {
if (value != null) {
int mode = Integer.parseInt(value);
model.setMode(mode);
this.mode = value;
}
}
STEP 2 - Changing the value attribute of the mode from
"scheduleSettings2.model.mode" to "scheduleSettings2.mode" :
<h:selectOneRadio id="mode" value="#{scheduleSettings2.mode}">
<f:selectItem itemValue="0" itemLabel="day"/>
<f:selectItem itemValue="1" itemLabel="workweek"/>
<f:selectItem itemValue="2" itemLabel="week" />
<f:selectItem itemValue="3" itemLabel="month" />
</h:selectOneRadio>
Hope this helps. thk
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.