You need to sign in to do that
Don't have an account?

Rendered Formula w/ a Parameter
Hey all,
I'm still looking for a way to develop a vf layout that looks at two parent record fields to determine the visibility of fields on this layout.
What I'm stuck on is:
<apex:outputtext value="{!Plan_Process__c.Received_Plan_Document_Fee__c}" rendered="{!showme}"> <apex:param assignTo="{!currentfield}" value="Received_Plan_Document_Fee__c"/> </apex:outputtext>
currentfield is never being set and consequently is null.
What I'd like is for {!showme} to reference the currentfield variable and determine if that field should be displayed:
private String currentfield;
public String getcurrentfield() {
return currentfield; }
public void setcurrentfield(String a) {
currentfield = a;
}
public boolean getshowme(){
if(req_rt.contains(currentfield) && req_st.contains(currentfield){
return true;
}
else{
return false;
}
}
req_rt and req_st are two sets that may contain the fields API name. If they both do, then the field should be displayed and if not, it shouldn't be.
Further background: The two parent fields are recordtypeid and a picklist called "Service Type." The sets will be setup as follows (example is abbreviated):
if(rt=='0126000000055SkAAI'){ req_rt.add('Received_Plan_Document_Fee__c'); req_rt.add('Received_Conversion_Fee__c'); } if(st=='Fully-Bundled - Conversion'){ req_st.add('Received_Conversion_Fee__c'); } if(st=='Participant-level Recordkeeping - Startup'){ req_st.add('Received_Plan_Document_Fee__c'); }
Can anyone help me out?
I tried the same with apex:outputtext and apex:commandlink. And in both the cases the setter method for currentfield was not invoked when the page was loaded.
Afterwards when I clicked on the apex:commandlink' LINK the setter method got executed, and the value of currentfield was set. So i think the apex:param will get assignTo executed when the parent component is executed. And in case of the apex:outputtext, I cant find any viable solution for that.