Custom Control / Custom Properties / Content Type Definition

Aug 13, 2009 at 9:52 PM

Hello,

I just wanted to comment on the statement you had regarding the <Customization><ArrayOfProperty> etc...  under the <Field> Element.  You stated that it was possible to use this within Content Type definitions as well as Schema.xml etc...  It is not currently possible to do so within a Content Type definition,

http://www.codeplex.com/wssxsd

There is an error in the wss.xsd...  I was wondering if you found a good solution to resolve this issue?

Aug 14, 2009 at 8:00 AM
Edited Aug 14, 2009 at 8:01 AM

You are right, unless you alter wss.xsd (12\TEMPLATE\XML) you will not be able to install the solution.

So, in case you get this error when trying to install:

VSeWSS Service Error: Feature definition with Id 5549ed97-5c60-49cb-9818-0779000b9aa3 failed validation, file 'Untitled 1\Untitled 1\SiteColumn.xml', line 11, character 6: The element 'Field' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'Customization' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FieldRefs, CHOICES, DefaultFormula, MAPPINGS, DisplayPattern, DisplayBidiPattern, Default, Formula' in namespace 'http://schemas.microsoft.com/sharepoint/'.

update the wss.xsd with the one you mentioned (or you can just insert the definition for the Customization element in the FieldDefinition definition).

In case of an update that overwrite wss.xsd you will have to do it again. Might not be the best ideea, but is the olny one I have for the moment.

Thank you for pointing to this issue.

Aug 14, 2009 at 4:24 PM

If you plan to have the same properties for your field throughout all of you lists, then placing the customization section within the FieldDefinition definition is viable, however if your properties change from list to list or even between columns, then this is not an option.  I am choosing to go through the feature receiver to modify the properties in that particular field for that particular content type.  Thanks for getting back to me, I wonder if this is “by Design” for Microsoft or an oversight?...  Have a good day…

Brandon E. Berndtson

Software Developer

Technology Associates International Corporation

Office: (360) 337-2727 Ext. 4107

From: ctapus [mailto:notifications@codeplex.com]
Sent: Friday, August 14, 2009 12:00 AM
To: bberndtson@taic.net
Subject: Re: Custom Control / Custom Properties / Content Type Definition [CSPF:65512]

From: ctapus

You are right, unless you alter wss.xsd (12\TEMPLATE\XML) you will not be able to install the solution.

So, in case you get this error when trying to install:

VSeWSS Service Error: Feature definition with Id 5549ed97-5c60-49cb-9818-0779000b9aa3 failed validation, file 'Untitled 1\Untitled 1\SiteColumn.xml', line 11, character 6: The element 'Field' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'Customization' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FieldRefs, CHOICES, DefaultFormula, MAPPINGS, DisplayPattern, DisplayBidiPattern, Default, Formula' in namespace 'http://schemas.microsoft.com/sharepoint/'.

update the wss.xsd with the one you mentioned (or you can just insert the definition for the Customization element in the FieldDefinition definition).

In case of an update that overwrite wss.xsd you will have to do it again.

Thank you for pointing to this issue.

Read the full discussion online.

To add a post to this discussion, reply to this email (CSPF@discussions.codeplex.com)

To start a new discussion for this project, email CSPF@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Aug 18, 2009 at 8:05 AM
Edited Aug 18, 2009 at 8:08 AM
You can have different settings per each column (field type instance). For example you could have two columns of type CustomMultiChoiceField with different settings in schema.xml:

<Field ID="{8482bffb-1e9a-46cd-9b65-a4d9bec1b876}" Type="CustomMultiChoiceField" DisplayName="CustomMultiChoice1" StaticName="CustomMultiChoice1" Name="CustomMultiChoice1">
  <Customization>
    <ArrayOfProperty>
      <Property>
        <Name>Values</Name>
        <Value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
          Value1
          Value2
          Value3
          Value4
          Value5
        </Value>
      </Property>
      <Property>
        <Name>Height</Name>
        <Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:double" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
          200
        </Value>
      </Property>
    </ArrayOfProperty>
  </Customization>
