Re: Unresponsive hyperlink in WORepetition
Re: Unresponsive hyperlink in WORepetition
- Subject: Re: Unresponsive hyperlink in WORepetition
- From: Alexander Spohr <email@hidden>
- Date: Thu, 24 May 2007 11:19:12 +0200
Why not just do this:
boolean booleanFirstItem()
{
if(Items.count() > 0)
return Items.objectAtIndex(0) == anItem;
return false;
}
You should never toogle Conditional state in a setMethod of a
repetition. The side-effects are strange. WO might or might not go
through the Repetition if it takesValuesFromRepsonse.
Or even better: Don’t use a Conditiona at all. As i understand it you
have a Batch-Repetition, so just put a link before the Item-
Repetition...
BatchRep
HEADERLINK for Batch
ItemRep
Item
/ItemRep
/BatchRep
atze
Am 24.05.2007 um 02:12 schrieb David Holt:
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;
}
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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40freeport.de
This email sent to email@hidden
Freeport & Soliversum
Alexander Spohr
email@hidden
www.freeport.de
_______________________________________________
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