• sujitha Ramachandruni
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi,
this is my code
<apex:page controller="searchaccount">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputText id="searchTextBox" value="{!searchText}">
<p> Enter Account Name</p>
</apex:inputText>
 <apex:commandButton value="search" action="{!result}"/>
</apex:pageBlockSection>
<apex:pageBlockSection >
<apex:pageBlockTable value="{!Account}" var="a">
<apex:column headerValue="Account Name">
<apex:inputField value="{!a.Name}"/>
 </apex:column>
 <apex:column headerValue="Account Number">
<apex:inputField value="{!a.AccountNumber}"/>
 </apex:column>
 <apex:column headerValue="Mobile">
<apex:inputField value="{!a.Phone}"/>
 </apex:column>
 <apex:column headerValue="Fax">
<apex:inputField value="{!a.Fax}"/>
 </apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
 </apex:page>


public class searchaccount{

    public String searchText {get; set;}
 
  Account acc {get;set;}
  public List<Account> lstofAccount;

Public searchaccount(){
  acc = new Account();
  lstOfAccount = new List<Account>();

}
 public pagereference Result(){
        
  List<Account> acc =[select Name from Account where Name=:Name];
return null;
}

public String Name { get; set; }
}


and i am getting error
Error: Could not resolve the entity from <apex:inputField> value binding '{!a.Fax}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.
i think my visualforce code was correct and i done mistake in apex
Hello Friends,

This might be very simple but unable to get this done!
I have a series of radio buttons on a vf page like this

User-added image

I want text to show up below each radio button. Something like this -
User-added image
Appreciate your help!
I am not getting any selectd options in the SelectOption list to show on my Visual Force page. Beow is the VF snippet and controller.

Example
public class sampleConSubmissions {
    
     String[] submissions = new String[]{};

    public sampleConSubmissions(ApexPages.StandardController controller) {

    }
        
            
        public PageReference test() {
            return null;
        }
            
        public List<SelectOption> getItems() {
            List<SelectOption> options = new List<SelectOption>();
            options.add(new SelectOption('TR00025712016 - Umbr only','TR00025712016 - Umbr only'));
            options.add(new SelectOption('TR00028982016 - Casualty','TR00028982016 - Casualty'));
            options.add(new SelectOption('TR18622016 - Casualty','TR18622016 - Casualty'));
            options.add(new SelectOption('TR20612016 - Property','TR20612016 - Property'));
            return options;
        }
            
        public String[] getsubmissions() {
            return submissions;
        }
            
        public void setsubmissions(String[] submissions) {
            this.submissions = submissions;
        }
    }
 
<apex:selectList value="{!submissions}" multiselect="true">
            <apex:selectOptions value="{!items}"/>
        </apex:selectList><p/>

        <apex:commandButton value="Select Submissions" action="{!test}" rerender="out" status="status"/>
    

    <apex:outputPanel id="out">
        <apex:actionstatus id="status" startText="testing...">
            <apex:facet name="stop">
                <apex:outputPanel >
                    <p>You have selected:</p>
                    <apex:dataList value="{!submissions}" var="c">{!c}</apex:dataList>
                </apex:outputPanel>
            </apex:facet>
        </apex:actionstatus>
    </apex:outputPanel>