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
robertcw777robertcw777 

OutputLink not rendering as link

I have a puzzling problem where an outputlink is not rendering as a hyperlink to an VF page and nothing happens when I click on it, even though it appears that the html is rendering correctly.

 

See the outputlink in the VF column "Work" below::

 

<apex:page controller="MyWorkController">

  <apex:form>

    <apex:pageblock >

        <apex:pageblocktable value="{!WorkTable}"  var="w">

            <apex:column headervalue="Next Action">

                <apex:outputText value="{0,date,MM'/'dd'/'yyyy}" style="{!w.NextActionStyle}">

                              <apex:param value="{!w.NextActionDate}"/>

                </apex:outputText>

            </apex:column>

             <apex:column headervalue="Due Date">

                <apex:outputText value="{0,date,MM'/'dd'/'yyyy}" style="{!w.DueStyle}">

                              <apex:param value="{!w.DueDate}"/>

                </apex:outputText>

            </apex:column>

            <apex:column headervalue="Type">

                    <apex:outputtext value="{!w.WorkItemType}"/>

            </apex:column>

 

            <apex:column headervalue="Work">

                <apex:outputlink value="/{!w.WorkItemID}"/>

                       {!w.WorkItemName}

            </apex:column>  

           

        </apex:pageblocktable>

    </apex:pageblock>

    </apex:form>

 </apex:page>

 

Here is the html.

 

colspan="1"><a href="https://na14.salesforce.com/a0Kd00000036RrYEAU"></a>

                       Seattle P2 Audit</td>

 

and this link works if I copy and paste it into the browser (I’m using Firefox)

 

The VF page cell is just rendered as if it were just an outputtext field.

Any ideas?

Best Answer chosen by Admin (Salesforce Developers) 
robertcw777robertcw777

Dang! That was it. Thank you!

All Answers

colemabcolemab

Shouldn't this:

<apex:outputlink value="/{!w.WorkItemID}"/>
{!w.WorkItemName}

 Be more like this:

<apex:outputlink value="/{!w.WorkItemID}">
{!w.WorkItemName}
</apex:outputlink>

 

robertcw777robertcw777

Dang! That was it. Thank you!

This was selected as the best answer