CommandLink and commandButtonand changing form target

We're observing some odd behaviour when using a <h:commandLink ...> in a form which also has normal Submit actions.
If our commandLink has a target="_blank" (for contextual help) this link works and brings up in a new window. But after that, all form submits using commandButton come up in a new window too.
<h:commandLink action="#{bean.help}" value="Help" target="_blank" />
<h:commandButton action="#{bean.submit}" value="Submit" />Click Submit after clicking Help and it also brings up a new window, when it should have submitted to the same window.
The javascript that runs on commandLink set the target of the form to _blank until the page is re-rendered.
So then we modified the commandButton's behaviour with this hack:
<h:commandLink action="#{bean.help}" value="Help" taget="_blank"/>
<h:commandButton action="#{bean.submit}" onclick="this.form.target='_self'" value="Submit" />Which was working until we tried it on Safari. In Safari, click Help and up comes a new window, then click Submit and it stays in the same window but runs the action #{bean.help}
Anybody come across this?
Many thanks,
Andy.

In this particular case the help page changes depending on whether we're creating or editing the application. I'll hard-code both urls in there as you suggest and render the correct one accordingly.
As a correction to Safari's behaviour, in both 1.2_03 and 1.2_04 it is actually invoking the correct action, but when that action returns null to indicate staying on the same page that's when it gets 'hijacked' by the previous commandLink's view.
I'll get some proper test cases and file a bug in both cases.
Thanks!

