Re: How to propagate subcomponent ivars to its parent component

From: Chuck Hill (chil..lobal-village.net)
Date: Mon Mar 02 2009 - 15:09:40 EST

  • Next message: David Avendasora (JIRA): "[OS-JIRA] Created: (WOL-973) Validation for Owns Destination"

    Hi Amiel,

    Check my sig for a book that you really want to own. All of this is
    explained with examples.

    On Mar 2, 2009, at 2:04 AM, amiel montecillo wrote:

    > Hello All,
    >
    > I am trying to create a reusable text filter component. It has 2
    > WOPopupButtons and a WOTextField contained in a WOForm to filter a
    > grid listing.
    >
    > How do I make it such that the parent component will get the values
    > selected on the 3 fields when the filter form is submitted?

    If you have not disabled automatic binding synchronization, it will
    "just work". You don't need to do anything.

    > On top of that, I also need to create an action binding on my
    > subcomponent so that I can bind that action on the parent and filter
    > the results. Any articles/posts explaining how to accomplish this?

    There are two ways. One, make it a string. e.g. action =
    "parentMethodName" and use the WOComponent method
    public WOActionResults performParentAction(String anActionName)

    The other is to disable automatic binding synchronization and then
    just use action = parentMethodName and valueForBinding("action")

    Chuck

    -- 
    Chuck Hill             Senior Consultant / VP Development
    

    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 : Mon Mar 02 2009 - 15:10:32 EST