Re: Ajax inside a Repetition
Re: Ajax inside a Repetition
- Subject: Re: Ajax inside a Repetition
- From: Travis Britt <email@hidden>
- Date: Tue, 24 Mar 2009 14:44:10 -0400
It looks like you're binding the ID for your AjaxUpdateContainer in a
repetition -- are you sure the IDs are unique?
Have you tried wrapping the repetition with the AjaxUpdateContainer
and updating the entire repetition? Then you should also be able to
wrap the checkboxes in one AjaxObserveField.
tb
On Mar 24, 2009, at 12:29 PM, Dawn Lockhart wrote:
I have a repetition with check boxes in each row. It worked like a
charm
until I upgraded to WO 5.4 and Wonder revision 8988.
If there are items in the repetition when the page initially loads,
they all
work fine, but if I add items to the repetition with an
AjaxSubmitButton and
update the container, then only the first row of the repetition
works. If I
press F5 and reload the page, then everything works.
<wo:AjaxUpdateContainer id="ListUpdateID">
<wo:WORepetition list="$list" item="$item" index="$rowNumber">
<td><wo:AjaxObserveField updateContainerID="$updateContainerID"
action="$checked" fullSubmit="$no">
<wo:checkbox checked="$item.doNotShip" />
</wo:AjaxObserveField>
</td>
<td>
<wo:AjaxUpdateContainer id="$updateContainerID">
<wo:WOTextField id="$calendarRowId" size="12"
value="$item.date" />
<wo:CalendarPopUp calendarFieldId="$calendarRowId" />
</wo:AjaxUpdateContainer>
</td>
</wo:WORepetition>
</wo:AjaxUpdateContainer>
<wo:AjaxSubmitButton action="$add" value="Add"
updateContainerID="ListUpdateID" />
When I look at the generated JavaScript, it seems to only generate the
JavaScript that registers the observe field if I manually refresh
the page.
How do I get the fields registered without refreshing the whole page?
I tried removing the observe field and having the checkbox call a
setChecked
method in the Java class and that didn't work either, it only hit the
setChecked method for the first row and not subsequent rows unless I
refreshed.
TIA,
Dawn
_______________________________________________
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