Similar Messages

  • How to change form targets

    hi,
    iam having main form with two frames.in one frame iam calling a page called disp.jsp.i will enter data and submit the data then the results come in second frame.that is botom frame of the first frame.but inthe disp.jsp page i have a select box in that i have written onchange function..for this on change iam submitting to same form with document.form.submit().on the other hand when iam submitting i kept target="secondframe".so when iam chanign the value on select box then its going to bottom frame.in that function i want to set the location as top frame..
    regards,

    document.formname.target = "blahblah";
    works in JavaScript.

  • Change form target dynamically

    Hi all,
    I have a Struts form, declared as:
    <html:form method="POST" action="myaction" target="_top">
    This form uses the ActionForm validate. When the validate method returns no errors I need the Struts action to display the result page in the "_top" frame.
    BUT, when the validate method returns error(s), I need to re-display the same page in the SAME frame and let the Struts tag <errors/> display the error message(s). So target should be "_self".
    Does anyone can tell me how I should work this out, please!
    Thank you very much in advance!!

    Or another thought... (btw, the top frame shouldn't be named _top, as that is supposed to be a default target name meaning the top level window).. You could probably submit the frame to the top level window replacing both frames with another page that, based on the input, shows either the errored form in the bottom, or the success results in the top.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

  • I have created a form in InDesign, exported to a pdf, created an editable form and saved.  When I open the form and make changes and save, the reopen the changes are there.  If try to email this form as an attachment after editing, the attachment is alway

    I have created a form in InDesign, exported to a pdf, then created an editable form and saved.  When I open the form and make changes and save, then reopen the changes are there.  If try to email this form as an attachment after editing, the attachment is always minus the edits.   ????

    Hi chuck,
    If you ave created the form and then filling it yourself and saving the form, the filled data should be there when you reopen the same form.
    Can you please send the form to me at [email protected]  so that I can have a look.
    Regards,
    Rave

  • Table Format order and visibility in Form Settings keeps changing

    Dear Experts,
    We are facing a concurrent problem where there is constant change in the table format of the form settings in marketing documents.
    The columns order keeps changing and also the visibility box which will be ticked, becomes again unticked the next day for particular columns which are used.
    Event though it is set one time in manager login and locked the doc settings for other end users. The format keeps changing.
    It has to be set dially manually. Is  there a permanent solution for it .
    Please let me know . Please find the attached pic for it.Its SAP B1 8.82 PL6

    Hi,
    Please check this thread:
    http://scn.sap.com/message/7377186#7377186
    Check SAP note for changing form settings:
    1062635 - Can I block a user from having access to Form
    Settings?
    Thanks & Regards,
    Nagarajan

  • SCSM 2012 Change form issue - Scheduled start and end times default to 12:00:00

    I have a report that the Change Form in SCSM 2012 is not allowing users to set the scheduled start and end times.  The date stays correct, but the time reverts back to 12:00:00, and the user has to save to the initial form,  then re-open and
    change the times.
    I checked in the authoring tool, the time/date field is set to full date and time. (I think these are custom fields)
    I am not sure where else to look to adjust any settings as needed.
    Thanks for any assistance.
    Joshua Fuente

    Hi Joshua,
    Is this situation on all consoles or few ones? Check the time format on the user's PC. 24h or 12h could affect the DateTime control's behavior.
    Cheers,
    Marat
    Site: www.scutils.com  Twitter:
      LinkedIn:
      Facebook:

  • Hi, after submission of the form, can the respondents make changes to their answers and submit the form again without completing every single question?

    Hi there,
    After submission of the form, can the respondents make changes to their answers and submit the form again without completing every single question?
    Thanks for your help
    Paline

    Hi Paline,
    Unfortunately this cannot be done.However, being the author of the form you can make the required changes in the response file.
    Thanks,
    Vikrantt Singh

  • H:commandLink and Javascript

    Hi All,
    I have a commandLink in which I pass parameter using <f:param>. This commnadLink is enclosed under <h:form>
    This <h:form> is calling javascript function on its onSubmit event.
    <h:form onSubmit="return validateForm()" >
       <h:commandLink action="#{bean.action}" >
           <f:param name="action"  value ="settings"/>
       </h:commandLink>
    </h:form>Now my problem is when I click commandlink my javascript function is not executed. And there is no onclick available in commandLink tag.
    I saw the html output of this code. h:commandLink puts its own onclick so it makes sense that it doesnot have onClick support. But in generated code commandLink forcefully submits the form. So ideally any function in form's onsubmit() should be called but in this case it is not.
    Any suggestions ? What is going wrong here ?
    Thanks

    We have a similar problem here. Strictly speaking, it seems like Faces isn't really oriented toward javascript validation -- it's expected that'll happen server side.
    If you have to have it client-side (and, yes, I know the arguments), you could try the approach I came up w/here. (I'd actually appreciate some comments on it -- it's a hack, but i'm wondering how bad it is. :)
    Put the h:commandLink in a hidden div, with just a wee bit of extra javascript:
    <div style="display:none;">
    <h:commandLink id="okCmd" ....>....</h:commandLink>
    <h:outputFormat escape="false" value="
      <script> var okCmd = \"{0}\"; </script>
      ">
      <yourExtremelyShortTaglibNamespacePrefix:clientIdParam componentId="okCmd" />
    <h:outputFormat>
    </div>write your own link whose onclick handler calls validateForm() and then calls the h:commandLink's onclick:
    function okeyDokey() {
      if (validateForm())
        clickLink( okCmd);  // okCmd var defined elsewhere (see above)
    }So, then we need the clientIdParam custom tag, and the clickLink() javascript function.
    public class ClientIdParam extends UIParameter
       public static final String COMPONENT_TYPE = "canopy.ClientIdParam";
        * Returns the clientId of the component indicated by the 'componentId'
        * property.  {@link UIComponent#findComponent(String)} will be used to
        * find the component.
       public Object getValue()
          return findComponent( getComponentId())
             .getClientId( FacesContext.getCurrentInstance());
       // getComponentId() (omitted) is straightforward....
    }javascript clickLink():
    * Simulate a user clicking a link.  Originally written for simulating clicks
    * on JSF commandLinks, so if you change  it, make sure it still works for
    * that purpose.
    function clickLink( aLinkId)
       var link = document.getElementById( aLinkId);
       link.onclick();
    }So... am I insane? Did I miss a simple one-line solution as plain as the nose on my face? (I wouldn't mind finding out there's something better.)
    John.

  • How do I synchronize a table of employees with and employee update form?

    WHAT i AM TRYING TO DO:
    Create a page with two areas. The top will contain a sortable, filterable list of employees. The bottom of the page will contain all of the details on a selected employee.
    WHAT I HAVE DONE:
    1. Created a DEPT_EMPLOYEES view with just some basic department and employee information.
    2. Created Entities and View Objects based on the DEPT_EMPLOYEES view and the EMPLOYEES table.
    3. Created a View Link between the DeptEmpROView (source) and EmployeesUView (destination)
    3. Created a page with a panel splitter an dropped the DeptEmpROView in the top as and ADF Table.
    4. Dropped the EmployeeUView on the bottom part of the pages as and ADF Form.
    WHAT HAPPENS.
    1. When I open the page the list of employees is displayed on top, and the first employee is displayed below.
    2. When I click on another row in the table the form below does not change. I had expected it to.
    3. If I right-click on a row in the table and select "reload" from the options the page is re-drawn and the bottom form is populated with the data that matches the row I clicked on.
    WHAT I WANTED
    When you click on an entry, to have the bottom part of the page refreshed to match the selected entry.
    QUESTIONS:
    1. I thought I had followed all of the steps to prepare a master-detail setup. Do this not work with a table as the master? Or did I miss a step? Or am I using components in a way they were not intended?
    2. When I look at the ViewLink I see in the Destination that the where clause :Bind_EmployeeId = EMPLOYEE_ID will be appended to the query. I would then guess that :Bind_EmployeeId is not set when I click on a row. Is there a way to make that happen?
    3. I notice in the af:table documentation there is an org.apache.myfaces.trinidad.event.SelectionEvent defined. Can I somehow intercept this and set the bind variable then? If so, how to I tell the form to refresh?
    5. Another clue. When I run the page I get some warnings. One is "Reference selectedRow not found" . Double clicking on that gets me to a line selectedRowKeys="#{bindings.DeptEmployeesROView2.collectionModel.selectedRow}"
    6. Another warning message "Reference makeCurrent not found" gets me to selectionListener="#{bindings.DeptEmployeesROView2.collectionModel.makeCurrent}"
    It sure seems like these last two must have something to do with it.
    Any clues would be appreciated.
    Edited by: rrp on Jan 3, 2011 12:47 PM

    Shay,
    Thanks for pointing me to that tutorial. The synchronization is now working.
    For anyone else that might find this discussion:
    To make it work I selected the af:paneFormLayout that held the EmployeeUView.
    In the properties there is a PartialTriggers property in the Behavior section.
    I highlighted this property and selected the Edit option.
    This allowed me to navigate the component tree and pick the table holding the DeptEmpROView.
    That was it. Now clicking on the table changes the details displayed in the form.
    There are questions, but they are more followon:
    1. The tutorial surrounded the "list table" with a panelCollection. I did not do that. I don't know why or why not to use the panelCollection.
    2. The tutorial made a point of setting the ColumnSelection attribute to single for the List table. I did not find this changed the behavior in any way and was wondering why.
    3. The tutorial also made a point of changing the ContextMenuSelect for the list table to "clickToEdit".
    3a. I did not see how this changed the behavior
    3b. Why "clickToEdit" on a read-only table?

  • I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0.  Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file ext

    I recently had some 8mm film transferred to DVD. I am trying to edit the film clips using Premier Elements 4.0. so I can reburn the films on a single BluRay disc. Some of the film clips copy into the project but others don't. I tried copying the VOB filed onto my hard drive and then changing the file extensions on the VOB files to MPEG but this was no help. Some of the VOB files contain numerous film clips but my software does not appear to be able to recognize them as such. I need to know if replacing my old Premier Elements with the new Version 13 would solve this problem or not. Any advice would be greatly appreciated!
    Bob

    Bob
    What do you have now.....
    What computer operating system do you have?
    We can go into the finer points of source and your intentions, but for now it would appear that you are using SD 4:3 source media to get to a HD 16:9 result. Lots to discuss in this regard.
    What was given to you on the DVD disc? DVD-VIDEO 4:3 or something else?
    If DVD-VIDEO on DVD disc, you should expect to find on the disc a folder named VIDEO_TS. That is your target for your video files.
    If you were given a DVD-VIDEO on DVD disc, then all you want from it are the video files, specifically
    VTS_01_1.VOB, VTS_01_2.VOB, and so on through that series until possibly getting to
    VTS_02_1.VOB, and so on. How many files you have beyond the VTS_01_1.VOB file will depend on the size of the DVD-VIDEO.
    Does the above scenario apply to you?
    The alternative might be someone giving a DVD disc (data disc) which contains just the VTS files mentioned which were copied from
    the VIDEO_TS Folder. So, you do not get the whole VIDEO_TS Folder, just the essential video files. Does this scenario apply to you.
    I see no need to replace your Premiere Elements 4 with a later version unless you have a huge project and need a later version that will be a 64 bit application running specifically on Windows 7, 8, or 8.1 64 bit computer.
    Consider...Premiere Elements 4 and if you have DVD-VIDEO on DVD....
    1. Place the DVD disc in the burner tray
    2. Open Premiere Elements 4 and set the project preset for NTSC DV Standard (assuming you are working in a NTSC setup)
    3. Go to
    Get Media
    "DVD, Digital Camera, Mobile Phone, Hard Drive Camcorder, Card Reader"
    "Adobe Premiere Elements - Media Downloader" and its Advanced dialog.
    Set the Source in the latter dialog for the drive which has your DVD disc inserted in its tray
    You should see your VTS_01_1.VOB thumbnail in the "Adobe Premiere Elements - Media Downloader" Advanced dialog.
    With this VOB selected, click on Get Media to get the file from there into the project.
    Should work fine.
    Complications may be involved if the people who processed your footage gave you something other what is described above.
    Please review and consider, and then we can plan our project strategy accordingly.
    Thank you.
    ATR

  • My account was accessed and unauthorized changes made by We R Wireless

    I recently became a ware of a very serious issue and have been getting little assistance from Verizon.  My account was password protected and had only 3 people identified as having the ability to make changes on my account.  I received a notice from Verizon regarding a change made on one of my lines.  Upon review it was an unauthorized change to add "Total Mobile Protection" to one of my lines for $9.00 a month.  Also in this notice was a credit which I was entitled to for a $10.00 Active Promotion.  I believe this credit was placed on the account so that the change might slip by unnoticed.   When I looked into the change it was made by a Representative from We R Wireless in Ship Bottom NJ.  I have never been to this store nor have I spoken with anyone ever at this store.
    After calling the store and confirming my account was accessed and unauthorized changes made, I was told by the manager that an employee had in fact accessed my account and made those changes.  I still could not understand how it was possible for the changes to have been made without my password.  The activity certainly looked very suspicious and I figured it had to do with commission to the representative for adding the insurance plan.  This was denied multiple times by the manager of the store as well as the District Manager.  In the meantime I had received multiple emails from We R Wireless in their attempts to "Make this go away"
    What came next was the most disturbing and upsetting part of this situation.  I was told by the District Manager of WE R Wireless that my information they had collected years ago during a purchase of a phone and activation INCLUDING MY PASSWORD and that they had kept it in their system!!
    WE R Wireless had shared my personally identifiable information and Password to my account with Sales representatives at the Ship Bottom WE R Wireless store  and that was how they accessed my account!!
    As you can imagine I have now been receiving multiple calls from The Director of Retail Operations, Musafa as well as the Director of Operations, Jimmy.  They are attempting to sweep this under the carpet and it is inexcusable and unacceptable.  The reason for this post is to WARN others who may have made purchases at anytime at a We R Wireless store that they KEEP YOUR PASSWORD and employees are given the Passwords and have made changes to accounts.  I cannot believe that I am the only one that this has happened to and I am concerned this is a widespread breech and more importantly is ILLEGAL.
    I will keep this Board updated with developments but can tell you so far Verizon has not been very responsive to my concerns but this is unacceptable and I am thinking of contacting the FCC as well as an Attorney.  In this day and age of Identity Theft this situation must be addressed by Verizon whether or not this was one rogue employee or not our PASSWORDS and other Information should never be shared nor kept without our knowledge.
    >> Edited to comply with the Verizon Wireless Terms of Service <<
    Message was edited by: Verizon Moderator

    I can only tell you that the Verizon rep from the Fraud department as well as Verizon's legal department contacted me and said under no circumstances are these companies to retain Customer Passwords.  As you can see look at the potential for issues as evident in this situation.
    As far as the FCC and their responsibilities this is directly from the website
    The Federal Communications Commission regulates interstate and international communications by radio, television, wire, satellite and cable in all 50 states, the District of Columbia and U.S. territories. An independent U.S. government agency overseen by Congress, the commission is the United States' primary authority for communications law, regulation and technological innovation. In its work facing economic opportunities and challenges associated with rapidly evolving advances in global communications
    The agency investigates consumer issues such as Cramming which has occurred here if you go to the site you will see some of the recent fines for cramming levied by the FCC and it is a huge issue.  A consumer does not get involved in legal fees the FCC is responsible to investigate consumer claims of fraud and regulates the industry.  The Attorney General also takes this very seriously as well.
    Cramming - Unauthorized Charges on Your Phone Bill
    Cramming Settlement for Consumers Announced
    Dec. 19, 2014: The FCC, along with the FTC and state attorneys general, announced a $90 million settlement with T-Mobile regarding unauthorized charges - commonly known as "cramming" - on phone bills.
    Current and former T-Mobile wireless customers should review their bills and apply for refunds if they suspect third party charges were wrongly added to their bills at www.t-mobilerefund.com/
    Sent from my iPad

  • Need to change the targeting group of a Rule or monitor after a alert is created.

    Hi All,
    I have created many alerts and they are working fine. Currently due to business requirement we have installed Windows server 2012 operating systems in our production environment. But we have targeted the
    "Windows server 2008 r2 full operation system" group as per the below screen shot. As we now have to import the management pack for Windows server 2012 as well.
    What we have planned is to change the targeting group from "Windows server 2008 r2 full operation system"
    to "Windows server operating system group" so the alert / monitor or rule will target all windows server which has been discovered in SCOM rather that only the servers running Windows server 2008 r2.
    I was also not able to set overrides for this as that server was not coming under Windows server 2008 r2 full operation system as it was a Windows server 2012 agent.
    I can also go ahead and create new alerts but i have created custom of 1000 alerts and i cannot go ahead and re create them.
    Is there any way to change them. If yes Can i do a bulk change via powershell ?
    Below is the screenshot of what i really want. Can any on e please help.
    Gautam.75801

    You can't really change the target class of a monitor in a sealed vendor pack. If this is your own custom pack, then you can change the target class no problem, but this would need to be done on the unsealed XML (using VSAE or some other authoring tool).
    Then you can seal the pack and re-import (should be upgrade compatible, since you are just changing the target).
    I'm not familiar with this particular monitor in your screenshot, but it looks like this should probably target Exchange? If this is the case, then I would recommend targeting the closest typed class that the monitor should run against. In this case, some
    type of Exchange class that is already in the Exchange management pack.
    Otherwise, you can also create your own custom class for targeting, which I describe in detail on my blog.
    Here are all my sample VSAE fragments.
    Here is an example of
    using the Application Component base for your new class.
    Here is an example of
    using Local Application base for your new class.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • Acrobat 9.0 Changing Form Field Properties

    When working with Form Fields in Acrobbat 9.0, how can I quickly and easily change a Text Field to a Check Box field without having to delete and then add in the new field?  I thought right-clicking would do the trick, but it doesn't give me the option to change from a Text field to a Check Box field or vice versa.

    Cannot be done. Its like asking how to change a chicken into a duck, they are both fowl but...

  • How does one strip out all Live Cycle data from a PDF and rebuild the form fields in Acrobat?

    Someone in a different department built a bunch of forms in Live Cycle. We now need to make minor edits to these forms but we all have Macs and can't use Live Cycle. Currently our only option to change a date and a name on each form  is to buy a new Windows workstation, buy a copy of Live Cycle and train someone for it.
    I understand the Live Cycle technology and Acrobat technology for forms are somehow different but there must be a way to just strip out all the Live Cycle form programming so that I just have the bare PDF with the text and layout.  Then make the text edits and rebuild the form fields in Acrobat.

    It depends on your PDF. Is the PDF a static XFA or a dynamic XFA?
    You can check to see if the PDF is static/dynamic by clicking File=>Save As, and it should say static or dynamic PDF as file type.
    iText will work with Static XFA forms created in LiveCycle. Dynamic XFA forms are not supported.
    You can also submit XML data to a server side script and parse the XML data using C# system.xml.xmlreader.
    Another tool that may speed the development of the project is:
    http://www.fdftoolkit.net/
    Note: FDFToolkit.net utilizes iText Technologies.

  • Java proxy client logical port transport to Q and prod issue in target addr

    Hi All,
    I have a java proxy client having a logical port (configured using NWDS) to consume a web service in the provider system.
    In the logical port, I have given target address, and logical port name. While moving this client proxy NWDI dev track to Q and prod,
    how do I change this target address to point to Q and prod respectively. In other words, even though I am using Visual admin to configure the destination url for the logical port, to point to Q and prod, its still referring to the dev environment provider service after moving the proxy client to Q and prod. What is the suggested approach to take care of this issue
    Thx
    mike

    Hi Michael,
    I can only help from that point of view that I believe this question belongs to the forum
    Service-Oriented Architecture (SOA) and SAP
    Please try to raise this question there.
    Thanks and Regards,
    Ervin

Maybe you are looking for

  • How do i print more than one photo on one page

    Iwould like to create a proof page & cain't seem to be abel to find out how to groop multiple pictures on one page

  • Reading XML file from UNIX

    I am reading XML file from unix using : FORM read_file USING p_name.   DO.     READ DATASET p_name INTO WXML_LINE LENGTH LENG.   ENDDO. Then I am using subroutine below where I get a short dump at   case X_NODE->get_type( ). FORM get_data tables   Y_

  • ITunes 5 (Quicktime 7.0.2) problem with Archicad

    Apparently Quicktime 7.0.2 is incompatible with Archicad (both R8.0 and R9.0). After installing iTunes 5, archicad starts to crash. When uninstall Quicktime 7.0.2 and install a previous version (6.5.2) Archicad works fine. Then iTunes5 can´t start. I

  • Case in XSD register

    When I try to register an XSD if the element names are in lower case then when I try to describe the underlying objects i get an error Object doesnt exist even though i can see it in USER_OBJECTS, however if the element names are in upper case then i

  • HT1349 my activation code has come off... how can i retrieve the amount of the card and redeem it?

    I have by accident scratched off my activation code for ITunes... can I retrieve it?