• Sankaran Nepolean
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I hope many of you have faced this issue already. So, interested in knowing the root cause of the problem.

**Page:**

    <apex:page>
        <apex:form>
            <c:sanTestComp2 defaultText="Default Text Input"/>
        </apex:form>
    </apex:page>

**Component**

    <apex:component controller="sanTestCtrl1">
        <apex:attribute name="defaultText" type="String" Description="Default Text" assignTo="{!inpText}"/>
        <apex:pageMessages id="infoMessage"/>
        <apex:pageBlock>
            <apex:pageBlockbuttons>
                <apex:commandbutton value="save" action="{!save}" rerender="infoMessage"></apex:commandbutton>
            </apex:pageBlockbuttons>
            <apex:pageblocksection>
                <apex:inputText label="Enter Some Text" value="{!inpText}"/>
            </apex:pageblocksection>                  
        </apex:pageBlock>
    </apex:component>

**Controller**

    public class sanTestCtrl1 {
        Public String inpText{get;set;}
        
        public void save(){
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Value of Text is-'+inpText));
        }
    }

When i type some text & hit save, you normally would expect the typed in string to dispaly in ApexMesssage. But, I get the default text. I'm sure if you change string to object wrapper type, it will work. But, that will be too much for such a simple example. So, not interested with any workarounds.

can someone answer with real reason behind this behaviour ?
I have noticed that in developer console, search in files cannot find the controller text in apex:page tag in VF pages/component.

you can also try searching for 'ABCController' in your console..
<apex:component controller="ABCController" access="global">

is this a bug or am i doing something wrong ?
I have noticed that in developer console, search in files cannot find the controller text in apex:page tag in VF pages/component.

you can also try searching for 'ABCController' in your console..
<apex:component controller="ABCController" access="global">

is this a bug or am i doing something wrong ?
Previous to updating to 8.0 we had some code that would update fields on Opportunities. After updating to 8.0 we get this failure (there has been no other change in the code besides the update):

AxisFault: A duplicate value was specified for field 'Consulting_Amount__c' in object 'Opportunity', duplicate value '0.0' prior value '' (prior value could have been set to '' with 'fieldsToNull')

Does anyone have a clue why this would be?