why XMLEncoder is not encoding all public properties?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: why XMLEncoder is not encoding all public properties?

  1. #1
    Join Date
    Jan 2009
    Posts
    8

    why XMLEncoder is not encoding all public properties?

    I have the following properties (both getters and setters are public)
    String fieldID = null;
    String validationCode = null;
    String vaidationMessage = null;
    String value = null;
    boolean changeIndicator = true;

    But when I encode, it is not encoding validationMessage and changeIndicator. I am not directly encoding this object, but this is part other object and I am trying to encode that object.

    Edit: These are not being set through constructor.. I have another method which sets 2, 3rd and 4th parameters
    Last edited by getstarted; January 9th, 2009 at 06:10 PM.

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,474

    Re: why XMLEncoder is not encoding all public properties?

    Have you read this tutorial on using XmlEncoder.

    My guess (and it's only a guess because you haven't shown the code) is your settter/getter methods are named correctly for these variables.

  3. #3
    Join Date
    Feb 2008
    Posts
    966

    Re: why XMLEncoder is not encoding all public properties?

    Quote Originally Posted by keang View Post
    Have you read this tutorial on using XmlEncoder.

    My guess (and it's only a guess because you haven't shown the code) is your setter/getter methods are not named correctly for these variables.
    FTFY

    Too much wine again?

  4. #4
    Join Date
    May 2006
    Location
    UK
    Posts
    4,474

    Re: why XMLEncoder is not encoding all public properties?

    Quote Originally Posted by ProgramThis
    My guess (and it's only a guess because you haven't shown the code) is your setter/getter methods are not named correctly for these variables.

    FTFY
    Yes that's what I meant to say - thanks for the correction

    Too much wine again?
    Or maybe not enough wine

  5. #5
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: why XMLEncoder is not encoding all public properties?

    Quote Originally Posted by keang View Post
    ... Or maybe not enough wine
    That's the spirit!

    We lived for days on nothing but food and water...
    W.C. Fields
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center