On 2013-07-02, at 4:42 PM, Louis Demers wrote:

> Thanks,
> 
> I suspected something like that, but this is some of my first attempts at 
> using the ajax stuff so I wanted to make sure it was me misusing the 
> components

It was more of me abusing WO to get the effect that I wanted.  I think there is 
another tabbed panel (maybe in CoolComponents) that is better.  Mike made that 
one.


> Speaking about good practices, I was setting up some things some actions in 
> my setters for the "item" binding, which screwed me a bit because it getting 
> called for each item in the list AND one more time with null (as its cleaning 
> up the repetition I suppose) 8-) 8-) 8-)

Yes, that is where the null comes from.


> Morale: don't take shortcuts !

Or be careful of which ones you take  ;-)


> Thanks you very much...

You are welcome, as always.


Chuck


> On 2013-07-02, at 19:23 , Chuck Hill <[email protected]> wrote:
> 
>> 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 protected]> 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 protected])
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>>>>> 
>>>>> This email sent to [email protected]
>>>> 
>>>> -- 
>>>> 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!
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 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 protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to