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
Parteek Kumar 5Parteek Kumar 5 

How to edit outputText in visualforce page

Hi All,

I have a variable of get set type, I am showing this variable value on visualforce page using outputtext tag. Now user wants to edit this outputtext value on double click. I am also using inlineeditsupport tag for achive this but this is not working with ouputtext tag.

Please help me...
shephalishephali
Hi Parteek Kumar,

          You refer the code below.
<apex:page StandardController="Opportunity" recordSetVar="ops">
<apex:form >
    <apex:pageBlock title="List of Opportunities">
    
        <apex:pageBlockTable value="{!ops}" var="o">
            <apex:column value="{!o.Name}"/>
            <apex:column headerValue="Amount" >
            <apex:outputField value="{!o.Amount}">
            <apex:inlineEditSupport />  
            </apex:outputField>
            </apex:column>
            <apex:column value="{!o.Amount}"/>
            <apex:column value="{!o.Account.Name}"/>            
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:form>    
</apex:page>

Please Let me know did it help you or not.
Thanks
shephalishephali
Parteek,
   Inlineediting does not support with outputtext rather it support with outputfield.
Parteek Kumar 5Parteek Kumar 5
Hi Shephali,
thanks for your quick reply...
I can't use outputfield in this case because my value is coming from a variable, this is way i have to use outputtext...and outputtext does not support inlineeditsupport...