Re: WoLips and display groups

From: Chuck Hill (chil..lobal-village.net)
Date: Fri Jul 20 2007 - 12:28:22 EDT

  • Next message: Chuck Hill: "Re: WoLips and display groups"

    On Jul 19, 2007, at 11:54 PM, Anders Peterson wrote:

    > Chuck Hill wrote:
    >
    >>> 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. :-)
    >
    > Couldn't there be a Quick Fix available in the editor that would
    > set that preference?

    You can submit a feature request, but I don't know how it will know
    to set that particular regex.

    > Apple/WO used to have this..ypeInfo JavaDoc tag to tell WOBuilder
    > and others what type was actually returned. Can't WOLips make use
    > of this tag? The Quick Fix would then be to add that tag.

    @TypeInfo won't work in this case as the method is in
    WODisplayGroup. And if it did, how would Quick FIx know the correct
    type?

    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 - 12:29:28 EDT