• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Subcomponent Refresh
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subcomponent Refresh


  • Subject: Re: Subcomponent Refresh
  • From: David Griffith <email@hidden>
  • Date: Mon, 23 Feb 2004 21:02:43 +0100

Thanks, overriding the awake() method has done the trick!

Dave.

> The proper way to communicate to subcomponents is almost always
> through bindings.
>
> I would add a binding to the subComponent, boolean value, called
> 'shouldRefresh'.
>
> Over-ride the sub-component's appendToResponse, to refresh if the
> binding is true, before calling super.appendToResponse.  Pass 'true'
> to the subcomponent when you want it to refresh.
>
> Alternately, if you want the subcomponent to _always_ refresh before
> displaying it's HTML, you could dispense with the binding, and just
> always refresh in appendToResponse before calling
> super.appendToResponse.
>
> Another alternate idea:  Pass the actual -data- to the subcomponent
> through bindings. When the parent wants to refresh the data, it can
> simply refresh the data itself, and pass that new data in through the
> bindings.  It doesn't sound like that's convenient in your case
> though.
>
> Hope this helps,
> --Jonathan
>
> At 7:47 PM +0100 2/23/04, David Griffith wrote:
>> Hi all,
>>
>> I have a subcomponent whose purpose is to display a list of objects.
>> I have a main page containing that subcomponent.
>>
>> On the main page, you can click a link that will effectively add an item to
>> the database (which is now also to be displayed in the list in the
>> subcomponent).
>>
>> The subcomponent gets its data from the database and it works fine except
>> that when I return 'null' to the main page to refresh it, the subcomponent
>> does not update the list.  I guess this makes sense as it hasn't been told
>> to refetch from the database, so I need it to be able to do this.
>>
>> Is there some way to indicate to a subcomponent that it's parent has
>> refreshed, or is there a way to execute a method in the subcomponent whe it
>> refreshes?
>>
>> Regards,
>> Dave.
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Inheritance problem in EOModeler
      • From: "Marc Desjardins" <email@hidden>
References: 
 >Re: Subcomponent Refresh (From: Jonathan Rochkind <email@hidden>)

  • Prev by Date: HTTP authenticated components and Safari not working
  • Next by Date: Re: HTTP authenticated components and Safari not working
  • Previous by thread: Re: Subcomponent Refresh
  • Next by thread: Inheritance problem in EOModeler
  • Index(es):
    • Date
    • Thread