Duplicate Id error while tabchangelistener is called

UI Components for JSF
Post Reply
winstona
Posts: 35
Joined: 31 Jan 2011, 23:55

04 Mar 2011, 15:53

I am generating accordionpanel through primefaces 2.2.1 API and binding to the accpanel as below. This is rendered when user clicks on a commandlink.

But When the tabchangelistener is method is invoked on a bean, it throws duplicate id error. I tried setting ids to all components inside accpanel. But still it throws duplicate id error for the first Tab id of AccPanle .

<p:accordionPanel id="accPanel" widgetVar="jAccPanel" autoHeight="false" binding="#{xxxxBean.yyyyAccPanel}" tabChangeListener="#{xxxxBean.onTabChange}" styleClass="zzstyle">
</p:accordionPanel>

Please give me your suggestions/ideas to get rid of this issue.

dmantil
Posts: 93
Joined: 14 Jul 2010, 22:30

05 Mar 2011, 17:14

Are you adding or changing components programmatically in the listener?

bueyuekt
Posts: 24
Joined: 26 May 2010, 11:51

05 Mar 2011, 19:01

Well, try surrounding your panels with f:subview.
Primeface 3.0.M1
JSF 2.0.4
Tomcat 6.0.18

winstona
Posts: 35
Joined: 31 Jan 2011, 23:55

05 Mar 2011, 21:21

Thanks for the prompt reply.

I am not adding any components there. i am resetting the variables with respect to the selected tab while tab is changed. can i add a component to the selected tab while the tab is changed?

I will try with subview and let u know the updates.

winstona
Posts: 35
Joined: 31 Jan 2011, 23:55

06 Mar 2011, 02:45

Hi,

Even after adding subview we could still see the same error.

winstona
Posts: 35
Joined: 31 Jan 2011, 23:55

12 Mar 2011, 23:12

After having some more analysis, i found that whenever TabChangeListener is called, it is rebuilding the accordionpanel and trying to add the tabs again (duplicating here). This is resulting duplicate id error. Is this an issue with primefaces?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests