• Post Reply Bookmark Topic Watch Topic
  • New Topic

Rich Faces MenuItem to open in new window

 
Astria Bothello
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement to open a different application(in a new window) from one of the menuitems.
So when I click the menuitem - the application should open up in a new window and the parent window should remain as is.

I am using Richfaces 3.3.1.

I have tried various options but to no avail.
<menuItem id="ANAO003" text="BO" target="blank" url="http://something"/>

<h:link target="_blank" outcome="flp">
<rich:menuItem label="Follow-Up" url="http://something" />
</h:link>

Appreaciate any suggestions.
 
Tim Holloway
Bartender
Posts: 18411
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, my first suggestion is not to do it.

I have a particular dislike of pop-up windows because at any given time, I've probably already got 12 windows open on my desktop and if I'd wanted a 13th, I'd open it myself. I have my browser set to open new windows in the background as tabs, which means that they really won't "pop up" to begin with. So the only faster way to get me to buy a competitor's product is to make your webapp unusable to people who don't have Flash. A major automobile manufacturer lost a sale to me that way.

Above and beyond my own personal prejudices, JSF's ManagedBean architecture isn't really designed to support multiple windows, so results can be unreliable.

However, if you simply must pop up a new window (or in my case, a new tab), you'll need a "target" attribute in your URL specifying the new target window. If the RichFaces element does not support that attribute, you'll have to attach an onclick function to it that will open the target URL the way you want it opened.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!