You need to sign in to do that
Don't have an account?
rickyn
Dynamic Component now showing within apex:composition tag. Help?
I am using Dynamic Visual force and have a werid problem.
My dynamic component does not work within the apex:composition tag, however it works outside the tag.
Is this a known limitation?
<apex:page showheader="false" controller="ProjReqController" action="{!ServiceInfoPageLoad}" standardStylesheets="false" ><!-- cache="True" expires="600" --> <apex:composition template="{!if($Site.LoginEnabled,$Site.Template,$Page.Cervice_Trust_User_Site_Template)}"> <apex:define name="body"> <apex:dynamicComponent componentValue="{!DynamicForm}"/> <!--Does not work here--> </apex:define> </apex:composition> <apex:dynamicComponent componentValue="{!DynamicForm}"/> <!--Works here---> </apex:page>
Extract from http://www.salesforce.com/us/developer/docs/pages/salesforce_pages_developers_guide.pdf
Dynamic Components Restrictions
Not every feature of Visualforce makes sense in a dynamic context, so some components are not available dynamically. This
section describes some limitations of dynamic Visualforce components.
• The following standard Visualforce components don’t have corresponding dynamic representations in Apex:
◊ <apex:attribute>
◊ <apex:component>
◊ <apex:componentBody>
◊ <apex:composition>
◊ <apex:define>
◊ <apex:dynamicComponent>
◊ <apex:include>
◊ <apex:insert>
◊ <apex:variable>
Regards.
That section of the doc definitely refers to not being able to create an apex:composition dynamically.
Superficially, what you have looks like it should be valid. When you say it "does not work" what do you mean? What happens?
Nothing renders on the vf page and the getDynamicForm() Method does not get called (My Debug msg doesnt show in dev console)
When it is outside the composition tag it renders on the vf page and the Debug msg shows in my log.
I suggest you open a support case on this....