You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Pierre Moermans <pi...@pm-soft.be> on 2006/01/30 14:25:01 UTC

unexpected page reload

Dear list,

I have a page that contains a sort of pick-list (2 selectManyListbox with
buttons to transfer items from one to the other) and a command-link that
calls a 'search' method in a class backing bean.

When the page is loaded, the first list is filled in with several elements
while the second one is empty.

If I do not transfer any element from the first list to the second one,
the command-link works fine and the 'search' method is called.
However, if I transfer any element to the second list, the page is just
reloaded and the 'search' method is never called ! (and no error message
logged).

If the second list is initialized with elements, then the 'search' method
is always called whatever transfer from/to the second list I do.

I tried everything I could think of, with no success ...

Any idea on how to solve this or at least on what could provoke the page
to reload ?


Many thanks for any hint !


Pierre Moermans




Here is an extract from the JSP page:


<h:selectManyListbox styleClass="list" id="availableLanguages"
binding="#{search.availableLanguagesList}">
    <f:selectItems value="#{search.availableLanguages}"/>
</h:selectManyListbox>

<h:selectManyListbox styleClass="list" id="chosenLanguages"
binding="#{search.chosenLanguagesList}">
    <f:selectItems value="#{search.chosenLanguages}"/>
</h:selectManyListbox>

....

<h:commandLink action="#{search.search}">
    <h:outputText value="Search"/>
</h:commandLink>

------------------------------------------------------------

And the backing bean:

<managed-bean>
    <description>howto search bean</description>
    <managed-bean-name>search</managed-bean-name>
    <managed-bean-class>name.moermans.howtos.view.bean.SearchBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
        <property-name>visit</property-name>
        <value>#{sessionScope.visit}</value>
    </managed-property>
</managed-bean>