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
VFVF 

Calling a standard controller Fields in an VF page Components.

Hi,

 I am able to get the contact details in the VF page directly by using the standard controller -"Contact"But while using the standard controller as Campaign I am not able to do the same as I did in retrieving fields(Name,ID....)  by using contacts.

For contacts: 

 

<apex:page  Standardcontroller ="Contact">

<apex:inputText value="{!Contact.name}"></apex:inputText> 

</apex:Page> 

 

the name of a particular campaign  is displayed in a text box overhere.But how can i do the same with campaign...

 

Here i am using it as  -

<apex:page Standardcontroller="Campaign">

<apex:inputText value="{! Campaign.name}"></apex:inputText> 

</apex:Page> 

 

the error is displayed as Error: Unknown property 'ArrayList.Name'

 

 

 

This might be a  simple one but i am not able to solve it out.Please help me out asp.

Thanx in Advance. 

JimRaeJimRae

There must be more to your page code than that.  For one thing, and inputtext field must be enclosed in form tags.

 

I tried this very simple page, and it works fine:

 

 

<apex:page Standardcontroller="Campaign"> <apex:form> <apex:inputText value="{! Campaign.name}"></apex:inputText> </apex:form> </apex:page>

 

 

 

devNut!devNut!
Try this ?

 

 

<apex:page StandardController="Campaign"> <apex:form > <apex:inputText value="{! Campaign.Name}"></apex:inputText> </apex:form> </apex:page>

 

 

 

VFVF
Thanx for your reply Jim. I solved the problem,the problem was not with the code it was with the custom controller Class which i was using as extensions along with the standard controller.The problem is that i am using a method name getcampaign() which is returning an Arraylist.where as the same method return a SObject.