You need to sign in to do that
Don't have an account?
Eric Anderson 54
Commandlink not appearing
For some reason, I can not get my 'Delete' 'Commandlink' to appear even though it is coded. Please take a look at the screen shot that is attached. As you can see, I have the 'CommandLink' is coded, but no command link is showing up on the list.
Here is the code:
<apex:page standardController="Request__c" extensions="TrController">
<!--Because we will be defining 'Input' fields, we must wrap our code in a 'Form' block. -->
<apex:form >
<apex:pageBlock title="CDCR - Salesforce Time Reporting for Requests">
<apex:pageBlockButtons >
<apex:commandButton value="Insert" action="{!add}"/>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!TimeEntries}" var="entry">
<apex:commandLink action="{!del}" value="Delete" id="theCommandLink"/>
<apex:column width="70" headerValue="Activity">
<apex:inputField value="{!entry.Activity__c}"/>
</apex:column>
<apex:column width="30" headerValue="Date Worked">
<apex:inputField value="{!entry.Date_Worked__c}"/>
</apex:column>
<apex:column width="20" headerValue="Hours">
<apex:inputField value="{!entry.Hours_Worked__c}"/>
</apex:column>
<apex:column width="20" headerValue="Worked">
<apex:inputField value="{!entry.Minutes_Worked__c}"/>
</apex:column>
<apex:column headerValue="Work Description">
<apex:inputField style="width:100%" value="{!entry.Work_Description__c}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Thank you in advance for your assistance.
Here is the code:
<apex:page standardController="Request__c" extensions="TrController">
<!--Because we will be defining 'Input' fields, we must wrap our code in a 'Form' block. -->
<apex:form >
<apex:pageBlock title="CDCR - Salesforce Time Reporting for Requests">
<apex:pageBlockButtons >
<apex:commandButton value="Insert" action="{!add}"/>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!TimeEntries}" var="entry">
<apex:commandLink action="{!del}" value="Delete" id="theCommandLink"/>
<apex:column width="70" headerValue="Activity">
<apex:inputField value="{!entry.Activity__c}"/>
</apex:column>
<apex:column width="30" headerValue="Date Worked">
<apex:inputField value="{!entry.Date_Worked__c}"/>
</apex:column>
<apex:column width="20" headerValue="Hours">
<apex:inputField value="{!entry.Hours_Worked__c}"/>
</apex:column>
<apex:column width="20" headerValue="Worked">
<apex:inputField value="{!entry.Minutes_Worked__c}"/>
</apex:column>
<apex:column headerValue="Work Description">
<apex:inputField style="width:100%" value="{!entry.Work_Description__c}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Thank you in advance for your assistance.
VivekShinde
You need to add an apex:column tag with headerValue as "Action" or anything else as per your preference and place the commandLink tag inside the apex:column tag. You need to write something like this: