[opencms-dev] Problem displaying DisplayWidget in Nested XSD
Mathias Lin
mail at mathiaslin.com
Fri May 1 10:12:17 CEST 2009
Hi Marc,
the default value for the child element needs to be defined in the
parent xsd that's nesting the child xsd, not in the child xsd itself.
Did you do that?
Mathias
Johnson, Marc wrote:
> Matthias, I've provided a better description in the subject:
>
> The label displays, but the default text in my DisplayWidget does not. The problem seems to be in our setup because I cannot get the existing sample code that ships with OpenCMS to work (we're using 7.02) with the correct syntax to show up either.
>
> So if in the child XSD I place in the sections:
> 1. xsd:sequence: <xsd:element name="DisplayWidget" type="OpenCmsString" minOccurs="0" maxOccurs="2" />
> 2. defaults: <default element="DisplayWidget" value="Value that is simply displayed and not editable." />
> 3. layouts: <layout element="DisplayWidget" widget="DisplayWidget" />
> 4. workplace.properties: label.childXSD.DisplayWidget = Display Widget
> 5. restart Apache Tomcat(6.0.18)
>
> I can see the label when I Edit the parent structured content but not the value of the DisplayWidget.
> If I place those elements in the parent XSD, I can see both the label and the value of the DisplayWidget.
>
> Marc C. Johnson
> Web Programmer
> Technology & Enterprise Computing
> T 312 648.3703
> C 312 617.8882
> CME Group
> A CME/Chicago Board of Trade/NYMEX Company
> 550 W. Washington,
> Chicago IL 60661
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Mathias Lin
> Sent: Wednesday, April 29, 2009 8:04 PM
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] Hi I've a situation that seems like it would happen frequently but I haven't seen anything regarding this
>
> Hi MCJ,
>
> the problem description is little unclear.
> What do you mean by 'the simple message won't display'? Does only the
> widget not appear, but the label, or nothing at all? What's the 'simple
> message' ? Your field is named 'Message'?
> Please provide the source code of both xds's, otherwise it's hard to say
> anything.
>
> BTW: Please give your postings in the mailing list a meaningful subject
> that describes the problem in short, like 'Problem displaying widgets of
> nested XSD' rather than
> 'Hi I've a situation that seems like it would happen frequently but I
> haven't seen anything regarding this'
>
> Best regards,
> Mathias
> SYSVISION Ltd., China
>
>
> Johnson, Marc wrote:
>
>> I have an xsd which includes another xsd with some optional elements.
>>
>> One of the optional elements in the included xsd is a set of instructions that do not change.
>>
>> I cannot get these instructions to display using the displaywidget.
>>
>> Even when I paste the working displaywidget sample that comes with opencms into the child XSD the simple message won't display.
>>
>> The sample code works fine in the parent XSD.
>>
>> Does anyone know what the problem is?
>>
>> From MCJ in Chicago.
>>
>>
>>
>
>
More information about the opencms-dev
mailing list