[Opensource] typos in EDG

Peter A. Pilgrim peterp at xenonsoft.demon.co.uk
Wed Dec 10 13:16:37 PST 2003


Maurizio Brilli wrote:
> OK Sandra and Larry, then these are the first ones:
> 
> Chapter 5, Section Database Objects, Paragraph about Multi-Valued Fields 
> (page 22 of .pdf file)
>  There is a listing (10 lines) starting with "public Vector 
> getValidValues..."
>    at lines 5. and 6. the addElement sintax is wrong. It takes a blank 
> between "new" and "ValidValue" and the lines are missing a closed 
> parenthesis.
> Same errors are on next page (in the listing that starts with "package 
> org.fooey.testapp.dbobj;").
> 
> BTW, as I said in another post on friday, I just can't get this bit of 
> code to work. After solving the syntax errors, I got the code to compile 
> correctly, but when I tried to run DBMaint over this DbObject, I got an 
> error saying: "This object: (fully qualified object name) does not have 
> valid values defined."
> I thought it was a matter of field names, because it's not clear whether 
> the setLookupObject and the getValuesDefault methods refer to the 
> calling or the called field. So, not to make mistakes, I renamed both 
> fields to have the same name (like in the example), but I still get the 
> same error.
> Has anyone got any clues or a working piece of code to show me? (so 
> maybe I could help correct the document)
> 
> Thanks very much for your help
> Ciao
> Maurizio
> 
> Sandra Cann ha scritto:
> 
> the setLookupObject and the getValuesDefault methods refer to the 

Hmmm

The preceding codelisting docbook text for this is

1.   setMultiValued("AccountOpen");

This defines meta data for the field called "AccountOpen" is
a multi-valued.

Line 3 was wrong in the next codelisting. It should not
have been fieldNames.equals("Account Active").


1.   public Vector getValidValues(String fieldName)
           throws DBException {
2.
3.     if (fieldName.equals("AccountOpen")) {
4.       Vector myValues = newVector();
5.       myValues.addElement(new  ValidValue("Y", "Yes"));
6.       myValues.addElement(new  ValidValue("N", "No"));
7.       return myValues;
8.     }
9.     return super.getValidValues(fieldName);
10.  }
> 

BTW: I am catching up on my email, so I am a week behind now.

-- 
Peter Pilgrim
            __ _____ _____ _____
           / //__  // ___// ___/   +  Serverside Java
          / /___/ // /__ / /__     +  Struts
         / // ___// ___// ___/     +  Expresso Committer
      __/ // /__ / /__ / /__       +  Independent Contractor
     /___//____//____//____/       +  Intrinsic Motivation
On Line Resume
    ||
    \\===>  `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''




More information about the Opensource mailing list