Re: Unresponsive hyperlink in WORepetition
Re: Unresponsive hyperlink in WORepetition
- Subject: Re: Unresponsive hyperlink in WORepetition
- From: Chuck Hill <email@hidden>
- Date: Thu, 24 May 2007 11:09:43 -0700
On May 24, 2007, at 10:49 AM, David Holt wrote:
On 23 May 2007, at 5:20 PM, Chuck Hill wrote:
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.
They are.
Is it possible that the action method is not returning the edit
page due to some other reason?
I would have to say the action method is innocent too! So long as
it is outside the conditional it returns the editing page.
public EditIndividualItem editItem()
{
EditIndividualItem nextPage = (EditIndividualItem)
pageWithName("EditIndividualItem");
// Initialize your component here
nextPage.setTheItem(anItem);
nextPage.setArtifact(artifact);
return nextPage;
}
That does look pretty innocent.
I am feeling kind of stumped here. Are you sure that your
representation (below) of the situation matches your real page? It
seems that the repetition contents when the page is rendered are
somehow different than when the link click is received. That is all
that I can think of.
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
--
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