• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Trouble with ContextMenu and ModalPanel of RichFaces

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I met some trouble when I used the RichFaces contextMenu and modalPanel together.

I hope to show the modalPanel by clicking the context menu item.

For the first time I clicked the menu item, the modal was showed. However, the second time, the menu item even didn't execute. Then the third time, everything went well again. And then 4th time failed, 5th time succeeded, 6th time failed..., alternately.

Thus, 50% succeeded and 50% failed. It's too weird.




When I remove the code on line 10.


The actionListener of menuItem can be executed successfully every time.

Can anybody help to advise the reason?

Thanks in advance!



 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've met the similar problem that only the first time the panel can be displayed. From the second time (after the panel was hide for once) you will never see the panel.

The following alternative method may help:

 
Wei Geng
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Fan He wrote:I've met the similar problem that only the first time the panel can be displayed. From the second time (after the panel was hide for once) you will never see the panel.

The following alternative method may help:



Thanks for your reply and your alternative method.

However, I really want to know the root cause of that issue.

Did us make anything wrong with the code or is it actually a bug of RichFaces?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try changing your <rich:menuItem> tag to this:

<rich:menuItem value="try"
oncomplete=""Richfaces.showModalPanel('modalPanel',{width:200})"
actionListener="#{contextMenuTestBean.menuClicked}"
reRender="modalPanel" >
</rich:menuItem>
 
That is a really big piece of pie for such a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic