Re: WoLips and display groups

From: Chuck Hill (chil..lobal-village.net)
Date: Fri Jul 20 2007 - 00:55:58 EDT

  • Next message: Thomas: "Re: WoLips and display groups"

    On Jul 19, 2007, at 9:04 PM, Thomas wrote:

    > I am just learning Eclipse/WOLips, and have migrated a large
    > framework from XCode to WOLips. I have reduced the total number of
    > reported errors from 10,000 to 4,000, and I have successfully built
    > and deployed the framework. There are no Java errors.

    Cool.

    > However, there are thousands of errors that don't seem right to me.
    > For example, I have a display group called dg that uses an entity
    > called PageType whose class in the model is PageType. I use the
    > generation gap model where all the entity's model accessors are in
    > _PageType.java and PageType.java extends _PageType. The class name
    > in the model is PageType.
    >
    > _PageType.java has an accessor for the model attribute hasSubPages().
    >
    > I have a binding in a component (which works) for
    > dg.selectedObject.hasSubPages
    > But WOLips tells me this is an error: There is no key 'hasSubPages'
    > for the keypath 'g.selectedObject'

    The part to understand here is not your code, but dg.selectObject.
    If you check the API, this returns

    public Object selectedObject()

    And, obviously, java.lang.Object has no method named hasSubPages().

    > So how do I tell WOLips that all these errors are not errors, so I
    > can start finding the real errors?

    That is the correct question. Go to
    Window - Preferences - WOLips - Binding Validation
    Add
    Component Regex: .*
    Valid Binding Regex: .*\.selectedObject\..*

    And no, I am not 100% sure the regex for Valid Binding Regex is
    correct. Getting it right is left as an exercise for the reader. :-)

    Chuck

    -- 
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Fri Jul 20 2007 - 00:57:27 EDT