You need to sign in to do that
Don't have an account?
Nervosa
Change PageBlockTable's "value" attribute from custom controller
Greetings to everyone!
Strictly speaking - my question is in subject. I have a PageBlockTable on a VF page:
<apex:pageBlockTable value="{!items}" var="i" id="ListOfItems" >
Is it possible to change its "value" attribute to another one by clicking a button:
<apex:commandButton value="Search" action="{!search}" rerender="resultsBlock" status="status"/>
Thanks in advance.
Hello Nervosa,
I am not sure if you can do that with <apex:pageBlockTable>, the formula field that you set as value is getting its values from a Controller. If you want to change something, i would suggest you make it in controller
Yes it is possible via a Label.
<apex:commandbutton value="{!$Label.labelname}" action="{!methodname} />
Change this Label value in apex using this code -
System.Label.Label_name
Thank you.
Please mark this as solution for others to get it easily.
Okay. I did it like this:
and in my controller:
But i get an error:
What do I do wrong?
I've found my mistake - i didn't create label in my Setup->Create->Custom Labels =)
Well, I did it.
But still there is a mistake