-
1. Re: one interactive page, which scope and bean type
lightguard Jan 5, 2012 3:53 PM (in response to pabia1)
- view scope is apparently not great choice, is it?What makes you think that? If you're on the same page, that would work fine.
- I don’t know where to end conversation without having explicit confirm button.I guess that all depends on how many
units of work
you have. If each tab is it's own unit of work, such as adding a car, one for editing, etc. Then each tab would be it's own conversation. If you go this way, you'll want to check to see if there's already a conversation running and end that and start a new one as the built-in CDI conversation doesn't allow for suspending conversations.
- Is a good practice to save state to DB as I go, or do one bulk update at the endReally depends on which way you want to go, and if it's acceptable to have your users redo the work they just did if something goes wrong or they step away from the computer for a while. That one is a requirement you and your business will have to decide upon.
- I am not sure when to start, preRenderView, @PostConstruct ?If you're talking about starting a conversation, a view action works well for this, as does post construct for the first / main bean of the page.
- Is setting conversation Timeout a good practice?There is a timeout by default, but if you need it longer / shorter, then yes you'll have to set it and there's nothing wrong with that.
- My page is actually a panel in rich:tabPanel and therefore cannot be associated one-to-one with a view. If necessary I can “extract” the page.That's fine, I've seen this sort of thing done before.