Re: Unresponsive hyperlink in WORepetition
Re: Unresponsive hyperlink in WORepetition
- Subject: Re: Unresponsive hyperlink in WORepetition
- From: Chuck Hill <email@hidden>
- Date: Wed, 23 May 2007 17:20:24 -0700
Well, that seems to kill that theory. :-)
That does not really look like Jerry's pet bug as the switching of
the conditional should be consistent (assuming the batches and items
in each batch are in an deterministic order.
Is it possible that the action method is not returning the edit page
due to some other reason?
Chuck
On May 23, 2007, at 5:12 PM, David Holt wrote:
Thanks Chuck,
Here is the code:
protected Integer previousBatchNumber = new Integer(-1);
protected Integer currentBatchNumber;
public void setAnItem(Item newAnItem)
{
if(!(newAnItem == null)) {
currentBatchNumber = (Integer) newAnItem.batch_number();
if ( currentBatchNumber.equals(previousBatchNumber)) {
booleanFirstItem = false;
} else {
booleanFirstItem = true;
}
booleanFirstItem = currentBatchNumber.equals(previousBatchNumber);
Less is more and not just at the UNIX command line.
:-)
previousBatchNumber = currentBatchNumber;
}
anItem = newAnItem;
}
On 23 May 2007, at 5:05 PM, Chuck Hill wrote:
How is "isFirstItemInABatch" determined? That sounds like your
problem. It seems like this returns true only once, when the page
is first drawn.
Chuck
On May 23, 2007, at 4:55 PM, David Holt wrote:
Hello everyone,
I am having problems with a boolean changing the structure of my
page - a la Jerry's pet bug :-)
The usual answer is to set the boolean in the appendToResponse.
In my case, the conditional applies to multiple items and the
boolean is determined from a value in the item in the setAnItem()
method. Here is the structure of the calling page:
--
repetition-->Batches-->aBatch
repetition-->Items-->anItem
?+isFirstItemInABatch
Batch Headings
?+
anItem details
repetition // items
repetition // batches
--
I want to put a hyperlink in the Batch Headings section that
calls an edit page. The link currently reloads the page.
If I put a link in the Item Details section the edit batch page
is called, but then I have a hyperlink beside every item in the
batch.
How can I debug this unresponsive link in the Batch Headings
section?
_______________________________________________
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
--
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