• CatoPC
  • NEWBIE
  • 30 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hi All,

 

Is there any diff between Inner class and Wrapper classes?pls explain...

what does mean Inner Wrpper class?

 

Thanks,

Vicky

I have a custom component within a visualforce page.  If a validation error occurs within the custom component, I add an error to the vf page, 

ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR, 'State'));

 

and add an error to the apex:inputfield ,

address.State__c.addError('Required field.');

 

. Instead of passing message between the component and VF pages's respected controllers. I simply check if the ApexPage has errors, 

if (ApexPages.hasMessages(ApexPages.Severity.ERROR)){
return null;
}

 This works fine however the addError() method adds an extra ApexPages error of which to the total count. No matter how many addError() in the component, the first one is duplicated on the ApexPages.Messages. Has anyone seen similar behavior and if so how is it handled? Thank you.

 

 

  • December 28, 2011
  • Like
  • 0

Hi All,

 

Is there any diff between Inner class and Wrapper classes?pls explain...

what does mean Inner Wrpper class?

 

Thanks,

Vicky

I have a custom component within a visualforce page.  If a validation error occurs within the custom component, I add an error to the vf page, 

ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR, 'State'));

 

and add an error to the apex:inputfield ,

address.State__c.addError('Required field.');

 

. Instead of passing message between the component and VF pages's respected controllers. I simply check if the ApexPage has errors, 

if (ApexPages.hasMessages(ApexPages.Severity.ERROR)){
return null;
}

 This works fine however the addError() method adds an extra ApexPages error of which to the total count. No matter how many addError() in the component, the first one is duplicated on the ApexPages.Messages. Has anyone seen similar behavior and if so how is it handled? Thank you.

 

 

  • December 28, 2011
  • Like
  • 0