• 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: ERXWORepetition sending null iterator item.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXWORepetition sending null iterator item.


  • Subject: Re: ERXWORepetition sending null iterator item.
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 31 Mar 2009 20:34:36 -0700


On Mar 31, 2009, at 8:26 PM, Greg Hulands wrote:

hmm,
So how does one dynamically generate tabs?

One doesn't. ;-)


Do you remember why it isn't working. If you can point me in the general direction I will take a look at fixing it - if is possible to fix ;-)

Well, there are some dirty little secrets in that implementation. Ah, it is all coming back to me now. In AjaxTabbedPanel, see:


/**
* Looks through the child components to locate the AjaxTabbedPanelTabs that are controlled by this panel.
* Tabs without an explicit id attributed are assigned a calculated one.
*
* @param template the graph of elements passed to the constructor.
*/
private void findTabs(WODynamicGroup template) {


In order to make this work the way that I wanted (without having to explicitly set the tabs on the panel), the AjaxTabbedPanel has to know the tabs before they are rendered. Which it can't. So it peeks. In the template. Hey! You were warned above. But it does not evaluate the repetition so, at most, it will see a single panel. I could not think of a better way to make this that was not far, far dirtier. There might be a way, but it has not occurred to me yet.


Chuck


On Mar 31, 2009, at 8:20 PM, Chuck Hill wrote:


On Mar 31, 2009, at 7:45 PM, Greg Hulands wrote:

Hi,
I've got a component with the following in it:

<wo:AjaxTabbedPanel id="worksheetTabs" busyDiv="loading">
<wo:repeat list = "$session.worksheets" item="$worksheet">
<wo:AjaxTabbedPanelTab name = "$worksheet.title" isSelected="$isActiveWorksheet">
<wo:Worksheet worksheet="$worksheet"/>
</wo:AjaxTabbedPanelTab>
</wo:repeat>
</wo:AjaxTabbedPanel>

First off, I am not sure if you can use a TabbedPanelTab in a repetition. I know this did not work when I first wrote this. IIRC, it still does not work.



When it renders the page I have 1 worksheet that should display, but I get a tab with the title null. Stepping through it, I see that the worksheet gets set, but then it gets set again to null.

In the stack trace I see the oddly named ERXWORepetition._cleanupAfterIteration() which is causing the setting of null.

Does anyone know why this would be happening and how to rectify it?


Right now that sounds normal. WORepetition and ERXWORepetition set the item to null after the repetition finishes.

Chuck

--
Chuck Hill             Senior Consultant / VP Development

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/products/practical_webobjects










-- Chuck Hill Senior Consultant / VP Development

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/products/practical_webobjects







_______________________________________________ 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
References: 
 >ERXWORepetition sending null iterator item. (From: Greg Hulands <email@hidden>)
 >Re: ERXWORepetition sending null iterator item. (From: Chuck Hill <email@hidden>)
 >Re: ERXWORepetition sending null iterator item. (From: Greg Hulands <email@hidden>)

  • Prev by Date: Re: Getters without the "get" part
  • Next by Date: Re: Getters without the "get" part
  • Previous by thread: Re: ERXWORepetition sending null iterator item.
  • Index(es):
    • Date
    • Thread