Re: WODisplayGroup advice needed
Re: WODisplayGroup advice needed
- Subject: Re: WODisplayGroup advice needed
- From: Wolfram Stebel <email@hidden>
- Date: Thu, 24 Nov 2005 20:37:53 +0100
Am 24.11.2005 18:55 Uhr schrieb "David LeBer" unter <email@hidden>:
>
> On 24-Nov-05, at 12:43 PM, Rick Innis wrote:
>
>>
>> On Nov 24, 2005, at 12:19, David LeBer wrote:
>>
>>> Because you are using a WORepetion you really don't need to worry
>>> about he WODisplayGroup at all at this point. You should already
>>> have a reference to the Object you need.
>>>
>>> Assuming the 'item' binding of your WORepetition is bound to
>>> 'recordItem'
>>>
>>> Wrap a WOHyper link around some attribute in the WORepetition (ie:
>>> recordItem.recordNumber) and bind it's action binding to something
>>> like this:
>>>
>>> public WOComponent editInFullForm() {
>>> FullForm nextPage = (FullForm)pageWithName("FullForm");
>>> nextPage.setRecord(recordItem);
>>> return nextPage;
>>> }
>>
>>
>> That's something I expected would work, but the item binding was
>> null when the action method is called.
>>
>> That apparently was happening because I was refetching the objects
>> in awake() to ensure that the group was properly redisplayed when
>> the user came back it after reviewing the form, because when I take
>> that code out of awake this approach works. Thanks.
>>
>> And I guess I now need to know how to properly refresh a display
>> group :-)
>
> I usually just use WODisplayGroups for batching and sorting.
>
> I fetch my own objects and set them manually
> (displayGroup.setObjectArray(myArrayOfObjects)).
>
Do something like this:
public void appendToResponse ( WOResponse aResponse, WOContext aContext
)
{
personBatch.queryBindings().takeValueForKey ( myBinding,
"myAttribute" );
personBatch.qualifyDataSource ();
super.appendToResponse ( aResponse, aContext );
}
The WODisplayGroup should have a FetchSpec correctly set.
HTH
Wolfram
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden