Re: Ajax within an repetition
Re: Ajax within an repetition
- Subject: Re: Ajax within an repetition
- From: Tim Worman <email@hidden>
- Date: Thu, 26 Apr 2018 14:21:32 -0700
Hi Kenan:
There is a pattern that’s in the Ajax Examples (and some Ajax components in
Wonder) that is quite good to follow as well.
public String id() {
String id = _id;
if (id == null) {
id = ERXWOContext.safeIdentifierName(context(), true);
_id = id;
}
return id;
}
public String rowUpdateContainer() {
return "rowUpdateContainer_" + id();
}
public String rowDeleteButton() {
return “deletButton" + id();
}
If its a <table> and it isn’t too large and unwieldy, I have safely had my <tr>
(or other container) elements be AUC’s. Otherwise, I usually retreat to having
a single surrounding AUC. As you found, it is definitely really important with
repetitions that all elements in the repetition - buttons, links, text, AUC,
etc., have their own unique id’s.
Tim
UCLA GSE&IS
> On Apr 26, 2018, at 6:59 AM, Steve Peery <email@hidden> wrote:
>
> That is a good way to do it. I was just about to respond to your request.
> Glad you found it on your own.
>
> Steve
>
>> On Apr 26, 2018, at 9:54 AM, Kenan Esau <email@hidden>
>> wrote:
>>
>> OK - I found a solution.
>> I used the index of the Repetition to build an Id for each AOF and each AUC.
>> Now everything works fine.
>>
>> Regards
>>
>> Kenan
>>
>>> Am 26.04.2018 um 13:21 schrieb Kenan Esau
>>> <email@hidden>:
>>>
>>> Hi,
>>>
>>> I am new to Webobjects. That’s why I asked for an example.
>>> I have searched the web and didn’t find anything yet. (Only that having
>>> AUCs or AOFs in a repetition can cause chaos ;-)
>>>
>>> I am pretty shure that the IDs are the problem — several AUCs and all have
>>> the same ID, this cannot work!
>>> So is there a good way to e.g. get the position within the repetition and
>>> use that for creating the IDs of the AUC?
>>>
>>> Regards
>>>
>>> Kenan
>>>
>>>
>>>> Am 26.04.2018 um 12:34 schrieb René Bock <email@hidden>:
>>>>
>>>> An extra AUC for every repetition item? Did assign unique Ids?
>>>>
>>>>
>>>>> Am 26.04.2018 um 11:56 schrieb Kenan Esau
>>>>> <email@hidden>:
>>>>>
>>>>> Hi there,
>>>>>
>>>>> Is there a way to make Ajax work within a repetition?
>>>>>
>>>>> If my AjaxUpdateContainer is in a WORepetition only the first element of
>>>>> the repetition works as expected. I tried to put everything within the
>>>>> Repetition in its own Component but that did not change anything!?
>>>>> Is there an example for that use-case?
>>>>>
>>>>> Regards
>>>>>
>>>>> Kenan
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>> Mit freundlichen Grüßen
>>>>
>>>> René Bock
>>>>
>>>> --
>>>> Telefon: +49 69 650096 18
>>>>
>>>> salient GmbH, Lindleystraße 12, 60314 Frankfurt
>>>> Telefon Zentrale: 069 / 65 00 96 - 0 | www.salient-doremus.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
>>
>> _______________________________________________
>> 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
_______________________________________________
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