</Field>
<Field ID="{542D9842-6B99-4230-A190-D5A5C7AE4EE8}" Type="CustomMultiChoiceField" DisplayName="CustomMultiChoice2" StaticName="CustomMultiChoice2" Name="CustomMultiChoice2">
  <Customization>
    <ArrayOfProperty>
      <Property>
        <Name>Values</Name>
        <Value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
          Text1
          Text2
          Text3
          Text4
          Text5
        </Value>
      </Property>
      <Property>
        <Name>Height</Name>
        <Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:double" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
          400
        </Value>
      </Property>
    </ArrayOfProperty>
  </Customization>
</Field>
<Field ID="{8482bffb-1e9a-46cd-9b65-a4d9bec1b876}" Type="CustomMultiChoiceField" DisplayName="CustomMultiChoice1" StaticName="CustomMultiChoice1" Name="CustomMultiChoice1">
  <Customization>
    <ArrayOfProperty>
      <Property>
        <Name>Values</Name>
        <Value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
          Value1
          Value2
          Value3
          Value4
          Value5
        </Value>
      </Property>
      <Property>
        <Name>Height</Name>
        <Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:double" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
          200
        </Value>
      </Property>
    </ArrayOfProperty>
  </Customization>
</Field>
<Field ID="{542D9842-6B99-4230-A190-D5A5C7AE4EE8}" Type="CustomMultiChoiceField" DisplayName="CustomMultiChoice2" StaticName="CustomMultiChoice2" Name="CustomMultiChoice2">
  <Customization>
    <ArrayOfProperty>
      <Property>
        <Name>Values</Name>
        <Value xmlns:q1="http://www.w3.org/2001/XMLSchema" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
          Text1
          Text2
          Text3
          Text4
          Text5
        </Value>
      </Property>
      <Property>
        <Name>Height</Name>
        <Value xmlns:q2="http://www.w3.org/2001/XMLSchema" p4:type="q2:double" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">
          400
        </Value>
      </Property>
    </ArrayOfProperty>
  </Customization>
</Field>
branbe wrote:

If you plan to have the same properties for your field throughout all of you lists, then placing the customization section within the FieldDefinition definition is viable, however if your properties change from list to list or even between columns, then this is not an option.  I am choosing to go through the feature receiver to modify the properties in that particular field for that particular content type.  Thanks for getting back to me, I wonder if this is “by Design” for Microsoft or an oversight?...  Have a good day…

Brandon E. Berndtson

Software Developer

Technology Associates International Corporation

Office: (360) 337-2727 Ext. 4107

From: ctapus [mailto:notifications@codeplex.com]
Sent: Friday, August 14, 2009 12:00 AM
To: bberndtson@taic.net
Subject: Re: Custom Control / Custom Properties / Content Type Definition [CSPF:65512]

 

From: ctapus

You are right, unless you alter wss.xsd (12\TEMPLATE\XML) you will not be able to install the solution.

So, in case you get this error when trying to install:

VSeWSS Service Error: Feature definition with Id 5549ed97-5c60-49cb-9818-0779000b9aa3 failed validation, file 'Untitled 1\Untitled 1\SiteColumn.xml', line 11, character 6: The element 'Field' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'Customization' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FieldRefs, CHOICES, DefaultFormula, MAPPINGS, DisplayPattern, DisplayBidiPattern, Default, Formula' in namespace 'http://schemas.microsoft.com/sharepoint/'.

update the wss.xsd with the one you mentioned (or you can just insert the definition for the Customization element in the FieldDefinition definition).

In case of an update that overwrite wss.xsd you will have to do it again.

Thank you for pointing to this issue.

Read the full discussion online.

To add a post to this discussion, reply to this email (CSPF@discussions.codeplex.com)

To start a new discussion for this project, email CSPF@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com