You need to sign in to do that
Don't have an account?
King Koo
Expression language inside <apex:actionStatus>
Hi there
Got a bug today and was debugging it to death, but still at no avail. Hope someone can help. This is regarding <apex:actionStatus>.
I made my example really short. So here is the controller:
And here is the VF page that uses the controller
When the page loads, you see the picklist and then the statement that says "selected value is".
Once you pick, say, "c", then the statement becomes "selected value is c", which is expected.
However, when you then press the button, which in the facet/start is supposed to display the same value, it says "the value is ".
Now, if I press it again, then it displays "the value is c".
It seems like the actionStatus is lagging by one step. What must I change in order for the display to say "the value is c" as soon as I press the "Click" button?
Thanks
King
Got a bug today and was debugging it to death, but still at no avail. Hope someone can help. This is regarding <apex:actionStatus>.
I made my example really short. So here is the controller:
public class ActionStatusController { public String testVariable {get; set;} public pagereference donothing() { return null; } }
And here is the VF page that uses the controller
<apex:page controller="ActionStatusController"> <apex:pageBlock id="pb"> <apex:form > <apex:selectList value="{!testVariable }" size="1"> <apex:selectOption itemValue="" itemLabel="" /> <apex:selectOption itemValue="a" itemLabel="a" /> <apex:selectOption itemValue="b" itemLabel="b" /> <apex:selectOption itemValue="c" itemLabel="c" /> <apex:actionSupport event="onchange" reRender="testVariableDiv"/> </apex:selectList> <apex:commandButton action="{!doNothing}" value="Click" status="showStatus" rerender="pb"/> </apex:form> <apex:outputPanel id="testVariableDiv"> <apex:outputText value="selected value is {!testVariable }" /> </apex:outputPanel><br/> <apex:actionStatus id="showStatus"> <apex:facet name="start"> the value is "{!testVariable }" </apex:facet> </apex:actionStatus> </apex:pageBlock> </apex:page>
When the page loads, you see the picklist and then the statement that says "selected value is".
Once you pick, say, "c", then the statement becomes "selected value is c", which is expected.
However, when you then press the button, which in the facet/start is supposed to display the same value, it says "the value is ".
Now, if I press it again, then it displays "the value is c".
It seems like the actionStatus is lagging by one step. What must I change in order for the display to say "the value is c" as soon as I press the "Click" button?
Thanks
King
Thanks
King
Please try below code
Please mark this as best solution is this will help you.
Thanks
Amit Chaudhary
amit.salesforce21@gmail.com