error in observer example
-------------------------
Key: JBSEAM-1565
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1565
Project: JBoss Seam
Issue Type: Patch
Components: Documentation
Affects Versions: 2.0.0.BETA1, 1.3.0.ALPHA
Reporter: Dan Allen
Attachments: JBSEAM-1565-v1.txt
The example in the Factory Manager and Components section regarding the HenHouse has
several errors. The first two observer methods make use of a parameter, hen, that is not
specified in the method definition. The last observer method is a duplicate of the first,
which would not compile and whose name doesn't make sense in the context anyway.
The patch included in this report corrects the example so that it appears as such:
...
@Observer({"chickBorn", "chickenBoughtAtMarket"})
public addHen(Hen hen) {
hens.add(hen);
}
@Observer("chickenSoldAtMarket")
public removeHen(Hen hen) {
hens.remove(hen);
}
@Observer("foxGetsIn")
public noMoreHens() {
hens.clear();
}
...
By the way, I love this example. It is fun to read and easy to relate to. Nice work!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira