Re: DisplayGroups and Backtracking Too Far
Re: DisplayGroups and Backtracking Too Far
- Subject: Re: DisplayGroups and Backtracking Too Far
- From: Chuck Hill <email@hidden>
- Date: Wed, 19 Dec 2007 18:46:17 -0800
On Dec 19, 2007, at 6:27 PM, Neil MacLennan wrote:
I'm having trouble with DisplayGroups and a "backtracking too far"
error -- without pressing the Back button on my browser, i.e. on a
'forward, progressive' link/action
I have a DisplayGroup within a WOComponentContent template. The
DisplayGroup shows me a batch of entries (using a WORepetition),
which are WOHyperlinks to another Component which is designed to
edit the particular item. That bit works fine. Once I try to update
the edited entry (submit button returning 'null'), or click on any
other WO-managed link, I get a "You have backtracked too far, The
application backtracking limit of XX has been exceeded". I get this
without even touching the back button! No errors sent to the console.
From what I've gleaned on Google, I sense "trouble" with
WODisplayGroups and backtracking. But in all the examples I've
found they involve pressing the "back" button in order to create a
problem.
My efforts:
I've tried "Wonder-ising" my simple WebApp, using
ERXBatchingDisplayGroup, but the result is the same.
I've increased the page cache limit to, say, 300 and still the
result is the same. My database result set is only 30 or so rows. I
suspect that the problem is nothing to do with the value of of the
page cache, but perhaps something else is throwing an error which
happens to be caught by the backtracking error mechanism
(handlePageRestorationError, I think)
I think you are correct WRT to the page cache. I'd guess something
along the lines of the session missing on the URL. If WO creates a
new session and then tries to use a component action URL you can get
this error. I'd also override and add logging to savePage() in
session to ensure that something (java script, bad HTML) is not
creating a flurry of bad requests to the app and thus knocking the
page out of the cache.
I'd think that investigation along those lines, rather than the
display group, is more likely to lead to your answer.
Chuck
I've removed the WOComponentContent templates and made everything
use straight-forward html pages, but no difference.
I've stripped all the code back to about 10 lines of java and html
per code page, and still get the error. Am I doing something
staggeringly stupid? Although I'm no expert I've been using WO for
some years now and DisplayGroups before...
WO 5.3, OS X 10.5, J2SE 5
Outline code for DisplayGroup Page:
Java:
// get an editingContext
EOEditingContext ec = new EOEditingContext();
EODatabaseDataSource ds = new EODatabaseDataSource(ec,"OrderRecord");
// Initialise ERXBatchingDisplayGroup
orderListDG = new ERXBatchingDisplayGroup();
orderListDG.setNumberOfObjectsPerBatch(10);
orderListDG.setDataSource(ds);
orderListDG.setFetchesOnLoad(true);
orderListDG.fetch();
HTML:
<webobject name = "listingLoop">
<tr>
<td><webobject name = "editBooking"><webobject name =
"orderRef" /></webobject></td>
</tr>
</webobject>
listingLoop : WORepetition {
list = orderListDG.displayedObjects;
item = orderRecord;
}
editBooking : WOHyperlink {
action = editBooking;
}
orderRef: WOString {
value = orderRecord.orderID;
}
Outline code for Edit Page:
Java:
public EditOrder applyEditChanges() {
return null;
}
HTML:
<webobject name = "editOrderForm">
<table>
<tr><td>Order</td><td><webobject name = "orderRef" /></td></tr>
</table>
<p>Click to update any changes <webobject name = "updateEdit"></
webobject> </p>
</webobject>
orderRef : WOString {
value = order.orderID;
}
updateEdit : WOSubmitButton {
value = "Apply Changes";
action = applyEditChanges;
}
Pressing the Submit button results in the backtracking error.
.neilmac
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
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