Custom content in paginator duplicate ID breaks ajax

UI Components for JSF
Post Reply
djmj
Posts: 400
Joined: 16 Dec 2011, 01:23

26 Aug 2015, 02:09

Using a paginator that is rendered at top and bottom and custom content contains an element with an ID this ID is duplicated in the final DOM.

Once for the top paginator and once for the bottom paginator.

Ajax is only working for the top component and view jumps to bottom one after update.

Changin value in bottom menu invokes the ajax but on update the old value is selected again.

Code: Select all

	<f:facet name="{PagContent}">
		<h:selectOneMenu id="sortCriterion" value="#{bean.sortCriterion}" style="float: right;" >
			<p:ajax update=":mainForm:pnlHotels"/>
			<f:selectItem itemLabel="Relevance" itemValue="#{null}"/>
			<f:selectItems var="varSortCriterion" value="#{bean.sortCriteria}" itemLabel="#{varSortCriterion}" itemValue="#{varSortCriterion}"/>
		</h:selectOneMenu>
	</f:facet>
Maybe this is also the reason why <p:selectOneMenu> is not working as custom content in paginator?!

Issue: http://forum.primefaces.org/viewtopic.php?f=3&t=43082
Last edited by djmj on 05 Oct 2015, 00:34, edited 1 time in total.
Primefaces: 11.0.0 RC2
Primefaces-Extension: 11.0.0
PrimeFaces-Mobile: 11.0
OmniFaces: 3.11
Jsf: Mojarra 2.3.8
Server: Glassfish 5.1.0

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

26 Aug 2015, 08:33

Does it work fine if you remove the id?
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

djmj
Posts: 400
Joined: 16 Dec 2011, 01:23

03 Sep 2015, 23:59

no, since the selectOneMenu just gets a id generated by jsf which still is duplicate then.


Making paginator custom tag maybe solves the problem, so one could use multiple or even different paginators for top and bottom.

http://forum.primefaces.org/viewtopic.php?f=3&t=41892
Primefaces: 11.0.0 RC2
Primefaces-Extension: 11.0.0
PrimeFaces-Mobile: 11.0
OmniFaces: 3.11
Jsf: Mojarra 2.3.8
Server: Glassfish 5.1.0

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests