My problem deals with navigation between two pages, a Contract list page
and a Contract detail page.  On the list page is a Boolean check box
that filters the list according to a certain criteria with a
ValueChangeListener.  When the user click on a contract, the id of that
contract is sent as a parameter to the detail page.  That parameter is
used in the init() method of the detail page's backing bean to load a
contract object and place it in session.  All this works great.

The user can go back and forth between the list page and the detail page
*except* if the booleanCheckBox is clicked.  Here is the sequence:  The
user is viewing the detail page, then goes back to the list page _via
the back button of the browser_ (I suspect that's a key issue of the
problem), then the user clicks the booleanCheckBox.  Instead of
filtering the list (and reloading the list page), the user is returned
to the detail page.

What I've done so far: My first thought was that the detail page was
still the most recent view because the user employed the browser's back
button to return the list.  The ValueChangeListener method, wired to the
list page (and that bean is in session scope), changes a Boolean
property, then calls renderResponse().  That which would reload the
current view - which is the detail page, according to my thought
process.

To compensate for this, I placed additional code in the
ValueChangeListener that loaded the ViewId.  If it didn't match my List
page ViewId, I set up the necessary code to navigate to the correct
ViewId.  It didn't make any difference, so I'm not sure if my hypothesis
was correct.  

I'm frankly stumped right now, so any advice would be appreciated.  I'm
thinking that this must have something to do with the
ValueChangeListener, which I've listed below.  Should I be adding
something else in there?

Thanks,

public void compOnlyChecked(ValueChangeEvent vce) {
        compOnly = (Boolean) vce.getNewValue();
        getFacesContext().renderResponse();
    }


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to