Thanks for the reply Mike. I asked the question because I'm working on
a custom navigation component for my project. It's basically a simple
navigation bar that contains links to other views and also keeps track
of which link is currently "selected". Maybe I'm doing something wrong
but the only way I'm able to keep track of the selected link value is
by binding it to a session scoped managed bean. Looks something like
this....

<my:navigatorPanel id="navigatorPanel_navigation" layout="horizontal"
selectedItemId="#{navigatorBean.selectedItemId}">
                        <my:navigatorItem id="navigatorItem_profile" 
value="Profile"
action="profile" />
                        <my:navigatorItem id="navigatorItem_members" 
value="Members"
action="members" />

                        <my:navigatorItem id="navigatorItem_home" value="Home"
action="home" selectedIcon="menu_1.gif" unselectedIcon="menu_2.gif"/>
</my:navigatorPanel>


 During debugging it seems that the components is created new each
time I go to a new view. Do you think this is correct behavior or do
you think I'm doing something wrong in my component?
                                 Thanks,
                                  Galen 

On 7/21/05, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> I'm not really confident about my answer to this, but since no one
> else has responded, I'll post what I think and someone more
> knowledgable will gleefully correct it :)
> 
> Components provide methods for saving and restoring state.   Between
> requests, that state information is stored somewhere, but not in the
> component itself.   If you choose server-side state saving, it's
> stored in your session.    If you choose client-side state saving,
> it's stored in hidden fields on your response.
> 
> So if you're using client-side state saving, you can have a different
> view of the component on every page.   If you're using server-side
> state saving, you wouldn't (might be wrong about this -- you'd have to
> investigate the source and see).   I think it's also possible to
> implement your own server-side state manager to maintain multiple
> views for a component, but that's speculation.
>

Reply via email to