Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:

How can I open a window by clicking a selectItem?

Using JSF, I want the app to open a different window when a choice is selected the choice is in a selectItem tag. How can I do this?
0
daraii
Asked:
daraii
1 Solution
 
Farzad AkbarnejadCommented:
Hello,
Here is a sample code. All you need is that open new windows using java script in onchange event.

-FA

<t:selectOneMenu style="width:40px" value="#{item.regPriority.id}"
       onchange="window.open('InsuredPicker.jsf?rel_type=1', 'Window Title','status=1,height=400,width=600,top=0,left=0, resizable = 0' );" >
   <f:selectItems value="#{sendRegisteredRequestController.priorities}" />
</t:selectOneMenu>

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now