Hi,
Does your implementation of tooltip support showing tooltips when user moves his mouse over some menuitem or submenu? Have been searching at forums and at google and could not find it, nor in the showcase or documentation.
Thanks in advance!
Tooltip for MenuItems?
PrimeFaces 3.2 - Mojarra 2.1.3 - GlassFish 3.1.1 - NetBeans 7.1
Hi. Sure, it should support events for menuitems. Why not. Have you tried this?
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
Hi Oleg,
Thanks for your response. PF tooltip implementation didnt worked on MenuItems, thats why I asked. Or I didnt get how to do it! I'm using MenuBar component with MenuItems. Here is a piece of code of mine:
and:
Is this correct with PF? Or will this work with PF Extensions?
Thanks in advance!
Thanks for your response. PF tooltip implementation didnt worked on MenuItems, thats why I asked. Or I didnt get how to do it! I'm using MenuBar component with MenuItems. Here is a piece of code of mine:
Code: Select all
<p:menuitem id="menu1" url="/faces/configuracion/localidades.xhtml" value="Localidades" />
Code: Select all
<p:tooltip for='menu1' value='ABM de Localidades' />
Thanks in advance!
PrimeFaces 3.2 - Mojarra 2.1.3 - GlassFish 3.1.1 - NetBeans 7.1
Simple try this with pe:tooltip. I haven't faced any problems with pe:tooltip so far. We tested it with various components.
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
Oleg,
Didnt worked either, with the code snippets detailed before... Am I using correct syntax?
Regards,
Didnt worked either, with the code snippets detailed before... Am I using correct syntax?
Regards,
PrimeFaces 3.2 - Mojarra 2.1.3 - GlassFish 3.1.1 - NetBeans 7.1
Syntax is correct. "for" in pe:tooltip should match "id" in p:menuitem. This is a search expression for findComponent(). Can you post the client id of your menuitem please? (look in Firebug).
What you can try yet, is this construct
What you can try yet, is this construct
Code: Select all
<p:menuitem id="menu1" url="/faces/configuracion/localidades.xhtml" value="Localidades">
<pe:tooltip value="ABM ..."/>
</p:menuitem>
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
Oleg,
Here is the code I copied from firebug:
and:
Cannot try the other approach because Im using dynamic menu with MenuModel... Could this be an issue?
Regards,
Here is the code I copied from firebug:
Code: Select all
<a id="menu2" class="ui-menuitem-link ui-corner-all" href="/milonga-war/faces/configuracion/paises.xhtml">
<span class="ui-menuitem-text">Países</span>
</a>
Code: Select all
<pe:tooltip value="Configuración General" for="menu2"/>
Regards,
PrimeFaces 3.2 - Mojarra 2.1.3 - GlassFish 3.1.1 - NetBeans 7.1
No, this is not an issue. I think the problem is <a href="..." element. Try to attach pe:tooltip to span element with:Cannot try the other approach because Im using dynamic menu with MenuModel... Could this be an issue?
Code: Select all
<pe:tooltip value="Configuración General" forSelector="#menu2 span"/>
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
Oleg,
Thanks for your time! Finally got it working. What I was doing wrong is the way of inserting the "<pe:tooltip>" tag inside the xhtml page. I was reading a string from my backing bean, which conformed the tag with this atributte and inserting this on the page:
jsf:
AppBean:
And changed for:
jsf:
AppBean:
Thanks again for your time and for pointing me on the right direction!!!
PS: Love PF Extensions, will use it more in my code!
Thanks for your time! Finally got it working. What I was doing wrong is the way of inserting the "<pe:tooltip>" tag inside the xhtml page. I was reading a string from my backing bean, which conformed the tag with this atributte and inserting this on the page:
jsf:
Code: Select all
#{appBean.toolTips}
Code: Select all
public String getToolTips() {
int i = 0;
String tooltips = "";
for (SystemOption so : getSystemOptions()) {
i++:
tooltips = tooltips + "<pe:tooltip forSelector='#menu" + i + " span' value='" + so.getTooltip() + "' />\n";
}
return tooltips;
jsf:
Code: Select all
<c:forEach items="#{appBean.toolTips}" var="tt" >
<pe:tooltip forSelector="##{tt.key} span" value="#{tt.value}" />
</c:forEach>
Code: Select all
public Map<String, String> getToolTips() {
if (tooltips == null) {
tooltips = new HashMap<>();
int i = 0;
for (SystemOption so : getSystemOptions()) {
i++;
tooltips.put(i, so.getTooltip());
}
}
return tooltips;
}
PS: Love PF Extensions, will use it more in my code!
PrimeFaces 3.2 - Mojarra 2.1.3 - GlassFish 3.1.1 - NetBeans 7.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest