Tnx. I had form->listview->item->formcomponents,formvalidators

Should the embedded forms be renderBodyOnly?

I think HTML does not approve embedded forms, does it? So should I
tweak this using renderBodyOnly or similar?

**
Martin

2008/6/5 Igor Vaynberg <[EMAIL PROTECTED]>:
> you should use embedded forms
>
> form->listview->item->form+formvalidators->formcomponents
>
> instead of
>
> form+formvalidators->listview->item->formcomponents
>
> -igor
>
> On Thu, Jun 5, 2008 at 7:55 AM, Martin Makundi
> <[EMAIL PROTECTED]> wrote:
>> I use setReuseitems true yes.
>>
>> I must call the removeAll because my models have changed (I am
>> rendering a table and the table structure / colspan / rowspan /
>> elements changes). I have not found another way to update the markup
>> than calling removeAll.
>>
>> Now, the removeAll should probably remove all the IFormValidators for
>> the elements too? Currently there is no external method for removing
>> the validators, it should be automatic.
>>
>> **
>> Martin
>>
>> 2008/6/5 Maurice Marrink <[EMAIL PROTECTED]>:
>>> Can't you use setReuseItems(true), that way the populate method will
>>> be called less frequently and thus will generate less validators.
>>> Don't use the removeall in combination with the reuse that will negate
>>> the effect :)
>>>
>>> Maurice
>>>
>>> On Thu, Jun 5, 2008 at 3:57 PM, Martin Makundi
>>> <[EMAIL PROTECTED]> wrote:
>>>> Hi!
>>>>
>>>> The only workaround I came up with is as follows:
>>>>  public void validate(Form form) {
>>>>    if (!form.contains(selectionField, true)) {
>>>>      return;
>>>>    }
>>>> ...
>>>> }
>>>>
>>>> It is not elegant and the stack keeps growing. I first tried to remove
>>>> the validator if it exists, but that brought up some nasty threading
>>>> issues ;)
>>>>
>>>> Anybody know if it is a "feature" or a "bug" that the form validator
>>>> stack keeps piling up those validators after each submit -
>>>> specifically comes up in double-or-triple-submit-click situations.
>>>>
>>>> **
>>>> Martin
>>>>
>>>>
>>>>
>>>> 2008/6/5 Martin Makundi <[EMAIL PROTECTED]>:
>>>>> Hi!
>>>>>
>>>>> I have a Form whose components are populated using a listView.
>>>>>
>>>>> Each listView component has a formValidator.
>>>>>
>>>>> Now each time I refresh the listview it is redrawn and all the new
>>>>> validators are newly added to the form in addition to the existing
>>>>> validators (from the previous refresh).
>>>>>
>>>>> For example, the screen has 5 items but when I debug the form I can
>>>>> see 65 validators hanging out there and giving false alarms ;)
>>>>>
>>>>> In my experience I must use listView.removeAll to assure that the
>>>>> listview is re-rendered. modelChanged does not seem to have the
>>>>> desirable effect.
>>>>>
>>>>> What is the proper pattern to clean the form listview validators?
>>>>>
>>>>> **
>>>>> Martin
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to