Board index JavaServer Faces General MenuItem in BreadCrumb can not have children

MenuItem in BreadCrumb can not have children

Components, Ajax Framework, Utilities and More.


Posts: 15059
Location: Cybertron

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!
PrimeFaces Lead

Oleg User avatar
Expert Member

Posts: 3711
Location: Russia, Siberia => Germany, Black Forest
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 4.x, 5.x, Mojarra 2.2.x, JBoss WildFly, WebSphere, Windows 8.1, IntelliJ IDEA
PrimeFaces Cookbook: http://ova2.github.com/primefaces-cookbook/ PrimeFaces Extensions on GitHub: http://primefaces-extensions.github.com/

Oleg User avatar
Expert Member

Posts: 3711
Location: Russia, Siberia => Germany, Black Forest
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

<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

.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 4.x, 5.x, Mojarra 2.2.x, JBoss WildFly, WebSphere, Windows 8.1, IntelliJ IDEA
PrimeFaces Cookbook: http://ova2.github.com/primefaces-cookbook/ PrimeFaces Extensions on GitHub: http://primefaces-extensions.github.com/

Oleg User avatar
Expert Member

Posts: 3711
Location: Russia, Siberia => Germany, Black Forest
PrimeFaces 4.x, 5.x, Mojarra 2.2.x, JBoss WildFly, WebSphere, Windows 8.1, IntelliJ IDEA
PrimeFaces Cookbook: http://ova2.github.com/primefaces-cookbook/ PrimeFaces Extensions on GitHub: http://primefaces-extensions.github.com/


Posts: 15059
Location: Cybertron

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

Oleg User avatar
Expert Member

Posts: 3711
Location: Russia, Siberia => Germany, Black Forest
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>.

<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 4.x, 5.x, Mojarra 2.2.x, JBoss WildFly, WebSphere, Windows 8.1, IntelliJ IDEA
PrimeFaces Cookbook: http://ova2.github.com/primefaces-cookbook/ PrimeFaces Extensions on GitHub: http://primefaces-extensions.github.com/

Oleg User avatar
Expert Member

Posts: 3711
Location: Russia, Siberia => Germany, Black Forest
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 4.x, 5.x, Mojarra 2.2.x, JBoss WildFly, WebSphere, Windows 8.1, IntelliJ IDEA
PrimeFaces Cookbook: http://ova2.github.com/primefaces-cookbook/ PrimeFaces Extensions on GitHub: http://primefaces-extensions.github.com/

Previous

Return to General