PPR event hides button click :(

Hi,
I have a problem with the PPR event.
I have a PPR on a field. If I change this field without tabbing out from it, and I press a button, the code in the button is not performed. I read the OAF DEV Guide, and I put in the processRequest the code:
<< OAWebBean body = pageContext.getRootWebBean();
if (body instanceof OABodyBean)
body.setAttributeValue(OAWebBeanConstants.FIRST_CLICK_PASSED_ATTR, Boolean.TRUE);
>>
but it does not work.
Could you kindly help me?
Thanks a lot,
Rosanna.

Sorry for the delay Rosanna.
How are you capturing the event's such as when save button is pressed/ppr action fired. I assume you differentiate the save button's event by setting an attribute name something similar to "saveEvent" and the field's ppr event attribute as "varianceEvent" or something. Then on the controller code you could do pageContext.getParameter("event") and compare it with saveEvent and varianceEvent to differentiate what hte user has clicked on.
You can also club the processing that you do for PPR enabled fields with the save part of the code. Then remove the PPR on the fields. You will have the fireaction/firepartialaction only on the save button in the page. Could you check if this approach works for you.
Thank you,
Arun

Similar Messages

  • Eventing - No Button Click

    My EPCM eventing code does not work completely.  I have been able to get an event handler to populate an SAP InputField but I cannot get the event handler to execute a click() on a SAP Button in the same iView.  I'm using the following code:
    EPCM.subscribeEvent("urn:PPM.SAPIntegration.Events", "GetSapEquipment", GetSapEquipment);
    function GetSapEquipment(eventObj)
         var equipDesc = eventObj.dataObject;
         <%= Form.ID + "." + txtDescription.ClientID %>.value = equipDesc;
         <%= Form.ID + "." + btnGetEquipment.ClientID %>.click();
    The button works if it is pressed manually.  It calls my .NET function btnGetEquipment_Action.  I see examples of this type of event handlers so I am confused why my code does not work.

    I also ran the PDK example that uses a search field and button to make a google.com
    search. That example works.  In my case, I'm trying to execute my button code that resides
    in my portal component on the server.  Therefore my button has the runat=server
    option.  When the SAP button is pressed, the portal component should be called so
    that this c# procedure gets executed:
    private void btnGetEquipment_Action(object sender, SAP.Web.UI.Controls.AbstractButton.ActionEventArgs e)
    Again I say that if I press the button manually, it works.

  • Need script to handle event on button.

    Hi All,
             I need to handle some event on Button click.
    My requirement is quite simple. There is a DropDown List in PDF and a button.
    Depending the value selected by the user in DropDownList i want to display relevent blocks(Subforms) in PDF on Button Click. All the Blocks are made hidden initially.
    i.e User will select a value from Drop Down and click on 'Display' Button then
    I want to make Any peticular Subform Visible.
    I am unable to write scripting for it. Can anybody please help.
    Thanks and Regards,
    Atul.

    Hi,
    your adobe form must be dynamic for this functionality.
    Do you have Acrobat Reader 7.0 or later?
    Does it work in PDF Preview? If not, go to menu Edit -> Form Properties in LiveCycle Designer, tab Defaults. Preview Type must be Interactive Form, XDP Preview Format must be Acrobat 7.x Dynamic PDF.
    Does it work in PDF Preview now? If not your script is wrong.
    If you use Java WebDynpro, you must insert following code in wdDoModifyView:
      if(firstTime) {
        IWDInteractiveForm iForm = (IWDInteractiveForm)view.getElement("YOUR FORM");
        iForm.setDynamicPDF(true);
    If you use ABAP and you create pdf by function module, you must set dynamic = 'X' in structere for exporting parameter /1BCDWB/DOCPARAMS .
    Michal

  • HIde button on events

    Hi,
    Can some body elaborate how to hide buttons on events.
    Regards
    Sameer

    Hi,
    You can use PPR.
    Step 1. create a VO which contains one transient attribute of type boolean
    Step 2. Base button rendered property using SPEL
    Step 3. Initialize your VO for PPR(inintialization includes insertion of one row and set the attribute as True)
    Step 4. In the event handler where you want to hide button just set it false.
    Sample code:
    //Code to hide button
    public void handlePoApproveChangeEvent()
    // Get the special, single-row application properties and make the first
    // (only) row current.
    OAViewObject vo = (OAViewObject)findViewObject("SampleBrowserPVO1");
    OARow row = (OARow)vo.first();
    // Get the value of the view object attribute with the PO Approval
    // status.
    OAViewObject poVO = (OAViewObject)findViewObject("PurchaseOrderHeadersVO1");
    OARow poRow = (OARow)poVO.getCurrentRow();
    String status = (String)poRow.getAttribute("StatusCode");
    // Set the application property values based on the PO Approval
    // status value.
    if ("APPROVED".equals(status))
    row.setAttribute("HideButton", Boolean.FLASE);
    //Code to initialize VO
    public void initializePPRExamplePage()
    // Create purchase order header
    OAViewObject appPropsVO =
    (OAViewObject)findViewObject("SampleBrowserPVO1");
    if (appPropsVO != null)
    // If the VO already has a row, skip its initialization. Note that
    // calling getFetchedRowCount() won't perform a DB hit on a VO with
    // no SELECT and only transient attributes.
    if (appPropsVO.getFetchedRowCount() == 0)
    // Setting the match fetch size to 0 for an in-memory VO
    // prevents it from trying to query rows.
    // Calling executeQuery() is a small workaround to a known
    // BC4J issue that ensures that modified rows in this
    // transient view object are not lost after commit. See
    // View Objects in Detail for additional information about
    // both of these calls.
    appPropsVO.setMaxFetchSize(0);
    appPropsVO.executeQuery();
    // You must create and insert a row in the VO before you can start
    // setting properties.
    Row row = appProposVO.createRow();
    appPropsVO.insertRow(row);
    // Set the primary key value for this single-row VO.
    row = (OARow)appPropsVO.first();
    row.setAttribute("RowKey", new Number(1));
    row.setAttribute("HideButton",Boolean.TRUE);
    // Initialize the application properties VO (and the UI) based on the
    // default PO approval value set on the underlying object.
    handlePoApproveChangeEvent();
    else
    // throw exception
    } // end initializePPRExamplePage()
    SPEL Parameter:
    ${oa.myVOName.HideButton}
    Hope this help, Please refer JDeveloper guide for Topic Dynamic User Interface.
    Regards,
    Reetesh Sharma

  • I'm not able to get to the OnInputProcessing event from a button click

    I have a tableview and I added a button and I have put the code in the event OnInputProcessing. But when I click the button, it does not get to the event. Do you know what the problem might be?
    Please help
    Here's the complete code:
    ==============================
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%@extension name = "bsp" prefix="bsp" %>
    <% if mrept = 'X'.%>
    <htmlb:content design="classicdesign2002design2003" >
      <htmlb:page title = "Manager's Report ">
      <htmlb:form>
          <%-- TableView with columns description table --%>
          <htmlb:tableView id              = "tvX"
                           headerText      = "Manager's Report"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "30"
                           fillUpEmptyRows = "true"
                           onHeaderClick   = "MyEventHeaderClick"
                           onRowSelection  = "MyEventRowSelection"
                           keyColumn       = "contract"
                           table           = "<%= ZVMGR_MREPT %>"
                           iterator        = "<%= tv_iterator %>" >
          <htmlb:tableViewColumns>
              <htmlb:tableViewColumn    columnName       = "manager"
                                        wrapping         = "true"
                                        title            = "Manager" />
              <htmlb:tableViewColumn    columnName       = "sales_rep"
                                        wrapping         = "true"
                                        title            = "Sales Rep" />
              <htmlb:tableViewColumn    columnName       = "kunnr"
                                        wrapping         = "true"
                                        title            = "Sold To" />
              <htmlb:tableViewColumn    columnName       = "zzmassn"
                                        wrapping         = "true"
                                        title            = "Action" />
              <htmlb:tableViewColumn    columnName       = "action_date"
                                        wrapping         = "true"
                                        title            = "Compliance Review Date" />
              <htmlb:tableViewColumn    columnName       = "vtext"
                                        wrapping         = "true"
                                        title            = "Prod Line" />
              <htmlb:tableViewColumn    columnName       = "name1"
                                        wrapping         = "true"
                                        title            = "Name" />
              <htmlb:tableViewColumn    columnName       = "ort01"
                                        wrapping         = "true"
                                        title            = "City" />
              <htmlb:tableViewColumn    columnName       = "regio"
                                        wrapping         = "true"
                                        title            = "State" />
              <htmlb:tableViewColumn    columnName       = "period"
                                        wrapping         = "true"
                                        title            = "Compliance Review Period" />
              <htmlb:tableViewColumn    columnName       = "c_or_nc"
                                        wrapping         = "true"
                                        title            = "Status" />
              <htmlb:tableViewColumn    columnName       = "shortfall"
                                        wrapping         = "true"
                                        title            = "Shortfall Total" />
              <htmlb:tableViewColumn    columnName       = "close_date"
                                        wrapping         = "true"
                                        title            = "Action Date" />
              <htmlb:tableViewColumn    columnName       = "rewrt"
                                        wrapping         = "true"
                                        title            = "Action $" />
              <htmlb:tableViewColumn    columnName       = "zrvtid"
                                        wrapping         = "true"
                                        title            = "Contract" />
             </htmlb:tableViewColumns>
             </htmlb:tableView>
               <htmlb:button id = "btnxl" design = "emphasized" text = "Excel"
                onClientClick = "OnInputProcessing()" tooltip = "Download to Excel" />
           <p>
        <input type=submit name="onInputProcessing(Submit)"  value="Excel">
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <%else.%>
    <htmlb:content design="classicdesign2002design2003" >
      <htmlb:page title = "Sales Rep's Report ">
        <htmlb:form>
          <%-- TableView with columns description table --%>
          <htmlb:tableView id              = "tvX"
                           headerText      = "Sales Rep's Report"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "30"
                           fillUpEmptyRows = "true"
                           onHeaderClick   = "MyEventHeaderClick"
                           onRowSelection  = "MyEventRowSelection"
                           keyColumn       = "contract"
                           table           = "<%= ZVMGR_SREPT %>"
                           iterator        = "<%= tv_iterator %>" >
          <htmlb:tableViewColumns>
              <htmlb:tableViewColumn    columnName       = "sales_rep"
                                        wrapping         = "true"
                                        title            = "Sales Rep" />
              <htmlb:tableViewColumn    columnName       = "kunnr"
                                        wrapping         = "true"
                                        title            = "Sold To" />
              <htmlb:tableViewColumn    columnName       = "zzmassn"
                                        wrapping         = "true"
                                        title            = "Action" />
              <htmlb:tableViewColumn    columnName       = "action_date"
                                        wrapping         = "true"
                                        title            = "Compliance Review Date" />
              <htmlb:tableViewColumn    columnName       = "vtext"
                                        wrapping         = "true"
                                        title            = "Prod Line" />
              <htmlb:tableViewColumn    columnName       = "name1"
                                        wrapping         = "true"
                                        title            = "Name" />
              <htmlb:tableViewColumn    columnName       = "ort01"
                                        wrapping         = "true"
                                        title            = "City" />
              <htmlb:tableViewColumn    columnName       = "regio"
                                        wrapping         = "true"
                                        title            = "State" />
              <htmlb:tableViewColumn    columnName       = "period"
                                        wrapping         = "true"
                                        title            = "Compliance Review Period" />
              <htmlb:tableViewColumn    columnName       = "c_or_nc"
                                        wrapping         = "true"
                                        title            = "Status" />
              <htmlb:tableViewColumn    columnName       = "shortfall"
                                        wrapping         = "true"
                                        title            = "Shortfall Total" />
              <htmlb:tableViewColumn    columnName       = "close_date"
                                        wrapping         = "true"
                                        title            = "Action Date" />
              <htmlb:tableViewColumn    columnName       = "rewrt"
                                        wrapping         = "true"
                                        title            = "Action $" />
              <htmlb:tableViewColumn    columnName       = "zrvtid"
                                        wrapping         = "true"
                                        title            = "Contract" />
             </htmlb:tableViewColumns>
             </htmlb:tableView>
               <htmlb:button id = "btnxl" design = "emphasized" text = "Excel"
                onClientClick = "OnInputProcessing()" tooltip = "Download to Excel" />
           <p>
        <input type=submit name="onInputProcessing(Submit)"  value="Excel">
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <%endif.%>

    Hey Samuel,
    You have not defined the name of the event.
    Your button tag should be defined as follows:
    <b><htmlb:button id = "btn_ShowProductStructure"
    text = "Show Product Structure"
    design = "EMPHASIZED"
    onClick = "onInputProcessing(<i>btn_ShowProductStructure</i>)"
    tooltip = "Click here to open Product Structure.."
    /></b>
    In attribute: onClick = "onInputProcessing(btn_ShowProductStructure)" replace <b><i>btn_ShowProductStructure</i></b> by the name of the event that you want to define.
    Then onInputProcessing Page write the following code:
    <b>IF EVENT->NAME = 'button' AND EVENT->EVENT_TYPE ='click'.
       CASE EVENT->ID.
         WHEN <i>'btn_ShowProductStructure'</i>.
    <your logic comes here>
    ENDCASE.</b>
    Regards,
    Reema.
    Pl. give points if this solution addresses your problem.

  • How to call elem. Search help on Button click event in WD appilcation

    Hello All,
    i have requirement to call elem. search help on button click event in WD application. currently i am calling FM  F4IF_START_VALUE_REQUEST but getting the short dump as below,
    The following error text was processed in the system X31 : Screen output without connection to user.
    The error occurred on the application server saps_X31_31 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    SYSTEM-EXIT of program SAPLSDH4
    Function: F4_PRESEL_WITH_TABSTRIP of program SAPLSDH4
    Form: F4PROZ_STEP_PRESEL of program SAPLSDSD
    Function: DD_SHLP_SINGLE_STEP of program SAPLSDSD
    Form: F4PROZ_LOOP of program SAPLSDSD
    Form: F4PROZ of program SAPLSDSD
    Function: F4IF_START_VALUE_REQUEST of program SAPLSDHI
    Method: ONACTIONSEARCH_CUSTOMER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    is there any way to achieve the required behaviour.
    please let me know.
    Regards,
    Chandra

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • How do you fire a button click event on apex page from fancybox iframe that was created by page

    I am trying to fire off the button click event from fancybox iframe. The apex page has a button that launches a fancybox iframe which is loaded with an APEX form. On close of that fancy box, I am trying to fire a click event on the parent page which will refresh a div with html that is created with plsql. The button on the page works as expected when clicked from the page. It will show a debug alert message to prove it was called and then load the div with the correct data. I am unable to fire off this button click from the fancybox iframe when it closes.
    A couple of points:
    I using Plug-in: Execute PL/SQL Code and Return Content ("PLUGIN_MULEDEV.SERVER_REGION_REFRESH") to place the create fancybox statement. It is used to populate a div using plsql.
    The name of the button on the main page is P2020_REFRESH_SECTION_BUILDER_BTN.
    The click dynamic action on the button is calling the plugin to replace the html in the div.
    The data in the form in the fancybox is being saved to the database. On close of the fancybox box I want to refresh the div so the new record is included in the div html.
    Can anyone help. Here is the fancybox code:
      function customProcessOnReadyState4(){
        for (var i=0;i<11;i++){
          $( "#tabs"+i ).tabs();
          $("#createNewExerciseLink"+i).fancybox({
              ''width''         : ''60%'',
              ''height''        : ''70%'',
              ''autoScale''     : true,
              ''transitionIn''  : 200,
              ''transitionOut'' : 200,
              ''type''          : ''iframe'',
              ''onClosed''         : function() {
                                         window.parent.$(''#P2020_REFRESH_SECTION_BUILDER_BTN'').click();
    Here are the dynamic actions assigned to the button:
    5 - Execute JavaScript Code
    alert("Starting refresh");
    10 - Execute PL/SQL Code and Return Content [Plug-in]
    begin
      SCTUI.create_sct_tabs2(:P2020_CREATE_SECTION_LOV, '1');
    end;

    user setActionListener...
    <af:setActionListener from="#{bindings.XXX.inputValue" to="#{backingbean.variable}"
                  <af:inputText value="#{bindings.Email.inputValue}"
                                label="#{bindings.Email.hints.label}"
                                binding="#{backingBeanScope.backing_ShuttlePage.it2}"
                                id="it2">
                    <f:validator binding="#{bindings.Email.validator}"/>
                  </af:inputText>
                  <af:commandButton text="commandButton 2"
                                    binding="#{backingBeanScope.backing_ShuttlePage.cb2}"
                                    id="cb2" action="passing">
                    <af:setActionListener from="#{bindings.Email.inputValue}"
                                          to="#{processScope.detail}"/>
                  </af:commandButton>next jsf page:
                <af:outputText value="#{processScope.detail}"
                               binding="#{backingBeanScope.backing_ProcessScope.ot1}"
                               id="ot1"/>setPropertyListener also should work
    <af:setPropertyListener from="#{bindings.Email.inputValue}" to="#{processScope.detail}" type="action"/>

  • How to generate barcode on button click event in PDF using adobe livecycle?

    I already created form in PDF file which is validate completely .But , I required generate a barcode of all field of form using custom script on button click event.
    Please give me right way for doing it .
    Thanks in Advance,
    Jaydeep Solanki.

    Hi vijay,
    What project are you doing? Is it Asp.Net project? If so, you'll need to post it in the dedicated ASP.Net Forum
    http://forums.asp.net  for more efficient responses, where you can contact ASP.NET experts.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Sharepoint 2010 Custom Visual Webpart button click event firing on page refresh

    I have developed a Visual Webpart to create a list in SP using vs2010 and  the button click event I have written the list create method. If I click the button list is created successfully.  And I refresh the page again list is creating(Again button
    click event is triggering).please help me to solve the issue.
     protected void Button1_Click(object sender,
    EventArgs e)
                SPWeb web
    = SPContext.Current.Web;
                //SPList list=web.Lists["Auto"];
                SPList list
    = web.Lists[DropDownList2.SelectedItem.Text];
                if
    (string.IsNullOrEmpty(TextBox1.Text)
    || string.IsNullOrEmpty(DropDownList1.Text))
    Label4.Text =
    "Fields Are Empty";
                else
    if (DropDownList1.SelectedItem.Text
    == "Single line of Text")
                    list.Fields.Add(TextBox1.Text,
    SPFieldType.Text,
    true);
    SPView viewname = list.Views["All Items"];
                    viewname.ViewFields.Add(TextBox1.Text);
    //viewname.Update();
                    list.Update();
    Label4.Text =
    "Field Created Successfully";
    TextBox1.Text =
    string.Empty;
    // Label4.Text = string.Empty;

    Hi,
    This is because the request is sent to the server when you refresh the page.
    A workaround for this is that we can “provide a refresh link that redirects to the same page (or if you have some action causing the refresh programmatically, you could just
    redirect to the page after that, with Response.Redirect)
    so that page is requested by the browser (with GET method, default with hyperlinks)”.
    More information:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/45648b39-1229-405c-ac9e-60eb82905982/click-event-getting-fired-on-page-refresh
    Or we can use the Session to save a value which used as a flag for us to check whether it is a page refresh and perform accordingly.
    http://www.codeproject.com/Articles/28099/Refresh-Page-Issue-in-ASP-Net
    http://www.codeproject.com/Articles/10240/Detecting-Page-Refresh
    Thanks
    Patrick Liang
    TechNet Community Support

  • Hide/show a form upon button click

    Hi
    I want to show/hide different form upon button clicks. Also I want to clear the data from a form upon button clicks. How can I achecive this? Thanks in advance.

    Hi,
    Create one boolean variable in your datastore. Click of the button should set the value to false and you can bind the same variable to the visibility property so that you can hide and display accordingly. For making the values blank, you can put condition on the detault value formula IF(!<your datastore variable>,"",<value needed>)
    Regards,
    Murtuza

  • Capturing navigation button click event

    Hi,
    Is it possible to capture the navigation button click events on a system form?For example when the goods receipt form is open and i click on navigation button on the tool bar.
    Can help with some sample codes?
    Thanks.
    Satish.

    Hi,
    Here you´ve got an example from the UI API help file.
    Private Sub SBO_Application_MenuEvent(pVal As SAPbouiCOM.IMenuEvent, BubbleEvent As Boolean)
        If pVal.MenuUID = "1288" Or _
            pVal.MenuUID = "1289" Or _
            pVal.MenuUID = "1290" Or _
            pVal.MenuUID = "1291" Then
          If pVal.BeforeAction = False Then
              Select Case pVal.MenuUID
                '// Under the If clause, check each item if it was clicked
                Case "1288"
                    oRecordSet.MoveNext
                    '// If reached EOF show last
                    If oRecordSet.EOF = True Then
                        oRecordSet.MoveLast
                    End If
                Case ...
                End Select
            End If
        End If
    End Sub
    To know the current form, you can use the ActiveForm property.
    Regards,
    Ibai Peñ

  • Show/hide panels on button click

    Hello,
    I have to show/hides several panels on same palette on some button actions. I am trying to check whether it is possible to add each child panel in different .fr files.
    Just to brief,  On panel I have different icon buttons and on each button I have to show different view in the main panel thus I cannot use tabular dialog. Please help me to find a way to achieve this?
    I tried following code
    I have Created two primary resource panel in TestSample1.fr,TestSample2.fr files respctively.
    My main panel (Palette panel) have two buttons (TestSample1Button,TestSample2Button).
    I want to show/hide these panels on button click in main panel.
    InterfacePtr<IPanelControlData> parentPanelCtrlData(Utils<IPalettePanelUtils>()->QueryPanelByWidgetID(kMainPanelWidgetID) ); // main panel
    if(parentPanelCtrlData)
        InterfacePtr<IControlView>         testSample1PanelPanelView((IControlView*)::CreateObject(::GetDataBase(this),kTestSample1P anelWidgetBoss,IID_ICONTROLVIEW));
        if(testSample1PanelPanelView)
            parentPanelCtrlData->AddWidget(testSample1PanelPanelView);
    I have added above code on TestSample1Button observer.But it is not working.
    is It possible? can anybody help me?

    Yes it is possible.
    I am not sure but following line of code also needed after adding widget .
    testSample1PanelPanelView->ForceRedraw(testSample1PanelPanelView->GetDrawRegion(), kTrue);

  • FileDialog.SAVE: trap the "Save" button click event

    Hello All
    Can anyone help me with FileDialog.SAVE, as to how we could trap the Save button click event? Is it possible to actually trap that particular event, rather than just checking for FileDialog.getFile() == null -> which indicates that "Cancel" button was selected.
    Any help would be highly appreciated
    Regards
    Naushin

    You can not do this, because FileDialog uses native dialog and all
    buttons on it are native (there are no java-components for them).
    Thus checking FileDialof.getFile() for null is only way to figure out
    whether user choose some file or not.

  • HOW TO CALL APPROVAL WORK FLOW ON BUTTON CLICK EVENT OF VISUAL WEB PART?

    Hiall,
    I created an OOB an approval work flow I want to start that approval work flow through visual web  part button click event
    In work flow Settings I selected to manually start .Is this possible ? if possible please guide me how to do this
    Thanking you,
    Arun  kumar

    Hi,
    If you have an instance of SPListItem, and know the workflow association name, you can start it. First you need to find workflow assocation instance and tell SPSite.SPWorkflowManager to start your workflow.
    See this for more information:
    http://blog.mmasood.com/2012/06/programatically-start-workflow.html
    Please remember to up-vote or mark the reply as answer if you find it helpful.

  • Invoke Event Recievers on button click

    Hi all,
    I Have an Event Reciever which updated a column of the list whose name is specified,
    I have an Webpart with ListName(Txt Box) and a Button Control,
    On click of which the Event Reciever that I have created should be invoked on the ListName Given in the Txt Box.
    How can I do this, plz help
    Thanks in advance

    Hi,
    Now If i am correct then you just want to activate an EventReciever on click of button on a Page using Object Model code and you have your Event Reciever already deployed and register in Global Assembly Cache.
    To do this just add this code on the button click event on page.
    using (SPSite site = new SPSite(SPContext.Current.Web.Url))
    using (web = site.OpenWeb())
    SPList list = web.Lists["ListName"];
    if (list != null)
    string className = "YourClassNameSpace.YourClass";
    string asmName = "NameOftheAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken={PublicKeyToken}";
    web.AllowUnsafeUpdates = true;
    //add the added/updated/deleted events to the list.
    list.EventReceivers.Add(SPEventReceiverType.ItemAdded, asmName, className);
    list.EventReceivers.Add(SPEventReceiverType.ItemUpdated, asmName, className);
    list.EventReceivers.Add(SPEventReceiverType.ItemDeleted, asmName, className);
    list.Update();
    Mark as Answer if helped!! To be or Not to Be..The question is this only......

Maybe you are looking for