You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Reinhard Poetz <re...@apache.org> on 2004/11/22 16:08:08 UTC
Validating aggregated widgets
IIUC an aggregated widget is a combination of a field and container widget. If I
add a validator, the aggregated value is validated and an error is added to
the aggregated widget. But how can I display it? After the FormsTransformer, the
aggregated widget element has been removed and only its parts are available for
the XSLT.
A possible solution could be adding a custom validation and set errors to one of
the parts but I'm not really happy with this ... :-/
--
Reinhard
Re: Validating aggregated widgets
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Reinhard Poetz wrote:
> Vadim Gritsenko wrote:
>
>> Use <ft:validation-error/> tag, see EffectWidgetReplacingPipe.java for
>> details.
>
> Any ideas?
Last time I used it it was good old woody times - so I'm not up to date on all
this stuff.
Vadim
Re: Validating aggregated widgets
Posted by Reinhard Poetz <re...@apache.org>.
Vadim Gritsenko wrote:
> Reinhard Poetz wrote:
>
>> Reinhard Poetz wrote:
>>
>>>
>>> IIUC an aggregated widget is a combination of a field and container
>>> widget. If I add a validator, the aggregated value is validated and
>>> an error is added to the aggregated widget. But how can I display it?
>>> After the FormsTransformer, the aggregated widget element has been
>>> removed and only its parts are available for the XSLT.
>>>
>>> A possible solution could be adding a custom validation and set
>>> errors to one of the parts but I'm not really happy with this ... :-/
>>>
>>
>> Do we have similar to ft:widget-label somethink like ft:widget-error?
>> I think this could be a solution for this. WDOT?
>
>
> Use <ft:validation-error/> tag, see EffectWidgetReplacingPipe.java for
> details.
>
> Vadim
>
Just found it out myself :-) anyway, thank you very much.
AFAIK the aggregated-field is a hybrid of a field and a container widget. Is
this the reason, why errors of the parts are also errors at the aggregated
field? This leads to the effect that errors are shown twice.
Another watching: If the required attribute of the aggregatefield is set to
true, I get an error (field required) when the page is shown for the first!
time. Any ideas?
--
Reinhard
Re: Validating aggregated widgets
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Reinhard Poetz wrote:
> Reinhard Poetz wrote:
>
>>
>> IIUC an aggregated widget is a combination of a field and container
>> widget. If I add a validator, the aggregated value is validated and
>> an error is added to the aggregated widget. But how can I display it?
>> After the FormsTransformer, the aggregated widget element has been
>> removed and only its parts are available for the XSLT.
>>
>> A possible solution could be adding a custom validation and set errors
>> to one of the parts but I'm not really happy with this ... :-/
>>
>
> Do we have similar to ft:widget-label somethink like ft:widget-error? I
> think this could be a solution for this. WDOT?
Use <ft:validation-error/> tag, see EffectWidgetReplacingPipe.java for details.
Vadim
Re: Validating aggregated widgets
Posted by Reinhard Poetz <re...@apache.org>.
Reinhard Poetz wrote:
>
> IIUC an aggregated widget is a combination of a field and container
> widget. If I add a validator, the aggregated value is validated and an
> error is added to the aggregated widget. But how can I display it? After
> the FormsTransformer, the aggregated widget element has been removed and
> only its parts are available for the XSLT.
>
> A possible solution could be adding a custom validation and set errors
> to one of the parts but I'm not really happy with this ... :-/
>
Do we have similar to ft:widget-label somethink like ft:widget-error? I think
this could be a solution for this. WDOT?
--
Reinhard