You need to sign in to do that
Don't have an account?
rerender component with action support
Hello,
i have a little problem.
I want to use actionsupport to rerender sth.
I tried to build this http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionSupport.htm
in my script, but it didn't work for me, and i think i know why.
It looks like this:
<apex:outputpanel id="region">
<apex:actionSupport event="onclick" action="{!ListPlusOne}" rerender="Region">
<apex:outputText value="Click: {!Listsize}"/>
</apex:actionsupport>
</apex:outputpanel
Actually it should refresh {!Listsize} too, when I click on the text, but it doesn't. I think it doesn't refresh it, because i get {!Listsize} out of the controller. I do a Soql, save the listsize in that variable and show it on the VF page.
The function ListPlusOne adds a record to ListSize. Maybe first the controller gets the Listsize and then it shows the old value und after that it adds a record to the list.
I hope you understand my problem, I want that when I click on the text, It increments by one and shows the new listsize.
there is no commandButton or commandLink?
the onClick event is for which component?
In salesforce's example is no command-component too...
the onclick event occurs when i click on the outputtext, i think because it is in the actionsupport tag.
or do you think i should better use a command-component?
well I have always used a component for re-rendering. I don't think it re-renders or even calls the controller by just clicking on output text.
I tried it now with an commandButton too...it adds the record, and i see it when i refresh the page, but i does not rerender immedietly...do you have a solution?