Open a new window on clicking the CommandButton in JSF

Hi,
I have a page and two <h:form> in that page.
The second <h:form> just has a date field and a Submit button.
Selecting a date and clicking the CommandButton should open the report in a new window.
If no reports found then a msg needs to be displayed in the new window.
<h:form styleClass="form" id="form2" target="_blank">
Report Date
<t:inputCalendar id="dtTo" required="true" value="#{controlDBean.reportDate}" renderAsPopup="true"   
        popupWeekString="week" renderPopupButtonAsImage="true" popupDateFormat="MM/dd/yyyy" size="12"
        maxlength="10"     forceId="true"      popupButtonStyleClass="calendar"
        title="MM/DD/YYYY"     popupButtonImageUrl="../../images/calendar.gif">
<f:convertDateTime type="date" pattern="MM/dd/yyyy" />
<div style = "FONT-SIZE: 8pt; FONT-FAMILY: Arial; COLOR: RED;"><h:message for="dtTo" /></div>                                                  </t:inputCalendar>
<hx:commandExButton type="submit" value="Retrieve"  id="button1" action="#controlDBean.frmRetrieveReport}"></hx:commandExButton></td>this works fine...
But even when the validation on the date field fails..it takes me to the new window with the message rather than staying on the current page.
How can this be achieved at the button level rather than the form level?/
Any help is really appreciated.
Thanks!!

whether this is useful ?
I am using string field here.
public StringField(java.lang.String name,
java.lang.Object listener,
java.lang.String callback,
java.lang.String value)Constructs a StringField
Parameters:
name - Name of field
listener - Listener to update
callback - Callback of listener
value - Value of field
-Arun

