Hi, i have been stuck trying to figure out the following situation. I
have created a FormPanel that contains a few MutliFieldPanels (which
contain Textfields, ComboBoxes and Buttons), and a GridPanel.  I
created my own classes for the GridPanel and MultiFieldPanel by
extending them.  Then i add an instance of these classes to the
FormPanel, used to hold them all together. The problem is that I want
to add Records to the GridPanel when the onClick listener of a Button
inside a MultiFieldPanel is called, but i cannot access the GridPanel
store because i add it to the FormPanel with "this.".  I am currently
accessing the GridPanel in the onClick of the Button by calling
findParentBy(String) but i find this to be a bad solution ... Can
anyone please suggest a better way of doing this, using callbacks or
something cleaner than what i have done ... thanks.  The snippet below
shows how i add the elements to the FormPanel, and the issue i have in
accessing the GridPanel from the onClick listener in the
MultiFieldPanel:

public class FilterPanel extends FormPanel{

        private FrameType frameType = FrameType.FILTER;

        private Store filterCriteriaStore;
        private String errorMessage;

    public FilterPanel()
    {
            init();
    }

        ///////////////////////////////////////////////
        //create criteria panel
        ///////////////////////////////////////////////
        private void init()
        {
                 ///////////////////////////////////////////////
                 //main panel to hold other elements
                 ///////////////////////////////////////////////
                 this.setFrame(true);
                 this.setBorder(true);


             //add criteria selection
             this.add(new CriteriaSelector(frameType));

             //add criteria table to hold applied criteria
             this.add(new CriteriaTable(frameType));
        }



CriteriaSelector extend MultiFieldPanel and CriteriaTable extends
GridPanel.  I want to add Records to the CriteriaTable from the
onClickListener of a button inside the CriteriaSelector. any help
appreciated. thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to