I think I answered myself my questions.

It is all because in page 1 I used normal links with h:outputLink and the view is not removed from the session.

The view tag always saves the view to the session. When the view is restored in the restoreView phase it is also removed from the session. If I navigate to another page using a normal link then the view lurks in the session. If I navigate using actions then the view will be removed from the session.

page 3 and page 4 don't reproduce the problem because going from page 3 to page 4 is not done with a normal link. Once I do that, voila, same thing.


Costa Basil <[EMAIL PROTECTED]> wrote:
Any help would be very appreciated, I am extremely confused at this stage. I use  myfaces 1.1.1 and shale-core. Here is my problem:

1. I have a page, page 1, with a co mbobox and two tables, table 1 & table 2. If the user changes the value in the combobox then I refresh table 1. If the user clicks on a row on table 1 then I refresh table 2. If the user clicks on a row on table 2 then I navigate to a second page, page2, using an http get method. The other row click operations are posts to page1. On page2 there is a link to page1 (through a navigation menu item) and the action that I specified in the configuration file has the redirect tag. The problem is that when I go back to page1 myfaces thinks it is a post back and it restores the view from the session. This is my source of confusion. I don't understand when does myfaces find the view from the session scope and when it doesn't, because as you can see below it is not consistent.

2.I tried to reproduce this problem by creating two pages, page 3 and page 4.

Page 3:

  <f:view>
    <h:form>
      <t:selec tOneMenu id="cb" binding="#{testPage3.combobox1}" >
        <f:selectItems value="#{testPage3.items}"/>
      </t:selectOneMenu>
    </h:form>
    <h:commandLink id="link" action="" value="Go Test Page4"/>
  </f:view>

Page 4:

  <f:view>
      <t:panelNavigation2 id="nav" style="border: 0px; width:100%;" cellpadding="0" cellspacing="0" layout="table" >
      <t:commandNavigation2 id="cmd1" value="Go to page 3" action=""/>
  </t:panelNavigation2>
  </f:view>

Here are the navigation rules:
  ; <navigation-rule>
    <navigation-case>
      <from-outcome>goTestPage3</from-outcome>
      <to-view-id>/testPage3.jsp</to-view-id>
      <redirect/>
    </navigation-case>
  </navigation-rule>
  <navigation-rule>
    <navigation-case>
      <from-outcome>goTestPage4</from-outcome>
      <to-view-id>/testPage4.jsp</to-view-id>
      <redirect/>
    </navigation-case>

When I navigate from page 3 to page 4 and then come back to page 3 from page 4 myfaces creates a new view. I turned on the tracing and myfaces spits the message:

No serialized view found in server session!

This behaviour is not consisten t with the behaviour I've seen at 1. Should it find the view or not when you go back to page 3? This confuses me like hell. Can someone PLEASE explain me what should happen?

Please note that I use request scoped managed beans.

Thanks





Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with Voice


7 bucks a month. This is Huge Yahoo! Music Unlimited

Reply via email to