Modeless popup in JSF?

Hi,
Has anyone achieved a modeless popup window when a JSF component is clicked.
My problem:
1)We are building a custom web based email application in which we have to use a lot of modeless popup windows.Foreg: creating new email, reading emails etc
2) I have a JSF Table component (Sun Creator Standard component backed by objectListDataProvider) in which I display rows of email links. The links are JSF HyperLink components. On the coloumn of hyperlink component I have setup an 'onClick' JavaScriptlet like 'window.showModelessDialog(relevant params).
Duirng runtime I can see the modeless window popup for a fraction of a second and then disappear.
This I guess is because as soon as a JSF Hyperlink component is clicked a form submission happens and because the parent page expires during submission the modeless popup expires too.
3)How to get around this problem?
4)What is the best strategy to dynamically enable and disable the main page submission? I need the submission sometimes because say for eg: to use the Sun's JSF table's sort functionality the page needs to be submitted?
5)Are there any other alternative solutions to achieve a modeless popup while still using JSF? I like the Sun's JSF table because of it's features like sorting, dataprovider etc
Cheers ears!

See this two:
http://www.jenia.org/jsp/dataTools.jsf;jsessionid=C6837CD4A61E38803C1CE22EC893D03C
http://www.myfaces.org/ (Tomahawk)

