function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Krishnan MishraKrishnan Mishra 

Why am i getting this error? Element type "apex:outputLink" must be followed by either attribute specifications, ">" or "/>".

I have created a visualforce component and would like to use $Action.object name.action name($Action.Contact.Del) within it but i am getting the above error. Following is my controller and component code:
Component code
<apex:component controller ="PaginationForComponent">
    <apex:attribute name= "objectName" description = "The object's name" type = "String" required = "true" assignTo="{!objName}"/>
    <apex:attribute name= "fieldName" description = "Fields to be displayed" type = "String" required ="true" assignTo="{!fieldNames}"/>
<apex:outputLink value="{!URLFOR($Action."{!objName}".Edit,contacts.con.id)}"> 
                        Edit |
                    </apex:outputlink>
                    <apex:outputLink value="{!URLFOR($Action."{!objName}".Delete,contacts.con.id)}"> 
                        Del |
                    </apex:outputlink>

Controller code:
public class PaginationForComponent {
public String objName{get;set;}
	public String fieldNames{get;set;}
}

Ps: Only relevant code is provided here​
Best Answer chosen by Krishnan Mishra
<Saket><Saket>
Hi Krishnan 
try this
 
<apex:component controller ="PaginationForComponent">
    <apex:attribute name= "objectName" description = "The object's name" type = "String" required = "true" assignTo="{!objName}"/>
    <apex:attribute name= "fieldName" description = "Fields to be displayed" type = "String" required ="true" assignTo="{!fieldNames}"/>
<apex:outputLink value="{!URLFOR($Action[objName].Edit,contacts.con.id)}"> 
                        Edit |
                    </apex:outputlink>
                    <apex:outputLink value="{!URLFOR($Action[objName].Delete,contacts.con.id)}"> 
                        Del |
                    </apex:outputlink>
                    </apex:component>

 

All Answers

<Saket><Saket>
Hi Krishnan 
try this
 
<apex:component controller ="PaginationForComponent">
    <apex:attribute name= "objectName" description = "The object's name" type = "String" required = "true" assignTo="{!objName}"/>
    <apex:attribute name= "fieldName" description = "Fields to be displayed" type = "String" required ="true" assignTo="{!fieldNames}"/>
<apex:outputLink value="{!URLFOR($Action[objName].Edit,contacts.con.id)}"> 
                        Edit |
                    </apex:outputlink>
                    <apex:outputLink value="{!URLFOR($Action[objName].Delete,contacts.con.id)}"> 
                        Del |
                    </apex:outputlink>
                    </apex:component>

 
This was selected as the best answer
Krishnan MishraKrishnan Mishra
Thanks Saket!
<Saket><Saket>
Welcome Brother :)