• Durga Adusumilli
  • 4 Points
  • Member since 2014

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1

I have an command button whose action method calls a method in my controller, the method is invoked and returns back to the commandbutton in which I have a 'onComplete=window.close();' which closes the window but the method invoked in my controller does absolutely nothing.  


I tried putting in broken code in that method and also tried everything I could to recieve an error message or atleast SOMETHING back from that method but I get nothing.


Any help would be greatly appreciated.





<apex:page standardController="Speaker_Bureau_Membership_gne__c" showheader="false" sidebar="false"
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:form >
<!-- <apex:commandButton action="{!nominate}" value="Nominate Speakers"/>
<apex:commandButton action="{!cancel}" value="Cancel" onClick="window.top.close();"/>
<apex:actionFunction name="Nominate" action="{!nominate}" id="out"
status="myStatus" onComplete="window.close();"/>
<apex:commandButton id="nominate" value="Nominate Speakers" action="{!nominate}" onComplete="alert('complete'); window.close();" />

<apex:commandButton value="Cancel" onClick="window.close();"/>

<apex:Repeat value="{!members}" var="m">
<apex:pageBlock >
<apex:form >
<apex:facet name="header"><b>{!m.name}</b></apex:facet>
<apex:pageBlockSection title="{!m.name}" collapsible="false" columns="3">
<apex:outputField value="{!m.Bureau_Member_gne__c}" />

<apex:pageBlockSectionItem >
<apex:outputLabel value="Spaker Bureau" for="speaker_bureau"/>
<apex:selectList value="{!selected_option}" multiselect="false" size="1" id="speaker_bureau">
<apex:selectOptions value="{!Bureaus}"/>

<apex:inputField value="{!m.Speaker_Scope_gne__c}" />

apex controller method:

somes lines have been depricated that i just threw in while testing so there ignore them.


public void nominate(){ List<Speaker_Bureau_Membership_gne__c> nominations = new List<Speaker_Bureau_Membership_gne__c>(); for(Speaker_Bureau_Membership_gne__c membership : this.members){ nominations.add(new Speaker_bureau_membership_gne__c( User__c = Membership.User__c, Speaker_Status_gne__c = 'Nominated', Speaker_Scope_gne__c = membership.Speaker_Scope_gne__c, Speaker_Bureau_ID_gne__c = membership.Speaker_Bureau_ID_gne__c, Nomination_Date_gne__c = System.now(), Nominated_By_gne__c = UserInfo.getUserID(), Bureau_Member_gne__c = membership.Bureau_Member_gne__c )); } //try{ insert(nominations); //}catch(DmlException e){ //System.debug(e.getMessage()); //} //return (new ApexPages.StandardController(Speaker_Bureau_Membership_gne__c)).view(); }





Message Edited by astro on 05-07-2009 01:06 PM
  • May 07, 2009
  • Like
  • 0