Dynamically set action to event?

I would like to determine if it is possible to bind a programatically opened image to an action or script. For example is it possible to dynamically add an action to the save event. When this image is saved.. do action.
Thanks

Hi,
To set the fireaction progrmatically on link you have created use in processrequest:
OAlinkBean bean = (OALinkBean)webBean.findindexedchildrecursive("link");
bean.setFireActionForSubmit("delete",null, null,false, false);
where "delete" is the event which will be fired when the link is clicked.
Thanks,
Gaurav
Edited by: Gauravv on Aug 5, 2009 8:50 PM

Similar Messages

  • Dynamically Set Action After Jbo Exception

    I want to determine a pages Action by wether or not an error has been thrown.
    Example:
    For page 1's Action I have setAction()
    Heres the method:
    public String setAction() {
    // Add event code here...
    FacesContext context = FacesContext.getCurrentInstance();
    if (context.getCurrentInstance().getMessages().hasNext() == true){
    return "";
    else
    return "Page2";
    When I know for sure that theres an error, it still goes to page 2. Is this code wrong?
    Thanks,
    Tim

    Nevermind, its...
    context.getCurrentInstance().getMessages() != null
    but this always is true, even when I don't have the exception. Any ideas?????

  • How can i set action on UITaBar and get event from that

    Hi All,
    I m doing one apps in which i have to add three UITabBarItem and this is UITabBarSystemItem.
    Now i cannot understand that how can i set action and get event from the?
    And how can i set various views on three tab bar item.
    I have to use UITabBar means i have to use UINavigationController+UITabBar
    My code id
    tabBar =[[UITabBar alloc] initWithFrame:CGRectMake(0,370,320,50)];
    tabBar.backgroundColor =[UIColor blackColor];
    UITabBarItem *search =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemSearch tag:0];
    UITabBarItem *recents =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemRecents tag:1];
    UITabBarItem *favorites =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorit es tag:2];
    tabBar.items =[[NSArray arrayWithObjects:search,recents,favorites, nil] retain];
    tabBar.selectedItem = search;
    [myView addSubview:tabBar];
    [tabBar release];
    I add a action:
    UITabBarItem *search =[[UITabBarItem alloc] InitWithTabBarSystemItem:UITabBarSystemItemSearch tag:0 action:@selector(select:)];
    So it error: Warning -no'InitWithTabBarSystemItem:tag:action:' method fount
    So any can help me regarding it?

    Thanks RickMaddy very much.
    I read and do with sample at the View Controller Programming Guide . But when run it only view TabBar with title but haven't got any TabBarItem on it. I searched a few example about TabBar and i did, but i want do a form with a button then press on button it view a form with 2 TabBarItem on TabBar and press each TabBarItem will show correlative form page 1, page 2.
    UITabBarController *tabBarControl = [[[UITabBarController alloc] initWithNibName:nil bundle:nil] autorelease];
    tabBarControl.title = @"Tab bar";
    ViewControl1 *view1 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl1" bundle:nil] autorelease];
    ViewControl1 *view2 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl2" bundle:nil] autorelease];
    tabBarControl.viewControllers = [NSArray arrayWithObjects:view1,view2,nil];
    [self.navigationController pushViewController:tabBarControl animated:YES];

  • Dynamically set send date to defer event subscription

    Hi,
    I need to have an event subscription when new employees are hired, but defer payroll notification until their respective future hire dates.
    I am entertaining the thought of having one event subscription defined for the event, but deferring subscription processing using future send date by dynamically setting the send_date attribute to the future hire date of each new employee. Are there any PL/SQL API available to dynamically adjust the send date for new hires?
    Thanks in advance.

    Thank you for your feedback. I don't see this feature request in the idea list yet. You should post it here so other can vote on it.
    Randy

  • Dynamically Set date not changing in schedule Job

    Hi,
    I have created a report with "Order Date" as one of the parameters on the selection screen. I have created a variant, say 'X' , to set this date parameter dynamiccaly as "Current date - 31 days".
    I have scheduled this program to run in background with the 'X' variant daily at certain time.
    Now, for the day on which I created this job , the Order Date is set to correct date . For ex if I am scheduling the job tdy it will be set to 06/10/08. However, for next day , that is tom this date is not getting changed. i.e Tommorrow again Order date is 06/10/08 but it should have been 07/10/08.
    So basically this dynamically set date is not chaning in the scheduled job.
    Any idea why this is happening and what is the corrective measure for this.
    Thanks!

    There is an INITIALIZATION event in the program.......
    Do the processing your date in that event only....
    for ex....
    select-options: date for order-date.
    INITIALIZATION.
    date-low = sy-datum or wat ever.
    Thanks
    Saurabh

  • How to create an UI element dynamically on action in drop down?

    Hi,
    How to create an UI element dynamically on action of selecting a value from the  drop down?
    help out with the steps i need to follow..

    Hi,
    <u><i><b>Dynamic UI Element creation</b></i></u>
    We can create it only in the WD Modify View.
    Get the instance for the Root UI Element Container.
    Create the UI element Ex: Input Field, Text View etc.
    Bind the UI Element to the Attribute Value.
    Now bind the UI Element to the Root UI Element Container.
              IWDTransparentContainer root =(IWDTransparentContainer)view.getRootElement();
              IWDDropdownByIndex DdbName = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbName");
              IWDDropdownByIndex DdbAge = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbAge");
              IWDDropdownByIndex DdbGender = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbGender");
              IWDNode Mad =wdContext.getChildNode("Person",0);
              IWDAttributeInfo NameAtt = Mad.getNodeInfo().getAttribute("Name");
              IWDAttributeInfo AgeAtt = Mad.getNodeInfo().getAttribute("Age");
              IWDAttributeInfo GenderAtt = Mad.getNodeInfo().getAttribute("Gender");
              DdbName.bindValue(NameAtt);
              DdbAge.bindValue(AgeAtt);
              DdbGender.bindValue(GenderAtt);
              root.addChild(DdbName);     
              root.addChild(DdbAge);
              root.addChild(DdbGender);
    <u><i><b>Dynamic Action Creation</b></i></u>
    Create the Action in the Action tab.
    Create a Button.
    Get the reference for the created action (Through the Event Handler).
    Bind the Action to the Button.
    Bind the Button to the Root UI element Container.
    IWDButton ButGo = (IWDButton)view.createElement(IWDButton.class,"ButGo");
    IWDAction ActGo = wdThis.wdCreateAction(IPrivateStartView.WDActionEventHandler.GO,"Click");
    ButGo.setOnAction(ActGo);
    root.addChild(ButGo);
    Now write the required code for the Event Handler that is associated with the Action.
    //@@begin onActionGo(ServerEvent)
        IWDNode Mad = wdContext.getChildNode("Person",0);
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Name"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Age"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Gender"));
    //@@end
    Regards
    SURYA

  • Dynamically Setting PartnerLink Endpoint Address (HTTP) - Null Pointer

    I am trying to dynamically set a partner link address in my synchronous bpel process. I am getting a NullPointerException when assigning variable of type EndpointReference to the partner link.
    I followed the example on the BPEL forum here (which describes dynamically setting the address):
    Re: How can I change my ip adresses from a expression?
    In this case, we only need to reset the address.
    My partner link wsdl file contains this service defn:
    <service name="Service1">
    <port name="HTTPPost" binding="tns:HTTPPost">
    <http:address location="http://test"/>
    </port>
    My assign syntax is as follows:
    <copy>
    <from variable="endPointRef" query="/wsa:EndpointReference/wsa:Address"/>
    <to partnerLink="PartnerLink_1"/>
    </copy>
    I printed out my endPointRef variable here after assigning the values:
    06/02/22 19:13:03 endPointRef: <EndpointReference xmlns="http://schemas.xmlsoap
    .org/ws/2003/03/addressing"><Address>http://otn.oracle.com/Test.integration.servlet.WMServlet</Address><ReferenceProperties/><PortType/>
    <ServiceName>ns2:Service1</ServiceName></EndpointReference>
    Here is the error:
    06/02/22 19:13:03 java.lang.NullPointerException
    06/02/22 19:13:03 at com.collaxa.cube.engine.types.bpel.CXPartnerLink.copy
    (CXPartnerLink.java:247)
    I tried to explicitly set the PortType as well, but I got the same error.
    thanks,nhi

    Try with a 'Dynamic publish to service' action with:
    <ctx:route isProxy="false">
    <ctx:service>{ $yourBusinessService }</ctx:service>
    </ctx:route>
    where $yourBusinessService is the variable hosting the uri of your business service.
    Regards
    ferp

  • Struts Actions and events in one jsp?!

    Hello,
    I have a problem with Struts actions and events in a jsp.
    It is a search page and when the user clicks the search button I trigger an event and when the user clicks on a link in the result table (same page) I use an action that opens a new detail jsp. The first search query works well, I get a result, open the detail page, go back (using an action).
    Then I start a new search, but struts tries to open the detail page. While debugging I found out, that struts apparantly has no action or event. Why does it work at first time?
    Any ideas?
    Thanks in advance
    Britta

    Thanks for answer,
    I work with actions AND events. I think that`s the problem. When I go back from detail page to search page I use a custom DataForwardAction class with the following method:
    public void onCancel(DataActionContext ctx)
    DCBindingContainer bc = ctx.getBindingContainer();
    HttpServletRequest request = ctx.getHttpServletRequest();
    WebUtils.setSession(request);
    String ziel = request.getParameter("ziel");
    JUCtrlActionBinding action = (JUCtrlActionBinding) bc.findCtrlBinding("Rollback");
    action.doIt();
    try
    ctx.setActionForward(ziel);
    catch (Exception e)
    ctx.setActionForward("liste_freig");
    Ziel has the correct value ("search") and I think the struts config is also correct:
    <action path="/material" type="view.actions.materialAction" className="oracle.adf.controller.struts.actions.DataActionMapping" parameter="/material.jsp" name="DataForm">
    <set-property property="modelReference" value="generalUIModel"/>
    <forward name="liste_freig" path="/liste_freig.do"/>
    <forward name="liste_angelegt" path="/liste_angelegt.do"/>
    <forward name="list_bewertet" path="/list_bewertet.do"/>
    <forward name="liste_abgelehnt" path="/liste_abgelehnt.do"/>
    <forward name="liste_onhold" path="/liste_onhold.do"/>
    <forward name="search" path="/search.do?action=search"/>
    </action>
    But when I get back from material page to search page (the first time it works). The location pathname is material.do not search.do When start a new search the material page opens, not, as desired, the search page with new results.
    Search Action:
    public class searchAction extends DataForwardAction
    public searchAction()
    protected void prepareModel(DataActionContext ctx) throws Exception
    HttpServletRequest request = ctx.getHttpServletRequest();
    DataActionMapping acmap = ctx.getActionMapping();
    DCBindingContainer bc = ctx.getBindingContainer();
    WebUtils.setSession(request);
    JUCtrlActionBinding action = (JUCtrlActionBinding) bc.findCtrlBinding("delSearchQuery");
    action.doIt();
    String sEvent=null;
    try
    sEvent=request.getParameter("event");
    catch (Exception e)
    sEvent=null;
    if (sEvent==null)
    if (request.getParameter("action") != null)
    if (request.getParameter("action").equals("material"))
    Number mat_no=new Number(request.getParameter("MaterialNumber"));
    Number userId=new Number(WebUtils.getUserId(request));
    bc = ctx.getBindingContainer();
    action = (JUCtrlActionBinding) bc.findCtrlBinding("prepareMaterial");
    ArrayList arrayList= new ArrayList();
    arrayList.add(0,mat_no);
    arrayList.add(1,userId);
    action.setParams(arrayList);
    action.doIt();
    ctx.setActionForward("material");
    if (request.getParameter("action").equals("material_datasheet"))
    ctx.setActionForward("material_datasheet");
    super.prepareModel(ctx);
    public void onSearch(DataActionContext ctx)
    DCBindingContainer bc = ctx.getBindingContainer();
    HttpServletRequest request = ctx.getHttpServletRequest();
    WebUtils.setSession(request);
    ctx.setActionForward("search");
    Struts config:
    <action path="/search" className="oracle.adf.controller.struts.actions.DataActionMapping" type="view.actions.searchAction" name="DataForm" parameter="/search.jsp">
    <set-property property="modelReference" value="searchUIModel"/>
    <forward name="search" path="/search.do?action=search"/>
    <forward name="material" path="/material.do?action=material"/>
    <forward name="material_datasheet" path="/material_datasheet.do?action=material_datasheet"/>
    </action>
    I think it`s a Struts bug. Or is there something I don`t see?

  • Dynamically setting where clause parameter before the page load

    Hi Experts,
    I do have the following requirement.
    I am working on jsf page in ADF10.1.3.3. I have a View Object which displays the results on the screen. Can someone provide me some example where I can dynamically set the where clause parameter to my Query in VO before the Page Load happens(By Overriding the Prepare Model) and display results on screen.
    Thanks

    Hi,
    Thanks for yor advice.
    I need to write the method in Prepare Model method when the page loads and not in AM.
    Here in the page there is no action as such.
    On the Page load we need to directly set the Where Clause on the VO.
    Provide me some examples if any.
    Thanks

  • Warning: Action and Event are not compatible for LinktoAction type

    Hi,
       I get a warning message "Action and event are not compatible" for the action associated with the type LinkToAction. The Action method "ShowDetails" has the parameters wdEvent (default) and IWDNodeElement.
       Can anybody please suggest what causes this warning?
    Regards
    Sagar

    Sagar,
    Unfortunately, it is impossible to remove this warning completely. However, you may safely ignore it.
    What you can do is copy text of warning (or part of text), then click "Filter" icon on Tasks view in IDE and set filter to hide these warnings. I do this for annoying "UI element has no lable text"
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Dynamically set "mailto:" upon submit

    Hi there,
    How can I dynamically set the "mailto:" part of the submit form (and attach PDF)
    From here:
    https://forums.adobe.com/message/7025028#7025028
    To add an action to button to send the form as an email, you can perform the following steps:
    Add the "Submit a form" action to your Submit button.
    Enter "mailto:" (including a colon) followed by email recipient(s).
    Select "PDF The complete document".
    Thanks

    Thanks MobileDevCK for the fast response,
    I regards to the user entering the email, thanks but i think you missed the /s
    I am designing this in Acrobat Pro, I'm not sure how i'd be referencing code if i wasn't.
    I've read the API, and it says:
    submitForm
    (cURL
    cSubmitAs='FDF']
    [cCharset='utf-8']
    Submits the form to a specified URL. Currently only supports FormsCentral submissions.
    but then FormsCentral will be retired on July 28, 2015. The service is fully functioning and available through June 22, 2015. Learn more.
    I'm trying to get support on:
    AcroForms
    Most Acroform elements and their properties are supported, although email is currently the only supported submit type and barcodes are not supported.
    I want to dynamically set (with code based on fields filled in) the email in acroforms
    Thanks for you help.

  • Dynamic setting of the dimension values.

    Summary:
    How can I programmatically control the dimension values displayed in ‘Selected’ window of ‘Edit worksheet’ wizard. of Oracle BI Discoverer plus for OLAP 10.12.48
    My objective is to dynamically set the dimension values for a particular dimension based on some criteria.
    Requirement:
    1.The user should be able to select one of the pre-defined options.
    2.Based on the option selected by the user, the necessary business logics need to be applied and then resets the dimension values. The ‘Selected’ window of ‘Edit Worksheet’ should be refreshed.
    3.Based on the option the short description & long description should be changed
    Existing Application Implementation:
    We already implemented this logic in oracle express 6.3.4 as follows.
    1.Radio buttons are provided to select the display option
    2.Whenever the option is changed, a program is executed in the Express objects. This program evaluates the option, applies the necessary business logics and displays the dimension values based on the option chosen. View is then refreshed to reflect the new dimension values. Note that this process does not affect the total “available dimension” values. The total number of “available dimension” values remains the same. It just manipulates the values in the ‘Selection’ object.
    3.The formula of the short description and long description is modified. This formula checks the option and based on it changes the description
    Issues I faced to Implement this logic in Oracle BI Discoverer plus for OLAP 10.1.2.48
    1. No provision to add radio buttons, hence were trying to implement the functionality with a dimension.
    2. No options available for applying business rule and setting the desired dimension values.
    3. No ‘event’ available to refresh the views
    How can I achieve this in Oracle 10g discoverer plus for olap 10.1.2.48
    Thanks,
    Natarajan

    I think this is not possible.
    When you give this settings while creating the SMARTForm, SMARTForm will generate a FM based on that settings. And it is not possible to change those settings at runtime.
    We have some constriants like this for dynamic paradigm in SMARTForm. Like, we can provide shading or Box color for the cell.
    Regards,
    Naimesh Patel

  • Dynamically setting column width doesn't work all the time

    I wanted to dynamically set the width of a column in a JTable to be half of the width of a another column. This should happen whenever the frame is resized. But somehow I need to tell this twice to Java. If I don't then sometimes the column width isn't set new.
    Is this a Java bug or what?
    public void componentResized(ComponentEvent ce)
         try
              ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
              ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
              // Again, or it won't work:
              ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
              ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
         catch(SQLException e)
    }

    Is it possible that your call to
    ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
    is altering the response created by
    ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
    ? Have you tried calling them once but in the other order? Or just calling the "setMaxWidth" call twice and leaving out the second "setMinWidth"?
    Good luck... :)

  • Dynamically set Tab current pages

    Here’s a quick summary of the situation I’ve got.
    Let’s say I have an application with 4 report pages. Three display some data about rows in my database. All 3 contain the column ‘Control #’ which is linked to the 4th report which displays more detailed information about that Control # object.
    When I click on the Control # link and go to the 4th report, I would like the Tabs current for the 4th report to match the Tabs current of the page I came from. In other words, if I clicked on the Control # link on page 1, I would like the 4th pages current tabs to match page 1’s current tabs. The same goes for pages 2 and 3.
    I’ve tried &(some global variable). and :(some global variable) and v(‘some global variable’) in the Tabs current pages fields but that doesn’t work.
    Is it possible to do what I’m trying to do?

    Reports 1, 2 & 3 all exist in individual two tab pages. Pages 1 & 2 would have the same parent tab and their own sub tab. Page 3 would have its own parent tab. When in those pages the appropriate tabs are 'current'. When I click on Control # on any page and go to page 4, I would like the source pages tabs to stay 'current' when displaying page 4.
    By the way, my actual application has in the neighborhood of a dozen pages which are like reports 1,2,& 3 as I described above. Rather than build a dozen identical (with the exception of current tabs) page 4's, I would rather build one page 4 and dynamically set page 4's current tab to the source page's current tab.
    It's a visual reminder to the user as to which page they were on when they clicked the Control # field.
    I also have 8 - 10 SVG charts which I have linked to reports. About 6 of them display the same report using different parameters. Again, I would like THAT report to have the same current tab as the source chart (chart clicked on to invoke the report).

  • Dynamically Set Subreport Background Color to the Same Value as Main Report Background Color

    I have a report that contains a subreport.  The main report has groupings in it.  I am dynamically setting the background color of the group rows based on an expression.  That part is working fine.  The problem that I am having is that
    I don't know how to get the subreport to "inherit" the background color of the grouping that holds it.
    Basically, I have different row shadings on my report differentiating the groupings except for the rows where the subreport shows.
    How do I go about setting the subreport background color to equal it's contaiing grouping's background color?  Thanks in advance for any and all assistance provided.

    The parameter method given by gpshukla will send the info to the subreport, but you don't need the color parameter in the main report, only the subreport. The trick is in setting the value of that parameter.
    Right-click the cell with the embedded subreport, you can select subreport properties.
    Select Parameters and add a parameter.
    The name column is the name of the parameter in the subreport (color) and value is the value to set it to.
    Set name to "color" (no quotes).
    Set Value to the same expression used to set the background color for the row.
    In the subreport, click the design surface to select the report (not header or footer).
    In the properties pane, select background color and choose expression from the dropdown.
    Type =Parameters!color.Value into the expression builder.
    This will work assuming that background color in the main report row will not change without also refreshing the subreport.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

Maybe you are looking for

  • My ipod classic will not sync to my new laptop with windows 8. Any suggestions please?

    I have an iPod classic U2 Limited Edition. After hours of sorting and searching for lost tunes I finally managed to re-create my music library on my new laptop which runs on Windows 8. However, when I connected my iPod, although it starts the sync pr

  • Can't print from my deskjet 3050

    hi, I bought the deskjet 3050 printer and recieved it yesterday. I have not yet been able to print any documents from my laptop. I have correctly installed the ink cartridges and the printer is able to print items selected from the printer screen men

  • Can't print from Imac G5 to a HP Officejet 6000.

    I recently bought an HP office jet 6000, and everytime I try to print anything it gives me an error message that says "Action could not be completed Client Error not possible". I have called HP support and after many hours of troubleshooting (uninsta

  • What are the materials used to make a macbook pro?

    What are the material used to make a macbook pro?

  • How to check the element  in xml file by xpath

    hi all, * How to check the element in xml file by xpath for the following XML file, * I want to check whether the element (sage) is present or not in the following xml file XPATH expression... * I have tried by the following expression , NodeList res