You need to sign in to do that
Don't have an account?
Sidharth
Component Rerendering
Hello Everyone
I have 2 apex components (google charts), in my Client portal, one showing Active and other Resolved accounts.
I want to show ony one component at a time. Can i rerender the component area, by clicking any button/link.
Thanks
Sid
I got my solution here
http://boards.developerforce.com/t5/Visualforce-Development/Hide-Unhide-a-section-in-a-Page/m-p/311685#M38613
Thanks guys
Sidharth
All Answers
yes you can use redered attribute , just share your code so thayou t I can give exact code.
Hi Shashikant
Thanks for replying back.
Hers the code for component 1. Component 2 is just similar(just extracting different values from the controller).
</apex:component>
Right now i am showing both components in my client portal, but now i have to provide two buttons/link, one for Active accounts, another for Resolved accounts, and only one component based on the button/link. Whichever a person clicks, that graph will rerender.
Thanks
Sid
Create a Property in Page controller
set this to true if account is Active and false if it is resolved
In VFP
you must be using component in page like below , use rendered attribute
let me know if any issues in it.
Hi
Thanks for reply.
heres exactly what i need.
I have two components A and B, which i am showing in my Client portal.
Right now i am showing both, but now i have to show only one.
Can i have two buttons/links naming A and B, so by clicking on any one, that component with open.
Here is Component A code, (B is just similar with different google chart partameters).
<apex:component controller="TestChartController2a">
<div>
<img src="https://fdrclient.com/proxy-1.0/proxyproxiedUrl=http%3A%2F%2Fchart.apis.google.com}"/>
</div>
</apex:component>
Here is Visualforce page where i am caaling the components.
<apex:page showHeader="false" sidebar="false" standardController="Account">
<apex:stylesheet value="{!$Resource.CustomerPortalCSS}"/>
<div>
<table>
<tr>
<td><c:Component_A /></td>
<td><c:Component_B /></td>
</tr>
</table>
</div>
</apex:page>
Actually i have many other division in my customer portal, so i want to rerender only that componet division, based on selected button/link (component A or B)
Please provide a sample code to achieve that, if possible.
Thanks a lot
try this
I have used Status__c as Assuming this your field API name , replace it with yours.
If it does not work please let me know : Active and Resolved for Account are coming from which field can you provide me field type and API Name
The problem , how can i link them to the button/links. So that is the user select button A, the division should show Copmnent A
Here is the actual scenario.
For ex, if client has 25 accounts. Than instead of showing all 25 accounts in 1 component, i want 5 components, each showing 5 accounts(google chart bars).
For that i am assuming to have 5 buttons/links(kind of pagination), where a user can select any set of 5 accounts, and than that component will be displayed.
Sidharth, There's a section in the VF docs entitled, "Implementing Partial Page Updates with Command Links and Buttons." Does that get you what you need? If not, what's missing?
I got my solution here
http://boards.developerforce.com/t5/Visualforce-Development/Hide-Unhide-a-section-in-a-Page/m-p/311685#M38613
Thanks guys
Sidharth