Re: random off by 1 EOF errors?
Re: random off by 1 EOF errors?
- Subject: Re: random off by 1 EOF errors?
- From: Joe Little <email@hidden>
- Date: Fri, 11 Mar 2005 14:51:25 -0800
Well, it is somewhat confusing, but I think the problem as I see it is
more fundamental since even in the non-update case -- selecting a
record from one row to load up a page with its contents, can sometimes
bring up an adjacent row relative to the sort. Thus, it seems to be
unaffected by the takeValues.. side of the things, this is simply from
the reading in of original values and having the repeition display one
thing but seemingly hand off a reference to a different object when an
action is taken (clicking on the link to the see the next page).
Here's a code segment that is failing only very infrequently as
described:
public folder_frames folder_frames()
{
folder_frames nextPage = (folder_frames)pageWithName("folder_frames");
// Initialize your component here
nextPage.setApplicant(selectedApplicant);
Session session = (Session) session();
session.setFinalize(true);
return nextPage;
}
selectedApplicant is relative to the row in the repeitition (the
current item) and its calling the next page, as well as telling the
session that we are in the "finalize" module so that the return page
comes back to our component. In the failure case, one record in the
sorted "applicants" NSArray either above or below gets passed to the
next page instead.
On Sat, 12 Mar 2005 11:31:28 +1300, Andrew Lindesay <email@hidden> wrote:
> Hello;
>
> > 1) get a list of applicants
> > 2) display all their attributes in a repetition, allowing one to
> > update certain values per row, and click submit to update them
>
> You sometimes need to be a bit careful in the
> "takeValuesFromRequest(...)" phase of the request-response cycle about
> "changing what you're looking at". For example, if you take up a value
> early on in the "takeValuesFromRequest (...)" phase and it changes if
> latter elements are rendered or not then they may unexpectedly not get
> their values taken up.
>
> One approach get around this issue is to cache certain values which are
> susceptible to this effect in the component controller aside from the
> model-layer. Another is to cache the actual values taken up and
> hand-marshall them into the model-layer.
>
> I hope this is of some help.
>
> cheers.
>
> ___
> Andrew Lindesay
> www.lindesay.co.nz
> +64-21-47-0929
>
> _______________________________________________
> 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
>
_______________________________________________
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