Re: wo:AjaxTabbedPanel call everything 3 times….
Re: wo:AjaxTabbedPanel call everything 3 times….
- Subject: Re: wo:AjaxTabbedPanel call everything 3 times….
- From: Chuck Hill <email@hidden>
- Date: Tue, 02 Jul 2013 16:23:20 -0700
It has been a while since I wrote those, but I suspect there was a reason that I did that. Likely for form values which can be processing in all three phases.
Your best best is probably lazy fetching:
public NSArray projectTypes() {
if _projectTypes == null) {
// fetch the project types here
}
return _projectTypes;
}
This is generally good practice in components as the bindings can get synchronized more than once per request.
Chuck
On 2013-07-02, at 4:18 PM, Louis Demers wrote:
> The code (list and other accessor) gets run 3 times but it displays only once (correctly). I checked that appendtoresponse gets called only once.
> I noticed because the page took a long time to load and while investigating, that's when I noticed the 3 cycles.... Otherwise the pages was displaying as expected.
>
> The mere fact of enclosing the wo:repetition in the AjaxTabPanel and AjaxTabPanelTab causes the <div> to be generated 3 time
>
> a 3 time speed up would be nice ;-)
>
>
> On 2013-07-02, at 17:09 , Chuck Hill <email@hidden> wrote:
>
>> Hi Louis,
>>
>> Do you mean the code runs three times or that the list is displayed three times?
>>
>>
>> Chuck
>>
>>
>> On 2013-07-02, at 1:54 PM, Louis Demers wrote:
>>
>>> Hi,
>>> I have a page component setup as followed. It displays correctly (but funny because I removed everything superfluous) but everything in the div is called three times. ! If I remove the 4 Ajax lines, it is called only once.
>>>
>>> Any clue ? Is that normal Ajax processing ? ....
>>>
>>>
>>> <wo:PageWrapper title = "Period Report">
>>> <wo:PageHeader left = "" center = "Period Report" right = "" />
>>> <wo:ERXStyleSheet filename = "css/Tabs.css" />
>>> <wo:form name = "Form" multipleSubmit = "true">
>>> <div class = "ActionHeader">
>>> <wo:WOImageButton action = "$reload" filename = "1Pixel.gif" />
>>> <div class = "Actions"> </div>
>>>
>>> </div>
>>> <div>
>>> <wo:AjaxTabbedPanel id = "toto">
>>> <wo:AjaxTabbedPanelTab name = "BreakDown">
>>> <div>
>>> <wo:repetition list = "$projectTypes" item = "$aProjectType">
>>> <wo:string value = "$aProjectType.name" />
>>> </wo:repetition>
>>> </div>
>>> </wo:AjaxTabbedPanelTab>
>>> </wo:AjaxTabbedPanel>
>>> </div>
>>> </wo:form>
>>>
>>> </wo:PageWrapper>
>>>
>>>
>>>
>>> Louis Demers eng.
>>> www.obzerv.com
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>> --
>> Chuck Hill
>> Executive Managing Partner, VP Development and Technical Services
>>
>> 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/gvc/practical_webobjects
>>
>> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
>>
>> Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> Louis Demers eng.
> www.obzerv.com
>
>
--
Chuck Hill
Executive Managing Partner, VP Development and Technical Services
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/gvc/practical_webobjects
Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
_______________________________________________
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