-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
2Questions
-
1Replies
Parameter not being passed to Apex properly
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
-
- Dean Abraham.ax925
- April 06, 2011
- Like
- 0
- Continue reading or reply
Task Tag support for APEX Classes
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?
-
- Dean Abraham.ax925
- February 09, 2011
- Like
- 1
- Continue reading or reply
Task Tag support for APEX Classes
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?
-
- Dean Abraham.ax925
- February 09, 2011
- Like
- 1
- Continue reading or reply
Parameter not being passed to Apex properly
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
- Dean Abraham.ax925
- April 06, 2011
- Like
- 0
- Continue reading or reply