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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

Similar Messages

  • 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!

  • 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.

  • Changing the Target data store dynamically

    Hi,
    I have a requirement to load same kind of data into 12 different target tables. Client maintains data in period vise, i.e. Jan data in a table TABLE_01, Feb data in TABLE_02, Dec data in TABLE_12 etc. The structures of all these tables are same.
    My program will process only one period’s data at a time and processed data will be loaded into a table TABLE_SRC. After this, according to the processing period, I need to post the data into the target tables TABLE_01, TABLE_02 etc. i.e. if the data is for period Jan then to TABLE_01, data is for period Feb then to TABLE_02 and so on.
    For accomplishing the same, I need to create 12 different interfaces. So is there any way to accomplish the same using a single interface by changing the target data store dynamically? I am looking for a solution other that creating procedures.
    Any Help is appreciated.
    Thanks in advance.
    DJ

    Yes, it is possible....
    1) at the target datastore use a variable at resource
    2) create a query that returns all target tables in a source tab (procedure step)
    3) at target tab, call the interface scenario send the query result as parameter.
    That will allow you execute the same interface for disitnct targets.
    Does it help you?

  • How to create a MD form using dynamic page ?

    Rahul and Sharmila,
    You have answered several of my queries earlier and I am thankful for them.
    I have been trying to creating a MD form using dynamic page and I haven't fiqured it out. I need help. You both advised me on creating a simple form using dynamic page. The complexity changes drastically when I have to create a MD form. Has no body ever tried to create a MD form with dynamic page?
    I haven't heard from you anything either. I am stuck with this and I need help urgently. Would you kindly tell me if this is possible and how ? Otherwise, I will stop crying for help on this.
    Thanks for your kind attention.
    Mainak

    Hi,
    I have replied to this in the morning.
    Re: Oracle portal and JSR 168 compliance
    Hope it helps.
    Thanks,
    Sharmila

  • Creating data entry form/screen dynamically

    How does one create web application data entry form/screen dynamically? One part of screen will have the option to bring up forms so that users can create forms. DO i need any sort of markup language?
    Examples please.

    use javascript. use the buttons on one panel and forms on another panel.
    for buttons onclick events change the form "action" and send the hidden parameters you want.

  • Automated tool to convert from Forms to Dynamic Page for Oracle Portal?

    Hi Experts,
    We are thinking to convert majority of the forms in our portal to dynamic pages. Is there any tool to automate the conversion from Forms to Dynamic page for Oracle Portal 9.0.4.1.0?
    Thanks, Abbas

    Dear Abbas,
    You seem to have two issues... ;-)
    If you are finding the Forms are getting corrupt very easily, I'd suggest you go and open a Service Request into Oracle Support (http://metalink.oracle.com). There are a couple of ways where you can have these not corrupted (depeding on the Portal version you are in) and if there isn't yet a way you may get a bug logged and fixed within the next patchset eventually (improving the product functionality).
    As to changing it to a dynamic page it might give you a bit more flexibility... yeah. It really depends on what you desire to do. I'd slowly start to code them in this way if your goal is this. As to the former coded forms unfortunately as I've said there isn't a strait way to do that, so you may do this slowly in time...
    I hope it helps you a bit further...
    Cheers,
    Pedro.

  • Portal Forms / Reports / Dynamic Pages slow to compile

    We are running Portal 3.0.9.8.5 and RDBMS 8.1.7.4. Since applying the 30985 patchset we are finding that compiling existing or new applications takes nearly 5 minutes.
    The applications themselves run fine - Does anyone have any suggestions ?
    Thanks in advance
    Paul

    Anu,
    Generating the form /report/dynamic page is taking 5 plus minutes i.e. making a change -
    Once the application is compiled it runs fine.
    Thanks

  • Change iconic file  dynamically..

    Hello Friends ...
    I m working on menu .. I want to change iconic file dynamically..
    I m using for this
    if condition then
    Set_Menu_Item_Property('DW',ICON_NAME,'comp1');
    else
    Set_Menu_Item_Property('DW',ICON_NAME,'comp2');
    end;
    'DW' = menu item
    comp = iconic file name
    but iconic file not changing ..
    Thanks....
    Edited by: user10502250 on Jan 21, 2010 2:24 AM
    Edited by: user10502250 on Jan 21, 2010 2:24 AM

    Hello ...
    Thanx for reply ...
    abt form builder version
    orms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle Query Builder 10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.2 (Production)
    Oracle Tools GUI Utilities Version 10.1.2.0.2 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE     10.1.0.4.0     Production

  • How to calculate the Percent change in a dynamic

    hi All,
    I'm trying to get the percent increase/change of two dynamic
    colums.  In my report, the user has a checkbox where he can select two colums to calculate the percent growth.
    My DataSet is PilarName, Calification(is a decimal value) and Period (this is a string).  I created the Matrix this way:
    PilarName [Period]
    [PilarName] [Calification]
    Which give me these values:
    So, now I need to create another column to calculate the percentage change between these two colums.  I tried this:
    I added a Adjacent column group for Period column and I grouped by the calculated column "ColumnDiff".  Add the following expression.
    =(SUM(Fields!Calificacion.Value)- Previous(SUM(Fields!Calificacion.Value),"ColumnDiff"))/Previous(SUM(Fields!Calificacion.Value),"ColumnDiff")
    After that I get: 
    I'm getting the sum of the two columns instead.
    Any clue about what I'm doing wrong? Please help me, I've been looking for the answer but any solution works for me.
    Luis Carlos

    Hi Luis,
    According to your description, you have a report with different dynamic columns. Now what you want is show your user percentage growth in your matrix report after your user select two of those columns (I think you may use parameter to achieve your “checkbox”
    function). Is my understanding correct?
    In Reporting Service, we can’t calculate dynamic columns with our build-in arrogation functions. So we need to add custom code into our report, and call those functions which defined in custom code in our expression. We have tested your scenario in our local
    environment. Here are steps and screenshots for your reference.
    Go to your Report Properties, add the custom code below into your report:
    Dim Shared Num1 As Double
    Dim shared Num2 As Double
    Public Function GetCalification(Calification as Double,Type as String,Type2 as String) 
    If Type = Type2 Then
       Num1=Calification
    Else
       Num2=Calification
    End If 
    Return Calification 
    End Function
    Public Function GetPec()
    Return (Num2-Num1)/Num1
    End function
    Create a matrix. Put PilarName into Row field, put Period into Column field. In Data field, put the expression below into the textbox:
    =Code.GetCalification(Fields!Calification.Value,Fields!Period.Value,Parameters!Period.Value(0))
    In our sample report, we created a parameter (named Period) for selecting two columns. You can replace “Parameters!Period.Value(0)” with your own parameter.
    Add an outside column at right (%Growth), put the expression below into the textbox:
    =Code.GetPec()
    Save and preview. The matrix and result looks like below:
    Reference:
    Custom Code and Assembly References in Expressions in Report Designer (SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to change VO's dynamically for a item for each row in advanced table?

    Hi All,
    We had a requirement to filter the employees based on the search criteria table. I am using advanced table for developing search criteria.
    In that table I am having three columns. Operator (messagechoice), Criteria Type (messagechoice), and Criteria value (messageLovInput). Also 'Add Another Row' functionality is available.
    My requirement is:
    First Row:(Initial Row)
    When the user selects a value in Criteria Type, only the values that are relevant to that type should be displayed in the Criteria Value.
    Second Row: (when the user selects Add Another Row button)
    When the user selects a value in Criteria Type, only the values that are relevant to that type should be displayed in the Criteria Value.
    The problem I am facing here is, the Criteria Value column is pointing to only one VO at design time. But wee need to change that VO dynamically without disturbing other rows depending on the Criteria Type value.
    Is it possible to do so?
    Note: User can add n number of conditions as he want.
    Can anyone help how to acheive this.
    Regards,
    Sundeep.

    Check Dynamic Poplist section under Standard Web Widgets in Chapter 4 of OA Framework Developers guide.

  • 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)

  • How to change the images dynamically in a table.

    Hai,
                     How to change the images dynamically in a table based on the condition in webdynpro abap.
    Edited by: Ravi.Seela on Oct 13, 2011 2:17 PM

    This has been much discussed earlier. Do search posts.
    For your scenario i would do the following.
    inside your node which is binded to the table, i create a new node image with cardinality 1 ..1 and a attribute called path of type string.
    create a  supply function for the node image .
    Supply method now has a Element (Parent element ) and node.
    Based on your record in element, set the right image source to path attribute and bind the node.
    This will make sure that the framework calls the image supply function for every row in a table.

  • How to change VO query dynamically

    Hi,
    Iam trying to change the VO query dynamically. My req. is I have 6 columns in a header page 3 columns(default single column) for sorting purpose and another 3 columns(default single column) for data querying purpose.
    al these are in one view so I have created one VO.
    Sorting Searching
    A A
    B B
    C C
    When I give any values in Sorting and hit submit button VO query should change dynamically.
    I have searched older post regarding this.
    My query is some thing like this
    SELECT * from cust_table where a = NVL(:1 ,a)
    UNION
    SELECT * from cust_table where a<> NVL(:1 ,a)
    order by a
    Iam trying to pas the below part dynamicaly in my AM method
    vo.setWherecaluse("where a = NVL(:1 ,a)
    UNION
    SELECT * from cust_table where a<> NVL(:1 ,a)
    order by a ")
    and trying to pass the params to that query. But it is not working.Giving error "Bind variable could not find"
    Can any one suggest how to solve the issue.
    Thanks,
    Mahesh

    Hello Ajay,
    THanks for your response.
    My vo query is select col1,col2,col3,col4,col5,col6 from cust_table;
    and and changing vo.setwhereclause dynamically based on different scenerios.
    in one scenerio i need my query to be some thing like
    SELECT col1,col2,col3,col4,col5,col6 from cust_table where a = NVL(:1 ,a)
    UNION
    SELECT col1,col2,col3,col4,col5,col6 from cust_table where a <> NVL(:1 ,a)
    order by a
    so can i concatenate my vo.setwhereclause like *"where a = NVL(:1 ,a) UNION SELECT col1,col2,col3,col4,col5,col6 from cust_table where a NVL(:2 ,a) order by a"*
    in the setwhereclause iam setting bind variables is this method correct? Hope it is clear pleaselet me know if it is not clear I will explain in detail.
    Thanks,

  • Problem when changing the target quantity for a contract

    Hello,
    I have a problem when i try to change the target quantity for a contract through the BAPI 'BAPI_CONTRACT_CHANGE'.
    I filled the tables 'item' and 'itemx' with new values. the BAPI 'BAPI_CONTRACT_CHANGE' returns no error, but after using the BAPI 'BAPI_TRANSACTION_COMMIT' I get an info message from SAP and the modification does not pass.
    In debugger I could locate the error. In fact, the appeal of FM 'ME_UPDATE_DOCUMENT is done with a table XEKKN with the new values of the quantity and a KZ code equal to ' I ' to insert, then it must have the value ' U 'for update .
    Is someone can help me to solve this problem?
    Thank you in advance.

    Have you tried selecting the page, and then changing the theme directly on that page?

Maybe you are looking for