Question

I am using a navigation technique in my application which allows the users to preserve the view and change a part of the page with no redirect when they navigate between the same business group. When they change the group the application will redirect them to the new group page.

I am facing an issue with no-redirect technique with duplicate component Ids since the pages are preserving the last view.

<ui:composition
    template="/WEB-INF/includes/templates/page-template.xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:ace="http://www.icefaces.org/icefaces/components"
    xmlns:ui="http://java.sun.com/jsf/facelets" >
<ui:define name="page-content">
    <ui:include src="#{navigationModel.currentBean.xhtmlPath}">
    </ui:include>
</ui:define>

The navigationModel bean above is responsible for changing the path of the required partial page.

Is there is a way to avoid changing the component Ids for the partial pages. Am I doing something wrong?

Note 1: I am using the same code from ICEfaces show case example which is working fine for them. Please review this example to make my question clear and try to navigate between same group items and different groups from the left menu and notice the redirect behavior. http://icefaces-showcase.icesoft.org/showcase.jsf

Note 2: I am using JSF 2 with ICEfaces 3.2.

Was it helpful?

Solution

The issue is because I was binding dataTable in different pages to different bean properties but using the same name for the bean property.

e.g.

pageA.xhtml
<ace:dataTable binding="#{pageABean.TableUC}">

pageB.xhtml
<ace:dataTable binding="#{pageBBean.TableUC}">

When I changed the property name in pageBBean to TableUC1 instead of TableUC the issue is solved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top