Bug Report
Page (Second Edition)cd ch1\login\web to cd
ch1\login\src\java. Change mkdir WEB-INF\classes to
mkdir ..\..\web\WEB-INF\classes.insrc/java/com/corejsf/” to “in
src/java/com/corejsf/”> in <f:view
locale="#{user.locale}"/>>answerAction method with
public String answerAction() {
tries++;
if (problems[currentProblem].isCorrect(response)) {
score++;
nextProblem();
if (currentProblem == problems.length) return "done";
else return "success";
}
else if (tries == 1) {
return "again";
}
else {
nextProblem();
if (currentProblem == problems.length) return "done";
else return "failure";
}
}
secure” to
“such as /secure/*”selectitems to selectItems and
selectitem to selectItemvlude to valueanchor
attribute” to “There is no need for an action
attribute”<h:inputText id="password" .../> <h:inputText id="passwordConfirm" .../>
to
<h:inputSecret id="password" .../> <h:inputSecret id="passwordConfirm" .../>
Change “Default value is false.” to
“Default value is true.”
<h:outputText value="#{form.htmlCode}"
escape="false"/> where the getHtmlCode method
returns the string "<input type='text'
value='hello'/>"
Change item 4 to
<h:outputText value="#{form.htmlCode}"/> where the
getHtmlCode method returns the string "<input
type='text' value='hello'/>"
public SelectItem[] getBeverageItems() {
return beverage;
}
to
public SelectItem[] getBeverageItems() {
return beverageItems;
}
new
ArrayListList<SelectItem>();” to “new
ArrayList<SelectItem>();”rowClasses="evenRows, oddRows" and
columnClasses="evenColumns, oddColumns"” to
“rowClasses="oddRows, evenRows" and
columnClasses="oddColumns, evenColumns" (assuming the row
and column numbers start with 1).”for (int i=0; i < rowCnt; ++i) {
rows[i] = new Row(i);
to
for (int i=0; i < rowCnt; ++i) {
rows[i] = new Row(i);
}
Fix the indenting in
public void setRowIndex(int rowIndex) {
if (rowIndex == -1 || rowIndex >= model.getRowCount()) {
model.setRowIndex(rowIndex);
}
else {
model.setRowIndex(rows[rowIndex].row); }
}
to
public void setRowIndex(int rowIndex) {
if (rowIndex == -1 || rowIndex >= model.getRowCount()) {
model.setRowIndex(rowIndex);
}
else {
model.setRowIndex(rows[rowIndex].row);
}
}
(i.e. indent the four bold lines)
“For h:messages, you usually want to set the layout attribute to "table" so that the messages are lined up vertically. Otherwise they are concatenated.
<h:messages layout="table"/>
TIP: Whenever you create a message, make sure it ends with a period and a space, to ensure a neat appearance when messages are concatenated.”
to
“The default value of the layout attribute for
h:messages is "list", which yields an
unnumbered list whose appearance you can control with a style sheet.
Alternatively, you can up the messages vertically by using
<h:messages layout="table"/>
CAUTION: In JSF 1.1, the default behavior was to concatenate the messages. ”
" should be two single quotes ''<h:panelGroup/> with
<h:message for="card" styleClass="errorMessage" />
> at the end of
<h:inputText id="card" value="#{payment.card}" required="true">
converter property of the last
input field” to “Note the validator property of
the last input field”renderResponse method of the
FacesContext class." Change
FacesContext.responseComplete() to "the responseComplete
method of the FacesContext class." Change the second
FacesContext.renderResponse() to "the renderResponse
method".actionListener="#{rushmore.listen}" to
actionListener="#{rushmore.handleMouseClick}"public void listen(ActionEvent e) to public
void handleMouseClick(ActionEvent e)onchange="submit()"renderResponse method of the
FacesContext class." <property-class>java.lang.Integer</property-class>_id.yearSpinner to
2000 (or 2005), depending on whether you want to match Figure 9-1 or 9-2
:-)Class[] paramTypes = new Class[] { ValueChangeListener.class };
to
Class[] paramTypes = new Class[] { ValueChangeEvent.class };
max to max.toString() and
min to min.toString(). (Otherwise, values >
999 will be rendered with decimal separators.)rendersChildren to getRendersChildren
(2x)Object values[] = new Object[3]; to Object[]
values = new Object[2];ValidatorTag class." to "However, the custom validator tag
must extend the ValidatorELTag class."sun-web.xml to
WEB-INF/sun-web.xml.http://metro.dev.java.net. Refer to the Metro
documentation”<h:outputText value="#{header}" style="color: red;"/>
to
<h:outputText value="#{headers}" style="color: red;"/>
calendar to inputCalendarhttp://myfaces.apache.org/tomahawk/panelStack.html after
tomahawk/ so that it doesn't have a hyphen.@PostConstruct will be invoked.” to “When a
request, session, or application scope ends, the methods of all managed
beans in the scope that are annotated with @PreDestroy will
be invoked.”Thanks to Eugene Bendersky, Mark Boatman, Joy Beer, Ognjen Blagojevic, Guus Bonnema, Luca Borzani, Chuck Burchard, John Chen, Tim Colburn, Lewis Coosner, Michele Costabile, Chris Dailey, Juan C Esquivel, Ian Finch, Shawn Flahave, Jeremy Flowers, Mitch Gart, Eef Goeyenbier, Jeremy Goodwin, Stephan Gross, Scott Healy, Nick Karlsson, Chow Yip Keung, Karl Krasnowsky, Pieter Kuijpers, Michael Kulla, Donna Lamb, Else Lervik, Robert Liguori, J. Luis Lominchar, Borzani Luca, Sergey Margaryants, Tom Nagle, Tor-Erik Nesse, Larry Sanford, Scott C. Schank, Aaron Shettleroe, Klaus Stähler, Gerald Struck, Marc Thompson, Jason Tovey, Andreas Watermeyer, Robert Welters, Shane Wilson, Daoqi Yang, Aldo Ahmed Solis Zenteno, and (your name might go here) for their help!
Please report any remaining bugs in this edition on the bug report form.