MenuItem in BreadCrumb can not have children

UI Components for JSF
cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 Jan 2010, 21:43

I use the default formatter of eclipse, haven't touched it.

You can attach the patch file to the issue in google code issue tracker.

Thanks!

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

24 Jan 2010, 21:47

Hi Cagatay,

I've created a patch for PrimeFaces 1.0.0 and one for 2.0.0. I didn't found how I can contact you. I will send both patches to support@prime.com.tr.

I've added some attributes to menuitem, wrote a MenuitemRenderer, so that menuitems can be constructed dynamically with ui:repeat and adjusted MenubarRenderer / BreadCrumbRenderer. More details in the e-mail.

Best regards.
Oleg.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

24 Jan 2010, 22:27

Okey, I will attach files to the issue, but it doesn't exist yet in the issue tracker :-) Should I create one?

I've tried to modify some pages in prime-showcase to test changes, but I've got exceptions during startup. For JSF 1.x profile Error configuring application listener of class com.sun.faces.config.ConfigureListener, java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener For JSF 2.x profile strange exceptions by reason of resources. I've tried to remove p:resources from xhtml template, but without success. In the next two days I will test it in detail in my web app. The following using would be possible

Code: Select all

<p:breadCrumb>
	<p:menuitem>
		<p:commandLink value="Categories" .../>
	</p:menuitem>
	<p:menuitem label="Sports" url="#" styleClass="enabledItem"/>
	<p:menuitem label="Football" url="#" disabled="true"/>
	<p:menuitem label="Countries" url="#" disabled="true" styleClassDisabled="disabledItem"/>
	<ui:repeat value="#{breadCrumbs.items}" var="item">
		<p:menuitem>
			<p:commandLink value="#{msgNavigation['item.label']}" .../>
		</p:menuitem>
	</ui:repeat>
</p:breadCrumb>
And in the same manner for p:menubar.

Default CSS selectors for disabled menuitems in p:breadCrumb and p:menubar are respectively

Code: Select all

.pf-breadCrumb ul li.disabled a
.pf-breadCrumb ul li.disabled a:visited

.yui-skin-sam .yuimenuitemlabel-disabled
.yui-skin-sam .yuimenuitemlabel-disabled:visited
They should be mentioned in the upcoming documentation.

Best regards.
Oleg.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

24 Jan 2010, 23:23

PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

25 Jan 2010, 18:44

Thanks, I'll look into this after the release.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

05 Feb 2010, 17:33

Hello Cagatay,

Bad news, it doesn't work as expected :? ui:repeat seems to work, but the rendered HTML contains <span> elements instead of <li>.

Code: Select all

<div class="pf-breadCrumb ...">
	<div>
		<div>
			<ul>
				<span>
					<a href="..." .... />
				</span>
				....
			<ul>
		</div>
	</div>
</div>
Strange. The <script> section related to breadCrumb above this markup doesn't appear as well. Could you check this please? I don't have a lot of time currently.

Thanks a lot!
Oleg.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

07 Feb 2010, 21:33

Hello Cagatay,

Now good news :-) I've fixed the mentioned problems and created 2 new patches http://code.google.com/p/primefaces/iss ... %20Summary

Furthermore, there is a small web-app (incl. sources) attached to the issue 473 which demonstrates all new posibilities - "disabled" attribute, dynamic ui:repeat using and custom content of menuitem. The web-app was created with NetBeans and tested in GlassFish v3.

You can add the code there to the showcases if you want. The code shows BreadCrumb using. I've tested Menubar too, but only the "standard" using as in existing showcase to ensure whether it still working. It still working. I think, you can apply patches unproblematic now.

Best regards.
Oleg.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests