You need to sign in to do that
Don't have an account?
Conditional component display
I have a component that has two possible display formats, so I created a new sub-component for each. Now I can't figure out how to switch between them. The {!IF()} expression does not seem to get the job done. Here's the fragment:
<apex:component >
<apex:attribute name="fragment" description="This is the fragment for the component"
type="SurveyFragment" required="true"/>
{!IF(fragment.singleton,
<c:SingletonResponseWidget fragment="{!fragment}" />,
<c:TableResponseWidget fragment="{!fragment}" />)}
</apex:component>
Can somebody suggest how to do this?
Jeff
each component can be placed in an outputPanel
The outputPanels can render or not using an expression in the rendered attribute
something like this is what i've used :
<apex:outputPanel rendered="{!requestToken}"> blah... blah </apex:outputPanel> <apex:outputPanel rendered="{!$CurrentPage.parameters.token != null}"> other blah .. blah </apex:outputPanel>
you would use your own conditions in the rendered expressions, not the ones shown here.