+ Start a Discussion
ANITHA BEEMU 2ANITHA BEEMU 2 

HI can anyone help..i am using following visual force code

<apex:page controller="ExistingLocationExtController">
 <apex:form >

        <apex:pageblock title="ExistingLocation">

            <apex:pageMessages />

            <apex:pageblockbuttons location="top">

                <apex:commandbutton value="Associate" action="{!associate}" />

                <apex:commandbutton value="Cancel" action="{!cancel}"/>

            </apex:pageblockbuttons>

            <apex:pageBlockSection >

                <apex:pageBlockSectionItem >

                    <apex:outputLabel >Opportunity Name</apex:outputLabel>

                    <apex:outputText >{!Opportunity.Name}</apex:outputText>  

                </apex:pageBlockSectionItem>

              <apex:pageBlockSectionItem >

                    <apex:outputLabel >Location__c</apex:outputLabel>

                    <apex:inputField value="{!Opportunity.Location__c}"/>

                </apex:pageBlockSectionItem>               

            </apex:pageBlockSection>

        </apex:pageblock>

    </apex:form>

</apex:page>

while opening the button,got the following error:

Error: Namespace length cannot exceed 15 chars..i read some where and used

<EZSign:Clear_Signature__c /> but still geting another error:

Error: existing_locations line 3, column 2: The content of elements must consist of well-formed character data or markup​.

can anyone pls help..
Raj VakatiRaj Vakati
My understaing is this is not from the nampspace .. you need to change the controller name to "YOURNAMEPSACE.ExistingLocationExtController>
ANITHA BEEMU 2ANITHA BEEMU 2
Hi Thank you for your response..i have apex class

public with sharing class ExistingLocationExtController {

 

    public Opportunity opportunity  { get; set; }

     

    public ExistingLocationExtController() {

         

        String OpportunityId = ApexPages.currentPage().getParameters().get('id');

        Opportunity = [SELECT Id, Name, Location__c FROM Opportunity WHERE Id =: OpportunityId];

         

    }

     

    public PageReference associate () {

         

        Location__c LOC = new Location__c ( Id = Opportunity.Location__c, Opportunity_Name__c = Opportunity.Id);

         

        try {

            Database.update(LOC);

        } catch (Exception error) {

            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Error while associating.' + error.getMessage()));
       }

         

        PageReference page = new PageReference('/' + Opportunity.Id);

         

        return page.setRedirect(true);

    }

     

    public PageReference cancel () {

        PageReference page = new PageReference('/' + Opportunity.Id);

        return page.setRedirect(true);        

    }


}

i am trying to edit the name here its not saving..due to which i am not able save visual force page..
ANITHA BEEMU 2ANITHA BEEMU 2
pls help to sort out this