You need to sign in to do that
Don't have an account?
Apex Dynamic Component reRender issue
Hello,
I have a Visualforce Component that just contains a button, and performs an Apex Controller action, and reRenders a part of the Component.
VF Component:
<apex:form id="formId">
String reRendered oncomplete: {!reRenderedTextValue}
<apex:commandButton value="ClickButton" action="{!someAction}" reRender="formId" />
</apex:form>
This Component works absolute fine when I include it in a VF page in a static way like: <c:MyComponent />
The value of the text in the reRendered postion is refreshed.
But when I include the component using an apex:dynamicComponent like this:
Controller:
public Component.Apex.OutputPanel getDynamicPanel()
{
Component.Apex.OutputPanel op = new Component.Apex.OutputPanel ();
Component.Apex.PageBlock pBlock = new Component.Apex.PageBlock();
pBlock.childComponents.add(new Component.MyComponent());
op.childComponents.add(pb);
return op;
}
In the VF Page:
<apex:dynamicComponent componentValue="{!DynamicPanel}"/>
In this VF Page, when I click the Button, the 'reRender' in the MyComponent does not work at all.
Could any1 help me here?
Thanks,
Suri
For a start you should compare the source of the rendered vf pages doing it both ways. This would give you a good idea of what component isn't being rendered correctly.
Hi,
Yes I have already done that. I've compated the sources on both VF pages, and the forms and IDs are rendered exactly the same.
I however circumvented the solution by using a standard HTML button with Javascript Remoting.