• Dean Abraham.ax925
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

  I have been struggling to get this working, and hope somebody can help me get back on track.

  This visualforce page has a radiolist selector, which needs to fire off a function in the Apex controller with a parameter.  When the function fires off, debugging shows me that the value being returned is from the previous radio selection, not the current selection.  Seems like the action is firing off before the rerender (and param assignment)?

  I have tried using the "onclick" event, grabbing the value from the querystring rather than the assignTo, and neither worked.

 

  Can anybody offer any suggestions?

 

Visualforce Page:

<apex:outputPanel id="approvalStat" >

  <apex:selectRadio value="{!insurance.Approval_Stage__c}" layout="pageDirection" styleClass="checkwrap">
    <apex:actionSupport event="onchange" rerender="approvalStat, errors, insuranceRejectionArea" action="{!validateOnApproval}">
       <apex:param name="inAS" value="{!insurance.Approval_Stage__c}" assignTo="{!inAS}" />
    </apex:actionSupport>
    <apex:selectOptions value="{!ApprovalStages}" />
  </apex:selectRadio>

</apex:outputPanel>

 

Controller:

 

public String inAS { //Holds the Approval Status from page
        get;
        set{
            inAS = value;
        }
    }

 

public pageReference validateOnApproval()

{

        if(inAS != 'Approved') {
            System.debug('\n\n******************* Action Status:' + inAS + '\n\n');
            return null; //Only act when Approved
        }

}

 

Thanks in advance!

Dean

I'd like to use Eclipse's Task Tags to manage TODO's, FIXME's, etc. inside of Apex Classes.

 

Currently, this functionality works on components, but not on classes.

 

Are there any plans to add support to the IDE for this feature?

 

I'd like to use Eclipse's Task Tags to manage TODO's, FIXME's, etc. inside of Apex Classes.

 

Currently, this functionality works on components, but not on classes.

 

Are there any plans to add support to the IDE for this feature?

 

  I have been struggling to get this working, and hope somebody can help me get back on track.

  This visualforce page has a radiolist selector, which needs to fire off a function in the Apex controller with a parameter.  When the function fires off, debugging shows me that the value being returned is from the previous radio selection, not the current selection.  Seems like the action is firing off before the rerender (and param assignment)?

  I have tried using the "onclick" event, grabbing the value from the querystring rather than the assignTo, and neither worked.

 

  Can anybody offer any suggestions?

 

Visualforce Page:

<apex:outputPanel id="approvalStat" >

  <apex:selectRadio value="{!insurance.Approval_Stage__c}" layout="pageDirection" styleClass="checkwrap">
    <apex:actionSupport event="onchange" rerender="approvalStat, errors, insuranceRejectionArea" action="{!validateOnApproval}">
       <apex:param name="inAS" value="{!insurance.Approval_Stage__c}" assignTo="{!inAS}" />
    </apex:actionSupport>
    <apex:selectOptions value="{!ApprovalStages}" />
  </apex:selectRadio>

</apex:outputPanel>

 

Controller:

 

public String inAS { //Holds the Approval Status from page
        get;
        set{
            inAS = value;
        }
    }

 

public pageReference validateOnApproval()

{

        if(inAS != 'Approved') {
            System.debug('\n\n******************* Action Status:' + inAS + '\n\n');
            return null; //Only act when Approved
        }

}

 

Thanks in advance!

Dean