[jboss-user] [JBoss Seam] - Re: how to catch unhandled exception in the conversation bea
ellenzhao
do-not-reply at jboss.com
Sun Aug 19 12:29:24 EDT 2007
I'm going to try this:
| @Name("foodManager")
| @Scope(COVERSATION)
| @Stateful
| public class FoodManagerImpl extends AppControllerImpl implements FoodManager, Serializable {
|
| @In(required = false)
| private IllegalPriceException ipe;
| ...
|
| /* List<Exception> errors and UseCaseStack useCases are protected fields in the AppControllerImpl class and they are heavily used in the RHS of "rendered= ..." rules in the view codes. This way, the rendering of every field of an entity can be controlled using these conditions in the view code. This way, the reusability of entity class and its view code is maximized. The view of a use case is simply composed of one or more entity views. */
|
| @Override
| public void tryFinishUpdateAFood(){
| boolean noInputError = true;
| if (this.ipe != null) {
| noInputError = false;
| this.errors.add(this.ipe);
| }
|
| if .....
|
| if (noInputError) this.finishUpdateAFood();
| }
|
| private void finishUpdateAFood(){
| Conversation.instance().end();
| this.useCases.removeUseCase(UseCase.updateAFood);
| this.food.setStatus(CRUDStatus.UPDATED.getSymbolInDB());
| }
| }
|
|
fingers crossed hoping the exceptions can be injected to the manager bean....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075558#4075558
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075558
More information about the jboss-user
mailing list