Similar Messages

  • How to open a new window by clicking the string in the text field ?

    Hi
    is it possible to do this ?
    Some string value is retrieved from database and it is placed in the text field. [ done with this part ]
    i have to provide link to that string to open a new window. [ yet to do ]
    Please help me in this.
    Note : if this is not possible , give me some other idea to do this.
    -Arun

    whether this is useful ?
    I am using string field here.
    public StringField(java.lang.String name,
    java.lang.Object listener,
    java.lang.String callback,
    java.lang.String value)Constructs a StringField
    Parameters:
    name - Name of field
    listener - Listener to update
    callback - Callback of listener
    value - Value of field
    -Arun

  • I'm using FF for Mac 3.6.13 and everytime I open a new window or tab the image of what I see is tiny which requires me to click Command + to enlarge it. The actual page is normal size, but its the image of the page that opens tiny.

    I'm using FF for Mac 3.6.13 and every time I open a new window or tab the image of what I see is tiny which then requires me to click Command + to enlarge it about 4 or 5 times. The actual page is normal size, but its the image (what I see) of the page that is tiny.

    Thanks but Command 0 on a Mac only makes a temporary change to that one page. The link you provided doesn't show how to make a permanent change. Do you know how to permanently change this so I don't have to do it to every new page?
    Thank you.

  • When I open a new window (App etc) the windows already open disappear. How can I fix this ?, When I open a new window (App etc) the windows already open disappear. How can I fix this ?

    When I open a new window (App etc) the windows already open disappear. How can I fix this ?

    Back up all data.
    Please triple-click anywhere in the line below on this page to select it:
    defaults delete com.apple.dock single-app && killall Dock
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    Wait for a new line ending in a dollar sign ($) to appear below what you entered. You can then quit Terminal. Test.

  • When I open a new window, none of the UI changes I make regarding add-ons are there.

    When I open a new window, none of the UI changes I make regarding add-ons are there. They all disappear from all new windows and cannot be re-added unless I restart my computer, where I can put the elements on ONE window again. This has happened consistantly with every ui modifying element from all of my addons. Please help as I need these elements on every new window and hate tabs.

    See http://kb.mozillazine.org/Corrupt_localstore.rdf
    If you haven't done that yet then create a new profile exclusively for the 4.0 beta version and create a desktop shortcut with -P "profile" appended to the target to launch that profile.
    * http://kb.mozillazine.org/Testing_pre-release_versions
    * http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    * http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • Opening a new window when clicking on object links

    Hi,
      I have installed business package for crm and configured the object links, but when i click on object links, it is opening a new window, but i want it to be opened in the same window form which that link was activated.
    could you please help me in this regard
    Thank you

    Hello Koduru,
    you should have a look at the work protect modus settings of the user.
    Regards
    Gregor

  • Nautilus doesn't open a new window when clicked

    For a while now, I have been experiencing an annoying issue.
    Whenever I open Nautilus either by clicking the icon in the drawer (example: http://i.imgur.com/uZc3n7S.png) or by hitting "Super" (the Windows key) and typing nautilus+enter, Nautilus doesn't create a new window anymore. Instead, it just shows "Files" in the top bar, as seen here: http://i.imgur.com/Ho2nJhv.png
    I can open a Nautilus window by clicking on the "Files" item in the top bar and clicking "New Window", as seen here: http://i.imgur.com/7IrWqvr.png
    Also, whenever my desktop is focused, the "Files" item is visible in the top bar. In the drawer, the Nautilus icon is always highlighted as well. This leads me to believe that GNOME thinks Nautilus is already open, while it is not.
    Note that I have enabled my desktop to be managed by Nautilus, so I can have icons on my desktop. I'm not sure, but if I recall correctly, this problem started ever since the one time I ran gnome-settings-daemon manually, to test if a certain bug still exists.
    Has anyone experienced a similar issue? How could I track down why this is happening?
    Last edited by Gerry (2014-02-12 20:59:18)

    Gnome-shell issue. You can disable desktop management as a temporary fix, but the next gnome-shell update will fix the problem.
    https://bbs.archlinux.org/viewtopic.php?id=175993
    https://bugzilla.gnome.org/show_bug.cgi?id=722510
    https://bugzilla.gnome.org/show_bug.cgi?id=722690

  • Problem with openning a new window when click news tiltle link

    After create a news item using News form created by XML form builder, i try to click title link, It always opens a new window, what i want is keep it in same window when i click the title link, not open a new one. Is there anyone know how to do that? thanks

    Hi,
       I think its not possible in case of XML Form Builder. Bcoz,
    <b>Edit Form</b>:it is for authoring like creating News
    <b>Render list Form</b>:It is for Publishing the News
    <b>Show Form</b>:It is for showing the whole content of the News
    In XML Form Builder, by default when you create a new form these forms ie. Edit Form (You will design the Form here, only authorised person or the owner only view this).
    The Second Form(Render List Item) is the one will be shown to everyone with brief information.
    The Third Form(Show Form) is the one when you click on the News page, it will show you one more screen, there you can see the detailed description about the News.
    So, when you click on the Rendered List Item Title, it will open only in the separate window.
    Regards,
    Venkatesh. K

  • Hyperlink to open in new window on clicking via crystal client

    Hi,
    How to call hyperlink in new window via crystal client.
    I have main report. In that ,for two-three columns, I have made the hyperlink and I want that when user click on that column, it should open in new window.
    But I am unable to open the below link in new window.
    Hyperlink code :
    'http://epint1ent1.jpmorganchase.com/vps/docViewer?invoiceIndexKey='
    &columnname
    I am using crystal client XI R2.
    Please let me know any solution.
    Thanks in advance

    Vishal,
    In your Hyperlink add in the parameter for
    sWindow=New
    i.e. 'http://epint1ent1.jpmorganchase.com/vps/docViewer?sWindow=New&invoiceIndexKey='.....
    You obviously need to complete the Hyperlink fully.
    This should do the trick

  • Open a new window by clicking on a HTMBL tableview row

    Hello
    I want to navigate to another BSP page in a new window by clicking on a row in a HTMLB TABLEVIEW.
    I also want to pass value for a tableview table field for the selected row index.
    This field is not defined by a tableviewcolumn tag for the tableview in the layout
    I want to do this stateless.
    Is this possible ?
    Thanks and regards
    Christian

    hi Christian
    For this you need to do .......
    in the table tag populate this event
    <b>onRowSelection = "<OnSelect>"</b> this event.
    Now use a flag, let it be SHOW_POPUP.
    Now in the event handling capture the selection event of the table.
    IF EVENT->EVENT_NAME = 'tableView' AND
    EVENT->EVENT_SERVER_NAME = 'onSelect'.
    TV ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
    NAME = 'tableView'
    ID = '<tableID' ).
    IF TV IS NOT INITIAL.
    TABLE_EVENT = TV->DATA.
    ROWINDEX = TABLE_EVENT->ROW_INDEX.
    READ TABLE <Table Name> INDEX ROWINDEX into WA.
    Key = WA-<VALUE>.
    clear SHOW_POPUP.
    IF Key IS NOT INITIAL.
    SHOW_POPUP = 'X'.
    ENDIF.
    ENDIF.
    ENDIF.
    Now in the LayOut Page Write This Script In Between Form Tag in the begning only.
    <%
    if SHOW_POPUP EQ 'X'.
    %>
    <script>
    function call_help(name)
    var result = window.open(name,"helpWindow", "status=no, menubar=no width=730,height=550");
    result.moveTo(100,40);
    </script>
    <%
    endif.
    %>
    And in between <FORM> Tag Call This Function Like
    <script>
    call_help("<page Name.htm>?Key=<%= Key %>");
    </script>
    Do not use these code as u were using earlier
    onCellClick = "onCellClick"
    <htmlb:link id = "link"
    onClientClick = "return popitup('mat_move.do?key=11')">
    </htmlb:link>
    Do Remember to clear the SHOW_POPUP Flag on request of the page at each time.
    <b>What I am trying to do is , On click of the table control i will trigger a server event.
    i the server event i will set the flag SHOW_POPUP and navigate the data that is required on the popup window through navigate->setparameter().
    now when the layout will be refreshed it will check the SHOW_popup Flag. If it is set, it will define the javascript fuction, otherwise skip that code.</b>
    I think This will definitely help you , If you find any problem do revert back....

  • How to open a new window on click of a button, for printing stuffs in adf

    Hi ADF Experts,
    Jdeveloper 11.1.1.7.0 version.
    I am having a Print Button. On click of this I want to open a new window? how is it possible. Note it should not be a popup or panelwindow.
    Please suggest.
    Thanks,
    Roy

    Check out Frank's article http://www.oracle.com/technetwork/developer-tools/adf/learnmore/95-printable-pages-1501392.pdf which come with a sample at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/95-printable-pages-1501393.zip
    Timo

  • "Open in New Window" function in the page toolbar

    Hi,
    I am new to portal development and I have what looks like as an easy Iview modification:
    I need to implement the "open in new window" Function as a link, directly in the page toolbar (next to History, Back, Forward...) and not as an Option in the menu.
    This should be done in the Pagetoolbar and not the light pageToolbar.
    I downloaded the PAR file "com.sap.portal.navigation.pagetoolbar" but I don't how what I should change.
    Can someone please help me?
    Many thanks and points in advance.
    Regards

    Hi Stephane,
    Are you using the default framework page in your desktop. <b>Use the light framework page. It has the "Open in new window" as a link in the page tool bar.</b>
    If you still wish to stick to the default framework page; firstly you may want to remove the existing "open in new window" from the menu. Then you may need to copy the same code from the light fw toolbar par file for that 1 single link and paste it in your default fw toolbar. I can tell you the exact code tomorrow.
    Hope the first option may be desirable to you.

  • Opening in new window after clicking on h:commandLink

    hi,
    Please help to display jsp in new window after clicking on <h:commandLink>.
    This is what I have written.
    <h:commandLink value="Image" action="#{ImageBean.displayActualImage}" target="_blank"/>
    So Because of that I am able to display in the jsp in same window. displayActualImage() is function that is redirected to another jsp. But I want to disply it in new window. So can any one please help me.
    Thanks.

    Hello Koduru,
    you should have a look at the work protect modus settings of the user.
    Regards
    Gregor

  • Opening a new window by clicking icon on the tableview

    I would like to open a new popup window to show data by clicking an icon on one tableview. This data is kept in an internal table passed by a parent controller. Is there any example provided? (I am not familiar with the javascript language)

    You will not be able to get the index of the row which is being clicked by this method.  As the OnClientClick Event is processed on the client side, and the index is selected on the server side.
    For this you need to do some changes.......
    in the table tag populate this event <b>onSelect  = "<OnSelect>" </b> this event.
    Now use a flag, let it be SHOW_POPUP.
    Now in the event handling capture the selection event of the table.
    IF EVENT->EVENT_NAME = 'tableView' AND
                       EVENT->EVENT_SERVER_NAME = 'onSelect'.
      TV ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
                                        NAME    = 'tableView'
                                      ID      = '<tableID' ).
      IF TV IS NOT INITIAL.
        TABLE_EVENT = TV->DATA.
        ROWINDEX = TABLE_EVENT->ROW_INDEX.
        READ TABLE <Table Name> INDEX ROWINDEX into WA.
        Key = WA-<VALUE>.
        clear SHOW_POPUP.
        IF Key IS NOT INITIAL.
        SHOW_POPUP = 'X'.
        ENDIF.
      ENDIF.
    ENDIF.
    Now in the LayOut Page Write This Script In Between Form Tag in the begning only.
    <%
    if SHOW_POPUP EQ 'X'.
    %>
    <script>
    function call_help(name)
       var result = window.open(name,"helpWindow", "status=no, menubar=no width=730,height=550");
       result.moveTo(100,40);
    </script>
    <%
    endif.
    %>
    And in between <FORM> Tag Call This Function Like
        <script>
    call_help("<page Name.htm>?Key=<%= Key %>");
        </script>
    Do not use these code as u were using earlier
    onCellClick = "onCellClick"
    <htmlb:link id = "link"
    onClientClick = "return popitup('mat_move.do?key=11')">
    </htmlb:link>
    Do Remember to clear the SHOW_POPUP Flag on request of the page at each time.
    I think This will definitely help you , If you find any problem do revert back....

  • When opening a new window, any clicks within the new window click through to the original window so you can't scroll or save from the new window.

    Anytime that a new window is opened (such as when sending an email message or opening a pdf) I am unable to click on the new window. I can't click send or click on the scroll bars of the new window. If I attempt to click on the window it clicks on whatever is behind the window instead. If the new window opens with a cursor within it then I am able to type or scroll through with keyboard arrows, but cannot click or use the mouse scroll buttons. I also cannot choose items from drop down menus with the mouse (even in the original window). I must use the keyboard arrows to select any menu options.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • 24inch iMac with Mini-Dvi to VGA adapter, is not working correctly!

    OK, I PLUGGED MY ADAPTER TO THE VGA CABLE FROM THE OPTOMA PROJECTOR AND THEN CONNECTED THE ADAPTER TO THE 24IN IMAC. I USED THE REMOTE FOR THE PROJECTOR AND SELECTED VGA 19(WHAT PORT COMPUTER IS CONNECTED TO) AND ALL I SEE IS MY WALLPAPER, NOT ONLY T

  • Unable to create new events in iCal

    I updated my iPhone 4 to iOS7, and now when I try to create a new event in iCal, nothing happens. I am able to tap the "+" and enter the event information, but when I tap "Done", no new event appears in the calendar. If I, instead, create the event i

  • Plumtree portal server (v5.0.1) hosted on iPlanet Web Server (v6.0)

    Has anyone tried to port the Plumtree Corporate Portal v5.0.1 portal server component to iPlanet Enterprise Web Server 6.0 (aka SunONE Web Server, v6.0 )? Plumtree doesn't support this, but I am trying to merge a custom SSO authenticator to the Plumt

  • IC WebClient Profile

    Hi Experts, I am working on CRM 2007. Where can we define the IC WebClient Profile in IMG? I could not  find out the navigation path. Please help me out in locating the navigation path for the same. Points will be rewarded!!!!!!!!!!!

  • ACL's the best way to go for XSAN Folder level access.. Doesn't look it..

    Looking to restrict a particular user from seeing an entire XSAN Volume. I do want the user to mount the volume but only see and Read/Write to a handful of Folders. Other users need to R/W to his folder but he cannot modify or even see anyone elses..