+ Start a Discussion

what happens after an apex action is performed

im having some interface issues where fields things get confused after performing an apex action
i have a form of input text fields that im using from a fieldset and set some classes based on the values
if theres data in the field, make the field disabled so that it cant be edited, but if its blank, dont add a class name

<apex:inputText  styleClass="formInput {!IF( (record[f.fieldPath] == null || record[f.fieldPath] == ''), '', 'disabled')}" value="{!record[f.fieldPath]}" />

this works for the initial load, but if i hit save and perform some validation checks, for some reason all fields become disabled
im looking into resolving this client side because i really want to use this technique of fields sets
but if i cant keep the form from reverting, ill have to ditch this and hand code every form

id consider using jquery to re-check the form once it returns from apex, but im not sure if theres an event or anything i can capture
Hi , 

This should help, 

in the OnAfterUpdate method:

if (firstRun) {
firstRun = false;
else {
System.debug('Already ran!');


Or ,