0

I have added text and hyperlink based on the if condition but it is showing error

The element type "apex:outputpanel" must be terminated by the matching end-tag

</apex:outputpanel> but it is already closed

<apex:OutputPanel rendered="{!showSign}">
    {!IF(signStatus == 'Unsigned',"please click on the link "+ <apex:outputLink value='{!slink}'>click here </apex:outputLink>, "please click on the "+ <apex:outputLink value='{!slink}'>click here </apex:outputLink> +" download file")}
</apex:OutputPanel>
1

That is not the way to generate the visualforce dynamically, the other simpler way I can think of is to write two output links and render it based on your conditions.

Your visualforce page which would work would be

<apex:outputPanel rendered="{!showSign}">
    <apex:outputPanel rendered="{!IF(signStatus == 'Unsigned', true, false)}">
        please click on the link <apex:outputLink value="{!slink}"> click here </apex:outputLink>
    </apex:outputPanel>
    <apex:outputPanel rendered="{!IF(signStatus == 'Unsigned', false, true)}">
        please click on the  <apex:outputLink value="{!slink}"> click here </apex:outputLink> download file
    </apex:outputPanel>
</apex:outputPanel>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.