Similar Messages

  • Jsf with popup window jsf and .xhtml?

    hi,
    HI,
    I am using example at http://www.jsftutorials.net/interface/jsf-popup.html
    for popup with jsf using javascript.
    In main form when click on button or link, i am opening popup window , and getting values
    from popup window to parent window.
    Here I need to pass some parameter or value to popup window without refresh the parent.
    I know with how to do jsp. but i am looking sample
    how to send parameters when we use parent and popup jsf forms with .xhtml.
    Thanks
    siva

    Hi Mainak,
    have a look to Thread:
    Popup Sizing
    As you can see there is not yet a way to set the Popup size.
    You have to find the good combination of fields and length in order to get a nice UI.
    The WDA engine try to set the best size, help it...
    Sergio

  • Problem opening popup from jsf page....

    Hi to all....i have a problem, i'm trying to open a popup window using "outputLink".
    My code is:
    <h:outputLink value="#" onclick="window.open('#{appManager.basePath}/admin/selectCollection.jsf','','width=600, height=400, resizable=yes, fullscreen=no, menubar=no, toolbar=no, status=no, scrollbars=no, location=no')">
         <h:outputText value="#{bundle.selCollection}"> </h:outputText>
    </h:outputLink>
    The "window.open" works perfectly, but the parent window shows the page "Directory Listing For /" with the list of directories of my root project...
    What is the problem?

    try to use the popupFrame component of jenia4faces library (http://www.jenia.org).
    Is a good solution for popups problem

  • Popup using JSF

    Hi,
    I look thought these forum and I find some things about popup forms but my questions is:
    Can some one suggest or show an example of the best way to do popup forms using JSF. I want to so is in a form I have link that when the user clicks on a Popup form will display with some search data that the user can select one and display the value in the parent form.
    Thanks

    You will have to use javascript for popup.
    u must be in need to submit this form as well.
    So wat u can do is:
    You can enter some invisible textbox with some value.
    Change this value after submit.
    At this point call the new jsf page in popup window.
    after loading the page you have to check the value.
    & idf value is modified . Open a popup.

  • Popup within JSF page

    Hi,
    I have created one jsff fragment (index.jsff) and I have command Link on click on command Link I should show the popup.
    Issue is that is generic popup, I have seperate popup fragment and its binding is in its page definition file. Popup.jsff and popuppageDef.xml.
    I don't want to copy the bindings in original page index.jsff. I tried to include popup usiing <jsp:include> but it would include only source not bindings.
    Is there any way I can show popup on commandlink click without need to copy bindings on my orignal page?

    Hi,
    add the page fragment to a bounded task flow and open the task flow as a region in the popup. This way you don't need to copy the PageDef file. See the Fusion Developer guide to learn about Regions and Task Flows http://docs.oracle.com/cd/E21764_01/web.1111/b31974/toc.htm
    Frank

  • Rendering popup windows in JSF form on demand

    Hello,
    i have a form with a RichFaces menu bar at the top and several other UI components , eg. commandButtons. When a <rich:menuItem> or a <a4j:commandButton> component is clicked, a hidden modal popup window appears for user interaction. At the moment, all JSF files associated with the NetBeans project are downloaded to the client machine.
    In order to reduce network traffic for low bandwidth internet connections, i would like to only download the popup window JSF files from the server to the client if the relevant form UI component is clicked.
    Would anyone suggest a possible method to achieve this please?
    Thanks,
    Mark Weatherill.

    you can open a popup page from commandButton like,
    onclick="window.open('http://www.myapp.com/faces/popup.jsp'); return false;"Use the same faces-managed-bean to input data (on popup page and on the main page). Before closing the popup page you can submit its form to update the model. And after closing the popup page you can refresh the main page. Beware that you might have problems with refreshing in https connection (getting "access is denied" exceptions in jscript)

  • IE11 can't post form data to specific frame or window dialog opened via window.open()

    Hello,
    Form POST targeting to specific frame or dialog popped up via window.open() no longer works in IE11.
    It worked fine in IE10 and all previous versions of IE.
    Please see screenshot attached with simple test that reproduces this problem.
    Direct Link to screenshot:
    http://173.231.98.44/cgi/TestFolder/IE_11_widow_frame_targeting_BUG.jpg
    Direct link to simple test page demonstrating this problem:
    http://173.231.98.44/cgi/TestFolder/page2.asp
    Note: IE11 doesn't report any errors, doesn't complain about anything, even when debugged via F12 developer tools. The only thing it complained initially was missing doc type declaration on top of page, but even after adding doc type definition, problem still
    persists, makes no difference.
    I tested this on fresh install of Windows 2012R2 while testing our web application with the new IE11.
    I believe doing this on Windows 8.1 with IE11 will result in same bug/problem.
    Our web application uses a technique whereby it launches a popup window via call to window.open(), passing blank URL and specifying a name for the new window. It then does a from post targeting the name of new dialog.
    In IE11 this functionality has been broken and no longer works.
    Problem is that IE11, instead of posting form to the newly created dialog, it launches a new instance of IE and then loads the requested form in this new instance of IE, while the dialog launched via window.open() remains on screen and is empty. If user repeats
    launching same form post request (via button click for example), IE 11 keeps creating new empty dialogs and new IE instance for every form post executed. This totally breaks our application because we use many so called "wizards" that encapsulate
    specific functionality in separate web page launched in a popup window.
    Another related problem is that if a dialog is launched with window.open(), the java script code in the dialog can not target the parent frame that opened the dialog anymore. In our application, when a dialog is closed, it typically needs to trigger a refresh
    of a specific frame within the parent window (again targeted by name) to reflect saved/updated info that user entered in the popup dialog. The result is that we can't refresh the parent frame after the pop up dialog closes. Instead, IE11 launches
    a new instance of IE (not just a tab, but a whole new instance) and loads the parent frame in it.
    The problem seems to be caused by broken frame name targeting mechanism in IE11.
    Note that we force IE to compatibility mode 5, but even without specifying any compatibility, the problem remains.
    Typical java script to reproduce this is:
    <input type="button" onClick="Popup(this.form);" name="btn2" value="Popup Dialog">
    function Popup(f){
        window.open("","MyNewDialogName","width=200,height=150");
        f.action = "page3.asp";
        f.target = "MyNewDialogName";
        f.submit();
    Expected: IE11 should correctly post form to and load targeted page in the newly popped up dialog, without opening new IE instance and new tab. Repeatedly posting form to existing popup window should reuse that window, not keep on launching more popup windows
    and then more IE instances.
    Steps to reproduce the problem (include URL if applicable):
    URL with sample page: http://173.231.98.44/cgi/TestFolder/page2.asp
    1) Create page1.htm: <html><body>display "I'm in a popup window now ..."</body></html>
    2) Create page2.htm with a button and onclick() event calling function to open dialog, and do form POST targeting new dialog calling page1.htm, like below.
    <input type="button" onClick="Popup(this.form);" name="btn2" value="Popup Dialog"> function Popup(f){
        window.open("","MyNewDialogName","width=200,height=150");
        f.action = "page1.asp";
        f.target = "MyNewDialogName";
        f.submit();
    3) Open IE11, navigate to page2.htm, click the "Popup Dialog" dialog button. IE 11 will popup the new dialog, but then it will also launch new instance of IE11 and display the page1.htm in it, instead of in the popup dialog.
    Has anyone else encountered this problem?
    Any insight or help is appreciated.
    Regards
    Peter

    the default action of <input type="button" is submit. Note also that the default type of <button> elements is 'submit' also.
    add a return false to the onclick inline event handler (which constructs the form submit attribues) to cancel the default form.submit behavior.
    form elements have a target value with which you can specify the name window into which you want the form to open in.
    <form action="process.aspx" target="popup">
    you can use the window.open method with a query uri to achieve the same outcome.
    window.open('process.aspx?s=search+term&amp;foo=bar','popup',{features})
    the outcomes of all scripted windows are affected by
    your IE Popup blocker and tabbed browsing settings
    which in turn is affected by your IE Security zone settings (for popup blocking handling)
    and the settings of any third-party popup blocker you may have installed and enabled... it may not necessarily be visible on your browser toolbar.
    The first step in troubleshooting web browser issues is to test in no-addons mode.
    Use the Developer Tool to find out what documentMode the test page is opening in on your system. On Modal/Modeless popup windows use the f12 key to display the Developer tool positioned on the contentWindow.
    Use File>Properties to find out what IE Security zone it maps to... there is a security setting to prevent navigation into zones of lower integrity.
    Rob^_^

  • PopUp with selectMany List Box in JSF

    Hi,
    am a newbie to JSF....
    I have a page with a hyperlink which opens a popup that has two multi select list boxes (values need to be moved to and fro within select boxes). Then i have a select button in the popup which should send the selected value from popup to main page. Can anyone please send me a clear implementation for this I don't know how to implement this with JSF. I do want to know how should i have the in my main page to populate the selected values from popup. This will be of great help if u could provide me in detail for implementing the scenario.
    Note: My popUp page Implementation is like the one below and i don't have main page implementation other than the link calling javascript to open the popup....
    <body><table>< tr></tr><tr>< td>
    <h:selectManyListbox id="masterList" size="6">
    <f:selectItems id="master" value="#{populateList.masterList}" />
    </
    h:selectManyListbox></td>< td><table><tr>
    <
    h:commandButton id="MoveRight" value="MoveRight" ></h:commandButton >
    </
    tr><tr>
    <
    h:commandButton id="MoveLeft" value="MoveLeft" ></h:commandButton >
    </
    tr></table></ td><td>
    <
    h:selectManyListbox id="selectList" value="#{populateList.selectList}" size="6" > <f:selectItems id="select" />
    </
    h:selectManyListbox>
    </
    td></tr>< tr></tr><tr></ tr><tr>
    <h:commandButton id="selectButton" value="Select"></h:commandButton >
    </tr></table></body >

    any updates or help for this....
    i have a link in my main page that pops up a window with two select many list boxes where values can be moved to and fro. popup has a select button that has to send the list values in right hand side select many list box to the main page field....
    How should i achieve this in jsf....
    Any help with codelines will be greatful and guiding....
    Thanks
    Naadiya

  • How do I create a printer friendly page in a popup window for a JSF page

    I have a JSF page that displays a table that shows the inventory level of a particular garment style. The table is like a matrix with each row representing a color of the style and each column representing a size of the garment. So the data in the table cell is for the inventory level of a particular color/size combination (e.g. navy blue of medium size ) for the particular style. The page also allows you to dynamically select a warehouse from a dropdown to see the inventory matrix of that warehouse.
    Now everything has been working fine except that the matrix table is not printer-friendly. So we need to have a Print button or link on the page that will generate a popup window that displays the same matrix table in a printer-friendly format (with different style sheet etc.). What is the best way to populate the matrix table in the popup? The data in the matrx table is stored in a hashmap in a InventoryManageBean of session scope.
    Also, shoud I use window.open to get the new window and if so what do I pass in the URL parameter?
    Any advice is appreciated. It would be great if you can include a code sample as I would think someone else must have had this done before.

    Any one please? This is urgent. Thanks a ton!

  • How to use postback property for JSF to reneder a popup only once

    Hi All,
    I'm using java script function to show a JSF page as popup. I have called the javascript function on page load of another JSF page.
    How do i make sure that the popup is getting rendered only once and not everytime the page is getting refreshed .
    Can i use postback property in JSF page for this purpose ?
    Thanks in Advance.

    try postback..
            Boolean postBackValue = (Boolean)resolveExpression("#{adfFacesContext.postback}");
            Boolean defaultBooleanValue = new Boolean("false");
            if (postBackValue.equals(defaultBooleanValue)) {
      public static Object resolveExpression(String expression) {
        FacesContext ctx = FacesContext.getCurrentInstance();
        Application app = ctx.getApplication();
        ExpressionFactory elFactory = app.getExpressionFactory();
        ELContext elContext = ctx.getELContext();
        ValueExpression valueExp = elFactory.createValueExpression(elContext,expression,Object.class);
        return valueExp.getValue(elContext);
      }

  • Popup window in JSF

    Hi All,
    In Java EE Application i have created two JSF pages. When i click a button in first JSF, the second JSF page should appear in a pop up window. Is that possible.
    Let me also know how to add a pop up in JSF.
    Regards,
    Manickka.

    In your case, If you really need a popup window I think that an option that will work is use a h:commandLink:
    - Use the onclick method of the h:commandLink to open a blank new page, with the name for example "blankPopUp".
    - Use a h:commandLink to navigate to the second page. The action method can be used to run a JSF navigation.
    - Use the target method of the command link to point to your window opened via javascript in the onclick event. In this case the target will be "blankPopUp". Then your content returned by the JSF navigation will be rendered in the already opened popup window. Then you will work with two windows, it will be like two tabs in your browser, but in this sample, only one will be a tab and another will be a popup window.
    Sample code:
                <h:commandLink id="openPopUp" value="OPEN POPUP" target="blankPopUp" onclick="window.open('','blankPopUp','status=no,toolbar=no,location=no,menubar=no,resizable,width=1008,height=690,scrollbars,left=100,top=50');" action="#{yourBean.navigateToSecondPage}" />Regards.
    Edited by: kerule on 29-abr-2012 15:07

  • Steve, "Simple JSF Popup List of Values Page " does not work..

    Hi Steve,
    I read "Not Yet Documented ADF Sample Applications" #80 : "Simple JSF Popup List of Values Page " and download SimpleADFBCLOVJSF.zip, but when I try to run the sample, I get this error :
    JBO-33001: Cannot find the configuration file /xxx/common/bc4j.xcfg in the classpath
    What is wrong ?
    Thank you,
    xtanto

    Thanks for reporting this. I've uploaded a newer version of the zip file that fixes this issue.
    It was due to a last-minute refactoring of my model project from having the application module living in a package named "xxx" to another package named "example.model"

  • Error loading JSF page popup window - Cannot find FacesContext

    Hello,
    I am trying to load a popup window from my Visual Web JSF page. The popup window itself will be a Visual Web JSF page also.
    As an example, i have 2 buttons on my original page with jsp tags as follows::
    <webuijsf:button binding="#{Page1.button1}" id="button1" onClick="window.showModelessDialog('./PopupPage.jsp'); return false;"
    style="left: 19px; top: 16px; position: absolute" text="Button"/>
    <webuijsf:button actionExpression="#{Page1.button2_action}" binding="#{Page1.button2}" id="button2"
    onClick="window.showModelessDialog('./PopupPage.jsp');" style="position: absolute; left: 20px; top: 44px" text="Button"/>
    When i click Button1, the popup window appears but will not load the page within the window. I get the following report in the server log:
    StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
    at org.apache.jsp.PopupPage_jsp._jspx_meth_f_view_0(PopupPage_jsp.java from :102)
    at org.apache.jsp.PopupPage_jsp._jspService(PopupPage_jsp.java from :77)
    ETC ETC
    If i click Button2 (which does NOT return false in the onclick Script and thus submits the first page) the first attempt fails with the same error, but if i try a second time the popup window displays and loads the page correctly.
    Any solutions would be greatly appreciated as this is driving me crazy :-s
    Edited by: coxy69 on Jan 9, 2008 10:29 PM

    Cannot find FacesContextThis generally indicates that you invoked a request which points to a JSP page which contains JSF tags, but that the request itself isn't passed through the FacesServlet. Make sure that the request URL is covered by the url-pattern setting of the FacesServlet in the web.xml.

  • JSF 2.0 - Popup window

    I am new to JSF...i want to popup a small window in jsf...
    is there any tag to popup a window in jsf...something similar to woodstock bubble component?

    Nothing in the standard set of components.
    You'll need to continue to use 3rd party component libraries or write one yourself.

  • Implementation of Popup dialogs in JSF

    Sir,
    We implemented popup windows using dialog:popupwindow from a jsf page.
    From a page a pop up is called . It has 2 buttons , Yes and No. On clicking yes i show go to another page. If I click No i should come back to the same page itself.
    We implemented it in this way.
    From an action button of a page a method is called. In that action method a pop up dialog is called. In the action button we have given a return listerner binding. Pop up window has 2 buttons. Any action will take me to the return listerner method. Here i can do any actions. If i click "Yes" in the popup, I have to do some functionality. But after my operations i want to go to another page which shows i have been successful in my work. If i click "No", i want to remain in my page itself.
    How can i implement this.
    plzzzz help.
    with regards,
    Anila.

    Hi,
    you don't need to programmatically launch the dialog, you can also use the declarative way to do so. The return listener is important thouh. Both buttons yes/no should call
    AdfFacesContext.getCurrentInstane().returnFromDialog();
    this method takes 2 arguments that define return values. The first argument is an Object, the second a HashMap. Both arguments are optional and can be null.
    If you use the first then the call is
    AdfFacesContext.getCurrentInstane().returnFromDialog("yes",null);
    In the return listener you check for the returned object and compare it to "yes". If this is yes, then you can call either
    facesContext.getExternalContext().redirect("/faces/te_page_to_go.jsp");
    or
    facesContext.getViewRoot().setViewId("new_view_id");
    then call
    facesContext.responseComplete();
    Frank

Maybe you are looking for