cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <>
Subject Re: [CForms] conditional "required" attribute needed or a "better" solution
Date Fri, 15 Apr 2005 12:53:49 GMT
Linden H van der (MI) wrote:
> Guys,
> can someone with in-depth knowledge of the CForms widgets help me out
> here? I want to build a form that can be used to enter an HL7v3
> TelecomAddress[1]. The final XML result looks like this:
> <telecomAddress use="HP" nullFlavor="OTH"/>
> or
> <telecomAddress use="HP" value="tel:+3112345678"/>
> I've managed to build the appropriate widget structure for it, but I
> have a problem: either 'nullFlavor' or 'value' should be used. If
> 'nullFlavor' is empty, then 'value' is required and consists of two
> required parts: 'scheme' (= tel:, selection list) and the actual number.
> So I defined 'value' as an aggregateField.
> Is it possible to define the two parts of 'value' to be required, while
> the aggregateField itself is not?
> Or is there a different solution to solve this problem?
> [1] HL7 = a US standards organisation in the field of Medical
> Informatics. HL7v3 is their 3rd version of standards, primarily defined
> for standardized communication of medical and personal information
> between (medical) systems.

What about a custom validator?

Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}


View raw message